summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:10:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:10:08 +0000
commit5262a872f308b3b584c97d621992fb3877e392b8 (patch)
treeb956c322376141abeafe639bd72cfecdf16954b5
parentInitial commit. (diff)
downloadxz-utils-5262a872f308b3b584c97d621992fb3877e392b8.tar.xz
xz-utils-5262a872f308b3b584c97d621992fb3877e392b8.zip
Adding upstream version 5.6.1+really5.4.5.upstream/5.6.1+really5.4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--ABOUT-NLS1
-rw-r--r--AUTHORS39
-rw-r--r--CMakeLists.txt1383
-rw-r--r--COPYING76
-rw-r--r--COPYING.GPLv2339
-rw-r--r--COPYING.GPLv3674
-rw-r--r--COPYING.LGPLv2.1502
-rw-r--r--ChangeLog11756
-rw-r--r--INSTALL765
-rw-r--r--INSTALL.generic368
-rw-r--r--Makefile.am134
-rw-r--r--Makefile.in1121
-rw-r--r--NEWS1798
-rw-r--r--PACKAGERS243
-rw-r--r--README307
-rw-r--r--THANKS174
-rw-r--r--TODO109
-rw-r--r--aclocal.m41196
-rwxr-xr-xautogen.sh56
-rwxr-xr-xbuild-aux/compile348
-rwxr-xr-xbuild-aux/config.guess1754
-rwxr-xr-xbuild-aux/config.rpath684
-rwxr-xr-xbuild-aux/config.sub1890
-rwxr-xr-xbuild-aux/depcomp791
-rwxr-xr-xbuild-aux/install-sh541
-rw-r--r--build-aux/ltmain.sh11437
-rw-r--r--build-aux/manconv.sh58
-rwxr-xr-xbuild-aux/missing215
-rwxr-xr-xbuild-aux/test-driver153
-rw-r--r--build-aux/version.sh24
-rw-r--r--cmake/remove-ordinals.cmake26
-rw-r--r--cmake/tuklib_common.cmake49
-rw-r--r--cmake/tuklib_cpucores.cmake180
-rw-r--r--cmake/tuklib_integer.cmake101
-rw-r--r--cmake/tuklib_large_file_support.cmake52
-rw-r--r--cmake/tuklib_mbstr.cmake20
-rw-r--r--cmake/tuklib_physmem.cmake150
-rw-r--r--cmake/tuklib_progname.cmake18
-rw-r--r--config.h.in601
-rwxr-xr-xconfigure24905
-rw-r--r--configure.ac1191
-rw-r--r--debug/Makefile.am30
-rw-r--r--debug/Makefile.in735
-rw-r--r--debug/README17
-rw-r--r--debug/crc32.c39
-rw-r--r--debug/full_flush.c103
-rw-r--r--debug/hex2bin.c53
-rw-r--r--debug/known_sizes.c129
-rw-r--r--debug/memusage.c51
-rw-r--r--debug/repeat.c36
-rw-r--r--debug/sync_flush.c125
-rw-r--r--debug/translation.bash100
-rw-r--r--doc/api/annotated.html68
-rw-r--r--doc/api/base_8h.html580
-rw-r--r--doc/api/bc_s.pngbin0 -> 675 bytes
-rw-r--r--doc/api/bc_sd.pngbin0 -> 604 bytes
-rw-r--r--doc/api/bcj_8h.html105
-rw-r--r--doc/api/block_8h.html758
-rw-r--r--doc/api/check_8h.html340
-rw-r--r--doc/api/classes.html60
-rw-r--r--doc/api/closed.pngbin0 -> 132 bytes
-rw-r--r--doc/api/container_8h.html1279
-rw-r--r--doc/api/delta_8h.html132
-rw-r--r--doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html104
-rw-r--r--doc/api/doc.svg12
-rw-r--r--doc/api/docd.svg12
-rw-r--r--doc/api/doxygen.css2017
-rw-r--r--doc/api/doxygen.svg28
-rw-r--r--doc/api/files.html74
-rw-r--r--doc/api/filter_8h.html1342
-rw-r--r--doc/api/folderclosed.svg11
-rw-r--r--doc/api/folderclosedd.svg11
-rw-r--r--doc/api/folderopen.svg17
-rw-r--r--doc/api/folderopend.svg12
-rw-r--r--doc/api/functions.html210
-rw-r--r--doc/api/functions_vars.html210
-rw-r--r--doc/api/globals.html272
-rw-r--r--doc/api/globals_defs.html119
-rw-r--r--doc/api/globals_enum.html71
-rw-r--r--doc/api/globals_eval.html103
-rw-r--r--doc/api/globals_func.html177
-rw-r--r--doc/api/globals_type.html68
-rw-r--r--doc/api/hardware_8h.html123
-rw-r--r--doc/api/index.html53
-rw-r--r--doc/api/index_8h.html1268
-rw-r--r--doc/api/index__hash_8h.html311
-rw-r--r--doc/api/lzma12_8h.html436
-rw-r--r--doc/api/lzma_8h.html109
-rw-r--r--doc/api/nav_f.pngbin0 -> 167 bytes
-rw-r--r--doc/api/nav_fd.pngbin0 -> 144 bytes
-rw-r--r--doc/api/nav_g.pngbin0 -> 95 bytes
-rw-r--r--doc/api/nav_h.pngbin0 -> 97 bytes
-rw-r--r--doc/api/nav_hd.pngbin0 -> 104 bytes
-rw-r--r--doc/api/open.pngbin0 -> 121 bytes
-rw-r--r--doc/api/splitbar.pngbin0 -> 309 bytes
-rw-r--r--doc/api/splitbard.pngbin0 -> 278 bytes
-rw-r--r--doc/api/stream__flags_8h.html348
-rw-r--r--doc/api/structlzma__allocator.html153
-rw-r--r--doc/api/structlzma__block.html347
-rw-r--r--doc/api/structlzma__filter.html114
-rw-r--r--doc/api/structlzma__index__iter.html407
-rw-r--r--doc/api/structlzma__mt.html256
-rw-r--r--doc/api/structlzma__options__bcj.html95
-rw-r--r--doc/api/structlzma__options__delta.html113
-rw-r--r--doc/api/structlzma__options__lzma.html363
-rw-r--r--doc/api/structlzma__stream.html251
-rw-r--r--doc/api/structlzma__stream__flags.html134
-rw-r--r--doc/api/sync_off.pngbin0 -> 857 bytes
-rw-r--r--doc/api/sync_on.pngbin0 -> 851 bytes
-rw-r--r--doc/api/tab_a.pngbin0 -> 135 bytes
-rw-r--r--doc/api/tab_ad.pngbin0 -> 133 bytes
-rw-r--r--doc/api/tab_b.pngbin0 -> 178 bytes
-rw-r--r--doc/api/tab_bd.pngbin0 -> 157 bytes
-rw-r--r--doc/api/tab_h.pngbin0 -> 179 bytes
-rw-r--r--doc/api/tab_hd.pngbin0 -> 168 bytes
-rw-r--r--doc/api/tab_s.pngbin0 -> 208 bytes
-rw-r--r--doc/api/tab_sd.pngbin0 -> 171 bytes
-rw-r--r--doc/api/tabs.css62
-rw-r--r--doc/api/version_8h.html239
-rw-r--r--doc/api/vli_8h.html323
-rw-r--r--doc/examples/00_README.txt31
-rw-r--r--doc/examples/01_compress_easy.c297
-rw-r--r--doc/examples/02_decompress.c287
-rw-r--r--doc/examples/03_compress_custom.c193
-rw-r--r--doc/examples/04_compress_easy_mt.c206
-rw-r--r--doc/examples/Makefile25
-rw-r--r--doc/examples_old/xz_pipe_comp.c127
-rw-r--r--doc/examples_old/xz_pipe_decomp.c123
-rw-r--r--doc/faq.txt244
-rw-r--r--doc/history.txt150
-rw-r--r--doc/lzma-file-format.txt173
-rw-r--r--doc/man/pdf-a4/lzmainfo-a4.pdfbin0 -> 16384 bytes
-rw-r--r--doc/man/pdf-a4/xz-a4.pdfbin0 -> 114746 bytes
-rw-r--r--doc/man/pdf-a4/xzdec-a4.pdfbin0 -> 19978 bytes
-rw-r--r--doc/man/pdf-a4/xzdiff-a4.pdfbin0 -> 17200 bytes
-rw-r--r--doc/man/pdf-a4/xzgrep-a4.pdfbin0 -> 18338 bytes
-rw-r--r--doc/man/pdf-a4/xzless-a4.pdfbin0 -> 15029 bytes
-rw-r--r--doc/man/pdf-a4/xzmore-a4.pdfbin0 -> 15203 bytes
-rw-r--r--doc/man/pdf-letter/lzmainfo-letter.pdfbin0 -> 16394 bytes
-rw-r--r--doc/man/pdf-letter/xz-letter.pdfbin0 -> 115882 bytes
-rw-r--r--doc/man/pdf-letter/xzdec-letter.pdfbin0 -> 19970 bytes
-rw-r--r--doc/man/pdf-letter/xzdiff-letter.pdfbin0 -> 17227 bytes
-rw-r--r--doc/man/pdf-letter/xzgrep-letter.pdfbin0 -> 18322 bytes
-rw-r--r--doc/man/pdf-letter/xzless-letter.pdfbin0 -> 15022 bytes
-rw-r--r--doc/man/pdf-letter/xzmore-letter.pdfbin0 -> 15159 bytes
-rw-r--r--doc/man/txt/lzmainfo.txt40
-rw-r--r--doc/man/txt/xz.txt1586
-rw-r--r--doc/man/txt/xzdec.txt80
-rw-r--r--doc/man/txt/xzdiff.txt37
-rw-r--r--doc/man/txt/xzgrep.txt49
-rw-r--r--doc/man/txt/xzless.txt39
-rw-r--r--doc/man/txt/xzmore.txt34
-rw-r--r--doc/xz-file-format.txt1165
-rw-r--r--dos/INSTALL.txt78
-rw-r--r--dos/Makefile149
-rw-r--r--dos/README.txt123
-rw-r--r--dos/config.h153
-rw-r--r--doxygen/Doxyfile2687
-rwxr-xr-xdoxygen/update-doxygen111
-rwxr-xr-xextra/7z2lzma/7z2lzma.bash115
-rw-r--r--extra/scanlzma/scanlzma.c88
-rw-r--r--lib/Makefile.am32
-rw-r--r--lib/Makefile.in600
-rw-r--r--lib/getopt.c1197
-rw-r--r--lib/getopt.in.h226
-rw-r--r--lib/getopt1.c171
-rw-r--r--lib/getopt_int.h131
-rw-r--r--m4/ax_check_capsicum.m485
-rw-r--r--m4/ax_pthread.m4522
-rw-r--r--m4/getopt.m471
-rw-r--r--m4/gettext.m4386
-rw-r--r--m4/host-cpu-c-abi.m4678
-rw-r--r--m4/iconv.m4283
-rw-r--r--m4/intlmacosx.m465
-rw-r--r--m4/lib-ld.m4168
-rw-r--r--m4/lib-link.m4813
-rw-r--r--m4/lib-prefix.m4323
-rw-r--r--m4/libtool.m48399
-rw-r--r--m4/ltoptions.m4437
-rw-r--r--m4/ltsugar.m4124
-rw-r--r--m4/ltversion.m424
-rw-r--r--m4/lt~obsolete.m499
-rw-r--r--m4/nls.m432
-rw-r--r--m4/po.m4454
-rw-r--r--m4/posix-shell.m463
-rw-r--r--m4/progtest.m491
-rw-r--r--m4/tuklib_common.m422
-rw-r--r--m4/tuklib_cpucores.m4180
-rw-r--r--m4/tuklib_integer.m4131
-rw-r--r--m4/tuklib_mbstr.m430
-rw-r--r--m4/tuklib_physmem.m4211
-rw-r--r--m4/tuklib_progname.m428
-rw-r--r--m4/visibility.m482
-rwxr-xr-xmacosx/build.sh113
-rw-r--r--po/LINGUAS23
-rw-r--r--po/Makefile.in.in510
-rw-r--r--po/Makevars46
-rw-r--r--po/POTFILES.in13
-rw-r--r--po/Rules-quot62
-rw-r--r--po/boldquot.sed10
-rw-r--r--po/ca.gmobin0 -> 26876 bytes
-rw-r--r--po/ca.po1044
-rw-r--r--po/cs.gmobin0 -> 17576 bytes
-rw-r--r--po/cs.po1150
-rw-r--r--po/da.gmobin0 -> 12015 bytes
-rw-r--r--po/da.po1021
-rw-r--r--po/de.gmobin0 -> 28599 bytes
-rw-r--r--po/de.po1065
-rw-r--r--po/en@boldquot.header25
-rw-r--r--po/en@quot.header22
-rw-r--r--po/eo.gmobin0 -> 26139 bytes
-rw-r--r--po/eo.po1038
-rw-r--r--po/es.gmobin0 -> 27192 bytes
-rw-r--r--po/es.po1082
-rw-r--r--po/fi.gmobin0 -> 25923 bytes
-rw-r--r--po/fi.po1072
-rw-r--r--po/fr.gmobin0 -> 22307 bytes
-rw-r--r--po/fr.po1148
-rw-r--r--po/hr.gmobin0 -> 26682 bytes
-rw-r--r--po/hr.po1079
-rw-r--r--po/hu.gmobin0 -> 27374 bytes
-rw-r--r--po/hu.po1086
-rw-r--r--po/insert-header.sin28
-rw-r--r--po/it.gmobin0 -> 22043 bytes
-rw-r--r--po/it.po1138
-rw-r--r--po/ko.gmobin0 -> 27394 bytes
-rw-r--r--po/ko.po1070
-rw-r--r--po/pl.gmobin0 -> 26643 bytes
-rw-r--r--po/pl.po1033
-rw-r--r--po/pt.gmobin0 -> 21887 bytes
-rw-r--r--po/pt.po1151
-rw-r--r--po/pt_BR.gmobin0 -> 26890 bytes
-rw-r--r--po/pt_BR.po1097
-rw-r--r--po/quot.sed6
-rw-r--r--po/remove-potcdate.sin25
-rw-r--r--po/ro.gmobin0 -> 28538 bytes
-rw-r--r--po/ro.po1138
-rw-r--r--po/sr.gmobin0 -> 27551 bytes
-rw-r--r--po/sr.po1137
-rw-r--r--po/stamp-po1
-rw-r--r--po/sv.gmobin0 -> 26576 bytes
-rw-r--r--po/sv.po1084
-rw-r--r--po/tr.gmobin0 -> 26545 bytes
-rw-r--r--po/tr.po1037
-rw-r--r--po/uk.gmobin0 -> 35322 bytes
-rw-r--r--po/uk.po1094
-rw-r--r--po/vi.gmobin0 -> 28619 bytes
-rw-r--r--po/vi.po1079
-rw-r--r--po/xz.pot930
-rw-r--r--po/zh_CN.gmobin0 -> 25247 bytes
-rw-r--r--po/zh_CN.po1059
-rw-r--r--po/zh_TW.gmobin0 -> 24823 bytes
-rw-r--r--po/zh_TW.po1063
-rw-r--r--po4a/.gitignore2
-rw-r--r--po4a/de.po5850
-rw-r--r--po4a/fr.po6204
-rw-r--r--po4a/ko.po5555
-rw-r--r--po4a/man/de/lzmainfo.145
-rw-r--r--po4a/man/de/xz.11938
-rw-r--r--po4a/man/de/xzdec.187
-rw-r--r--po4a/man/de/xzdiff.145
-rw-r--r--po4a/man/de/xzgrep.164
-rw-r--r--po4a/man/de/xzless.147
-rw-r--r--po4a/man/de/xzmore.140
-rw-r--r--po4a/man/fr/lzmainfo.144
-rw-r--r--po4a/man/fr/xz.11870
-rw-r--r--po4a/man/fr/xzdec.187
-rw-r--r--po4a/man/fr/xzdiff.143
-rw-r--r--po4a/man/fr/xzless.146
-rw-r--r--po4a/man/fr/xzmore.141
-rw-r--r--po4a/man/ko/lzmainfo.137
-rw-r--r--po4a/man/ko/xz.11445
-rw-r--r--po4a/man/ko/xzdec.171
-rw-r--r--po4a/man/ko/xzdiff.139
-rw-r--r--po4a/man/ko/xzgrep.157
-rw-r--r--po4a/man/ko/xzless.139
-rw-r--r--po4a/man/ko/xzmore.136
-rw-r--r--po4a/man/pt_BR/lzmainfo.143
-rw-r--r--po4a/man/pt_BR/xz.11837
-rw-r--r--po4a/man/pt_BR/xzdec.185
-rw-r--r--po4a/man/pt_BR/xzdiff.144
-rw-r--r--po4a/man/pt_BR/xzgrep.163
-rw-r--r--po4a/man/pt_BR/xzless.146
-rw-r--r--po4a/man/pt_BR/xzmore.139
-rw-r--r--po4a/man/ro/lzmainfo.144
-rw-r--r--po4a/man/ro/xz.11921
-rw-r--r--po4a/man/ro/xzdec.188
-rw-r--r--po4a/man/ro/xzdiff.145
-rw-r--r--po4a/man/ro/xzgrep.164
-rw-r--r--po4a/man/ro/xzless.147
-rw-r--r--po4a/man/ro/xzmore.140
-rw-r--r--po4a/man/uk/lzmainfo.144
-rw-r--r--po4a/man/uk/xz.11868
-rw-r--r--po4a/man/uk/xzdec.184
-rw-r--r--po4a/man/uk/xzdiff.144
-rw-r--r--po4a/man/uk/xzgrep.164
-rw-r--r--po4a/man/uk/xzless.147
-rw-r--r--po4a/man/uk/xzmore.140
-rw-r--r--po4a/po4a.conf14
-rw-r--r--po4a/pt_BR.po5748
-rw-r--r--po4a/ro.po5838
-rw-r--r--po4a/uk.po5760
-rwxr-xr-xpo4a/update-po45
-rw-r--r--po4a/xz-man.pot4642
-rw-r--r--src/Makefile.am42
-rw-r--r--src/Makefile.in696
-rw-r--r--src/common/common_w32res.rc52
-rw-r--r--src/common/mythread.h528
-rw-r--r--src/common/sysdefs.h197
-rw-r--r--src/common/tuklib_common.h71
-rw-r--r--src/common/tuklib_config.h10
-rw-r--r--src/common/tuklib_cpucores.c109
-rw-r--r--src/common/tuklib_cpucores.h23
-rw-r--r--src/common/tuklib_exit.c58
-rw-r--r--src/common/tuklib_exit.h25
-rw-r--r--src/common/tuklib_gettext.h44
-rw-r--r--src/common/tuklib_integer.h946
-rw-r--r--src/common/tuklib_mbstr.h66
-rw-r--r--src/common/tuklib_mbstr_fw.c31
-rw-r--r--src/common/tuklib_mbstr_width.c65
-rw-r--r--src/common/tuklib_open_stdxxx.c57
-rw-r--r--src/common/tuklib_open_stdxxx.h23
-rw-r--r--src/common/tuklib_physmem.c234
-rw-r--r--src/common/tuklib_physmem.h28
-rw-r--r--src/common/tuklib_progname.c50
-rw-r--r--src/common/tuklib_progname.h32
-rw-r--r--src/liblzma/Makefile.am130
-rw-r--r--src/liblzma/Makefile.in2236
-rw-r--r--src/liblzma/api/Makefile.am23
-rw-r--r--src/liblzma/api/Makefile.in630
-rw-r--r--src/liblzma/api/lzma.h328
-rw-r--r--src/liblzma/api/lzma/base.h748
-rw-r--r--src/liblzma/api/lzma/bcj.h94
-rw-r--r--src/liblzma/api/lzma/block.h695
-rw-r--r--src/liblzma/api/lzma/check.h164
-rw-r--r--src/liblzma/api/lzma/container.h968
-rw-r--r--src/liblzma/api/lzma/delta.h96
-rw-r--r--src/liblzma/api/lzma/filter.h770
-rw-r--r--src/liblzma/api/lzma/hardware.h63
-rw-r--r--src/liblzma/api/lzma/index.h860
-rw-r--r--src/liblzma/api/lzma/index_hash.h124
-rw-r--r--src/liblzma/api/lzma/lzma12.h569
-rw-r--r--src/liblzma/api/lzma/stream_flags.h266
-rw-r--r--src/liblzma/api/lzma/version.h135
-rw-r--r--src/liblzma/api/lzma/vli.h168
-rw-r--r--src/liblzma/check/Makefile.inc53
-rw-r--r--src/liblzma/check/check.c174
-rw-r--r--src/liblzma/check/check.h175
-rw-r--r--src/liblzma/check/crc32_fast.c82
-rw-r--r--src/liblzma/check/crc32_small.c68
-rw-r--r--src/liblzma/check/crc32_table.c22
-rw-r--r--src/liblzma/check/crc32_table_be.h525
-rw-r--r--src/liblzma/check/crc32_table_le.h525
-rw-r--r--src/liblzma/check/crc32_tablegen.c117
-rw-r--r--src/liblzma/check/crc32_x86.S313
-rw-r--r--src/liblzma/check/crc64_fast.c538
-rw-r--r--src/liblzma/check/crc64_small.c58
-rw-r--r--src/liblzma/check/crc64_table.c33
-rw-r--r--src/liblzma/check/crc64_table_be.h521
-rw-r--r--src/liblzma/check/crc64_table_le.h521
-rw-r--r--src/liblzma/check/crc64_tablegen.c88
-rw-r--r--src/liblzma/check/crc64_x86.S296
-rw-r--r--src/liblzma/check/crc_macros.h30
-rw-r--r--src/liblzma/check/sha256.c196
-rw-r--r--src/liblzma/common/Makefile.inc104
-rw-r--r--src/liblzma/common/alone_decoder.c249
-rw-r--r--src/liblzma/common/alone_decoder.h23
-rw-r--r--src/liblzma/common/alone_encoder.c152
-rw-r--r--src/liblzma/common/auto_decoder.c206
-rw-r--r--src/liblzma/common/block_buffer_decoder.c80
-rw-r--r--src/liblzma/common/block_buffer_encoder.c355
-rw-r--r--src/liblzma/common/block_buffer_encoder.h24
-rw-r--r--src/liblzma/common/block_decoder.c289
-rw-r--r--src/liblzma/common/block_decoder.h22
-rw-r--r--src/liblzma/common/block_encoder.c227
-rw-r--r--src/liblzma/common/block_encoder.h47
-rw-r--r--src/liblzma/common/block_header_decoder.c115
-rw-r--r--src/liblzma/common/block_header_encoder.c132
-rw-r--r--src/liblzma/common/block_util.c90
-rw-r--r--src/liblzma/common/common.c481
-rw-r--r--src/liblzma/common/common.h413
-rw-r--r--src/liblzma/common/easy_buffer_encoder.c27
-rw-r--r--src/liblzma/common/easy_decoder_memusage.c24
-rw-r--r--src/liblzma/common/easy_encoder.c24
-rw-r--r--src/liblzma/common/easy_encoder_memusage.c24
-rw-r--r--src/liblzma/common/easy_preset.c27
-rw-r--r--src/liblzma/common/easy_preset.h32
-rw-r--r--src/liblzma/common/file_info.c855
-rw-r--r--src/liblzma/common/filter_buffer_decoder.c88
-rw-r--r--src/liblzma/common/filter_buffer_encoder.c55
-rw-r--r--src/liblzma/common/filter_common.c385
-rw-r--r--src/liblzma/common/filter_common.h51
-rw-r--r--src/liblzma/common/filter_decoder.c198
-rw-r--r--src/liblzma/common/filter_decoder.h23
-rw-r--r--src/liblzma/common/filter_encoder.c308
-rw-r--r--src/liblzma/common/filter_encoder.h27
-rw-r--r--src/liblzma/common/filter_flags_decoder.c46
-rw-r--r--src/liblzma/common/filter_flags_encoder.c56
-rw-r--r--src/liblzma/common/hardware_cputhreads.c34
-rw-r--r--src/liblzma/common/hardware_physmem.c25
-rw-r--r--src/liblzma/common/index.c1269
-rw-r--r--src/liblzma/common/index.h81
-rw-r--r--src/liblzma/common/index_decoder.c362
-rw-r--r--src/liblzma/common/index_decoder.h25
-rw-r--r--src/liblzma/common/index_encoder.c263
-rw-r--r--src/liblzma/common/index_encoder.h23
-rw-r--r--src/liblzma/common/index_hash.c343
-rw-r--r--src/liblzma/common/lzip_decoder.c418
-rw-r--r--src/liblzma/common/lzip_decoder.h22
-rw-r--r--src/liblzma/common/memcmplen.h173
-rw-r--r--src/liblzma/common/microlzma_decoder.c221
-rw-r--r--src/liblzma/common/microlzma_encoder.c141
-rw-r--r--src/liblzma/common/outqueue.c287
-rw-r--r--src/liblzma/common/outqueue.h254
-rw-r--r--src/liblzma/common/stream_buffer_decoder.c91
-rw-r--r--src/liblzma/common/stream_buffer_encoder.c142
-rw-r--r--src/liblzma/common/stream_decoder.c474
-rw-r--r--src/liblzma/common/stream_decoder.h22
-rw-r--r--src/liblzma/common/stream_decoder_mt.c2018
-rw-r--r--src/liblzma/common/stream_encoder.c355
-rw-r--r--src/liblzma/common/stream_encoder_mt.c1283
-rw-r--r--src/liblzma/common/stream_flags_common.c47
-rw-r--r--src/liblzma/common/stream_flags_common.h36
-rw-r--r--src/liblzma/common/stream_flags_decoder.c88
-rw-r--r--src/liblzma/common/stream_flags_encoder.c86
-rw-r--r--src/liblzma/common/string_conversion.c1324
-rw-r--r--src/liblzma/common/vli_decoder.c86
-rw-r--r--src/liblzma/common/vli_encoder.c69
-rw-r--r--src/liblzma/common/vli_size.c30
-rw-r--r--src/liblzma/delta/Makefile.inc23
-rw-r--r--src/liblzma/delta/delta_common.c73
-rw-r--r--src/liblzma/delta/delta_common.h20
-rw-r--r--src/liblzma/delta/delta_decoder.c83
-rw-r--r--src/liblzma/delta/delta_decoder.h26
-rw-r--r--src/liblzma/delta/delta_encoder.c133
-rw-r--r--src/liblzma/delta/delta_encoder.h24
-rw-r--r--src/liblzma/delta/delta_private.h37
-rw-r--r--src/liblzma/liblzma.pc.in20
-rw-r--r--src/liblzma/liblzma_generic.map121
-rw-r--r--src/liblzma/liblzma_linux.map136
-rw-r--r--src/liblzma/liblzma_w32res.rc12
-rw-r--r--src/liblzma/lz/Makefile.inc22
-rw-r--r--src/liblzma/lz/lz_decoder.c304
-rw-r--r--src/liblzma/lz/lz_decoder.h234
-rw-r--r--src/liblzma/lz/lz_encoder.c633
-rw-r--r--src/liblzma/lz/lz_encoder.h341
-rw-r--r--src/liblzma/lz/lz_encoder_hash.h109
-rw-r--r--src/liblzma/lz/lz_encoder_hash_table.h68
-rw-r--r--src/liblzma/lz/lz_encoder_mf.c745
-rw-r--r--src/liblzma/lzma/Makefile.inc44
-rw-r--r--src/liblzma/lzma/fastpos.h142
-rw-r--r--src/liblzma/lzma/fastpos_table.c519
-rw-r--r--src/liblzma/lzma/fastpos_tablegen.c57
-rw-r--r--src/liblzma/lzma/lzma2_decoder.c311
-rw-r--r--src/liblzma/lzma/lzma2_decoder.h29
-rw-r--r--src/liblzma/lzma/lzma2_encoder.c414
-rw-r--r--src/liblzma/lzma/lzma2_encoder.h43
-rw-r--r--src/liblzma/lzma/lzma_common.h225
-rw-r--r--src/liblzma/lzma/lzma_decoder.c1133
-rw-r--r--src/liblzma/lzma/lzma_decoder.h53
-rw-r--r--src/liblzma/lzma/lzma_encoder.c784
-rw-r--r--src/liblzma/lzma/lzma_encoder.h59
-rw-r--r--src/liblzma/lzma/lzma_encoder_optimum_fast.c170
-rw-r--r--src/liblzma/lzma/lzma_encoder_optimum_normal.c859
-rw-r--r--src/liblzma/lzma/lzma_encoder_presets.c64
-rw-r--r--src/liblzma/lzma/lzma_encoder_private.h162
-rw-r--r--src/liblzma/rangecoder/Makefile.inc21
-rw-r--r--src/liblzma/rangecoder/price.h93
-rw-r--r--src/liblzma/rangecoder/price_table.c22
-rw-r--r--src/liblzma/rangecoder/price_tablegen.c87
-rw-r--r--src/liblzma/rangecoder/range_common.h71
-rw-r--r--src/liblzma/rangecoder/range_decoder.h185
-rw-r--r--src/liblzma/rangecoder/range_encoder.h350
-rw-r--r--src/liblzma/simple/Makefile.inc51
-rw-r--r--src/liblzma/simple/arm.c75
-rw-r--r--src/liblzma/simple/arm64.c137
-rw-r--r--src/liblzma/simple/armthumb.c80
-rw-r--r--src/liblzma/simple/ia64.c116
-rw-r--r--src/liblzma/simple/powerpc.c80
-rw-r--r--src/liblzma/simple/simple_coder.c292
-rw-r--r--src/liblzma/simple/simple_coder.h81
-rw-r--r--src/liblzma/simple/simple_decoder.c40
-rw-r--r--src/liblzma/simple/simple_decoder.h22
-rw-r--r--src/liblzma/simple/simple_encoder.c38
-rw-r--r--src/liblzma/simple/simple_encoder.h23
-rw-r--r--src/liblzma/simple/simple_private.h74
-rw-r--r--src/liblzma/simple/sparc.c87
-rw-r--r--src/liblzma/simple/x86.c163
-rw-r--r--src/liblzma/validate_map.sh165
-rw-r--r--src/lzmainfo/Makefile.am39
-rw-r--r--src/lzmainfo/Makefile.in837
-rw-r--r--src/lzmainfo/lzmainfo.160
-rw-r--r--src/lzmainfo/lzmainfo.c221
-rw-r--r--src/lzmainfo/lzmainfo_w32res.rc12
-rw-r--r--src/scripts/Makefile.am89
-rw-r--r--src/scripts/Makefile.in700
-rw-r--r--src/scripts/xzdiff.179
-rw-r--r--src/scripts/xzdiff.in215
-rw-r--r--src/scripts/xzgrep.1113
-rw-r--r--src/scripts/xzgrep.in298
-rw-r--r--src/scripts/xzless.169
-rw-r--r--src/scripts/xzless.in59
-rw-r--r--src/scripts/xzmore.155
-rw-r--r--src/scripts/xzmore.in79
-rw-r--r--src/xz/Makefile.am133
-rw-r--r--src/xz/Makefile.in1162
-rw-r--r--src/xz/args.c763
-rw-r--r--src/xz/args.h44
-rw-r--r--src/xz/coder.c1109
-rw-r--r--src/xz/coder.h79
-rw-r--r--src/xz/file_io.c1403
-rw-r--r--src/xz/file_io.h179
-rw-r--r--src/xz/hardware.c338
-rw-r--r--src/xz/hardware.h75
-rw-r--r--src/xz/list.c1318
-rw-r--r--src/xz/list.h18
-rw-r--r--src/xz/main.c344
-rw-r--r--src/xz/main.h30
-rw-r--r--src/xz/message.c1146
-rw-r--r--src/xz/message.h156
-rw-r--r--src/xz/mytime.c86
-rw-r--r--src/xz/mytime.h43
-rw-r--r--src/xz/options.c359
-rw-r--r--src/xz/options.h31
-rw-r--r--src/xz/private.h66
-rw-r--r--src/xz/signals.c209
-rw-r--r--src/xz/signals.h43
-rw-r--r--src/xz/suffix.c401
-rw-r--r--src/xz/suffix.h36
-rw-r--r--src/xz/util.c287
-rw-r--r--src/xz/util.h119
-rw-r--r--src/xz/xz.13020
-rw-r--r--src/xz/xz_w32res.rc12
-rw-r--r--src/xzdec/Makefile.am111
-rw-r--r--src/xzdec/Makefile.in969
-rw-r--r--src/xzdec/lzmadec_w32res.rc12
-rw-r--r--src/xzdec/xzdec.1146
-rw-r--r--src/xzdec/xzdec.c326
-rw-r--r--src/xzdec/xzdec_w32res.rc12
-rw-r--r--tests/Makefile.am76
-rw-r--r--tests/Makefile.in1349
-rw-r--r--tests/bcj_test.c65
-rw-r--r--tests/compress_prepared_bcj_sparcbin0 -> 1240 bytes
-rw-r--r--tests/compress_prepared_bcj_x86bin0 -> 1388 bytes
-rw-r--r--tests/create_compress_files.c163
-rw-r--r--tests/files/README409
-rw-r--r--tests/files/bad-0-backward_size.xzbin0 -> 32 bytes
-rw-r--r--tests/files/bad-0-empty-truncated.xzbin0 -> 31 bytes
-rw-r--r--tests/files/bad-0-footer_magic.xzbin0 -> 32 bytes
-rw-r--r--tests/files/bad-0-header_magic.xzbin0 -> 32 bytes
-rw-r--r--tests/files/bad-0-nonempty_index.xzbin0 -> 32 bytes
-rw-r--r--tests/files/bad-0cat-alone.xzbin0 -> 55 bytes
-rw-r--r--tests/files/bad-0cat-header_magic.xzbin0 -> 64 bytes
-rw-r--r--tests/files/bad-0catpad-empty.xzbin0 -> 69 bytes
-rw-r--r--tests/files/bad-0pad-empty.xzbin0 -> 37 bytes
-rw-r--r--tests/files/bad-1-block_header-1.xzbin0 -> 64 bytes
-rw-r--r--tests/files/bad-1-block_header-2.xzbin0 -> 64 bytes
-rw-r--r--tests/files/bad-1-block_header-3.xzbin0 -> 68 bytes
-rw-r--r--tests/files/bad-1-block_header-4.xzbin0 -> 76 bytes
-rw-r--r--tests/files/bad-1-block_header-5.xzbin0 -> 72 bytes
-rw-r--r--tests/files/bad-1-block_header-6.xzbin0 -> 72 bytes
-rw-r--r--tests/files/bad-1-check-crc32-2.xzbin0 -> 72 bytes
-rw-r--r--tests/files/bad-1-check-crc32.xzbin0 -> 68 bytes
-rw-r--r--tests/files/bad-1-check-crc64.xzbin0 -> 72 bytes
-rw-r--r--tests/files/bad-1-check-sha256.xzbin0 -> 96 bytes
-rw-r--r--tests/files/bad-1-lzma2-1.xzbin0 -> 64 bytes
-rw-r--r--tests/files/bad-1-lzma2-10.xzbin0 -> 60 bytes
-rw-r--r--tests/files/bad-1-lzma2-11.xzbin0 -> 64 bytes
-rw-r--r--tests/files/bad-1-lzma2-2.xzbin0 -> 424 bytes
-rw-r--r--tests/files/bad-1-lzma2-3.xzbin0 -> 424 bytes
-rw-r--r--tests/files/bad-1-lzma2-4.xzbin0 -> 408 bytes
-rw-r--r--tests/files/bad-1-lzma2-5.xzbin0 -> 408 bytes
-rw-r--r--tests/files/bad-1-lzma2-6.xzbin0 -> 68 bytes
-rw-r--r--tests/files/bad-1-lzma2-7.xzbin0 -> 408 bytes
-rw-r--r--tests/files/bad-1-lzma2-8.xzbin0 -> 464 bytes
-rw-r--r--tests/files/bad-1-lzma2-9.xzbin0 -> 72 bytes
-rw-r--r--tests/files/bad-1-stream_flags-1.xzbin0 -> 68 bytes
-rw-r--r--tests/files/bad-1-stream_flags-2.xzbin0 -> 68 bytes
-rw-r--r--tests/files/bad-1-stream_flags-3.xzbin0 -> 68 bytes
-rw-r--r--tests/files/bad-1-v0-uncomp-size.lzbin0 -> 42 bytes
-rw-r--r--tests/files/bad-1-v1-crc32.lzbin0 -> 50 bytes
-rw-r--r--tests/files/bad-1-v1-dict-1.lzbin0 -> 50 bytes
-rw-r--r--tests/files/bad-1-v1-dict-2.lzbin0 -> 50 bytes
-rw-r--r--tests/files/bad-1-v1-magic-1.lzbin0 -> 50 bytes
-rw-r--r--tests/files/bad-1-v1-magic-2.lzbin0 -> 50 bytes
-rw-r--r--tests/files/bad-1-v1-member-size.lzbin0 -> 50 bytes
-rw-r--r--tests/files/bad-1-v1-trailing-magic.lzbin0 -> 54 bytes
-rw-r--r--tests/files/bad-1-v1-uncomp-size.lzbin0 -> 50 bytes
-rw-r--r--tests/files/bad-1-vli-1.xzbin0 -> 72 bytes
-rw-r--r--tests/files/bad-1-vli-2.xzbin0 -> 76 bytes
-rw-r--r--tests/files/bad-2-compressed_data_padding.xzbin0 -> 92 bytes
-rw-r--r--tests/files/bad-2-index-1.xzbin0 -> 92 bytes
-rw-r--r--tests/files/bad-2-index-2.xzbin0 -> 92 bytes
-rw-r--r--tests/files/bad-2-index-3.xzbin0 -> 92 bytes
-rw-r--r--tests/files/bad-2-index-4.xzbin0 -> 92 bytes
-rw-r--r--tests/files/bad-2-index-5.xzbin0 -> 92 bytes
-rw-r--r--tests/files/bad-3-index-uncomp-overflow.xzbin0 -> 132 bytes
-rw-r--r--tests/files/bad-too_big_size-with_eopm.lzmabin0 -> 37 bytes
-rw-r--r--tests/files/bad-too_small_size-without_eopm-1.lzmabin0 -> 31 bytes
-rw-r--r--tests/files/bad-too_small_size-without_eopm-2.lzmabin0 -> 31 bytes
-rw-r--r--tests/files/bad-too_small_size-without_eopm-3.lzmabin0 -> 36 bytes
-rw-r--r--tests/files/bad-unknown_size-without_eopm.lzmabin0 -> 31 bytes
-rw-r--r--tests/files/good-0-empty.xzbin0 -> 32 bytes
-rw-r--r--tests/files/good-0cat-empty.xzbin0 -> 64 bytes
-rw-r--r--tests/files/good-0catpad-empty.xzbin0 -> 68 bytes
-rw-r--r--tests/files/good-0pad-empty.xzbin0 -> 36 bytes
-rw-r--r--tests/files/good-1-3delta-lzma2.xzbin0 -> 528 bytes
-rw-r--r--tests/files/good-1-arm64-lzma2-1.xzbin0 -> 512 bytes
-rw-r--r--tests/files/good-1-arm64-lzma2-2.xzbin0 -> 488 bytes
-rw-r--r--tests/files/good-1-block_header-1.xzbin0 -> 72 bytes
-rw-r--r--tests/files/good-1-block_header-2.xzbin0 -> 68 bytes
-rw-r--r--tests/files/good-1-block_header-3.xzbin0 -> 68 bytes
-rw-r--r--tests/files/good-1-check-crc32.xzbin0 -> 68 bytes
-rw-r--r--tests/files/good-1-check-crc64.xzbin0 -> 72 bytes
-rw-r--r--tests/files/good-1-check-none.xzbin0 -> 64 bytes
-rw-r--r--tests/files/good-1-check-sha256.xzbin0 -> 96 bytes
-rw-r--r--tests/files/good-1-delta-lzma2.tiff.xzbin0 -> 51316 bytes
-rw-r--r--tests/files/good-1-empty-bcj-lzma2.xzbin0 -> 52 bytes
-rw-r--r--tests/files/good-1-lzma2-1.xzbin0 -> 424 bytes
-rw-r--r--tests/files/good-1-lzma2-2.xzbin0 -> 424 bytes
-rw-r--r--tests/files/good-1-lzma2-3.xzbin0 -> 408 bytes
-rw-r--r--tests/files/good-1-lzma2-4.xzbin0 -> 464 bytes
-rw-r--r--tests/files/good-1-lzma2-5.xzbin0 -> 52 bytes
-rw-r--r--tests/files/good-1-sparc-lzma2.xzbin0 -> 612 bytes
-rw-r--r--tests/files/good-1-v0-trailing-1.lzbin0 -> 59 bytes
-rw-r--r--tests/files/good-1-v0.lzbin0 -> 42 bytes
-rw-r--r--tests/files/good-1-v1-trailing-1.lzbin0 -> 67 bytes
-rw-r--r--tests/files/good-1-v1-trailing-2.lzbin0 -> 70 bytes
-rw-r--r--tests/files/good-1-v1.lzbin0 -> 50 bytes
-rw-r--r--tests/files/good-1-x86-lzma2.xzbin0 -> 716 bytes
-rw-r--r--tests/files/good-2-lzma2.xzbin0 -> 92 bytes
-rw-r--r--tests/files/good-2-v0-v1.lzbin0 -> 78 bytes
-rw-r--r--tests/files/good-2-v1-v0.lzbin0 -> 78 bytes
-rw-r--r--tests/files/good-2-v1-v1.lzbin0 -> 86 bytes
-rw-r--r--tests/files/good-known_size-with_eopm.lzmabin0 -> 37 bytes
-rw-r--r--tests/files/good-known_size-without_eopm.lzmabin0 -> 31 bytes
-rw-r--r--tests/files/good-unknown_size-with_eopm.lzmabin0 -> 37 bytes
-rw-r--r--tests/files/unsupported-1-v234.lzbin0 -> 50 bytes
-rw-r--r--tests/files/unsupported-block_header.xzbin0 -> 68 bytes
-rw-r--r--tests/files/unsupported-check.xzbin0 -> 68 bytes
-rw-r--r--tests/files/unsupported-filter_flags-1.xzbin0 -> 68 bytes
-rw-r--r--tests/files/unsupported-filter_flags-2.xzbin0 -> 68 bytes
-rw-r--r--tests/files/unsupported-filter_flags-3.xzbin0 -> 68 bytes
-rw-r--r--tests/ossfuzz/Makefile7
-rw-r--r--tests/ossfuzz/config/fuzz.dict2
-rw-r--r--tests/ossfuzz/config/fuzz.options2
-rw-r--r--tests/ossfuzz/fuzz.c82
-rw-r--r--tests/test_bcj_exact_size.c124
-rw-r--r--tests/test_block_header.c520
-rw-r--r--tests/test_check.c390
-rwxr-xr-xtests/test_compress.sh150
-rwxr-xr-xtests/test_compress_generated_abc3
-rwxr-xr-xtests/test_compress_generated_random3
-rwxr-xr-xtests/test_compress_generated_text3
-rwxr-xr-xtests/test_compress_prepared_bcj_sparc3
-rwxr-xr-xtests/test_compress_prepared_bcj_x863
-rwxr-xr-xtests/test_files.sh197
-rw-r--r--tests/test_filter_flags.c527
-rw-r--r--tests/test_filter_str.c593
-rw-r--r--tests/test_hardware.c50
-rw-r--r--tests/test_index.c1715
-rw-r--r--tests/test_index_hash.c386
-rw-r--r--tests/test_lzip_decoder.c488
-rw-r--r--tests/test_memlimit.c173
-rwxr-xr-xtests/test_scripts.sh81
-rw-r--r--tests/test_stream_flags.c479
-rw-r--r--tests/test_vli.c324
-rw-r--r--tests/tests.h75
-rw-r--r--tests/tuktest.h1053
-rw-r--r--tests/xzgrep_expected_output39
-rw-r--r--windows/INSTALL-MSVC.txt56
-rw-r--r--windows/INSTALL-MinGW.txt138
-rw-r--r--windows/README-Windows.txt122
-rw-r--r--windows/build.bash204
-rw-r--r--windows/vs2013/config.h157
-rw-r--r--windows/vs2013/liblzma.vcxproj363
-rw-r--r--windows/vs2013/liblzma_dll.vcxproj398
-rw-r--r--windows/vs2013/xz_win.sln48
-rw-r--r--windows/vs2017/config.h157
-rw-r--r--windows/vs2017/liblzma.vcxproj363
-rw-r--r--windows/vs2017/liblzma_dll.vcxproj398
-rw-r--r--windows/vs2017/xz_win.sln48
-rw-r--r--windows/vs2019/config.h157
-rw-r--r--windows/vs2019/liblzma.vcxproj364
-rw-r--r--windows/vs2019/liblzma_dll.vcxproj399
-rw-r--r--windows/vs2019/xz_win.sln51
686 files changed, 258239 insertions, 0 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..0a9d56d
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1 @@
+<https://www.gnu.org/software/gettext/manual/html_node/Users.html>
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..69bbfc3
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,39 @@
+
+Authors of XZ Utils
+===================
+
+ XZ Utils is developed and maintained by Lasse Collin
+ <lasse.collin@tukaani.org> and Jia Tan <jiat0218@gmail.com>.
+
+ Major parts of liblzma are based on code written by Igor Pavlov,
+ specifically the LZMA SDK <https://7-zip.org/sdk.html>. Without
+ this code, XZ Utils wouldn't exist.
+
+ The SHA-256 implementation in liblzma is based on the code found from
+ 7-Zip <https://7-zip.org/>, which has a modified version of the SHA-256
+ code found from Crypto++ <https://www.cryptopp.com/>. The SHA-256 code
+ in Crypto++ was written by Kevin Springle and Wei Dai.
+
+ Some scripts have been adapted from gzip. The original versions
+ were written by Jean-loup Gailly, Charles Levert, and Paul Eggert.
+ Andrew Dudman helped adapting the scripts and their man pages for
+ XZ Utils.
+
+ The initial version of the threaded .xz decompressor was written
+ by Sebastian Andrzej Siewior.
+
+ The initial version of the .lz (lzip) decoder was written
+ by Michał Górny.
+
+ CLMUL-accelerated CRC code was contributed by Ilya Kurdyukov.
+
+ Other authors:
+ - Jonathan Nieder
+ - Joachim Henke
+
+ The GNU Autotools-based build system contains files from many authors,
+ which I'm not trying to list here.
+
+ Several people have contributed fixes or reported bugs. Most of them
+ are mentioned in the file THANKS.
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..b214d71
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,1383 @@
+#############################################################################
+#
+# Very limited CMake support for building some parts of XZ Utils
+#
+# For now, this is intended to be useful to build static or shared liblzma
+# on Windows with MSVC (to avoid the need to maintain Visual Studio project
+# files). Building liblzma on a few other platforms should work too but it
+# is somewhat experimental and not as portable as using ./configure.
+#
+# On some platforms this builds also xz and xzdec, but these are
+# highly experimental and meant for testing only:
+# - No replacement getopt_long(), libc must have it
+# - No sandboxing support
+# - No translations
+#
+# Other missing things:
+# - No xzgrep or other scripts or their symlinks
+# - No xz tests (liblzma tests only)
+#
+# NOTE: Even if the code compiles without warnings, the end result may be
+# different than via ./configure. Specifically, the list of #defines
+# may be different (if so, probably this CMakeLists.txt got them wrong).
+#
+# This file provides the following installation components (if you only
+# need liblzma, install only its components!):
+# - liblzma_Runtime
+# - liblzma_Development
+# - xz (on some platforms only)
+# - xzdec (on some platforms only)
+#
+# To find the target liblzma::liblzma from other packages, use the CONFIG
+# option with find_package() to avoid a conflict with the FindLibLZMA module
+# with case-insensitive file systems. For example, to require liblzma 5.2.5
+# or a newer compatible version:
+#
+# find_package(liblzma 5.2.5 REQUIRED CONFIG)
+# target_link_libraries(my_application liblzma::liblzma)
+#
+#############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+#############################################################################
+
+cmake_minimum_required(VERSION 3.13...3.27 FATAL_ERROR)
+
+include(CMakePushCheckState)
+include(CheckIncludeFile)
+include(CheckSymbolExists)
+include(CheckStructHasMember)
+include(CheckCSourceCompiles)
+include(cmake/tuklib_large_file_support.cmake)
+include(cmake/tuklib_integer.cmake)
+include(cmake/tuklib_cpucores.cmake)
+include(cmake/tuklib_physmem.cmake)
+include(cmake/tuklib_progname.cmake)
+include(cmake/tuklib_mbstr.cmake)
+
+set(PACKAGE_NAME "XZ Utils")
+set(PACKAGE_BUGREPORT "xz@tukaani.org")
+set(PACKAGE_URL "https://tukaani.org/xz/")
+
+# Get the package version from version.h into PACKAGE_VERSION variable.
+file(READ src/liblzma/api/lzma/version.h PACKAGE_VERSION)
+string(REGEX REPLACE
+"^.*\n\
+#define LZMA_VERSION_MAJOR ([0-9]+)\n\
+.*\
+#define LZMA_VERSION_MINOR ([0-9]+)\n\
+.*\
+#define LZMA_VERSION_PATCH ([0-9]+)\n\
+.*$"
+ "\\1.\\2.\\3" PACKAGE_VERSION "${PACKAGE_VERSION}")
+
+# Among other things, this gives us variables xz_VERSION and xz_VERSION_MAJOR.
+project(xz VERSION "${PACKAGE_VERSION}" LANGUAGES C)
+
+# We need a compiler that supports enough C99 or newer (variable-length arrays
+# aren't needed, those are optional in C17). Setting CMAKE_C_STANDARD here
+# makes it the default for all targets. It doesn't affect the INTERFACE so
+# liblzma::liblzma won't end up with INTERFACE_COMPILE_FEATURES "c_std_99"
+# (the API headers are C89 and C++ compatible).
+set(CMAKE_C_STANDARD 99)
+set(CMAKE_C_STANDARD_REQUIRED ON)
+
+# On Apple OSes, don't build executables as bundles:
+set(CMAKE_MACOSX_BUNDLE OFF)
+
+# windres from GNU binutils can be tricky with command line arguments
+# that contain spaces or other funny characters. Unfortunately we need
+# a space in PACKAGE_NAME. Using \x20 to encode the US-ASCII space seems
+# to work in both cmd.exe and /bin/sh.
+#
+# However, even \x20 isn't enough in all situations, resulting in
+# "syntax error" from windres. Using --use-temp-file prevents windres
+# from using popen() and this seems to fix the problem.
+#
+# llvm-windres from Clang/LLVM 16.0.6 and older: The \x20 results
+# in "XZx20Utils" in the compiled binary. The option --use-temp-file
+# makes no difference.
+#
+# llvm-windres 17.0.0 and later: It emulates GNU windres more accurately, so
+# the workarounds used with GNU windres must be used with llvm-windres too.
+#
+# CMake 3.27 doesn't have CMAKE_RC_COMPILER_ID so we rely on
+# CMAKE_C_COMPILER_ID.
+if((MINGW OR CYGWIN OR MSYS) AND (
+ NOT CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
+ CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "17"))
+ # Use workarounds with GNU windres and llvm-windres >= 17.0.0. The \x20
+ # in PACKAGE_NAME_DEFINITION works with gcc and clang too so we don't need
+ # to worry how to pass different flags to windres and the C compiler.
+ # Keep the original PACKAGE_NAME intact for generation of liblzma.pc.
+ string(APPEND CMAKE_RC_FLAGS " --use-temp-file")
+ string(REPLACE " " "\\x20" PACKAGE_NAME_DEFINITION "${PACKAGE_NAME}")
+else()
+ # Elsewhere a space is safe. This also keeps things compatible with
+ # EBCDIC in case CMake-based build is ever done on such a system.
+ set(PACKAGE_NAME_DEFINITION "${PACKAGE_NAME}")
+endif()
+
+# Definitions common to all targets:
+add_compile_definitions(
+ # Package info:
+ PACKAGE_NAME="${PACKAGE_NAME_DEFINITION}"
+ PACKAGE_BUGREPORT="${PACKAGE_BUGREPORT}"
+ PACKAGE_URL="${PACKAGE_URL}"
+
+ # Standard headers and types are available:
+ HAVE_STDBOOL_H
+ HAVE__BOOL
+ HAVE_STDINT_H
+ HAVE_INTTYPES_H
+
+ # Always enable CRC32 since liblzma should never build without it.
+ HAVE_CHECK_CRC32
+
+ # Disable assert() checks when no build type has been specified. Non-empty
+ # build types like "Release" and "Debug" handle this by default.
+ $<$<CONFIG:>:NDEBUG>
+)
+
+
+######################
+# System definitions #
+######################
+
+# _GNU_SOURCE and such definitions. This specific macro is special since
+# it also adds the definitions to CMAKE_REQUIRED_DEFINITIONS.
+tuklib_use_system_extensions(ALL)
+
+# Check for large file support. It's required on some 32-bit platforms and
+# even on 64-bit MinGW-w64 to get 64-bit off_t. This can be forced off on
+# the CMake command line if needed: -DLARGE_FILE_SUPPORT=OFF
+tuklib_large_file_support(ALL)
+
+# This is needed by liblzma and xz.
+tuklib_integer(ALL)
+
+# This is used for liblzma.pc generation to add -lrt if needed.
+set(LIBS)
+
+# Check for clock_gettime(). Do this before checking for threading so
+# that we know there if CLOCK_MONOTONIC is available.
+if(NOT WIN32)
+ check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME)
+
+ if(NOT HAVE_CLOCK_GETTIME)
+ # With glibc <= 2.17 or Solaris 10 this needs librt.
+ # Add librt for the next check for HAVE_CLOCK_GETTIME. If it is
+ # found after including the library, we know that librt is required.
+ list(INSERT CMAKE_REQUIRED_LIBRARIES 0 rt)
+ check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME_LIBRT)
+
+ # If it was found now, add librt to all targets and keep it in
+ # CMAKE_REQUIRED_LIBRARIES for further tests too.
+ if(HAVE_CLOCK_GETTIME_LIBRT)
+ link_libraries(rt)
+ set(LIBS "-lrt") # For liblzma.pc
+ else()
+ list(REMOVE_AT CMAKE_REQUIRED_LIBRARIES 0)
+ endif()
+ endif()
+
+ if(HAVE_CLOCK_GETTIME OR HAVE_CLOCK_GETTIME_LIBRT)
+ add_compile_definitions(HAVE_CLOCK_GETTIME)
+
+ # Check if CLOCK_MONOTONIC is available for clock_gettime().
+ check_symbol_exists(CLOCK_MONOTONIC time.h HAVE_CLOCK_MONOTONIC)
+ tuklib_add_definition_if(ALL HAVE_CLOCK_MONOTONIC)
+ endif()
+endif()
+
+# Options for new enough GCC or Clang on any arch or operating system:
+if(CMAKE_C_COMPILER_ID MATCHES GNU|Clang)
+ # configure.ac has a long list but it won't be copied here:
+ add_compile_options(-Wall -Wextra)
+endif()
+
+
+#############################################################################
+# liblzma
+#############################################################################
+
+option(BUILD_SHARED_LIBS "Build liblzma as a shared library instead of static")
+
+add_library(liblzma
+ src/common/mythread.h
+ src/common/sysdefs.h
+ src/common/tuklib_common.h
+ src/common/tuklib_config.h
+ src/common/tuklib_integer.h
+ src/common/tuklib_physmem.c
+ src/common/tuklib_physmem.h
+ src/liblzma/api/lzma.h
+ src/liblzma/api/lzma/base.h
+ src/liblzma/api/lzma/bcj.h
+ src/liblzma/api/lzma/block.h
+ src/liblzma/api/lzma/check.h
+ src/liblzma/api/lzma/container.h
+ src/liblzma/api/lzma/delta.h
+ src/liblzma/api/lzma/filter.h
+ src/liblzma/api/lzma/hardware.h
+ src/liblzma/api/lzma/index.h
+ src/liblzma/api/lzma/index_hash.h
+ src/liblzma/api/lzma/lzma12.h
+ src/liblzma/api/lzma/stream_flags.h
+ src/liblzma/api/lzma/version.h
+ src/liblzma/api/lzma/vli.h
+ src/liblzma/check/check.c
+ src/liblzma/check/check.h
+ src/liblzma/check/crc_macros.h
+ src/liblzma/common/block_util.c
+ src/liblzma/common/common.c
+ src/liblzma/common/common.h
+ src/liblzma/common/easy_preset.c
+ src/liblzma/common/easy_preset.h
+ src/liblzma/common/filter_common.c
+ src/liblzma/common/filter_common.h
+ src/liblzma/common/hardware_physmem.c
+ src/liblzma/common/index.c
+ src/liblzma/common/index.h
+ src/liblzma/common/memcmplen.h
+ src/liblzma/common/stream_flags_common.c
+ src/liblzma/common/stream_flags_common.h
+ src/liblzma/common/string_conversion.c
+ src/liblzma/common/vli_size.c
+)
+
+target_include_directories(liblzma PRIVATE
+ src/liblzma/api
+ src/liblzma/common
+ src/liblzma/check
+ src/liblzma/lz
+ src/liblzma/rangecoder
+ src/liblzma/lzma
+ src/liblzma/delta
+ src/liblzma/simple
+ src/common
+)
+
+
+######################
+# Size optimizations #
+######################
+
+option(ENABLE_SMALL "Reduce code size at expense of speed. \
+This may be useful together with CMAKE_BUILD_TYPE=MinSizeRel.")
+
+if(ENABLE_SMALL)
+ add_compile_definitions(HAVE_SMALL)
+endif()
+
+
+##########
+# Checks #
+##########
+
+set(ADDITIONAL_SUPPORTED_CHECKS crc64 sha256)
+
+set(ADDITIONAL_CHECK_TYPES "${ADDITIONAL_SUPPORTED_CHECKS}" CACHE STRING
+ "Additional check types to support (crc32 is always built)")
+
+foreach(CHECK IN LISTS ADDITIONAL_CHECK_TYPES)
+ if(NOT CHECK IN_LIST ADDITIONAL_SUPPORTED_CHECKS)
+ message(FATAL_ERROR "'${CHECK}' is not a supported check type")
+ endif()
+endforeach()
+
+if(ENABLE_SMALL)
+ target_sources(liblzma PRIVATE src/liblzma/check/crc32_small.c)
+else()
+ target_sources(liblzma PRIVATE
+ src/liblzma/check/crc32_fast.c
+ src/liblzma/check/crc32_table.c
+ src/liblzma/check/crc32_table_be.h
+ src/liblzma/check/crc32_table_le.h
+ )
+endif()
+
+if("crc64" IN_LIST ADDITIONAL_CHECK_TYPES)
+ add_compile_definitions("HAVE_CHECK_CRC64")
+
+ if(ENABLE_SMALL)
+ target_sources(liblzma PRIVATE src/liblzma/check/crc64_small.c)
+ else()
+ target_sources(liblzma PRIVATE
+ src/liblzma/check/crc64_fast.c
+ src/liblzma/check/crc64_table.c
+ src/liblzma/check/crc64_table_be.h
+ src/liblzma/check/crc64_table_le.h
+ )
+ endif()
+endif()
+
+if("sha256" IN_LIST ADDITIONAL_CHECK_TYPES)
+ add_compile_definitions("HAVE_CHECK_SHA256")
+ target_sources(liblzma PRIVATE src/liblzma/check/sha256.c)
+endif()
+
+
+#################
+# Match finders #
+#################
+
+set(SUPPORTED_MATCH_FINDERS hc3 hc4 bt2 bt3 bt4)
+
+set(MATCH_FINDERS "${SUPPORTED_MATCH_FINDERS}" CACHE STRING
+ "Match finders to support (at least one is required for LZMA1 or LZMA2)")
+
+foreach(MF IN LISTS MATCH_FINDERS)
+ if(MF IN_LIST SUPPORTED_MATCH_FINDERS)
+ string(TOUPPER "${MF}" MF_UPPER)
+ add_compile_definitions("HAVE_MF_${MF_UPPER}")
+ else()
+ message(FATAL_ERROR "'${MF}' is not a supported match finder")
+ endif()
+endforeach()
+
+
+#############
+# Threading #
+#############
+
+# Supported threading methods:
+# ON - autodetect the best threading method. The autodetection will
+# prefer Windows threading (win95 or vista) over posix if both are
+# available. vista threads will be used over win95 unless it is a
+# 32-bit build.
+# OFF - Disable threading.
+# posix - Use posix threading (pthreads), or throw an error if not available.
+# win95 - Use Windows win95 threading, or throw an error if not available.
+# vista - Use Windows vista threading, or throw an error if not available.
+set(SUPPORTED_THREADING_METHODS ON OFF posix win95 vista)
+
+set(ENABLE_THREADS ON CACHE STRING
+ "Threading method: Set to 'ON' to autodetect, 'OFF' to disable threading.")
+
+# Create dropdown in CMake GUI since only 1 threading method is possible
+# to select in a build.
+set_property(CACHE ENABLE_THREADS
+ PROPERTY STRINGS "${SUPPORTED_THREADING_METHODS}")
+
+# This is a flag variable set when win95 threads are used. We must ensure
+# the combination of enable_small and win95 threads is not used without a
+# compiler supporting attribute __constructor__.
+set(USE_WIN95_THREADS OFF)
+
+# This is a flag variable set when posix threads (pthreads) are used.
+# It's needed when creating liblzma-config.cmake where dependency on
+# Threads::Threads is only needed with pthreads.
+set(USE_POSIX_THREADS OFF)
+
+if(NOT ENABLE_THREADS IN_LIST SUPPORTED_THREADING_METHODS)
+ message(FATAL_ERROR "'${ENABLE_THREADS}' is not a supported "
+ "threading method")
+endif()
+
+if(ENABLE_THREADS)
+ # Also set THREADS_PREFER_PTHREAD_FLAG since the flag has no effect
+ # for Windows threading.
+ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+ find_package(Threads REQUIRED)
+
+ # If both Windows and posix threading are available, prefer Windows.
+ # Note that on Cygwin CMAKE_USE_WIN32_THREADS_INIT is false.
+ if(CMAKE_USE_WIN32_THREADS_INIT AND NOT ENABLE_THREADS STREQUAL "posix")
+ if(ENABLE_THREADS STREQUAL "win95"
+ OR (ENABLE_THREADS STREQUAL "ON"
+ AND CMAKE_SIZEOF_VOID_P EQUAL 4))
+ # Use Windows 95 (and thus XP) compatible threads.
+ # This avoids use of features that were added in
+ # Windows Vista. This is used for 32-bit x86 builds for
+ # compatibility reasons since it makes no measurable difference
+ # in performance compared to Vista threads.
+ set(USE_WIN95_THREADS ON)
+ add_compile_definitions(MYTHREAD_WIN95)
+ else()
+ add_compile_definitions(MYTHREAD_VISTA)
+ endif()
+ elseif(CMAKE_USE_PTHREADS_INIT)
+ if(ENABLE_THREADS STREQUAL "posix" OR ENABLE_THREADS STREQUAL "ON")
+ # The threading library only needs to be explicitly linked
+ # for posix threads, so this is needed for creating
+ # liblzma-config.cmake later.
+ set(USE_POSIX_THREADS ON)
+
+ target_link_libraries(liblzma Threads::Threads)
+ add_compile_definitions(MYTHREAD_POSIX)
+
+ # Check if pthread_condattr_setclock() exists to
+ # use CLOCK_MONOTONIC.
+ if(HAVE_CLOCK_MONOTONIC)
+ list(INSERT CMAKE_REQUIRED_LIBRARIES 0
+ "${CMAKE_THREAD_LIBS_INIT}")
+ check_symbol_exists(pthread_condattr_setclock pthread.h
+ HAVE_PTHREAD_CONDATTR_SETCLOCK)
+ tuklib_add_definition_if(ALL HAVE_PTHREAD_CONDATTR_SETCLOCK)
+ endif()
+ else()
+ message(SEND_ERROR
+ "Windows threading method was requested but a compatible "
+ "library could not be found")
+ endif()
+ else()
+ message(SEND_ERROR "No supported threading library found")
+ endif()
+
+ target_sources(liblzma PRIVATE
+ src/common/tuklib_cpucores.c
+ src/common/tuklib_cpucores.h
+ src/liblzma/common/hardware_cputhreads.c
+ src/liblzma/common/outqueue.c
+ src/liblzma/common/outqueue.h
+ )
+endif()
+
+
+############
+# Encoders #
+############
+
+set(SIMPLE_FILTERS
+ x86
+ arm
+ armthumb
+ arm64
+ powerpc
+ ia64
+ sparc
+)
+
+# The SUPPORTED_FILTERS are shared between Encoders and Decoders
+# since only lzip does not appear in both lists. lzip is a special
+# case anyway, so it is handled separately in the Decoders section.
+set(SUPPORTED_FILTERS
+ lzma1
+ lzma2
+ delta
+ "${SIMPLE_FILTERS}"
+)
+
+set(ENCODERS "${SUPPORTED_FILTERS}" CACHE STRING "Encoders to support")
+
+# If LZMA2 is enabled, then LZMA1 must also be enabled.
+if(NOT "lzma1" IN_LIST ENCODERS AND "lzma2" IN_LIST ENCODERS)
+ message(FATAL_ERROR "LZMA2 encoder requires that LZMA1 is also enabled")
+endif()
+
+# If LZMA1 is enabled, then at least one match finder must be enabled.
+if(MATCH_FINDERS STREQUAL "" AND "lzma1" IN_LIST ENCODERS)
+ message(FATAL_ERROR "At least 1 match finder is required for an "
+ "LZ-based encoder")
+endif()
+
+set(HAVE_DELTA_CODER OFF)
+set(SIMPLE_ENCODERS OFF)
+set(HAVE_ENCODERS OFF)
+
+foreach(ENCODER IN LISTS ENCODERS)
+ if(ENCODER IN_LIST SUPPORTED_FILTERS)
+ set(HAVE_ENCODERS ON)
+
+ if(NOT SIMPLE_ENCODERS AND ENCODER IN_LIST SIMPLE_FILTERS)
+ set(SIMPLE_ENCODERS ON)
+ endif()
+
+ string(TOUPPER "${ENCODER}" ENCODER_UPPER)
+ add_compile_definitions("HAVE_ENCODER_${ENCODER_UPPER}")
+ else()
+ message(FATAL_ERROR "'${ENCODER}' is not a supported encoder")
+ endif()
+endforeach()
+
+if(HAVE_ENCODERS)
+ add_compile_definitions(HAVE_ENCODERS)
+
+ target_sources(liblzma PRIVATE
+ src/liblzma/common/alone_encoder.c
+ src/liblzma/common/block_buffer_encoder.c
+ src/liblzma/common/block_buffer_encoder.h
+ src/liblzma/common/block_encoder.c
+ src/liblzma/common/block_encoder.h
+ src/liblzma/common/block_header_encoder.c
+ src/liblzma/common/easy_buffer_encoder.c
+ src/liblzma/common/easy_encoder.c
+ src/liblzma/common/easy_encoder_memusage.c
+ src/liblzma/common/filter_buffer_encoder.c
+ src/liblzma/common/filter_encoder.c
+ src/liblzma/common/filter_encoder.h
+ src/liblzma/common/filter_flags_encoder.c
+ src/liblzma/common/index_encoder.c
+ src/liblzma/common/index_encoder.h
+ src/liblzma/common/stream_buffer_encoder.c
+ src/liblzma/common/stream_encoder.c
+ src/liblzma/common/stream_flags_encoder.c
+ src/liblzma/common/vli_encoder.c
+ )
+
+ if(ENABLE_THREADS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/common/stream_encoder_mt.c
+ )
+ endif()
+
+ if(SIMPLE_ENCODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/simple/simple_encoder.c
+ src/liblzma/simple/simple_encoder.h
+ )
+ endif()
+
+ if("lzma1" IN_LIST ENCODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/lzma/lzma_encoder.c
+ src/liblzma/lzma/lzma_encoder.h
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c
+ src/liblzma/lzma/lzma_encoder_private.h
+ src/liblzma/lzma/fastpos.h
+ src/liblzma/lz/lz_encoder.c
+ src/liblzma/lz/lz_encoder.h
+ src/liblzma/lz/lz_encoder_hash.h
+ src/liblzma/lz/lz_encoder_hash_table.h
+ src/liblzma/lz/lz_encoder_mf.c
+ src/liblzma/rangecoder/price.h
+ src/liblzma/rangecoder/price_table.c
+ src/liblzma/rangecoder/range_encoder.h
+ )
+
+ if(NOT ENABLE_SMALL)
+ target_sources(liblzma PRIVATE src/liblzma/lzma/fastpos_table.c)
+ endif()
+ endif()
+
+ if("lzma2" IN_LIST ENCODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/lzma/lzma2_encoder.c
+ src/liblzma/lzma/lzma2_encoder.h
+ )
+ endif()
+
+ if("delta" IN_LIST ENCODERS)
+ set(HAVE_DELTA_CODER ON)
+ target_sources(liblzma PRIVATE
+ src/liblzma/delta/delta_encoder.c
+ src/liblzma/delta/delta_encoder.h
+ )
+ endif()
+endif()
+
+
+############
+# Decoders #
+############
+
+set(DECODERS "${SUPPORTED_FILTERS}" CACHE STRING "Decoders to support")
+
+set(SIMPLE_DECODERS OFF)
+set(HAVE_DECODERS OFF)
+
+foreach(DECODER IN LISTS DECODERS)
+ if(DECODER IN_LIST SUPPORTED_FILTERS)
+ set(HAVE_DECODERS ON)
+
+ if(NOT SIMPLE_DECODERS AND DECODER IN_LIST SIMPLE_FILTERS)
+ set(SIMPLE_DECODERS ON)
+ endif()
+
+ string(TOUPPER "${DECODER}" DECODER_UPPER)
+ add_compile_definitions("HAVE_DECODER_${DECODER_UPPER}")
+ else()
+ message(FATAL_ERROR "'${DECODER}' is not a supported decoder")
+ endif()
+endforeach()
+
+if(HAVE_DECODERS)
+ add_compile_definitions(HAVE_DECODERS)
+
+ target_sources(liblzma PRIVATE
+ src/liblzma/common/alone_decoder.c
+ src/liblzma/common/alone_decoder.h
+ src/liblzma/common/auto_decoder.c
+ src/liblzma/common/block_buffer_decoder.c
+ src/liblzma/common/block_decoder.c
+ src/liblzma/common/block_decoder.h
+ src/liblzma/common/block_header_decoder.c
+ src/liblzma/common/easy_decoder_memusage.c
+ src/liblzma/common/file_info.c
+ src/liblzma/common/filter_buffer_decoder.c
+ src/liblzma/common/filter_decoder.c
+ src/liblzma/common/filter_decoder.h
+ src/liblzma/common/filter_flags_decoder.c
+ src/liblzma/common/index_decoder.c
+ src/liblzma/common/index_decoder.h
+ src/liblzma/common/index_hash.c
+ src/liblzma/common/stream_buffer_decoder.c
+ src/liblzma/common/stream_decoder.c
+ src/liblzma/common/stream_flags_decoder.c
+ src/liblzma/common/stream_decoder.h
+ src/liblzma/common/vli_decoder.c
+ )
+
+ if(ENABLE_THREADS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/common/stream_decoder_mt.c
+ )
+ endif()
+
+ if(SIMPLE_DECODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/simple/simple_decoder.c
+ src/liblzma/simple/simple_decoder.h
+ )
+ endif()
+
+ if("lzma1" IN_LIST DECODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/lzma/lzma_decoder.c
+ src/liblzma/lzma/lzma_decoder.h
+ src/liblzma/rangecoder/range_decoder.h
+ src/liblzma/lz/lz_decoder.c
+ src/liblzma/lz/lz_decoder.h
+ )
+ endif()
+
+ if("lzma2" IN_LIST DECODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/lzma/lzma2_decoder.c
+ src/liblzma/lzma/lzma2_decoder.h
+ )
+ endif()
+
+ if("delta" IN_LIST DECODERS)
+ set(HAVE_DELTA_CODER ON)
+ target_sources(liblzma PRIVATE
+ src/liblzma/delta/delta_decoder.c
+ src/liblzma/delta/delta_decoder.h
+ )
+ endif()
+endif()
+
+# Some sources must appear if the filter is configured as either
+# an encoder or decoder.
+if("lzma1" IN_LIST ENCODERS OR "lzma1" IN_LIST DECODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/rangecoder/range_common.h
+ src/liblzma/lzma/lzma_encoder_presets.c
+ src/liblzma/lzma/lzma_common.h
+ )
+endif()
+
+if(HAVE_DELTA_CODER)
+ target_sources(liblzma PRIVATE
+ src/liblzma/delta/delta_common.c
+ src/liblzma/delta/delta_common.h
+ src/liblzma/delta/delta_private.h
+ )
+endif()
+
+if(SIMPLE_ENCODERS OR SIMPLE_DECODERS)
+ target_sources(liblzma PRIVATE
+ src/liblzma/simple/simple_coder.c
+ src/liblzma/simple/simple_coder.h
+ src/liblzma/simple/simple_private.h
+ )
+endif()
+
+foreach(SIMPLE_CODER IN LISTS SIMPLE_FILTERS)
+ if(SIMPLE_CODER IN_LIST ENCODERS OR SIMPLE_CODER IN_LIST DECODERS)
+ target_sources(liblzma PRIVATE "src/liblzma/simple/${SIMPLE_CODER}.c")
+ endif()
+endforeach()
+
+
+#############
+# MicroLZMA #
+#############
+
+option(MICROLZMA_ENCODER
+ "MicroLZMA encoder (needed by specific applications only)" ON)
+
+option(MICROLZMA_DECODER
+ "MicroLZMA decoder (needed by specific applications only)" ON)
+
+if(MICROLZMA_ENCODER)
+ if(NOT "lzma1" IN_LIST ENCODERS)
+ message(FATAL_ERROR "The LZMA1 encoder is required to support the "
+ "MicroLZMA encoder")
+ endif()
+
+ target_sources(liblzma PRIVATE src/liblzma/common/microlzma_encoder.c)
+endif()
+
+if(MICROLZMA_DECODER)
+ if(NOT "lzma1" IN_LIST DECODERS)
+ message(FATAL_ERROR "The LZMA1 decoder is required to support the "
+ "MicroLZMA decoder")
+ endif()
+
+ target_sources(liblzma PRIVATE src/liblzma/common/microlzma_decoder.c)
+endif()
+
+
+#############################
+# lzip (.lz) format support #
+#############################
+
+option(LZIP_DECODER "Support lzip decoder" ON)
+
+if(LZIP_DECODER)
+ # If lzip decoder support is requested, make sure LZMA1 decoder is enabled.
+ if(NOT "lzma1" IN_LIST DECODERS)
+ message(FATAL_ERROR "The LZMA1 decoder is required to support the "
+ "lzip decoder")
+ endif()
+
+ add_compile_definitions(HAVE_LZIP_DECODER)
+
+ target_sources(liblzma PRIVATE
+ src/liblzma/common/lzip_decoder.c
+ src/liblzma/common/lzip_decoder.h
+ )
+endif()
+
+###
+
+# Put the tuklib functions under the lzma_ namespace.
+target_compile_definitions(liblzma PRIVATE TUKLIB_SYMBOL_PREFIX=lzma_)
+tuklib_cpucores(liblzma)
+tuklib_physmem(liblzma)
+
+# While liblzma can be built without tuklib_cpucores or tuklib_physmem
+# modules, the liblzma API functions lzma_cputhreads() and lzma_physmem()
+# will then be useless (which isn't too bad but still unfortunate). Since
+# I expect the CMake-based builds to be only used on systems that are
+# supported by these tuklib modules, problems with these tuklib modules
+# are considered a hard error for now. This hopefully helps to catch bugs
+# in the CMake versions of the tuklib checks.
+if(NOT TUKLIB_CPUCORES_FOUND OR NOT TUKLIB_PHYSMEM_FOUND)
+ # Use SEND_ERROR instead of FATAL_ERROR. If someone reports a bug,
+ # seeing the results of the remaining checks can be useful too.
+ message(SEND_ERROR
+ "tuklib_cpucores() or tuklib_physmem() failed. "
+ "Unless you really are building for a system where these "
+ "modules are not supported (unlikely), this is a bug in the "
+ "included cmake/tuklib_*.cmake files that should be fixed. "
+ "To build anyway, edit this CMakeLists.txt to ignore this error.")
+endif()
+
+# Check for __attribute__((__constructor__)) support.
+# This needs -Werror because some compilers just warn
+# about this being unsupported.
+cmake_push_check_state()
+set(CMAKE_REQUIRED_FLAGS "-Werror")
+check_c_source_compiles("
+ __attribute__((__constructor__))
+ static void my_constructor_func(void) { return; }
+ int main(void) { return 0; }
+ "
+ HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR)
+cmake_pop_check_state()
+tuklib_add_definition_if(liblzma HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR)
+
+# The Win95 threading lacks a thread-safe one-time initialization function.
+# The one-time initialization is needed for crc32_small.c and crc64_small.c
+# create the CRC tables. So if small mode is enabled, the threading mode is
+# win95, and the compiler does not support attribute constructor, then we
+# would end up with a multithreaded build that is thread-unsafe. As a
+# result this configuration is not allowed.
+if(USE_WIN95_THREADS AND ENABLE_SMALL AND NOT HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR)
+ message(SEND_ERROR "Threading method win95 and ENABLE_SMALL "
+ "cannot be used at the same time with a compiler "
+ "that doesn't support "
+ "__attribute__((__constructor__))")
+endif()
+
+# cpuid.h
+check_include_file(cpuid.h HAVE_CPUID_H)
+tuklib_add_definition_if(liblzma HAVE_CPUID_H)
+
+# immintrin.h:
+check_include_file(immintrin.h HAVE_IMMINTRIN_H)
+if(HAVE_IMMINTRIN_H)
+ target_compile_definitions(liblzma PRIVATE HAVE_IMMINTRIN_H)
+
+ # SSE2 intrinsics:
+ check_c_source_compiles("
+ #include <immintrin.h>
+ int main(void)
+ {
+ __m128i x = { 0 };
+ _mm_movemask_epi8(x);
+ return 0;
+ }
+ "
+ HAVE__MM_MOVEMASK_EPI8)
+ tuklib_add_definition_if(liblzma HAVE__MM_MOVEMASK_EPI8)
+
+ # CLMUL intrinsic:
+ option(ALLOW_CLMUL_CRC "Allow carryless multiplication for CRC \
+calculation if supported by the system" ON)
+
+ if(ALLOW_CLMUL_CRC)
+ check_c_source_compiles("
+ #include <immintrin.h>
+ #if defined(__e2k__) && __iset__ < 6
+ # error
+ #endif
+ #if (defined(__GNUC__) || defined(__clang__)) \
+ && !defined(__EDG__)
+ __attribute__((__target__(\"ssse3,sse4.1,pclmul\")))
+ #endif
+ __m128i my_clmul(__m128i a)
+ {
+ const __m128i b = _mm_set_epi64x(1, 2);
+ return _mm_clmulepi64_si128(a, b, 0);
+ }
+ int main(void) { return 0; }
+ "
+ HAVE_USABLE_CLMUL)
+ tuklib_add_definition_if(liblzma HAVE_USABLE_CLMUL)
+ endif()
+endif()
+
+# Support -fvisiblity=hidden when building shared liblzma.
+# These lines do nothing on Windows (even under Cygwin).
+# HAVE_VISIBILITY should always be defined to 0 or 1.
+if(BUILD_SHARED_LIBS)
+ set_target_properties(liblzma PROPERTIES C_VISIBILITY_PRESET hidden)
+ target_compile_definitions(liblzma PRIVATE HAVE_VISIBILITY=1)
+else()
+ target_compile_definitions(liblzma PRIVATE HAVE_VISIBILITY=0)
+endif()
+
+if(WIN32)
+ if(BUILD_SHARED_LIBS)
+ # Add the Windows resource file for liblzma.dll.
+ target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc)
+
+ set_target_properties(liblzma PROPERTIES
+ LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
+ )
+
+ # Export the public API symbols with __declspec(dllexport).
+ target_compile_definitions(liblzma PRIVATE DLL_EXPORT)
+
+ if(NOT MSVC)
+ # Create a DEF file. The linker puts the ordinal numbers there
+ # too so the output from the linker isn't our final file.
+ target_link_options(liblzma PRIVATE
+ "-Wl,--output-def,liblzma.def.in")
+
+ # Remove the ordinal numbers from the DEF file so that
+ # no one will create an import library that links by ordinal
+ # instead of by name. We don't maintain a DEF file so the
+ # ordinal numbers aren't stable.
+ add_custom_command(TARGET liblzma POST_BUILD
+ COMMAND "${CMAKE_COMMAND}"
+ -DINPUT_FILE=liblzma.def.in
+ -DOUTPUT_FILE=liblzma.def
+ -P
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/remove-ordinals.cmake"
+ BYPRODUCTS "liblzma.def"
+ VERBATIM)
+ endif()
+ else()
+ # Disable __declspec(dllimport) when linking against static liblzma.
+ target_compile_definitions(liblzma INTERFACE LZMA_API_STATIC)
+ endif()
+elseif(BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ # GNU/Linux-specific symbol versioning for shared liblzma.
+ # Note that adding link options doesn't affect static builds
+ # but HAVE_SYMBOL_VERSIONS_LINUX must not be used with static builds
+ # because it would put symbol versions into the static library which
+ # can cause problems. It's clearer if all symver related things are
+ # omitted when not building a shared library.
+ #
+ # NOTE: Set it explicitly to 1 to make it clear that versioning is
+ # done unconditionally in the C files.
+ target_compile_definitions(liblzma PRIVATE HAVE_SYMBOL_VERSIONS_LINUX=1)
+ target_link_options(liblzma PRIVATE
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_linux.map"
+ )
+ set_target_properties(liblzma PROPERTIES
+ LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_linux.map"
+ )
+elseif(BUILD_SHARED_LIBS AND CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ # Symbol versioning for shared liblzma for non-GNU/Linux.
+ # FIXME? What about Solaris?
+ target_link_options(liblzma PRIVATE
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_generic.map"
+ )
+ set_target_properties(liblzma PROPERTIES
+ LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/liblzma/liblzma_generic.map"
+ )
+endif()
+
+set_target_properties(liblzma PROPERTIES
+ # At least for now the package versioning matches the rules used for
+ # shared library versioning (excluding development releases) so it is
+ # fine to use the package version here.
+ SOVERSION "${xz_VERSION_MAJOR}"
+ VERSION "${xz_VERSION}"
+
+ # It's liblzma.so or liblzma.dll, not libliblzma.so or lzma.dll.
+ # Avoid the name lzma.dll because it would conflict with LZMA SDK.
+ PREFIX ""
+ IMPORT_PREFIX ""
+)
+
+# Create liblzma-config-version.cmake.
+#
+# FIXME: SameMajorVersion is correct for stable releases but it is wrong
+# for development releases where each release may have incompatible changes.
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config-version.cmake"
+ VERSION "${liblzma_VERSION}"
+ COMPATIBILITY SameMajorVersion)
+
+# Create liblzma-config.cmake. We use this spelling instead of
+# liblzmaConfig.cmake to make find_package work in case insensitive
+# manner even with case sensitive file systems. This gives more consistent
+# behavior between operating systems. This optionally includes a dependency
+# on a threading library, so the contents are created in two separate parts.
+# The "second half" is always needed, so create it first.
+set(LZMA_CONFIG_CONTENTS
+"include(\"\${CMAKE_CURRENT_LIST_DIR}/liblzma-targets.cmake\")
+
+if(NOT TARGET LibLZMA::LibLZMA)
+ # Be compatible with the spelling used by the FindLibLZMA module. This
+ # doesn't use ALIAS because it would make CMake resolve LibLZMA::LibLZMA
+ # to liblzma::liblzma instead of keeping the original spelling. Keeping
+ # the original spelling is important for good FindLibLZMA compatibility.
+ add_library(LibLZMA::LibLZMA INTERFACE IMPORTED)
+ set_target_properties(LibLZMA::LibLZMA PROPERTIES
+ INTERFACE_LINK_LIBRARIES liblzma::liblzma)
+endif()
+")
+
+if(USE_POSIX_THREADS)
+ set(LZMA_CONFIG_CONTENTS
+"include(CMakeFindDependencyMacro)
+set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+find_dependency(Threads)
+
+${LZMA_CONFIG_CONTENTS}
+")
+endif()
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake"
+ "${LZMA_CONFIG_CONTENTS}")
+
+# Set CMAKE_INSTALL_LIBDIR and friends.
+include(GNUInstallDirs)
+
+# Create liblzma.pc.
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
+set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
+set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+set(PTHREAD_CFLAGS "${CMAKE_THREAD_LIBS_INIT}")
+configure_file(src/liblzma/liblzma.pc.in liblzma.pc
+ @ONLY
+ NEWLINE_STYLE LF)
+
+# Install the library binary. The INCLUDES specifies the include path that
+# is exported for other projects to use but it doesn't install any files.
+install(TARGETS liblzma EXPORT liblzmaTargets
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ COMPONENT liblzma_Runtime
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ COMPONENT liblzma_Runtime
+ NAMELINK_COMPONENT liblzma_Development
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ COMPONENT liblzma_Development
+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+
+# Install the liblzma API headers. These use a subdirectory so
+# this has to be done as a separate step.
+install(DIRECTORY src/liblzma/api/
+ COMPONENT liblzma_Development
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+ FILES_MATCHING PATTERN "*.h")
+
+# Install the CMake files that other packages can use to find liblzma.
+set(liblzma_INSTALL_CMAKEDIR
+ "${CMAKE_INSTALL_LIBDIR}/cmake/liblzma"
+ CACHE STRING "Path to liblzma's .cmake files")
+
+install(EXPORT liblzmaTargets
+ NAMESPACE liblzma::
+ FILE liblzma-targets.cmake
+ DESTINATION "${liblzma_INSTALL_CMAKEDIR}"
+ COMPONENT liblzma_Development)
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/liblzma-config-version.cmake"
+ DESTINATION "${liblzma_INSTALL_CMAKEDIR}"
+ COMPONENT liblzma_Development)
+
+if(NOT MSVC)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblzma.pc"
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+ COMPONENT liblzma_Development)
+endif()
+
+
+#############################################################################
+# getopt_long
+#############################################################################
+
+# The command line tools needs this.
+check_symbol_exists(getopt_long getopt.h HAVE_GETOPT_LONG)
+
+
+#############################################################################
+# xzdec
+#############################################################################
+
+if(HAVE_GETOPT_LONG AND HAVE_DECODERS)
+ add_executable(xzdec
+ src/common/sysdefs.h
+ src/common/tuklib_common.h
+ src/common/tuklib_config.h
+ src/common/tuklib_exit.c
+ src/common/tuklib_exit.h
+ src/common/tuklib_gettext.h
+ src/common/tuklib_progname.c
+ src/common/tuklib_progname.h
+ src/xzdec/xzdec.c
+ )
+
+ target_include_directories(xzdec PRIVATE
+ src/common
+ src/liblzma/api
+ )
+
+ target_link_libraries(xzdec PRIVATE liblzma)
+
+ if(WIN32)
+ # Add the Windows resource file for xzdec.exe.
+ target_sources(xzdec PRIVATE src/xzdec/xzdec_w32res.rc)
+ set_target_properties(xzdec PROPERTIES
+ LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
+ )
+ endif()
+
+ tuklib_progname(xzdec)
+
+ install(TARGETS xzdec
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ COMPONENT xzdec)
+
+ if(UNIX)
+ install(FILES src/xzdec/xzdec.1
+ DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
+ COMPONENT xzdec)
+ endif()
+endif()
+
+
+#############################################################################
+# xz
+#############################################################################
+
+if(NOT MSVC AND HAVE_GETOPT_LONG)
+ add_executable(xz
+ src/common/mythread.h
+ src/common/sysdefs.h
+ src/common/tuklib_common.h
+ src/common/tuklib_config.h
+ src/common/tuklib_exit.c
+ src/common/tuklib_exit.h
+ src/common/tuklib_gettext.h
+ src/common/tuklib_integer.h
+ src/common/tuklib_mbstr.h
+ src/common/tuklib_mbstr_fw.c
+ src/common/tuklib_mbstr_width.c
+ src/common/tuklib_open_stdxxx.c
+ src/common/tuklib_open_stdxxx.h
+ src/common/tuklib_progname.c
+ src/common/tuklib_progname.h
+ src/xz/args.c
+ src/xz/args.h
+ src/xz/coder.c
+ src/xz/coder.h
+ src/xz/file_io.c
+ src/xz/file_io.h
+ src/xz/hardware.c
+ src/xz/hardware.h
+ src/xz/main.c
+ src/xz/main.h
+ src/xz/message.c
+ src/xz/message.h
+ src/xz/mytime.c
+ src/xz/mytime.h
+ src/xz/options.c
+ src/xz/options.h
+ src/xz/private.h
+ src/xz/signals.c
+ src/xz/signals.h
+ src/xz/suffix.c
+ src/xz/suffix.h
+ src/xz/util.c
+ src/xz/util.h
+ )
+
+ target_include_directories(xz PRIVATE
+ src/common
+ src/liblzma/api
+ )
+
+ if(HAVE_DECODERS)
+ target_sources(xz PRIVATE
+ src/xz/list.c
+ src/xz/list.h
+ )
+ endif()
+
+ target_link_libraries(xz PRIVATE liblzma)
+
+ target_compile_definitions(xz PRIVATE ASSUME_RAM=128)
+
+ if(WIN32)
+ # Add the Windows resource file for xz.exe.
+ target_sources(xz PRIVATE src/xz/xz_w32res.rc)
+ set_target_properties(xz PROPERTIES
+ LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
+ )
+ endif()
+
+ tuklib_progname(xz)
+ tuklib_mbstr(xz)
+
+ check_symbol_exists(optreset getopt.h HAVE_OPTRESET)
+ tuklib_add_definition_if(xz HAVE_OPTRESET)
+
+ check_symbol_exists(posix_fadvise fcntl.h HAVE_POSIX_FADVISE)
+ tuklib_add_definition_if(xz HAVE_POSIX_FADVISE)
+
+ # How to get file time:
+ check_struct_has_member("struct stat" st_atim.tv_nsec
+ "sys/types.h;sys/stat.h"
+ HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
+ if(HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
+ tuklib_add_definitions(xz HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
+ else()
+ check_struct_has_member("struct stat" st_atimespec.tv_nsec
+ "sys/types.h;sys/stat.h"
+ HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
+ if(HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
+ tuklib_add_definitions(xz HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
+ else()
+ check_struct_has_member("struct stat" st_atimensec
+ "sys/types.h;sys/stat.h"
+ HAVE_STRUCT_STAT_ST_ATIMENSEC)
+ tuklib_add_definition_if(xz HAVE_STRUCT_STAT_ST_ATIMENSEC)
+ endif()
+ endif()
+
+ # How to set file time:
+ check_symbol_exists(futimens "sys/types.h;sys/stat.h" HAVE_FUTIMENS)
+ if(HAVE_FUTIMENS)
+ tuklib_add_definitions(xz HAVE_FUTIMENS)
+ else()
+ check_symbol_exists(futimes "sys/time.h" HAVE_FUTIMES)
+ if(HAVE_FUTIMES)
+ tuklib_add_definitions(xz HAVE_FUTIMES)
+ else()
+ check_symbol_exists(futimesat "sys/time.h" HAVE_FUTIMESAT)
+ if(HAVE_FUTIMESAT)
+ tuklib_add_definitions(xz HAVE_FUTIMESAT)
+ else()
+ check_symbol_exists(utimes "sys/time.h" HAVE_UTIMES)
+ if(HAVE_UTIMES)
+ tuklib_add_definitions(xz HAVE_UTIMES)
+ else()
+ check_symbol_exists(_futime "sys/utime.h" HAVE__FUTIME)
+ if(HAVE__FUTIME)
+ tuklib_add_definitions(xz HAVE__FUTIME)
+ else()
+ check_symbol_exists(utime "utime.h" HAVE_UTIME)
+ tuklib_add_definition_if(xz HAVE_UTIME)
+ endif()
+ endif()
+ endif()
+ endif()
+ endif()
+
+ install(TARGETS xz
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ COMPONENT xz)
+
+ if(UNIX)
+ install(FILES src/xz/xz.1
+ DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
+ COMPONENT xz)
+
+ option(CREATE_XZ_SYMLINKS "Create unxz and xzcat symlinks" ON)
+ option(CREATE_LZMA_SYMLINKS "Create lzma, unlzma, and lzcat symlinks"
+ ON)
+ set(XZ_LINKS)
+
+ if(CREATE_XZ_SYMLINKS)
+ list(APPEND XZ_LINKS "unxz" "xzcat")
+ endif()
+
+ if(CREATE_LZMA_SYMLINKS)
+ list(APPEND XZ_LINKS "lzma" "unlzma" "lzcat")
+ endif()
+
+ # With Windows Cygwin and MSYS2 the symlinking is complicated. Both
+ # of these environments set the UNIX variable so they will try to
+ # make the symlinks. The ability for Cygwin and MSYS2 to make
+ # broken symlinks is determined by the CYGWIN and MSYS2 environment
+ # variables, respectively. Broken symlinks are needed for the man
+ # page symlinks and for determining if the xz and lzma symlinks need
+ # to depend on the xz target or not. If broken symlinks cannot be
+ # made then the xz binary must be created before the symlinks.
+ set(ALLOW_BROKEN_SYMLINKS ON)
+
+ if(CMAKE_SYSTEM_NAME STREQUAL "CYGWIN")
+ # The Cygwin env variable can be set to four possible values:
+ #
+ # 1. "lnk". Create symlinks as Windows shortcuts.
+ #
+ # 2. "native". Create symlinks as native Windows symlinks
+ # if supported by the system. Fallback to "lnk" if native
+ # symlinks are not supported.
+ #
+ # 3. "nativestrict". Create symlinks as native Windows symlinks
+ # if supported by the system. If the target of the symlink
+ # does not exist or the creation of the symlink fails for any
+ # reason, do not create the symlink.
+ #
+ # 4. "sys". Create symlinks as plain files with a special
+ # system attribute containing the path to the symlink target.
+ #
+ # So, the only case we care about for broken symlinks is
+ # "nativestrict" since all other values mean that broken
+ # symlinks are allowed. If the env variable is not set the
+ # default is "native". If the env variable is set but not
+ # assigned one of the four values, then the default is the same
+ # as option 1 "lnk".
+ string(FIND "$ENV{CYGWIN}" "winsymlinks:nativestrict" SYMLINK_POS)
+ if(SYMLINK_POS GREATER -1)
+ set(ALLOW_BROKEN_SYMLINKS OFF)
+ endif()
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "MSYS")
+ # The MSYS env variable behaves similar to the CYGWIN but has a
+ # different default behavior. If winsymlinks is set but not
+ # assigned one of the four supported values, the default is to
+ # *copy* the target to the symlink destination. This will fail
+ # if the target does not exist so broken symlinks cannot be
+ # allowed.
+ string(FIND "$ENV{MSYS}" "winsymlinks" SYMLINK_POS)
+ if(SYMLINK_POS GREATER -1)
+ string(FIND "$ENV{MSYS}" "winsymlinks:nativestrict"
+ SYMLINK_POS)
+ if(SYMLINK_POS GREATER -1)
+ set(ALLOW_BROKEN_SYMLINKS OFF)
+ endif()
+ else()
+ set(ALLOW_BROKEN_SYMLINKS OFF)
+ endif()
+ endif()
+
+ # Create symlinks in the build directory and then install them.
+ #
+ # The symlinks do not likely need any special extension since
+ # even on Windows the symlink can still be executed without
+ # the .exe extension.
+ foreach(LINK IN LISTS XZ_LINKS)
+ add_custom_target("create_${LINK}" ALL
+ "${CMAKE_COMMAND}" -E create_symlink
+ "$<TARGET_FILE_NAME:xz>" "${LINK}"
+ BYPRODUCTS "${LINK}"
+ VERBATIM)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LINK}"
+ DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ COMPONENT xz)
+
+ # Only create the man page symlinks if the symlinks can be
+ # created broken. The symlinks will not be valid until install
+ # so they cannot be created on these system environments.
+ if(ALLOW_BROKEN_SYMLINKS)
+ add_custom_target("create_${LINK}.1" ALL
+ "${CMAKE_COMMAND}" -E create_symlink "xz.1" "${LINK}.1"
+ BYPRODUCTS "${LINK}.1"
+ VERBATIM)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LINK}.1"
+ DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
+ COMPONENT xz)
+ else()
+ # Add the xz target as dependency when broken symlinks
+ # cannot be made. This ensures parallel builds do not fail
+ # since it will enforce the order of creating xz first, then
+ # the symlinks.
+ add_dependencies("create_${LINK}" xz)
+ endif()
+ endforeach()
+ endif()
+endif()
+
+
+#############################################################################
+# Tests
+#############################################################################
+
+include(CTest)
+
+if(BUILD_TESTING)
+ 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
+ )
+
+ 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)
+
+ # 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()
+endif()
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..e54eeac
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,76 @@
+
+XZ Utils Licensing
+==================
+
+ Different licenses apply to different files in this package. Here
+ is a rough summary of which licenses apply to which parts of this
+ package (but check the individual files to be sure!):
+
+ - liblzma is in the public domain.
+
+ - xz, xzdec, and lzmadec command line tools are in the public
+ domain unless GNU getopt_long had to be compiled and linked
+ in from the lib directory. The getopt_long code is under
+ GNU LGPLv2.1+.
+
+ - The scripts to grep, diff, and view compressed files have been
+ adapted from gzip. These scripts and their documentation are
+ under GNU GPLv2+.
+
+ - All the documentation in the doc directory and most of the
+ XZ Utils specific documentation files in other directories
+ are in the public domain.
+
+ Note: The JavaScript files (under the MIT license) have
+ been removed from the Doxygen-generated HTML version of the
+ liblzma API documentation. Doxygen itself is under the GNU GPL
+ but the remaining files generated by Doxygen are not affected
+ by the licenses used in Doxygen because Doxygen licensing has
+ the following exception:
+
+ "Documents produced by doxygen are derivative works
+ derived from the input used in their production;
+ they are not affected by this license."
+
+ - Translated messages are in the public domain.
+
+ - The build system contains public domain files, and files that
+ are under GNU GPLv2+ or GNU GPLv3+. None of these files end up
+ in the binaries being built.
+
+ - Test files and test code in the tests directory, and debugging
+ utilities in the debug directory are in the public domain.
+
+ - The extra directory may contain public domain files, and files
+ that are under various free software licenses.
+
+ You can do whatever you want with the files that have been put into
+ the public domain. If you find public domain legally problematic,
+ take the previous sentence as a license grant. If you still find
+ the lack of copyright legally problematic, you have too many
+ lawyers.
+
+ As usual, this software is provided "as is", without any warranty.
+
+ If you copy significant amounts of public domain code from XZ Utils
+ into your project, acknowledging this somewhere in your software is
+ polite (especially if it is proprietary, non-free software), but
+ naturally it is not legally required. Here is an example of a good
+ notice to put into "about box" or into documentation:
+
+ This software includes code from XZ Utils <https://tukaani.org/xz/>.
+
+ The following license texts are included in the following files:
+ - COPYING.LGPLv2.1: GNU Lesser General Public License version 2.1
+ - COPYING.GPLv2: GNU General Public License version 2
+ - COPYING.GPLv3: GNU General Public License version 3
+
+ Note that the toolchain (compiler, linker etc.) may add some code
+ pieces that are copyrighted. Thus, it is possible that e.g. liblzma
+ binary wouldn't actually be in the public domain in its entirety
+ even though it contains no copyrighted code from the XZ Utils source
+ package.
+
+ If you have questions, don't hesitate to ask the author(s) for more
+ information.
+
diff --git a/COPYING.GPLv2 b/COPYING.GPLv2
new file mode 100644
index 0000000..d159169
--- /dev/null
+++ b/COPYING.GPLv2
@@ -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.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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.
+
+ <signature of Ty Coon>, 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.
diff --git a/COPYING.GPLv3 b/COPYING.GPLv3
new file mode 100644
index 0000000..f288702
--- /dev/null
+++ b/COPYING.GPLv3
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. 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
+them 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 prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. 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.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey 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;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If 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 convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU 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 that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ 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.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+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.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ 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
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program 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, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU 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. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/COPYING.LGPLv2.1 b/COPYING.LGPLv2.1
new file mode 100644
index 0000000..4362b49
--- /dev/null
+++ b/COPYING.LGPLv2.1
@@ -0,0 +1,502 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+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 and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, 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 library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+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 distribute a copy of this License along with the
+Library.
+
+ 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 Library or any portion
+of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+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 Library, 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 Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you 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.
+
+ If distribution of 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 satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be 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.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library 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.
+
+ 9. 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 Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+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 with
+this License.
+
+ 11. 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 Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library 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 Library.
+
+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.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library 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.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser 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 Library
+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 Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+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
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "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
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. 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 LIBRARY 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
+LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. 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.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This 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.
+
+ This 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 this library; 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.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..4dd0978
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,11756 @@
+commit 49053c0a649f4c8bd2b8d97ce915f401fbc0f3d9
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-10-31 22:30:29 +0800
+
+ Bump version and soname for 5.4.5.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 84c0cfc556287628df871703672879e530d0391f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-11-01 20:18:30 +0800
+
+ Add NEWS for 5.4.5.
+
+ NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 74 insertions(+)
+
+commit d90ed84db9770712e2421e170076b43bda9b64a7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-31 21:41:09 +0200
+
+ liblzma: Fix compilation of fastpos_tablegen.c.
+
+ The macro lzma_attr_visibility_hidden has to be defined to make
+ fastpos.h usable. The visibility attribute is irrelevant to
+ fastpos_tablegen.c so simply #define the macro to an empty value.
+
+ fastpos_tablegen.c is never built by the included build systems
+ and so the problem wasn't noticed earlier. It's just a standalone
+ program for generating fastpos_table.c.
+
+ Fixes: https://github.com/tukaani-project/xz/pull/69
+ Thanks to GitHub user Jamaika1.
+
+ src/liblzma/lzma/fastpos_tablegen.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 9b1268538b0b2c6c0a121f95165de65fc71ad23c
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-10-31 21:51:40 +0800
+
+ Build: Fix text wrapping in an output message.
+
+ configure.ac | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+commit 068ee436f4a8a706125ef43e8228b30001b1554e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-22 17:59:11 +0300
+
+ liblzma: Use lzma_always_inline in memcmplen.h.
+
+ src/liblzma/common/memcmplen.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit 6cdf0a7b7974baf58c1fd20ec3278f3b84ae56e5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-30 17:43:03 +0200
+
+ liblzma: #define lzma_always_inline in common.h.
+
+ src/liblzma/common/common.h | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+commit 33daad3961a4f07f3902b40f13e823e6e43e85da
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-22 17:15:32 +0300
+
+ liblzma: Use lzma_attr_visibility_hidden on private extern declarations.
+
+ These variables are internal to liblzma and not exposed in the API.
+
+ src/liblzma/check/check.h | 7 +++++++
+ src/liblzma/common/stream_flags_common.h | 3 +++
+ src/liblzma/lz/lz_encoder_hash.h | 1 +
+ src/liblzma/lzma/fastpos.h | 1 +
+ src/liblzma/rangecoder/price.h | 1 +
+ 5 files changed, 13 insertions(+)
+
+commit 6961a5ac7df178bfc2b7a181c40575847bc3035f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-22 17:08:39 +0300
+
+ liblzma: #define lzma_attr_visibility_hidden in common.h.
+
+ In ELF shared libs:
+
+ -fvisibility=hidden affects definitions of symbols but not
+ declarations.[*] This doesn't affect direct calls to functions
+ inside liblzma as a linker can replace a call to lzma_foo@plt
+ with a call directly to lzma_foo when -fvisibility=hidden is used.
+
+ [*] It has to be like this because otherwise every installed
+ header file would need to explictly set the symbol visibility
+ to default.
+
+ When accessing extern variables that aren't defined in the
+ same translation unit, compiler assumes that the variable has
+ the default visibility and thus indirection is needed. Unlike
+ function calls, linker cannot optimize this.
+
+ Using __attribute__((__visibility__("hidden"))) with the extern
+ variable declarations tells the compiler that indirection isn't
+ needed because the definition is in the same shared library.
+
+ About 15+ years ago, someone told me that it would be good if
+ the CRC tables would be defined in the same translation unit
+ as the C code of the CRC functions. While I understood that it
+ could help a tiny amount, I didn't want to change the code because
+ a separate translation unit for the CRC tables was needed for the
+ x86 assembly code anyway. But when visibility attributes are
+ supported, simply marking the extern declaration with the
+ hidden attribute will get identical result. When there are only
+ a few affected variables, this is trivial to do. I wish I had
+ understood this back then already.
+
+ src/liblzma/common/common.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit 5b9e16764905d06fa8e8339ba185ddfee304e5fb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-30 22:54:28 +0300
+
+ liblzma: Refer to MinGW-w64 instead of MinGW in the API headers.
+
+ MinGW (formely a MinGW.org Project, later the MinGW.OSDN Project
+ at <https://osdn.net/projects/mingw/>) has GCC 9.2.0 as the
+ most recent GCC package (released 2021-02-02). The project might
+ still be alive but majority of people have switched to MinGW-w64.
+ Thus it seems clearer to refer to MinGW-w64 in our API headers too.
+ Building with MinGW is likely to still work but I haven't tested it
+ in the recent years.
+
+ src/liblzma/api/lzma.h | 4 ++--
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 36fabdbe67c8a8fbdc3ac695a91fc443a1328cc4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-27 00:58:17 +0300
+
+ CMake: Use -D_FILE_OFFSET_BITS=64 if (and only if) needed.
+
+ A CMake option LARGE_FILE_SUPPORT is created if and only if
+ -D_FILE_OFFSET_BITS=64 affects sizeof(off_t).
+
+ This is needed on many 32-bit platforms and even with 64-bit builds
+ with MinGW-w64 to get support for files larger than 2 GiB.
+
+ CMakeLists.txt | 7 ++++-
+ cmake/tuklib_large_file_support.cmake | 52 +++++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 1 deletion(-)
+
+commit 989c8c354cbd2d20fbae4a432a3e31f5bc1cb9bf
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-30 02:14:25 +0300
+
+ CMake: Generate and install liblzma.pc if not using MSVC.
+
+ Autotools based build uses -pthread and thus adds it to Libs.private
+ in liblzma.pc. CMake doesn't use -pthread at all if pthread functions
+ are available in libc so Libs.private doesn't get -pthread either.
+
+ CMakeLists.txt | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+commit 983f3b458dc79c5976a4237fdfe4f8079f8d8830
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-30 01:13:13 +0300
+
+ CMake: Rearrange the PACKAGE_ variables.
+
+ The windres workaround now replaces spaces with \x20 so
+ the package name isn't repeated.
+
+ These changes will help with creation of liblzma.pc.
+
+ CMakeLists.txt | 26 +++++++++++++++-----------
+ 1 file changed, 15 insertions(+), 11 deletions(-)
+
+commit 4083c8e9501a48934a5fb563d2c3ce2ae143cd27
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-29 20:46:11 +0300
+
+ liblzma: Add Cflags.private to liblzma.pc.in for MSYS2.
+
+ It properly adds -DLZMA_API_STATIC when compiling code that
+ will be linked against static liblzma. Having it there on
+ systems other than Windows does no harm.
+
+ See: https://www.msys2.org/docs/pkgconfig/
+
+ src/liblzma/liblzma.pc.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 661549ecb7a9b136d72a01c137d9776c75d52d51
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-27 22:46:20 +0300
+
+ CMake: Create liblzma.def when building liblzma.dll with MinGW-w64.
+
+ CMakeLists.txt | 20 ++++++++++++++++++++
+ cmake/remove-ordinals.cmake | 26 ++++++++++++++++++++++++++
+ 2 files changed, 46 insertions(+)
+
+commit 0e546eb4da05c52b7d257e5bd85e15c51c4d86a3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-26 21:44:42 +0300
+
+ CMake: Change one CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR.
+
+ In this case they have identical values.
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit da4d04e4d6e199d28b58bd2e0df4e120c52dd5d7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-01 19:10:57 +0300
+
+ CMake/Windows: Fix the import library filename.
+
+ Both PREFIX and IMPORT_PERFIX have to be set to "" to get
+ liblzma.dll and liblzma.dll.a.
+
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 007558a358c48a0175cc8d47d11798d7967282ab
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-11 19:47:44 +0300
+
+ CMake: Don't shadow the cache entry ENABLE_THREADS with a normal variable.
+
+ Using set(ENABLE_THREADS "posix") is confusing because it sets
+ a new normal variable and leaves the cache entry with the same
+ name unchanged. The intent wasn't to change the cache entry so
+ this switches to a different variable name.
+
+ CMakeLists.txt | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+commit 7d01de67ee3dd76cfc12c23220e2e4cdc59708f1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-09 21:12:31 +0300
+
+ CMake: Edit threading related messages.
+
+ It's mostly to change from "thread method" to "threading method".
+
+ CMakeLists.txt | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+commit f8edcf3da689aad4b21e139197725450f2c456a0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-09 20:59:24 +0300
+
+ CMake: Use FATAL_ERROR if user-supplied options aren't understood.
+
+ This way typos are caught quickly and compounding error messages
+ are avoided (a single typo could cause more than one error).
+
+ This keeps using SEND_ERROR when the system is lacking a feature
+ (like threading library or sandboxing method). This way the whole
+ configuration log will be generated in case someone wishes to
+ report a problem upstream.
+
+ CMakeLists.txt | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+commit 1695021e4a233a9388ddd428654c1447f0ea3bfb
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-10-19 16:09:01 +0800
+
+ CMake: Add ALLOW_CLMUL_CRC option to enable/disable CLMUL.
+
+ The option is enabled by default, but will only be visible to a user
+ listing cache variables or using a CMake GUI application if the
+ immintrin.h header file is found.
+
+ This mirrors our Autotools build --disable-clmul-crc functionality.
+
+ CMakeLists.txt | 40 +++++++++++++++++++++++-----------------
+ 1 file changed, 23 insertions(+), 17 deletions(-)
+
+commit 5056bc51071d1a07097c5667a0d5bd85242e31b9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-14 17:56:59 +0300
+
+ tuklib_integer: Revise unaligned reads and writes on strict-align archs.
+
+ In XZ Utils context this doesn't matter much because
+ unaligned reads and writes aren't used in hot code
+ when TUKLIB_FAST_UNALIGNED_ACCESS isn't #defined.
+
+ src/common/tuklib_integer.h | 256 ++++++++++++++++++++++++++++++++------------
+ 1 file changed, 189 insertions(+), 67 deletions(-)
+
+commit 9e14743ee5ba79181076bc33952245d5b18fbc58
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-23 02:21:49 +0300
+
+ tuklib_integer: Add missing write64be and write64le fallback functions.
+
+ src/common/tuklib_integer.h | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+commit 4cc91ceb3992ef4f51302b56178c3b2c2aeaaaad
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-10-12 20:12:18 +0800
+
+ Build: Update visibility.m4 from Gnulib.
+
+ Updating from version 6 -> 8 from upstream. Declarations for variables
+ and function bodies were added to avoid unnecessary failures with
+ -Werror.
+
+ m4/visibility.m4 | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+commit 1824a6007cb1c8d5d7abcc7bf649148bc06fa72c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-10-06 19:36:35 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 8fdc71a27d07b10a3da52432432e080b6d577642
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-09-29 20:14:39 +0800
+
+ CMake: Rename xz and man page symlink custom targets.
+
+ The Ninja Generator for CMake cannot have a custom target and its
+ BYPRODUCTS have the same name. This has prevented Ninja builds on
+ Unix-like systems since the xz symlinks were introduced in
+ 80a1a8bb838842a2be343bd88ad1462c21c5e2c9.
+
+ CMakeLists.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 38171492ded6426ddf53d0c200fa8c93fcd02a60
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-27 19:54:35 +0300
+
+ CMake: Fix Windows build with Clang/LLVM 17.
+
+ llvm-windres 17.0.0 has more accurate emulation of GNU windres, so
+ the hack for GNU windres must now be used with llvm-windres too.
+
+ LLVM 16.0.6 has the old behavior and there likely won't be more
+ 16.x releases. So we can simply check for >= 17.0.0.
+
+ The workaround must not be used with Clang that is acting in
+ MSVC mode. This checks for the known environments that need
+ the workaround instead of using "NOT MSVC".
+
+ See also:
+ https://github.com/llvm/llvm-project/commit/2bcc0fdc58a220cb9921b47ec8a32c85f2511a47
+
+ CMakeLists.txt | 26 ++++++++++++++------------
+ 1 file changed, 14 insertions(+), 12 deletions(-)
+
+commit 1bce6fe48334b5df33d0487a9cbe41950122230e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-09-27 00:02:11 +0800
+
+ liblzma: Avoid compiler warning without creating extra symbol.
+
+ When the generic fast crc64 method is used, then we omit
+ lzma_crc64_table[][].
+
+ The C standards don't allow an empty translation unit which can be
+ avoided by declaring something, without exporting any symbols.
+
+ src/liblzma/check/crc64_table.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+commit dce95a593e6cd9779110aa1e314abd8b35c75f6b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-26 17:24:15 +0300
+
+ Build: Update the comment about -Werror usage in checks.
+
+ configure.ac | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+commit f3c32762ae309afa2fe330e7fb397acfdedc4d37
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-26 13:51:31 +0300
+
+ Build: Fix underquoted AC_LANG_SOURCE.
+
+ It made no practical difference in this case.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 7dd57f2f2c8fde93fa42b4dbf6d9860717723b41
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-26 13:14:37 +0300
+
+ Build: Silence Autoconf warning.
+
+ There was a use of AC_COMPILE_IFELSE that didn't use
+ AC_LANG_SOURCE and Autoconf warned about this. The omission
+ had been intentional but it turned out that this didn't do
+ what I thought it would.
+
+ Autoconf 2.71 manual gives an impression that AC_LANG_SOURCE
+ inserts all #defines that have been made with AC_DEFINE so
+ far (confdefs.h). The idea was that omitting AC_LANG_SOURCE
+ would mean that only the exact code included in the
+ AC_COMPILE_IFELSE call would be compiled.
+
+ With C programs this is not true: the #defines get added without
+ AC_LANG_SOURCE too. There seems to be no neat way to avoid this.
+ Thus, with the C language at least, adding AC_LANG_SOURCE makes
+ no other difference than silencing a warning from Autoconf. The
+ generated "configure" remains identical. (Docs of AC_LANG_CONFTEST
+ say that the #defines have been inserted since Autoconf 2.63b and
+ that AC_COMPILE_IFELSE uses AC_LANG_CONFTEST. So the behavior is
+ documented if one also reads the docs of macros that one isn't
+ calling directly.)
+
+ Any extra code, including #defines, can cause problems for
+ these two tests because these tests must use -Werror.
+ CC=clang CFLAGS=-Weverything is the most extreme example.
+ It enables -Wreserved-macro-identifier which warns about
+ It's possible to write a test file that passes -Weverything but
+ it becomes impossible when Autoconf inserts confdefs.h.
+
+ So this commit adds AC_LANG_SOURCE to silence Autoconf warnings.
+ A different solution is needed for -Werror tests.
+
+ configure.ac | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+commit edec253e418562f3164a01ecc8805295fa022efa
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-09-26 00:47:26 +0800
+
+ Build: Remove Gnulib dependency from tests.
+
+ The tests do not use any Gnulib replacements so they do not need to link
+ libgnu.a or have /lib in the include path.
+
+ tests/Makefile.am | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+commit 46cb133ce7360496eecca1255b364c05f0205855
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-09-26 00:43:43 +0800
+
+ CMake: Remove /lib from tests include path.
+
+ The tests never included anything from /lib, so this was not needed.
+
+ CMakeLists.txt | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 4ae13cfe0dedb8ddc3cf9ded8cd1ac09361b3bd1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-24 16:32:32 +0300
+
+ sysdefs.h: Update the comment about __USE_MINGW_ANSI_STDIO.
+
+ src/common/sysdefs.h | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 660c8c29e57d30dbd5009ef1f0ec1bbe195ccef6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-22 02:33:29 +0300
+
+ xz: Windows: Don't (de)compress to special files like "con" or "nul".
+
+ Before this commit, the following writes "foo" to the
+ console and deletes the input file:
+
+ echo foo | xz > con_xz
+ xz --suffix=_xz --decompress con_xz
+
+ It cannot happen without --suffix because names like con.xz
+ are also special and so attempting to decompress con.xz
+ (or compress con to con.xz) will already fail when opening
+ the input file.
+
+ Similar thing is possible when compressing. The following
+ writes to "nul" and the input file "n" is deleted.
+
+ echo foo | xz > n
+ xz --suffix=ul n
+
+ Now xz checks if the destination is a special file before
+ continuing. DOS/DJGPP version had a check for this but
+ Windows (and OS/2) didn't.
+
+ src/xz/file_io.c | 35 ++++++++++++++++++++++++++++-------
+ 1 file changed, 28 insertions(+), 7 deletions(-)
+
+commit b7ce6e80786fc0c08ed129e8ee262ea96a5473a1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-21 20:42:52 +0300
+
+ CMake: Wrap two overlong lines that are possible to wrap.
+
+ CMakeLists.txt | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit 1595f454d5c8257c668cccd6a86dd68175d5c430
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-21 20:36:31 +0300
+
+ CMake: Add a comment about threads on Cygwin.
+
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 5be6275f19784cdd5a954f0188045c8ff4934d54
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-12 21:12:34 +0300
+
+ CMake: Bump maximum policy version to 3.27.
+
+ There are several new policies. CMP0149 may affect the Windows SDK
+ version that CMake will choose by default. The new behavior is more
+ predictable, always choosing the latest SDK version by default.
+
+ The other new policies shouldn't affect this package.
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e515643d7524851d1eb7dab73453e26d8521324c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-08 19:08:57 +0300
+
+ Doxygen: Add more C macro names to PREDEFINED.
+
+ doxygen/Doxyfile | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+commit e3478ae4f36cd06522a2fef023860893f068434d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-11 18:47:26 +0300
+
+ liblzma: Move a few __attribute__ uses in function declarations.
+
+ The API headers have many attributes but these were left
+ as is for now.
+
+ src/liblzma/common/common.c | 6 ++++--
+ src/liblzma/common/common.h | 8 ++++----
+ src/liblzma/common/memcmplen.h | 3 ++-
+ 3 files changed, 10 insertions(+), 7 deletions(-)
+
+commit b71b8922ef3971e5ccffd1e213888d44abe21d11
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-11 19:03:35 +0300
+
+ xz, xzdec, lzmainfo: Use tuklib_attr_noreturn.
+
+ For compatibility with C23's [[noreturn]], tuklib_attr_noreturn
+ must be at the beginning of declaration (before "extern" or
+ "static", and even before any GNU C's __attribute__).
+
+ This commit also moves all other function attributes to
+ the beginning of function declarations. "extern" is kept
+ at the beginning of a line so the attributes are listed on
+ separate lines before "extern" or "static".
+
+ src/lzmainfo/lzmainfo.c | 6 ++++--
+ src/xz/coder.c | 3 ++-
+ src/xz/hardware.h | 3 ++-
+ src/xz/message.h | 30 +++++++++++++++++-------------
+ src/xz/options.c | 3 ++-
+ src/xz/util.h | 8 ++++----
+ src/xzdec/xzdec.c | 9 ++++++---
+ 7 files changed, 37 insertions(+), 25 deletions(-)
+
+commit 359e5c6cb128dab64ea6070d21d1c240f96cea6b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-11 18:53:31 +0300
+
+ Remove incorrect uses of __attribute__((__malloc__)).
+
+ xrealloc() is obviously incorrect, modern GCC docs even
+ mention realloc() as an example where this attribute
+ cannot be used.
+
+ liblzma's lzma_alloc() and lzma_alloc_zero() would be
+ correct uses most of the time but custom allocators
+ may use a memory pool or otherwise hold the pointer
+ so aliasing issues could happen in theory.
+
+ The xstrdup() case likely was correct but I removed it anyway.
+ Now there are no __malloc__ attributes left in the code.
+ The allocations aren't in hot paths so this should make
+ no practical difference.
+
+ src/liblzma/common/common.c | 4 ++--
+ src/liblzma/common/common.h | 4 ++--
+ src/xz/util.h | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 589b4cba22fccb1dbc919df5d134aefb2b5a6b01
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-19 14:03:45 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 43728ed2267e921fbdfa699ee1e91b105ab0e98b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-14 16:35:46 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit caf00e0988ba47842cfd93dfbb17f7d30120d6e7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-09-14 16:34:07 +0300
+
+ liblzma: Mark crc64_clmul() with __attribute__((__no_sanitize_address__)).
+
+ Thanks to Agostino Sarubbo.
+ Fixes: https://github.com/tukaani-project/xz/issues/62
+
+ src/liblzma/check/crc64_fast.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+commit a70e96d2da761b8b3a77bf14e08002d871e5950b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-09-12 22:36:12 +0800
+
+ CMake: Fix time.h checks not running on second CMake run.
+
+ If CMake was configured more than once, HAVE_CLOCK_GETTIME and
+ HAVE_CLOCK_MONOTONIC would not be set as compile definitions. The check
+ for librt being needed to provide HAVE_CLOCK_GETTIME was also
+ simplified.
+
+ CMakeLists.txt | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+commit d5275d83bd2a9701c5feb8666785007c074b1359
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-09-12 22:34:06 +0800
+
+ CMake: Fix unconditionally defining HAVE_CLOCK_MONOTONIC.
+
+ If HAVE_CLOCK_GETTIME was defined, then HAVE_CLOCK_MONOTONIC was always
+ added as a compile definition even if the check for it failed.
+
+ CMakeLists.txt | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+commit 1f6e7c68fbdeeaa9482fc77de090be63d90912fd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-08-31 19:50:05 +0300
+
+ xz: Refactor thousand separator detection and disable it on MSVC.
+
+ Now the two variations of the format strings are created with
+ a macro, and the whole detection code can be easily disabled
+ on platforms where thousand separator formatting is known to
+ not work (MSVC has no support, and on DJGPP 2.05 it can have
+ problems in some cases).
+
+ src/xz/util.c | 89 ++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 45 insertions(+), 44 deletions(-)
+
+commit ef71f83973a20cc28a3221f85681922026ea33f5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-08-31 18:14:43 +0300
+
+ xz: Fix a too relaxed assertion and remove uses of SSIZE_MAX.
+
+ SSIZE_MAX isn't readily available on MSVC. Removing it means
+ that there is one thing less to worry when porting to MSVC.
+
+ src/xz/file_io.c | 5 ++---
+ src/xz/file_io.h | 4 ++--
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+commit cf8ba7c3a89e37736b926dfbe85dffeff725db47
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-28 23:14:45 +0800
+
+ Tests: Improve invalid unpadded size check in test_lzma_index_append().
+
+ This check was extended to test the code added to fix a failing assert
+ in 68bda971bb8b666a009331455fcedb4e18d837a4.
+
+ tests/test_index.c | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+commit 4a4180ce74788e97e90b9aab579bfd7c6dce3f59
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-28 21:54:41 +0800
+
+ Tests: Improve comments in test_index.c.
+
+ tests/test_index.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 4b23b84b89e39a5117e16f66c3b01db4f08ed3e7
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-28 21:52:54 +0800
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 773f1e8622cb1465df528cb16a749517650acd93
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-28 21:50:16 +0800
+
+ liblzma: Update assert in vli_ceil4().
+
+ The argument to vli_ceil4() should always guarantee the return value
+ is also a valid lzma_vli. Thus the highest three valid lzma_vli values
+ are invalid arguments. All uses of the function ensure this so the
+ assert is updated to match this.
+
+ src/liblzma/common/index.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 68bda971bb8b666a009331455fcedb4e18d837a4
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-28 21:31:25 +0800
+
+ liblzma: Add overflow check for Unpadded size in lzma_index_append().
+
+ This was not a security bug since there was no path to overflow
+ UINT64_MAX in lzma_index_append() or when it calls index_file_size().
+ The bug was discovered by a failing assert() in vli_ceil4() when called
+ from index_file_size() when unpadded_sum (the sum of the compressed size
+ of current Stream and the unpadded_size parameter) exceeds LZMA_VLI_MAX.
+
+ Previously, the unpadded_size parameter was checked to be not greater
+ than UNPADDED_SIZE_MAX, but no check was done once compressed_base was
+ added.
+
+ This could not have caused an integer overflow in index_file_size() when
+ called by lzma_index_append(). The calculation for file_size breaks down
+ into the sum of:
+
+ - Compressed base from all previous Streams
+ - 2 * LZMA_STREAM_HEADER_SIZE (size of the current Streams header and
+ footer)
+ - stream_padding (can be set by lzma_index_stream_padding())
+ - Compressed base from the current Stream
+ - Unpadded size (parameter to lzma_index_append())
+
+ The sum of everything except for Unpadded size must be less than
+ LZMA_VLI_MAX. This is guarenteed by overflow checks in the functions
+ that can set these values including lzma_index_stream_padding(),
+ lzma_index_append(), and lzma_index_cat(). The maximum value for
+ Unpadded size is enforced by lzma_index_append() to be less than or
+ equal UNPADDED_SIZE_MAX. Thus, the sum cannot exceed UINT64_MAX since
+ LZMA_VLI_MAX is half of UINT64_MAX.
+
+ Thanks to Joona Kannisto for reporting this.
+
+ src/liblzma/common/index.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit b41bb79c602481d7ea93d65f5b3e3f08dc54233b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-28 22:18:29 +0800
+
+ Translations: Update the Esperanto translation.
+
+ po/eo.po | 47 +++++++++++++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+commit 6614e6d4bf8e2b5af6eb73930148e0ffc8d2265a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-09 20:55:36 +0800
+
+ Docs: Update INSTALL for --enable-threads method win95.
+
+ The Autotools build allows win95 threads and --enable-small together now
+ if the compiler supports __attribute__((__constructor__)).
+
+ INSTALL | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit bfb623ad96fa6f1dbc0c560403c4296e3c8e26c9
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-09 20:54:15 +0800
+
+ CMake: Conditionally allow win95 threads and --enable-small.
+
+ CMakeLists.txt | 27 +++++++++++++++++++--------
+ 1 file changed, 19 insertions(+), 8 deletions(-)
+
+commit e919ebb29ac9f5270cd7176a39d0d3b4cea875a9
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-09 20:35:16 +0800
+
+ Build: Conditionally allow win95 threads and --enable-small.
+
+ When the compiler supports __attribute__((__constructor__))
+ mythread_once() is never used, even with --enable-small. A configuration
+ with win95 threads and --enable-small will compile and be thread safe so
+ it can be allowed.
+
+ This isn't a very common configuration since MSVC does not support
+ __attribute__((__constructor__)), but MINGW32 and CLANG32 environments
+ for MSYS2 can use win95 threads and have
+ __attribute__((__constructor__)) support.
+
+ configure.ac | 21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+commit c0c0cd4a483a672b66a13761583bc4f84d86d501
+Author: Jamaika1 <lukaszcz18@wp.pl>
+Date: 2023-08-08 14:07:59 +0200
+
+ mythread.h: Fix typo error in Vista threads mythread_once().
+
+ The "once_" variable was accidentally referred to as just "once". This
+ prevented building with Vista threads when
+ HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR was not defined.
+
+ src/common/mythread.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d93fbefcc48a8737fdf5678ce66d1c1d605752a0
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-03 20:10:21 +0800
+
+ Tests: Style fixes to test_lzip_decoder.c.
+
+ tests/test_lzip_decoder.c | 36 ++++++++++++++++++++++++------------
+ 1 file changed, 24 insertions(+), 12 deletions(-)
+
+commit 65981d8e45741fd1502e007609469e1d60312e69
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-03 15:56:20 +0800
+
+ Translations: Update the Chinese (simplified) translation.
+
+ po/zh_CN.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a108ed589171d683c34238a87e358b87f69e39a0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-08-02 17:15:12 +0300
+
+ xz: Omit an empty paragraph on the man page.
+
+ src/xz/xz.1 | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 03c51c5c08fe3579d8bbc8eea8251a1128001330
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-02 20:32:20 +0800
+
+ Bump version and soname for 5.4.4.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit d7fa3f1b58a77f79b1a4e12452418b5555632e18
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-08-02 20:30:07 +0800
+
+ Add NEWS for 5.4.4.
+
+ NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 43 insertions(+)
+
+commit 6a1093c0004c42eeaef312456c295671496dd67a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-08-02 15:19:43 +0300
+
+ build-aux/manconv.sh: Fix US-ASCII and UTF-8 output.
+
+ groff defaults to SGR escapes. Using -P-c passes -c to grotty
+ which restores the old behavior. Perhaps there is a better way to
+ get pure plain text output but this works for now.
+
+ build-aux/manconv.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit f6f9f5651a7e2d89f588981533155ab850e063f7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-08-01 19:10:43 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 0dd83ba8767dad722e0f0f94e0e4146e290a28cb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-08-01 18:22:24 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4170a80785cc69edfc5fdfe498bed5f40db6a7ef
+Author: ChanTsune <41658782+ChanTsune@users.noreply.github.com>
+Date: 2023-08-01 18:17:17 +0300
+
+ mythread.h: Disable signal functions in builds targeting Wasm + WASI.
+
+ signal.h in WASI SDK doesn't currently provide sigprocmask()
+ or sigset_t. liblzma doesn't need them so this change makes
+ liblzma and xzdec build against WASI SDK. xz doesn't build yet
+ and the tests don't either as tuktest needs setjmp() which
+ isn't (yet?) implemented in WASI SDK.
+
+ Closes: https://github.com/tukaani-project/xz/pull/57
+ See also: https://github.com/tukaani-project/xz/pull/56
+
+ (The original commit was edited a little by Lasse Collin.)
+
+ src/common/mythread.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 0db6fbe0be1545a4f25fcd6993371155b37bbb26
+Author: Dimitri Papadopoulos Orfanos <3234522+DimitriPapadopoulos@users.noreply.github.com>
+Date: 2023-07-31 14:02:21 +0200
+
+ Docs: Fix typos found by codespell
+
+ CMakeLists.txt | 4 ++--
+ NEWS | 2 +-
+ configure.ac | 2 +-
+ src/liblzma/api/lzma/container.h | 4 ++--
+ src/liblzma/api/lzma/filter.h | 2 +-
+ src/liblzma/api/lzma/lzma12.h | 4 ++--
+ src/liblzma/common/block_buffer_encoder.c | 2 +-
+ src/liblzma/common/common.h | 2 +-
+ src/liblzma/common/file_info.c | 2 +-
+ src/liblzma/common/lzip_decoder.c | 2 +-
+ src/liblzma/common/stream_decoder_mt.c | 8 ++++----
+ src/liblzma/common/string_conversion.c | 6 +++---
+ src/liblzma/lz/lz_encoder.h | 2 +-
+ src/liblzma/lzma/lzma_encoder.c | 4 ++--
+ src/xz/hardware.c | 4 ++--
+ tests/test_filter_flags.c | 4 ++--
+ tests/test_index.c | 2 +-
+ tests/test_vli.c | 2 +-
+ 18 files changed, 29 insertions(+), 29 deletions(-)
+
+commit 84a3a1f4e4f146b3b5fa73fe708cacb0d9f829f3
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-26 20:26:23 +0800
+
+ Update .gitignore.
+
+ .gitignore | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 962b3d41e0c27355ba3052ef7b7d9a887de807e5
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-28 22:03:08 +0800
+
+ CMake: Conditionally allow the creation of broken symlinks.
+
+ The CMake build will try to create broken symlinks on Unix and Unix-like
+ platforms. Cygwin and MSYS2 are Unix-like, but may not be able to create
+ broken symlinks. The value of the CYGWIN or MSYS environment variables
+ determine if broken symlinks are valid.
+
+ The default for MSYS2 does not allow for broken symlinks, so the CMake
+ build has been broken for MSYS2 since commit
+ 80a1a8bb838842a2be343bd88ad1462c21c5e2c9.
+
+ CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 75 insertions(+), 7 deletions(-)
+
+commit 19899340cf74d98304f9f5b726c72e85c7017d72
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-24 21:43:44 +0800
+
+ liblzma: Prevent an empty translation unit in Windows builds.
+
+ To workaround Automake lacking Windows resource compiler support, an
+ empty source file is compiled to overwrite the resource files for static
+ library builds. Translation units without an external declaration are
+ not allowed by the C standard and result in a warning when used with
+ -Wempty-translation-unit (Clang) or -pedantic (GCC).
+
+ src/liblzma/Makefile.am | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit ef7fbe83937abd7f55f1637c1d08b559f1d3d6cc
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-21 18:05:44 +0800
+
+ Tests: Skip .lz files in test_files.sh if not configured.
+
+ Previously if the lzip decoder was not configured then test_files.sh
+ would pass the lzip tests instead of skipping them.
+
+ tests/test_files.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e49815ba7aa610b72e8724025eceee23c27e7b23
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 22:11:13 +0800
+
+ Tests: Add ARM64 filter test to test_compress.sh.
+
+ tests/test_compress.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit db5b57b827c2b084586c51da1b8a3ab0984bdb40
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-22 18:37:56 +0800
+
+ Translations: Update the Vietnamese translation.
+
+ po/vi.po | 45 ++++++++++++++++++++++++++++-----------------
+ 1 file changed, 28 insertions(+), 17 deletions(-)
+
+commit e6ba5014081c98cb068253b3e5f9e372dd157f3c
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:30:05 +0800
+
+ Translations: Update the Croatian translation.
+
+ po/hr.po | 49 ++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 30 insertions(+), 19 deletions(-)
+
+commit 82657a1f10a25050a3e9c246c41deb785cccba3a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:28:32 +0800
+
+ Translations: Update the Korean man page translations.
+
+ po4a/ko.po | 1255 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 629 insertions(+), 626 deletions(-)
+
+commit fab35907d13efbe7c457e00a310123335d7bae3e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:25:24 +0800
+
+ Translations: Update the Korean translation.
+
+ po/ko.po | 45 ++++++++++++++++++++++++++++-----------------
+ 1 file changed, 28 insertions(+), 17 deletions(-)
+
+commit f530fe1964c34797fa3b775ec5804d68007c1579
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:24:05 +0800
+
+ Translations: Update the Polish translation.
+
+ po/pl.po | 47 +++++++++++++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+commit 10b3500cc2617aabdbc802a63164ce0a3683ad2b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:22:23 +0800
+
+ Translations: Update the German man page translations.
+
+ po4a/de.po | 1255 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 629 insertions(+), 626 deletions(-)
+
+commit 3d14e8a34dba176f975326924ae28a3ab5fee165
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:18:44 +0800
+
+ Translations: Update the German translation.
+
+ po/de.po | 47 +++++++++++++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+commit bdcc180a2da15039c47455c1cafd1ce9aff442e4
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:17:10 +0800
+
+ Translations: Update the Chinese (simplified) translation.
+
+ po/zh_CN.po | 47 +++++++++++++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+commit 844240350d33cb46ba8827b74dc8758e2abed9e5
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:15:47 +0800
+
+ Translations: Update the Swedish translation.
+
+ po/sv.po | 47 +++++++++++++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+commit bdc7952bcfbc20c134f723ff5cbf84ab690fb4fc
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:14:00 +0800
+
+ Translations: Update the Ukrainian man page translations.
+
+ po4a/uk.po | 1253 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 628 insertions(+), 625 deletions(-)
+
+commit 143396e070c8d8afb56e3a5f688b214222cf71e0
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:09:15 +0800
+
+ Translations: Update the Ukrainian translation.
+
+ po/uk.po | 45 ++++++++++++++++++++++++++++-----------------
+ 1 file changed, 28 insertions(+), 17 deletions(-)
+
+commit 1b8146d64eaac51b40079f5788b85c1eb79e35de
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:06:57 +0800
+
+ Translations: Update the Spanish translation.
+
+ po/es.po | 47 +++++++++++++++++++++++++++++------------------
+ 1 file changed, 29 insertions(+), 18 deletions(-)
+
+commit f947ce09d79ef8fa6549d350c4d72e4a8a9fa697
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:05:19 +0800
+
+ Translations: Update the Romanian translation.
+
+ po/ro.po | 48 ++++++++++++++++++++++++++++++------------------
+ 1 file changed, 30 insertions(+), 18 deletions(-)
+
+commit f681301a368def3f597a7c7bea7cb3f7a2f933e7
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-20 20:02:56 +0800
+
+ Translations: Update the Romanian man page translations.
+
+ po4a/ro.po | 1254 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 629 insertions(+), 625 deletions(-)
+
+commit 8bc3146c6be920b56283f4ee846456cb34ae4b6f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-13 21:26:47 +0800
+
+ xz: Update man page Authors and date.
+
+ src/xz/xz.1 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit c2905540ef905412b54c76488758712d3e2a0f9d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-18 23:19:09 +0800
+
+ xz: Slight reword in xz man page for consistency.
+
+ Changed will print => prints in xz --robot --version description to
+ match --robot --info-memory description.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2600d3352449faf57d9cb3fa00cbe40548a1310f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-18 22:49:57 +0800
+
+ liblzma: Improve comment in string_conversion.c.
+
+ The comment used "flag" when referring to decoder options. Just
+ referring to them as options is more clear and consistent.
+
+ src/liblzma/common/string_conversion.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 98fc14541eec3e1dcf694075c8533f19a3cee552
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-13 21:21:54 +0800
+
+ liblzma: Reword lzma_str_list_filters() documentation.
+
+ Reword "options required" to "options read". The previous wording
+ may have suggested that the options listed were all required when
+ the filters are used for encoding or decoding. Now it should be
+ more clear that the options listed are the ones relevant for
+ encoding or decoding.
+
+ src/liblzma/api/lzma/filter.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 1ac79b4cbaecf3f4930a5d8ce6f7e1f2b63c2a01
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-07-18 17:37:33 +0300
+
+ xz: Translate the second "%s: " in message.c since French needs "%s : ".
+
+ This string is used to print a filename when using "xz -v" and
+ stderr isn't a terminal.
+
+ src/xz/message.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 97851be2c6c64494f23c3a735601c13d4387820b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-07-18 14:35:33 +0300
+
+ xz: Make "%s: %s" translatable because French needs "%s : %s".
+
+ src/xz/args.c | 5 ++++-
+ src/xz/coder.c | 8 ++++----
+ src/xz/file_io.c | 8 ++++----
+ src/xz/list.c | 11 ++++++-----
+ 4 files changed, 18 insertions(+), 14 deletions(-)
+
+commit b406828a6dfd3caa4f77efe3ff3e3eea263eee62
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-07-18 13:57:54 +0300
+
+ liblzma: Tweak #if condition in memcmplen.h.
+
+ Maybe ICC always #defines _MSC_VER on Windows but now
+ it's very clear which code will get used.
+
+ src/liblzma/common/memcmplen.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit ef4a07ad9434f81417395f6fe0bb331e027a703b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-07-18 13:49:43 +0300
+
+ liblzma: Omit unnecessary parenthesis in a preprocessor directive.
+
+ src/liblzma/common/memcmplen.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 64ee0caaea06654b28afaee850fb187a11bf9cb2
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-06-28 20:22:38 +0800
+
+ liblzma: Prevent warning for MSYS2 Windows build.
+
+ In lzma_memcmplen(), the <intrin.h> header file is only included if
+ _MSC_VER and _M_X64 are both defined but _BitScanForward64() was
+ previously used if _M_X64 was defined. GCC for MSYS2 defines _M_X64 but
+ not _MSC_VER so _BitScanForward64() was used without including
+ <intrin.h>.
+
+ Now, lzma_memcmplen() will use __builtin_ctzll() for MSYS2 GCC builds as
+ expected.
+
+ src/liblzma/common/memcmplen.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit ba177057643dae6e9c167ee26471181c199c8a00
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-14 23:20:33 +0800
+
+ Docs: Add a new section to INSTALL for Tests.
+
+ The new Tests section describes basic information about the tests, how
+ to run them, and important details when cross compiling. We have had a
+ few questions about how to compile the tests without running them, so
+ hopefully this information will help others with the same question in the
+ future.
+
+ Fixes: https://github.com/tukaani-project/xz/issues/54
+
+ INSTALL | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 64 insertions(+), 17 deletions(-)
+
+commit 0745b900fafa5ac2c31e8ec3cfba3053457c8b1f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-14 21:10:27 +0800
+
+ Docs: Update README.
+
+ This adds an entry to "Other implementations of the .xz format" for
+ XZ for Java.
+
+ README | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit c972d44103c4edf88e73917ef08bde69db9d06cb
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-18 13:27:46 +0300
+
+ xz: Fix typo in man page.
+
+ The Memory limit information section described three output
+ columns when it actually has six. This was reworded to
+ "multiple" to make it more future proof.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6e21f1b4e2c580b64d258e3b81ac9e44d53b9283
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-14 21:30:25 +0800
+
+ Tests: Improve feature testing for skipping.
+
+ Fixed a bug where test_compress_* would all fail if arm64 or armthumb
+ filters were enabled for compression but arm was disabled. Since the
+ grep tests only checked for "define HAVE_ENCODER_ARM", this would match
+ on HAVE_ENCODER_ARM64 or HAVE_ENCODER_ARMTHUMB.
+
+ Now the config.h feature test requires " 1" at the end to prevent the
+ prefix problem. have_feature() was also updated for this even though
+ there were known current bugs affecting it. This is just in case future
+ features have a similar prefix problem.
+
+ tests/test_compress.sh | 4 ++--
+ tests/test_files.sh | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 26c37d290c0884a4518a26b949575420a77fb938
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-10 20:56:28 +0800
+
+ Translations: Update the Chinese (traditional) translation.
+
+ po/zh_TW.po | 659 ++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 377 insertions(+), 282 deletions(-)
+
+commit 2ec65181e28335692a3a4fac4fefc4303111d355
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-07-08 20:03:59 +0800
+
+ Translations: Update the Vietnamese translation.
+
+ po/vi.po | 620 +++++++++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 349 insertions(+), 271 deletions(-)
+
+commit c44c7e7590db1b89c97e106f5c516bf69189e233
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-06-28 20:46:31 +0800
+
+ Tests: Fix memory leaks in test_index.
+
+ Several tests were missing calls to lzma_index_end() to clean up the
+ lzma_index structs. The memory leaks were discovered by using
+ -fsanitize=address with GCC.
+
+ tests/test_index.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit b9499c94fccc03eba5311b5305f04149a7c5af65
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-06-28 20:43:29 +0800
+
+ Tests: Fix memory leaks in test_block_header.
+
+ test_block_header was not properly freeing the filter options between
+ calls to lzma_block_header_decode(). The memory leaks were discovered by
+ using -fsanitize=address with GCC.
+
+ tests/test_block_header.c | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+commit 1155471651ad456c5f90aee6435931fae65682bf
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-06-28 20:31:11 +0800
+
+ liblzma: Prevent uninitialzed warning in mt stream encoder.
+
+ This change only impacts the compiler warning since it was impossible
+ for the wait_abs struct in stream_encode_mt() to be used before it was
+ initialized since mythread_condtime_set() will always be called before
+ mythread_cond_timedwait().
+
+ Since the mythread.h code is different between the POSIX and
+ Windows versions, this warning was only present on Windows builds.
+
+ Thanks to Arthur S for reporting the warning and providing an initial
+ patch.
+
+ src/liblzma/common/stream_encoder_mt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 62dd1c9bf0c66679ceeebc8b99bca136ca43bcb9
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-06-07 00:10:38 +0800
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d04eb78ab3892d3678c180437dd66379efa051fd
+Author: Benjamin Buch <bebuch@users.noreply.github.com>
+Date: 2023-06-06 15:32:45 +0200
+
+ CMake: Protects against double find_package
+
+ Boost iostream uses `find_package` in quiet mode and then again uses
+ `find_package` with required. This second call triggers a
+ `add_library cannot create imported target "LibLZMA::LibLZMA"
+ because another target with the same name already exists.`
+
+ This can simply be fixed by skipping the alias part on secondary
+ `find_package` runs.
+
+ CMakeLists.txt | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+commit 12ea1fb29763dd72376aca73d69621aff01eaa7f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-31 20:26:42 +0800
+
+ Translations: Update the Esperanto translation.
+
+ po/eo.po | 185 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 92 insertions(+), 93 deletions(-)
+
+commit a4d45c07c1e4aa0ea9410b4eed7301c97e960319
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-31 20:25:00 +0800
+
+ Translations: Update the Croatian translation.
+
+ po/hr.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit f51b7bcea6f948db9529b3e6d850e76a30cc0e96
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-31 20:15:53 +0800
+
+ Translations: Update the Chinese (simplified) translation.
+
+ po/zh_CN.po | 317 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 157 insertions(+), 160 deletions(-)
+
+commit d5b81c19a7594fbb913bb3450360bc2145f29568
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-17 23:12:13 +0800
+
+ Translations: Update German translation of man pages.
+
+ po4a/de.po | 52 ++++++++++++----------------------------------------
+ 1 file changed, 12 insertions(+), 40 deletions(-)
+
+commit 36860a3e30d5675b4dba3a343159458d8864bceb
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-17 23:09:18 +0800
+
+ Translations: Update the German translation.
+
+ po/de.po | 189 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 94 insertions(+), 95 deletions(-)
+
+commit f05641ef0d4990c4c58f459039d412475b94b37d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-17 20:30:01 +0800
+
+ Translations: Update the Croatian translation.
+
+ po/hr.po | 187 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 93 insertions(+), 94 deletions(-)
+
+commit b852f6f11d43cafce871cd158c80488f86619a63
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-17 20:26:54 +0800
+
+ Translations: Update Korean translation of man pages.
+
+ po4a/ko.po | 3015 ++++++++++++------------------------------------------------
+ 1 file changed, 568 insertions(+), 2447 deletions(-)
+
+commit fdcb78fb6f5313eda363869690685471d7ab9731
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-17 20:13:01 +0800
+
+ Translations: Update the Korean translation.
+
+ po/ko.po | 319 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 158 insertions(+), 161 deletions(-)
+
+commit 9e39cebe3ccdd4bc320ce6e7eea989bdd167c8b2
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 23:49:09 +0800
+
+ Translations: Update the Spanish translation.
+
+ po/es.po | 319 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 158 insertions(+), 161 deletions(-)
+
+commit 7a578d1d8293fc1cf7c6f9df76bc6a0e55c51a14
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 23:47:23 +0800
+
+ Translations: Update the Romanian translation.
+
+ po/ro.po | 195 ++++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 98 insertions(+), 97 deletions(-)
+
+commit 362320fea5383bae179763763625532bad6d10e8
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 23:45:43 +0800
+
+ Translations: Update Romanian translation of man pages.
+
+ po4a/ro.po | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+commit 29c5a870be23d0a565b959404b34a8b1babef7df
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 23:43:51 +0800
+
+ Translations: Update Ukrainian translation of man pages.
+
+ po4a/uk.po | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 5ee57572773207371712b1bbcd9b5b8c1baad2cc
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 23:37:54 +0800
+
+ Translations: Update the Ukrainian translation.
+
+ po/uk.po | 321 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 159 insertions(+), 162 deletions(-)
+
+commit dfc257bdb224780d3c8cdeca5a8e52848b9adc0a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 23:07:35 +0800
+
+ Translations: Update the Polish translation.
+
+ po/pl.po | 316 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 155 insertions(+), 161 deletions(-)
+
+commit f6df4c4ab7378d2971ae1606f4eecc011ea5fc6d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 22:52:14 +0800
+
+ Translations: Update the Swedish translation.
+
+ po/sv.po | 319 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 158 insertions(+), 161 deletions(-)
+
+commit 25da22e0521ec698dae4eb5e994b4cd3f4708b60
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-16 21:21:38 +0800
+
+ Translations: Update the Esperanto translation.
+
+ po/eo.po | 34 +++++++++++++++++-----------------
+ 1 file changed, 17 insertions(+), 17 deletions(-)
+
+commit 4f57a9c9915b7b9267885cf9fca58e5c8208458d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-11 23:49:23 +0800
+
+ liblzma: Adds lzma_nothrow to MicroLZMA API functions.
+
+ None of the liblzma functions may throw an exception, so this
+ attribute should be applied to all liblzma API functions.
+
+ src/liblzma/api/lzma/container.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 238b4e5458b4bd2cadefb768b8ea7c6b70a191ac
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-04 20:38:52 +0800
+
+ Translations: Update the Croatian translation.
+
+ po/hr.po | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 0cee63c3c6c4f9084a5e7fa7c15a1863ac8e5ffc
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-04 19:50:42 +0800
+
+ Bump version and soname for 5.4.3.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 01f937ea9a49005c5091c0165fa0c1e572dd1749
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-05-02 20:39:56 +0800
+
+ Add NEWS for 5.4.3.
+
+ NEWS | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit e9b9ea953179502d5245b4e6ca4f5ffe9d5797b1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-05-03 22:46:42 +0300
+
+ tuklib_integer.h: Fix a recent copypaste error in Clang detection.
+
+ Wrong line was changed in 7062348bf35c1e4cbfee00ad9fffb4a21aa6eff7.
+ Also, this has >= instead of == since ints larger than 32 bits would
+ work too even if not relevant in practice.
+
+ src/common/tuklib_integer.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit be6e39a8622f0d905072874ec25b1ffd155b12e1
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-04-20 20:15:00 +0800
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 9e343a46cf87a345799222c0b0b3a6f3358dde0c
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-04-19 22:22:16 +0800
+
+ Windows: Include <intrin.h> when needed.
+
+ Legacy Windows did not need to #include <intrin.h> to use the MSVC
+ intrinsics. Newer versions likely just issue a warning, but the MSVC
+ documentation says to include the header file for the intrinsics we use.
+
+ GCC and Clang can "pretend" to be MSVC on Windows, so extra checks are
+ needed in tuklib_integer.h to only include <intrin.h> when it will is
+ actually needed.
+
+ src/common/tuklib_integer.h | 6 ++++++
+ src/liblzma/common/memcmplen.h | 10 ++++++++++
+ 2 files changed, 16 insertions(+)
+
+commit 12321a9390acc076b414035a46df9d7545ac379f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-04-19 21:59:03 +0800
+
+ tuklib_integer: Use __builtin_clz() with Clang.
+
+ Clang has support for __builtin_clz(), but previously Clang would
+ fallback to either the MSVC intrinsic or the regular C code. This was
+ discovered due to a bug where a new version of Clang required the
+ <intrin.h> header file in order to use the MSVC intrinsics.
+
+ Thanks to Anton Kochkov for notifying us about the bug.
+
+ src/common/tuklib_integer.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit d1f0e01c395960efd6c29ff144eda4f4c8c1c6d3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-04-14 18:42:33 +0300
+
+ liblzma: Update project maintainers in lzma.h.
+
+ AUTHORS was updated earlier, lzma.h was simply forgotten.
+
+ src/liblzma/api/lzma.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 8204c5d1304e1e3b7487801b4acaf8e3179a6c52
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-04-13 20:45:19 +0800
+
+ liblzma: Cleans up old commented out code.
+
+ src/liblzma/common/alone_encoder.c | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+commit 32980d1562bc031013306be1c787761fa63da87d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-28 22:32:40 +0800
+
+ CMake: Update liblzma-config.cmake generation.
+
+ Now that the threading is configurable, the liblzma CMake package only
+ needs the threading library when using POSIX threads.
+
+ CMakeLists.txt | 33 ++++++++++++++++++++++-----------
+ 1 file changed, 22 insertions(+), 11 deletions(-)
+
+commit 023907faa965476fb921a6344253c50e0ba795f9
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-28 22:25:33 +0800
+
+ CMake: Allows setting thread method.
+
+ The thread method is now configurable for the CMake build. It matches
+ the Autotools build by allowing ON (pick the best threading method),
+ OFF (no threading), posix, win95, and vista. If both Windows and
+ posix threading are both available, then ON will choose Windows
+ threading. Windows threading will also not use:
+
+ target_link_libraries(liblzma Threads::Threads)
+
+ since on systems like MinGW-w64 it would link the posix threads
+ without purpose.
+
+ CMakeLists.txt | 144 +++++++++++++++++++++++++++++++++++++++++----------------
+ 1 file changed, 104 insertions(+), 40 deletions(-)
+
+commit ba176d77cbb164b13006516660fc1ff6c59dedb5
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-24 20:05:59 +0800
+
+ CMake: Only build xzdec if decoders are enabled.
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit c99d697df800e9bc47e09facf88bcfdb9e0264a5
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-22 15:42:04 +0800
+
+ Build: Removes redundant check for LZMA1 filter support.
+
+ src/liblzma/lzma/Makefile.inc | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+commit 54a2fd8c850e626343b79c4cc8fcac2f638ec890
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-23 15:14:29 +0200
+
+ CMake: Bump maximum policy version to 3.26.
+
+ It adds only one new policy related to FOLDERS which we don't use.
+ This makes it clear that the code is compatible with the policies
+ up to 3.26.
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 622d0fdc02d5f565c2872d79bc70c669c95c8284
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-21 23:36:00 +0800
+
+ CMake: Conditionally build xz list.* files if decoders are enabled.
+
+ CMakeLists.txt | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+commit 3e2dc523c596cd770a6a7c58cacc0d0d8761e853
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-25 11:46:50 +0800
+
+ CMake: Allow configuring features as cache variables.
+
+ This allows users to change the features they build either in
+ CMakeCache.txt or by using a CMake GUI. The sources built for
+ liblzma are affected by this too, so only the necessary files
+ will be compiled.
+
+ CMakeLists.txt | 528 ++++++++++++++++++++++++++++++++++++++++++---------------
+ 1 file changed, 391 insertions(+), 137 deletions(-)
+
+commit 0c053f97337fa4ead77acefb577e8e86f8ef388d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-21 14:07:51 +0200
+
+ Build: Add a comment that AC_PROG_CC_C99 is needed for Autoconf 2.69.
+
+ It's obsolete in Autoconf >= 2.70 and just an alias for AC_PROG_CC
+ but Autoconf 2.69 requires AC_PROG_CC_C99 to get a C99 compiler.
+
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 915d4f6058d52f84d2b58b0a5f3c8272eaa6c1bd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-21 14:04:37 +0200
+
+ Build: configure.ac: Use AS_IF and AS_CASE where required.
+
+ This makes no functional difference in the generated configure
+ (at least with the Autotools versions I have installed) but this
+ change might prevent future bugs like the one that was just
+ fixed in the commit 5a5bd7f871818029d5ccbe189f087f591258c294.
+
+ configure.ac | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+commit b848c039586ed2cddb6fb033680dac107cc5143f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-21 13:12:03 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit c775ba1602a74f29dbc2088bbe4d02c23fc32ba1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-21 13:11:49 +0200
+
+ Build: Fix --disable-threads breaking the building of shared libs.
+
+ This is broken in the releases 5.2.6 to 5.4.2. A workaround
+ for these releases is to pass EGREP='grep -E' as an argument
+ to configure in addition to --disable-threads.
+
+ The problem appeared when m4/ax_pthread.m4 was updated in
+ the commit 6629ed929cc7d45a11e385f357ab58ec15e7e4ad which
+ introduced the use of AC_EGREP_CPP. AC_EGREP_CPP calls
+ AC_REQUIRE([AC_PROG_EGREP]) to set the shell variable EGREP
+ but this was only executed if POSIX threads were enabled.
+ Libtool code also has AC_REQUIRE([AC_PROG_EGREP]) but Autoconf
+ omits it as AC_PROG_EGREP has already been required earlier.
+ Thus, if not using POSIX threads, the shell variable EGREP
+ would be undefined in the Libtool code in configure.
+
+ ax_pthread.m4 is fine. The bug was in configure.ac which called
+ AX_PTHREAD conditionally in an incorrect way. Using AS_CASE
+ ensures that all AC_REQUIREs get always run.
+
+ Thanks to Frank Busse for reporting the bug.
+ Fixes: https://github.com/tukaani-project/xz/issues/45
+
+ configure.ac | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+commit 0673c9ec98b6bae12b33dc295564514aaa26e2fc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-19 22:45:59 +0200
+
+ liblzma: Silence -Wsign-conversion in SSE2 code in memcmplen.h.
+
+ Thanks to Christian Hesse for reporting the issue.
+ Fixes: https://github.com/tukaani-project/xz/issues/44
+
+ src/liblzma/common/memcmplen.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 6ca8046ecbc7a1c81ee08f544bfd1414819fb2e8
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-18 23:22:06 +0800
+
+ Bump version and soname for 5.4.2.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ce4f246600db10e77fc93d492ea045b4c9830bc6
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-18 22:10:57 +0800
+
+ Add NEWS for 5.4.2.
+
+ NEWS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+
+commit 3634fe330788fc0df217acdb6581031a851600a3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-18 16:00:54 +0200
+
+ Update the copy of GNU GPLv3 from gnu.org to COPYING.GPLv3.
+
+ COPYING.GPLv3 | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 97679d25ce7cb014328f1455bb338903c003d54f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-18 15:51:57 +0200
+
+ Change a few HTTP URLs to HTTPS.
+
+ The xz man page timestamp was intentionally left unchanged.
+
+ INSTALL | 2 +-
+ README | 8 ++++----
+ configure.ac | 2 +-
+ dos/INSTALL.txt | 4 ++--
+ src/liblzma/api/lzma.h | 8 ++++----
+ src/liblzma/check/sha256.c | 2 +-
+ src/xz/xz.1 | 2 +-
+ windows/INSTALL-MinGW.txt | 10 +++++-----
+ 8 files changed, 19 insertions(+), 19 deletions(-)
+
+commit 01a67e89a56c3ebf5f6681bd06f0edc22a1ae594
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-18 00:40:28 +0800
+
+ CMake: Fix typo in a comment.
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5dca3f5cbab31105196c89cd6df0a9bbc3307c05
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-17 18:36:22 +0200
+
+ Windows: build.bash: Copy liblzma API docs to the output package.
+
+ windows/build.bash | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit ae252862b30b509ab88b2bbcaa08e8d51b57e928
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-17 08:53:38 +0200
+
+ Windows: Add microlzma_*.c to the VS project files.
+
+ These should have been included in 5.3.2alpha already.
+
+ windows/vs2013/liblzma.vcxproj | 2 ++
+ windows/vs2013/liblzma_dll.vcxproj | 2 ++
+ windows/vs2017/liblzma.vcxproj | 2 ++
+ windows/vs2017/liblzma_dll.vcxproj | 2 ++
+ windows/vs2019/liblzma.vcxproj | 2 ++
+ windows/vs2019/liblzma_dll.vcxproj | 2 ++
+ 6 files changed, 12 insertions(+)
+
+commit 147d282cc3733e2723df82622b6540ddfb52635e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-17 08:43:51 +0200
+
+ CMake: Add microlzma_*.c to the build.
+
+ These should have been included in 5.3.2alpha already.
+
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 4523a5ee29f45c0256af67a15771bc8bbd25ba53
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-17 08:41:36 +0200
+
+ Build: Update comments about unaligned access to mention 64-bit.
+
+ cmake/tuklib_integer.cmake | 7 +++----
+ m4/tuklib_integer.m4 | 4 ++--
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+commit 82aacb40367dc580b09c5a7b270f6c98b63e49b9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-17 00:02:30 +0200
+
+ Tests: Update .gitignore.
+
+ .gitignore | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 5d022c24921eec938604a8cb10d70aa08dbd8575
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-14 20:04:03 +0200
+
+ po4a/update-po: Display the script name consistently in error messages.
+
+ po4a/update-po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 896295117324f323c0b8db6a31ad6ebfaa88793d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-17 01:30:36 +0800
+
+ Doc: Rename Doxygen HTML doc directory name liblzma => api.
+
+ When the docs are installed, calling the directory "liblzma" is
+ confusing since multiple other files in the doc directory are for
+ liblzma. This should also make it more natural for distros when they
+ package the documentation.
+
+ .gitignore | 2 +-
+ Makefile.am | 18 +++++++++---------
+ PACKAGERS | 4 ++--
+ doxygen/Doxyfile | 2 +-
+ doxygen/update-doxygen | 18 +++++++++---------
+ 5 files changed, 22 insertions(+), 22 deletions(-)
+
+commit 94097157fae308b2c1a5edb4e8597c68b45eeaea
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-16 22:07:15 +0800
+
+ liblzma: Remove note from lzma_options_bcj about the ARM64 exception.
+
+ This was left in by mistake since an early version of the ARM64 filter
+ used a different struct for its options.
+
+ src/liblzma/api/lzma/bcj.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit da16d0b73b79d7785ece6f78a577fadd1fb59d0e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-15 19:19:13 +0200
+
+ COPYING: Add a note about the included Doxygen-generated HTML.
+
+ COPYING | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit e57c74f9ef19201f72c106f2c347596f40229936
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-16 21:41:09 +0800
+
+ Doc: Update PACKAGERS with details about liblzma API docs install.
+
+ PACKAGERS | 22 ++++++++++++++++------
+ 1 file changed, 16 insertions(+), 6 deletions(-)
+
+commit 7e2fa48bb73edb25457232e2e62a4f81c6b95281
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-16 21:38:32 +0800
+
+ liblzma: Add set lzma.h as the main page for Doxygen documentation.
+
+ The \mainpage command is used in the first block of comments in lzma.h.
+ This changes the previously nearly empty index.html to use the first
+ comment block in lzma.h for its contents.
+
+ lzma.h is no longer documented separately, but this is for the better
+ since lzma.h only defined a few macros that users do not need to use.
+ The individual API header files all have a disclaimer that they should
+ not be #included directly, so there should be no confusion on the fact
+ that lzma.h should be the only header used by applications.
+
+ Additionally, the note "See ../lzma.h for information about liblzma as
+ a whole." was removed since lzma.h is now the main page of the
+ generated HTML and does not have its own page anymore. So it would be
+ confusing in the HTML version and was only a "nice to have" when
+ browsing the source files.
+
+ src/liblzma/api/lzma.h | 1 +
+ src/liblzma/api/lzma/base.h | 2 --
+ src/liblzma/api/lzma/bcj.h | 2 --
+ src/liblzma/api/lzma/block.h | 2 --
+ src/liblzma/api/lzma/check.h | 2 --
+ src/liblzma/api/lzma/container.h | 2 --
+ src/liblzma/api/lzma/delta.h | 2 --
+ src/liblzma/api/lzma/filter.h | 2 --
+ src/liblzma/api/lzma/hardware.h | 2 --
+ src/liblzma/api/lzma/index.h | 2 --
+ src/liblzma/api/lzma/index_hash.h | 4 +---
+ src/liblzma/api/lzma/lzma12.h | 2 --
+ src/liblzma/api/lzma/stream_flags.h | 2 --
+ src/liblzma/api/lzma/version.h | 2 --
+ src/liblzma/api/lzma/vli.h | 2 --
+ 15 files changed, 2 insertions(+), 29 deletions(-)
+
+commit d42977c7acfdf7fd9acc8803cf411eca7dc10478
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-16 21:37:32 +0800
+
+ Build: Generate doxygen documentation in autogen.sh.
+
+ Another command line option (--no-doxygen) was added to disable
+ creating the doxygen documenation in cases where it not wanted or
+ if the doxygen tool is not installed.
+
+ autogen.sh | 35 +++++++++++++++++++++++++++++------
+ 1 file changed, 29 insertions(+), 6 deletions(-)
+
+commit 8fc712fcf41d821069c670f22b8bf628e7a4a877
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-16 21:35:55 +0800
+
+ Build: Create doxygen/update-doxygen script.
+
+ This is a helper script to generate the Doxygen documentation. It can be
+ run in 'liblzma' or 'internal' mode by setting the first argument. It
+ will default to 'liblzma' mode and only generate documentation for the
+ liblzma API header files.
+
+ The helper script will be run during the custom mydist hook when we
+ create releases. This hook already alters the source directory, so its
+ fine to do it here too. This way, we can include the Doxygen generated
+ files in the distrubtion and when installing.
+
+ In 'liblzma' mode, the JavaScript is stripped from the .html files and
+ the .js files are removed. This avoids license hassle from jQuery and
+ other libraries that Doxygen 1.9.6 puts into jquery.js in minified form.
+
+ Makefile.am | 1 +
+ doxygen/update-doxygen | 111 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 112 insertions(+)
+
+commit 77d2c025d19fbac7277c63239cfb1338f02c66c0
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-03-16 21:34:36 +0800
+
+ Build: Install Doxygen docs and include in distribution if generated.
+
+ Added a install-data-local target to install the Doxygen documentation
+ only when it has been generated. In order to correctly remove the docs,
+ a corresponding uninstall-local target was added.
+
+ If the doxygen docs exist in the source tree, they will also be included
+ in the distribution now too.
+
+ Makefile.am | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 9af8f6f947a43974a4ff025f4c896f2fb4c91b4f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-03 20:37:30 +0800
+
+ Doxygen: Refactor Doxyfile.in to doxygen/Doxyfile.
+
+ Instead of having Doxyfile.in configured by Autoconf, the Doxyfile
+ can have the tags that need to be configured piped into the doxygen
+ command through stdin with the overrides after Doxyfile's contents.
+
+ Going forward, the documentation should be generated in two different
+ modes: liblzma or internal.
+
+ liblzma is useful for most users. It is the documentation for just
+ the liblzma API header files. This is the default.
+
+ internal is for people who want to understand how xz and liblzma work.
+ It might be useful for people who want to contribute to the project.
+
+ .gitignore | 3 +-
+ Doxyfile.in | 1234 -------------------------
+ Makefile.am | 1 -
+ configure.ac | 1 -
+ doxygen/Doxyfile | 2684 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 2686 insertions(+), 1237 deletions(-)
+
+commit 1c558a26928b753fcf1c0d4bce9c0643285edd86
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-28 23:22:36 +0800
+
+ Tests: Remove unused macros and functions.
+
+ tests/tests.h | 75 -----------------------------------------------------------
+ 1 file changed, 75 deletions(-)
+
+commit 7479a69a45a1b8fdb9a209e11f247dce11ac1ba0
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-12 22:29:07 +0800
+
+ Tests: Refactors existing lzma_index tests.
+
+ Converts the existing lzma_index tests into tuktests and covers every
+ API function from index.h except for lzma_file_info_decoder, which can
+ be tested in the future.
+
+ tests/test_index.c | 2036 ++++++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 1492 insertions(+), 544 deletions(-)
+
+commit fd56d5353360279c10e8e5e05f5bc6ea03f64584
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-07 19:59:23 +0200
+
+ xz: Make Capsicum sandbox more strict with stdin and stdout.
+
+ src/xz/file_io.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+commit d1bdaaebc68cae7f0ba457fa990b520df2186fd1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-03-11 19:31:40 +0200
+
+ xz: Don't fail if Capsicum is enabled but kernel doesn't support it.
+
+ (This commit combines related commits from the master branch.)
+
+ If Capsicum support is missing from the kernel or xz is being run
+ in an emulator that lacks Capsicum suport, the syscalls will fail
+ and set errno to ENOSYS. Previously xz would display and error and
+ exit, making xz unusable. Now it will check for ENOSYS and run
+ without sandbox support. Other tools like ssh behave similarly.
+
+ Displaying a warning for missing Capsicum support was considered
+ but such extra output would quickly become annoying. It would also
+ break test_scripts.sh in "make check".
+
+ Also move cap_enter() to be the first step instead of the last one.
+ This matches the example in the cap_rights_limit(2) man page. With
+ the current code it shouldn't make any practical difference though.
+
+ Thanks to Xin Li for the bug report, suggesting a fix, and testing:
+ https://github.com/tukaani-project/xz/pull/43
+
+ Thanks to Jia Tan for most of the original commits.
+
+ src/xz/file_io.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+commit 5d351c69c19d212ddd2cf1f3bdb24900820c6776
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-04 21:06:35 +0800
+
+ Build: Adjust CMake version search regex.
+
+ Now, the LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, and LZMA_VERSION_PATCH
+ macros do not need to be on consecutive lines in version.h. They can be
+ separated by more whitespace, comments, or even other content, as long
+ as they appear in the proper order (major, minor, patch).
+
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit b82d4831e3f2339c4cdbc47776c99462088c11b7
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-26 09:50:21 +0800
+
+ liblzma: Improve documentation for version.h.
+
+ Specified parameter and return values for API functions and documented
+ a few more of the macros.
+
+ src/liblzma/api/lzma/version.h | 29 ++++++++++++++++++++++-------
+ 1 file changed, 22 insertions(+), 7 deletions(-)
+
+commit 2caba3efe3e0c2d7c6dca00e22c56812326a34e6
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-24 23:46:23 +0800
+
+ liblzma: Clarify lzma_lzma_preset() documentation in lzma12.h.
+
+ lzma_lzma_preset() does not guarentee that the lzma_options_lzma are
+ usable in an encoder even if it returns false (success). If liblzma
+ is built with default configurations, then the options will always be
+ usable. However if the match finders hc3, hc4, or bt4 are disabled, then
+ the options may not be usable depending on the preset level requested.
+
+ The documentation was updated to reflect this complexity, since this
+ behavior was unclear before.
+
+ src/liblzma/api/lzma/lzma12.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 594f904673ba55a833adfa60bbab6b60d4902d08
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-02-27 18:38:35 +0200
+
+ CMake: Require that the C compiler supports C99 or a newer standard.
+
+ Thanks to autoantwort for reporting the issue and suggesting
+ a different patch:
+ https://github.com/tukaani-project/xz/pull/42
+
+ CMakeLists.txt | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+commit 88101143cb774bca6b7006c8335b09dc3f334140
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-24 18:10:37 +0800
+
+ Tests: Small tweak to test-vli.c.
+
+ The static global variables can be disabled if encoders and decoders
+ are not built. If they are not disabled and -Werror is used, it will
+ cause an usused warning as an error.
+
+ tests/test_vli.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 4042dbf03a06e019ccdd1e9d1b94cf613d62d5a9
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-06 21:46:43 +0800
+
+ liblzma: Replace '\n' -> newline in filter.h documentation.
+
+ The '\n' renders as a newline when the comments are converted to html
+ by Doxygen.
+
+ src/liblzma/api/lzma/filter.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3971f5c5024750ce8286891c6f79ae1661047483
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-06 21:45:37 +0800
+
+ liblzma: Shorten return description for two functions in filter.h.
+
+ Shorten the description for lzma_raw_encoder_memusage() and
+ lzma_raw_decoder_memusage().
+
+ src/liblzma/api/lzma/filter.h | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+commit 5e61b39432752b6cd1a7b518f0f9e4f0c3f0f242
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-06 21:44:45 +0800
+
+ liblzma: Reword a few lines in filter.h
+
+ src/liblzma/api/lzma/filter.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit 8a53533869defa1191b41f176a0312cb53a139e2
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-06 21:35:06 +0800
+
+ liblzma: Improve documentation in filter.h.
+
+ All functions now explicitly specify parameter and return values.
+ The notes and code annotations were moved before the parameter and
+ return value descriptions for consistency.
+
+ Also, the description above lzma_filter_encoder_is_supported() about
+ not being able to list available filters was removed since
+ lzma_str_list_filters() will do this.
+
+ src/liblzma/api/lzma/filter.h | 226 ++++++++++++++++++++++++++----------------
+ 1 file changed, 143 insertions(+), 83 deletions(-)
+
+commit 6d05b08b17ac8cb93165ee8f310fdd925b0b258f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-02-23 20:46:16 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit dfc9a54082e0fc7b3b796ea15336b5075acc79d5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-02-21 22:57:10 +0200
+
+ liblzma: Avoid null pointer + 0 (undefined behavior in C).
+
+ In the C99 and C17 standards, section 6.5.6 paragraph 8 means that
+ adding 0 to a null pointer is undefined behavior. As of writing,
+ "clang -fsanitize=undefined" (Clang 15) diagnoses this. However,
+ I'm not aware of any compiler that would take advantage of this
+ when optimizing (Clang 15 included). It's good to avoid this anyway
+ since compilers might some day infer that pointer arithmetic implies
+ that the pointer is not NULL. That is, the following foo() would then
+ unconditionally return 0, even for foo(NULL, 0):
+
+ void bar(char *a, char *b);
+
+ int foo(char *a, size_t n)
+ {
+ bar(a, a + n);
+ return a == NULL;
+ }
+
+ In contrast to C, C++ explicitly allows null pointer + 0. So if
+ the above is compiled as C++ then there is no undefined behavior
+ in the foo(NULL, 0) call.
+
+ To me it seems that changing the C standard would be the sane
+ thing to do (just add one sentence) as it would ensure that a huge
+ amount of old code won't break in the future. Based on web searches
+ it seems that a large number of codebases (where null pointer + 0
+ occurs) are being fixed instead to be future-proof in case compilers
+ will some day optimize based on it (like making the above foo(NULL, 0)
+ return 0) which in the worst case will cause security bugs.
+
+ Some projects don't plan to change it. For example, gnulib and thus
+ many GNU tools currently require that null pointer + 0 is defined:
+
+ https://lists.gnu.org/archive/html/bug-gnulib/2021-11/msg00000.html
+
+ https://www.gnu.org/software/gnulib/manual/html_node/Other-portability-assumptions.html
+
+ In XZ Utils null pointer + 0 issue should be fixed after this
+ commit. This adds a few if-statements and thus branches to avoid
+ null pointer + 0. These check for size > 0 instead of ptr != NULL
+ because this way bugs where size > 0 && ptr == NULL will likely
+ get caught quickly. None of them are in hot spots so it shouldn't
+ matter for performance.
+
+ A little less readable version would be replacing
+
+ ptr + offset
+
+ with
+
+ offset != 0 ? ptr + offset : ptr
+
+ or creating a macro for it:
+
+ #define my_ptr_add(ptr, offset) \
+ ((offset) != 0 ? ((ptr) + (offset)) : (ptr))
+
+ Checking for offset != 0 instead of ptr != NULL allows GCC >= 8.1,
+ Clang >= 7, and Clang-based ICX to optimize it to the very same code
+ as ptr + offset. That is, it won't create a branch. So for hot code
+ this could be a good solution to avoid null pointer + 0. Unfortunately
+ other compilers like ICC 2021 or MSVC 19.33 (VS2022) will create a
+ branch from my_ptr_add().
+
+ Thanks to Marcin Kowalczyk for reporting the problem:
+ https://github.com/tukaani-project/xz/issues/36
+
+ src/liblzma/common/block_decoder.c | 5 ++++-
+ src/liblzma/common/block_encoder.c | 7 +++++--
+ src/liblzma/common/common.c | 20 ++++++++++++++------
+ src/liblzma/common/index_decoder.c | 13 ++++++++++---
+ src/liblzma/common/index_encoder.c | 11 +++++++++--
+ src/liblzma/common/index_hash.c | 13 ++++++++++---
+ src/liblzma/common/lzip_decoder.c | 6 +++++-
+ src/liblzma/delta/delta_decoder.c | 7 ++++++-
+ src/liblzma/delta/delta_encoder.c | 12 ++++++++++--
+ src/liblzma/simple/simple_coder.c | 6 ++++--
+ 10 files changed, 77 insertions(+), 23 deletions(-)
+
+commit f6dce49cb656b358e2fb2a3032e35e20af34dc84
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-07 00:00:44 +0800
+
+ liblzma: Adjust container.h for consistency with filter.h.
+
+ src/liblzma/api/lzma/container.h | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+commit 173d240bb4763aedc8c01df4d9c83e311d954c33
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-07 00:00:09 +0800
+
+ liblzma: Fix small typos and reword a few things in filter.h.
+
+ src/liblzma/api/lzma/container.h | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+commit 17797bacde3f7264048ef0976c137a600148d6cf
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-06 23:42:08 +0800
+
+ liblzma: Convert list of flags in lzma_mt to bulleted list.
+
+ src/liblzma/api/lzma/container.h | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+commit 37da0e727161b401b8bfd8dccf163a4b2fc0460b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-26 23:17:41 +0800
+
+ liblzma: Fix typo in documentation in container.h
+
+ lzma_microlzma_decoder -> lzma_microlzma_encoder
+
+ src/liblzma/api/lzma/container.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b8331077c626e6bf14f4671d09b561146eaf816a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-26 23:16:34 +0800
+
+ liblzma: Improve documentation for container.h
+
+ Standardizing each function to always specify parameters and return
+ values. Also moved the parameters and return values to the end of each
+ function description.
+
+ src/liblzma/api/lzma/container.h | 146 +++++++++++++++++++++++++--------------
+ 1 file changed, 93 insertions(+), 53 deletions(-)
+
+commit b9a3511bb61d3b6ce49abd33dce6155a573f5272
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-22 20:59:41 +0800
+
+ CMake: Add LZIP decoder test to list of tests.
+
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit cd82ef2fb48b174c57cd03b84a9a0f978772cb89
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-02-17 20:56:49 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 076e911ba25cadf2cbdfbd0f65991a002e210c0b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-02-17 20:48:28 +0200
+
+ Build: Use only the generic symbol versioning on MicroBlaze.
+
+ On MicroBlaze, GCC 12 is broken in sense that
+ __has_attribute(__symver__) returns true but it still doesn't
+ support the __symver__ attribute even though the platform is ELF
+ and symbol versioning is supported if using the traditional
+ __asm__(".symver ...") method. Avoiding the traditional method is
+ good because it breaks LTO (-flto) builds with GCC.
+
+ See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766
+
+ For now the only extra symbols in liblzma_linux.map are the
+ compatibility symbols with the patch that spread from RHEL/CentOS 7.
+ These require the use of __symver__ attribute or __asm__(".symver ...")
+ in the C code. Compatibility with the patch from CentOS 7 doesn't
+ seem valuable on MicroBlaze so use liblzma_generic.map on MicroBlaze
+ instead. It doesn't require anything special in the C code and thus
+ no LTO issues either.
+
+ An alternative would be to detect support for __symver__
+ attribute in configure.ac and CMakeLists.txt and fall back
+ to __asm__(".symver ...") but then LTO would be silently broken
+ on MicroBlaze. It sounds likely that MicroBlaze is a special
+ case so let's treat it as a such because that is simpler. If
+ a similar issue exists on some other platform too then hopefully
+ someone will report it and this can be reconsidered.
+
+ (This doesn't do the same fix in CMakeLists.txt. Perhaps it should
+ but perhaps CMake build of liblzma doesn't matter much on MicroBlaze.
+ The problem breaks the build so it's easy to notice and can be fixed
+ later.)
+
+ Thanks to Vincent Fazio for reporting the problem and proposing
+ a patch (in the end that solution wasn't used):
+ https://github.com/tukaani-project/xz/pull/32
+
+ configure.ac | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+commit bc34e5ac9996667d2c1ec9a7895ec5931ac4caea
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-02-16 21:09:00 +0200
+
+ liblzma: Very minor API doc tweaks.
+
+ Use "member" to refer to struct members as that's the term used
+ by the C standard.
+
+ Use lzma_options_delta.dist and such in docs so that in Doxygen's
+ HTML output they will link to the doc of the struct member.
+
+ Clean up a few trailing white spaces too.
+
+ src/liblzma/api/lzma/block.h | 6 +++---
+ src/liblzma/api/lzma/delta.h | 6 +++---
+ src/liblzma/api/lzma/index.h | 10 +++++-----
+ src/liblzma/api/lzma/stream_flags.h | 6 +++---
+ 4 files changed, 14 insertions(+), 14 deletions(-)
+
+commit d31fbd28be5b79eb682db50004b0fb7aad5299ec
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-17 00:54:33 +0800
+
+ liblzma: Adjust spacing in doc headers in bcj.h.
+
+ src/liblzma/api/lzma/bcj.h | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+commit 701e9be6bede19771895f756082db0c017f86f07
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-17 00:44:44 +0800
+
+ liblzma: Adjust documentation in bcj.h for consistent style.
+
+ src/liblzma/api/lzma/bcj.h | 43 ++++++++++++++++++++++---------------------
+ 1 file changed, 22 insertions(+), 21 deletions(-)
+
+commit 762c4d0b62d2694cf3a01e030fdfe68e09e7b503
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-17 00:36:05 +0800
+
+ liblzma: Rename field => member in documentation.
+
+ Also adjusted preset value => preset level.
+
+ src/liblzma/api/lzma/base.h | 18 +++++++--------
+ src/liblzma/api/lzma/block.h | 44 ++++++++++++++++++-------------------
+ src/liblzma/api/lzma/container.h | 26 +++++++++++-----------
+ src/liblzma/api/lzma/delta.h | 12 +++++-----
+ src/liblzma/api/lzma/index.h | 30 ++++++++++++-------------
+ src/liblzma/api/lzma/lzma12.h | 28 +++++++++++------------
+ src/liblzma/api/lzma/stream_flags.h | 32 +++++++++++++--------------
+ 7 files changed, 95 insertions(+), 95 deletions(-)
+
+commit 0ce1db0223854d94b4a0d17737ac0486a75d9e6a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-02-16 17:59:50 +0200
+
+ liblzma: Silence a warning from MSVC.
+
+ It gives C4146 here since unary minus with unsigned integer
+ is still unsigned (which is the intention here). Doing it
+ with substraction makes it clearer and avoids the warning.
+
+ Thanks to Nathan Moinvaziri for reporting this.
+
+ src/liblzma/check/crc64_fast.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d83da006b3e8dbad9112e6cde6b27049d193c9ec
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-16 21:04:54 +0800
+
+ liblzma: Improve documentation for stream_flags.h
+
+ Standardizing each function to always specify parameters and return
+ values. Also moved the parameters and return values to the end of each
+ function description.
+
+ A few small things were reworded and long sentences broken up.
+
+ src/liblzma/api/lzma/stream_flags.h | 76 ++++++++++++++++++++++---------------
+ 1 file changed, 46 insertions(+), 30 deletions(-)
+
+commit 2796bb4736f645d34939b5d62d5958f534e41e69
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-14 21:50:16 +0800
+
+ liblzma: Improve documentation in lzma12.h.
+
+ All functions now explicitly specify parameter and return values.
+
+ src/liblzma/api/lzma/lzma12.h | 32 +++++++++++++++++++++++---------
+ 1 file changed, 23 insertions(+), 9 deletions(-)
+
+commit ebebaa8d9381afea440eb1b01917117551adf68f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-27 22:44:06 +0800
+
+ liblzma: Improve documentation in check.h.
+
+ All functions now explicitly specify parameter and return values.
+ Also moved the note about SHA-256 functions not being exported to the
+ top of the file.
+
+ src/liblzma/api/lzma/check.h | 41 ++++++++++++++++++++++++++++-------------
+ 1 file changed, 28 insertions(+), 13 deletions(-)
+
+commit 765fa2865aab97ea713c1715922e322b3cf599a7
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-08 21:33:52 +0800
+
+ liblzma: Improve documentation in index.h
+
+ All functions now explicitly specify parameter and return values.
+
+ src/liblzma/api/lzma/index.h | 177 ++++++++++++++++++++++++++++++-------------
+ 1 file changed, 126 insertions(+), 51 deletions(-)
+
+commit 918e208af5960728b6def01e692b395f7d8e3701
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-08 20:35:32 +0800
+
+ liblzma: Reword a comment in index.h.
+
+ src/liblzma/api/lzma/index.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 1f157d214bc09338876d2467b549935679abc0bf
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-08 20:30:23 +0800
+
+ liblzma: Omit lzma_index_iter's internal field from Doxygen docs.
+
+ Add \private above this field and its sub-fields since it is not meant
+ to be modified by users.
+
+ src/liblzma/api/lzma/index.h | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+commit 28757fa46d8e0f0a9c17628b2b6af9bcb3cd96fc
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-21 21:32:03 +0800
+
+ liblzma: Fix documentation for LZMA_MEMLIMIT_ERROR.
+
+ LZMA_MEMLIMIT_ERROR was missing the "<" character needed to put
+ documentation after a member.
+
+ src/liblzma/api/lzma/base.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 135d5a1a65a9e199b9a5550c1f788cf43cd81018
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-21 00:29:38 +0800
+
+ liblzma: Improve documentation for base.h.
+
+ Standardizing each function to always specify params and return values.
+ Also fixed a small grammar mistake.
+
+ src/liblzma/api/lzma/base.h | 30 +++++++++++++++++++++++++-----
+ 1 file changed, 25 insertions(+), 5 deletions(-)
+
+commit 2287d5668384e289d51e72724997dc920483768e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-14 00:08:33 +0800
+
+ liblzma: Minor improvements to vli.h.
+
+ Added [out] annotations to parameters that are pointers and can have
+ their value changed. Also added a clarification to lzma_vli_is_valid.
+
+ src/liblzma/api/lzma/vli.h | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+commit 7124b8a16ae60cb2e93218ff531868eebd673bde
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-10 21:38:02 +0800
+
+ liblzma: Add comments for macros in delta.h.
+
+ Document LZMA_DELTA_DIST_MIN and LZMA_DELTA_DIST_MAX for completeness
+ and to avoid Doxygen warnings.
+
+ src/liblzma/api/lzma/delta.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+commit 59c7bb8931159fdb1a31bbbeaed0e6984e2d3c81
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-10 21:35:23 +0800
+
+ liblzma: Improve documentation in index_hash.h.
+
+ All functions now explicitly specify parameter and return values.
+ Also reworded the description of lzma_index_hash_init() for readability.
+
+ src/liblzma/api/lzma/index_hash.h | 36 +++++++++++++++++++++++++++---------
+ 1 file changed, 27 insertions(+), 9 deletions(-)
+
+commit e970c28ac3cb2e8051925f81db2fe953664c2645
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:33:32 +0800
+
+ liblzma: Fix bug in lzma_str_from_filters() not checking filters[] length.
+
+ The bug is only a problem in applications that do not properly terminate
+ the filters[] array with LZMA_VLI_UNKNOWN or have more than
+ LZMA_FILTERS_MAX filters. This bug does not affect xz.
+
+ src/liblzma/common/string_conversion.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+commit 85e01266a96689448abb249da6c6abc3afcd4a4e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:32:47 +0800
+
+ Tests: Create test_filter_str.c.
+
+ Tests lzma_str_to_filters(), lzma_str_from_filters(), and
+ lzma_str_list_filters() API functions.
+
+ CMakeLists.txt | 1 +
+ tests/Makefile.am | 2 +
+ tests/test_filter_str.c | 593 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 596 insertions(+)
+
+commit 3fa0f3ba12dd3383f62dbfa18a864f9b4217fa0a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-22 08:49:00 +0800
+
+ liblzma: Fix typos in comments in string_conversion.c.
+
+ src/liblzma/common/string_conversion.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 32dbe045d74e94f75c53236fa2a6c0454d7b6d9e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:20:20 +0800
+
+ liblzma: Clarify block encoder and decoder documentation.
+
+ Added a few sentences to the description for lzma_block_encoder() and
+ lzma_block_decoder() to highlight that the Block Header must be coded
+ before calling these functions.
+
+ src/liblzma/api/lzma/block.h | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+commit ccf12acbfa7331b1bbb99ec55879186eb35f879f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:12:24 +0800
+
+ Update lzma_block documentation for lzma_block_uncomp_encode().
+
+ src/liblzma/api/lzma/block.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 6a0b168dd9dc1ef437255c4bfdc6eff8b96fdb24
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:11:37 +0800
+
+ liblzma: Minor edits to lzma_block header_size documentation.
+
+ src/liblzma/api/lzma/block.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 84ce36f90e68471fec1f0e61cd93ac7ed9ab4883
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:11:07 +0800
+
+ liblzma: Enumerate functions that read version in lzma_block.
+
+ src/liblzma/api/lzma/block.h | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+commit d6620774682830d606f57109861b6763805b3492
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:10:34 +0800
+
+ liblzma: Clarify comment in block.h.
+
+ src/liblzma/api/lzma/block.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 880adb5aa25f66a53d81c2f3acc716f7a4d373d1
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-03 00:07:23 +0800
+
+ liblzma: Improve documentation for block.h.
+
+ Standardizing each function to always specify params and return values.
+ Output pointer parameters are also marked with doxygen style [out] to
+ make it clear. Any note sections were also moved above the parameter and
+ return sections for consistency.
+
+ src/liblzma/api/lzma/block.h | 96 ++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 75 insertions(+), 21 deletions(-)
+
+commit b5b1b1f061c342271e4977ce5cba604a19c0ca52
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-02-01 23:38:30 +0800
+
+ liblzma: Clarify a comment about LZMA_STR_NO_VALIDATION.
+
+ The flag description for LZMA_STR_NO_VALIDATION was previously confusing
+ about the treatment for filters than cannot be used with .xz format
+ (lzma1) without using LZMA_STR_ALL_FILTERS. Now, it is clear that
+ LZMA_STR_NO_VALIDATION is not a super set of LZMA_STR_ALL_FILTERS.
+
+ src/liblzma/api/lzma/filter.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit e904e778b82b14f2779aab80d6c8f3c01a3fc54b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-27 20:14:51 +0800
+
+ Translations: Add Brazilian Portuguese translation of man pages.
+
+ Thanks to Rafael Fontenelle.
+
+ po4a/po4a.conf | 2 +-
+ po4a/pt_BR.po | 3677 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 3678 insertions(+), 1 deletion(-)
+
+commit e9c47e79c9584ba1126f5fa0dbe6c96e67411aa6
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-24 20:48:50 +0800
+
+ liblzma: Fix documentation in filter.h for lzma_str_to_filters()
+
+ The previous documentation for lzma_str_to_filters() was technically
+ correct, but misleading. lzma_str_to_filters() returns NULL on success,
+ which is in practice always defined to 0. This is the same value as
+ LZMA_OK, but lzma_str_to_filters() does not return lzma_ret so we should
+ be more clear.
+
+ src/liblzma/api/lzma/filter.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 99575947a58a60416c570eb78038d18a1ea4cef4
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-07 21:55:06 +0800
+
+ xz: Refactor duplicated check for custom suffix when using --format=raw
+
+ src/xz/args.c | 8 ++++++++
+ src/xz/suffix.c | 26 ++++++++------------------
+ src/xz/suffix.h | 8 ++++++++
+ 3 files changed, 24 insertions(+), 18 deletions(-)
+
+commit 76dec92fcca4a9ccd2063ed6d5d9e3474665baad
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-20 21:53:14 +0800
+
+ liblzma: Set documentation on all reserved fields to private.
+
+ This prevents the reserved fields from being part of the generated
+ Doxygen documentation.
+
+ src/liblzma/api/lzma/base.h | 17 +++++++++++++++
+ src/liblzma/api/lzma/block.h | 43 +++++++++++++++++++++++++++++++++++++
+ src/liblzma/api/lzma/container.h | 24 +++++++++++++++++++++
+ src/liblzma/api/lzma/delta.h | 12 +++++++++++
+ src/liblzma/api/lzma/index.h | 27 +++++++++++++++++++++++
+ src/liblzma/api/lzma/lzma12.h | 22 +++++++++++++++++++
+ src/liblzma/api/lzma/stream_flags.h | 28 ++++++++++++++++++++++++
+ 7 files changed, 173 insertions(+)
+
+commit bd213d06ebf92cf42eeb97e7c578bddc857f8ea8
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-21 23:59:43 +0800
+
+ liblzma: Highlight liblzma API headers should not be included directly.
+
+ This improves the generated Doxygen HTML files to better highlight
+ how to properly use the liblzma API header files.
+
+ src/liblzma/api/lzma/base.h | 5 +++--
+ src/liblzma/api/lzma/bcj.h | 5 +++--
+ src/liblzma/api/lzma/block.h | 5 +++--
+ src/liblzma/api/lzma/check.h | 5 +++--
+ src/liblzma/api/lzma/container.h | 5 +++--
+ src/liblzma/api/lzma/delta.h | 5 +++--
+ src/liblzma/api/lzma/filter.h | 5 +++--
+ src/liblzma/api/lzma/hardware.h | 5 +++--
+ src/liblzma/api/lzma/index.h | 5 +++--
+ src/liblzma/api/lzma/index_hash.h | 5 +++--
+ src/liblzma/api/lzma/lzma12.h | 5 +++--
+ src/liblzma/api/lzma/stream_flags.h | 5 +++--
+ src/liblzma/api/lzma/version.h | 5 +++--
+ src/liblzma/api/lzma/vli.h | 5 +++--
+ 14 files changed, 42 insertions(+), 28 deletions(-)
+
+commit 257dbff0ba1a7bc45a74d203ece015c9f70c88cd
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-19 20:35:09 +0800
+
+ tuklib_physmem: Silence warning from -Wcast-function-type on MinGW-w64.
+
+ tuklib_physmem depends on GetProcAddress() for both MSVC and MinGW-w64
+ to retrieve a function address. The proper way to do this is to cast the
+ return value to the type of function pointer retrieved. Unfortunately,
+ this causes a cast-function-type warning, so the best solution is to
+ simply ignore the warning.
+
+ src/common/tuklib_physmem.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 720ad4a44282a7ee59aa9920eaf495d85d245d97
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-16 21:35:45 +0800
+
+ xz: Add missing comment for coder_set_compression_settings()
+
+ src/xz/coder.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 88dc19163421282369c0989e997c05f9a447edc6
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-16 20:55:10 +0800
+
+ xz: Do not set compression settings with raw format in list mode.
+
+ Calling coder_set_compression_settings() in list mode with verbose mode
+ on caused the filter chain and memory requirements to print. This was
+ unnecessary since the command results in an error and not consistent
+ with other formats like lzma and alone.
+
+ src/xz/args.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 039e0ab13efb144642f9d99eeeb9c668e76bb430
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-13 20:37:06 +0800
+
+ Translations: Update the Brazilian Portuguese translation.
+
+ po/pt_BR.po | 603 ++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 344 insertions(+), 259 deletions(-)
+
+commit 718f7a60e740b26b8353965edaaddc7d4deb4d85
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 13:04:05 +0200
+
+ Build: Omit -Wmissing-noreturn from the default warnings.
+
+ It's not that important. It can be annoying in builds that
+ disable many features since in those cases the tests programs
+ will correctly trigger this warning with Clang.
+
+ configure.ac | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 3ccedb09724c998c39d708c945f6da5852c39e13
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 06:05:58 +0200
+
+ xz: Use ssize_t for the to-be-ignored return value from write(fd, ptr, 1).
+
+ It makes no difference here as the return value fits into an int
+ too and it then gets ignored but this looks better.
+
+ src/xz/file_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 09fbd2f0527def89e839c8907de4fe7ef6bc5019
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 06:01:12 +0200
+
+ xz: Silence warnings from -Wsign-conversion in a 32-bit build.
+
+ src/common/tuklib_mbstr_fw.c | 2 +-
+ src/xz/list.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 683d3f178ef1487b5418be49f331b0131a101b40
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 05:38:48 +0200
+
+ liblzma: Silence another warning from -Wsign-conversion in a 32-bit build.
+
+ It doesn't warn on a 64-bit system because truncating
+ a ptrdiff_t (signed long) to uint32_t is diagnosed under
+ -Wconversion by GCC and -Wshorten-64-to-32 by Clang.
+
+ src/liblzma/lz/lz_encoder_mf.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 2b8062ef94a38d0f9ad0d1b309e8748db52f5c15
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 04:46:45 +0200
+
+ liblzma: Silence a warning from -Wsign-conversion in a 32-bit build.
+
+ src/common/mythread.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit b16b9c0d22227012518595c2222facc73bd833a8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 04:17:24 +0200
+
+ Build: Make configure add more warning flags for GCC and Clang.
+
+ -Wstrict-aliasing was removed from the list since it is enabled
+ by -Wall already.
+
+ A normal build is clean with these on GNU/Linux x86-64 with
+ GCC 12.2.0 and Clang 14.0.6.
+
+ configure.ac | 36 +++++++++++++++++++++++++++++++-----
+ 1 file changed, 31 insertions(+), 5 deletions(-)
+
+commit c47ecd6d3909d0d3ff48dfd6e2ee41e7c7130b94
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 04:14:18 +0200
+
+ Tests: Fix warnings from clang --Wassign-enum.
+
+ Explicitly casting the integer to lzma_check silences the warning.
+ Since such an invalid value is needed in multiple tests, a constant
+ INVALID_LZMA_CHECK_ID was added to tests.h.
+
+ The use of 0x1000 for lzma_block.check wasn't optimal as if
+ the underlying type is a char then 0x1000 will be truncated to 0.
+ However, in these test cases the value is ignored, thus even with
+ such truncation the test would have passed.
+
+ tests/test_block_header.c | 6 +++---
+ tests/test_check.c | 2 +-
+ tests/test_stream_flags.c | 8 ++++----
+ tests/tests.h | 9 +++++++++
+ 4 files changed, 17 insertions(+), 8 deletions(-)
+
+commit 34e13ce015232968731de2a9ec3440a08b0084b1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 03:51:07 +0200
+
+ Tests: Silence warnings from -Wsign-conversion.
+
+ Note that assigning an unsigned int to lzma_check doesn't warn
+ on GNU/Linux x86-64 since the enum type is unsigned on that
+ platform. The enum can be signed on some other platform though
+ so it's best to use enumeration type lzma_check in these situations.
+
+ tests/test_check.c | 6 +++---
+ tests/test_stream_flags.c | 10 +++++-----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+commit 6671d0fe46b77f0fafce860836b7a12dc3cda14a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 03:19:59 +0200
+
+ liblzma: Silence warnings from clang -Wconditional-uninitialized.
+
+ This is similar to 2ce4f36f179a81d0c6e182a409f363df759d1ad0.
+ The actual initialization of the variables is done inside
+ mythread_sync() macro. Clang doesn't seem to see that
+ the initialization code inside the macro is always executed.
+
+ src/liblzma/common/stream_decoder_mt.c | 8 +++++---
+ src/liblzma/common/stream_encoder_mt.c | 2 +-
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+commit d3e833ca1d2abda54648494c33aca73a40a47efe
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 03:11:40 +0200
+
+ Fix warnings from clang -Wdocumentation.
+
+ src/liblzma/check/check.h | 4 ----
+ src/liblzma/lz/lz_encoder_mf.c | 4 ++--
+ src/xz/options.c | 4 ++--
+ 3 files changed, 4 insertions(+), 8 deletions(-)
+
+commit 977dd2e26bc50efec8d30fb90380394042d24558
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 03:04:28 +0200
+
+ Tests: test_lzip_decoder: Remove trailing white-space.
+
+ tests/test_lzip_decoder.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit c55157ed7437ab14f2afb7fecf331e321f2edf9a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-12 03:03:55 +0200
+
+ Tests: test_lzip_decoder: Silence warnings from -Wsign-conversion.
+
+ tests/test_lzip_decoder.c | 13 +++++++------
+ 1 file changed, 7 insertions(+), 6 deletions(-)
+
+commit 18b845e69752c975dfeda418ec00eda22605c2ee
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-11 18:52:54 +0200
+
+ Bump version and soname for 5.4.1.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 4080bbb844fb36701ffb978f0c41ea2c2c9f8960
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-11 23:58:16 +0800
+
+ Add NEWS for 5.4.1.
+
+ NEWS | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 70 insertions(+)
+
+commit 674c89fdb8c457ebc3a0652e235d8b6cd7b7dee2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 11:56:11 +0200
+
+ sysdefs.h: Don't include strings.h anymore.
+
+ On some platforms src/xz/suffix.c may need <strings.h> for
+ strcasecmp() but suffix.c includes the header when it needs it.
+
+ Unless there is an old system that otherwise supports enough C99
+ to build XZ Utils but doesn't have C89/C90-compatible <string.h>,
+ there should be no need to include <strings.h> in sysdefs.h.
+
+ src/common/sysdefs.h | 6 ------
+ 1 file changed, 6 deletions(-)
+
+commit 2a6b938084fac9ddb39cd69c9beeed15c3b6f6f6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 11:23:41 +0200
+
+ xz: Include <strings.h> in suffix.c if needed for strcasecmp().
+
+ SUSv2 and POSIX.1‐2017 declare only a few functions in <strings.h>.
+ Of these, strcasecmp() is used on some platforms in suffix.c.
+ Nothing else in the project needs <strings.h> (at least if
+ building on a modern system).
+
+ sysdefs.h currently includes <strings.h> if HAVE_STRINGS_H is
+ defined and suffix.c relied on this.
+
+ Note that dos/config.h doesn't #define HAVE_STRINGS_H even though
+ DJGPP does have strings.h. It isn't needed with DJGPP as strcasecmp()
+ is also in <string.h> in DJGPP.
+
+ src/xz/suffix.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit aea639e81beb548e3114c74b6d9a894d6e036189
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-11 22:46:48 +0800
+
+ xz: Fix warning -Wformat-nonliteral on clang in message.c.
+
+ clang and gcc differ in how they handle -Wformat-nonliteral. gcc will
+ allow a non-literal format string as long as the function takes its
+ format arguments as a va_list.
+
+ src/xz/message.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+commit e3b42bfcb0f67988beee7c7022fed0361282be45
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-11 20:58:31 +0800
+
+ Tests: Fix test_filter_flags copy/paste error.
+
+ tests/test_filter_flags.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 21625b7e11d004788e40eb5eb88d9d89f65fe347
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-11 20:42:29 +0800
+
+ Tests: Fix type-limits warning in test_filter_flags.
+
+ This only occurs in test_filter_flags when the BCJ filters are not
+ configured and built. In this case, ARRAY_SIZE() returns 0 and causes a
+ type-limits warning with the loop variable since an unsigned number will
+ always be >= 0.
+
+ tests/test_filter_flags.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+commit c337983e928682d56ce3470b286a8d5b8646e0ad
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 22:14:03 +0200
+
+ liblzma: CLMUL CRC64: Work around a bug in MSVC, second attempt.
+
+ This affects only 32-bit x86 builds. x86-64 is OK as is.
+
+ I still cannot easily test this myself. The reporter has tested
+ this and it passes the tests included in the CMake build and
+ performance is good: raw CRC64 is 2-3 times faster than the
+ C version of the slice-by-four method. (Note that liblzma doesn't
+ include a MSVC-compatible version of the 32-bit x86 assembly code
+ for the slice-by-four method.)
+
+ Thanks to Iouri Kharon for figuring out a fix, testing, and
+ benchmarking.
+
+ src/liblzma/check/crc64_fast.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit b7fb438ea0e3ee02e3a164f3b72fae456cbe34d7
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-11 01:18:50 +0800
+
+ Tests: Fix unused function warning in test_block_header.
+
+ One of the global arrays of filters was only used in a test that
+ required both encoders and decoders to be configured in the build.
+
+ tests/test_block_header.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 68e9ef036d18d7c3952bff0b391d5989b86934da
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-11 01:08:03 +0800
+
+ Tests: Fix unused function warning in test_index_hash.
+
+ test_index_hash does not use fill_index_hash() unless both encoders
+ and decoders are configured in the build.
+
+ tests/test_index_hash.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit a387707cd8cdefbffb5b7429bda4b7fcc192954a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 00:33:14 +0200
+
+ Windows: Update INSTALL-MSVC.txt to recommend CMake over project files.
+
+ windows/INSTALL-MSVC.txt | 19 ++++++++++++-------
+ 1 file changed, 12 insertions(+), 7 deletions(-)
+
+commit 52902ad69518255a14b0144f0a2379e06fde5b6e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 12:47:16 +0200
+
+ Revert "liblzma: CLMUL CRC64: Workaround a bug in MSVC (VS2015-2022)."
+
+ This reverts commit 36edc65ab4cf10a131f239acbd423b4510ba52d5.
+
+ It was reported that it wasn't a good enough fix and MSVC
+ still produced (different kind of) bad code when building
+ for 32-bit x86 if optimizations are enabled.
+
+ Thanks to Iouri Kharon.
+
+ src/liblzma/check/crc64_fast.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+commit e81b9fc48ca70f9228308d3f1871cd81f9a5a496
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 10:05:13 +0200
+
+ sysdefs.h: Fix a comment.
+
+ src/common/sysdefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6e89ab58b031aa046308a0b3504ff0a5be042571
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 10:04:06 +0200
+
+ sysdefs.h: Don't include memory.h anymore even if it were available.
+
+ It quite probably was never needed, that is, any system where memory.h
+ was required likely couldn't compile XZ Utils for other reasons anyway.
+
+ XZ Utils 5.2.6 and later source packages were generated using
+ Autoconf 2.71 which no longer defines HAVE_MEMORY_H. So the code
+ being removed is no longer used anyway.
+
+ src/common/sysdefs.h | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+commit 65c59ad429aa59f9df0326d9fc82931ba4a9d123
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-10 08:50:26 +0200
+
+ CMake/Windows: Add a workaround for windres from GNU binutils.
+
+ This is combined from the following commits in the master branch:
+ 443dfebced041adc88f10d824188eeef5b5821a9
+ 6b117d3b1fe91eb26d533ab16a2e552f84148d47
+ 5e34774c31d1b7509b5cb77a3be9973adec59ea0
+
+ Thanks to Iouri Kharon for the bug report, the original patch,
+ and testing.
+
+ CMakeLists.txt | 32 +++++++++++++++++++++++++++++++-
+ 1 file changed, 31 insertions(+), 1 deletion(-)
+
+commit 43521e77acc907863fa4f94aae276366172cb9ee
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-06 22:53:38 +0200
+
+ Tests: test_filter_flags: Clean up minor issues.
+
+ Here are the list of the most significant issues addressed:
+ - Avoid using internal common.h header. It's not good to copy the
+ constants like this but common.h cannot be included for use outside
+ of liblzma. This is the quickest thing to do that could be fixed later.
+
+ - Omit the INIT_FILTER macro. Initialization should be done with just
+ regular designated initializers.
+
+ - Use start_offset = 257 for BCJ tests. It demonstrates that Filter
+ Flags encoder and decoder don't validate the options thoroughly.
+ 257 is valid only for the x86 filter. This is a bit silly but
+ not a significant problem in practice because the encoder and
+ decoder initialization functions will catch bad alignment still.
+ Perhaps this should be fixed but it's not urgent and doesn't need
+ to be in 5.4.x.
+
+ - Various tweaks to comments such as filter id -> Filter ID
+
+ tests/test_filter_flags.c | 153 +++++++++++++++++++++++-----------------------
+ 1 file changed, 78 insertions(+), 75 deletions(-)
+
+commit 6b44cead95d767414272dc3a67898a36bfdf95b3
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-29 23:33:33 +0800
+
+ Tests: Refactors existing filter flags tests.
+
+ Converts the existing filter flags tests into tuktests.
+
+ tests/test_filter_flags.c | 655 ++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 457 insertions(+), 198 deletions(-)
+
+commit 1bbefa9659b202ba31bd244a9d0e4f0d37ff3ed7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-08 00:32:29 +0200
+
+ Tests: tuktest.h: Support tuktest_malloc(0).
+
+ It's not needed in XZ Utils at least for now. It's good to support
+ it still because if such use is needed later, it wouldn't be
+ caught on GNU/Linux since malloc(0) from glibc returns non-NULL.
+
+ tests/tuktest.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit ce3a3fbc7c2c399aeed644d54f3bd56ac914dfee
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-07 21:57:11 +0200
+
+ CMake: Update cmake_minimum_required from 3.13...3.16 to 3.13...3.25.
+
+ The changes listed on cmake-policies(7) for versions 3.17 to 3.25
+ shouldn't affect this project.
+
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 99fcd57f2ea35eaa94e09f674d5364329c880fa2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-08 00:24:23 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit c0c13d9d82eb8a4302c8bbb8b4c5178d285fe9ab
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-07 19:50:35 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 3d45987451b1c3bb42697b29341824c0e5484cba
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-09 11:27:24 +0200
+
+ CMake: Fix a copypaste error in xzdec Windows resource file handling.
+
+ It was my mistake. Thanks to Iouri Kharon for the bug report.
+
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 706bce5018d7cf83094e13454a0731169ec119b5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-07 19:50:03 +0200
+
+ CMake/Windows: Add resource files to xz.exe and xzdec.exe.
+
+ The command line tools cannot be built with MSVC for now but
+ they can be built with MinGW-w64.
+
+ Thanks to Iouri Kharon for the bug report and the original patch.
+
+ CMakeLists.txt | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+commit e96dee55df04113c33b387ccdb6cb70935422d91
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-09 12:22:05 +0200
+
+ liblzma: CLMUL CRC64: Workaround a bug in MSVC (VS2015-2022).
+
+ I haven't tested with MSVC myself and there doesn't seem to be
+ information about the problem online, so I'm relying on the bug report.
+
+ Thanks to Iouri Kharon for the bug report and the patch.
+
+ src/liblzma/check/crc64_fast.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit 52bc1ee34dda9bb6fb40175e5952863066681b77
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-07 19:31:15 +0200
+
+ Build: Require that _mm_set_epi64x() is usable to enable CLMUL support.
+
+ VS2013 doesn't have _mm_set_epi64x() so this way CLMUL gets
+ disabled with VS2013.
+
+ Thanks to Iouri Kharon for the bug report.
+
+ CMakeLists.txt | 3 ++-
+ configure.ac | 8 ++++++--
+ 2 files changed, 8 insertions(+), 3 deletions(-)
+
+commit bad44cfe19e8be8ae76755369be2a34abcd2b4fa
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-29 00:25:18 +0800
+
+ Tests: Creates test_index_hash.c
+
+ Tests all API functions exported from index_hash.h. Does not have a
+ dedicated test for lzma_index_hash_end.
+
+ [Minor edits were made by Lasse Collin.]
+
+ .gitignore | 1 +
+ CMakeLists.txt | 2 +
+ tests/Makefile.am | 3 +
+ tests/test_index_hash.c | 388 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 394 insertions(+)
+
+commit 692ccdf5516dfe55fb6e9c5cdfb31f4c02c1ecd1
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-05 20:57:25 +0800
+
+ liblzma: Remove common.h include from common/index.h.
+
+ common/index.h is needed by liblzma internally and tests. common.h will
+ include and define many things that are not needed by the tests.
+
+ Also, this prevents include order problems because both common.h and
+ lzma.h define LZMA_API. On most platforms it results only in a warning
+ but on Windows it would break the build as the definition in common.h
+ must be used only for building liblzma itself.
+
+ src/liblzma/common/index.c | 1 +
+ src/liblzma/common/index.h | 9 +++++++--
+ src/liblzma/common/index_decoder.h | 1 +
+ src/liblzma/common/stream_buffer_encoder.c | 1 +
+ 4 files changed, 10 insertions(+), 2 deletions(-)
+
+commit 2ac7bafc8f07c1edefe96a4a7a040ddfff0eb5bb
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-08-17 20:20:16 +0800
+
+ liblzma: Add NULL check to lzma_index_hash_append.
+
+ This is for consistency with lzma_index_append.
+
+ src/liblzma/common/index_hash.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit db714d30e0c74d1dd4af1a23ed62b44e0e8e4efc
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-08-17 17:59:51 +0800
+
+ liblzma: Replaced hardcoded 0x0 index indicator byte with macro
+
+ src/liblzma/common/index.h | 3 +++
+ src/liblzma/common/index_decoder.c | 2 +-
+ src/liblzma/common/index_encoder.c | 2 +-
+ src/liblzma/common/index_hash.c | 2 +-
+ src/liblzma/common/stream_decoder.c | 3 ++-
+ src/liblzma/common/stream_decoder_mt.c | 2 +-
+ 6 files changed, 9 insertions(+), 5 deletions(-)
+
+commit 39d2585dcd3e827cfc3c46025ab6708c4aeb36c6
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-06 20:43:31 +0800
+
+ Style: Change #if !defined() to #ifndef in mythread.h.
+
+ src/common/mythread.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3f0130aa288e4ed57ace609517db9700a41223af
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-06 20:35:55 +0800
+
+ Build: Add missing stream_decoder_mt.c to .vcxproj files.
+
+ The line in the .vcxproj files for building with was missing in 5.4.0.
+ Thank to Hajin Jang for reporting the issue.
+
+ windows/vs2013/liblzma.vcxproj | 1 +
+ windows/vs2013/liblzma_dll.vcxproj | 1 +
+ windows/vs2017/liblzma.vcxproj | 1 +
+ windows/vs2017/liblzma_dll.vcxproj | 1 +
+ windows/vs2019/liblzma.vcxproj | 1 +
+ windows/vs2019/liblzma_dll.vcxproj | 1 +
+ 6 files changed, 6 insertions(+)
+
+commit f204d1050a515d17851eed9049862ce5a9c729c1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-04 22:40:54 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 34a9c2d650d6c30bd88e1b21910dd863209aa884
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-04 18:40:28 +0200
+
+ Tests: Adjust style in test_compress.sh.
+
+ tests/test_compress.sh | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+commit 761c208d58e0c3daa0f46e68b406adfc318d2a46
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-04 23:58:58 +0800
+
+ Tests: Replace non portable shell parameter expansion
+
+ The shell parameter expansion using # and ## is not supported in
+ Solaris 10 Bourne shell (/bin/sh). Even though this is POSIX, it is not fully
+ portable, so we should avoid it.
+
+ tests/create_compress_files.c | 2 +-
+ tests/test_compress.sh | 20 +++++++++++++-------
+ tests/test_compress_prepared_bcj_sparc | 2 +-
+ tests/test_compress_prepared_bcj_x86 | 2 +-
+ 4 files changed, 16 insertions(+), 10 deletions(-)
+
+commit 8a7cbc074547e55e57f4f3696f69bedeb05e14c4
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-03 21:02:38 +0800
+
+ Translations: Add Korean translation of man pages.
+
+ Thanks to Seong-ho Cho
+
+ po4a/ko.po | 5552 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ po4a/po4a.conf | 2 +-
+ 2 files changed, 5553 insertions(+), 1 deletion(-)
+
+commit ca2af49bb8be5995eb0e6a3abf457622626d49a7
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-03 20:47:27 +0800
+
+ Translations: Update the Esperanto translation.
+
+ po/eo.po | 620 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 332 insertions(+), 288 deletions(-)
+
+commit bfba3394aed03311fe9a746d3141b2e16d8b9325
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2023-01-02 17:05:07 +0200
+
+ Build: Fix config.h comments.
+
+ configure.ac | 2 +-
+ m4/tuklib_progname.m4 | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 507648ad114c2ae0cd6d181063e1ac07e8106718
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2023-01-02 22:33:48 +0800
+
+ Build: Only define HAVE_PROGRAM_INVOCATION_NAME if it is set to 1.
+
+ HAVE_DECL_PROGRAM_INVOCATION_NAME is renamed to
+ HAVE_PROGRAM_INVOCATION_NAME. Previously,
+ HAVE_DECL_PROGRAM_INVOCATION_NAME was always set when
+ building with autotools. CMake would only set this when it was 1, and the
+ dos/config.h did not define it. The new macro definition is consistent
+ across build systems.
+
+ cmake/tuklib_progname.cmake | 5 ++---
+ m4/tuklib_progname.m4 | 5 ++++-
+ src/common/tuklib_progname.c | 2 +-
+ src/common/tuklib_progname.h | 2 +-
+ 4 files changed, 8 insertions(+), 6 deletions(-)
+
+commit ab5229d32adfec1f3fbc95228d9dd6f560732ab5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-30 20:10:08 +0200
+
+ Tests: test_check: Test corner cases of CLMUL CRC64.
+
+ tests/test_check.c | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+commit 8791826f31733fda0a13b411c2ed930faaeb25aa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-30 19:36:49 +0200
+
+ Tests: Clarify a comment in test_lzip_decoder.c.
+
+ tests/test_lzip_decoder.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+commit c410d812ea12bfc74f6b727c1a799478c79f19ca
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-29 01:55:19 +0800
+
+ xz: Includes <time.h> and <sys/time.h> conditionally in mytime.c.
+
+ Previously, mytime.c depended on mythread.h for <time.h> to be included.
+
+ src/xz/mytime.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit 501c6013d4a59fae5d4368e9657c4885493db809
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-29 01:15:27 +0800
+
+ liblzma: Includes sys/time.h conditionally in mythread
+
+ Previously, <sys/time.h> was always included, even if mythread only used
+ clock_gettime. <time.h> is still needed even if clock_gettime is not used
+ though because struct timespec is needed for mythread_condtime.
+
+ src/common/mythread.h | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+commit 9e3cb514b5b95bd235dcdff3db4436f57444ee4f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-29 01:10:53 +0800
+
+ Build: No longer require HAVE_DECL_CLOCK_MONOTONIC to always be set.
+
+ Previously, if threading was enabled HAVE_DECL_CLOCK_MONOTONIC would always
+ be set to 0 or 1. However, this macro was needed in xz so if xz was not
+ built with threading and HAVE_DECL_CLOCK_MONOTONIC was not defined but
+ HAVE_CLOCK_GETTIME was, it caused a warning during build. Now,
+ HAVE_DECL_CLOCK_MONOTONIC has been renamed to HAVE_CLOCK_MONOTONIC and
+ will only be set if it is 1.
+
+ CMakeLists.txt | 8 +++-----
+ configure.ac | 5 ++++-
+ src/common/mythread.h | 4 ++--
+ src/xz/mytime.c | 5 ++---
+ 4 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 6fc3e5467911572fa9af4021ea46396261aae796
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-28 01:14:07 +0800
+
+ Translations: Add Ukrainian translations of man pages.
+
+ Thanks to Yuri Chornoivan
+
+ po4a/po4a.conf | 2 +-
+ po4a/uk.po | 3676 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 3677 insertions(+), 1 deletion(-)
+
+commit e84f2ab7f8bc38cd8f8befa0bb398656c3c11f8e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-22 23:14:53 +0800
+
+ liblzma: Update documentation for lzma_filter_encoder.
+
+ src/liblzma/common/filter_encoder.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+commit b14b8dbba9a3b232787ae218b46430b9246383dd
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-21 21:12:03 +0800
+
+ Tests: Adds lzip decoder tests
+
+ .gitignore | 1 +
+ tests/Makefile.am | 2 +
+ tests/test_lzip_decoder.c | 471 ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 474 insertions(+)
+
+commit 09a114805e1d4f9a02a06cee7dbf2f5014d1f710
+Author: Jia Cheong Tan <jiat0218@gmail.com>
+Date: 2022-12-20 22:05:21 +0800
+
+ Doxygen: Update .gitignore for generating docs for in source build.
+
+ In source builds are not recommended, but we should still ignore
+ the generated artifacts.
+
+ .gitignore | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit d3e6fe44196bf9478ad193522e2b48febf2eca6b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-20 20:46:44 +0800
+
+ liblzma: Fix lzma_microlzma_encoder() return value.
+
+ Using return_if_error on lzma_lzma_lclppb_encode was improper because
+ return_if_error is expecting an lzma_ret value, but
+ lzma_lzma_lclppb_encode returns a boolean. This could result in
+ lzma_microlzma_encoder, which would be misleading for applications.
+
+ src/liblzma/common/microlzma_encoder.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit b55a27b46f52524a4a8d9cdef03e6689cefc1375
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-16 18:30:02 +0200
+
+ liblzma: Update authors list in arm64.c.
+
+ src/liblzma/simple/arm64.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2fd28d2b7cec3468324a6f15eff7e73c285b1d7d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-16 20:58:55 +0800
+
+ CMake: Update .gitignore for CMake artifacts from in source build.
+
+ In source builds are not recommended, but we can make it easier
+ by ignoring the generated artifacts from CMake.
+
+ .gitignore | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+commit b69da6d4bb6bb11fc0cf066920791990d2b22a06
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-13 20:37:17 +0200
+
+ Bump version to 5.4.0 and soname to 5.4.0.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 6 +++---
+ src/liblzma/liblzma_generic.map | 2 +-
+ src/liblzma/liblzma_linux.map | 2 +-
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+commit 20869eb3fb280ff4f271ef527b12b6bf68b05e19
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-13 20:29:39 +0200
+
+ Update INSTALL: CMake on Windows isn't experimental anymore.
+
+ Using CMake to build liblzma should work on a few other OSes
+ but building the command line tools is still subtly broken.
+
+ It is known that shared library versioning may differ between
+ CMake and Libtool builds on some OSes, most notably Darwin.
+
+ INSTALL | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+commit cbbd84451944e3e8c63acfaa3c923f6d8aff7852
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-13 19:47:53 +0200
+
+ Add NEWS for 5.4.0.
+
+ NEWS | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 202 insertions(+)
+
+commit c3e94d37e8d10a3e96019864b6f5d7b578db2c14
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-13 17:41:20 +0200
+
+ Fix a typo in NEWS.
+
+ NEWS | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 0d2a2e0a545c3da2b3e9500f1e531eb903087245
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-13 17:41:03 +0200
+
+ Add NEWS for 5.2.10.
+
+ NEWS | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+commit 177ece1c8eb007188fb1b04eff09ca2193fbdea6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-13 12:30:45 +0200
+
+ Tests: Fix a typo in tests/files/README.
+
+ tests/files/README | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 60f45bdbaa6b07558b3f4baac285739b0c6342f5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-13 12:30:09 +0200
+
+ Tests: Add two ARM64 test files.
+
+ tests/files/README | 7 +++++++
+ 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/test_files.sh | 5 +++++
+ 4 files changed, 12 insertions(+)
+
+commit f5e419550619c548c7c35d7e367cf00580a56521
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-12 22:44:21 +0200
+
+ Translations: Update the Catalan translation.
+
+ po/ca.po | 657 +++++++++++++++++++++++++++++----------------------------------
+ 1 file changed, 306 insertions(+), 351 deletions(-)
+
+commit 0fb9d355da3789b1757040af475b4e6bbc8b8af8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-12 19:18:12 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit e5b6c161c61a37c54dcb76a99bbb83ac4abe02dc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-12 19:07:58 +0200
+
+ Update AUTHORS.
+
+ AUTHORS | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+commit f2d98e691099d82054d5f3071ef6f5e809932e44
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-12 15:31:14 +0200
+
+ Docs: Omit multi-threaded decompress from TODO.
+
+ The TODO file outdated still.
+
+ TODO | 2 --
+ 1 file changed, 2 deletions(-)
+
+commit b42908c42a4cc091db45a7e5ba0e0ecceaa3f6da
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-11 21:16:09 +0200
+
+ Docs: Update xz-file-format.txt to 1.1.0 for ARM64 filter.
+
+ doc/xz-file-format.txt | 29 ++++++++++++++++++++++-------
+ 1 file changed, 22 insertions(+), 7 deletions(-)
+
+commit 854f2f5946b353cb0963fd6dfd54d363adc89b9f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-11 21:13:57 +0200
+
+ xz: Rename --experimental-arm64 to --arm64.
+
+ src/xz/args.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 31dbd1e5fb65831915a7bbb531c3f19aea8d57a5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-11 21:13:06 +0200
+
+ liblzma: Change LZMA_FILTER_ARM64 to the official Filter ID 0x0A.
+
+ src/liblzma/api/lzma/bcj.h | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+commit 01b3549e523edac899ec4925b282ceddd20da116
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-08 19:24:22 +0200
+
+ xz: Make args_info.files_name a const pointer.
+
+ src/xz/args.c | 2 +-
+ src/xz/args.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit bc665b84ea6bf7946394a08122177efe41b26a5f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-08 19:18:16 +0200
+
+ xz: Don't modify argv[].
+
+ The code that parses --memlimit options and --block-list modified
+ the argv[] when parsing the option string from optarg. This was
+ visible in "ps auxf" and such and could be confusing. I didn't
+ understand it back in the day when I wrote that code. Now a copy
+ is allocated when modifiable strings are needed.
+
+ src/xz/args.c | 23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+commit a13064e1c290de7933db72b6dffbd65cfce59c9f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-08 18:18:57 +0200
+
+ Translations: Update the German man page translations.
+
+ po4a/de.po | 4570 ++++++++++++++++++------------------------------------------
+ 1 file changed, 1374 insertions(+), 3196 deletions(-)
+
+commit 8bdbe42a8d0d75dff70206b923fc4bce5c69a40a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-06 23:05:56 +0800
+
+ Translations: Update the German translation.
+
+ po/de.po | 586 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 315 insertions(+), 271 deletions(-)
+
+commit 5c304b57c24ef40ff57f864301065f0244c05bde
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-06 23:04:25 +0800
+
+ Translations: Update the Turkish translation.
+
+ po/tr.po | 221 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 108 insertions(+), 113 deletions(-)
+
+commit 6d86781fdb937970486500447ebb49b98244235b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-06 23:02:11 +0800
+
+ Translations: Update the Croatian translation.
+
+ po/hr.po | 228 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 113 insertions(+), 115 deletions(-)
+
+commit 7a5b4b8075eb36026b1796f04ffed5830c42396a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-06 22:56:30 +0800
+
+ Translations: Add Romanian translation of man pages.
+
+ Thanks to Remus-Gabriel Chelu.
+
+ po4a/po4a.conf | 2 +-
+ po4a/ro.po | 3692 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 3693 insertions(+), 1 deletion(-)
+
+commit c6977e7400088177556e8771bcb839eb7d90caa3
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-12-06 22:52:13 +0800
+
+ Translations: Update the Romanian translation.
+
+ po/ro.po | 294 +++++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 147 insertions(+), 147 deletions(-)
+
+commit ac2a747e939c2cbccff7a49c399769af5e02d2ab
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-08 17:30:09 +0200
+
+ liblzma: Check for unexpected NULL pointers in block_header_decode().
+
+ The API docs gave an impression that such checks are done
+ but they actually weren't done. In practice it made little
+ difference since the calling code has a bug if these are NULL.
+
+ Thanks to Jia Tan for the original patch that checked for
+ block->filters == NULL.
+
+ src/liblzma/common/block_header_decoder.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 24790f49ae66938c1c7574315e1c0aba1ed5ed25
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 20:59:32 +0200
+
+ Bump version number for 5.3.5beta.
+
+ This also sorts the symbol names alphabetically in liblzma_*.map.
+
+ src/liblzma/api/lzma/version.h | 4 ++--
+ src/liblzma/liblzma_generic.map | 10 +++++-----
+ src/liblzma/liblzma_linux.map | 10 +++++-----
+ 3 files changed, 12 insertions(+), 12 deletions(-)
+
+commit 7e53c5bcb3c2c17f47c096c06ff6b1481e6ecafa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 20:57:26 +0200
+
+ Add NEWS for 5.3.5beta.
+
+ NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 43 insertions(+)
+
+commit 5865f2aaac326fcbd9f8a7d62defa230e4cb644e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 20:57:09 +0200
+
+ Update THANKS.
+
+ THANKS | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 62b270988ec67314d69976df484d2974c6eacfda
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 20:04:17 +0200
+
+ liblzma: Use __has_attribute(__symver__) to fix Clang detection.
+
+ If someone sets up Clang to define __GNUC__ to 10 or greater
+ then symvers broke. __has_attribute is supported by such GCC
+ and Clang versions that don't support __symver__ so this should
+ be much better and simpler way to detect if __symver__ is
+ actually supported.
+
+ Thanks to Tomasz Gajc for the bug report.
+
+ src/liblzma/common/common.h | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+commit f9ca7d45162664ddd9fb70e19335c2426e5d75bb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 18:51:52 +0200
+
+ liblzma: Omit zero-skipping from ARM64 filter.
+
+ It has some complicated downsides and its usefulness is more limited
+ than I originally thought. So this change is bad for certain very
+ specific situations but a generic solution that works for other
+ filters (and is otherwise better too) is planned anyway. And this
+ way 7-Zip can use the same compatible filter for the .7z format.
+
+ This is still marked as experimental with a new temporary Filter ID.
+
+ src/liblzma/api/lzma/bcj.h | 2 +-
+ src/liblzma/simple/arm64.c | 81 +++++++++++++---------------------------------
+ 2 files changed, 24 insertions(+), 59 deletions(-)
+
+commit 5baec3f0a9c85e6abf45c0f652f699b074129a8b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 18:13:27 +0200
+
+ xz: Omit the special notes about ARM64 filter on the man page.
+
+ src/xz/xz.1 | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+commit 0c3627b51862eb0dcdd4fc283d046250571991c6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 18:12:03 +0200
+
+ liblzma: Don't be over-specific in lzma_str_to_filters API doc.
+
+ src/liblzma/api/lzma/filter.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit 94adf057f27b1970f493dc99cd166407d7255639
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 17:54:23 +0200
+
+ liblzma: Silence unused variable warning when BCJ filters are disabled.
+
+ Thanks to Jia Tan for the original patch.
+
+ src/liblzma/common/string_conversion.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+commit c68af4441744e5ffc41a472e1be9c9d53a1d9780
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-12-01 17:38:03 +0200
+
+ Translations: Update the Chinese (simplified) translation.
+
+ po/zh_CN.po | 608 ++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 348 insertions(+), 260 deletions(-)
+
+commit 3be6942e5c27d29995d41da52fbe274e4ce4a537
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-30 18:55:03 +0200
+
+ Add NEWS for 5.2.9.
+
+ NEWS | 34 ++++++++++++++++++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+
+commit 7c16e312cb2f40b81154c0e5be13a3c6b8da485d
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-11-30 23:33:08 +0800
+
+ xz: Remove message_filters_to_str function prototype from message.h.
+
+ This was forgotten from 7484744af6cbabe81e92af7d9e061dfd597fff7b.
+
+ src/xz/message.h | 16 ----------------
+ 1 file changed, 16 deletions(-)
+
+commit 764955e2d4f2a5e8d6d6fec63af694f799e050e7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-30 18:08:34 +0200
+
+ Change the bug report address.
+
+ It forwards to me and Jia Tan.
+
+ Also update the IRC reference in README as #tukaani was moved
+ to Libera Chat long ago.
+
+ CMakeLists.txt | 2 +-
+ README | 11 +++++------
+ configure.ac | 2 +-
+ dos/config.h | 2 +-
+ windows/README-Windows.txt | 2 +-
+ 5 files changed, 9 insertions(+), 10 deletions(-)
+
+commit c21983c76031e01da01ad3c6cc716fe4b8a75070
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-30 17:50:17 +0200
+
+ Build: Add string_conversion.c to CMake, DOS, and VS files.
+
+ CMakeLists.txt | 1 +
+ dos/Makefile | 1 +
+ windows/vs2013/liblzma.vcxproj | 1 +
+ windows/vs2013/liblzma_dll.vcxproj | 1 +
+ windows/vs2017/liblzma.vcxproj | 1 +
+ windows/vs2017/liblzma_dll.vcxproj | 1 +
+ windows/vs2019/liblzma.vcxproj | 1 +
+ windows/vs2019/liblzma_dll.vcxproj | 1 +
+ 8 files changed, 8 insertions(+)
+
+commit 30be0c35d24eb5175459d69dbf7d92e2b087ef82
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-30 17:38:32 +0200
+
+ Update to HTTPS URLs in AUTHORS.
+
+ AUTHORS | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 0a72b9ca2fe20082da9b7128fe0d908af947a851
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-11-30 00:52:06 +0800
+
+ liblzma: Improve documentation for string to filter functions.
+
+ src/liblzma/api/lzma/filter.h | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+commit a6e21fcede3b196160a52dd294d965c508a4bb33
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-29 22:27:42 +0200
+
+ liblzma: Two fixes to lzma_str_list_filters() API docs.
+
+ Thanks to Jia Tan.
+
+ src/liblzma/api/lzma/filter.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 7484744af6cbabe81e92af7d9e061dfd597fff7b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-28 21:57:47 +0200
+
+ xz: Use lzma_str_from_filters().
+
+ Two uses: Displaying encoder filter chain when compressing with -vv,
+ and displaying the decoder filter chain in --list -vv.
+
+ src/xz/list.c | 28 ++++++---
+ src/xz/message.c | 175 +++----------------------------------------------------
+ 2 files changed, 28 insertions(+), 175 deletions(-)
+
+commit cedeeca2ea6ada5b0411b2ae10d7a859e837f203
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-28 21:37:48 +0200
+
+ liblzma: Add lzma_str_to_filters, _from_filters, and _list_filters.
+
+ lzma_str_to_filters() uses static error messages which makes
+ them not very precise. It tells the position in the string
+ where an error occurred though which helps quite a bit if
+ applications take advantage of it. Dynamic error messages can
+ be added later with a new flag if it seems important enough.
+
+ src/liblzma/api/lzma/filter.h | 258 +++++++
+ src/liblzma/common/Makefile.inc | 1 +
+ src/liblzma/common/string_conversion.c | 1302 ++++++++++++++++++++++++++++++++
+ src/liblzma/liblzma_generic.map | 3 +
+ src/liblzma/liblzma_linux.map | 3 +
+ 5 files changed, 1567 insertions(+)
+
+commit 072ebf7b1335421193ffa9d4a70d5533786b8995
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-28 21:02:19 +0200
+
+ liblzma: Make lzma_validate_chain() available outside filter_common.c.
+
+ src/liblzma/common/filter_common.c | 8 ++++----
+ src/liblzma/common/filter_common.h | 3 +++
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+commit 5f22bd2d37e3bd01a5d701b51750eb51f09c11bf
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-28 10:51:03 +0200
+
+ liblzma: Remove lzma_lz_decoder_uncompressed() as it's now unused.
+
+ src/liblzma/lz/lz_decoder.c | 14 --------------
+ src/liblzma/lz/lz_decoder.h | 3 ---
+ 2 files changed, 17 deletions(-)
+
+commit cee83206465b95729ab649aa2f57fdbde8dcaf89
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-28 10:48:53 +0200
+
+ liblzma: Use LZMA1EXT feature in lzma_microlzma_decoder().
+
+ Here too this avoids the slightly ugly method to set
+ the uncompressed size.
+
+ Also moved the setting of dict_size to the struct initializer.
+
+ src/liblzma/common/microlzma_decoder.c | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+commit e310e8b6a490dfb468f4ed68feff246d776b323c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-28 10:28:20 +0200
+
+ liblzma: Use LZMA1EXT feature in lzma_alone_decoder().
+
+ This avoids the need to use the slightly ugly method to
+ set the uncompressed size.
+
+ src/liblzma/common/alone_decoder.c | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+commit 33b8a24b6646a9dbfd8358405aec466b13078559
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-27 23:16:21 +0200
+
+ liblzma: Add LZMA_FILTER_LZMA1EXT to support LZMA1 without end marker.
+
+ Some file formats need support for LZMA1 streams that don't use
+ the end of payload marker (EOPM) alias end of stream (EOS) marker.
+ So far liblzma API has supported decompressing such streams via
+ lzma_alone_decoder() when .lzma header specifies a known
+ uncompressed size. Encoding support hasn't been available in the API.
+
+ Instead of adding a new LZMA1-only API for this purpose, this commit
+ adds a new filter ID for use with raw encoder and decoder. The main
+ benefit of this approach is that then also filter chains are possible,
+ for example, if someone wants to implement support for .7z files that
+ use the x86 BCJ filter with LZMA1 (not BCJ2 as that isn't supported
+ in liblzma).
+
+ src/liblzma/api/lzma/lzma12.h | 123 ++++++++++++++++++++++++++++++--
+ src/liblzma/common/filter_common.c | 7 ++
+ src/liblzma/common/filter_decoder.c | 6 ++
+ src/liblzma/common/filter_encoder.c | 9 +++
+ src/liblzma/lzma/lzma2_encoder.c | 2 +-
+ src/liblzma/lzma/lzma_decoder.c | 26 ++++++-
+ src/liblzma/lzma/lzma_encoder.c | 40 +++++++++--
+ src/liblzma/lzma/lzma_encoder.h | 3 +-
+ src/liblzma/lzma/lzma_encoder_private.h | 3 +
+ 9 files changed, 204 insertions(+), 15 deletions(-)
+
+commit 9a304bf1e45b3ddf61aaeaa7c764915b34618ede
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-27 18:43:07 +0200
+
+ liblzma: Avoid unneeded use of void pointer in LZMA decoder.
+
+ src/liblzma/lzma/lzma_decoder.c | 3 +--
+ src/liblzma/lzma/lzma_decoder.h | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+commit 218394958c7683f892275bb40eae880620feebcc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-27 18:20:33 +0200
+
+ liblzma: Pass the Filter ID to LZ encoder and decoder.
+
+ This allows using two Filter IDs with the same
+ initialization function and data structures.
+
+ src/liblzma/common/alone_decoder.c | 1 +
+ src/liblzma/common/alone_encoder.c | 1 +
+ src/liblzma/common/common.h | 7 +++++--
+ src/liblzma/common/lzip_decoder.c | 1 +
+ src/liblzma/common/microlzma_decoder.c | 1 +
+ src/liblzma/common/microlzma_encoder.c | 1 +
+ src/liblzma/lz/lz_decoder.c | 5 +++--
+ src/liblzma/lz/lz_decoder.h | 3 ++-
+ src/liblzma/lz/lz_encoder.c | 5 +++--
+ src/liblzma/lz/lz_encoder.h | 3 ++-
+ src/liblzma/lzma/lzma2_decoder.c | 3 ++-
+ src/liblzma/lzma/lzma2_encoder.c | 3 ++-
+ src/liblzma/lzma/lzma_decoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ 14 files changed, 26 insertions(+), 12 deletions(-)
+
+commit 1663c7676b76f4c514031797f3db1896e8100f7f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-27 01:03:16 +0200
+
+ liblzma: Remove two FIXME comments.
+
+ src/liblzma/common/filter_encoder.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 11fe708db783ac36ebeeb85da164e29e8c300910
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-26 22:25:30 +0200
+
+ xz: Use lzma_filters_free().
+
+ src/xz/list.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+commit e782af9110d8499c7ac2929bc871540eefea5ea1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-26 22:21:13 +0200
+
+ liblzma: Use lzma_filters_free() in more places.
+
+ src/liblzma/common/block_header_decoder.c | 20 ++------------------
+ src/liblzma/common/stream_decoder.c | 4 +---
+ src/liblzma/common/stream_decoder_mt.c | 22 +++++-----------------
+ 3 files changed, 8 insertions(+), 38 deletions(-)
+
+commit 90caaded2dc6db1d6a55b01160d7e87f4a423628
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-25 18:04:37 +0200
+
+ liblzma: Omit simple coder init functions if they are disabled.
+
+ src/liblzma/simple/arm.c | 4 ++++
+ src/liblzma/simple/armthumb.c | 4 ++++
+ src/liblzma/simple/ia64.c | 4 ++++
+ src/liblzma/simple/powerpc.c | 4 ++++
+ src/liblzma/simple/sparc.c | 4 ++++
+ src/liblzma/simple/x86.c | 4 ++++
+ 6 files changed, 24 insertions(+)
+
+commit 5cd9f0df78cc4f8a7807bf6104adea13034fbb45
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 23:24:59 +0200
+
+ xz: Allow nice_len 2 and 3 even if match finder requires 3 or 4.
+
+ Now that liblzma accepts these, we avoid the extra check and
+ there's one message less for translators too.
+
+ src/xz/options.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+commit 3be88ae071371caa279b44e13f4836fb178fe4ae
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 23:23:55 +0200
+
+ liblzma: Allow nice_len 2 and 3 even if match finder requires 3 or 4.
+
+ That is, if the specified nice_len is smaller than the minimum
+ of the match finder, silently use the match finder's minimum value
+ instead of reporting an error. The old behavior is annoying to users
+ and it complicates xz options handling too.
+
+ src/liblzma/lz/lz_encoder.c | 14 +++++++++-----
+ src/liblzma/lz/lz_encoder.h | 9 +++++++++
+ src/liblzma/lzma/lzma_encoder.c | 11 ++++++++---
+ 3 files changed, 26 insertions(+), 8 deletions(-)
+
+commit 93439cfafe1768b3b18d67d2356ef7e7559bba59
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 16:25:10 +0200
+
+ liblzma: Add lzma_filters_update() support to the multi-threaded encoder.
+
+ A tiny downside of this is that now a 1-4 tiny allocations are made
+ for every Block because each worker thread needs its own copy of
+ the filter chain.
+
+ src/liblzma/api/lzma/filter.h | 36 +++++++------
+ src/liblzma/common/stream_encoder_mt.c | 96 +++++++++++++++++++++++++++++++---
+ 2 files changed, 109 insertions(+), 23 deletions(-)
+
+commit 17ac51e689794eb41cab3e80946fec689caea2d2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 14:53:22 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 06824396b2b6c84f3a235cb7c19c2a9701167797
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 14:52:44 +0200
+
+ Build: Don't put GNU/Linux-specific symbol versions into static liblzma.
+
+ It not only makes no sense to put symbol versions into a static library
+ but it can also cause breakage.
+
+ By default Libtool #defines PIC if building a shared library and
+ doesn't define it for static libraries. This is documented in the
+ Libtool manual. It can be overriden using --with-pic or --without-pic.
+ configure.ac detects if --with-pic or --without-pic is used and then
+ gives an error if neither --disable-shared nor --disable-static was
+ used at the same time. Thus, in normal situations it works to build
+ both shared and static library at the same time on GNU/Linux,
+ only --with-pic or --without-pic requires that only one type of
+ library is built.
+
+ Thanks to John Paul Adrian Glaubitz from Debian for reporting
+ the problem that occurred on ia64:
+ https://www.mail-archive.com/xz-devel@tukaani.org/msg00610.html
+
+ CMakeLists.txt | 5 +-
+ configure.ac | 143 +++++++++++++++++++++++++++++---------------
+ src/liblzma/common/common.h | 12 ++++
+ 3 files changed, 111 insertions(+), 49 deletions(-)
+
+commit e1acf7107291f8b3d6d609a7133331ff36d35d14
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 01:32:16 +0200
+
+ liblzma: Refactor to use lzma_filters_free().
+
+ lzma_filters_free() sets the options to NULL and ids to
+ LZMA_VLI_UNKNOWN so there is no need to do it by caller;
+ the filter arrays will always be left in a safe state.
+
+ Also use memcpy() instead of a loop to copy a filter chain
+ when it is known to be safe to copy LZMA_FILTERS_MAX + 1
+ (even if the elements past the terminator might be uninitialized).
+
+ src/liblzma/common/stream_encoder.c | 16 ++++------------
+ src/liblzma/common/stream_encoder_mt.c | 11 ++---------
+ 2 files changed, 6 insertions(+), 21 deletions(-)
+
+commit cb05dbcf8b868441ec805016222f3fd77f1c5caa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 01:26:37 +0200
+
+ liblzma: Fix another invalid free() after memory allocation failure.
+
+ This time it can happen when lzma_stream_encoder_mt() is used
+ to reinitialize an existing multi-threaded Stream encoder
+ and one of 1-4 tiny allocations in lzma_filters_copy() fail.
+
+ It's very similar to the previous bug
+ 10430fbf3820dafd4eafd38ec8be161a6978ed2b, happening with
+ an array of lzma_filter structures whose old options are freed
+ but the replacement never arrives due to a memory allocation
+ failure in lzma_filters_copy().
+
+ src/liblzma/common/stream_encoder_mt.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 75f1a6c26df4ce329da0882786403e3ccf5cd898
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-05-05 20:53:42 +0800
+
+ liblzma: Add support for LZMA_SYNC_FLUSH in the Block encoder.
+
+ The documentation mentions that lzma_block_encoder() supports
+ LZMA_SYNC_FLUSH but it was never added to supported_actions[]
+ in the internal structure. Because of this, LZMA_SYNC_FLUSH could
+ not be used with the Block encoder unless it was the next coder
+ after something like stream_encoder() or stream_encoder_mt().
+
+ src/liblzma/common/block_encoder.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d0901645170b638c517f5c50866b6ef48f491c65
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 01:02:50 +0200
+
+ liblzma: Add new API function lzma_filters_free().
+
+ This is small but convenient and should have been added
+ a long time ago.
+
+ src/liblzma/api/lzma/filter.h | 21 +++++++++++++++++++++
+ src/liblzma/common/filter_common.c | 26 ++++++++++++++++++++++++++
+ src/liblzma/liblzma_generic.map | 1 +
+ src/liblzma/liblzma_linux.map | 1 +
+ 4 files changed, 49 insertions(+)
+
+commit ae1f8a723dcde2f2c5cf444bcbb5fc5026b3c3c5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-24 00:02:31 +0200
+
+ CMake: Don't use symbol versioning with static library.
+
+ CMakeLists.txt | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+commit 48c1b99dc537a27e1ca929d8837e778e5ba32191
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-23 21:55:22 +0200
+
+ liblzma: Add lzma_attr_warn_unused_result to lzma_filters_copy().
+
+ src/liblzma/api/lzma/filter.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 10430fbf3820dafd4eafd38ec8be161a6978ed2b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-23 21:26:21 +0200
+
+ liblzma: Fix invalid free() after memory allocation failure.
+
+ The bug was in the single-threaded .xz Stream encoder
+ in the code that is used for both re-initialization and for
+ lzma_filters_update(). To trigger it, an application had
+ to either re-initialize an existing encoder instance with
+ lzma_stream_encoder() or use lzma_filters_update(), and
+ then one of the 1-4 tiny allocations in lzma_filters_copy()
+ (called from stream_encoder_update()) must fail. An error
+ was correctly reported but the encoder state was corrupted.
+
+ This is related to the recent fix in
+ f8ee61e74eb40600445fdb601c374d582e1e9c8a which is good but
+ it wasn't enough to fix the main problem in stream_encoder.c.
+
+ src/liblzma/common/stream_encoder.c | 39 +++++++++++++++++++++++++++++--------
+ 1 file changed, 31 insertions(+), 8 deletions(-)
+
+commit cafd6dc397ca8b5b5f7775e8d6876b8fe70f8e70
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-22 16:37:15 +0200
+
+ liblzma: Fix language in a comment.
+
+ src/liblzma/common/stream_encoder.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit c392bf8ccba857baaf50399c4b460119befacd54
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-22 11:20:17 +0200
+
+ liblzma: Fix infinite loop in LZMA encoder init with dict_size >= 2 GiB.
+
+ The encoder doesn't support dictionary sizes larger than 1536 MiB.
+ This is validated, for example, when calculating the memory usage
+ via lzma_raw_encoder_memusage(). It is also enforced by the LZ
+ part of the encoder initialization. However, LZMA encoder with
+ LZMA_MODE_NORMAL did an unsafe calculation with dict_size before
+ such validation and that results in an infinite loop if dict_size
+ was 2 << 30 or greater.
+
+ src/liblzma/lzma/lzma_encoder.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+commit f50534c973a591ccf65485adfc827a8a7126ca6c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-21 13:02:33 +0200
+
+ liblzma: Fix two Doxygen commands in the API headers.
+
+ These were caught by clang -Wdocumentation.
+
+ src/liblzma/api/lzma/hardware.h | 2 +-
+ src/liblzma/api/lzma/index_hash.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 649d4872ed2f55196114a061d45b416fc4353569
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-19 19:09:55 +0200
+
+ xz: Refactor duplicate code from hardware_memlimit_mtenc_get().
+
+ src/xz/hardware.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit d327743bb547a53364e5951a16e5f1663fe4b9ff
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-19 19:06:13 +0200
+
+ xz: Add support --threads=+N so that -T+1 gives threaded mode.
+
+ src/xz/args.c | 18 +++++++++++++++---
+ src/xz/hardware.c | 17 +++++++++++++++--
+ src/xz/hardware.h | 1 +
+ src/xz/xz.1 | 21 ++++++++++++++++++++-
+ 4 files changed, 51 insertions(+), 6 deletions(-)
+
+commit a11a2b8b5e830ba682c1d81aaa7078842b296995
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-11-19 23:18:04 +0800
+
+ CMake: Adds test_memlimit to CMake tests
+
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 2af8d9e9b3f44f62d19e7c39297ec63af2e8c64f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-15 19:10:21 +0200
+
+ Translations: Update the Korean translation.
+
+ po/ko.po | 652 ++++++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 371 insertions(+), 281 deletions(-)
+
+commit 16ac05677292f7e21a4feaddcfb2ab062ea5f385
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-15 19:09:28 +0200
+
+ Translations: Update the Turkish translation.
+
+ po/tr.po | 568 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 310 insertions(+), 258 deletions(-)
+
+commit b9a67d9a5fa207062d4aa8a01639234609315d31
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-15 10:58:39 +0200
+
+ Bump version number for 5.3.4alpha.
+
+ src/liblzma/api/lzma/version.h | 2 +-
+ src/liblzma/liblzma_generic.map | 2 +-
+ src/liblzma/liblzma_linux.map | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 5b999ba289b3280457b7386b9ac65dbbdf1575a5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-15 10:54:40 +0200
+
+ Add NEWS for 5.3.4alpha.
+
+ NEWS | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 96 insertions(+)
+
+commit ce8db9e37da4f6c87691c5066f51f91f2411c44a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-15 10:54:08 +0200
+
+ Add NEWS for 5.2.8.
+
+ NEWS | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 79 insertions(+)
+
+commit b56bc8251d2736224af6bdaaae734ceb8926a879
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 23:19:57 +0200
+
+ Revert "liblzma: Simple/BCJ filters: Allow disabling generic BCJ options."
+
+ This reverts commit 177bdc922cb17bd0fd831ab8139dfae912a5c2b8
+ and also does equivalent change to arm64.c.
+
+ Now that ARM64 filter will use lzma_options_bcj, this change
+ is not needed anymore.
+
+ src/liblzma/simple/arm.c | 2 +-
+ src/liblzma/simple/arm64.c | 2 +-
+ src/liblzma/simple/armthumb.c | 2 +-
+ src/liblzma/simple/ia64.c | 2 +-
+ src/liblzma/simple/powerpc.c | 2 +-
+ src/liblzma/simple/simple_coder.c | 4 ++--
+ src/liblzma/simple/simple_private.h | 2 +-
+ src/liblzma/simple/sparc.c | 2 +-
+ src/liblzma/simple/x86.c | 3 +--
+ 9 files changed, 10 insertions(+), 11 deletions(-)
+
+commit 8370ec8edf9ddf8d1d9fef03d8d1027503ec4c35
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 23:14:41 +0200
+
+ Replace the experimental ARM64 filter with a new experimental version.
+
+ This is incompatible with the previous version.
+
+ This has space/tab fixes in filter_*.c and bcj.h too.
+
+ src/liblzma/api/lzma/bcj.h | 41 +-----
+ src/liblzma/common/filter_common.c | 14 +-
+ src/liblzma/common/filter_decoder.c | 12 +-
+ src/liblzma/common/filter_encoder.c | 17 +--
+ src/liblzma/simple/arm64.c | 283 ++++++++++++++----------------------
+ src/liblzma/simple/simple_decoder.h | 4 -
+ src/liblzma/simple/simple_encoder.h | 2 -
+ src/xz/args.c | 2 +-
+ src/xz/message.c | 13 +-
+ src/xz/options.c | 39 -----
+ src/xz/options.h | 7 -
+ 11 files changed, 147 insertions(+), 287 deletions(-)
+
+commit f644473a211394447824ea00518d0a214ff3f7f2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 21:34:57 +0200
+
+ liblzma: Add fast CRC64 for 32/64-bit x86 using SSSE3 + SSE4.1 + CLMUL.
+
+ It also works on E2K as it supports these intrinsics.
+
+ On x86-64 runtime detection is used so the code keeps working on
+ older processors too. A CLMUL-only build can be done by using
+ -msse4.1 -mpclmul in CFLAGS and this will reduce the library
+ size since the generic implementation and its 8 KiB lookup table
+ will be omitted.
+
+ On 32-bit x86 this isn't used by default for now because by default
+ on 32-bit x86 the separate assembly file crc64_x86.S is used.
+ If --disable-assembler is used then this new CLMUL code is used
+ the same way as on 64-bit x86. However, a CLMUL-only build
+ (-msse4.1 -mpclmul) won't omit the 8 KiB lookup table on
+ 32-bit x86 due to a currently-missing check for disabled
+ assembler usage.
+
+ The configure.ac check should be such that the code won't be
+ built if something in the toolchain doesn't support it but
+ --disable-clmul-crc option can be used to unconditionally
+ disable this feature.
+
+ CLMUL speeds up decompression of files that have compressed very
+ well (assuming CRC64 is used as a check type). It is know that
+ the CLMUL code is significantly slower than the generic code for
+ tiny inputs (especially 1-8 bytes but up to 16 bytes). If that
+ is a real-world problem then there is already a commented-out
+ variant that uses the generic version for small inputs.
+
+ Thanks to Ilya Kurdyukov for the original patch which was
+ derived from a white paper from Intel [1] (published in 2009)
+ and public domain code from [2] (released in 2016).
+
+ [1] https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf
+ [2] https://github.com/rawrunprotected/crc
+
+ CMakeLists.txt | 26 ++-
+ INSTALL | 12 ++
+ configure.ac | 59 +++++-
+ src/liblzma/check/crc64_fast.c | 449 +++++++++++++++++++++++++++++++++++++++-
+ src/liblzma/check/crc64_table.c | 21 +-
+ 5 files changed, 554 insertions(+), 13 deletions(-)
+
+commit 3b466bc79672bb2b06d1245a500588e6026e0ba0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 20:14:34 +0200
+
+ Translations: Update the Swedish translation one more time.
+
+ po/sv.po | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit e963379a8622ebdff6ce78e76b803bcd1e1d16d6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 19:34:15 +0200
+
+ Translations: Update the Swedish translation again.
+
+ po/sv.po | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+commit a4bc689a823a2254f29ac9d233170add5121b307
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 19:07:45 +0200
+
+ Translations: Update the Swedish translation.
+
+ po/sv.po | 671 ++++++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 382 insertions(+), 289 deletions(-)
+
+commit bbf2073d824ab4ba33bed4b77f467435abd333a5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 18:58:09 +0200
+
+ Translations: Update the Ukrainian translation.
+
+ po/uk.po | 618 ++++++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 354 insertions(+), 264 deletions(-)
+
+commit ac10b1b3622e70881595586edfb8a3ebdcd76bb6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 17:58:07 +0200
+
+ Build: Omit x86_64 from --enable-assembler.
+
+ It didn't do anything. There are only 32-bit x86 assembly files
+ and it feels likely that new files won't be added as intrinsics
+ in C are more portable across toolchains and OSes.
+
+ configure.ac | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+commit eb0f1450ad9f23dac03050d9c8375980240aee21
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-14 16:00:52 +0200
+
+ liblzma: Use __attribute__((__constructor__)) if available.
+
+ This uses it for CRC table initializations when using --disable-small.
+ It avoids mythread_once() overhead. It also means that then
+ --disable-small --disable-threads is thread-safe if this attribute
+ is supported.
+
+ CMakeLists.txt | 15 +++++++++++++++
+ INSTALL | 4 +++-
+ configure.ac | 31 ++++++++++++++++++++++++++++---
+ src/liblzma/check/crc32_small.c | 7 +++++++
+ src/liblzma/check/crc64_small.c | 5 +++++
+ src/liblzma/lz/lz_encoder.c | 2 +-
+ 6 files changed, 59 insertions(+), 5 deletions(-)
+
+commit 6553f49b11dafad35c73b05f12e14865ea1fd8a1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-12 21:19:52 +0200
+
+ Translations: Update the Romanian translation.
+
+ po/ro.po | 651 +++++++++++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 380 insertions(+), 271 deletions(-)
+
+commit db97e69e12393becc29f8febd53133d0d36989bd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-12 21:17:45 +0200
+
+ Translations: Update the Hungarian translation.
+
+ po/hu.po | 625 ++++++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 357 insertions(+), 268 deletions(-)
+
+commit 2bbb9c0f3829a8b121b36998d273a6c6f92000f4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 17:58:57 +0200
+
+ Translations: Update the Finnish translation.
+
+ po/fi.po | 610 ++++++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 348 insertions(+), 262 deletions(-)
+
+commit 3c8cbb8137b6f8ed9416c1209d73cdbcb015251f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 17:58:18 +0200
+
+ Translations: Update the Croatian translation.
+
+ po/hr.po | 680 +++++++++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 381 insertions(+), 299 deletions(-)
+
+commit 26c3359eac0988d6f3986735cd1363bec1678e8e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 17:57:18 +0200
+
+ Translations: Update the Polish translation.
+
+ po/pl.po | 569 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 309 insertions(+), 260 deletions(-)
+
+commit 577e467b137c735afb8de6ae71ac7a73c2960cc4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 17:56:44 +0200
+
+ Translations: Update the Spanish translation.
+
+ po/es.po | 598 ++++++++++++++++++++++++++++++++++++---------------------------
+ 1 file changed, 344 insertions(+), 254 deletions(-)
+
+commit f9b4ff6e9a0f1678650775582d3e4fe782abce97
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 17:16:03 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit a39961ef211e1bf030b17edeea3cff29fe263b67
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 17:15:25 +0200
+
+ liblzma: Fix building with Intel ICC (the classic compiler).
+
+ It claims __GNUC__ >= 10 but doesn't support __symver__ attribute.
+
+ Thanks to Stephen Sachs.
+
+ src/liblzma/common/common.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit c715f683dcb1a817d565da292cddfbceda643e12
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 14:35:58 +0200
+
+ liblzma: Fix incorrect #ifdef for x86 SSE2 support.
+
+ __SSE2__ is the correct macro for SSE2 support with GCC, Clang,
+ and ICC. __SSE2_MATH__ means doing floating point math with SSE2
+ instead of 387. Often the latter macro is defined if the first
+ one is but it was still a bug.
+
+ src/liblzma/common/memcmplen.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+commit bd334ae56afe7f642ad4d0f1ac19e74e82daa1ce
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 13:27:06 +0200
+
+ Add NEWS for 5.2.7 (forgotten cherry-pick from v5.2).
+
+ NEWS | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 74 insertions(+)
+
+commit 3c7860cf49de6f81046b3a4034a89f3a4803a576
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 13:16:21 +0200
+
+ xzdiff: Add support for .lz files.
+
+ The other scripts don't need changes for .lz support because
+ in those scripts it is enough that xz supports .lz.
+
+ src/scripts/xzdiff.in | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit d76c752a6d77052e5ad57ade555082585f7ac5d8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-11 12:23:58 +0200
+
+ Scripts: Ignore warnings from xz.
+
+ In practice this means making the scripts work when
+ the input files have an unsupported check type which
+ isn't a problem in practice unless support for
+ some check types has been disabled at build time.
+
+ src/scripts/xzdiff.in | 5 +++--
+ src/scripts/xzgrep.in | 2 +-
+ src/scripts/xzless.in | 4 ++--
+ src/scripts/xzmore.in | 4 ++--
+ 4 files changed, 8 insertions(+), 7 deletions(-)
+
+commit 6552535afd1fe29d726ab6e68cf14ce3624fd48c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-10 12:34:43 +0200
+
+ Translations: Rename poa4/fr_FR.po to po4a/fr.po.
+
+ That's how it is preferred at the Translation Project.
+ On my system /usr/share/man/fr_FR doesn't contain any
+ other man pages than XZ Utils while /usr/share/man/fr
+ has quite a few, so this will fix that too.
+
+ Thanks to Benno Schulenberg from the Translation Project.
+
+ po4a/{fr_FR.po => fr.po} | 0
+ po4a/po4a.conf | 2 +-
+ 2 files changed, 1 insertion(+), 1 deletion(-)
+
+commit 0918159ce4c75bfb60aff0193b559f8a9f41d25a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 18:48:50 +0200
+
+ xz: Update the man page about BCJ filters, including upcoming --arm64.
+
+ The --arm64 isn't actually implemented yet in the form
+ described in this commit.
+
+ Thanks to Jia Tan.
+
+ src/xz/xz.1 | 66 +++++++++++++++++++++++++++----------------------------------
+ 1 file changed, 29 insertions(+), 37 deletions(-)
+
+commit ba2ae3596f6be1587495f33b367488f6e00e56f1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 18:14:14 +0200
+
+ xz: Add --arm64 to --long-help and omit endianness from ARM(-Thumb).
+
+ Modern 32-bit ARM in big endian mode use little endian for
+ instruction encoding still, so the filters work on such
+ executables too. It's likely less confusing for users this way.
+
+ The --arm64 option hasn't been implemented yet (there is
+ --experimental-arm64 but it's different). The --arm64 option
+ is added now anyway because this is the likely result and the
+ strings need to be ready for translators.
+
+ Thanks to Jia Tan.
+
+ src/xz/message.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 802d57d9215d9c81dbee86edb43c9e93a7f7ec55
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 15:12:13 +0200
+
+ Windows: Update the VS project files for ARM64 and .lz support.
+
+ windows/vs2013/config.h | 9 +++++++++
+ windows/vs2013/liblzma.vcxproj | 5 ++++-
+ windows/vs2013/liblzma_dll.vcxproj | 5 ++++-
+ windows/vs2017/config.h | 9 +++++++++
+ windows/vs2017/liblzma.vcxproj | 3 +++
+ windows/vs2017/liblzma_dll.vcxproj | 3 +++
+ windows/vs2019/config.h | 9 +++++++++
+ windows/vs2019/liblzma.vcxproj | 5 ++++-
+ windows/vs2019/liblzma_dll.vcxproj | 5 ++++-
+ 9 files changed, 49 insertions(+), 4 deletions(-)
+
+commit 5846aeda05972bc803c6094821ae836229ebe691
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 14:57:48 +0200
+
+ DOS: Update Makefile and config.h to include ARM64 and .lz support.
+
+ dos/Makefile | 2 ++
+ dos/config.h | 9 +++++++++
+ 2 files changed, 11 insertions(+)
+
+commit 781da8d6c44de6aa278c916375250668a0b107f2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 14:45:05 +0200
+
+ CMake: Add lzip decoder files and #define to the build.
+
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit df8ad4af65a9c4846b108550d0083770a69dee64
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 14:41:56 +0200
+
+ Docs: Update INSTALL and also add new prohibited options to PACKAGERS.
+
+ INSTALL | 49 +++++++++++++++++++++++++++++++++++++++++--------
+ PACKAGERS | 2 ++
+ 2 files changed, 43 insertions(+), 8 deletions(-)
+
+commit c8ef089c149afaab413c3a51be827dd1d11afe0e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-20 17:39:06 +0300
+
+ Tests: Test the .lz files in test_files.sh.
+
+ tests/test_files.sh | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+commit c8f70ebb4628ceb6cb29cc9195d9deadf69d2bd7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-20 15:35:59 +0300
+
+ Tests: Add .lz (lzip) test files.
+
+ tests/files/README | 109 +++++++++++++++++++++++++++++----
+ tests/files/bad-1-v0-uncomp-size.lz | Bin 0 -> 42 bytes
+ tests/files/bad-1-v1-crc32.lz | Bin 0 -> 50 bytes
+ tests/files/bad-1-v1-dict-1.lz | Bin 0 -> 50 bytes
+ tests/files/bad-1-v1-dict-2.lz | Bin 0 -> 50 bytes
+ tests/files/bad-1-v1-magic-1.lz | Bin 0 -> 50 bytes
+ 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
+ tests/files/good-1-v0-trailing-1.lz | Bin 0 -> 59 bytes
+ 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
+ tests/files/good-1-v1.lz | Bin 0 -> 50 bytes
+ tests/files/good-2-v0-v1.lz | Bin 0 -> 78 bytes
+ tests/files/good-2-v1-v0.lz | Bin 0 -> 78 bytes
+ tests/files/good-2-v1-v1.lz | Bin 0 -> 86 bytes
+ tests/files/unsupported-1-v234.lz | Bin 0 -> 50 bytes
+ 19 files changed, 98 insertions(+), 11 deletions(-)
+
+commit 731db13e6fa3ad3e3fc786c0ccf6eac4cce6865f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-19 22:32:51 +0300
+
+ xz: Remove the commented-out FORMAT_GZIP, gzip, .gz, and .tgz.
+
+ src/xz/args.c | 2 --
+ src/xz/coder.h | 1 -
+ src/xz/suffix.c | 9 ---------
+ 3 files changed, 12 deletions(-)
+
+commit 3176f992c55b8d788c4633809aaf9447376a5a12
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-08 21:28:15 +0300
+
+ xz: Add .lz (lzip) decompression support.
+
+ If configured with --disable-lzip-decoder then --long-help will
+ still list `lzip' in --format but I left it like that since
+ due to translations it would be messy to have two help strings.
+ Features are disabled only in special situations so wrong help
+ in such a situation shouldn't matter much.
+
+ Thanks to Michał Górny for the original patch.
+
+ src/xz/args.c | 9 ++++++++
+ src/xz/coder.c | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
+ src/xz/coder.h | 3 +++
+ src/xz/message.c | 2 +-
+ src/xz/suffix.c | 26 ++++++++++++++++++----
+ src/xz/xz.1 | 46 +++++++++++++++++++++++++++++++++-----
+ 6 files changed, 141 insertions(+), 13 deletions(-)
+
+commit 034086e1ae1459210837a24e04878435c86dc41b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-08 00:29:20 +0300
+
+ liblzma: Add .lz support to lzma_auto_decoder().
+
+ Thanks to Michał Górny for the original patch.
+
+ src/liblzma/api/lzma/container.h | 10 ++++++----
+ src/liblzma/common/Makefile.inc | 3 ++-
+ src/liblzma/common/auto_decoder.c | 23 +++++++++++++++++------
+ src/liblzma/common/lzip_decoder.h | 22 ++++++++++++++++++++++
+ 4 files changed, 47 insertions(+), 11 deletions(-)
+
+commit 0538db038f3cdc352007dacb42454aa1806b8e40
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-06 15:50:20 +0300
+
+ liblzma: Add .lz (lzip) decompression support (format versions 0 and 1).
+
+ Support for format version 0 was removed from lzip 1.18 for some
+ reason. .lz format version 0 files are rare (and old) but some
+ source packages were released in this format, and some people might
+ have personal files in this format too. It's very little extra code
+ to support it along side format version 1 so this commits adds
+ support for both.
+
+ The Sync Flush marker extentension to the original .lz format
+ version 1 isn't supported. It would require changes to the
+ LZMA decoder itself. Such files are very rare anyway.
+
+ See the API doc for lzma_lzip_decoder() for more details about
+ the .lz format support.
+
+ Thanks to Michał Górny for the original patch.
+
+ configure.ac | 21 ++
+ src/liblzma/api/lzma/container.h | 62 +++++-
+ src/liblzma/common/Makefile.inc | 5 +
+ src/liblzma/common/lzip_decoder.c | 413 ++++++++++++++++++++++++++++++++++++++
+ src/liblzma/liblzma_generic.map | 1 +
+ src/liblzma/liblzma_linux.map | 1 +
+ 6 files changed, 501 insertions(+), 2 deletions(-)
+
+commit 633d48a075b9ce4b9c08a7a56a7eb4cabc18100c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 14:17:23 +0200
+
+ liblzma: Add the missing Makefile.inc change for --disable-microlzma.
+
+ This was forgotten from commit 59c4d6e1390f6f4176f43ac1dad1f7ac03c449b8.
+
+ src/liblzma/common/Makefile.inc | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+commit 724285dadbdc88765c8fb83eab9816575a260966
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 14:10:52 +0200
+
+ xz: Add comments about stdin and src_st.st_size.
+
+ "xz -v < regular_file > out.xz" doesn't display the percentage
+ and estimated remaining time because it doesn't even try to
+ check the input file size when input is read from stdin.
+ This could be improved but for now there's just a comment
+ to remind about it.
+
+ src/xz/coder.c | 9 +++++++++
+ src/xz/file_io.c | 4 ++++
+ 2 files changed, 13 insertions(+)
+
+commit f723eec68b0e44234910f669a29119de33018967
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 12:48:22 +0200
+
+ xz: Fix displaying of file sizes in progress indicator in passthru mode.
+
+ It worked for one input file since the counters are zero when
+ xz starts but they weren't reset when starting a new file in
+ passthru mode. For example, if files A, B, and C are one byte each,
+ then "xz -dcvf A B C" would show file sizes as 1, 2, and 3 bytes
+ instead of 1, 1, and 1 byte.
+
+ src/xz/coder.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 69265d0f223ddf1d66f799b8b047df22923e376f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-09 11:27:20 +0200
+
+ xz: Add a comment why --to-stdout is not in --help.
+
+ It is on the man page still.
+
+ src/xz/message.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit fe6b8852a3c6a0eb5a3c33512e0a69af257d3bc7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 23:05:37 +0200
+
+ xz: Make xz -lvv show that the upcoming --arm64 needs 5.4.0 to decompress.
+
+ src/xz/list.c | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+commit fb3f05ac9f2b4b0e3643401960fbeab31997ac7a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 22:26:54 +0200
+
+ Docs: Update faq.txt a little.
+
+ doc/faq.txt | 66 ++++++++++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 43 insertions(+), 23 deletions(-)
+
+commit 05331f091ec3b68eccbfb2a9a7a576072768fb4b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 16:57:17 +0200
+
+ Translations: Update Turkish translation.
+
+ po/tr.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ed3a4822963b4940d84e6f44d47277c394fc046d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 14:55:32 +0200
+
+ Translations: Update Croatian translation.
+
+ po/hr.po | 190 ++++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 96 insertions(+), 94 deletions(-)
+
+commit 4746f5ec721316bc4c6fec9905b2902e0360e0af
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 14:13:03 +0200
+
+ liblzma: Update API docs about decoder flags.
+
+ src/liblzma/api/lzma/container.h | 21 +++++++++++++++++----
+ 1 file changed, 17 insertions(+), 4 deletions(-)
+
+commit 8779a9db5d0cec00c9dc9e9965dd2dda04f9d80d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 14:01:50 +0200
+
+ liblzma: Use the return_if_error() macro in alone_decoder.c.
+
+ src/liblzma/common/alone_decoder.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+commit 3f4990b6822961e75cd9b4e2e82b1df63f6f8fcc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 14:00:58 +0200
+
+ liblzma: Fix a comment in auto_decoder.c.
+
+ src/liblzma/common/auto_decoder.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 026a5897c72a2041ae08ceec54ce8b1cdeb51334
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-08 13:43:19 +0200
+
+ xz: Initialize the pledge(2) sandbox at the very beginning of main().
+
+ It feels better that the initializations are sandboxed too.
+ They don't do anything that the pledge() call wouldn't allow.
+
+ src/xz/main.c | 27 ++++++++++++++-------------
+ 1 file changed, 14 insertions(+), 13 deletions(-)
+
+commit 49a59f6ca001c3ce9affa2c162b437aad021b4d5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-07 22:51:16 +0200
+
+ xz: Extend --robot --info-memory output.
+
+ Now it includes everything that the human-readable --info-memory shows.
+
+ src/xz/hardware.c | 24 +++++++++++++++---------
+ src/xz/xz.1 | 47 +++++++++++++++++++++++++++++++++++++++++------
+ 2 files changed, 56 insertions(+), 15 deletions(-)
+
+commit 5e2450c75cbac966c62cf2231c824f2cc91ddba8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-11-07 17:22:04 +0200
+
+ liblzma: Include cached memory in reported memusage in threaded decoder.
+
+ This affects lzma_memusage() and lzma_memlimit_set() when used
+ with the threaded decompressor. Now all allocations are reported
+ by lzma_memusage() (so it's not misleading) and lzma_memlimit_set()
+ cannot lower the limit below that value.
+
+ The alternative would have been to allow lowering the limit if
+ doing so is possible by freeing the cached memory but since
+ the primary use case of lzma_memlimit_set() is to increase
+ memlimit after LZMA_MEMLIMIT_ERROR this simple approach
+ was selected.
+
+ The cached memory was always included when enforcing
+ the memory usage limit while decoding.
+
+ Thanks to Jia Tan.
+
+ src/liblzma/common/stream_decoder_mt.c | 22 +++++++++++++++++++---
+ 1 file changed, 19 insertions(+), 3 deletions(-)
+
+commit 1fc6e7dd1fabdb60124d449b99273330ccab3ff1
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-11-07 16:24:14 +0200
+
+ xz: Avoid a compiler warning in progress_speed() in message.c.
+
+ This should be smaller too since it avoids the string constants.
+
+ src/xz/message.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+commit cf118c014683069b5dbe91898acdc40f2f0a1f5d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-31 16:26:05 +0200
+
+ Build: Clarify comment in configure.ac about SSE2.
+
+ configure.ac | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit aad3c609ffb72f581a7a2b67be3ad70b2b327840
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-31 16:16:37 +0200
+
+ Build: Remove obsolete commented-out lines from configure.ac.
+
+ configure.ac | 4 ----
+ 1 file changed, 4 deletions(-)
+
+commit e53e0e2186c6b8ce866bd19aec52f1c318ed31ba
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-31 13:31:58 +0200
+
+ Windows: Fix mythread_once() macro with Vista threads.
+
+ Don't call InitOnceComplete() if initialization was already done.
+
+ So far mythread_once() has been needed only when building
+ with --enable-small. windows/build.bash does this together
+ with --disable-threads so the Vista-specific mythread_once()
+ is never needed by those builds. VS project files or
+ CMake-builds don't support HAVE_SMALL builds at all.
+
+ src/common/mythread.h | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 48dde3bab9dc04081acb5aa7cf7c5044b8a49f58
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-31 11:54:44 +0200
+
+ liblzma: Silence -Wconversion warning from crc64_fast.c.
+
+ src/liblzma/check/crc64_fast.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit a243c617ff249d915ac123de4f536b80322c1fdb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-31 11:49:47 +0200
+
+ CMake: Sync tuklib_cpucores.cmake with tuklib_cpucores.m4.
+
+ This was forgotten from commit 2611c4d90535652d3eb7ef4a026a6691276fab43.
+
+ cmake/tuklib_cpucores.cmake | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 05c72de06fcaaedc78f8abba7d5ec568ddcf1e75
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-27 15:49:18 +0300
+
+ Tests: test_files.sh: Make it not fail if features were disabled at build.
+
+ It now tries to test as many files as easily possible.
+ The exit status indicates skipping if any of the files were
+ skipped. This way it is easy to notice if something is being
+ skipped when it isn't expected.
+
+ tests/test_files.sh | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 46 insertions(+), 4 deletions(-)
+
+commit b3459327a51f4b8239d19e6c34b4e0c6bc2d81de
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-27 15:30:13 +0300
+
+ Tests: test_files.sh: Suppress an expected warning from the log.
+
+ xz (but not xzdec) will normally warn about unsupported check
+ but since we are testing specifically such a file, it's better
+ to silence that warning so that it doesn't look suspicious in
+ test_files.sh.log.
+
+ The use of -q and -Q in xzdec is just for consistency and
+ doesn't affect the result at least for now.
+
+ tests/test_files.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 798c86e4231e0835ab76ccd0810c8ea30833b2ce
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-27 15:27:50 +0300
+
+ Tests: test_files.sh: Print the reason for skipping if xz & xzdec missing.
+
+ tests/test_files.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit c1dd8524e1af07f16b790463899de06a6a5fcc08
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-27 01:12:40 +0300
+
+ Tests: Keep test_compress_* working when some filters are unavailable.
+
+ tests/test_compress.sh | 34 ++++++++++++++++++++--------------
+ 1 file changed, 20 insertions(+), 14 deletions(-)
+
+commit ce30ada91951d0746879ae438da11f1ee8a90aa0
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-10-23 21:01:08 +0800
+
+ Tests: test_bcj_exact_size skips properly now if PowerPC filter disabled.
+
+ tests/test_bcj_exact_size.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 89c5cfcacaca7130509fac836e2f30c46b824502
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-26 00:05:57 +0300
+
+ Tests: Test also unsupported-*.xz.
+
+ tests/test_files.sh | 37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+commit a4b214b93ac741edef9c41e55865b0b867ca2587
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 23:45:03 +0300
+
+ Build: Use AC_CONFIG_HEADERS instead of the ancient AC_CONFIG_HEADER.
+
+ We require Autoconf >= 2.69 and that has AC_CONFIG_HEADERS.
+
+ There is a warning about AC_PROG_CC_C99 being obsolete but
+ it cannot be removed because it is needed with Autoconf 2.69.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 04f299b64e73f50afc188c2590ebebc6b73ed744
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 23:31:44 +0300
+
+ Build: Update m4/ax_pthread.m4 from Autoconf Archive.
+
+ m4/ax_pthread.m4 | 29 ++++++++++++++++++++++-------
+ 1 file changed, 22 insertions(+), 7 deletions(-)
+
+commit 59c4d6e1390f6f4176f43ac1dad1f7ac03c449b8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 23:28:34 +0300
+
+ Build: Add configure option --disable-microlzma.
+
+ MicroLZMA was made for EROFS and used by erofs-utils.
+ It might be used by something else in the future but
+ those wanting a smaller build for specific situations
+ can now disable this rarely-needed feature.
+
+ configure.ac | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+commit 054ccd6d14b2cc6eddc56897af280d3221414150
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 23:09:11 +0300
+
+ xz: Fix --single-stream with an empty .xz Stream.
+
+ Example:
+
+ $ xz -dc --single-stream good-0-empty.xz
+ xz: good-0-empty.xz: Internal error (bug)
+
+ The code, that is tries to catch some input file issues early,
+ didn't anticipate LZMA_STREAM_END which is possible in that
+ code only when --single-stream is used.
+
+ src/xz/coder.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+commit 563288ea705e83ff5cb292adf794650c263bca1d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 21:11:58 +0300
+
+ xz: Add support for OpenBSD's pledge() sandbox.
+
+ configure.ac | 12 +++++++++---
+ src/xz/file_io.c | 11 +++++++++++
+ src/xz/main.c | 13 +++++++++++++
+ src/xz/private.h | 2 +-
+ 4 files changed, 34 insertions(+), 4 deletions(-)
+
+commit f9913e8ee2ba0b1e4ff4d0aa4c001aae305ed944
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 19:07:17 +0300
+
+ xz: Fix decompressor behavior if input uses an unsupported check type.
+
+ Now files with unsupported check will make xz display
+ a warning, set the exit status to 2 (unless --no-warn is used),
+ and then decompress the file normally. This is how it was
+ supposed to work since the beginning but this was broken by
+ the commit 231c3c7098f1099a56abb8afece76fc9b8699f05, that is,
+ a little before 5.0.0 was released. The buggy behavior displayed
+ a message, set exit status 1 (error), and xz didn't attempt to
+ to decompress the file.
+
+ This doesn't matter today except for special builds that disable
+ CRC64 or SHA-256 at build time (but such builds should be used
+ in special situations only). The bug matters if new check type
+ is added in the future and an old xz version is used to decompress
+ such a file; however, it's likely that such files would use a new
+ filter too and an old xz wouldn't be able to decompress the file
+ anyway.
+
+ The first hunk in the commit is the actual fix. The second hunk
+ is a cleanup since LZMA_TELL_ANY_CHECK isn't used in xz.
+
+ There is a test file for unsupported check type but it wasn't
+ used by test_files.sh, perhaps due to different behavior between
+ xz and the simpler xzdec.
+
+ src/xz/coder.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+commit aa4fe145b9486adc454f44fd3e09be9add808a0f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 18:36:19 +0300
+
+ xz: Clarify the man page: input file isn't removed if an error occurs.
+
+ src/xz/xz.1 | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit 8b46ae8cdeddfd7dc01fec92971b8696e9a96c5d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 18:30:55 +0300
+
+ xz: Refactor to remove is_empty_filename().
+
+ Long ago it was used in list.c too but nowadays it's needed
+ only in io_open_src() so it's nicer to avoid a separate function.
+
+ src/xz/file_io.c | 4 +++-
+ src/xz/util.c | 12 ------------
+ src/xz/util.h | 4 ----
+ 3 files changed, 3 insertions(+), 17 deletions(-)
+
+commit 85624015978b0de294cff3df79006df987c552b1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-25 18:23:54 +0300
+
+ xz: If input file cannot be removed, treat it as a warning, not error.
+
+ Treating it as a warning (message + exit status 2) matches gzip
+ and it seems more logical as at that point the output file has
+ already been successfully closed. When it's a warning it is
+ possible to suppress it with --no-warn.
+
+ src/xz/file_io.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit fda9f85f52c546f7ca0313cf89481da4707fecb3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-24 16:25:09 +0300
+
+ liblzma: Threaded decoder: Stop the worker threads on errors.
+
+ It's waste of CPU time and electricity to leave the unfinished
+ worker threads running when it is known that their output will
+ get ignored.
+
+ src/liblzma/common/stream_decoder_mt.c | 33 ++++++++++++++++++++++++++-------
+ 1 file changed, 26 insertions(+), 7 deletions(-)
+
+commit 2611c4d90535652d3eb7ef4a026a6691276fab43
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-20 20:22:50 +0300
+
+ tuklib_cpucores: Use HW_NCPUONLINE on OpenBSD.
+
+ On OpenBSD the number of cores online is often less
+ than what HW_NCPU would return because OpenBSD disables
+ simultaneous multi-threading (SMT) by default.
+
+ Thanks to Christian Weisgerber.
+
+ m4/tuklib_cpucores.m4 | 5 +++++
+ src/common/tuklib_cpucores.c | 9 +++++++++
+ 2 files changed, 14 insertions(+)
+
+commit 424ac91c7e0419393ff2bde4f62e21fa611c776d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-19 19:39:35 +0300
+
+ Tests: Skip tests in test_*.sh if encoders and/or decoders are disabled.
+
+ This isn't perfect as the scripts can still fail if only
+ certain filters are disabled. This is still an improvement
+ as now "make check" has better behavior when all encoders
+ or decoders are disabled.
+
+ Grepping ../config.h is simple and fairly clean but it only
+ works if config.h was created. CMake builds don't create
+ config.h but they don't use these test scripts either.
+
+ Thanks to Sebastian Andrzej Siewior for reporting the problem.
+ Thanks to Jia Tan for the original patch which grepped xz
+ error messages instead of config.h.
+
+ tests/test_compress.sh | 12 ++++++++++++
+ tests/test_files.sh | 11 +++++++++++
+ tests/test_scripts.sh | 11 +++++++++++
+ 3 files changed, 34 insertions(+)
+
+commit ca8bf9d7c5a30be8ba1eeb106fd892f19e83ed09
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-19 18:54:34 +0300
+
+ Test: Remove the (exit 1) lines.
+
+ I suspect that I used these in the original version because
+ Autoconf's manual describes that such a trick is needed in
+ some specific situations for portability reasons. None of those
+ situations listed on Autoconf 2.71 manual apply to these test
+ scripts though so this cleans them up.
+
+ tests/test_compress.sh | 10 ----------
+ tests/test_files.sh | 9 ---------
+ tests/test_scripts.sh | 6 ------
+ 3 files changed, 25 deletions(-)
+
+commit 82fcb7cfc17ce62f79ebc7ca2374e1daca5e4d5e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-19 17:14:57 +0300
+
+ Tests: Fix a warning in test_memlimit.c when decoders are disabled.
+
+ tests/test_memlimit.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit b5f8271b45b9b0e59485ffba3640ca3418835ec4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-19 17:11:46 +0300
+
+ Tests: Add test_memlimit to .gitignore.
+
+ Thanks to Jia Tan.
+
+ .gitignore | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6a86e81cab202d0a812a7b2e9efacaf70c58ba38
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-10-06 21:53:09 +0300
+
+ Tests: Refactor test_stream_flags.c.
+
+ Converts test_stream_flags to tuktest. Also the test will now
+ compile and skip properly if encoders or decoders are disabled.
+
+ Thanks to Sebastian Andrzej Siewior.
+
+ tests/test_stream_flags.c | 533 ++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 416 insertions(+), 117 deletions(-)
+
+commit 827ac5b4821491fd3afe0d0e1ddac326253aeb66
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-10-06 17:00:38 +0800
+
+ Tests: Refactor test_block_header.c.
+
+ test_block_header now achieves higher test coverage. Also the
+ test will now compile and skip properly if encoders or decoders
+ are disabled.
+
+ Thanks to Sebastian Andrzej Siewior.
+
+ tests/test_block_header.c | 486 +++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 370 insertions(+), 116 deletions(-)
+
+commit 84963318952064a93bfc52edd6b0ef70593384ee
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-10-05 23:54:12 +0800
+
+ Tests: Fix compilation issues.
+
+ test_bcj_exact_size, test_check, test_hardware, and test_index will
+ all now compile and skip properly if encoders or decoders are disabled.
+
+ Also fixed a small typo (disabed -> disabled).
+
+ Thanks to Sebastian Andrzej Siewior.
+
+ tests/test_bcj_exact_size.c | 20 ++++++++++++++------
+ tests/test_check.c | 8 +++++++-
+ tests/test_hardware.c | 2 +-
+ tests/test_index.c | 6 ++++++
+ tests/test_memlimit.c | 16 +++++++++++++++-
+ tests/test_vli.c | 13 +++++++++++++
+ 6 files changed, 56 insertions(+), 9 deletions(-)
+
+commit 7dcabeec63d46b436fa5f043c3d1f09d0e15be16
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-05 16:20:47 +0300
+
+ Tests: Include mythread.h in the tests that use MYTHREAD_ENABLED.
+
+ tests/test_check.c | 1 +
+ tests/test_hardware.c | 1 +
+ tests/test_memlimit.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+commit 14af758a770c7781af18fb66d6d21ee5b1c27f04
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-10-05 20:57:16 +0800
+
+ liblzma: Fix a compilation issue when encoders are disabled.
+
+ When encoders were disabled and threading enabled, outqueue.c and
+ outqueue.h were not compiled. The multi threaded decoder required
+ these files, so compilation failed.
+
+ src/liblzma/common/Makefile.inc | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 6ca5c354bd4620aa7f81da68870eef1b1f26288f
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-10-05 16:41:38 +0800
+
+ Tests: Fix compilation error when threading support has been disabled.
+
+ Now tests that require threading are skipped when threading
+ support has been disabled.
+
+ Thanks to Sebastian Andrzej Siewior.
+
+ tests/test_check.c | 4 ++++
+ tests/test_hardware.c | 4 ++++
+ tests/test_memlimit.c | 4 ++++
+ 3 files changed, 12 insertions(+)
+
+commit fae37ad2affd8fe8871f4ff93d5cab5ec14d5e58
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-10-05 14:26:00 +0300
+
+ tuklib_integer: Add 64-bit endianness-converting reads and writes.
+
+ Also update the comment in liblzma's memcmplen.h.
+
+ Thanks to Michał Górny for the original patch for the reads.
+
+ m4/tuklib_integer.m4 | 8 ++++----
+ src/common/tuklib_integer.h | 46 ++++++++++++++++++++++++++++++++++++++++--
+ src/liblzma/common/memcmplen.h | 9 +++------
+ 3 files changed, 51 insertions(+), 12 deletions(-)
+
+commit 508a44372c5b0dede8863fd0d358d4a9d8645c95
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-30 12:06:13 +0300
+
+ liblzma: Add API doc note about the .xz decoder LZMA_MEMLIMIT_ERROR bug.
+
+ The bug was fixed in 660739f99ab211edec4071de98889fb32ed04e98.
+
+ src/liblzma/api/lzma/base.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit 8cc9874a7974cd575aee44f218836f7acdbeb0ed
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-09-21 16:15:50 +0800
+
+ liblzma: Add dest and src NULL checks to lzma_index_cat.
+
+ The documentation states LZMA_PROG_ERROR can be returned from
+ lzma_index_cat. Previously, lzma_index_cat could not return
+ LZMA_PROG_ERROR. Now, the validation is similar to
+ lzma_index_append, which does a NULL check on the index
+ parameter.
+
+ src/liblzma/common/index.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit afd5a8bf5374eba82804a999e1ea7af680784086
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-09-21 20:29:28 +0800
+
+ Tests: Create a test for the lzma_index_cat bug.
+
+ tests/test_index.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 42 insertions(+), 1 deletion(-)
+
+commit 3d5a99ca373a4e86faf671226ca6487febb9eeac
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-09-21 19:28:53 +0800
+
+ liblzma: Fix copying of check type statistics in lzma_index_cat().
+
+ The check type of the last Stream in dest was never copied to
+ dest->checks (the code tried to copy it but it was done too late).
+ This meant that the value returned by lzma_index_checks() would
+ only include the check type of the last Stream when multiple
+ lzma_indexes had been concatenated.
+
+ In xz --list this meant that the summary would only list the
+ check type of the last Stream, so in this sense this was only
+ a visual bug. However, it's possible that some applications
+ use this information for purposes other than merely showing
+ it to the users in an informational message. I'm not aware of
+ such applications though and it's quite possible that such
+ applications don't exist.
+
+ Regular streamed decompression in xz or any other application
+ doesn't use lzma_index_cat() and so this bug cannot affect them.
+
+ src/liblzma/common/index.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+commit a61d32172789735350a941e23baf6b587c49e5d9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-28 12:20:41 +0300
+
+ tuklib_physmem: Fix Unicode builds on Windows.
+
+ Thanks to ArSaCiA Game.
+
+ src/common/tuklib_physmem.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5a4d3548ab214fdca364d5c734baf1d1fab47308
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-28 11:12:07 +0300
+
+ Tests: Add test_memlimit.c to test restarting after LZMA_MEMLIMIT_ERROR.
+
+ tests/Makefile.am | 2 +
+ tests/test_memlimit.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 153 insertions(+)
+
+commit 660739f99ab211edec4071de98889fb32ed04e98
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-28 11:05:15 +0300
+
+ liblzma: Stream decoder: Fix restarting after LZMA_MEMLIMIT_ERROR.
+
+ If lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
+ to use lzma_memlimit_set() to increase the limit and continue
+ decoding. This was supposed to work from the beginning but
+ there was a bug. With other decoders (.lzma or threaded .xz)
+ this already worked correctly.
+
+ src/liblzma/common/stream_decoder.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+commit 7e68fda58c74ad9e5b876cc22fcbe80fc0e4747b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-28 11:00:23 +0300
+
+ liblzma: Stream decoder: Fix comments.
+
+ src/liblzma/common/stream_decoder.c | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+commit f664cb25841fc1c478b819034a224a558e2ac6e7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-20 16:58:22 +0300
+
+ liblzma: ARM64: Add comments.
+
+ src/liblzma/simple/arm64.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+commit b557b4a0eea05470fae8ba5ef4ad5a6dfb36ac41
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-20 16:27:50 +0300
+
+ liblzma: ARM64: Fix wrong comment in API doc.
+
+ Thanks to Jia Tan.
+
+ src/liblzma/api/lzma/bcj.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit d5b0906fa55157f48c200188a3951d80df9cb308
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-19 20:24:26 +0300
+
+ xz: Add --experimental-arm64[=width=WIDTH].
+
+ It will be renamed to --arm64 once it is stable.
+
+ Man page or --long-help weren't updated yet.
+
+ src/xz/args.c | 7 +++++++
+ src/xz/message.c | 7 +++++++
+ src/xz/options.c | 39 +++++++++++++++++++++++++++++++++++++++
+ src/xz/options.h | 7 +++++++
+ 4 files changed, 60 insertions(+)
+
+commit ecb966de308c255bb4735a7307ef9901c643a9de
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-19 19:34:56 +0300
+
+ liblzma: Add experimental ARM64 BCJ filter with a temporary Filter ID.
+
+ That is, the Filter ID will be changed once the design is final.
+ The current version will be removed. So files created with the
+ tempoary Filter ID won't be supported in the future.
+
+ CMakeLists.txt | 3 +
+ configure.ac | 4 +-
+ src/liblzma/api/lzma/bcj.h | 35 +++++-
+ src/liblzma/common/filter_common.c | 9 ++
+ src/liblzma/common/filter_decoder.c | 8 ++
+ src/liblzma/common/filter_encoder.c | 11 ++
+ src/liblzma/simple/Makefile.inc | 4 +
+ src/liblzma/simple/arm64.c | 227 ++++++++++++++++++++++++++++++++++++
+ src/liblzma/simple/simple_coder.h | 9 ++
+ src/liblzma/simple/simple_decoder.h | 4 +
+ src/liblzma/simple/simple_encoder.h | 2 +
+ 11 files changed, 313 insertions(+), 3 deletions(-)
+
+commit 177bdc922cb17bd0fd831ab8139dfae912a5c2b8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-17 22:42:18 +0300
+
+ liblzma: Simple/BCJ filters: Allow disabling generic BCJ options.
+
+ This will be needed for the ARM64 BCJ filter as it will use
+ its own options struct.
+
+ src/liblzma/simple/arm.c | 2 +-
+ src/liblzma/simple/armthumb.c | 2 +-
+ src/liblzma/simple/ia64.c | 2 +-
+ src/liblzma/simple/powerpc.c | 2 +-
+ src/liblzma/simple/simple_coder.c | 4 ++--
+ src/liblzma/simple/simple_private.h | 2 +-
+ src/liblzma/simple/sparc.c | 2 +-
+ src/liblzma/simple/x86.c | 3 ++-
+ 8 files changed, 10 insertions(+), 9 deletions(-)
+
+commit c3592d0a55114144686ecf960cb516d6b31c98e9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-16 17:08:53 +0300
+
+ Tests: Add a test file for lzma_index_append() integer overflow bug.
+
+ This test fails before commit 18d7facd3802b55c287581405c4d49c98708c136.
+
+ test_files.sh now runs xz -l for bad-3-index-uncomp-overflow.xz
+ because only then the previously-buggy code path gets tested.
+ Normal decompression doesn't use lzma_index_append() at all.
+ Instead, lzma_index_hash functions are used and those already
+ did the overflow check.
+
+ tests/files/README | 10 ++++++++++
+ tests/files/bad-3-index-uncomp-overflow.xz | Bin 0 -> 132 bytes
+ tests/test_files.sh | 8 ++++++++
+ 3 files changed, 18 insertions(+)
+
+commit 982b29f828079a2a26253a40e975127a40a7d2bd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-16 15:10:07 +0300
+
+ Translations: Add Turkish translation.
+
+ po/LINGUAS | 1 +
+ po/tr.po | 977 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 978 insertions(+)
+
+commit 1fc088d9f6d1697924aaeac8cd1fb9918d1532e2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-16 14:09:07 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 097c7b67ce86ff16a7cef7631b39e5ca4ee3d420
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-16 14:07:03 +0300
+
+ xzgrep: Fix compatibility with old shells.
+
+ Running the current xzgrep on Slackware 10.1 with GNU bash 3.00.15:
+
+ xzgrep: line 231: syntax error near unexpected token `;;'
+
+ On SCO OpenServer 5.0.7 with Korn Shell 93r:
+
+ syntax error at line 231 : `;;' unexpected
+
+ Turns out that some old shells don't like apostrophes (') inside
+ command substitutions. For example, the following fails:
+
+ x=$(echo foo
+ # asdf'zxcv
+ echo bar)
+ printf '%s\n' "$x"
+
+ The problem was introduced by commits
+ 69d1b3fc29677af8ade8dc15dba83f0589cb63d6 (2022-03-29),
+ bd7b290f3fe4faeceb7d3497ed9bf2e6ed5e7dc5 (2022-07-18), and
+ a648978b20495b7aa4a8b029c5a810b5ad9d08ff (2022-07-19).
+ 5.2.6 is the only stable release that included
+ this problem.
+
+ Thanks to Kevin R. Bulgrien for reporting the problem
+ on SCO OpenServer 5.0.7 and for providing the fix.
+
+ src/scripts/xzgrep.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit f2d084fe3f0d6d71488bfc6987f26542f67bfd99
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-09 14:12:30 +0300
+
+ Tests: Silence warnings about unused functions from tuktest.h.
+
+ Warnings about unused tuktest_run_test conveniently tell which
+ test programs haven't been converted to tuktest.h yet but I
+ silenced that warning too for now anyway.
+
+ It is fine to use __attribute__((__unused__)) even when the
+ function is actually used because the attribute only means
+ that the function might be unused.
+
+ tests/tuktest.h | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit f8ee61e74eb40600445fdb601c374d582e1e9c8a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-09 13:51:57 +0300
+
+ liblzma: lzma_filters_copy: Keep dest[] unmodified if an error occurs.
+
+ lzma_stream_encoder() and lzma_stream_encoder_mt() always assumed
+ this. Before this patch, failing lzma_filters_copy() could result
+ in free(invalid_pointer) or invalid memory reads in stream_encoder.c
+ or stream_encoder_mt.c.
+
+ To trigger this, allocating memory for a filter options structure
+ has to fail. These are tiny allocations so in practice they very
+ rarely fail.
+
+ Certain badness in the filter chain array could also make
+ lzma_filters_copy() fail but both stream_encoder.c and
+ stream_encoder_mt.c validate the filter chain before
+ trying to copy it, so the crash cannot occur this way.
+
+ src/liblzma/api/lzma/filter.h | 4 +++-
+ src/liblzma/common/filter_common.c | 18 ++++++++++++------
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+commit 18d7facd3802b55c287581405c4d49c98708c136
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-09-02 20:18:55 +0800
+
+ liblzma: lzma_index_append: Add missing integer overflow check.
+
+ The documentation in src/liblzma/api/lzma/index.h suggests that
+ both the unpadded (compressed) size and the uncompressed size
+ are checked for overflow, but only the unpadded size was checked.
+ The uncompressed check is done first since that is more likely to
+ occur than the unpadded or index field size overflows.
+
+ src/liblzma/common/index.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 9ac06cb5b85274d18f9f70d82cf2d8c9c1151bd4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-08 15:11:08 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit ba3e4ba2de034ae93a513f9c3a0823b80cdb66dc
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-09-08 15:07:00 +0300
+
+ CMake: Clarify a comment about Windows symlinks without file extension.
+
+ CMakeLists.txt | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+commit 17485e884ce5c74315f29a8a1507bc706cd5cd1d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-08 15:02:41 +0300
+
+ CMake: Update for liblzma_*.map files and fix wrong common_w32res.rc dep.
+
+ The previous commit split liblzma.map into liblzma_linux.map and
+ liblzma_generic.map. This commit updates the CMake build for those.
+
+ common_w32res.rc dependency was listed under Linux/FreeBSD while
+ obviously it belongs to Windows when building a DLL.
+
+ CMakeLists.txt | 24 +++++++++++++++++++-----
+ 1 file changed, 19 insertions(+), 5 deletions(-)
+
+commit 913ddc5572b9455fa0cf299be2e35c708840e922
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-09-04 23:23:00 +0300
+
+ liblzma: Vaccinate against an ill patch from RHEL/CentOS 7.
+
+ RHEL/CentOS 7 shipped with 5.1.2alpha, including the threaded
+ encoder that is behind #ifdef LZMA_UNSTABLE in the API headers.
+ In 5.1.2alpha these symbols are under XZ_5.1.2alpha in liblzma.map.
+ API/ABI compatibility tracking isn't done between development
+ releases so newer releases didn't have XZ_5.1.2alpha anymore.
+
+ Later RHEL/CentOS 7 updated xz to 5.2.2 but they wanted to keep
+ the exported symbols compatible with 5.1.2alpha. After checking
+ the ABI changes it turned out that >= 5.2.0 ABI is backward
+ compatible with the threaded encoder functions from 5.1.2alpha
+ (but not vice versa as fixes and extensions to these functions
+ were made between 5.1.2alpha and 5.2.0).
+
+ In RHEL/CentOS 7, XZ Utils 5.2.2 was patched with
+ xz-5.2.2-compat-libs.patch to modify liblzma.map:
+
+ - XZ_5.1.2alpha was added with lzma_stream_encoder_mt and
+ lzma_stream_encoder_mt_memusage. This matched XZ Utils 5.1.2alpha.
+
+ - XZ_5.2 was replaced with XZ_5.2.2. It is clear that this was
+ an error; the intention was to keep using XZ_5.2 (XZ_5.2.2
+ has never been used in XZ Utils). So XZ_5.2.2 lists all
+ symbols that were listed under XZ_5.2 before the patch.
+ lzma_stream_encoder_mt and _mt_memusage are included too so
+ they are listed both here and under XZ_5.1.2alpha.
+
+ The patch didn't add any __asm__(".symver ...") lines to the .c
+ files. Thus the resulting liblzma.so exports the threaded encoder
+ functions under XZ_5.1.2alpha only. Listing the two functions
+ also under XZ_5.2.2 in liblzma.map has no effect without
+ matching .symver lines.
+
+ The lack of XZ_5.2 in RHEL/CentOS 7 means that binaries linked
+ against unpatched XZ Utils 5.2.x won't run on RHEL/CentOS 7.
+ This is unfortunate but this alone isn't too bad as the problem
+ is contained within RHEL/CentOS 7 and doesn't affect users
+ of other distributions. It could also be fixed internally in
+ RHEL/CentOS 7.
+
+ The second problem is more serious: In XZ Utils 5.2.2 the API
+ headers don't have #ifdef LZMA_UNSTABLE for obvious reasons.
+ This is true in RHEL/CentOS 7 version too. Thus now programs
+ using new APIs can be compiled without an extra #define. However,
+ the programs end up depending on symbol version XZ_5.1.2alpha
+ (and possibly also XZ_5.2.2) instead of XZ_5.2 as they would
+ with an unpatched XZ Utils 5.2.2. This means that such binaries
+ won't run on other distributions shipping XZ Utils >= 5.2.0 as
+ they don't provide XZ_5.1.2alpha or XZ_5.2.2; they only provide
+ XZ_5.2 (and XZ_5.0). (This includes RHEL/CentOS 8 as the patch
+ luckily isn't included there anymore with XZ Utils 5.2.4.)
+
+ Binaries built by RHEL/CentOS 7 users get distributed and then
+ people wonder why they don't run on some other distribution.
+ Seems that people have found out about the patch and been copying
+ it to some build scripts, seemingly curing the symptoms but
+ actually spreading the illness further and outside RHEL/CentOS 7.
+
+ The ill patch seems to be from late 2016 (RHEL 7.3) and in 2017 it
+ had spread at least to EasyBuild. I heard about the events only
+ recently. :-(
+
+ This commit splits liblzma.map into two versions: one for
+ GNU/Linux and another for other OSes that can use symbol versioning
+ (FreeBSD, Solaris, maybe others). The Linux-specific file and the
+ matching additions to .c files add full compatibility with binaries
+ that have been built against a RHEL/CentOS-patched liblzma. Builds
+ for OSes other than GNU/Linux won't get the vaccine as they should
+ be immune to the problem (I really hope that no build script uses
+ the RHEL/CentOS 7 patch outside GNU/Linux).
+
+ The RHEL/CentOS compatibility symbols XZ_5.1.2alpha and XZ_5.2.2
+ are intentionally put *after* XZ_5.2 in liblzma_linux.map. This way
+ if one forgets to #define HAVE_SYMBOL_VERSIONS_LINUX when building,
+ the resulting liblzma.so.5 will have lzma_stream_encoder_mt@@XZ_5.2
+ since XZ_5.2 {...} is the first one that lists that function.
+ Without HAVE_SYMBOL_VERSIONS_LINUX @XZ_5.1.2alpha and @XZ_5.2.2
+ will be missing but that's still a minor problem compared to
+ only having lzma_stream_encoder_mt@@XZ_5.1.2alpha!
+
+ The "local: *;" line was moved to XZ_5.0 so that it doesn't need
+ to be moved around. It doesn't matter where it is put.
+
+ Having two similar liblzma_*.map files is a bit silly as it is,
+ at least for now, easily possible to generate the generic one
+ from the Linux-specific file. But that adds extra steps and
+ increases the risk of mistakes when supporting more than one
+ build system. So I rather maintain two files in parallel and let
+ validate_map.sh check that they are in sync when "make mydist"
+ is run.
+
+ This adds .symver lines for lzma_stream_encoder_mt@XZ_5.2.2 and
+ lzma_stream_encoder_mt_memusage@XZ_5.2.2 even though these
+ weren't exported by RHEL/CentOS 7 (only @@XZ_5.1.2alpha was
+ for these two). I added these anyway because someone might
+ misunderstand the RHEL/CentOS 7 patch and think that @XZ_5.2.2
+ (@@XZ_5.2.2) versions were exported too.
+
+ At glance one could suggest using __typeof__ to copy the function
+ prototypes when making aliases. However, this doesn't work trivially
+ because __typeof__ won't copy attributes (lzma_nothrow, lzma_pure)
+ and it won't change symbol visibility from hidden to default (done
+ by LZMA_API()). Attributes could be copied with __copy__ attribute
+ but that needs GCC 9 and a fallback method would be needed anyway.
+
+ This uses __symver__ attribute with GCC >= 10 and
+ __asm__(".symver ...") with everything else. The attribute method
+ is required for LTO (-flto) support with GCC. Using -flto with
+ GCC older than 10 is now broken on GNU/Linux and will not be fixed
+ (can silently result in a broken liblzma build that has dangerously
+ incorrect symbol versions). LTO builds with Clang seem to work
+ with the traditional __asm__(".symver ...") method.
+
+ Thanks to Boud Roukema for reporting the problem and discussing
+ the details and testing the fix.
+
+ configure.ac | 23 +++-
+ src/liblzma/Makefile.am | 10 +-
+ src/liblzma/common/block_buffer_encoder.c | 18 ++++
+ src/liblzma/common/common.c | 14 +++
+ src/liblzma/common/common.h | 28 +++++
+ src/liblzma/common/hardware_cputhreads.c | 12 +++
+ src/liblzma/common/stream_encoder_mt.c | 42 ++++++++
+ src/liblzma/{liblzma.map => liblzma_generic.map} | 6 +-
+ src/liblzma/liblzma_linux.map | 131 +++++++++++++++++++++++
+ src/liblzma/validate_map.sh | 113 +++++++++++++++++--
+ 10 files changed, 382 insertions(+), 15 deletions(-)
+
+commit 80a1a8bb838842a2be343bd88ad1462c21c5e2c9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-31 16:42:04 +0300
+
+ CMake: Add xz symlinks.
+
+ These are a minor thing especially since the xz build has
+ some real problems still like lack of large file support
+ on 32-bit systems but I'll commit this since the code exists.
+
+ Thanks to Jia Tan.
+
+ CMakeLists.txt | 38 +++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 37 insertions(+), 1 deletion(-)
+
+commit a4193bb6d85d7765b1b87faeab3e50106d3ab2e9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-31 16:29:38 +0300
+
+ CMake: Put xz man page install under if(UNIX) like is for xzdec.
+
+ Thanks to Jia Tan.
+
+ CMakeLists.txt | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+commit c1555b1a221a1427d4d650647531016d754bc4da
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-22 18:16:40 +0300
+
+ Bump version number for 5.3.3alpha.
+
+ src/liblzma/api/lzma/version.h | 2 +-
+ src/liblzma/liblzma.map | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 44fedddc11c3f6ec2f7fe35a3e38f15ca93f90eb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-22 18:13:56 +0300
+
+ Add NEWS for 5.3.3alpha.
+
+ NEWS | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 119 insertions(+)
+
+commit a93e235d7ca764cc19f8f9f9063b40ff361c3cfa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-12 17:59:41 +0300
+
+ Translations: Add Portuguese translation.
+
+ Jia Tan made white-space changes and also changed "Language: pt_BR\n"
+ to pt. The translator wasn't reached so I'm hoping these changes
+ are OK and will commit it without translator's approval.
+
+ Thanks to Pedro Albuquerque and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/pt.po | 1001 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 1002 insertions(+)
+
+commit e7cf5a946f25e40d77f45e41f0dee7d42a04e9ae
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-10 21:16:40 +0300
+
+ Translations: Add Serbian translation.
+
+ Quite a few white-space changes were made by Jia Tan to make
+ this look good. Contacting the translator didn't succeed so
+ I'm committing this without getting translator's approval.
+
+ Thanks to Мирослав Николић (Miroslav Nikolic) and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/sr.po | 987 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 988 insertions(+)
+
+commit cc8617ab53b1f2a4da212fa76c92fe538269c5de
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-04 23:51:36 +0300
+
+ Translations: Add Swedish translation.
+
+ Thanks to Sebastian Rasmussen and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/sv.po | 983 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 984 insertions(+)
+
+commit c613598c358b640682d0ca2aed38fa7df763e8c7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-04 23:40:27 +0300
+
+ Translations: Add Esperanto translation.
+
+ Thanks to Keith Bowes and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/eo.po | 984 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 985 insertions(+)
+
+commit 659a587d678f21e98e91d2751c31d4ce050c081a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-01 00:22:33 +0300
+
+ Translations: Add Catalan translation.
+
+ Thanks to Jordi Mas and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/ca.po | 1076 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 1077 insertions(+)
+
+commit 739fd8c9bdf1d85f57d56642aad87148d4779530
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-30 17:47:08 +0300
+
+ Translations: Add Ukrainian translation.
+
+ Thanks to Yuri Chornoivan and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/uk.po | 996 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 997 insertions(+)
+
+commit 73280550b111930c62a667e56add8fd574f80bc8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-30 17:45:26 +0300
+
+ Translators: Add Romanian translation.
+
+ Thanks to Remus-Gabriel Chelu and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/ro.po | 1016 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 1017 insertions(+)
+
+commit 2465f5b825152714b2c357d96c2422c31109d320
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-29 18:33:32 +0300
+
+ Translations: Update Brazilian Portuguese translation.
+
+ One msgstr was changed. The diff is long due to changes
+ in the source code line numbers in the comments.
+
+ Thanks to Rafael Fontenelle.
+
+ po/pt_BR.po | 186 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 92 insertions(+), 94 deletions(-)
+
+commit 434e1ffd3e62719d509da10b646216f5ef53fe4d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-29 18:04:44 +0300
+
+ Translations: Add Croatian translation.
+
+ Thanks to Božidar Putanec and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/hr.po | 987 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 988 insertions(+)
+
+commit 0732d0f7065c9bd48bfe4f5983144ae970c4a499
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-29 17:58:48 +0300
+
+ Translations: Add Spanish translation.
+
+ Thanks to Cristian Othón Martínez Vera and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/es.po | 984 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 985 insertions(+)
+
+commit 9899b0f82bc130998d1f1f618a6ab805b73f2696
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-29 17:49:43 +0300
+
+ Translations: Add Korean translation.
+
+ Thanks to Seong-ho Cho and Jia Tan.
+
+ po/LINGUAS | 1 +
+ po/ko.po | 972 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 973 insertions(+)
+
+commit 65217eaf6bd195f3ef027d4ac55d57b7d133d69f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-16 21:57:21 +0200
+
+ Translations: Rebuild cs.po to avoid incorrect fuzzy strings.
+
+ "make dist" updates the .po files and the fuzzy strings would
+ result in multiple very wrong translations.
+
+ po/cs.po | 592 ++++++++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 322 insertions(+), 270 deletions(-)
+
+commit e56ff423ee7af9e648e16b132f0d835d2cb4db26
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-16 17:30:39 +0200
+
+ Translations: Add partial Danish translation.
+
+ I made a few minor white space changes without getting them
+ approved by the Danish translation team.
+
+ po/LINGUAS | 1 +
+ po/da.po | 896 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 897 insertions(+)
+
+commit 43e09c62e77cb8807d932c81de4decbdb956e184
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-11 22:37:54 +0200
+
+ Translations: Add hu, zh_CN, and zh_TW.
+
+ I made a few white space changes to these without getting them
+ approved by the translation teams. (I tried to contact the hu and
+ zh_TW teams but didn't succeed. I didn't contact the zh_CN team.)
+
+ po/LINGUAS | 3 +
+ po/hu.po | 985 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ po/zh_CN.po | 963 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ po/zh_TW.po | 956 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 2907 insertions(+)
+
+commit 982b6b198ae1ffe6093236dd8a3d03d1415b912b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-11 14:33:30 +0200
+
+ Translations: Update vi.po to match the file from the TP.
+
+ The translated strings haven't been updated but word wrapping
+ is different.
+
+ po/vi.po | 407 ++++++++++++++++++++++++++++-----------------------------------
+ 1 file changed, 179 insertions(+), 228 deletions(-)
+
+commit 801f39691fc4abc6dd33d7653d498781b593f3eb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-11 14:18:03 +0200
+
+ Translations: Add fi and pt_BR, and update de, fr, it, and pl.
+
+ The German translation isn't identical to the file in
+ the Translation Project but the changes (white space changes
+ only) were approved by the translator Mario Blättermann.
+
+ po/LINGUAS | 2 +
+ po/de.po | 476 ++++++++++++++--------------
+ po/fi.po | 974 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ po/fr.po | 272 ++++++++--------
+ po/it.po | 479 ++++++++++++----------------
+ po/pl.po | 239 +++++++-------
+ po/pt_BR.po | 1001 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 7 files changed, 2697 insertions(+), 746 deletions(-)
+
+commit 311e4f85ede5d2f0bb71f3ad70b5b7db1b5adf33
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-22 17:27:19 +0300
+
+ xz: Try to clarify --memlimit-mt-decompress vs. --memlimit-compress.
+
+ src/xz/xz.1 | 31 +++++++++++++++++++------------
+ 1 file changed, 19 insertions(+), 12 deletions(-)
+
+commit df23c31000283c00e5ef1ca32a0bc3bb757bd707
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-22 16:46:18 +0300
+
+ CMake: Add liblzma tests.
+
+ Thanks to Jia Tan for the patch.
+
+ CMakeLists.txt | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 52 insertions(+), 1 deletion(-)
+
+commit 02a777f9c422d3b5ec895078530bb1a2b6f7bdf5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-19 23:32:22 +0300
+
+ xz: Revise --info-memory output.
+
+ The strings could be more descriptive but it's good
+ to have some version of this committed now.
+
+ --robot mode wasn't changed yet.
+
+ src/xz/hardware.c | 32 ++++++++++++++++++++++++++------
+ src/xz/xz.1 | 1 +
+ 2 files changed, 27 insertions(+), 6 deletions(-)
+
+commit f864f6d42eab57ea8ed82cc2dd19a03b51377442
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-19 23:12:02 +0300
+
+ xz: Update the man page for threaded decompression and memlimits.
+
+ This documents the changes made in commits
+ 6c6da57ae2aa962aabde6892442227063d87e88c,
+ cad299008cf73ec566f0662a9cf2b94f86a99659, and
+ 898faa97287a756231c663a3ed5165672b417207.
+
+ The --info-memory bit hasn't been finished yet
+ even though it's already mentioned in this commit
+ under --memlimit-mt-decompress and --threads.
+
+ src/xz/xz.1 | 148 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 121 insertions(+), 27 deletions(-)
+
+commit d13bfcc0056617dd648f655a01653932fad7067f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-18 17:49:16 +0300
+
+ Build: Include the CMake files in the distribution.
+
+ This was supposed to be done in 2020 with 5.2.5 release
+ already but it was noticed only today. 5.2.5 and 5.2.6
+ even mention experiemental CMake support in the NEWS entries.
+
+ Thanks to Olivier B. for reporting the problem.
+
+ Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit e66787bcfefdb93f19c974f895f65969a77937b0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-18 17:38:05 +0300
+
+ Windows: Fix broken liblzma.dll build with Visual Studio project files.
+
+ The bug was introduced in 352ba2d69af2136bc814aa1df1a132559d445616
+ "Windows: Fix building of resource files when config.h isn't used."
+
+ That commit fixed liblzma.dll build with CMake while keeping it
+ working with Autotools on Windows but the VS project files were
+ forgotten.
+
+ I haven't tested these changes.
+
+ Thanks to Olivier B. for reporting the bug and for the initial patch.
+
+ windows/vs2013/liblzma_dll.vcxproj | 6 ++++++
+ windows/vs2017/liblzma_dll.vcxproj | 6 ++++++
+ windows/vs2019/liblzma_dll.vcxproj | 6 ++++++
+ 3 files changed, 18 insertions(+)
+
+commit c4e8e5fb311225b8b48d34157891a640b2535e0c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-18 17:16:49 +0300
+
+ liblzma: Threaded decoder: Improve LZMA_FAIL_FAST when LZMA_FINISH is used.
+
+ It will now return LZMA_DATA_ERROR (not LZMA_OK or LZMA_BUF_ERROR)
+ if LZMA_FINISH is used and there isn't enough input to finish
+ decoding the Block Header or the Block. The use of LZMA_DATA_ERROR
+ is simpler and the less risky than LZMA_BUF_ERROR but this might
+ be changed before 5.4.0.
+
+ src/liblzma/api/lzma/container.h | 6 +++++
+ src/liblzma/common/stream_decoder_mt.c | 42 ++++++++++++++++++++++++++++++++++
+ 2 files changed, 48 insertions(+)
+
+commit 6dcf606e7efa2b259f0262f9e2f61e00116842d3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-12 18:31:47 +0300
+
+ Add NEWS for 5.2.6.
+
+ NEWS | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 121 insertions(+)
+
+commit 413b86fcf8934fae5a004f378a9483d37d8fcaab
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-08-12 14:28:41 +0300
+
+ Add Jia Tan to AUTHORS.
+
+ AUTHORS | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 352672732c346c546ff3c26d0605bc0ed1c8b7c7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-25 19:28:26 +0300
+
+ Build: Start the generated ChangeLog from around 5.2.0 instead of 5.0.0.
+
+ This makes ChangeLog smaller.
+
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6f6d11225d6016be2bbb55d845b66f6b04d048df
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-25 19:11:05 +0300
+
+ Translations: Change the copyright comment string to use with po4a.
+
+ This affects the second line in po4a/xz-man.pot. The man pages of
+ xzdiff, xzgrep, and xzmore are from GNU gzip and under GNU GPLv2+
+ while the rest of the man pages are in the public domain.
+
+ po4a/update-po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 61f8ec804abdb4c5dac01e8ae9b90c7be58a5c24
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-07-25 18:30:05 +0300
+
+ liblzma: Refactor lzma_mf_is_supported() to use a switch-statement.
+
+ src/liblzma/lz/lz_encoder.c | 32 ++++++++++++++------------------
+ 1 file changed, 14 insertions(+), 18 deletions(-)
+
+commit 4d80b463a1251aa22eabc87d2732fec13b1adda6
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-07-25 18:20:01 +0300
+
+ Build: Don't allow empty LIST in --enable-match-finders=LIST.
+
+ It's enforced only when a match finder is needed, that is,
+ when LZMA1 or LZMA2 encoder is enabled.
+
+ configure.ac | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 9cc721af5436908f2d5a828aebbc4050a32a3487
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-24 13:27:48 +0300
+
+ xz: Update the man page that change to --keep will be in 5.2.6.
+
+ src/xz/xz.1 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit b81bf0c7d1873e52a4086a9abb494471d652cb55
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-19 23:23:54 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 340cf1ec3927767046b8293a49da3db4e393f426
+Author: Nicholas Jackson <nickajacks1@gmail.com>
+Date: 2022-07-17 17:39:23 -0700
+
+ CMake: Add missing source file to liblzma build
+
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d796b6d7fdb8b7238b277056cf9146cce25db604
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-19 23:19:49 +0300
+
+ xzgrep man page: Document exit statuses.
+
+ src/scripts/xzgrep.1 | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+commit 923bf96b55e5216a6c8df9d8331934f54784390e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-19 23:13:24 +0300
+
+ xzgrep: Improve error handling, especially signals.
+
+ xzgrep wouldn't exit on SIGPIPE or SIGQUIT when it clearly
+ should have. It's quite possible that it's not perfect still
+ but at least it's much better.
+
+ If multiple exit statuses compete, now it tries to pick
+ the largest of value.
+
+ Some comments were added.
+
+ The exit status handling of signals is still broken if the shell
+ uses values larger than 255 in $? to indicate that a process
+ died due to a signal ***and*** their "exit" command doesn't take
+ this into account. This seems to work well with the ksh and yash
+ versions I tried. However, there is a report in gzip/zgrep that
+ OpenSolaris 5.11 (not 5.10) has a problem with "exit" truncating
+ the argument to 8 bits:
+
+ https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22900#25
+
+ Such a bug would break xzgrep but I didn't add a workaround
+ at least for now. 5.11 is old and I don't know if the problem
+ exists in modern descendants, or if the problem exists in other
+ ksh implementations in use.
+
+ src/scripts/xzgrep.in | 72 +++++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 53 insertions(+), 19 deletions(-)
+
+commit a648978b20495b7aa4a8b029c5a810b5ad9d08ff
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-19 00:10:55 +0300
+
+ xzgrep: Make the fix for ZDI-CAN-16587 more robust.
+
+ I don't know if this can make a difference in the real world
+ but it looked kind of suspicious (what happens with sed
+ implementations that cannot process very long lines?).
+ At least this commit shouldn't make it worse.
+
+ src/scripts/xzgrep.in | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit bd7b290f3fe4faeceb7d3497ed9bf2e6ed5e7dc5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-18 21:52:31 +0300
+
+ xzgrep: Use grep -H --label when available (GNU, *BSDs).
+
+ It avoids the use of sed for prefixing filenames to output lines.
+ Using sed for that is slower and prone to security bugs so now
+ the sed method is only used as a fallback.
+
+ This also fixes an actual bug: When grepping a binary file,
+ GNU grep nowadays prints its diagnostics to stderr instead of
+ stdout and thus the sed-method for prefixing the filename doesn't
+ work. So with this commit grepping binary files gives reasonable
+ output with GNU grep now.
+
+ This was inspired by zgrep but the implementation is different.
+
+ src/scripts/xzgrep.in | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+commit b56729af9f1a596e57aeefd7570d8d7dce5c9f52
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-18 21:10:25 +0300
+
+ xzgrep: Use -e to specify the pattern to grep.
+
+ Now we don't need the separate test for adding the -q option
+ as it can be added directly in the two places where it's needed.
+
+ src/scripts/xzgrep.in | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+commit bad61b5997e6647911974022bfb72f3d4818a594
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-18 19:18:48 +0300
+
+ Scripts: Use printf instead of echo in a few places.
+
+ It's a good habbit as echo has some portability corner cases
+ when the string contents can be anything.
+
+ src/scripts/xzdiff.in | 6 +++---
+ src/scripts/xzgrep.in | 4 ++--
+ src/scripts/xzless.in | 4 ++--
+ src/scripts/xzmore.in | 8 ++++----
+ 4 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 6a4a4a7d2667837dc824c26fcb19ed6ca5aff645
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-17 21:36:25 +0300
+
+ xzgrep: Add more LC_ALL=C to avoid bugs with multibyte characters.
+
+ Also replace one use of expr with printf.
+
+ The rationale for LC_ALL=C was already mentioned in
+ 69d1b3fc29677af8ade8dc15dba83f0589cb63d6 that fixed a security
+ issue. However, unrelated uses weren't changed in that commit yet.
+
+ POSIX says that with sed and such tools one should use LC_ALL=C
+ to ensure predictable behavior when strings contain byte sequences
+ that aren't valid multibyte characters in the current locale. See
+ under "Application usage" in here:
+
+ https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
+
+ With GNU sed invalid multibyte strings would work without this;
+ it's documented in its Texinfo manual. Some other implementations
+ aren't so forgiving.
+
+ src/scripts/xzgrep.in | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+commit b48f9d615f2c2e8d2f6e253d0e48ee66d0652b68
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-17 20:55:16 +0300
+
+ xzgrep: Fix parsing of certain options.
+
+ Fix handling of "xzgrep -25 foo" (in GNU grep "grep -25 foo" is
+ an alias for "grep -C25 foo"). xzgrep would treat "foo" as filename
+ instead of as a pattern. This bug was fixed in zgrep in gzip in 2012.
+
+ Add -E, -F, -G, and -P to the "no argument required" list.
+
+ Add -X to "argument required" list. It is an
+ intentionally-undocumented GNU grep option so this isn't
+ an important option for xzgrep but it seems that other grep
+ implementations (well, those that I checked) don't support -X
+ so I hope this change is an improvement still.
+
+ grep -d (grep --directories=ACTION) requires an argument. In
+ contrast to zgrep, I kept -d in the "no argument required" list
+ because it's not supported in xzgrep (or zgrep). This way
+ "xzgrep -d" gives an error about option being unsupported instead
+ of telling that it requires an argument. Both zgrep and xzgrep
+ tell that it's unsupported if an argument is specified.
+
+ Add comments.
+
+ src/scripts/xzgrep.in | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+commit 2d2201bc6315deda4d43625aa510972467bd51d4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-14 20:33:05 +0300
+
+ Tests: Add the .lzma files to test_files.sh.
+
+ tests/test_files.sh | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+commit ce5549a591bf126300618879f5b24023351baff6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-14 19:37:42 +0300
+
+ Tests: Add .lzma test files.
+
+ tests/files/README | 63 ++++++++++++++++-----
+ tests/files/bad-too_big_size-with_eopm.lzma | Bin 0 -> 37 bytes
+ tests/files/bad-too_small_size-without_eopm-1.lzma | Bin 0 -> 31 bytes
+ tests/files/bad-too_small_size-without_eopm-2.lzma | Bin 0 -> 31 bytes
+ tests/files/bad-too_small_size-without_eopm-3.lzma | Bin 0 -> 36 bytes
+ tests/files/bad-unknown_size-without_eopm.lzma | Bin 0 -> 31 bytes
+ tests/files/good-known_size-with_eopm.lzma | Bin 0 -> 37 bytes
+ tests/files/good-known_size-without_eopm.lzma | Bin 0 -> 31 bytes
+ tests/files/good-unknown_size-with_eopm.lzma | Bin 0 -> 37 bytes
+ 9 files changed, 50 insertions(+), 13 deletions(-)
+
+commit 107c93ee5cad51a6ea0cee471209bfe8d76deaa3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-14 18:12:38 +0300
+
+ liblzma: Rename a variable and improve a comment.
+
+ src/liblzma/lzma/lzma_decoder.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+commit 511feb5eadb988d641b025d597f4fac7502003b8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-13 22:24:41 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 9595a3119b9faf0ce01375329cad8bbf85c35ea2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-13 22:24:07 +0300
+
+ liblzma: Add optional autodetection of LZMA end marker.
+
+ Turns out that this is needed for .lzma files as the spec in
+ LZMA SDK says that end marker may be present even if the size
+ is stored in the header. Such files are rare but exist in the
+ real world. The code in liblzma is so old that the spec didn't
+ exist in LZMA SDK back then and I had understood that such
+ files weren't possible (the lzma tool in LZMA SDK didn't
+ create such files).
+
+ This modifies the internal API so that LZMA decoder can be told
+ if EOPM is allowed even when the uncompressed size is known.
+ It's allowed with .lzma and not with other uses.
+
+ Thanks to Karl Beldan for reporting the problem.
+
+ doc/lzma-file-format.txt | 11 +++-
+ src/liblzma/common/alone_decoder.c | 2 +-
+ src/liblzma/common/microlzma_decoder.c | 2 +-
+ src/liblzma/lz/lz_decoder.c | 10 +++-
+ src/liblzma/lz/lz_decoder.h | 8 +--
+ src/liblzma/lzma/lzma2_decoder.c | 2 +-
+ src/liblzma/lzma/lzma_decoder.c | 99 ++++++++++++++++++++++++----------
+ 7 files changed, 95 insertions(+), 39 deletions(-)
+
+commit 0c0f8e9761eb6eaf199082cf144db7ac5f9d8cb2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-07-12 18:53:04 +0300
+
+ xz: Document the special memlimit case of 2000 MiB on MIPS32.
+
+ See commit fc3d3a7296ef58bb799a73943636b8bfd95339f7.
+
+ src/xz/xz.1 | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+commit d1bfa3dc703325ecd974167e864a8712fdfe936e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-07-01 21:19:26 +0800
+
+ Created script to generate code coverage reports.
+
+ The script uses lcov and genhtml after running the tests
+ to show the code coverage statistics. The script will create
+ a coverage directory where it is run. It can be run both in
+ and out of the source directory.
+
+ .gitignore | 4 +++
+ tests/code_coverage.sh | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 83 insertions(+)
+
+commit 86a30b0255d8064169fabfd213d907016d2f9f2a
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-06-16 17:32:19 +0300
+
+ Tests: Add more tests into test_check.
+
+ tests/test_check.c | 279 +++++++++++++++++++++++++++++++++++++++++++++++++++--
+ tests/tests.h | 23 +++++
+ 2 files changed, 295 insertions(+), 7 deletions(-)
+
+commit 82e30fed66a89706388a8c15dc954d84e63f38fa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-16 15:02:57 +0300
+
+ Tests: Use char[][24] array for enum_strings_lzma_ret.
+
+ Array of pointers to short strings is a bit pointless here
+ and now it's fully const.
+
+ tests/tests.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5ba9459e6c4a29f6870ca78ce8ac6e519d59c41e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-16 14:12:14 +0300
+
+ Tests: tuktest.h: Add tuktest_error_impl to help with error conditions.
+
+ tests/tuktest.h | 72 +++++++++++++++++++++++++--------------------------------
+ 1 file changed, 32 insertions(+), 40 deletions(-)
+
+commit b339892668da20aea22a93668c82b87a38e4a97f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-16 13:29:59 +0300
+
+ Tests: tuktest.h: Rename file_from_* and use tuktest_malloc there.
+
+ tests/test_bcj_exact_size.c | 4 +---
+ tests/tuktest.h | 52 +++++++++++++++++++++------------------------
+ 2 files changed, 25 insertions(+), 31 deletions(-)
+
+commit d8b63a0ad68d1c461eb373466679ebc41fbc207d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-16 13:08:19 +0300
+
+ Tests: tuktest.h: Add malloc wrapper with automatic freeing.
+
+ tests/tuktest.h | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 124 insertions(+)
+
+commit 1d51536a4b19a8fae768f8eb462fc2238cb36d53
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-16 11:47:37 +0300
+
+ Tests: tuktest.h: Move a function.
+
+ tests/tuktest.h | 44 ++++++++++++++++++++++----------------------
+ 1 file changed, 22 insertions(+), 22 deletions(-)
+
+commit 70c7555f6403553ee35539e869de0025592d8564
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-14 22:21:15 +0300
+
+ Tests: test_vli: Remove an invalid test-assertion.
+
+ lzma_vli is unsigned so trying a signed value results in
+ a compiler warning from -Wsign-conversion. (lzma_vli)-1
+ equals to LZMA_VLI_UNKNOWN anyway which is the next assertion.
+
+ tests/test_vli.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+commit 154b73c5a1092c3f785e01666b564ad7ff1be555
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-14 22:10:10 +0300
+
+ Tests: test_vli: Add const where appropriate.
+
+ tests/test_vli.c | 53 ++++++++++++++++++++++++++++-------------------------
+ 1 file changed, 28 insertions(+), 25 deletions(-)
+
+commit 0354d6cce3ff98ea6f927107baf216253f6ce2bb
+Author: Jia Tan <jiat75@gmail.com>
+Date: 2022-06-13 20:27:03 +0800
+
+ Added vli tests to .gitignore
+
+ .gitignore | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit a08f5ccf6bdc20ef70e41f6f3321618ef146f96e
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-06-12 11:31:40 +0800
+
+ Created tests for all functions exported in vli.h
+
+ Achieved 100% code coverage vli_encoder.c, vli_decoder.c, and vli_size.c
+
+ tests/Makefile.am | 4 +-
+ tests/test_vli.c | 308 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 311 insertions(+), 1 deletion(-)
+
+commit 1e3eb61815a91c0a1bfbb802e2d95593f523491f
+Author: jiat75 <jiat0218@gmail.com>
+Date: 2022-06-03 21:24:54 +0800
+
+ Added parallel test artifacts to .gitignore
+
+ .gitignore | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 00e3613f1212eaa84e721585fdb4de6967cf2476
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-14 21:29:21 +0300
+
+ Tests: Use good-1-empty-bcj-lzma2.xz in test_bcj_exact_size.
+
+ It's much nicer this way so that the test data isn't a hardcoded
+ table inside the C file.
+
+ tests/test_bcj_exact_size.c | 19 +++++++------------
+ 1 file changed, 7 insertions(+), 12 deletions(-)
+
+commit 86bab755be252bfd3e0a9aee8e7b83a9bbb23ed0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-14 21:26:13 +0300
+
+ Tests: Add file reading helpers to tuktest.h.
+
+ tests/tuktest.h | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 176 insertions(+), 7 deletions(-)
+
+commit 83d2337b72dbf391c6f3b41889eea99e51679105
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-14 18:21:57 +0300
+
+ Tests: tuktest.h: Move a printf from a macro to a helper function.
+
+ tests/tuktest.h | 26 ++++++++++++++++++--------
+ 1 file changed, 18 insertions(+), 8 deletions(-)
+
+commit f9e8176ea7d520797a2db2d49a5a632c285674a8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-14 17:20:49 +0300
+
+ Tests: Add test file good-1-empty-bcj-lzma2.xz.
+
+ This is from test_bcj_exact_size.c.
+ It's good to have it as a standalone file.
+
+ tests/files/README | 5 +++++
+ tests/files/good-1-empty-bcj-lzma2.xz | Bin 0 -> 52 bytes
+ 2 files changed, 5 insertions(+)
+
+commit aa75c5563a760aea3aa23d997d519e702e82726b
+Author: Jia Tan <jiat0218@gmail.com>
+Date: 2022-06-10 21:35:18 +0800
+
+ Tests: Created tests for hardware functions.
+
+ Created tests for all API functions exported in
+ src/liblzma/api/lzma/hardware.h. The tests are fairly trivial
+ but are helpful because they will inform users if their machines
+ cannot support these functions. They also improve the code
+ coverage metrics.
+
+ .gitignore | 1 +
+ tests/Makefile.am | 2 ++
+ tests/test_hardware.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 48 insertions(+)
+
+commit 5c8ffdca20813939818843476fb212dfae8838a3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-02 21:01:45 +0300
+
+ Tests: Convert test_check to tuktest.
+
+ Thanks to Jia Tan for help with all the tests.
+
+ tests/test_check.c | 67 +++++++++++++++++++++++++++---------------------------
+ 1 file changed, 33 insertions(+), 34 deletions(-)
+
+commit faf5ff8899d539b4dcd2a7e5280cb820a4746c86
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-02 20:31:03 +0300
+
+ Tests: Convert test_block_header to tuktest.
+
+ tests/test_block_header.c | 89 +++++++++++++++++++++++++++--------------------
+ 1 file changed, 52 insertions(+), 37 deletions(-)
+
+commit 754d39fbebee3782258d42f154a223d3c5770ec7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-02 20:28:23 +0300
+
+ Tests: Convert test_bcj_exact_size to tuktest.
+
+ The compress() and decompress() functions were merged because
+ the later depends on the former so they need to be a single
+ test case.
+
+ tests/test_bcj_exact_size.c | 75 +++++++++++++++++++++++++--------------------
+ 1 file changed, 41 insertions(+), 34 deletions(-)
+
+commit 96da21470f9570cd08286906a050a7c22631775b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-02 20:27:00 +0300
+
+ Tests: Include tuktest.h in tests.h.
+
+ This breaks -Werror because none of the tests so far use
+ tuktest.h and thus there are warnings about unused variables
+ and functions.
+
+ tests/tests.h | 47 +++++++++++++++++++++++------------------------
+ 1 file changed, 23 insertions(+), 24 deletions(-)
+
+commit df71ba1c991f60c3269aaadd398247e632714626
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-06-02 20:25:21 +0300
+
+ Tests: Add tuktest.h mini-test-framework.
+
+ tests/Makefile.am | 1 +
+ tests/tuktest.h | 752 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 753 insertions(+)
+
+commit 4773608554d1b684a05ff9c1d879cf5c42266d33
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-05-23 21:31:36 +0300
+
+ Build: Enable Automake's parallel test harness.
+
+ It has been the default for quite some time already and
+ the old serial harness isn't discouraged. The downside is
+ that with parallel tests one cannot print progress info or
+ other diagnostics to the terminal; all output from the tests
+ will be in the log files only. But now that the compression
+ tests are separated the parallel tests will speed things up.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9a6dd6d46f7f256a5573e5d874c1052033ed7b05
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-05-23 21:17:47 +0300
+
+ Tests: Split test_compress.sh into separate test unit for each file.
+
+ test_compress.sh now takes one command line argument:
+ a filename to be tested. If it begins with "compress_generated_"
+ the file will be created with create_compress_files.
+
+ This will allow parallel execution of the slow tests.
+
+ tests/Makefile.am | 11 +++-
+ tests/test_compress.sh | 91 +++++++++++++++++++---------------
+ tests/test_compress_generated_abc | 3 ++
+ tests/test_compress_generated_random | 3 ++
+ tests/test_compress_generated_text | 3 ++
+ tests/test_compress_prepared_bcj_sparc | 3 ++
+ tests/test_compress_prepared_bcj_x86 | 3 ++
+ 7 files changed, 77 insertions(+), 40 deletions(-)
+
+commit c7758ac9c734707514dd34f254173ebac5eea7f8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-05-23 20:32:49 +0300
+
+ Test: Make create_compress_files.c a little more flexible.
+
+ If a command line argument is given, then only the test file
+ of that type is created. It's quite dumb in sense that unknown
+ names don't give an error but it's good enough here.
+
+ Also use EXIT_FAILURE instead of 1 as exit status for errors.
+
+ tests/create_compress_files.c | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+commit 4a8e4a7b0ad4b03c0ac6862716c3457452cdaf8c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-05-23 20:17:42 +0300
+
+ Tests: Remove unneeded commented lines from test_compress.sh.
+
+ tests/test_compress.sh | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+commit 2ee50d150ee009f36135540b459e6ff328549725
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-05-23 20:16:00 +0300
+
+ Tests: Remove progress indicator from test_compress.sh.
+
+ It will be useless with Automake's parallel tests.
+
+ tests/test_compress.sh | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+commit 2ce4f36f179a81d0c6e182a409f363df759d1ad0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-05-23 19:37:18 +0300
+
+ liblzma: Silence a warning.
+
+ The actual initialization is done via mythread_sync and seems
+ that GCC doesn't necessarily see that it gets initialized there.
+
+ src/liblzma/common/stream_decoder_mt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5d8f3764ef43c35910e6d7003c0900a961ef6544
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-14 20:53:16 +0300
+
+ xz: Fix build with --disable-threads.
+
+ src/xz/hardware.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 1d592897278b172d8549aa29c3a1f3a4f432a9b9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-14 14:50:17 +0300
+
+ xz: Change the cap of the default -T0 memlimit for 32-bit xz.
+
+ The SIZE_MAX / 3 was 1365 MiB. 1400 MiB gives little more room
+ and it looks like a round (artificial) number in --info-memory
+ once --info-memory is made to display it.
+
+ Also, using #if avoids useless code on 64-bit builds.
+
+ src/xz/hardware.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit c77fe55ddb7752ed0fec46967c5ec9a72632ea0c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-14 14:20:46 +0300
+
+ xz: Add a default soft memory usage limit for --threads=0.
+
+ This is a soft limit in sense that it only affects the number of
+ threads. It never makes xz fail and it never makes xz change
+ settings that would affect the compressed output.
+
+ The idea is to make -T0 have more reasonable behavior when
+ the system has very many cores or when a memory-hungry
+ compression options are used. This also helps with 32-bit xz,
+ preventing it from running out of address space.
+
+ The downside of this commit is that now the number of threads
+ might become too low compared to what the user expected. I
+ hope this to be an acceptable compromise as the old behavior
+ has been a source of well-argued complaints for a long time.
+
+ src/xz/coder.c | 28 ++++++++++++++++++++++++++--
+ src/xz/hardware.c | 38 +++++++++++++++++++++++++++++---------
+ src/xz/hardware.h | 27 +++++++++++++++++++++++++++
+ 3 files changed, 82 insertions(+), 11 deletions(-)
+
+commit 0adc13bfe32c14f3e4c6ce9f2d4fdf4112ab53f4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-14 12:59:09 +0300
+
+ xz: Make -T0 use multithreaded mode on single-core systems.
+
+ The main problem withi the old behavior is that the compressed
+ output is different on single-core systems vs. multicore systems.
+ This commit fixes it by making -T0 one thread in multithreaded mode
+ on single-core systems.
+
+ The downside of this is that it uses more memory. However, if
+ --memlimit-compress is used, xz can (thanks to the previous commit)
+ drop to the single-threaded mode still.
+
+ src/xz/coder.c | 18 +++++++++---------
+ src/xz/hardware.c | 14 ++++++++++++++
+ src/xz/hardware.h | 4 ++++
+ 3 files changed, 27 insertions(+), 9 deletions(-)
+
+commit 898faa97287a756231c663a3ed5165672b417207
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-14 12:38:00 +0300
+
+ xz: Changes to --memlimit-compress and --no-adjust.
+
+ In single-threaded mode, --memlimit-compress can make xz scale down
+ the LZMA2 dictionary size to meet the memory usage limit. This
+ obviously affects the compressed output. However, if xz was in
+ threaded mode, --memlimit-compress could make xz reduce the number
+ of threads but it wouldn't make xz switch from multithreaded mode
+ to single-threaded mode or scale down the LZMA2 dictionary size.
+ This seemed illogical and there was even a "FIXME?" about it.
+
+ Now --memlimit-compress can make xz switch to single-threaded
+ mode if one thread in multithreaded mode uses too much memory.
+ If memory usage is still too high, then the LZMA2 dictionary
+ size can be scaled down too.
+
+ The option --no-adjust was also changed so that it no longer
+ prevents xz from scaling down the number of threads as that
+ doesn't affect compressed output (only performance). After
+ this commit --no-adjust only prevents adjustments that affect
+ compressed output, that is, with --no-adjust xz won't switch
+ from multithreaded mode to single-threaded mode and won't
+ scale down the LZMA2 dictionary size.
+
+ The man page wasn't updated yet.
+
+ src/xz/coder.c | 63 +++++++++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 43 insertions(+), 20 deletions(-)
+
+commit cad299008cf73ec566f0662a9cf2b94f86a99659
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-11 22:20:49 +0300
+
+ xz: Add --memlimit-mt-decompress along with a default limit value.
+
+ --memlimit-mt-decompress allows specifying the limit for
+ multithreaded decompression. This matches memlimit_threading in
+ liblzma. This limit can only affect the number of threads being
+ used; it will never prevent xz from decompressing a file. The
+ old --memlimit-decompress option is still used at the same time.
+
+ If the value of --memlimit-decompress (the default value or
+ one specified by the user) is less than the value of
+ --memlimit-mt-decompress , then --memlimit-mt-decompress is
+ reduced to match --memlimit-decompress.
+
+ Man page wasn't updated yet.
+
+ src/xz/args.c | 24 +++++++++++++++-------
+ src/xz/coder.c | 34 ++++++++++---------------------
+ src/xz/hardware.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
+ src/xz/hardware.h | 17 ++++++++++------
+ src/xz/message.c | 4 +++-
+ 5 files changed, 97 insertions(+), 42 deletions(-)
+
+commit fe87b4cd5364f5bbb6a75a0299f1500c852d7c9a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-06 23:11:59 +0300
+
+ liblzma: Threaded decoder: Improve setting of pending_error.
+
+ It doesn't need to be done conditionally. The comments try
+ to explain it.
+
+ src/liblzma/common/stream_decoder_mt.c | 51 +++++++++++++++++++++++-----------
+ 1 file changed, 35 insertions(+), 16 deletions(-)
+
+commit 90621da7f6e1bfd6d91d60415eae04b2bca274c2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-06 12:39:49 +0300
+
+ liblzma: Add a new flag LZMA_FAIL_FAST for threaded decoder.
+
+ In most cases if the input file is corrupt the application won't
+ care about the uncompressed content at all. With this new flag
+ the threaded decoder will return an error as soon as any thread
+ has detected an error; it won't wait to copy out the data before
+ the location of the error.
+
+ I don't plan to use this in xz to keep the behavior consistent
+ between single-threaded and multi-threaded modes.
+
+ src/liblzma/api/lzma/container.h | 25 ++++++++++++++++-
+ src/liblzma/common/common.h | 7 +++--
+ src/liblzma/common/stream_decoder_mt.c | 50 +++++++++++++++++++---------------
+ 3 files changed, 56 insertions(+), 26 deletions(-)
+
+commit 64b6d496dc815a176d8307f418f6834a26783484
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-05 12:24:57 +0300
+
+ liblzma: Threaded decoder: Always wait for output if LZMA_FINISH is used.
+
+ This makes the behavior consistent with the single-threaded
+ decoder when handling truncated .xz files.
+
+ Thanks to Jia Tan for finding this issue.
+
+ src/liblzma/common/stream_decoder_mt.c | 26 ++++++++++++++++++++++++--
+ 1 file changed, 24 insertions(+), 2 deletions(-)
+
+commit e671bc8828b9c0c5406c3a22c541301d0eb54518
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-04-02 21:49:59 +0300
+
+ liblzma: Threaded decoder: Support zpipe.c-style decoding loop.
+
+ This makes it possible to call lzma_code() in a loop that only
+ reads new input when lzma_code() didn't fill the output buffer
+ completely. That isn't the calling style suggested by the
+ liblzma example program 02_decompress.c so perhaps the usefulness
+ of this feature is limited.
+
+ Also, it is possible to write such a loop so that it works
+ with the single-threaded decoder but not with the threaded
+ decoder even after this commit, or so that it works only if
+ lzma_mt.timeout = 0.
+
+ The zlib tutorial <https://zlib.net/zlib_how.html> is a well-known
+ example of a loop where more input is read only when output isn't
+ full. Porting this as is to liblzma would work with the
+ single-threaded decoder (if LZMA_CONCATENATED isn't used) but it
+ wouldn't work with threaded decoder even after this commit because
+ the loop assumes that no more output is possible when it cannot
+ read more input ("if (strm.avail_in == 0) break;"). This cannot
+ be fixed at liblzma side; the loop has to be modified at least
+ a little.
+
+ I'm adding this in any case because the actual code is simple
+ and short and should have no harmful side-effects in other
+ situations.
+
+ src/liblzma/common/stream_decoder_mt.c | 77 +++++++++++++++++++++++++++++-----
+ 1 file changed, 67 insertions(+), 10 deletions(-)
+
+commit 2ba8173e27be4793edb46497e499ac2ae753a316
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-31 00:05:07 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 69d1b3fc29677af8ade8dc15dba83f0589cb63d6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-29 19:19:12 +0300
+
+ xzgrep: Fix escaping of malicious filenames (ZDI-CAN-16587).
+
+ Malicious filenames can make xzgrep to write to arbitrary files
+ or (with a GNU sed extension) lead to arbitrary code execution.
+
+ xzgrep from XZ Utils versions up to and including 5.2.5 are
+ affected. 5.3.1alpha and 5.3.2alpha are affected as well.
+ This patch works for all of them.
+
+ This bug was inherited from gzip's zgrep. gzip 1.12 includes
+ a fix for zgrep.
+
+ The issue with the old sed script is that with multiple newlines,
+ the N-command will read the second line of input, then the
+ s-commands will be skipped because it's not the end of the
+ file yet, then a new sed cycle starts and the pattern space
+ is printed and emptied. So only the last line or two get escaped.
+
+ One way to fix this would be to read all lines into the pattern
+ space first. However, the included fix is even simpler: All lines
+ except the last line get a backslash appended at the end. To ensure
+ that shell command substitution doesn't eat a possible trailing
+ newline, a colon is appended to the filename before escaping.
+ The colon is later used to separate the filename from the grep
+ output so it is fine to add it here instead of a few lines later.
+
+ The old code also wasn't POSIX compliant as it used \n in the
+ replacement section of the s-command. Using \<newline> is the
+ POSIX compatible method.
+
+ LC_ALL=C was added to the two critical sed commands. POSIX sed
+ manual recommends it when using sed to manipulate pathnames
+ because in other locales invalid multibyte sequences might
+ cause issues with some sed implementations. In case of GNU sed,
+ these particular sed scripts wouldn't have such problems but some
+ other scripts could have, see:
+
+ info '(sed)Locale Considerations'
+
+ This vulnerability was discovered by:
+ cleemy desu wayo working with Trend Micro Zero Day Initiative
+
+ Thanks to Jim Meyering and Paul Eggert discussing the different
+ ways to fix this and for coordinating the patch release schedule
+ with gzip.
+
+ src/scripts/xzgrep.in | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+commit bd93b776c1bd15e90661033c918cdeb354dbcc38
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-26 01:02:44 +0200
+
+ liblzma: Fix a deadlock in threaded decoder.
+
+ If a worker thread has consumed all input so far and it's
+ waiting on thr->cond and then the main thread enables
+ partial update for that thread, the code used to deadlock.
+ This commit allows one dummy decoding pass to occur in this
+ situation which then also does the partial update.
+
+ As part of the fix, this moves thr->progress_* updates to
+ avoid the second thr->mutex locking.
+
+ Thanks to Jia Tan for finding, debugging, and reporting the bug.
+
+ src/liblzma/common/stream_decoder_mt.c | 71 +++++++++++++++++++++++++---------
+ 1 file changed, 52 insertions(+), 19 deletions(-)
+
+commit e0394e94230f208682ac1e1f4c41f22f9ad79916
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-23 16:34:00 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 487c77d48760564b1949c5067630b675b87be4de
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-23 16:28:55 +0200
+
+ liblzma: Threaded decoder: Don't stop threads on LZMA_TIMED_OUT.
+
+ LZMA_TIMED_OUT is not an error and thus stopping threads on
+ LZMA_TIMED_OUT breaks the decoder badly.
+
+ Thanks to Jia Tan for finding the bug and for the patch.
+
+ src/liblzma/common/stream_decoder_mt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6c6da57ae2aa962aabde6892442227063d87e88c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-07 00:36:16 +0200
+
+ xz: Add initial support for threaded decompression.
+
+ If threading support is enabled at build time, this will
+ use lzma_stream_decoder_mt() even for single-threaded mode.
+ With memlimit_threading=0 the behavior should be identical.
+
+ This needs some work like adding --memlimit-threading=LIMIT.
+
+ The original patch from Sebastian Andrzej Siewior included
+ a method to get currently available RAM on Linux. It might
+ be one way to go but as it is Linux-only, the available-RAM
+ approach needs work for portability or using a fallback method
+ on other OSes.
+
+ The man page wasn't updated yet.
+
+ src/xz/coder.c | 36 +++++++++++++++++++++++++++++++++++-
+ 1 file changed, 35 insertions(+), 1 deletion(-)
+
+commit 4cce3e27f529af33e0e7749a8cbcec59954946b5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-06 23:36:20 +0200
+
+ liblzma: Add threaded .xz decompressor.
+
+ I realize that this is about a decade late.
+
+ Big thanks to Sebastian Andrzej Siewior for the original patch.
+ I made a bunch of smaller changes but after a while quite a few
+ things got rewritten. So any bugs in the commit were created by me.
+
+ src/liblzma/api/lzma/container.h | 90 +-
+ src/liblzma/common/Makefile.inc | 5 +
+ src/liblzma/common/common.h | 4 +
+ src/liblzma/common/stream_decoder_mt.c | 1814 ++++++++++++++++++++++++++++++++
+ src/liblzma/liblzma.map | 1 +
+ 5 files changed, 1907 insertions(+), 7 deletions(-)
+
+commit 717631b9788dc9c100ee0c87d3c14a2782638ff4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-06 16:54:23 +0200
+
+ liblzma: Fix docs: lzma_block_decoder() cannot return LZMA_UNSUPPORTED_CHECK.
+
+ If Check is unsupported, it will be silently ignored.
+ It's the caller's job to handle it.
+
+ src/liblzma/api/lzma/block.h | 3 ---
+ 1 file changed, 3 deletions(-)
+
+commit 1a4bb97a00936535e30ac61945aeee38882b5d1a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-06 16:41:19 +0200
+
+ liblzma: Add new output queue (lzma_outq) features.
+
+ Add lzma_outq_clear_cache2() which may leave one buffer allocated
+ in the cache.
+
+ Add lzma_outq_outbuf_memusage() to get the memory needed for
+ a single lzma_outbuf. This is now used internally in outqueue.c too.
+
+ Track both the total amount of memory allocated and the amount of
+ memory that is in active use (not in cache).
+
+ In lzma_outbuf, allow storing the current input position that
+ matches the current output position. This way the main thread
+ can notice when no more output is possible without first providing
+ more input.
+
+ Allow specifying return code for lzma_outq_read() in a finished
+ lzma_outbuf.
+
+ src/liblzma/common/outqueue.c | 43 +++++++++++++++++++++++++++++++++++-------
+ src/liblzma/common/outqueue.h | 44 ++++++++++++++++++++++++++++++++++++++++++-
+ 2 files changed, 79 insertions(+), 8 deletions(-)
+
+commit ddbc6f58c2de388eed24cd7ea91b523d397da5f4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-03-06 15:18:58 +0200
+
+ liblzma: Index hash: Change return value type of hash_append() to void.
+
+ src/liblzma/common/index_hash.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+commit 20e7a33e2d59c6a814447d3991f21e2702174b20
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-22 03:42:57 +0200
+
+ liblzma: Minor addition to lzma_vli_size() API doc.
+
+ Thanks to Jia Tan.
+
+ src/liblzma/api/lzma/vli.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 4f78f5fcf63592f2d77e921cfe0d5de300867374
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-22 02:04:18 +0200
+
+ liblzma: Check the return value of lzma_index_append() in threaded encoder.
+
+ If lzma_index_append() failed (most likely memory allocation failure)
+ it could have gone unnoticed and the resulting .xz file would have
+ an incorrect Index. Decompressing such a file would produce the
+ correct uncompressed data but then an error would occur when
+ verifying the Index field.
+
+ src/liblzma/common/stream_encoder_mt.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+commit 5313ad66b40aab822ddca3e9905254cb99a4080d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-22 01:37:39 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 865e0a3689a25a7ee8eecae1a34c1775e3aa676e
+Author: Ed Maste <emaste@FreeBSD.org>
+Date: 2022-02-11 15:25:46 +0000
+
+ liblzma: Use non-executable stack on FreeBSD as on Linux
+
+ src/liblzma/check/crc32_x86.S | 4 ++--
+ src/liblzma/check/crc64_x86.S | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit 1c9a5786d206b4abc8e427326651c8174baea753
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-20 20:36:27 +0200
+
+ liblzma: Make Block decoder catch certain types of errors better.
+
+ Now it limits the input and output buffer sizes that are
+ passed to a raw decoder. This way there's no need to check
+ if the sizes can grow too big or overflow when updating
+ Compressed Size and Uncompressed Size counts. This also means
+ that a corrupt file cannot cause the raw decoder to process
+ useless extra input or output that would exceed the size info
+ in Block Header (and thus cause LZMA_DATA_ERROR anyway).
+
+ More importantly, now the size information is verified more
+ carefully in case raw decoder returns LZMA_OK. This doesn't
+ really matter with the current single-threaded .xz decoder
+ as the errors would be detected slightly later anyway. But
+ this helps avoiding corner cases in the upcoming threaded
+ decompressor, and it might help other Block decoder uses
+ outside liblzma too.
+
+ The test files bad-1-lzma2-{9,10,11}.xz test these conditions.
+ With the single-threaded .xz decoder the only difference is
+ that LZMA_DATA_ERROR is detected in a difference place now.
+
+ src/liblzma/common/block_decoder.c | 79 ++++++++++++++++++++++++++------------
+ 1 file changed, 54 insertions(+), 25 deletions(-)
+
+commit 555de11873eb00c9b94a8be70645db502e5a9dbd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-20 19:38:55 +0200
+
+ Tests: Add bad-1-lzma2-11.xz.
+
+ tests/files/README | 5 +++++
+ tests/files/bad-1-lzma2-11.xz | Bin 0 -> 64 bytes
+ 2 files changed, 5 insertions(+)
+
+commit f0da507f22e7f4e3edb75b45b74d344244ca03fb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-18 18:51:10 +0200
+
+ Translations: Fix po4a failure with the French man page translations.
+
+ Thanks to Mario Blättermann for the patch.
+
+ po4a/fr_FR.po | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit f7711d228c3c32395460c82498c60a9f730d0239
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-07 01:14:37 +0200
+
+ Translations: Add French translation of man pages.
+
+ This matches xz-utils 5.2.5-2 in Debian.
+
+ The translation was done by "bubu", proofread by the debian-l10n-french
+ mailing list contributors, and submitted to me on the xz-devel mailing
+ list by Jean-Pierre Giraud. Thanks to everyone!
+
+ po4a/fr_FR.po | 3541 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ po4a/po4a.conf | 2 +-
+ 2 files changed, 3542 insertions(+), 1 deletion(-)
+
+commit 6468f7e41a8e9c611e4ba8d34e2175c5dacdbeb4
+Author: jiat75 <jiat0218@gmail.com>
+Date: 2022-01-28 20:47:55 +0800
+
+ liblzma: Add NULL checks to LZMA and LZMA2 properties encoders.
+
+ Previously lzma_lzma_props_encode() and lzma_lzma2_props_encode()
+ assumed that the options pointers must be non-NULL because the
+ with these filters the API says it must never be NULL. It is
+ good to do these checks anyway.
+
+ src/liblzma/lzma/lzma2_encoder.c | 3 +++
+ src/liblzma/lzma/lzma_encoder.c | 3 +++
+ 2 files changed, 6 insertions(+)
+
+commit 2523c30705f49eabd27b854aa656ae87cc224808
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2022-02-06 23:19:32 +0200
+
+ liblzma: Fix uint64_t vs. size_t confusion.
+
+ This broke 32-bit builds due to a pointer type mismatch.
+
+ This bug was introduced with the output-size-limited encoding
+ in 625f4c7c99b2fcc4db9e7ab2deb4884790e2e17c.
+
+ Thanks to huangqinjin for the bug report.
+
+ src/liblzma/rangecoder/range_encoder.h | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+commit 2bd36c91d03e03b31a4f12fd0afc100ae32d66e2
+Author: huangqinjin <huangqinjin@gmail.com>
+Date: 2021-12-13 20:49:21 +0800
+
+ CMake: Keep compatible with Windows 95 for 32-bit build.
+
+ CMakeLists.txt | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+commit 2024fbf2794885277d05378d40b2b8015a7c3b40
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-11-13 21:04:05 +0200
+
+ xzgrep: Update man page timestamp.
+
+ src/scripts/xzgrep.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 400e7a239a53282cedaad927a41f3463d7f542e5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-11-13 18:23:24 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 3a512c7787b2642ca946f4adc6e9a0a5d9b0d5a0
+Author: Ville Skyttä <ville.skytta@iki.fi>
+Date: 2021-11-13 10:11:57 +0200
+
+ xzgrep: use `grep -E/-F` instead of `egrep` and `fgrep`
+
+ `egrep` and `fgrep` have been deprecated in GNU grep since 2007, and in
+ current post 3.7 Git they have been made to emit obsolescence warnings:
+ https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1
+
+ src/scripts/xzgrep.1 | 8 ++++----
+ src/scripts/xzgrep.in | 4 ++--
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+commit edf525e2b1840dcaf377df472c67d8f11f8ace1b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-10-28 23:02:11 +0300
+
+ Bump the version number for 5.3.2alpha.
+
+ src/liblzma/api/lzma/version.h | 2 +-
+ src/liblzma/liblzma.map | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit ea8c948655a86290524efe59cff067e06a886709
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-10-28 22:59:52 +0300
+
+ Add NEWS for 5.3.2alpha.
+
+ NEWS | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 86 insertions(+)
+
+commit 52435f302f4724157ec50b4210cbe42b285c3cbc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-10-27 23:27:48 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit f2aea1d5a504b2021bf47a238390e4f12bdd518d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-10-27 23:23:11 +0300
+
+ xz: Change the coding style of the previous commit.
+
+ It isn't any better now but it's consistent with
+ the rest of the code base.
+
+ src/xz/file_io.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+commit 892b16cc282f5b4e1c49871b326f4db25c5b4d81
+Author: Alexander Bluhm <alexander.bluhm@gmx.net>
+Date: 2021-10-05 23:33:16 +0200
+
+ xz: Avoid fchown(2) failure.
+
+ OpenBSD does not allow to change the group of a file if the user
+ does not belong to this group. In contrast to Linux, OpenBSD also
+ fails if the new group is the same as the old one. Do not call
+ fchown(2) in this case, it would change nothing anyway.
+
+ This fixes an issue with Perl Alien::Build module.
+ https://github.com/PerlAlien/Alien-Build/issues/62
+
+ src/xz/file_io.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+commit 2b509c868cae3988bf21cd693fbf9021cdc85628
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-09-17 17:31:11 +0300
+
+ liblzma: Fix liblzma.map for the lzma_microlzma_* symbols.
+
+ This should have been part of d267d109c370a40b502e73f8664b154b15e4f253.
+
+ Thanks to Gao Xiang.
+
+ src/liblzma/liblzma.map | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit cacb06a954b58255dfc084a0bc9708f43a0fd6d6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-09-09 22:21:07 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6928aac9da6ba612780b9f72ba1d6ecbe1e8b54e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-09-09 21:41:51 +0300
+
+ liblzma: Use _MSVC_LANG to detect when "noexcept" can be used with MSVC.
+
+ By default, MSVC always sets __cplusplus to 199711L. The real
+ C++ standard version is available in _MSVC_LANG (or one could
+ use /Zc:__cplusplus to set __cplusplus correctly).
+
+ Fixes <https://sourceforge.net/p/lzmautils/discussion/708858/thread/f6bc3b108a/>.
+
+ Thanks to Dan Weiss.
+
+ src/liblzma/api/lzma.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit d267d109c370a40b502e73f8664b154b15e4f253
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-09-05 20:38:12 +0300
+
+ liblzma: Rename EROFS LZMA to MicroLZMA.
+
+ It still exists primarily for EROFS but MicroLZMA is
+ a more generic name (that hopefully doesn't clash with
+ something that already exists).
+
+ src/liblzma/api/lzma/container.h | 33 +++++++++++++---------
+ src/liblzma/common/Makefile.inc | 4 +--
+ .../{erofs_decoder.c => microlzma_decoder.c} | 32 ++++++++++-----------
+ .../{erofs_encoder.c => microlzma_encoder.c} | 30 ++++++++++----------
+ 4 files changed, 52 insertions(+), 47 deletions(-)
+
+commit 3247e95115acb95bc27f41e8cf4501db5b0b4309
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-06-04 19:02:38 +0300
+
+ xzdiff: Update the man page about the exit status.
+
+ This was forgotten from 194029ffaf74282a81f0c299c07f73caca3232ca.
+
+ src/scripts/xzdiff.1 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 96f5a28a46fc93ac4e296808ac0f8631d05498bc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-06-04 18:52:48 +0300
+
+ xzless: Fix less(1) version detection when it contains a dot.
+
+ Sometimes the version number from "less -V" contains a dot,
+ sometimes not. xzless failed detect the version number when
+ it does contain a dot. This fixes it.
+
+ Thanks to nick87720z for reporting this. Apparently it had been
+ reported here <https://bugs.gentoo.org/489362> in 2013.
+
+ src/scripts/xzless.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 5fb5212d816addbc523d0798cb482fdd0484f8fa
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-04-11 19:58:10 +0300
+
+ Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit fc3d3a7296ef58bb799a73943636b8bfd95339f7
+Author: Ivan A. Melnikov <iv@altlinux.org>
+Date: 2021-04-09 11:45:10 +0300
+
+ Reduce maximum possible memory limit on MIPS32
+
+ Due to architectural limitations, address space available to a single
+ userspace process on MIPS32 is limited to 2 GiB, not 4, even on systems
+ that have more physical RAM -- e.g. 64-bit systems with 32-bit
+ userspace, or systems that use XPA (an extension similar to x86's PAE).
+
+ So, for MIPS32, we have to impose stronger memory limits. I've chosen
+ 2000MiB to give the process some headroom.
+
+ src/xz/hardware.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit e7da44d5151e21f153925781ad29334ae0786101
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-02-13 23:31:27 +0200
+
+ CMake: Use interface library for better FindLibLZMA compatibility.
+
+ https://www.mail-archive.com/xz-devel@tukaani.org/msg00446.html
+
+ Thanks to Markus Rickert.
+
+ CMakeLists.txt | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+commit a61dd82ada39030f41b4ffca9ea551714908bedc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-30 18:36:04 +0200
+
+ CMake: Try to improve compatibility with the FindLibLZMA module.
+
+ The naming conflict with FindLibLZMA module gets worse.
+ Not avoiding it in the first place was stupid.
+
+ Normally find_package(LibLZMA) will use the module and
+ find_package(liblzma 5.2.5 REQUIRED CONFIG) will use the config
+ file even with a case insensitive file system. However, if
+ CMAKE_FIND_PACKAGE_PREFER_CONFIG is TRUE and the file system
+ is case insensitive, find_package(LibLZMA) will find our liblzma
+ config file instead of using FindLibLZMA module.
+
+ One big problem with this is that FindLibLZMA uses
+ LibLZMA::LibLZMA and we use liblzma::liblzma as the target
+ name. With target names CMake happens to be case sensitive.
+ To workaround this, this commit adds
+
+ add_library(LibLZMA::LibLZMA ALIAS liblzma::liblzma)
+
+ to the config file. Then both spellings work.
+
+ To make the behavior consistent between case sensitive and
+ insensitive file systems, the config and related files are
+ renamed from liblzmaConfig.cmake to liblzma-config.cmake style.
+ With this style CMake looks for lowercase version of the package
+ name so find_package(LiBLzmA 5.2.5 REQUIRED CONFIG) will work
+ to find our config file.
+
+ There are other differences between our config file and
+ FindLibLZMA so it's still possible that things break for
+ reasons other than the spelling of the target name. Hopefully
+ those situations aren't too common.
+
+ When the config file is available, it should always give as good or
+ better results as FindLibLZMA so this commit doesn't affect the
+ recommendation to use find_package(liblzma 5.2.5 REQUIRED CONFIG)
+ which explicitly avoids FindLibLZMA.
+
+ Thanks to Markus Rickert.
+
+ CMakeLists.txt | 21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+commit 5b7bc1b8ae766a76710ca1b99f909cf52c697f05
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-29 21:19:43 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6c6f0db340dcb8bb424411cedba713405d55f6b8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-29 21:19:08 +0200
+
+ liblzma: Fix unitialized variable.
+
+ This was introduced two weeks ago in the commit
+ 625f4c7c99b2fcc4db9e7ab2deb4884790e2e17c.
+
+ Thanks to Nathan Moinvaziri.
+
+ src/liblzma/lzma/lzma_encoder.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit bb1d5c1fdd30550d4221ecd336e0be1206132a5c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-24 22:32:41 +0200
+
+ Tests: Add bad-1-lzma2-10.xz and also modify -9.xz.
+
+ tests/files/README | 11 +++++++++--
+ tests/files/bad-1-lzma2-10.xz | Bin 0 -> 60 bytes
+ tests/files/bad-1-lzma2-9.xz | Bin 72 -> 72 bytes
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+commit 6b8abc84a5469792e0355d0bfc0784d41cfdfef7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-24 19:22:35 +0200
+
+ liblzma: Fix a wrong comment in stream_encoder_mt.c.
+
+ src/liblzma/common/stream_encoder_mt.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+commit 939fc5ed654aac25fe0c8684b2df8dbeadb2de1e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-24 18:51:51 +0200
+
+ Tests: Add bad-1-lzma2-9.xz.
+
+ tests/files/README | 4 ++++
+ tests/files/bad-1-lzma2-9.xz | Bin 0 -> 72 bytes
+ 2 files changed, 4 insertions(+)
+
+commit fdd30032f8531ac89519b48c21d810ecf06825f6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-24 17:02:00 +0200
+
+ Tests: Add bad-1-check-crc32-2.xz.
+
+ tests/files/README | 7 +++++++
+ tests/files/bad-1-check-crc32-2.xz | Bin 0 -> 72 bytes
+ 2 files changed, 7 insertions(+)
+
+commit db465419ae26ec7fb9b9472183911ff521620c77
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-17 19:20:50 +0200
+
+ liblzma: In EROFS LZMA decoder, verify that comp_size matches at the end.
+
+ When the uncompressed size is known to be exact, after decompressing
+ the stream exactly comp_size bytes of input must have been consumed.
+ This is a minor improvement to error detection.
+
+ src/liblzma/common/erofs_decoder.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+commit 774cc0118ba2496581cb2621505a04bb6598cc75
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-17 18:53:34 +0200
+
+ liblzma: Make EROFS LZMA decoder work when exact uncomp_size isn't known.
+
+ The caller must still not specify an uncompressed size bigger
+ than the actual uncompressed size.
+
+ As a downside, this now needs the exact compressed size.
+
+ src/liblzma/api/lzma/container.h | 23 ++++++++---
+ src/liblzma/common/erofs_decoder.c | 80 ++++++++++++++++++++++++++++++++++----
+ 2 files changed, 91 insertions(+), 12 deletions(-)
+
+commit 421b0aa352da244075db10205cf33712f91b9835
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-14 20:57:11 +0200
+
+ liblzma: Fix missing normalization in rc_encode_dummy().
+
+ Without this fix it could attempt to create too much output.
+
+ src/liblzma/rangecoder/range_encoder.h | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+commit 601ec0311e769fc704daaaa7dac0ca840aff080e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-14 20:07:01 +0200
+
+ liblzma: Add EROFS LZMA encoder and decoder.
+
+ Right now this is just a planned extra-compact format for use
+ in the EROFS file system in Linux. At this point it's possible
+ that the format will either change or be abandoned and removed
+ completely.
+
+ The special thing about the encoder is that it uses the
+ output-size-limited encoding added in the previous commit.
+ EROFS uses fixed-sized blocks (e.g. 4 KiB) to hold compressed
+ data so the compressors must be able to create valid streams
+ that fill the given block size.
+
+ src/liblzma/api/lzma/container.h | 76 +++++++++++++++++++
+ src/liblzma/common/Makefile.inc | 2 +
+ src/liblzma/common/erofs_decoder.c | 148 +++++++++++++++++++++++++++++++++++++
+ src/liblzma/common/erofs_encoder.c | 139 ++++++++++++++++++++++++++++++++++
+ src/liblzma/liblzma.map | 2 +
+ 5 files changed, 367 insertions(+)
+
+commit 625f4c7c99b2fcc4db9e7ab2deb4884790e2e17c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-13 19:16:32 +0200
+
+ liblzma: Add rough support for output-size-limited encoding in LZMA1.
+
+ With this it is possible to encode LZMA1 data without EOPM so that
+ the encoder will encode as much input as it can without exceeding
+ the specified output size limit. The resulting LZMA1 stream will
+ be a normal LZMA1 stream without EOPM. The actual uncompressed size
+ will be available to the caller via the uncomp_size pointer.
+
+ One missing thing is that the LZMA layer doesn't inform the LZ layer
+ when the encoding is finished and thus the LZ may read more input
+ when it won't be used. However, this doesn't matter if encoding is
+ done with a single call (which is the planned use case for now).
+ For proper multi-call encoding this should be improved.
+
+ This commit only adds the functionality for internal use.
+ Nothing uses it yet.
+
+ src/liblzma/common/common.h | 11 +++
+ src/liblzma/lz/lz_encoder.c | 16 ++++
+ src/liblzma/lz/lz_encoder.h | 4 +
+ src/liblzma/lzma/lzma_encoder.c | 127 +++++++++++++++++++++++---------
+ src/liblzma/lzma/lzma_encoder_private.h | 12 +++
+ src/liblzma/rangecoder/range_encoder.h | 111 ++++++++++++++++++++++++++++
+ 6 files changed, 246 insertions(+), 35 deletions(-)
+
+commit 9cdabbeea891e8f1e7741b076f7db6ac05ae392a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-11 23:57:11 +0200
+
+ Scripts: Add zstd support to xzdiff.
+
+ src/scripts/xzdiff.1 | 6 ++++--
+ src/scripts/xzdiff.in | 16 +++++++++++-----
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+commit d9ec3add97cf4c999a7f594c6529680227b6c274
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-11 23:41:30 +0200
+
+ Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 074259f4f3966aeac6edb205fecbc1a8d2b58bb2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-11 23:41:16 +0200
+
+ xz: Make --keep accept symlinks, hardlinks, and setuid/setgid/sticky.
+
+ Previously this required using --force but that has other
+ effects too which might be undesirable. Changing the behavior
+ of --keep has a small risk of breaking existing scripts but
+ since this is a fairly special corner case I expect the
+ likehood of breakage to be low enough.
+
+ I think the new behavior is more logical. The only reason for
+ the old behavior was to be consistent with gzip and bzip2.
+
+ Thanks to Vincent Lefevre and Sebastian Andrzej Siewior.
+
+ src/xz/file_io.c | 9 +++++----
+ src/xz/xz.1 | 16 +++++++++++++++-
+ 2 files changed, 20 insertions(+), 5 deletions(-)
+
+commit 73c555b3077c19dda29b6f4592ced2af876f8333
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-11 23:28:52 +0200
+
+ Scripts: Fix exit status of xzgrep.
+
+ Omit the -q option from xz, gzip, and bzip2. With xz this shouldn't
+ matter. With gzip it's important because -q makes gzip replace SIGPIPE
+ with exit status 2. With bzip2 it's important because with -q bzip2
+ is completely silent if input is corrupt while other decompressors
+ still give an error message.
+
+ Avoiding exit status 2 from gzip is important because bzip2 uses
+ exit status 2 to indicate corrupt input. Before this commit xzgrep
+ didn't recognize corrupt .bz2 files because xzgrep was treating
+ exit status 2 as SIGPIPE for gzip compatibility.
+
+ zstd still needs -q because otherwise it is noisy in normal
+ operation.
+
+ The code to detect real SIGPIPE didn't check if the exit status
+ was due to a signal (>= 128) and so could ignore some other exit
+ status too.
+
+ src/scripts/xzgrep.in | 20 +++++++++++++-------
+ 1 file changed, 13 insertions(+), 7 deletions(-)
+
+commit 194029ffaf74282a81f0c299c07f73caca3232ca
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-11 22:01:51 +0200
+
+ Scripts: Fix exit status of xzdiff/xzcmp.
+
+ This is a minor fix since this affects only the situation when
+ the files differ and the exit status is something else than 0.
+ In such case there could be SIGPIPE from a decompression tool
+ and that would result in exit status of 2 from xzdiff/xzcmp
+ while the correct behavior would be to return 1 or whatever
+ else diff or cmp may have returned.
+
+ This commit omits the -q option from xz/gzip/bzip2/lzop arguments.
+ I'm not sure why the -q was used in the first place, perhaps it
+ hides warnings in some situation that I cannot see at the moment.
+ Hopefully the removal won't introduce a new bug.
+
+ With gzip the -q option was harmful because it made gzip return 2
+ instead of >= 128 with SIGPIPE. Ignoring exit status 2 (warning
+ from gzip) isn't practical because bzip2 uses exit status 2 to
+ indicate corrupt input file. It's better if SIGPIPE results in
+ exit status >= 128.
+
+ With bzip2 the removal of -q seems to be good because with -q
+ it prints nothing if input is corrupt. The other tools aren't
+ silent in this situation even with -q. On the other hand, if
+ zstd support is added, it will need -q since otherwise it's
+ noisy in normal situations.
+
+ Thanks to Étienne Mollier and Sebastian Andrzej Siewior.
+
+ src/scripts/xzdiff.in | 35 +++++++++++++++++++++--------------
+ 1 file changed, 21 insertions(+), 14 deletions(-)
+
+commit f7fa309e1f7178d04c7bedc03b73077639371e97
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2021-01-09 21:14:36 +0200
+
+ liblzma: Make lzma_outq usable for threaded decompression too.
+
+ Before this commit all output queue buffers were allocated as
+ a single big allocation. Now each buffer is allocated separately
+ when needed. Used buffers are cached to avoid reallocation
+ overhead but the cache will keep only one buffer size at a time.
+ This should make things work OK in the decompression where most
+ of the time the buffer sizes will be the same but with some less
+ common files the buffer sizes may vary.
+
+ While this should work fine, it's still a bit preliminary
+ and may even get reverted if it turns out to be useless for
+ decompression.
+
+ src/liblzma/common/outqueue.c | 268 +++++++++++++++++++++------------
+ src/liblzma/common/outqueue.h | 138 ++++++++++++-----
+ src/liblzma/common/stream_encoder_mt.c | 52 ++++---
+ 3 files changed, 301 insertions(+), 157 deletions(-)
+
+commit a35a69d693ce37d4ba7c1855bda7d9cfa13d1778
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-12-23 17:15:49 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4fd79b90c52396d70e0b1206ceb1a873a0ad2589
+Author: H.J. Lu <hjl.tools@gmail.com>
+Date: 2020-12-23 06:49:04 -0800
+
+ liblzma: Enable Intel CET in x86 CRC assembly codes
+
+ When Intel CET is enabled, we need to include <cet.h> in assembly codes
+ to mark Intel CET support and add _CET_ENDBR to indirect jump targets.
+
+ Tested on Intel Tiger Lake under CET enabled Linux.
+
+ src/liblzma/check/crc32_x86.S | 9 +++++++++
+ src/liblzma/check/crc64_x86.S | 9 +++++++++
+ 2 files changed, 18 insertions(+)
+
+commit bb3b8c6a23e25db79f862b1de325c56052e0354b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-12-16 18:33:29 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 21588ca34af98738954fc12ded1b89d7294ef646
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-12-16 18:30:14 +0200
+
+ Build: Don't build bundles on Apple OSes.
+
+ Thanks to Daniel Packard.
+
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit d05b0c42dd8b38d8c6b8193c8af50e9bd3d16f28
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-12-05 22:44:03 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 1890351f3423627ba5c4c495402f32d7e9ed90b7
+Author: Adam Borowski <kilobyte@angband.pl>
+Date: 2020-09-25 03:35:18 +0200
+
+ Scripts: Add zstd support to xzgrep.
+
+ Thanks to Adam Borowski.
+
+ src/scripts/xzgrep.1 | 9 ++++++---
+ src/scripts/xzgrep.in | 1 +
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+commit 2f108abb3d82e4e2313b438dae9c0c7c7a6366f2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-11-17 20:51:48 +0200
+
+ CMake: Fix compatibility with CMake 3.13.
+
+ The syntax "if(DEFINED CACHE{FOO})" requires CMake 3.14.
+ In some other places the code treats the cache variables
+ like normal variables already (${FOO} or if(FOO) is used,
+ not ${CACHE{FOO}).
+
+ Thanks to ygrek for reporting the bug on IRC.
+
+ CMakeLists.txt | 2 +-
+ cmake/tuklib_cpucores.cmake | 4 ++--
+ cmake/tuklib_physmem.cmake | 4 ++--
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+commit 5af726a79273fafa5de5745b117e567f21c90e49
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-11-01 22:56:43 +0200
+
+ Update THANKS.
+
+ THANKS | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit 4575d9d365c756ec189899f9f743e0b3515ce72d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-11-01 22:34:25 +0200
+
+ xz: Avoid unneeded \f escapes on the man page.
+
+ I don't want to use \c in macro arguments but groff_man(7)
+ suggests that \f has better portability. \f would be needed
+ for the .TP strings for portability reasons anyway.
+
+ Thanks to Bjarni Ingi Gislason.
+
+ src/xz/xz.1 | 31 ++++++++++++++++++++++---------
+ 1 file changed, 22 insertions(+), 9 deletions(-)
+
+commit 620b32f5339f86710cb4435e01ecdac972ccac73
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-11-01 19:09:53 +0200
+
+ xz: Use non-breaking spaces when intentionally using more than one space.
+
+ This silences some style checker warnings. Seems that spaces
+ in the beginning of a line don't need this treatment.
+
+ Thanks to Bjarni Ingi Gislason.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit cb1f34988c8a4130485091b2f8b641303d8f701b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-11-01 18:49:37 +0200
+
+ xz: Protect the ellipsis (...) on the man page with \&.
+
+ This does it only when ... appears outside macro calls.
+
+ Thanks to Bjarni Ingi Gislason.
+
+ src/xz/xz.1 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 5d224da3da87400f2fab313abbd7c710e7169ef9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-11-01 18:41:21 +0200
+
+ xz: Avoid the abbreviation "e.g." on the man page.
+
+ A few are simply omitted, most are converted to "for example"
+ and surrounded with commas. Sounds like that this is better
+ style, for example, man-pages(7) recommends avoiding such
+ abbreviations except in parenthesis.
+
+ Thanks to Bjarni Ingi Gislason.
+
+ src/xz/xz.1 | 66 ++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 33 insertions(+), 33 deletions(-)
+
+commit 90457dbe3e5717660f5b81f8c604860fc5137c0c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-07-12 23:10:03 +0300
+
+ xz man page: Change \- (minus) to \(en (en-dash) for a numeric range.
+
+ Docs of ancient troff/nroff mention \(em (em-dash) but not \(en
+ and \- was used for both minus and en-dash. I don't know how
+ portable \(en is nowadays but it can be changed back if someone
+ complains. At least GNU groff and OpenBSD's mandoc support it.
+
+ Thanks to Bjarni Ingi Gislason for the patch.
+
+ src/xz/xz.1 | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+commit 352ba2d69af2136bc814aa1df1a132559d445616
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-07-12 20:46:24 +0300
+
+ Windows: Fix building of resource files when config.h isn't used.
+
+ Now CMake + Visual Studio works for building liblzma.dll.
+
+ Thanks to Markus Rickert.
+
+ src/common/common_w32res.rc | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit a9e2a87f1d61dcf684d809bf08c8ebea93f8a480
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-04-06 19:31:50 +0300
+
+ src/scripts/xzgrep.1: Filenames to xzgrep are optional.
+
+ xzgrep --help was correct already.
+
+ src/scripts/xzgrep.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a7ba275d9b855d186abb29eb7a4f4cb6d9ca6fe0
+Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+Date: 2020-03-26 22:17:31 +0000
+
+ src/script/xzgrep.1: Remove superfluous '.RB'
+
+ Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
+
+ [ "test-groff" is a developmental version of "groff" ]
+
+ Input file is ./src/scripts/xzgrep.1
+
+ <src/scripts/xzgrep.1>:20 (macro RB): only 1 argument, but more are expected
+ <src/scripts/xzgrep.1>:23 (macro RB): only 1 argument, but more are expected
+ <src/scripts/xzgrep.1>:26 (macro RB): only 1 argument, but more are expected
+ <src/scripts/xzgrep.1>:29 (macro RB): only 1 argument, but more are expected
+ <src/scripts/xzgrep.1>:32 (macro RB): only 1 argument, but more are expected
+
+ "abc..." does not mean the same as "abc ...".
+
+ The output from nroff and troff is unchanged except for the space
+ between "file" and "...".
+
+ Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ src/scripts/xzgrep.1 | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 133d498db0f4b14f066d192d64dbcade45deae6b
+Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+Date: 2020-03-30 21:56:36 +0000
+
+ xzgrep.1: Delete superfluous '.PP'
+
+ Summary:
+
+ mandoc -T lint xzgrep.1 :
+ mandoc: xzgrep.1:79:2: WARNING: skipping paragraph macro: PP empty
+
+ There is no change in the output of "nroff" and "troff".
+
+ Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ src/scripts/xzgrep.1 | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 057839ca982f886387b66746bffe749cb14fd8cd
+Author: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+Date: 2020-03-26 21:16:18 +0000
+
+ src/xz/xz.1: Correct misused two-fonts macros
+
+ Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
+
+ [ "test-groff" is a developmental version of "groff" ]
+
+ Input file is ./src/xz/xz.1
+
+ <src/xz/xz.1>:408 (macro BR): only 1 argument, but more are expected
+ <src/xz/xz.1>:1009 (macro BR): only 1 argument, but more are expected
+ <src/xz/xz.1>:1743 (macro BR): only 1 argument, but more are expected
+ <src/xz/xz.1>:1920 (macro BR): only 1 argument, but more are expected
+ <src/xz/xz.1>:2213 (macro BR): only 1 argument, but more are expected
+
+ Output from nroff and troff is unchanged, except for a font change of a
+ full stop (.).
+
+ Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
+
+ src/xz/xz.1 | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit b8e12f5ab4c9fd3cb09a4330b2861f6b979ababd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-23 18:07:50 +0200
+
+ Typo fixes from fossies.org.
+
+ https://fossies.org/linux/misc/xz-5.2.5.tar.xz/codespell.html
+
+ Makefile.am | 2 +-
+ doc/examples/01_compress_easy.c | 2 +-
+ src/liblzma/api/lzma/base.h | 2 +-
+ src/liblzma/check/crc32_x86.S | 2 +-
+ src/liblzma/common/index.c | 2 +-
+ src/xz/xz.1 | 4 ++--
+ 6 files changed, 7 insertions(+), 7 deletions(-)
+
+commit 869b9d1b4edd6df07f819d360d306251f8147353
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-17 16:24:28 +0200
+
+ Update NEWS for 5.2.5.
+
+ NEWS | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 105 insertions(+)
+
+commit a048e3a92d238c65f050a765174d9c75417231d4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-16 20:01:37 +0200
+
+ README: Update outdated sections.
+
+ README | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+commit 29aed815ad4f98f3e4d355faa76a244ecd8ce716
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-16 19:39:45 +0200
+
+ README: Mention that man pages can be translated.
+
+ README | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 7fa7653940cc9dcfcbce2fbc5166ea343ad4e3c1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-16 16:43:29 +0200
+
+ Update INSTALL.generic from Automake 1.16.1.
+
+ INSTALL.generic | 321 ++++++++++++++++++++++++++++----------------------------
+ 1 file changed, 162 insertions(+), 159 deletions(-)
+
+commit 9bd317ef03ab9b3e6a927c27c2e9c4ac041182f0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-15 15:27:22 +0200
+
+ Update INSTALL for Windows and DOS and add preliminary info for z/OS.
+
+ INSTALL | 51 +++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 41 insertions(+), 10 deletions(-)
+
+commit a3148c0446dc7fa96363752df414d22539c9007b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-15 15:26:20 +0200
+
+ Build: Update m4/ax_pthread.m4 from Autoconf Archive (again).
+
+ m4/ax_pthread.m4 | 219 +++++++++++++++++++++++++++++--------------------------
+ 1 file changed, 117 insertions(+), 102 deletions(-)
+
+commit 7812002dd3ed319e42a14662a8531802cca8ca67
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-11 21:15:35 +0200
+
+ xz: Never use thousand separators in DJGPP builds.
+
+ DJGPP 2.05 added support for thousands separators but it's
+ broken at least under WinXP with Finnish locale that uses
+ a non-breaking space as the thousands separator. Workaround
+ by disabling thousands separators for DJGPP builds.
+
+ src/xz/util.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+commit 7c8f688bf7fccd65d396e0130cbf4ea5dff5c56f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-11 19:38:08 +0200
+
+ DOS: Update dos/Makefile for DJGPP 2.05.
+
+ It doesn't need -fgnu89-inline like 2.04beta did.
+
+ dos/Makefile | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit 319ca928d73de87940c54e30bffe69f9fa65efdf
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-11 19:36:07 +0200
+
+ DOS: Update instructions in dos/INSTALL.txt.
+
+ dos/INSTALL.txt | 59 ++++++++++++++++++++++++++++-----------------------------
+ 1 file changed, 29 insertions(+), 30 deletions(-)
+
+commit cb6b227ce39932824812ccd8a0647bd968de27d2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-11 17:58:51 +0200
+
+ DOS: Update config.h.
+
+ The added defines assume GCC >= 4.8.
+
+ dos/config.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+commit 4572d53e16e87eee375bc5624de2fd59bb0ae9cd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-03-02 13:54:33 +0200
+
+ liblzma: Fix a comment and RC_SYMBOLS_MAX.
+
+ The comment didn't match the value of RC_SYMBOLS_MAX and the value
+ itself was slightly larger than actually needed. The only harm
+ about this was that memory usage was a few bytes larger.
+
+ src/liblzma/rangecoder/range_encoder.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 265daa873c0d871f5f23f9b56e133a6f20045a0a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-27 20:58:52 +0200
+
+ Build: Make CMake build fail if tuklib_cpucores or tuklib_physmem fails.
+
+ CMakeLists.txt | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 7c8b904527cdbe61248c80edcc2e20d840c4fef9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-27 20:24:27 +0200
+
+ Build: Add support for --no-po4a option to autogen.sh.
+
+ Normally, if po4a isn't available, autogen.sh will return
+ with non-zero exit status. The option --no-po4a can be useful
+ when one knows that po4a isn't available but wants autogen.sh
+ to still return with zero exit status.
+
+ autogen.sh | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+commit 292a5c0f9c9b3a66f5a5c652dc46381836d4537f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-25 21:35:14 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 474320e9908786ba2021035f9013191e16cde08a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-25 20:42:31 +0200
+
+ Build: Fix bugs in the CMake files.
+
+ Seems that the phrase "add more quotes" from sh/bash scripting
+ applies to CMake as well. E.g. passing an unquoted list ${FOO}
+ to a function that expects one argument results in only the
+ first element of the list being passed as an argument and
+ the rest get ignored. Adding quotes helps ("${FOO}").
+
+ list(INSERT ...) is weird. Inserting an empty string to an empty
+ variable results in empty list, but inserting it to a non-empty
+ variable does insert an empty element to the list.
+
+ Since INSERT requires at least one element,
+ "${CMAKE_THREAD_LIBS_INIT}" needs to be quoted in CMakeLists.txt.
+ It might result in an empty element in the list. It seems to not
+ matter as empty elements consistently get ignored in that variable.
+ In fact, calling cmake_check_push_state() and cmake_check_pop_state()
+ will strip the empty elements from CMAKE_REQUIRED_LIBRARIES!
+
+ In addition to quoting fixes, this fixes checks for the cache
+ variables in tuklib_cpucores.cmake and tuklib_physmem.cmake.
+
+ Thanks to Martin Matuška for testing and reporting the problems.
+ These fixes aren't tested yet but hopefully they soon will be.
+
+ CMakeLists.txt | 52 ++++++++++++++++++++++-----------------------
+ cmake/tuklib_common.cmake | 8 ++++---
+ cmake/tuklib_cpucores.cmake | 30 ++++++++++++++------------
+ cmake/tuklib_integer.cmake | 34 +++++++++++++++--------------
+ cmake/tuklib_mbstr.cmake | 6 +++---
+ cmake/tuklib_physmem.cmake | 29 +++++++++++++------------
+ cmake/tuklib_progname.cmake | 4 ++--
+ 7 files changed, 85 insertions(+), 78 deletions(-)
+
+commit 7e3493d40eac0c3fa3d5124097745a70e15c41f6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-24 23:38:16 +0200
+
+ Build: Add very limited experimental CMake support.
+
+ This does *NOT* replace the Autotools-based build system in
+ the foreseeable future. See the comment in the beginning
+ of CMakeLists.txt.
+
+ So far this has been tested only on GNU/Linux but I commit
+ it anyway to make it easier for others to test. Since I
+ haven't played much with CMake before, it's likely that
+ there are things that have been done in a silly or wrong
+ way and need to be fixed.
+
+ CMakeLists.txt | 643 ++++++++++++++++++++++++++++++++++++++++++++
+ cmake/tuklib_common.cmake | 47 ++++
+ cmake/tuklib_cpucores.cmake | 173 ++++++++++++
+ cmake/tuklib_integer.cmake | 100 +++++++
+ cmake/tuklib_mbstr.cmake | 20 ++
+ cmake/tuklib_physmem.cmake | 149 ++++++++++
+ cmake/tuklib_progname.cmake | 19 ++
+ 7 files changed, 1151 insertions(+)
+
+commit 21bd4701fca3e9002ce78bc135debca369ed8545
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-24 23:37:07 +0200
+
+ Update m4/.gitignore.
+
+ m4/.gitignore | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit e094d1d0f196a91ec703e8d0055948feef349ae8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-24 23:29:35 +0200
+
+ tuklib: Omit an unneeded <sys/types.h> from a tests.
+
+ tuklib_cpucores.c and tuklib_physmem.c don't include <sys/types.h>
+ even via other files in this package, so clearly that header isn't
+ needed in the tests either (no one has reported build problems due
+ to a missing header in a .c file).
+
+ m4/tuklib_cpucores.m4 | 1 -
+ m4/tuklib_physmem.m4 | 1 -
+ 2 files changed, 2 deletions(-)
+
+commit b3ed19a55fe99a45bd77614e149d39d18498075c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-24 23:01:00 +0200
+
+ liblzma: Remove unneeded <sys/types.h> from fastpos_tablegen.c.
+
+ This file only generates fastpos_table.c.
+ It isn't built as a part of liblzma.
+
+ src/liblzma/lzma/fastpos_tablegen.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+commit 7b8982b29179b3c586e0456dc9ecbd4f58dcea59
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-22 14:15:07 +0200
+
+ Use defined(__GNUC__) before __GNUC__ in preprocessor lines.
+
+ This should silence the equivalent of -Wundef in compilers that
+ don't define __GNUC__.
+
+ src/common/sysdefs.h | 3 ++-
+ src/liblzma/api/lzma.h | 5 +++--
+ 2 files changed, 5 insertions(+), 3 deletions(-)
+
+commit 43dfe04e6209c691cf4fbe3072d4ee91271748f1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-21 17:40:02 +0200
+
+ liblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA.
+
+ This gives a tiny encoder speed improvement. This could have been done
+ in 2014 after the commit 544aaa3d13554e8640f9caf7db717a96360ec0f6 but
+ it was forgotten.
+
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+commit 59e6eb4840b9f52fa3a61544974017279b448216
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-21 17:01:15 +0200
+
+ Build: Add visibility.m4 from gnulib.
+
+ Appears that this file used to get included as a side effect of
+ gettext. After the change to gettext version requirements this file
+ no longer got copied to the package and so the build was broken.
+
+ m4/.gitignore | 1 -
+ m4/visibility.m4 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 77 insertions(+), 1 deletion(-)
+
+commit 7fe3ef2eaa53d439cec043727ea1998f4ff0e22a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-21 16:10:44 +0200
+
+ xz: Silence a warning when sig_atomic_t is long int.
+
+ It can be true at least on z/OS.
+
+ src/xz/signals.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b0a2a77d10940c42b449d47a005bfc2e50ab5db8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-21 15:59:26 +0200
+
+ xz: Avoid unneeded access of a volatile variable.
+
+ src/xz/signals.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 524c2f12c762032b819757aeda8af7c47c4cabce
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-21 01:24:18 +0200
+
+ tuklib_integer.m4: Optimize the check order.
+
+ The __builtin byteswapping is the preferred one so check for it first.
+
+ m4/tuklib_integer.m4 | 56 +++++++++++++++++++++++++++-------------------------
+ 1 file changed, 29 insertions(+), 27 deletions(-)
+
+commit 57360bb4fd79b358b36d2877db26ac828d1fdfcb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-20 18:54:04 +0200
+
+ tuklib_exit: Add missing header.
+
+ strerror() needs <string.h> which happened to be included via
+ tuklib_common.h -> tuklib_config.h -> sysdefs.h if HAVE_CONFIG_H
+ was defined. This wasn't tested without config.h before so it
+ had worked fine.
+
+ src/common/tuklib_exit.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit fddd31175e74a538997a939d930462fde17d2dd4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-18 19:12:35 +0200
+
+ Revert the previous commit and add a comment.
+
+ The previous commit broke crc32_tablegen.c.
+
+ If the whole package is built without config.h (with defines
+ set on the compiler command line) this should still work fine
+ as long as these headers conform to C99 well enough.
+
+ src/common/tuklib_config.h | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+commit 4e4e9fbb7e66d45319525ac224bff48fbdd0cf6e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-17 23:37:20 +0200
+
+ Do not check for HAVE_CONFIG_H in tuklib_config.h.
+
+ In XZ Utils sysdefs.h takes care of it and the required headers.
+
+ src/common/tuklib_config.h | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+commit 2d4cef954feba82073951358466a1d614141cf33
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-16 11:18:28 +0200
+
+ sysdefs.h: Omit the conditionals around string.h and limits.h.
+
+ string.h is used unconditionally elsewhere in the project and
+ configure has always stopped if limits.h is missing, so these
+ headers must have been always available even on the weirdest
+ systems.
+
+ src/common/sysdefs.h | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+commit feb9c1969bc3eb33d4ecb72cfa897f92dae84939
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-15 15:07:11 +0200
+
+ Build: Bump Autoconf and Libtool version requirements.
+
+ There is no specific reason for this other than blocking
+ the most ancient versions. These are still old:
+
+ Autoconf 2.69 (2012)
+ Automake 1.12 (2012)
+ gettext 0.19.6 (2015)
+ Libtool 2.4 (2010)
+
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 3d576cf92158d62790017ad7f2dd6dc1dd6b42bb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-15 03:08:32 +0200
+
+ Build: Use AM_GNU_GETTEXT_REQUIRE_VERSION and require 0.19.6.
+
+ This bumps the version requirement from 0.19 (from 2014) to
+ 0.19.6 (2015).
+
+ Using only the old AM_GNU_GETTEXT_VERSION results in old
+ gettext infrastructure being placed in the package. By using
+ both macros we get the latest gettext files while the other
+ programs in the Autotools family can still see the old macro.
+
+ configure.ac | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit fa792b8befaf7cb3960b655e0a9410da866d756f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-14 20:42:06 +0200
+
+ Translations: Add German translation of the man pages.
+
+ Thanks to Mario Blättermann.
+
+ po4a/de.po | 5532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ po4a/po4a.conf | 2 +-
+ 2 files changed, 5533 insertions(+), 1 deletion(-)
+
+commit 6f7211b6bb47a895b47f533282dba9ee9a1b0c8b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-07 15:32:21 +0200
+
+ Build: Add support for translated man pages using po4a.
+
+ The dependency on po4a is optional. It's never required to install
+ the translated man pages when xz is built from a release tarball.
+ If po4a is missing when building from xz.git, the translated man
+ pages won't be generated but otherwise the build will work normally.
+
+ The translations are only updated automatically by autogen.sh and
+ by "make mydist". This makes it easy to keep po4a as an optional
+ dependency and ensures that I won't forget to put updated
+ translations to a release tarball.
+
+ The translated man pages aren't installed if --disable-nls is used.
+
+ The installation of translated man pages abuses Automake internals
+ by calling "install-man" with redefined dist_man_MANS and man_MANS.
+ This makes the hairy script code slightly less hairy. If it breaks
+ some day, this code needs to be fixed; don't blame Automake developers.
+
+ Also, this adds more quotes to the existing shell script code in
+ the Makefile.am "-hook"s.
+
+ Makefile.am | 4 ++++
+ autogen.sh | 8 ++++---
+ po4a/.gitignore | 2 ++
+ po4a/po4a.conf | 14 +++++++++++
+ po4a/update-po | 45 ++++++++++++++++++++++++++++++++++
+ src/scripts/Makefile.am | 64 +++++++++++++++++++++++++++++++++++++------------
+ src/xz/Makefile.am | 50 +++++++++++++++++++++++++++-----------
+ src/xzdec/Makefile.am | 55 ++++++++++++++++++++++++++++++++----------
+ 8 files changed, 197 insertions(+), 45 deletions(-)
+
+commit 426f9e5819ff7710a5ff573a96c02940be65d52f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-06 17:31:38 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit e3a4481d020e4de89efa037f335cf50f3ca55592
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-05 22:35:06 +0200
+
+ Update tests/.gitignore.
+
+ .gitignore | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 07208de92f2d5bca764f6d0ebe9d9866051dc4ef
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-05 22:28:51 +0200
+
+ Update m4/.gitignore.
+
+ m4/.gitignore | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit c91fbf223db46c3b3cb9df769863a1a60cd9c908
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-05 20:47:38 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 15a133b6d1a3eab4faf6eb52a71fdc56bd65846f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-05 20:40:14 +0200
+
+ xz: Make it a fatal error if enabling the sandbox fails.
+
+ Perhaps it's too drastic but on the other hand it will let me
+ learn about possible problems if people report the errors.
+ This won't be backported to the v5.2 branch.
+
+ src/xz/file_io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit af0fb386ef55db66654ae39e2deec6e04190c4ff
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-05 20:33:50 +0200
+
+ xz: Comment out annoying sandboxing messages.
+
+ src/xz/file_io.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+commit 986d8c9b52b824474088e5bb3b6940651660f0e2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-05 19:33:37 +0200
+
+ Build: Workaround a POSIX shell detection problem on Solaris.
+
+ I don't know if the problem is in gnulib's gl_POSIX_SHELL macro
+ or if xzgrep does something that isn't in POSIX. The workaround
+ adds a special case for Solaris: if /usr/xpg4/bin/sh exists and
+ gl_cv_posix_shell wasn't overriden on the configure command line,
+ use that shell for xzgrep and other scripts. That shell is known
+ to work and exists on most Solaris systems.
+
+ configure.ac | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+commit 6629ed929cc7d45a11e385f357ab58ec15e7e4ad
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-03 22:03:50 +0200
+
+ Build: Update m4/ax_pthread.m4 from Autoconf Archive.
+
+ m4/ax_pthread.m4 | 398 ++++++++++++++++++++++++++++++++++++++-----------------
+ 1 file changed, 279 insertions(+), 119 deletions(-)
+
+commit 353970510895f6a80adfe60cf71b70a95adfa8bc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-02-01 19:56:18 +0200
+
+ xz: Limit --memlimit-compress to at most 4020 MiB for 32-bit xz.
+
+ See the code comment for reasoning. It's far from perfect but
+ hopefully good enough for certain cases while hopefully doing
+ nothing bad in other situations.
+
+ At presets -5 ... -9, 4020 MiB vs. 4096 MiB makes no difference
+ on how xz scales down the number of threads.
+
+ The limit has to be a few MiB below 4096 MiB because otherwise
+ things like "xz --lzma2=dict=500MiB" won't scale down the dict
+ size enough and xz cannot allocate enough memory. With
+ "ulimit -v $((4096 * 1024))" on x86-64, the limit in xz had
+ to be no more than 4085 MiB. Some safety margin is good though.
+
+ This is hack but it should be useful when running 32-bit xz on
+ a 64-bit kernel that gives full 4 GiB address space to xz.
+ Hopefully this is enough to solve this:
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=1196786
+
+ FreeBSD has a patch that limits the result in tuklib_physmem()
+ to SIZE_MAX on 32-bit systems. While I think it's not the way
+ to do it, the results on --memlimit-compress have been good. This
+ commit should achieve practically identical results for compression
+ while leaving decompression and tuklib_physmem() and thus
+ lzma_physmem() unaffected.
+
+ src/xz/hardware.c | 32 +++++++++++++++++++++++++++++++-
+ src/xz/xz.1 | 21 ++++++++++++++++++++-
+ 2 files changed, 51 insertions(+), 2 deletions(-)
+
+commit ba76d67585f88677af9f48b48e7bdc3bb7687def
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-26 20:53:25 +0200
+
+ xz: Set the --flush-timeout deadline when the first input byte arrives.
+
+ xz --flush-timeout=2000, old version:
+
+ 1. xz is started. The next flush will happen after two seconds.
+ 2. No input for one second.
+ 3. A burst of a few kilobytes of input.
+ 4. No input for one second.
+ 5. Two seconds have passed and flushing starts.
+
+ The first second counted towards the flush-timeout even though
+ there was no pending data. This can cause flushing to occur more
+ often than needed.
+
+ xz --flush-timeout=2000, after this commit:
+
+ 1. xz is started.
+ 2. No input for one second.
+ 3. A burst of a few kilobytes of input. The next flush will
+ happen after two seconds counted from the time when the
+ first bytes of the burst were read.
+ 4. No input for one second.
+ 5. No input for another second.
+ 6. Two seconds have passed and flushing starts.
+
+ src/xz/coder.c | 6 +-----
+ src/xz/file_io.c | 6 +++++-
+ src/xz/mytime.c | 1 -
+ 3 files changed, 6 insertions(+), 7 deletions(-)
+
+commit fd47fd62bbb1bfd13ab63869137971d8b390025f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-26 20:19:19 +0200
+
+ xz: Move flush_needed from mytime.h to file_pair struct in file_io.h.
+
+ src/xz/coder.c | 3 ++-
+ src/xz/file_io.c | 3 ++-
+ src/xz/file_io.h | 3 +++
+ src/xz/mytime.c | 3 ---
+ src/xz/mytime.h | 4 ----
+ 5 files changed, 7 insertions(+), 9 deletions(-)
+
+commit 815035681063d5774d3640fc20b8ede783dd574e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-26 14:49:22 +0200
+
+ xz: coder.c: Make writing output a separate function.
+
+ The same code sequence repeats so it's nicer as a separate function.
+ Note that in one case there was no test for opt_mode != MODE_TEST,
+ but that was only because that condition would always be true, so
+ this commit doesn't change the behavior there.
+
+ src/xz/coder.c | 30 +++++++++++++++++-------------
+ 1 file changed, 17 insertions(+), 13 deletions(-)
+
+commit 5a49e081a098455bcdbd95cefb90e9b18780fe58
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-26 14:13:42 +0200
+
+ xz: Fix semi-busy-waiting in xz --flush-timeout.
+
+ When input blocked, xz --flush-timeout=1 would wake up every
+ millisecond and initiate flushing which would have nothing to
+ flush and thus would just waste CPU time. The fix disables the
+ timeout when no input has been seen since the previous flush.
+
+ src/xz/coder.c | 4 ++++
+ src/xz/file_io.c | 15 +++++++++++----
+ src/xz/file_io.h | 4 ++++
+ 3 files changed, 19 insertions(+), 4 deletions(-)
+
+commit dcca70fe9fa3c4bec56cf9c79e966166c9a9cf6a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-26 13:47:31 +0200
+
+ xz: Refactor io_read() a bit.
+
+ src/xz/file_io.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+commit 4ae9ab70cd3214395756435d13d8d000368ca2cb
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-26 13:37:08 +0200
+
+ xz: Update a comment in file_io.h.
+
+ src/xz/file_io.h | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 3333ba4a6795a55cf0375329ba08152bd7fcbd46
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-26 13:27:51 +0200
+
+ xz: Move the setting of flush_needed in file_io.c to a nicer location.
+
+ src/xz/file_io.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+commit cf2df0f05ac98c1158c6e48145900b773223605d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2020-01-19 21:54:33 +0200
+
+ Use $(LIB_FUZZING_ENGINE) in tests/ossfuzz/Makefile.
+
+ https://github.com/google/oss-fuzz/pull/3219#issuecomment-573751048
+
+ Thanks to Bhargava Shastry for sending the patch.
+
+ tests/ossfuzz/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 7136f1735c60ac6967c4b8e277fcde53d485234f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-12-31 00:41:28 +0200
+
+ Rename unaligned_read32ne to read32ne, and similarly for the others.
+
+ src/common/tuklib_integer.h | 64 +++++++++++++++----------------
+ src/liblzma/common/alone_encoder.c | 2 +-
+ src/liblzma/common/block_header_decoder.c | 2 +-
+ src/liblzma/common/block_header_encoder.c | 2 +-
+ src/liblzma/common/memcmplen.h | 9 ++---
+ src/liblzma/common/stream_flags_decoder.c | 6 +--
+ src/liblzma/common/stream_flags_encoder.c | 8 ++--
+ src/liblzma/lz/lz_encoder_hash.h | 2 +-
+ src/liblzma/lzma/lzma_decoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder_private.h | 3 +-
+ src/liblzma/simple/simple_decoder.c | 2 +-
+ src/liblzma/simple/simple_encoder.c | 2 +-
+ tests/test_block_header.c | 4 +-
+ tests/test_stream_flags.c | 6 +--
+ 15 files changed, 54 insertions(+), 62 deletions(-)
+
+commit 5e78fcbf2eb21936022c9c5c3625d4da76f4b241
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-12-31 00:29:48 +0200
+
+ Rename read32ne to aligned_read32ne, and similarly for the others.
+
+ Using the aligned methods requires more care to ensure that
+ the address really is aligned, so it's nicer if the aligned
+ methods are prefixed. The next commit will remove the unaligned_
+ prefix from the unaligned methods which in liblzma are used in
+ more places than the aligned ones.
+
+ src/common/tuklib_integer.h | 56 +++++++++++++++++++++---------------------
+ src/liblzma/check/crc32_fast.c | 4 +--
+ src/liblzma/check/crc64_fast.c | 4 +--
+ 3 files changed, 32 insertions(+), 32 deletions(-)
+
+commit 77bc5bc6dd67056cfd5888520ac930cfc57b4516
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-12-31 00:18:24 +0200
+
+ Revise tuklib_integer.h and .m4.
+
+ Add a configure option --enable-unsafe-type-punning to get the
+ old non-conforming memory access methods. It can be useful with
+ old compilers or in some other less typical situations but
+ shouldn't normally be used.
+
+ Omit the packed struct trick for unaligned access. While it's
+ best in some cases, this is simpler. If the memcpy trick doesn't
+ work, one can request unsafe type punning from configure.
+
+ Because CRC32/CRC64 code needs fast aligned reads, if no very
+ safe way to do it is found, type punning is used as a fallback.
+ This sucks but since it currently works in practice, it seems to
+ be the least bad option. It's never needed with GCC >= 4.7 or
+ Clang >= 3.6 since these support __builtin_assume_aligned and
+ thus fast aligned access can be done with the memcpy trick.
+
+ Other things:
+ - Support GCC/Clang __builtin_bswapXX
+ - Cleaner bswap fallback macros
+ - Minor cleanups
+
+ m4/tuklib_integer.m4 | 46 ++++-
+ src/common/tuklib_integer.h | 488 ++++++++++++++++++++++++--------------------
+ 2 files changed, 316 insertions(+), 218 deletions(-)
+
+commit 8b72950a6b2e2a36c2d8fdc8857564b57191b088
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-12-29 22:51:58 +0200
+
+ Tests: Hopefully fix test_check.c to work on EBCDIC systems.
+
+ Thanks to Daniel Richard G.
+
+ tests/test_check.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+commit 43ce4ea7c762238d3df9717b34126d3e0d7cd51c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-09-24 23:02:40 +0300
+
+ Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris.
+
+ This adds a configure option --enable-path-for-scripts=PREFIX
+ which defaults to empty except on Solaris it is /usr/xpg4/bin
+ to make POSIX grep and others available. The Solaris case had
+ been documented in INSTALL with a manual fix but it's better
+ to do this automatically since it is needed on most Solaris
+ systems anyway.
+
+ Thanks to Daniel Richard G.
+
+ INSTALL | 43 +++++++++++++++++++++++++++++++++++--------
+ configure.ac | 26 ++++++++++++++++++++++++++
+ src/scripts/xzdiff.in | 1 +
+ src/scripts/xzgrep.in | 1 +
+ src/scripts/xzless.in | 1 +
+ src/scripts/xzmore.in | 1 +
+ 6 files changed, 65 insertions(+), 8 deletions(-)
+
+commit 6a89e656ebedd53a10cd1a063a32a9e4ade0da1f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-07-12 18:57:43 +0300
+
+ Fix comment typos in tuklib_mbstr* files.
+
+ src/common/tuklib_mbstr.h | 2 +-
+ src/common/tuklib_mbstr_fw.c | 2 +-
+ src/common/tuklib_mbstr_width.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+commit ac0b4212656a48ef0c187c0c941d40ac9489ae36
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-07-12 18:30:46 +0300
+
+ Add missing include to tuklib_mbstr_width.c.
+
+ It didn't matter in XZ Utils because sysdefs.h
+ includes string.h anyway.
+
+ src/common/tuklib_mbstr_width.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 72a443281fb0b91aebf8cdff2ab1f7c07b081240
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-07-12 18:10:57 +0300
+
+ Update tuklib base headers to include stdbool.h.
+
+ src/common/tuklib_common.h | 2 +-
+ src/common/tuklib_config.h | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+commit de1f47b2b40e960b7bc3acba754f66dd19705921
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-28 00:54:31 +0300
+
+ xz: Automatically align the strings in --info-memory.
+
+ This makes it easier to translate the strings.
+
+ Also, the string for amount of RAM was shortened.
+
+ src/xz/hardware.c | 45 ++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 34 insertions(+), 11 deletions(-)
+
+commit 8ce679125dbd0e2058d8f886e738d7f19a45cab5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-25 23:15:21 +0300
+
+ liblzma: Fix a buggy comment.
+
+ src/liblzma/lz/lz_encoder_mf.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit fc77929e92e869f6869bf88931066103fd75f376
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-25 00:16:06 +0300
+
+ configure.ac: Fix a typo in a comment.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit e873902641794210ad7db59743f98e3e1cd6139f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-25 00:08:13 +0300
+
+ Tests: Silence warnings from clang -Wassign-enum.
+
+ Also changed 999 to 99 so it fits even if lzma_check happened
+ to be 8 bits wide.
+
+ tests/test_block_header.c | 3 ++-
+ tests/test_stream_flags.c | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit d499e467d99efeaae688564eedc4548837c1416a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 23:52:17 +0300
+
+ liblzma: Add a comment.
+
+ src/liblzma/common/stream_encoder_mt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a12b13c5f0d54c684fa8446f93fdac08ab2a716b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 23:45:21 +0300
+
+ liblzma: Silence clang -Wmissing-variable-declarations.
+
+ src/liblzma/check/crc32_table.c | 3 +++
+ src/liblzma/check/crc64_table.c | 3 +++
+ 2 files changed, 6 insertions(+)
+
+commit 1b4675cebf7471f7cc9b7072c950e3de97147063
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 23:25:41 +0300
+
+ Add LZMA_RET_INTERNAL1..8 to lzma_ret and use one for LZMA_TIMED_OUT.
+
+ LZMA_TIMED_OUT is *internally* used as a value for lzma_ret
+ enumeration. Previously it was #defined to 32 and cast to lzma_ret.
+ That way it wasn't visible in the public API, but this was hackish.
+
+ Now the public API has eight LZMA_RET_INTERNALx members and
+ LZMA_TIMED_OUT is #defined to LZMA_RET_INTERNAL1. This way
+ the code is cleaner overall although the public API has a few
+ extra mysterious enum members.
+
+ src/liblzma/api/lzma/base.h | 15 ++++++++++++++-
+ src/liblzma/common/common.c | 4 +---
+ src/liblzma/common/common.h | 5 ++---
+ src/xz/message.c | 8 ++++++++
+ 4 files changed, 25 insertions(+), 7 deletions(-)
+
+commit 159c43875eb25deea626ed651274464bae3e32ef
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 22:57:43 +0300
+
+ xz: Silence a warning from clang -Wsign-conversion in main.c.
+
+ src/xz/main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 466cfcd3e52f6750ce28a635997f3dd84fb18515
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 22:52:20 +0300
+
+ xz: Make "headings" static in list.c.
+
+ Caught by clang -Wmissing-variable-declarations.
+
+ src/xz/list.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 608517b9b76c41fac6613dbda1193d6f41338e19
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 22:47:39 +0300
+
+ liblzma: Remove incorrect uses of lzma_attribute((__unused__)).
+
+ Caught by clang -Wused-but-marked-unused.
+
+ src/liblzma/common/alone_decoder.c | 3 +--
+ src/liblzma/common/alone_encoder.c | 3 +--
+ src/liblzma/lz/lz_decoder.c | 3 +--
+ 3 files changed, 3 insertions(+), 6 deletions(-)
+
+commit c2d2ab6a9d41a2b55d047c5b710aacf80d219255
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 20:53:55 +0300
+
+ Tests: Silence a warning from -Wsign-conversion.
+
+ tests/create_compress_files.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+commit 2402f7873dcae719d0ebddd23bb579074519ac52
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 20:45:49 +0300
+
+ xz: Fix an integer overflow with 32-bit off_t.
+
+ Or any off_t which isn't very big (like signed 64 bit integer
+ that most system have). A small off_t could overflow if the
+ file being decompressed had long enough run of zero bytes,
+ which would result in corrupt output.
+
+ src/xz/file_io.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+commit 4fd3a8dd0b60f029e1c66a0ee634f9e9fda3caa9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 01:24:17 +0300
+
+ xz: Cleanup io_seek_src() a bit.
+
+ lseek() returns -1 on error and checking for -1 is nicer.
+
+ src/xz/file_io.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit dfda7cf6afa486e10df035327d68753896dfb48a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 00:57:23 +0300
+
+ Tests: Remove a duplicate branch from tests/tests.h.
+
+ The duplication was introduced about eleven years ago and
+ should have been cleaned up back then already.
+
+ This was caught by -Wduplicated-branches.
+
+ tests/tests.h | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+commit 1d4a904d8fb634bd5a04f7fbdd17d3739f3d8866
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 00:40:45 +0300
+
+ xz: Change io_seek_src and io_pread arguments from off_t to uint64_t.
+
+ This helps fixing warnings from -Wsign-conversion and makes the
+ code look better too.
+
+ src/xz/file_io.c | 16 ++++++++++++----
+ src/xz/file_io.h | 4 ++--
+ src/xz/list.c | 9 ++++-----
+ 3 files changed, 18 insertions(+), 11 deletions(-)
+
+commit 50120deb0159fcb53ee1a6caffb2bb81a1ecd990
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-24 00:12:38 +0300
+
+ xz: list.c: Fix some warnings from -Wsign-conversion.
+
+ src/xz/list.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit d0a78751eb54fb1572002746c533936a118e4e42
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-23 23:22:45 +0300
+
+ tuklib_mbstr_width: Fix a warning from -Wsign-conversion.
+
+ src/common/tuklib_mbstr_width.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 7883d73530b4b2a701ddd7d50c35676cbc158039
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-23 23:19:34 +0300
+
+ xz: Fix some of the warnings from -Wsign-conversion.
+
+ src/xz/args.c | 4 ++--
+ src/xz/coder.c | 4 ++--
+ src/xz/file_io.c | 5 +++--
+ src/xz/message.c | 4 ++--
+ src/xz/mytime.c | 4 ++--
+ src/xz/options.c | 2 +-
+ src/xz/util.c | 4 ++--
+ 7 files changed, 14 insertions(+), 13 deletions(-)
+
+commit c2b994fe3d35e9e575c28869a2f7f534f2495d05
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-23 22:27:45 +0300
+
+ tuklib_cpucores: Silence warnings from -Wsign-conversion.
+
+ src/common/tuklib_cpucores.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+commit 07c4fa9e1a195e0543f271380c8de22a3ab145ff
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-23 21:40:47 +0300
+
+ xzdec: Fix warnings from -Wsign-conversion.
+
+ src/xzdec/xzdec.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit dfac2c9a1d7d4a2b8a5d7c9c6d567dee48318bcf
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-23 21:38:56 +0300
+
+ liblzma: Fix warnings from -Wsign-conversion.
+
+ Also, more parentheses were added to the literal_subcoder
+ macro in lzma_comon.h (better style but no functional change
+ in the current usage).
+
+ src/liblzma/common/block_header_decoder.c | 2 +-
+ src/liblzma/delta/delta_decoder.c | 2 +-
+ src/liblzma/lzma/fastpos.h | 2 +-
+ src/liblzma/lzma/lzma2_decoder.c | 8 ++++----
+ src/liblzma/lzma/lzma_common.h | 3 ++-
+ src/liblzma/lzma/lzma_decoder.c | 16 ++++++++--------
+ src/liblzma/simple/arm.c | 6 +++---
+ src/liblzma/simple/armthumb.c | 8 ++++----
+ src/liblzma/simple/ia64.c | 2 +-
+ src/liblzma/simple/powerpc.c | 9 +++++----
+ src/liblzma/simple/x86.c | 2 +-
+ 11 files changed, 31 insertions(+), 29 deletions(-)
+
+commit 41838dcc26375f6aa393a63e4d81e2f4d223de07
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-23 19:33:55 +0300
+
+ tuklib_integer: Silence warnings from -Wsign-conversion.
+
+ src/common/tuklib_integer.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 3ce05d235f736d392347a05086b8033416874b87
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-20 19:40:30 +0300
+
+ tuklib_integer: Fix usage of conv macros.
+
+ Use a temporary variable instead of e.g.
+ conv32le(unaligned_read32ne(buf)) because the macro can
+ evaluate its argument multiple times.
+
+ src/common/tuklib_integer.h | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+commit b525b0c0ef40cd89b69294c9b8d57f4a8db58e1f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-03 20:44:19 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 039a168e8cf201d5104a25ec41f0cf25eda6cc53
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-03 20:41:54 +0300
+
+ liblzma: Fix comments.
+
+ Thanks to Bruce Stark.
+
+ src/liblzma/common/alone_encoder.c | 4 ++--
+ src/liblzma/common/block_util.c | 2 +-
+ src/liblzma/common/common.c | 2 +-
+ src/liblzma/common/filter_common.h | 2 +-
+ src/liblzma/common/filter_decoder.h | 2 +-
+ src/liblzma/common/filter_flags_encoder.c | 2 +-
+ 6 files changed, 7 insertions(+), 7 deletions(-)
+
+commit c460f6defebc5a81bbca90adc2476154ca244f69
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-02 00:50:59 +0300
+
+ liblzma: Fix one more unaligned read to use unaligned_read16ne().
+
+ src/liblzma/lz/lz_encoder_hash.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit c81d77c537f0b8c8672868e1dc6cf7290ce4a25b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-01 21:41:55 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 386394fc9fcde2615391f804eaa466749f96f4ef
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-01 21:36:13 +0300
+
+ liblzma: memcmplen: Use ctz32() from tuklib_integer.h.
+
+ The same compiler-specific #ifdefs are already in tuklib_integer.h
+
+ src/liblzma/common/memcmplen.h | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+commit 264ab971ce2994baac41b1579c9c35aba7743fc8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-01 21:30:03 +0300
+
+ tuklib_integer: Cleanup MSVC-specific code.
+
+ src/common/tuklib_integer.h | 20 +++++++++-----------
+ 1 file changed, 9 insertions(+), 11 deletions(-)
+
+commit 33773c6f2a8711d4aa6656795db52c59a28580ec
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-01 19:01:21 +0300
+
+ liblzma: Use unaligned_readXXne functions instead of type punning.
+
+ Now gcc -fsanitize=undefined should be clean.
+
+ Thanks to Jeffrey Walton.
+
+ src/liblzma/common/memcmplen.h | 12 ++++++------
+ src/liblzma/lzma/lzma_encoder_private.h | 2 +-
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+commit e5f13a66567b1987e0aae42c6fdcd277bb5810ba
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-01 18:46:54 +0300
+
+ tuklib_integer: Autodetect support for unaligned access on ARM.
+
+ The result is used as the default for --enable-unaligned-access.
+ The test should work with GCC and Clang.
+
+ m4/tuklib_integer.m4 | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit 3bc112c2d38d5f348bce7bc2422286b1692c7490
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-06-01 18:41:16 +0300
+
+ tuklib_integer: Improve unaligned memory access.
+
+ Now memcpy() or GNU C packed structs for unaligned access instead
+ of type punning. See the comment in this commit for details.
+
+ Avoiding type punning with unaligned access is needed to
+ silence gcc -fsanitize=undefined.
+
+ New functions: unaliged_readXXne and unaligned_writeXXne where
+ XX is 16, 32, or 64.
+
+ src/common/tuklib_integer.h | 180 +++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 168 insertions(+), 12 deletions(-)
+
+commit 2a22de439ec63da1927b640eda309296a1e8dce5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-05-13 20:05:17 +0300
+
+ liblzma: Avoid memcpy(NULL, foo, 0) because it is undefined behavior.
+
+ I should have always known this but I didn't. Here is an example
+ as a reminder to myself:
+
+ int mycopy(void *dest, void *src, size_t n)
+ {
+ memcpy(dest, src, n);
+ return dest == NULL;
+ }
+
+ In the example, a compiler may assume that dest != NULL because
+ passing NULL to memcpy() would be undefined behavior. Testing
+ with GCC 8.2.1, mycopy(NULL, NULL, 0) returns 1 with -O0 and -O1.
+ With -O2 the return value is 0 because the compiler infers that
+ dest cannot be NULL because it was already used with memcpy()
+ and thus the test for NULL gets optimized out.
+
+ In liblzma, if a null-pointer was passed to memcpy(), there were
+ no checks for NULL *after* the memcpy() call, so I cautiously
+ suspect that it shouldn't have caused bad behavior in practice,
+ but it's hard to be sure, and the problematic cases had to be
+ fixed anyway.
+
+ Thanks to Jeffrey Walton.
+
+ src/liblzma/common/common.c | 6 +++++-
+ src/liblzma/lz/lz_decoder.c | 12 +++++++++---
+ src/liblzma/simple/simple_coder.c | 10 +++++++++-
+ 3 files changed, 23 insertions(+), 5 deletions(-)
+
+commit d3fc850cfedc058247d9e334ce59bbc8f2286d8a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-05-11 20:56:08 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4adb8288ab61d5f14e212007b8742df0710baf73
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-05-11 20:54:12 +0300
+
+ xz: Update xz man page date.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2fb0ddaa557ce86e38fe06439930fa8665f092fd
+Author: Antoine Cœur <antoine.coeur@ef.com>
+Date: 2019-05-08 13:30:57 +0800
+
+ spelling
+
+ Doxyfile.in | 2 +-
+ NEWS | 2 +-
+ doc/examples/11_file_info.c | 2 +-
+ src/liblzma/api/lzma/block.h | 2 +-
+ src/liblzma/api/lzma/hardware.h | 2 +-
+ src/liblzma/api/lzma/lzma12.h | 2 +-
+ src/liblzma/api/lzma/vli.h | 2 +-
+ src/liblzma/common/file_info.c | 4 ++--
+ src/liblzma/common/hardware_physmem.c | 2 +-
+ src/liblzma/common/index.c | 4 ++--
+ src/liblzma/common/stream_encoder_mt.c | 2 +-
+ src/liblzma/common/vli_decoder.c | 2 +-
+ src/liblzma/lz/lz_decoder.c | 2 +-
+ src/scripts/xzgrep.in | 2 +-
+ src/xz/args.c | 2 +-
+ src/xz/coder.c | 4 ++--
+ src/xz/list.c | 4 ++--
+ src/xz/main.c | 2 +-
+ src/xz/mytime.h | 2 +-
+ src/xz/private.h | 2 +-
+ src/xz/xz.1 | 2 +-
+ windows/build.bash | 2 +-
+ 22 files changed, 26 insertions(+), 26 deletions(-)
+
+commit 4ed339606156bd313ed99237485cb8ed0362d64f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-05-01 18:43:10 +0300
+
+ xz: In xz -lvv look at the widths of the check names too.
+
+ Now the widths of the check names is used to adjust the width
+ of the Check column. This way there no longer is a need to restrict
+ the widths of the check names to be at most ten terminal-columns.
+
+ src/xz/list.c | 32 ++++++++++++++++++++++++++------
+ 1 file changed, 26 insertions(+), 6 deletions(-)
+
+commit 2f4281a1001dcf7fdf1418c0c0d246c16561fb65
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-05-01 18:33:25 +0300
+
+ xz: Fix xz -lvv column alignment to look at the translated strings.
+
+ src/xz/list.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 01d01b7c7c0b8eaf7f780a5584ec52c22d10fa4a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-05-01 16:52:36 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 64030c6b17f7743df03a9948a0ccfcdf40c6b97c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-05-01 16:43:16 +0300
+
+ Windows: Update VS version in windows/vs2019/config.h.
+
+ windows/vs2019/config.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2dc9117f5fbfab31444a3ca1e55795ccfa8a9f51
+Author: Julien Marrec <julien.marrec@gmail.com>
+Date: 2019-04-25 17:44:06 +0200
+
+ Windows: Upgrade solution itself
+
+ windows/vs2019/xz_win.sln | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+commit ac31413916fa9b11bab17f0f0aa63e2869360f6f
+Author: Julien Marrec <julien.marrec@gmail.com>
+Date: 2019-04-25 17:40:24 +0200
+
+ Windows: Upgrade solution with VS2019
+
+ windows/vs2019/liblzma.vcxproj | 15 ++++++++-------
+ windows/vs2019/liblzma_dll.vcxproj | 15 ++++++++-------
+ 2 files changed, 16 insertions(+), 14 deletions(-)
+
+commit be25a0c37ba92a20c390b4d17fe502457fe96b71
+Author: Julien Marrec <julien.marrec@gmail.com>
+Date: 2019-04-25 17:39:32 +0200
+
+ Windows: Duplicate windows/vs2017 before upgrading
+
+ windows/vs2019/config.h | 148 ++++++++++++++
+ windows/vs2019/liblzma.vcxproj | 356 ++++++++++++++++++++++++++++++++++
+ windows/vs2019/liblzma_dll.vcxproj | 385 +++++++++++++++++++++++++++++++++++++
+ windows/vs2019/xz_win.sln | 48 +++++
+ 4 files changed, 937 insertions(+)
+
+commit d0e58b3a51e8e616f3dc26ec7b7e4aa0fa6991ad
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-03-04 22:49:04 +0200
+
+ README: Update translation instructions.
+
+ XZ Utils is now part of the Translation Project
+ <https://translationproject.org/>.
+
+ README | 32 +++++++++++++-------------------
+ 1 file changed, 13 insertions(+), 19 deletions(-)
+
+commit a750c35a7d45a16c11c1d40fecee8443c32a9996
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-03-04 21:20:39 +0200
+
+ xz: Automatically align column headings in xz -lvv.
+
+ src/xz/list.c | 263 ++++++++++++++++++++++++++++++++++++++++++++++------------
+ 1 file changed, 212 insertions(+), 51 deletions(-)
+
+commit 6cb42e8aa1dc37bf403a9f5acbd07e86036b7e77
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-03-04 01:07:59 +0200
+
+ xz: Automatically align strings ending in a colon in --list output.
+
+ This should avoid alignment errors in translations with these
+ strings.
+
+ src/xz/list.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 102 insertions(+), 12 deletions(-)
+
+commit 1e3f29b62f2c03e50fc9ebea7b83c1497dd35484
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2019-01-13 17:29:23 +0200
+
+ Windows/VS2017: Omit WindowsTargetPlatformVersion from project files.
+
+ I understood that if a WTPV is specified, it's often wrong
+ because different VS installations have different SDK version
+ installed. Omitting the WTPV tag makes VS2017 default to
+ Windows SDK 8.1 which often is also missing, so in any case
+ people may need to specify the WTPV before building. But some
+ day in the future a missing WTPV tag will start to default to
+ the latest installed SDK which sounds reasonable:
+
+ https://developercommunity.visualstudio.com/content/problem/140294/windowstargetplatformversion-makes-it-impossible-t.html
+
+ Thanks to "dom".
+
+ windows/INSTALL-MSVC.txt | 4 ++++
+ windows/vs2017/liblzma.vcxproj | 1 -
+ windows/vs2017/liblzma_dll.vcxproj | 1 -
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 4d86076332aece6314063d3712a5f364172bbb0f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-12-20 20:42:29 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b55d79461d1f6aeaac03c7dae84481e5eb8bea4c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-12-14 20:34:30 +0200
+
+ xz: Fix a crash in progress indicator when in passthru mode.
+
+ "xz -dcfv not_an_xz_file" crashed (all four options are
+ required to trigger it). It caused xz to call
+ lzma_get_progress(&strm, ...) when no coder was initialized
+ in strm. In this situation strm.internal is NULL which leads
+ to a crash in lzma_get_progress().
+
+ The bug was introduced when xz started using lzma_get_progress()
+ to get progress info for multi-threaded compression, so the
+ bug is present in versions 5.1.3alpha and higher.
+
+ Thanks to Filip Palian <Filip.Palian@pjwstk.edu.pl> for
+ the bug report.
+
+ src/xz/coder.c | 11 +++++++----
+ src/xz/message.c | 18 ++++++++++++++++--
+ src/xz/message.h | 3 ++-
+ 3 files changed, 25 insertions(+), 7 deletions(-)
+
+commit 4ae5526de013efd1021686fa80bdd10cf1cb9c56
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-11-22 17:20:31 +0200
+
+ xz: Update man page timestamp.
+
+ src/xz/xz.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6a36d0d5f49e0080ff64dd9ef250abd489bea2ad
+Author: Pavel Raiskup <praiskup@redhat.com>
+Date: 2018-11-22 15:14:34 +0100
+
+ 'have have' typos
+
+ src/xz/signals.c | 2 +-
+ src/xz/xz.1 | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 9eca51ef805ed8002a851df1b4995d71826c8b6e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-11-02 20:40:48 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 106d1a663d4ba42b63231caa289f531548df81c1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-11-02 20:18:45 +0200
+
+ Tests: Add a fuzz test program and a config file for OSS-Fuzz.
+
+ Thanks to Bhargava Shastry and Github user pdknsk.
+
+ tests/Makefile.am | 1 +
+ tests/ossfuzz/Makefile | 7 ++++
+ tests/ossfuzz/config/fuzz.dict | 2 +
+ tests/ossfuzz/config/fuzz.options | 2 +
+ tests/ossfuzz/fuzz.c | 82 +++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 94 insertions(+)
+
+commit a18ae42a79a19b1394b41eb3e238139fd28012ec
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-10-26 22:49:10 +0300
+
+ liblzma: Don't verify header CRC32s if building for fuzz testing.
+
+ FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is #defined when liblzma
+ is being built for fuzz testing.
+
+ Most fuzzed inputs would normally get rejected because of incorrect
+ CRC32 and the actual header decoding code wouldn't get fuzzed.
+ Disabling CRC32 checks avoids this problem. The fuzzer program
+ must still use LZMA_IGNORE_CHECK flag to disable verification of
+ integrity checks of uncompressed data.
+
+ src/liblzma/common/block_header_decoder.c | 5 ++++-
+ src/liblzma/common/index_decoder.c | 5 ++++-
+ src/liblzma/common/index_hash.c | 5 ++++-
+ src/liblzma/common/stream_flags_decoder.c | 10 ++++++++--
+ 4 files changed, 20 insertions(+), 5 deletions(-)
+
+commit f76f7516d6a1c832f61810c82e92d151cc80966c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-07-27 18:10:44 +0300
+
+ xzless: Rename unused variables to silence static analysers.
+
+ In this particular case I don't see this affecting readability
+ of the code.
+
+ Thanks to Pavel Raiskup.
+
+ src/scripts/xzless.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 3cbcaeb07eb7543735befd6f507fdb5fa4363cff
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-07-27 16:02:58 +0300
+
+ liblzma: Remove an always-true condition from lzma_index_cat().
+
+ This should help static analysis tools to see that newg
+ isn't leaked.
+
+ Thanks to Pavel Raiskup.
+
+ src/liblzma/common/index.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 76762ae6098ec55c326f4b4b4a42e8c1918ee81f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-05-19 21:23:25 +0300
+
+ liblzma: Improve lzma_properties_decode() API documentation.
+
+ src/liblzma/api/lzma/filter.h | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit 2267f5b0d20a5d24e93fcd9f72ea7eeb0d89708c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-04-29 18:58:19 +0300
+
+ Bump the version number to 5.3.1alpha.
+
+ src/liblzma/api/lzma/version.h | 2 +-
+ src/liblzma/liblzma.map | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit cee3021d30704858e4bdd22240e7d28e570d7451
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-04-29 18:48:00 +0300
+
+ extra/scanlzma: Fix compiler warnings.
+
+ extra/scanlzma/scanlzma.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit c5c7ceb08a011b97d261798033e2c39613a69eb7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-04-29 18:44:47 +0300
+
+ DOS: Add file_info.c to the list of files to build.
+
+ dos/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 114cab97af766b21e0fc8620479202fb1e7a5e41
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-04-29 18:33:10 +0300
+
+ Update NEWS for 5.3.1alpha.
+
+ NEWS | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit b8139e11c512bbf32bf58ab0689f9bb6c52819da
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-04-29 18:15:37 +0300
+
+ Add NEWS for 5.2.4.
+
+ NEWS | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+commit 47b59d47cfd904a420fbd45629d168ca1973721d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-02-06 19:36:30 +0200
+
+ Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit bc197991690ede24ab143665b5b0f0f9cb35cc46
+Author: Ben Boeckel <mathstuf@gmail.com>
+Date: 2018-01-29 13:58:18 -0500
+
+ nothrow: use noexcept for C++11 and newer
+
+ In C++11, the `throw()` specifier is deprecated and `noexcept` is
+ preffered instead.
+
+ src/liblzma/api/lzma.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit fb6d4f83cb6e144734f2a4216bb117bd56dc3cb5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-02-06 18:02:48 +0200
+
+ liblzma: Remove incorrect #ifdef from range_common.h.
+
+ In most cases it was harmless but it could affect some
+ custom build systems.
+
+ Thanks to Pippijn van Steenhoven.
+
+ src/liblzma/rangecoder/range_common.h | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+commit bc577d35c2d0ed17f554d2d8107b2a2a9abbac76
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-01-10 22:10:39 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 713bbc1a80f26d34c96ed3dbb9887362204de3a1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2018-01-10 21:54:27 +0200
+
+ tuklib_integer: New Intel C compiler needs immintrin.h.
+
+ Thanks to Melanie Blower (Intel) for the patch.
+
+ src/common/tuklib_integer.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+commit a0ee1afbd99da138b559cb27fa2022e7f1ab44f3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-09-24 20:04:24 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit a1e2c568de29c0b57d873eab40a2879b749da429
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-09-16 20:36:20 +0300
+
+ Windows: Fix paths in VS project files.
+
+ Some paths use slashes instead of backslashes as directory
+ separators... now it should work (I tested VS2013 version).
+
+ windows/vs2013/liblzma.vcxproj | 12 ++++++------
+ windows/vs2013/liblzma_dll.vcxproj | 24 ++++++++++++------------
+ windows/vs2017/liblzma.vcxproj | 12 ++++++------
+ windows/vs2017/liblzma_dll.vcxproj | 24 ++++++++++++------------
+ 4 files changed, 36 insertions(+), 36 deletions(-)
+
+commit cea5cf8d26c9d1dc30a808614d79c0b25640e15e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-09-16 12:56:20 +0300
+
+ Windows: Update VS2017 project files to include file info decoder.
+
+ windows/vs2017/liblzma.vcxproj | 2 ++
+ windows/vs2017/liblzma_dll.vcxproj | 2 ++
+ 2 files changed, 4 insertions(+)
+
+commit 95d563db3ee497b223e522b699c4d4c29943eef0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-09-16 12:54:23 +0300
+
+ Windows: Add project files for VS2017.
+
+ These files match the v5.2 branch (no file info decoder).
+
+ windows/vs2017/config.h | 148 ++++++++++++++
+ windows/vs2017/liblzma.vcxproj | 355 ++++++++++++++++++++++++++++++++++
+ windows/vs2017/liblzma_dll.vcxproj | 384 +++++++++++++++++++++++++++++++++++++
+ windows/vs2017/xz_win.sln | 48 +++++
+ 4 files changed, 935 insertions(+)
+
+commit ab72416d62ea8f50ad31d5b8545fcb6a2bf96b73
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-09-16 12:45:50 +0300
+
+ Windows: Update VS2013 project files to include file info decoder.
+
+ windows/vs2013/liblzma.vcxproj | 2 ++
+ windows/vs2013/liblzma_dll.vcxproj | 2 ++
+ 2 files changed, 4 insertions(+)
+
+commit 82388980187b0e3794d187762054200bbdcc9a53
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-09-16 12:39:43 +0300
+
+ Windows: Move VS2013 files into windows/vs2013 directory.
+
+ windows/{ => vs2013}/config.h | 0
+ windows/{ => vs2013}/liblzma.vcxproj | 278 +++++++++++++++---------------
+ windows/{ => vs2013}/liblzma_dll.vcxproj | 280 +++++++++++++++----------------
+ windows/{ => vs2013}/xz_win.sln | 0
+ 4 files changed, 279 insertions(+), 279 deletions(-)
+
+commit 94e3f986aa4e14b4ff01ac24857f499630d6d180
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-08-14 20:08:33 +0300
+
+ Fix or hide warnings from GCC 7's -Wimplicit-fallthrough.
+
+ src/liblzma/lzma/lzma_decoder.c | 6 ++++++
+ src/xz/list.c | 2 ++
+ 2 files changed, 8 insertions(+)
+
+commit 0b0e1e6803456aac641a59332200f8e95e2b7ea8
+Author: Alexey Tourbin <alexey.tourbin@gmail.com>
+Date: 2017-05-16 23:56:35 +0300
+
+ Docs: Fix a typo in a comment in doc/examples/02_decompress.c.
+
+ doc/examples/02_decompress.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit a015cd1f90116e655be4eaf4aad42c4c911c2807
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-05-23 18:34:43 +0300
+
+ xz: Fix "xz --list --robot missing_or_bad_file.xz".
+
+ It ended up printing an uninitialized char-array when trying to
+ print the check names (column 7) on the "totals" line.
+
+ This also changes the column 12 (minimum xz version) to
+ 50000002 (xz 5.0.0) instead of 0 when there are no valid
+ input files.
+
+ Thanks to kidmin for the bug report.
+
+ src/xz/list.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+commit c2e29f06a7d1e3ba242ac2fafc69f5d6e92f62cd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-24 20:20:11 +0300
+
+ Docs: Add doc/examples/11_file_info.c.
+
+ doc/examples/11_file_info.c | 206 ++++++++++++++++++++++++++++++++++++++++++++
+ doc/examples/Makefile | 3 +-
+ 2 files changed, 208 insertions(+), 1 deletion(-)
+
+commit 1520f6ec808896375ac7bf778c449e0f7dea5f46
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-24 19:48:47 +0300
+
+ Build: Omit pre-5.0.0 entries from the generated ChangeLog.
+
+ It makes ChangeLog significantly smaller.
+
+ Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 8269782283806c90a8509c2ac2a308344f70e171
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-24 19:48:23 +0300
+
+ xz: Use lzma_file_info_decoder() for --list.
+
+ src/xz/list.c | 254 ++++++++++------------------------------------------------
+ 1 file changed, 44 insertions(+), 210 deletions(-)
+
+commit e353d0b1cc0d3997ae5048faa8e6786414953e06
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-24 19:35:50 +0300
+
+ liblzma: Add lzma_file_info_decoder().
+
+ src/liblzma/api/lzma/index.h | 66 ++++
+ src/liblzma/common/Makefile.inc | 1 +
+ src/liblzma/common/file_info.c | 855 ++++++++++++++++++++++++++++++++++++++++
+ src/liblzma/liblzma.map | 7 +-
+ 4 files changed, 928 insertions(+), 1 deletion(-)
+
+commit 144ef9e19e9496c995b21505dd1e111c442968d1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-24 19:30:22 +0300
+
+ Update the Git repository URL to HTTPS in ChangeLog.
+
+ ChangeLog | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 8c9842c265993d7dd4039f732d3546267fb5ecc4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-21 15:05:16 +0300
+
+ liblzma: Rename LZMA_SEEK to LZMA_SEEK_NEEDED and seek_in to seek_pos.
+
+ src/liblzma/api/lzma/base.h | 18 +++++++++---------
+ src/liblzma/common/common.c | 2 +-
+ src/xz/message.c | 2 +-
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+commit 662b27c417cab248cb365dd7682121bdec4d5ae7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-19 22:17:35 +0300
+
+ Update the home page URLs to HTTPS.
+
+ COPYING | 2 +-
+ README | 2 +-
+ configure.ac | 2 +-
+ doc/faq.txt | 4 ++--
+ dos/config.h | 2 +-
+ src/common/common_w32res.rc | 2 +-
+ src/xz/xz.1 | 6 +++---
+ src/xzdec/xzdec.1 | 4 ++--
+ windows/README-Windows.txt | 2 +-
+ windows/config.h | 2 +-
+ 10 files changed, 14 insertions(+), 14 deletions(-)
+
+commit c28f0b3d00af87b92dda229831548d8eb0067d1d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-04-05 18:47:22 +0300
+
+ xz: Add io_seek_src().
+
+ src/xz/file_io.c | 20 +++++++++++++++++---
+ src/xz/file_io.h | 13 +++++++++++++
+ 2 files changed, 30 insertions(+), 3 deletions(-)
+
+commit bba477257d7319c8764890f3669175b866d24944
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-03-30 22:01:54 +0300
+
+ xz: Use POSIX_FADV_RANDOM for in "xz --list" mode.
+
+ xz --list is random access so POSIX_FADV_SEQUENTIAL was clearly
+ wrong.
+
+ src/xz/file_io.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+commit 310d19816d1652b0c8bb1b82574d46345d924752
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-03-30 20:03:05 +0300
+
+ liblzma: Make lzma_index_decoder_init() visible to other liblzma funcs.
+
+ This is to allow other functions to use it without going
+ via the public API (lzma_index_decoder()).
+
+ src/liblzma/common/Makefile.inc | 1 +
+ src/liblzma/common/index_decoder.c | 10 +++++-----
+ src/liblzma/common/index_decoder.h | 24 ++++++++++++++++++++++++
+ 3 files changed, 30 insertions(+), 5 deletions(-)
+
+commit a27920002dbc469f778a134fc665b7c3ea73701b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-03-30 20:00:09 +0300
+
+ liblzma: Add generic support for input seeking (LZMA_SEEK).
+
+ Also mention LZMA_SEEK in xz/message.c to silence a warning.
+
+ src/liblzma/api/lzma/base.h | 31 ++++++++++++++++++++++++++++++-
+ src/liblzma/common/common.c | 12 +++++++++++-
+ src/xz/message.c | 1 +
+ 3 files changed, 42 insertions(+), 2 deletions(-)
+
+commit a0b1dda409bc3e6e2957a2651663fc411d2caf2d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-03-30 19:47:45 +0300
+
+ liblzma: Fix lzma_memlimit_set(strm, 0).
+
+ The 0 got treated specially in a buggy way and as a result
+ the function did nothing. The API doc said that 0 was supposed
+ to return LZMA_PROG_ERROR but it didn't.
+
+ Now 0 is treated as if 1 had been specified. This is done because
+ 0 is already used to indicate an error from lzma_memlimit_get()
+ and lzma_memusage().
+
+ In addition, lzma_memlimit_set() no longer checks that the new
+ limit is at least LZMA_MEMUSAGE_BASE. It's counter-productive
+ for the Index decoder and was actually needed only by the
+ auto decoder. Auto decoder has now been modified to check for
+ LZMA_MEMUSAGE_BASE.
+
+ src/liblzma/api/lzma/base.h | 7 ++++++-
+ src/liblzma/common/auto_decoder.c | 3 +++
+ src/liblzma/common/common.c | 6 ++++--
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+commit 84462afaada61379f5878e46f8f00e25a1cdcf29
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-03-30 19:16:55 +0300
+
+ liblzma: Similar memlimit fix for stream_, alone_, and auto_decoder.
+
+ src/liblzma/api/lzma/container.h | 21 +++++++++++++++++----
+ src/liblzma/common/alone_decoder.c | 5 +----
+ src/liblzma/common/auto_decoder.c | 5 +----
+ src/liblzma/common/stream_decoder.c | 5 +----
+ 4 files changed, 20 insertions(+), 16 deletions(-)
+
+commit cbc74017939690d13441b8926bb743fb03211b83
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2017-03-30 18:58:18 +0300
+
+ liblzma: Fix handling of memlimit == 0 in lzma_index_decoder().
+
+ It returned LZMA_PROG_ERROR, which was done to avoid zero as
+ the limit (because it's a special value elsewhere), but using
+ LZMA_PROG_ERROR is simply inconvenient and can cause bugs.
+
+ The fix/workaround is to treat 0 as if it were 1 byte. It's
+ effectively the same thing. The only weird consequence is
+ that then lzma_memlimit_get() will return 1 even when 0 was
+ specified as the limit.
+
+ This fixes a very rare corner case in xz --list where a specific
+ memory usage limit and a multi-stream file could print the
+ error message "Internal error (bug)" instead of saying that
+ the memory usage limit is too low.
+
+ src/liblzma/api/lzma/index.h | 18 +++++++++++-------
+ src/liblzma/common/index_decoder.c | 4 ++--
+ 2 files changed, 13 insertions(+), 9 deletions(-)
+
+commit 78ae13bced912b1b92ae927992c99cbcc463cae7
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-12-30 13:25:10 +0200
+
+ Update NEWS for 5.2.3.
+
+ NEWS | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+commit 0297863fdb453aed1a25eb025f3ba7bacbbb1357
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-12-26 20:55:52 +0200
+
+ Document --enable-sandbox configure option in INSTALL.
+
+ INSTALL | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+commit d4a0462abe5478193521c14625e1c81fead87f9f
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-11-21 20:24:50 +0200
+
+ liblzma: Avoid multiple definitions of lzma_coder structures.
+
+ Only one definition was visible in a translation unit.
+ It avoided a few casts and temp variables but seems that
+ this hack doesn't work with link-time optimizations in compilers
+ as it's not C99/C11 compliant.
+
+ Fixes:
+ http://www.mail-archive.com/xz-devel@tukaani.org/msg00279.html
+
+ src/liblzma/common/alone_decoder.c | 44 +++++----
+ src/liblzma/common/alone_encoder.c | 34 ++++---
+ src/liblzma/common/auto_decoder.c | 35 ++++---
+ src/liblzma/common/block_decoder.c | 41 ++++----
+ src/liblzma/common/block_encoder.c | 40 ++++----
+ src/liblzma/common/common.h | 18 ++--
+ src/liblzma/common/index_decoder.c | 33 ++++---
+ src/liblzma/common/index_encoder.c | 16 ++--
+ src/liblzma/common/stream_decoder.c | 50 +++++-----
+ src/liblzma/common/stream_encoder.c | 56 ++++++-----
+ src/liblzma/common/stream_encoder_mt.c | 124 ++++++++++++++-----------
+ src/liblzma/delta/delta_common.c | 25 ++---
+ src/liblzma/delta/delta_decoder.c | 6 +-
+ src/liblzma/delta/delta_encoder.c | 12 ++-
+ src/liblzma/delta/delta_private.h | 4 +-
+ src/liblzma/lz/lz_decoder.c | 60 ++++++------
+ src/liblzma/lz/lz_decoder.h | 13 ++-
+ src/liblzma/lz/lz_encoder.c | 57 +++++++-----
+ src/liblzma/lz/lz_encoder.h | 9 +-
+ src/liblzma/lzma/lzma2_decoder.c | 32 ++++---
+ src/liblzma/lzma/lzma2_encoder.c | 51 +++++-----
+ src/liblzma/lzma/lzma_decoder.c | 27 +++---
+ src/liblzma/lzma/lzma_encoder.c | 29 +++---
+ src/liblzma/lzma/lzma_encoder.h | 9 +-
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c | 3 +-
+ src/liblzma/lzma/lzma_encoder_optimum_normal.c | 23 ++---
+ src/liblzma/lzma/lzma_encoder_private.h | 6 +-
+ src/liblzma/simple/arm.c | 2 +-
+ src/liblzma/simple/armthumb.c | 2 +-
+ src/liblzma/simple/ia64.c | 2 +-
+ src/liblzma/simple/powerpc.c | 2 +-
+ src/liblzma/simple/simple_coder.c | 61 ++++++------
+ src/liblzma/simple/simple_private.h | 12 +--
+ src/liblzma/simple/sparc.c | 2 +-
+ src/liblzma/simple/x86.c | 15 +--
+ 35 files changed, 532 insertions(+), 423 deletions(-)
+
+commit a01794c52add98263b49119842c3e7141d1b9ced
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-10-24 18:53:25 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit df8f446e3ad47e5148b8c8d8b6e519d3ce29cb9d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-10-24 18:51:36 +0300
+
+ tuklib_cpucores: Add support for sched_getaffinity().
+
+ It's available in glibc (GNU/Linux, GNU/kFreeBSD). It's better
+ than sysconf(_SC_NPROCESSORS_ONLN) because sched_getaffinity()
+ gives the number of cores available to the process instead of
+ the total number of cores online.
+
+ As a side effect, this commit fixes a bug on GNU/kFreeBSD where
+ configure would detect the FreeBSD-specific cpuset_getaffinity()
+ but it wouldn't actually work because on GNU/kFreeBSD it requires
+ using -lfreebsd-glue when linking. Now the glibc-specific function
+ will be used instead.
+
+ Thanks to Sebastian Andrzej Siewior for the original patch
+ and testing.
+
+ m4/tuklib_cpucores.m4 | 30 +++++++++++++++++++++++++++++-
+ src/common/tuklib_cpucores.c | 9 +++++++++
+ 2 files changed, 38 insertions(+), 1 deletion(-)
+
+commit 446e4318fa79788e09299d5953b5dd428953d14b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-06-30 20:27:36 +0300
+
+ xz: Fix copying of timestamps on Windows.
+
+ xz used to call utime() on Windows, but its result gets lost
+ on close(). Using _futime() seems to work.
+
+ Thanks to Martok for reporting the bug:
+ http://www.mail-archive.com/xz-devel@tukaani.org/msg00261.html
+
+ configure.ac | 2 +-
+ src/xz/file_io.c | 18 ++++++++++++++++++
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+commit 1b0ac0c53c761263e91e34195cb21dfdcfeac0bd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-06-16 22:46:02 +0300
+
+ xz: Silence warnings from -Wlogical-op.
+
+ Thanks to Evan Nemerson.
+
+ src/xz/file_io.c | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+commit c83b7a03342c3325ff10400b22ee21edfcd1e026
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-04-10 20:55:49 +0300
+
+ Build: Fix = to += for xz_SOURCES in src/xz/Makefile.am.
+
+ Thanks to Christian Kujau.
+
+ src/xz/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ade31a2bfb95c94d05fbfc0ecbba5d6377f2506e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-04-10 20:54:17 +0300
+
+ Build: Bump GNU Gettext version requirement to 0.19.
+
+ It silences a few warnings and most people probably have
+ 0.19 even on stable distributions.
+
+ Thanks to Christian Kujau.
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ac398c3bafa6e4c80e20571373a96947db863b3d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-03-13 20:21:49 +0200
+
+ liblzma: Disable external SHA-256 by default.
+
+ This is the sane thing to do. The conflict with OpenSSL
+ on some OSes and especially that the OS-provided versions
+ can be significantly slower makes it clear that it was
+ a mistake to have the external SHA-256 support enabled by
+ default.
+
+ Those who want it can now pass --enable-external-sha256 to
+ configure. INSTALL was updated with notes about OSes where
+ this can be a bad idea.
+
+ The SHA-256 detection code in configure.ac had some bugs that
+ could lead to a build failure in some situations. These were
+ fixed, although it doesn't matter that much now that the
+ external SHA-256 is disabled by default.
+
+ MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init
+ in libc instead of libutil. Support for the libutil version
+ was removed.
+
+ INSTALL | 36 ++++++++++++++++++++++
+ configure.ac | 76 +++++++++++++++++++++++------------------------
+ src/liblzma/check/check.h | 16 ++++------
+ 3 files changed, 79 insertions(+), 49 deletions(-)
+
+commit 6fd5ecb589a9fdd7a576ea48c4850d496bab9ce5
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-03-10 20:27:05 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 473ef0dc69a30e64d5fa0d34aca02f7309faa3e9
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2016-03-10 20:26:49 +0200
+
+ Build: Avoid SHA256_Init on FreeBSD and MINIX 3.
+
+ On FreeBSD 10 and older, SHA256_Init from libmd conflicts
+ with libcrypto from OpenSSL. The OpenSSL version has
+ different sizeof(SHA256_CTX) and it can cause weird
+ problems if wrong SHA256_Init gets used.
+
+ Looking at the source, MINIX 3 seems to have a similar issue but
+ I'm not sure. To be safe, I disabled SHA256_Init on MINIX 3 too.
+
+ NetBSD has SHA256_Init in libc and they had a similar problem,
+ but they already fixed it in 2009.
+
+ Thanks to Jim Wilcoxson for the bug report that helped
+ in finding the problem.
+
+ configure.ac | 27 +++++++++++++++++++++------
+ 1 file changed, 21 insertions(+), 6 deletions(-)
+
+commit faf302137e54d605b44ecf0373cb51a6403a2de1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-08 20:16:10 +0200
+
+ tuklib_physmem: Hopefully silence a warning on Windows.
+
+ src/common/tuklib_physmem.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit e52e9151cf8613022d1de4712ff39dbcb666e991
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-04 23:17:43 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 14115f84a38161d55eaa2d070f08739bde37e966
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-04 23:14:00 +0200
+
+ liblzma: Make Valgrind happier with optimized (gcc -O2) liblzma.
+
+ When optimizing, GCC can reorder code so that an uninitialized
+ value gets used in a comparison, which makes Valgrind unhappy.
+ It doesn't happen when compiled with -O0, which I tend to use
+ when running Valgrind.
+
+ Thanks to Rich Prohaska. I remember this being mentioned long
+ ago by someone else but nothing was done back then.
+
+ src/liblzma/lz/lz_encoder.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit f4c95ba94beb71a608eb6eadbf82b44f53a0260e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 20:55:45 +0200
+
+ liblzma: Rename lzma_presets.c back to lzma_encoder_presets.c.
+
+ It would be too annoying to update other build systems
+ just because of this.
+
+ src/liblzma/lzma/Makefile.inc | 2 +-
+ src/liblzma/lzma/{lzma_presets.c => lzma_encoder_presets.c} | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit c7bc20a6f3e71920871d48db31a79ab58b5a0a4b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 20:47:07 +0200
+
+ Build: Disable xzdec, lzmadec, and lzmainfo when they cannot be built.
+
+ They all need decoder support and if that isn't available,
+ there's no point trying to build them.
+
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 5cbca1205deeb6fb7afe7a864fa68a57466d928a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 20:35:19 +0200
+
+ Build: Simplify $enable_{encoders,decoders} usage a bit.
+
+ configure.ac | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit af13781886c8e7a0aabebb5141ea282dc364f5c6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 20:31:31 +0200
+
+ Windows/MSVC: Update config.h.
+
+ windows/config.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit 9fa5949330f162c5a2f6653f83025327837e8f39
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 20:29:58 +0200
+
+ DOS: Update config.h.
+
+ dos/config.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit cb3111e3ed84152912b5138d690c8d9f00c6ef02
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 20:29:33 +0200
+
+ xz: Make xz buildable even when encoders or decoders are disabled.
+
+ The patch is quite long but it's mostly about adding new #ifdefs
+ to omit code when encoders or decoders have been disabled.
+
+ This adds two new #defines to config.h: HAVE_ENCODERS and
+ HAVE_DECODERS.
+
+ configure.ac | 4 ++++
+ src/xz/Makefile.am | 8 ++++++--
+ src/xz/args.c | 16 ++++++++++++++++
+ src/xz/coder.c | 33 +++++++++++++++++++++++++--------
+ src/xz/main.c | 9 +++++++--
+ src/xz/private.h | 5 ++++-
+ 6 files changed, 62 insertions(+), 13 deletions(-)
+
+commit 4cc584985c0b7a13901da1b7a64ef9f7cc36e8ab
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 18:06:40 +0200
+
+ Build: Build LZMA1/2 presets also when only decoder is wanted.
+
+ People shouldn't rely on the presets when decoding raw streams,
+ but xz uses the presets as the starting point for raw decoder
+ options anyway.
+
+ lzma_encocder_presets.c was renamed to lzma_presets.c to
+ make it clear it's not used solely by the encoder code.
+
+ src/liblzma/lzma/Makefile.inc | 6 +++++-
+ src/liblzma/lzma/{lzma_encoder_presets.c => lzma_presets.c} | 3 ++-
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+commit 23ed1d41489f632155bbc9660f323d57e09da180
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 17:54:48 +0200
+
+ Build: Fix configure to handle LZMA1 dependency with LZMA2.
+
+ Now it gives an error if LZMA1 encoder/decoder is missing
+ when LZMA2 encoder/decoder was requested. Even better would
+ be LZMA2 implicitly enabling LZMA1 but it would need more code.
+
+ configure.ac | 5 -----
+ 1 file changed, 5 deletions(-)
+
+commit b0bc3e03852af13419ea2960881824258d451117
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-03 17:41:54 +0200
+
+ Build: Don't omit lzma_cputhreads() unless using --disable-threads.
+
+ Previously it was omitted if encoders were disabled
+ with --disable-encoders. It didn't make sense and
+ it also broke the build.
+
+ src/liblzma/common/Makefile.inc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit c6bf438ab39e0fb4a47d3c81725c227919502726
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-02 18:16:51 +0200
+
+ liblzma: Fix a build failure related to external SHA-256 support.
+
+ If an appropriate header and structure were found by configure,
+ but a library with a usable SHA-256 functions wasn't, the build
+ failed.
+
+ src/liblzma/check/check.h | 32 +++++++++++++++++++++++---------
+ 1 file changed, 23 insertions(+), 9 deletions(-)
+
+commit e18adc56f2262aa9394d46681e9e4b9981ed5e97
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-11-02 15:19:10 +0200
+
+ xz: Always close the file before trying to delete it.
+
+ unlink() can return EBUSY in errno for open files on some
+ operating systems and file systems.
+
+ src/xz/file_io.c | 25 ++++++++++++-------------
+ 1 file changed, 12 insertions(+), 13 deletions(-)
+
+commit 282e768a1484e88c8b7ec35655ee4959954ec87a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-10-12 21:08:42 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 372e402713a1d4337ffce5f56d5c5c9ed99a66d0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-10-12 21:07:41 +0300
+
+ Tests: Add tests for the two bugs fixed in index.c.
+
+ tests/test_index.c | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+
+commit 21515d79d778b8730a434f151b07202d52a04611
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-10-12 20:45:15 +0300
+
+ liblzma: Fix lzma_index_dup() for empty Streams.
+
+ Stream Flags and Stream Padding weren't copied from
+ empty Streams.
+
+ src/liblzma/common/index.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+commit 09f395b6b360c0b13e8559eece1d179b908ebd3a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-10-12 20:31:44 +0300
+
+ liblzma: Add a note to index.c for those using static analyzers.
+
+ src/liblzma/common/index.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit 3bf857edfef51374f6f3fffae3d817f57d3264a0
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-10-12 20:29:09 +0300
+
+ liblzma: Fix a memory leak in error path of lzma_index_dup().
+
+ lzma_index_dup() calls index_dup_stream() which, in case of
+ an error, calls index_stream_end() to free memory allocated
+ by index_stream_init(). However, it illogically didn't
+ actually free the memory. To make it logical, the tree
+ handling code was modified a bit in addition to changing
+ index_stream_end().
+
+ Thanks to Evan Nemerson for the bug report.
+
+ src/liblzma/common/index.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+commit 7f05803979b4b79642d5be4218a79da7a0b12c47
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-09-29 13:57:28 +0300
+
+ Update NEWS for 5.2.2.
+
+ NEWS | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+commit 397fcc0946315b55c3c6d80e37e82a2a78bc15c1
+Author: Hauke Henningsen <sqrt@entless.org>
+Date: 2015-08-17 04:59:54 +0200
+
+ Update German translation, mostly wrt orthography
+
+ Provide an update of the German translation.
+ * A lot of compound words were previously written with spaces, while
+ German orthography is relatively clear in that the components
+ should not be separated.
+ * When referring to the actual process of (de)compression rather than the
+ concept, replace “(De-)Kompression” with “(De-)Komprimierung”.
+ Previously, both forms were used in this context and are now used in a
+ manner consistent with “Komprimierung” being more likely to refer to
+ a process.
+ * Consistently translate “standard input”/“output”
+ * Use “Zeichen” instead of false friend “Charakter” for “character”
+ * Insert commas around relative clauses (as required in German)
+ * Some other minor corrections
+ * Capitalize “ß” as “ẞ”
+ * Consistently start option descriptions in --help with capital letters
+
+ Acked-By: Andre Noll <maan@tuebingen.mpg.de>
+
+ * Update after msgmerge
+
+ po/de.po | 383 ++++++++++++++++++++++++++++++++-------------------------------
+ 1 file changed, 196 insertions(+), 187 deletions(-)
+
+commit cbc9e39bae715accb44168930a71888480aad569
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-11 13:23:04 +0300
+
+ Build: Minor Cygwin cleanup.
+
+ Some tests used "cygwin*" and some used "cygwin". I changed
+ them all to use "cygwin". Shouldn't affect anything in practice.
+
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit bcacd8ce7a031566858e5e03c1009064c3f1c89e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-11 13:21:52 +0300
+
+ Build: Support building of MSYS2 binaries.
+
+ configure.ac | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+commit 0275a5398c01d57b724dec7fea52dec3bd6edc6c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-09 21:06:26 +0300
+
+ Windows: Define DLL_EXPORT when building liblzma.dll with MSVC.
+
+ src/liblzma/common/common.h uses it to set __declspec(dllexport)
+ for the API symbols.
+
+ Thanks to Adam Walling.
+
+ windows/liblzma_dll.vcxproj | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit a74525cf9b945fb0b370e64cf406104beb31729b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-08-09 21:02:20 +0300
+
+ Windows: Omit unneeded header files from MSVC project files.
+
+ windows/liblzma.vcxproj | 5 -----
+ windows/liblzma_dll.vcxproj | 5 -----
+ 2 files changed, 10 deletions(-)
+
+commit fbbb295a91caf39faf8838c8c39526e4cb4dc121
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-07-12 20:48:19 +0300
+
+ liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer.
+
+ src/liblzma/api/lzma.h | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
+
+commit 713dbe5c230fe00865a54f5c32358ea30f9a1156
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-06-19 20:38:55 +0300
+
+ Update THANKS.
+
+ THANKS | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit 3a5d755d055d51f99c523b4c2952727e1e69cfa1
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-06-19 20:21:30 +0300
+
+ Windows: Update the docs.
+
+ INSTALL | 29 ++++++++-----
+ windows/INSTALL-MSVC.txt | 47 ++++++++++++++++++++++
+ windows/{INSTALL-Windows.txt => INSTALL-MinGW.txt} | 2 +-
+ 3 files changed, 67 insertions(+), 11 deletions(-)
+
+commit b0798c6aa6184efcefd0bdcca20f96121a13feda
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-06-19 17:25:31 +0300
+
+ Windows: Add MSVC project files for building liblzma.
+
+ Thanks to Adam Walling for creating these files.
+
+ windows/liblzma.vcxproj | 359 ++++++++++++++++++++++++++++++++++++++++
+ windows/liblzma_dll.vcxproj | 388 ++++++++++++++++++++++++++++++++++++++++++++
+ windows/xz_win.sln | 48 ++++++
+ 3 files changed, 795 insertions(+)
+
+commit 9b02a4ffdac1b9f066658ec4c95c0834f4cd2fb7
+Author: Andre Noll <maan@tuebingen.mpg.de>
+Date: 2015-05-28 15:50:00 +0200
+
+ Fix typo in German translation.
+
+ As pointed out by Robert Pollak, there's a typo in the German
+ translation of the compression preset option (-0 ... -9) help text.
+ "The compressor" translates to "der Komprimierer", and the genitive
+ form is "des Komprimierers". The old word makes no sense at all.
+
+ po/de.po | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit c7f4041f6b8f4729f88d3bc888b2a4080ae51f72
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-05-13 20:57:55 +0300
+
+ Tests: Fix a memory leak in test_bcj_exact_size.
+
+ Thanks to Cristian Rodríguez.
+
+ tests/test_bcj_exact_size.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 17b29d4f0ae0f780fbd69e15a398dc478d8492f8
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-05-12 18:08:24 +0300
+
+ Fix NEWS about threading in 5.2.0.
+
+ Thanks to Andy Hochhaus.
+
+ NEWS | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit 49c26920d6e2d85e5c6123e34958aed2e77485ad
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-05-11 21:26:16 +0300
+
+ xz: Document that threaded decompression hasn't been implemented yet.
+
+ src/xz/xz.1 | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+commit 5b2458cb244ed237efe4de1ebcf06e1b3a1f4256
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-04-20 20:20:29 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6bd0349c58451b13442e8f463e35de83548bf985
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-04-20 19:59:18 +0300
+
+ Revert "xz: Use pipe2() if available."
+
+ This reverts commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd.
+ It is a problem when libc has pipe2() but the kernel is too
+ old to have pipe2() and thus pipe2() fails. In xz it's pointless
+ to have a fallback for non-functioning pipe2(); it's better to
+ avoid pipe2() completely.
+
+ Thanks to Michael Fox for the bug report.
+
+ configure.ac | 4 ++--
+ src/xz/file_io.c | 9 +--------
+ 2 files changed, 3 insertions(+), 10 deletions(-)
+
+commit fc0df0f8db87dff45543708a711e17d29c37f632
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-04-01 14:45:25 +0300
+
+ xz: Fix the Capsicum rights on user_abort_pipe.
+
+ src/xz/file_io.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 57393615b31b3788dd77280452d845bcc12d33af
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-31 22:20:11 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 1238381143a9a7ce84839c2582ccd56ff750a440
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-31 22:19:34 +0300
+
+ xz: Add support for sandboxing with Capsicum.
+
+ The sandboxing is used conditionally as described in main.c.
+ This isn't optimal but it was much easier to implement than
+ a full sandboxing solution and it still covers the most common
+ use cases where xz is writing to standard output. This should
+ have practically no effect on performance even with small files
+ as fork() isn't needed.
+
+ C and locale libraries can open files as needed. This has been
+ fine in the past, but it's a problem with things like Capsicum.
+ io_sandbox_enter() tries to ensure that various locale-related
+ files have been loaded before cap_enter() is called, but it's
+ possible that there are other similar problems which haven't
+ been seen yet.
+
+ Currently Capsicum is available on FreeBSD 10 and later
+ and there is a port to Linux too.
+
+ Thanks to Loganaden Velvindron for help.
+
+ configure.ac | 41 +++++++++++++++++++++++++++
+ src/xz/Makefile.am | 2 +-
+ src/xz/file_io.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/xz/file_io.h | 6 ++++
+ src/xz/main.c | 18 ++++++++++++
+ src/xz/private.h | 4 +++
+ 6 files changed, 151 insertions(+), 1 deletion(-)
+
+commit 29a087fb5a0c879f0b1bc4c6b989f7b87bacdf9e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-31 21:12:30 +0300
+
+ Fix bugs and otherwise improve ax_check_capsicum.m4.
+
+ AU_ALIAS was removed because the new version is incompatible
+ with the old version.
+
+ It no longer checks for <sys/capability.h> separately.
+ It's enough to test for it as part of AC_CHECK_DECL.
+ The defines HAVE_CAPSICUM_SYS_CAPSICUM_H and
+ HAVE_CAPSICUM_SYS_CAPABILITY_H were removed as unneeded.
+ HAVE_SYS_CAPSICUM_H from AC_CHECK_HEADERS is enough.
+
+ It no longer does a useless search for the Capsicum library
+ if the header wasn't found.
+
+ Fixed a bug in ACTION-IF-FOUND (the first argument). Specifying
+ the argument omitted the default action but the given action
+ wasn't used instead.
+
+ AC_DEFINE([HAVE_CAPSICUM]) is now always called when Capsicum
+ support is found. Previously it was part of the default
+ ACTION-IF-FOUND which a custom action would override. Now
+ the default action only prepends ${CAPSICUM_LIB} to LIBS.
+
+ The documentation was updated.
+
+ Since there as no serial number, "#serial 2" was added.
+
+ m4/ax_check_capsicum.m4 | 103 ++++++++++++++++++++++++------------------------
+ 1 file changed, 51 insertions(+), 52 deletions(-)
+
+commit 6e845c6a3eddf2fde9db5a29950421dff60a43ac
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-31 19:20:24 +0300
+
+ Add m4/ax_check_capsicum.m4 for detecting Capsicum support.
+
+ The file was loaded from this web page:
+ https://github.com/google/capsicum-test/blob/dev/autoconf/m4/ax_check_capsicum.m4
+
+ Thanks to Loganaden Velvindron for pointing it out for me.
+
+ m4/ax_check_capsicum.m4 | 86 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 86 insertions(+)
+
+commit 3717885f9ef2c06f1bcbad9f4c2ed2d5695f844e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-30 22:44:02 +0300
+
+ Bump version to 5.3.0alpha and soname to 5.3.99.
+
+ The idea of 99 is that it looks a bit weird in this context.
+ For new features there's no API/ABI stability in devel versions.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+commit eccd8155e107c5ada03d13e7730675cdf1a44ddc
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-29 22:14:47 +0300
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 25263fd9e7a8a913395cb93d7c104cd48c2b4a00
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-29 22:13:48 +0300
+
+ Fix the detection of installed RAM on QNX.
+
+ The earlier version compiled but didn't actually work
+ since sysconf(_SC_PHYS_PAGES) always fails (or so I was told).
+
+ Thanks to Ole André Vadla Ravnås for the patch and testing.
+
+ m4/tuklib_physmem.m4 | 6 +++---
+ src/common/tuklib_physmem.c | 14 +++++++++++++-
+ 2 files changed, 16 insertions(+), 4 deletions(-)
+
+commit 4c544d2410903d38402221cb783ed85585b6a007
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-27 22:39:07 +0200
+
+ Fix CPU core count detection on QNX.
+
+ It tried to use sysctl() on QNX but
+ - it broke the build because sysctl() needs -lsocket on QNX;
+ - sysctl() doesn't work for detecting the core count on QNX
+ even if it compiled.
+
+ sysconf() works. An alternative would have been to use
+ QNX-specific SYSPAGE_ENTRY(num_cpu) from <sys/syspage.h>.
+
+ Thanks to Ole André Vadla Ravnås.
+
+ m4/tuklib_cpucores.m4 | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+commit e0ea6737b03e83ccaff4514d00e31bb926f8f0f3
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 22:05:57 +0200
+
+ xz: size_t/uint32_t cleanup in options.c.
+
+ src/xz/options.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+commit 8bcca29a65335fd679c13814b70b35b68fa5daed
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 22:04:23 +0200
+
+ xz: Fix a comment and silence a warning in message.c.
+
+ src/xz/message.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+commit f243f5f44c6b19a7c289a0ec73a03ee08364cb5b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 22:01:00 +0200
+
+ liblzma: Silence more uint32_t vs. size_t warnings.
+
+ src/liblzma/lz/lz_encoder.c | 2 +-
+ src/liblzma/lzma/lzma_encoder.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 7f0a4c50f4a374c40acf4b86848f301ad1e82d34
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 19:54:00 +0200
+
+ xz: Make arg_count an unsigned int to silence a warning.
+
+ Actually the value of arg_count cannot exceed INT_MAX
+ but it's nicer as an unsigned int.
+
+ src/xz/args.h | 2 +-
+ src/xz/main.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit f6ec46801588b1be29c07c9db98558b521304002
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-03-07 19:33:17 +0200
+
+ liblzma: Fix a warning in index.c.
+
+ src/liblzma/common/index.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+commit a24518971cc621315af142dd3bb7614fab04ad27
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-26 20:46:14 +0200
+
+ Build: Fix a CR+LF problem when running autoreconf -fi on OS/2.
+
+ build-aux/version.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit dec11497a71518423b5ff0e759100cf8aadf6c7b
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-26 16:53:44 +0200
+
+ Bump version and soname for 5.2.1.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit 29e39c79975ab89ee5dd671e97064534a9f3a649
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-26 13:01:09 +0200
+
+ Update NEWS for 5.2.1.
+
+ NEWS | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+commit 7a11c4a8e5e15f13d5fa59233b3172e65428efdd
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-22 19:38:48 +0200
+
+ xz: Use pipe2() if available.
+
+ configure.ac | 4 ++--
+ src/xz/file_io.c | 9 ++++++++-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+commit 117d962685c72682c63edc9bb765367189800202
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-21 23:40:26 +0200
+
+ liblzma: Fix a compression-ratio regression in LZMA1/2 in fast mode.
+
+ The bug was added in the commit
+ f48fce093b07aeda95c18850f5e086d9f2383380 and thus
+ affected 5.1.4beta and 5.2.0. Luckily the bug cannot
+ cause data corruption or other nasty things.
+
+ src/liblzma/lzma/lzma_encoder_optimum_fast.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit ae984e31c167d3bc52972ec422dd1ebd5f5d5719
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-21 23:00:19 +0200
+
+ xz: Fix the fcntl() usage when creating a pipe for the self-pipe trick.
+
+ Now it reads the old flags instead of blindly setting O_NONBLOCK.
+ The old code may have worked correctly, but this is better.
+
+ src/xz/file_io.c | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+commit 2205bb5853098aea36a56df6f5747037175f66b4
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-10 15:29:34 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit d935b0cdf3db440269b9d952b2b281b18f8c7b08
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-10 15:28:30 +0200
+
+ tuklib_cpucores: Use cpuset_getaffinity() on FreeBSD if available.
+
+ In FreeBSD, cpuset_getaffinity() is the preferred way to get
+ the number of available cores.
+
+ Thanks to Rui Paulo for the patch. I edited it slightly, but
+ hopefully I didn't break anything.
+
+ m4/tuklib_cpucores.m4 | 23 ++++++++++++++++++++++-
+ src/common/tuklib_cpucores.c | 18 ++++++++++++++++++
+ 2 files changed, 40 insertions(+), 1 deletion(-)
+
+commit eb61bc58c20769cac4d05f363b9c0e8c9c71a560
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-09 22:08:37 +0200
+
+ xzdiff: Make the mktemp usage compatible with FreeBSD's mktemp.
+
+ Thanks to Rui Paulo for the fix.
+
+ src/scripts/xzdiff.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+commit b9a5b6b7a29029680af733082b6a46e0fc01623a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-02-03 21:45:53 +0200
+
+ Add a few casts to tuklib_integer.h to silence possible warnings.
+
+ I heard that Visual Studio 2013 gave warnings without the casts.
+
+ Thanks to Gabi Davar.
+
+ src/common/tuklib_integer.h | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+commit c45757135f40e4a0de730ba5fff0100219493982
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-26 21:24:39 +0200
+
+ liblzma: Set LZMA_MEMCMPLEN_EXTRA depending on the compare method.
+
+ src/liblzma/common/memcmplen.h | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+commit 3c500174ed5485f550972a2a6109c361e875f069
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-26 20:40:16 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit fec88d41e672d9e197c9442aecf02bd0dfa6d516
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-26 20:39:28 +0200
+
+ liblzma: Silence harmless Valgrind errors.
+
+ Thanks to Torsten Rupp for reporting this. I had
+ forgotten to run Valgrind before the 5.2.0 release.
+
+ src/liblzma/lz/lz_encoder.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+commit a9b45badfec0928d20a27c7176c005fa637f7d1e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-09 21:50:19 +0200
+
+ xz: Fix comments.
+
+ src/xz/file_io.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+commit 541aee6dd4aa97a809aba281475a21b641bb89e2
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-09 21:35:06 +0200
+
+ Update THANKS.
+
+ THANKS | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4170edc914655310d2363baccf5e615e09b04911
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-09 21:34:06 +0200
+
+ xz: Don't fail if stdout doesn't support O_NONBLOCK.
+
+ This is similar to the case with stdin.
+
+ Thanks to Brad Smith for the bug report and testing
+ on OpenBSD.
+
+ src/xz/file_io.c | 36 +++++++++++++++---------------------
+ 1 file changed, 15 insertions(+), 21 deletions(-)
+
+commit 04bbc0c2843c50c8ad1cba42b937118e38b0508d
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-07 19:18:20 +0200
+
+ xz: Fix a memory leak in DOS-specific code.
+
+ src/xz/file_io.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+commit f0f1f6c7235ffa901cf76fe18e33749e200b3eea
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-07 19:08:06 +0200
+
+ xz: Don't fail if stdin doesn't support O_NONBLOCK.
+
+ It's a problem at least on OpenBSD which doesn't support
+ O_NONBLOCK on e.g. /dev/null. I'm not surprised if it's
+ a problem on other OSes too since this behavior is allowed
+ in POSIX-1.2008.
+
+ The code relying on this behavior was committed in June 2013
+ and included in 5.1.3alpha released on 2013-10-26. Clearly
+ the development releases only get limited testing.
+
+ src/xz/file_io.c | 18 +++++++-----------
+ 1 file changed, 7 insertions(+), 11 deletions(-)
+
+commit d2d484647d9d9d679f03c75abb0404f67069271c
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2015-01-06 20:30:15 +0200
+
+ Tests: Don't hide unexpected error messages in test_files.sh.
+
+ Hiding them makes no sense since normally there's no error
+ when testing the "good" files. With "bad" files errors are
+ expected and then it makes sense to keep the messages hidden.
+
+ tests/test_files.sh | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit aae6a6aeda51cf94a47e39ad624728f9bee75e30
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2014-12-30 11:17:16 +0200
+
+ Update Solaris notes in INSTALL.
+
+ Mention the possible "make check" failure on Solaris in the
+ Solaris-specific section of INSTALL. It was already in
+ section 4.5 but it is better mention it in the OS-specific
+ section too.
+
+ INSTALL | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 7815112153178800a3521b9f31960e7cdc26cfba
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2014-12-26 12:00:05 +0200
+
+ Build: POSIX shell isn't required if scripts are disabled.
+
+ INSTALL | 3 ++-
+ configure.ac | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit a0cd05ee71d330b79ead6eb9222e1b24e1559d3a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2014-12-21 20:48:37 +0200
+
+ DOS: Update Makefile.
+
+ dos/Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b85ee0905ec4ab7656d22e63519fdd3bedb21f2e
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2014-12-21 19:50:38 +0200
+
+ Windows: Fix bin_i486 to bin_i686 in build.bash.
+
+ windows/build.bash | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit cbafa710918195dbba3db02c3fab4f0538235206
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2014-12-21 18:58:44 +0200
+
+ Docs: Use lzma_cputhreads() in 04_compress_easy_mt.c.
+
+ doc/examples/04_compress_easy_mt.c | 30 ++++++++++++++++++++++++++----
+ 1 file changed, 26 insertions(+), 4 deletions(-)
+
+commit 8dbb57238d372c7263cfeb3e7f7fd9a73173156a
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2014-12-21 18:56:44 +0200
+
+ Docs: Update docs/examples/00_README.txt.
+
+ doc/examples/00_README.txt | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+commit 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6
+Author: Lasse Collin <lasse.collin@tukaani.org>
+Date: 2014-12-21 18:11:17 +0200
+
+ Bump version and soname for 5.2.0.
+
+ I know that soname != app version, but I skip AGE=1
+ in -version-info to make the soname match the liblzma
+ version anyway. It doesn't hurt anything as long as
+ it doesn't conflict with library versioning rules.
+
+ src/liblzma/Makefile.am | 2 +-
+ src/liblzma/api/lzma/version.h | 6 +++---
+ src/liblzma/liblzma.map | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..7ef2cb4
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,765 @@
+
+XZ Utils Installation
+=====================
+
+ 0. Preface
+ 1. Supported platforms
+ 1.1. Compilers
+ 1.2. Platform-specific notes
+ 1.2.1. AIX
+ 1.2.2. IRIX
+ 1.2.3. MINIX 3
+ 1.2.4. OpenVMS
+ 1.2.5. Solaris, OpenSolaris, and derivatives
+ 1.2.6. Tru64
+ 1.2.7. Windows
+ 1.2.8. DOS
+ 1.2.9. z/OS
+ 1.3. Adding support for new platforms
+ 2. configure options
+ 2.1. Static vs. dynamic linking of liblzma
+ 2.2. Optimizing xzdec and lzmadec
+ 3. xzgrep and other scripts
+ 3.1. Dependencies
+ 3.2. PATH
+ 4. Tests
+ 4.1 Testing in parallel
+ 4.2 Cross compiling
+ 5. Troubleshooting
+ 5.1. "No C99 compiler was found."
+ 5.2. "No POSIX conforming shell (sh) was found."
+ 5.3. configure works but build fails at crc32_x86.S
+ 5.4. Lots of warnings about symbol visibility
+ 5.5. "make check" fails
+ 5.6. liblzma.so (or similar) not found when running xz
+
+
+0. Preface
+----------
+
+ If you aren't familiar with building packages that use GNU Autotools,
+ see the file INSTALL.generic for generic instructions before reading
+ further.
+
+ If you are going to build a package for distribution, see also the
+ file PACKAGERS. It contains information that should help making the
+ binary packages as good as possible, but the information isn't very
+ interesting to those making local builds for private use or for use
+ in special situations like embedded systems.
+
+
+1. Supported platforms
+----------------------
+
+ XZ Utils are developed on GNU/Linux, but they should work on many
+ POSIX-like operating systems like *BSDs and Solaris, and even on
+ a few non-POSIX operating systems.
+
+
+1.1. Compilers
+
+ A C99 compiler is required to compile XZ Utils. If you use GCC, you
+ need at least version 3.x.x. GCC version 2.xx.x doesn't support some
+ C99 features used in XZ Utils source code, thus GCC 2 won't compile
+ XZ Utils.
+
+ XZ Utils takes advantage of some GNU C extensions when building
+ with GCC. Because these extensions are used only when building
+ with GCC, it should be possible to use any C99 compiler.
+
+
+1.2. Platform-specific notes
+
+1.2.1. AIX
+
+ If you use IBM XL C compiler, pass CC=xlc_r to configure. If
+ you use CC=xlc instead, you must disable threading support
+ with --disable-threads (usually not recommended).
+
+
+1.2.2. IRIX
+
+ MIPSpro 7.4.4m has been reported to produce broken code if using
+ the -O2 optimization flag ("make check" fails). Using -O1 should
+ work.
+
+ A problem has been reported when using shared liblzma. Passing
+ --disable-shared to configure works around this. Alternatively,
+ putting "-64" to CFLAGS to build a 64-bit version might help too.
+
+
+1.2.3. MINIX 3
+
+ The default install of MINIX 3 includes Amsterdam Compiler Kit (ACK),
+ which doesn't support C99. Install GCC to compile XZ Utils.
+
+ MINIX 3.1.8 and older have bugs in /usr/include/stdint.h, which has
+ to be patched before XZ Utils can be compiled correctly. See
+ <http://gforge.cs.vu.nl/gf/project/minix/tracker/?action=TrackerItemEdit&tracker_item_id=537>.
+
+ MINIX 3.2.0 and later use a different libc and aren't affected by
+ the above bug.
+
+ XZ Utils doesn't have code to detect the amount of physical RAM and
+ number of CPU cores on MINIX 3.
+
+ See section 5.4 in this file about symbol visibility warnings (you
+ may want to pass gl_cv_cc_visibility=no to configure).
+
+
+1.2.4. OpenVMS
+
+ XZ Utils can be built for OpenVMS, but the build system files
+ are not included in the XZ Utils source package. The required
+ OpenVMS-specific files are maintained by Jouk Jansen and can be
+ downloaded here:
+
+ http://nchrem.tnw.tudelft.nl/openvms/software2.html#xzutils
+
+
+1.2.5. Solaris, OpenSolaris, and derivatives
+
+ The following linker error has been reported on some x86 systems:
+
+ ld: fatal: relocation error: R_386_GOTOFF: ...
+
+ This can be worked around by passing gl_cv_cc_visibility=no
+ as an argument to the configure script.
+
+ test_scripts.sh in "make check" may fail if good enough tools are
+ missing from PATH (/usr/xpg4/bin or /usr/xpg6/bin). Nowadays
+ /usr/xpg4/bin is added to the script PATH by default on Solaris
+ (see --enable-path-for-scripts=PREFIX in section 2), but old xz
+ releases needed extra steps. See sections 5.5 and 3.2 for more
+ information.
+
+
+1.2.6. Tru64
+
+ If you try to use the native C compiler on Tru64 (passing CC=cc to
+ configure), you may need the workaround mention in section 5.1 in
+ this file (pass also ac_cv_prog_cc_c99= to configure).
+
+
+1.2.7. Windows
+
+ If it is enough to build liblzma (no command line tools):
+
+ - There is CMake support. It should be good enough to build
+ static liblzma or liblzma.dll with Visual Studio. The CMake
+ support may work with MinGW or MinGW-w64. Read the comment
+ in the beginning of CMakeLists.txt before running CMake!
+
+ - There are Visual Studio project files under the "windows"
+ directory. See windows/INSTALL-MSVC.txt. In the future the
+ project files will be removed when CMake support is good
+ enough. Thus, please test the CMake version and help fix
+ possible issues.
+
+ To build also the command line tools:
+
+ - MinGW-w64 + MSYS (32-bit and 64-bit x86): This is used
+ for building the official binary packages for Windows.
+ There is windows/build.bash to ease packaging XZ Utils with
+ MinGW(-w64) + MSYS into a redistributable .zip or .7z file.
+ See windows/INSTALL-MinGW.txt for more information.
+
+ - MinGW + MSYS (32-bit x86): I haven't recently tested this.
+
+ - Cygwin 1.7.35 and later: NOTE that using XZ Utils >= 5.2.0
+ under Cygwin older than 1.7.35 can lead to DATA LOSS! If
+ you must use an old Cygwin version, stick to XZ Utils 5.0.x
+ which is safe under older Cygwin versions. You can check
+ the Cygwin version with the command "cygcheck -V".
+
+ It may be possible to build liblzma with other toolchains too, but
+ that will probably require writing a separate makefile. Building
+ the command line tools with non-GNU toolchains will be harder than
+ building only liblzma.
+
+ Even if liblzma is built with MinGW(-w64), the resulting DLL can
+ be used by other compilers and linkers, including MSVC. See
+ windows/README-Windows.txt for details.
+
+
+1.2.8. DOS
+
+ There is a Makefile in the "dos" directory to build XZ Utils on
+ DOS using DJGPP. Support for long file names (LFN) is needed at
+ build time but the resulting xz.exe works without LFN support too.
+ See dos/INSTALL.txt and dos/README.txt for more information.
+
+
+1.2.9. z/OS
+
+ To build XZ Utils on z/OS UNIX System Services using xlc, pass
+ these options to the configure script: CC='xlc -qhaltonmsg=CCN3296'
+ CPPFLAS='-D_UNIX03_THREADS -D_XOPEN_SOURCE=600'. The first makes
+ xlc throw an error if a header file is missing, which is required
+ to make the tests in configure work. The CPPFLAGS are needed to
+ get pthread support (some other CPPFLAGS may work too; if there
+ are problems, try -D_UNIX95_THREADS instead of -D_UNIX03_THREADS).
+
+ test_scripts.sh in "make check" will fail even if the scripts
+ actually work because the test data includes compressed files
+ with US-ASCII text.
+
+ No other tests should fail. If test_files.sh fails, check that
+ the included .xz test files weren't affected by EBCDIC conversion.
+
+ XZ Utils doesn't have code to detect the amount of physical RAM and
+ number of CPU cores on z/OS.
+
+
+1.3. Adding support for new platforms
+
+ If you have written patches to make XZ Utils to work on previously
+ unsupported platform, please send the patches to me! I will consider
+ including them to the official version. It's nice to minimize the
+ need of third-party patching.
+
+ One exception: Don't request or send patches to change the whole
+ source package to C89. I find C99 substantially nicer to write and
+ maintain. However, the public library headers must be in C89 to
+ avoid frustrating those who maintain programs, which are strictly
+ in C89 or C++.
+
+
+2. configure options
+--------------------
+
+ In most cases, the defaults are what you want. Many of the options
+ below are useful only when building a size-optimized version of
+ liblzma or command line tools.
+
+ --enable-encoders=LIST
+ --disable-encoders
+ Specify a comma-separated LIST of filter encoders to
+ build. See "./configure --help" for exact list of
+ available filter encoders. The default is to build all
+ supported encoders.
+
+ If LIST is empty or --disable-encoders is used, no filter
+ encoders will be built and also the code shared between
+ encoders will be omitted.
+
+ Disabling encoders will remove some symbols from the
+ liblzma ABI, so this option should be used only when it
+ is known to not cause problems.
+
+ --enable-decoders=LIST
+ --disable-decoders
+ This is like --enable-encoders but for decoders. The
+ default is to build all supported decoders.
+
+ --enable-match-finders=LIST
+ liblzma includes two categories of match finders:
+ hash chains and binary trees. Hash chains (hc3 and hc4)
+ are quite fast but they don't provide the best compression
+ ratio. Binary trees (bt2, bt3 and bt4) give excellent
+ compression ratio, but they are slower and need more
+ memory than hash chains.
+
+ You need to enable at least one match finder to build the
+ LZMA1 or LZMA2 filter encoders. Usually hash chains are
+ used only in the fast mode, while binary trees are used to
+ when the best compression ratio is wanted.
+
+ The default is to build all the match finders if LZMA1
+ or LZMA2 filter encoders are being built.
+
+ --enable-checks=LIST
+ liblzma support multiple integrity checks. CRC32 is
+ mandatory, and cannot be omitted. See "./configure --help"
+ for exact list of available integrity check types.
+
+ liblzma and the command line tools can decompress files
+ which use unsupported integrity check type, but naturally
+ the file integrity cannot be verified in that case.
+
+ Disabling integrity checks may remove some symbols from
+ the liblzma ABI, so this option should be used only when
+ it is known to not cause problems.
+
+ --enable-external-sha256
+ Try to use SHA-256 code from the operating system libc
+ or similar base system libraries. This doesn't try to
+ use OpenSSL or libgcrypt or such libraries.
+
+ The reasons to use this option:
+
+ - It makes liblzma slightly smaller.
+
+ - It might improve SHA-256 speed if the implementation
+ in the operating is very good (but see below).
+
+ External SHA-256 is disabled by default for two reasons:
+
+ - On some operating systems the symbol names of the
+ SHA-256 functions conflict with OpenSSL's libcrypto.
+ This causes weird problems such as decompression
+ errors if an application is linked against both
+ liblzma and libcrypto. This problem affects at least
+ FreeBSD 10 and older and MINIX 3.3.0 and older, but
+ other OSes that provide a function "SHA256_Init" might
+ also be affected. FreeBSD 11 has the problem fixed.
+ NetBSD had the problem but it was fixed it in 2009
+ already. OpenBSD uses "SHA256Init" and thus never had
+ a conflict with libcrypto.
+
+ - The SHA-256 code in liblzma is faster than the SHA-256
+ code provided by some operating systems. If you are
+ curious, build two copies of xz (internal and external
+ SHA-256) and compare the decompression (xz --test)
+ times:
+
+ dd if=/dev/zero bs=1024k count=1024 \
+ | xz -v -0 -Csha256 > foo.xz
+ time xz --test foo.xz
+
+ --disable-microlzma
+ Don't build MicroLZMA encoder and decoder. This omits
+ lzma_microlzma_encoder() and lzma_microlzma_decoder()
+ API functions from liblzma. These functions are needed
+ by specific applications only. They were written for
+ erofs-utils but they may be used by others too.
+
+ --disable-lzip-decoder
+ Disable decompression support for .lz (lzip) files.
+ This omits the API function lzma_lzip_decoder() from
+ liblzma and .lz support from the xz tool.
+
+ --disable-xz
+ --disable-xzdec
+ --disable-lzmadec
+ --disable-lzmainfo
+ Don't build and install the command line tool mentioned
+ in the option name.
+
+ NOTE: Disabling xz will skip some tests in "make check".
+
+ NOTE: If xzdec is disabled and lzmadec is left enabled,
+ a dangling man page symlink lzmadec.1 -> xzdec.1 is
+ created.
+
+ --disable-lzma-links
+ Don't create symlinks for LZMA Utils compatibility.
+ This includes lzma, unlzma, and lzcat. If scripts are
+ installed, also lzdiff, lzcmp, lzgrep, lzegrep, lzfgrep,
+ lzmore, and lzless will be omitted if this option is used.
+
+ --disable-scripts
+ Don't install the scripts xzdiff, xzgrep, xzmore, xzless,
+ and their symlinks.
+
+ --disable-doc
+ Don't install the documentation files to $docdir
+ (often /usr/doc/xz or /usr/local/doc/xz). Man pages
+ will still be installed. The $docdir can be changed
+ with --docdir=DIR.
+
+ --disable-assembler
+ liblzma includes some assembler optimizations. Currently
+ there is only assembler code for CRC32 and CRC64 for
+ 32-bit x86.
+
+ All the assembler code in liblzma is position-independent
+ code, which is suitable for use in shared libraries and
+ position-independent executables. So far only i386
+ instructions are used, but the code is optimized for i686
+ class CPUs. If you are compiling liblzma exclusively for
+ pre-i686 systems, you may want to disable the assembler
+ code.
+
+ --disable-clmul-crc
+ Disable the use carryless multiplication for CRC
+ calculation even if compiler support for it is detected.
+ The code uses runtime detection of SSSE3, SSE4.1, and
+ CLMUL instructions on x86. On 32-bit x86 this currently
+ is used only if --disable-assembler is used (this might
+ be fixed in the future). The code works on E2K too.
+
+ If using compiler options that unconditionally allow the
+ required extensions (-msse4.1 -mpclmul) then runtime
+ detection isn't used and the generic code is omitted.
+
+ --enable-unaligned-access
+ Allow liblzma to use unaligned memory access for 16-bit,
+ 32-bit, and 64-bit loads and stores. This should be
+ enabled only when the hardware supports this, that is,
+ when unaligned access is fast. Some operating system
+ kernels emulate unaligned access, which is extremely
+ slow. This option shouldn't be used on systems that
+ rely on such emulation.
+
+ Unaligned access is enabled by default on x86, x86-64,
+ big endian PowerPC, some ARM, and some ARM64 systems.
+
+ --enable-unsafe-type-punning
+ This enables use of code like
+
+ uint8_t *buf8 = ...;
+ *(uint32_t *)buf8 = ...;
+
+ which violates strict aliasing rules and may result
+ in broken code. There should be no need to use this
+ option with recent GCC or Clang versions on any
+ arch as just as fast code can be generated in a safe
+ way too (using __builtin_assume_aligned + memcpy).
+
+ However, this option might improve performance in some
+ other cases, especially with old compilers (for example,
+ GCC 3 and early 4.x on x86, GCC < 6 on ARMv6 and ARMv7).
+
+ --enable-small
+ Reduce the size of liblzma by selecting smaller but
+ semantically equivalent version of some functions, and
+ omit precomputed lookup tables. This option tends to
+ make liblzma slightly slower.
+
+ Note that while omitting the precomputed tables makes
+ liblzma smaller on disk, the tables are still needed at
+ run time, and need to be computed at startup. This also
+ means that the RAM holding the tables won't be shared
+ between applications linked against shared liblzma.
+
+ This option doesn't modify CFLAGS to tell the compiler
+ to optimize for size. You need to add -Os or equivalent
+ flag(s) to CFLAGS manually.
+
+ --enable-assume-ram=SIZE
+ On the most common operating systems, XZ Utils is able to
+ detect the amount of physical memory on the system. This
+ information is used by the options --memlimit-compress,
+ --memlimit-decompress, and --memlimit when setting the
+ limit to a percentage of total RAM.
+
+ On some systems, there is no code to detect the amount of
+ RAM though. Using --enable-assume-ram one can set how much
+ memory to assume on these systems. SIZE is given as MiB.
+ The default is 128 MiB.
+
+ Feel free to send patches to add support for detecting
+ the amount of RAM on the operating system you use. See
+ src/common/tuklib_physmem.c for details.
+
+ --enable-threads=METHOD
+ Threading support is enabled by default so normally there
+ is no need to specify this option.
+
+ Supported values for METHOD:
+
+ yes Autodetect the threading method. If none
+ is found, configure will give an error.
+
+ posix Use POSIX pthreads. This is the default
+ except on Windows outside Cygwin.
+
+ win95 Use Windows 95 compatible threads. This
+ is compatible with Windows XP and later
+ too. This is the default for 32-bit x86
+ Windows builds. Unless the compiler
+ supports __attribute__((__constructor__)),
+ the `win95' threading is incompatible with
+ --enable-small.
+
+ vista Use Windows Vista compatible threads. The
+ resulting binaries won't run on Windows XP
+ or older. This is the default for Windows
+ excluding 32-bit x86 builds (that is, on
+ x86-64 the default is `vista').
+
+ no Disable threading support. This is the
+ same as using --disable-threads.
+ NOTE: If combined with --enable-small
+ and the compiler doesn't support
+ __attribute__((__constructor__)), the
+ resulting liblzma won't be thread safe,
+ that is, if a multi-threaded application
+ calls any liblzma functions from more than
+ one thread, something bad may happen.
+
+ --enable-sandbox=METHOD
+ There is limited sandboxing support in the xz tool. If
+ built with sandbox support, it's used automatically when
+ (de)compressing exactly one file to standard output and
+ the options --files or --files0 weren't used. This is a
+ common use case, for example, (de)compressing .tar.xz
+ files via GNU tar. The sandbox is also used for
+ single-file `xz --test' or `xz --list'.
+
+ Supported METHODs:
+
+ auto Look for a supported sandboxing method
+ and use it if found. If no method is
+ found, then sandboxing isn't used.
+ This is the default.
+
+ no Disable sandboxing support.
+
+ capsicum
+ Use Capsicum (FreeBSD >= 10) for
+ sandboxing. If no Capsicum support
+ is found, configure will give an error.
+
+ pledge Use pledge(2) (OpenBSD >= 5.9) for
+ sandboxing. If pledge(2) isn't found,
+ configure will give an error.
+
+ --enable-symbol-versions
+ Use symbol versioning for liblzma. This is enabled by
+ default on GNU/Linux, other GNU-based systems, and
+ FreeBSD.
+
+ --enable-debug
+ This enables the assert() macro and possibly some other
+ run-time consistency checks. It makes the code slower, so
+ you normally don't want to have this enabled.
+
+ --enable-werror
+ If building with GCC, make all compiler warnings an error,
+ that abort the compilation. This may help catching bugs,
+ and should work on most systems. This has no effect on the
+ resulting binaries.
+
+ --enable-path-for-scripts=PREFIX
+ If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in
+ the beginning of the scripts (xzgrep and others).
+ The default is empty except on Solaris the default is
+ /usr/xpg4/bin.
+
+ This can be useful if the default PATH doesn't contain
+ modern POSIX tools (as can be the case on Solaris) or if
+ one wants to ensure that the correct xz binary is in the
+ PATH for the scripts. Note that the latter use can break
+ "make check" if the prefixed PATH causes a wrong xz binary
+ (other than the one that was just built) to be used.
+
+ Older xz releases support a different method for setting
+ the PATH for the scripts. It is described in section 3.2
+ and is supported in this xz version too.
+
+
+2.1. Static vs. dynamic linking of liblzma
+
+ On 32-bit x86, linking against static liblzma can give a minor
+ speed improvement. Static libraries on x86 are usually compiled as
+ position-dependent code (non-PIC) and shared libraries are built as
+ position-independent code (PIC). PIC wastes one register, which can
+ make the code slightly slower compared to a non-PIC version. (Note
+ that this doesn't apply to x86-64.)
+
+ If you want to link xz against static liblzma, the simplest way
+ is to pass --disable-shared to configure. If you want also shared
+ liblzma, run configure again and run "make install" only for
+ src/liblzma.
+
+
+2.2. Optimizing xzdec and lzmadec
+
+ xzdec and lzmadec are intended to be relatively small instead of
+ optimizing for the best speed. Thus, it is a good idea to build
+ xzdec and lzmadec separately:
+
+ - To link the tools against static liblzma, pass --disable-shared
+ to configure.
+
+ - To select somewhat size-optimized variant of some things in
+ liblzma, pass --enable-small to configure.
+
+ - Tell the compiler to optimize for size instead of speed.
+ For example, with GCC, put -Os into CFLAGS.
+
+ - xzdec and lzmadec will never use multithreading capabilities of
+ liblzma. You can avoid dependency on libpthread by passing
+ --disable-threads to configure.
+
+ - There are and will be no translated messages for xzdec and
+ lzmadec, so it is fine to pass also --disable-nls to configure.
+
+ - Only decoder code is needed, so you can speed up the build
+ slightly by passing --disable-encoders to configure. This
+ shouldn't affect the final size of the executables though,
+ because the linker is able to omit the encoder code anyway.
+
+ If you have no use for xzdec or lzmadec, you can disable them with
+ --disable-xzdec and --disable-lzmadec.
+
+
+3. xzgrep and other scripts
+---------------------------
+
+3.1. Dependencies
+
+ POSIX shell (sh) and bunch of other standard POSIX tools are required
+ to run the scripts. The configure script tries to find a POSIX
+ compliant sh, but if it fails, you can force the shell by passing
+ gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
+ script.
+
+ xzdiff (xzcmp/lzdiff/lzcmp) may use mktemp if it is available. As
+ a fallback xzdiff will use mkdir to securely create a temporary
+ directory. Having mktemp available is still recommended since the
+ mkdir fallback method isn't as robust as mktemp is. The original
+ mktemp can be found from <https://www.mktemp.org/>. On GNU, most will
+ use the mktemp program from GNU coreutils instead of the original
+ implementation. Both mktemp versions are fine.
+
+ In addition to using xz to decompress .xz files, xzgrep and xzdiff
+ use gzip, bzip2, and lzop to support .gz, bz2, and .lzo files.
+
+
+3.2. PATH
+
+ The method described below is supported by older xz releases.
+ It is supported by the current version too, but the newer
+ --enable-path-for-scripts=PREFIX described in section 2 may be
+ more convenient.
+
+ The scripts assume that the required tools (standard POSIX utilities,
+ mktemp, and xz) are in PATH; the scripts don't set the PATH themselves
+ (except as described for --enable-path-for-scripts=PREFIX). Some
+ people like this while some think this is a bug. Those in the latter
+ group can easily patch the scripts before running the configure script
+ by taking advantage of a placeholder line in the scripts.
+
+ For example, to make the scripts prefix /usr/bin:/bin to PATH:
+
+ perl -pi -e 's|^#SET_PATH.*$|PATH=/usr/bin:/bin:\$PATH|' \
+ src/scripts/xz*.in
+
+
+4. Tests
+--------
+
+ The test framework can be built and run by executing "make check" in
+ the build directory. The tests are a mix of executables and POSIX
+ shell scripts (sh). All tests should pass if the default configuration
+ is used. Disabling features through the configure options may cause
+ some tests to be skipped. If any tests do not pass, see section 5.5.
+
+
+4.1. Testing in parallel
+
+ The tests can be run in parallel using the "-j" make option on systems
+ that support it. For instance, "make -j4 check" will run up to four
+ tests simultaneously.
+
+
+4.2. Cross compiling
+
+ The tests can be built without running them:
+
+ make check TESTS=
+
+ The TESTS variable is the list of tests you wish to run. Leaving it
+ empty will compile the tests without running any.
+
+ If the tests are copied to a target machine to execute, the test data
+ files in the directory tests/files must also be copied. The tests
+ search for the data files using the environment variable $srcdir,
+ expecting to find the data files under $srcdir/files/. If $srcdir
+ isn't set then it defaults to the current directory.
+
+ The shell script tests can be copied from the source directory to the
+ target machine to execute. In addition to the test files, these tests
+ will expect the following relative file paths to execute properly:
+
+ ./create_compress_files
+ ../config.h
+ ../src/xz/xz
+ ../src/xzdec/xzdec
+ ../src/scripts/xzdiff
+ ../src/scripts/xzgrep
+
+
+5. Troubleshooting
+------------------
+
+5.1. "No C99 compiler was found."
+
+ You need a C99 compiler to build XZ Utils. If the configure script
+ cannot find a C99 compiler and you think you have such a compiler
+ installed, set the compiler command by passing CC=/path/to/c99 as
+ an argument to the configure script.
+
+ If you get this error even when you think your compiler supports C99,
+ you can override the test by passing ac_cv_prog_cc_c99= as an argument
+ to the configure script. The test for C99 compiler is not perfect (and
+ it is not as easy to make it perfect as it sounds), so sometimes this
+ may be needed. You will get a compile error if your compiler doesn't
+ support enough C99.
+
+
+5.2. "No POSIX conforming shell (sh) was found."
+
+ xzgrep and other scripts need a shell that (roughly) conforms
+ to POSIX. The configure script tries to find such a shell. If
+ it fails, you can force the shell to be used by passing
+ gl_cv_posix_shell=/path/to/posix-sh as an argument to the configure
+ script. Alternatively you can omit the installation of scripts and
+ this error by passing --disable-scripts to configure.
+
+
+5.3. configure works but build fails at crc32_x86.S
+
+ The easy fix is to pass --disable-assembler to the configure script.
+
+ The configure script determines if assembler code can be used by
+ looking at the configure triplet; there is currently no check if
+ the assembler code can actually actually be built. The x86 assembler
+ code should work on x86 GNU/Linux, *BSDs, Solaris, Darwin, MinGW,
+ Cygwin, and DJGPP. On other x86 systems, there may be problems and
+ the assembler code may need to be disabled with the configure option.
+
+ If you get this error when building for x86-64, you have specified or
+ the configure script has misguessed your architecture. Pass the
+ correct configure triplet using the --build=CPU-COMPANY-SYSTEM option
+ (see INSTALL.generic).
+
+
+5.4. Lots of warnings about symbol visibility
+
+ On some systems where symbol visibility isn't supported, GCC may
+ still accept the visibility options and attributes, which will make
+ configure think that visibility is supported. This will result in
+ many compiler warnings. You can avoid the warnings by forcing the
+ visibility support off by passing gl_cv_cc_visibility=no as an
+ argument to the configure script. This has no effect on the
+ resulting binaries, but fewer warnings looks nicer and may allow
+ using --enable-werror.
+
+
+5.5. "make check" fails
+
+ If the other tests pass but test_scripts.sh fails, then the problem
+ is in the scripts in src/scripts. Comparing the contents of
+ tests/xzgrep_test_output to tests/xzgrep_expected_output might
+ give a good idea about problems in xzgrep. One possibility is that
+ some tools are missing from the current PATH or the tools lack
+ support for some POSIX features. This can happen at least on
+ Solaris where the tools in /bin may be ancient but good enough
+ tools are available in /usr/xpg4/bin or /usr/xpg6/bin. For possible
+ fixes, see --enable-path-for-scripts=PREFIX in section 2 and the
+ older alternative method described in section 3.2 of this file.
+
+ If tests other than test_scripts.sh fail, a likely reason is that
+ libtool links the test programs against an installed version of
+ liblzma instead of the version that was just built. This is
+ obviously a bug which seems to happen on some platforms.
+ A workaround is to uninstall the old liblzma versions first.
+
+ If the problem isn't any of those described above, then it's likely
+ a bug in XZ Utils or in the compiler. See the platform-specific
+ notes in this file for possible known problems. Please report
+ a bug if you cannot solve the problem. See README for contact
+ information.
+
+
+5.6. liblzma.so (or similar) not found when running xz
+
+ If you installed the package with "make install" and get an error
+ about liblzma.so (or a similarly named file) being missing, try
+ running "ldconfig" to update the run-time linker cache (if your
+ operating system has such a command).
+
diff --git a/INSTALL.generic b/INSTALL.generic
new file mode 100644
index 0000000..8865734
--- /dev/null
+++ b/INSTALL.generic
@@ -0,0 +1,368 @@
+Installation Instructions
+*************************
+
+ Copyright (C) 1994-1996, 1999-2002, 2004-2016 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 warranty of any kind.
+
+Basic Installation
+==================
+
+ Briefly, the shell command './configure && make && make install'
+should configure, build, and install this package. The following
+more-detailed instructions are generic; see the 'README' file for
+instructions specific to this package. Some packages provide this
+'INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+ The 'configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a 'Makefile' in each directory of the package.
+It may also create one or more '.h' files containing system-dependent
+definitions. Finally, it creates a shell script 'config.status' that
+you can run in the future to recreate the current configuration, and a
+file 'config.log' containing compiler output (useful mainly for
+debugging 'configure').
+
+ It can also use an optional file (typically called 'config.cache' and
+enabled with '--cache-file=config.cache' or simply '-C') that saves the
+results of its tests to speed up reconfiguring. Caching is disabled by
+default to prevent problems with accidental use of stale cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how 'configure' could check whether to do them, and mail
+diffs or instructions to the address given in the 'README' so they can
+be considered for the next release. If you are using the cache, and at
+some point 'config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file 'configure.ac' (or 'configure.in') is used to create
+'configure' by a program called 'autoconf'. You need 'configure.ac' if
+you want to change it or regenerate 'configure' using a newer version of
+'autoconf'.
+
+ The simplest way to compile this package is:
+
+ 1. 'cd' to the directory containing the package's source code and type
+ './configure' to configure the package for your system.
+
+ Running 'configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type 'make' to compile the package.
+
+ 3. Optionally, type 'make check' to run any self-tests that come with
+ the package, generally using the just-built uninstalled binaries.
+
+ 4. Type 'make install' to install the programs and any data files and
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the 'make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type 'make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior 'make install' required
+ root privileges, verifies that the installation completed
+ correctly.
+
+ 6. You can remove the program binaries and object files from the
+ source code directory by typing 'make clean'. To also remove the
+ files that 'configure' created (so you can compile the package for
+ a different kind of computer), type 'make distclean'. There is
+ also a 'make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 7. Often, you can also type 'make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide 'make
+ distcheck', which can by used by developers to test that all other
+ targets like 'make install' and 'make uninstall' work correctly.
+ This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the 'configure' script does not know about. Run './configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give 'configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here is
+an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU 'make'. 'cd' to the
+directory where you want the object files and executables to go and run
+the 'configure' script. 'configure' automatically checks for the source
+code in the directory that 'configure' is in and in '..'. This is known
+as a "VPATH" build.
+
+ With a non-GNU 'make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use 'make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple '-arch' options to the
+compiler but only a single '-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the 'lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, 'make install' installs the package's commands under
+'/usr/local/bin', include files under '/usr/local/include', etc. You
+can specify an installation prefix other than '/usr/local' by giving
+'configure' the option '--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like '--bindir=DIR' to specify different values for particular
+kinds of files. Run 'configure --help' for a list of the directories
+you can set and what kinds of files go in them. In general, the default
+for these options is expressed in terms of '${prefix}', so that
+specifying just '--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to 'configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+'make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, 'make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+'${prefix}'. Any directories that were specified during 'configure',
+but not in terms of '${prefix}', must each be overridden at install time
+for the entire installation to be relocated. The approach of makefile
+variable overrides for each directory variable is required by the GNU
+Coding Standards, and ideally causes no recompilation. However, some
+platforms have known limitations with the semantics of shared libraries
+that end up requiring recompilation when using this method, particularly
+noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the 'DESTDIR' variable. For
+example, 'make install DESTDIR=/alternate/directory' will prepend
+'/alternate/directory' before all installation names. The approach of
+'DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of '${prefix}'
+at 'configure' time.
+
+Optional Features
+=================
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving 'configure' the
+option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
+
+ Some packages pay attention to '--enable-FEATURE' options to
+'configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to '--with-PACKAGE' options, where PACKAGE
+is something like 'gnu-as' or 'x' (for the X Window System). The
+'README' should mention any '--enable-' and '--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, 'configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the 'configure' options '--x-includes=DIR' and
+'--x-libraries=DIR' to specify their locations.
+
+ Some packages offer the ability to configure how verbose the
+execution of 'make' will be. For these packages, running './configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with 'make V=1'; while running './configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with 'make V=0'.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
+is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ HP-UX 'make' updates targets which have the same time stamps as their
+prerequisites, which makes it generally unusable when shipped generated
+files such as 'configure' are involved. Use GNU 'make' instead.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
+workaround. If GNU CC is not installed, it is therefore recommended to
+try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+ On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
+directory contains several dysfunctional programs; working variants of
+these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
+in your 'PATH', put it _after_ '/usr/bin'.
+
+ On Haiku, software installed for all users goes in '/boot/common',
+not '/usr/local'. It is recommended to use the following options:
+
+ ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+ There may be some features 'configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, 'configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+'--build=TYPE' option. TYPE can either be a short name for the system
+type, such as 'sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS
+ KERNEL-OS
+
+ See the file 'config.sub' for the possible values of each field. If
+'config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option '--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with '--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for 'configure' scripts to share,
+you can create a site shell script called 'config.site' that gives
+default values for variables like 'CC', 'cache_file', and 'prefix'.
+'configure' looks for 'PREFIX/share/config.site' if it exists, then
+'PREFIX/etc/config.site' if it exists. Or, you can set the
+'CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all 'configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to 'configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the 'configure' command line, using 'VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified 'gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
+Autoconf limitation. Until the limitation is lifted, you can use this
+workaround:
+
+ CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+'configure' Invocation
+======================
+
+ 'configure' recognizes the following options to control how it
+operates.
+
+'--help'
+'-h'
+ Print a summary of all of the options to 'configure', and exit.
+
+'--help=short'
+'--help=recursive'
+ Print a summary of the options unique to this package's
+ 'configure', and exit. The 'short' variant lists options used only
+ in the top level, while the 'recursive' variant lists options also
+ present in any nested packages.
+
+'--version'
+'-V'
+ Print the version of Autoconf used to generate the 'configure'
+ script, and exit.
+
+'--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally 'config.cache'. FILE defaults to '/dev/null' to
+ disable caching.
+
+'--config-cache'
+'-C'
+ Alias for '--cache-file=config.cache'.
+
+'--quiet'
+'--silent'
+'-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to '/dev/null' (any error
+ messages will still be shown).
+
+'--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ 'configure' can determine that directory automatically.
+
+'--prefix=DIR'
+ Use DIR as the installation prefix. *note Installation Names:: for
+ more details, including other options available for fine-tuning the
+ installation locations.
+
+'--no-create'
+'-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+'configure' also accepts some other, not widely useful, options. Run
+'configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..f562f90
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,134 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+# Use -n to prevent gzip from adding a timestamp to the .gz headers.
+GZIP_ENV = -9n
+
+DIST_SUBDIRS = lib src po tests debug
+SUBDIRS =
+
+if COND_GNULIB
+SUBDIRS += lib
+endif
+
+SUBDIRS += src po tests
+
+if COND_DOC
+dist_doc_DATA = \
+ AUTHORS \
+ COPYING \
+ COPYING.GPLv2 \
+ NEWS \
+ README \
+ THANKS \
+ TODO \
+ doc/faq.txt \
+ doc/history.txt \
+ doc/xz-file-format.txt \
+ doc/lzma-file-format.txt
+
+examplesdir = $(docdir)/examples
+dist_examples_DATA = \
+ doc/examples/00_README.txt \
+ doc/examples/01_compress_easy.c \
+ doc/examples/02_decompress.c \
+ doc/examples/03_compress_custom.c \
+ doc/examples/04_compress_easy_mt.c \
+ doc/examples/Makefile
+
+examplesolddir = $(docdir)/examples_old
+dist_examplesold_DATA = \
+ doc/examples_old/xz_pipe_comp.c \
+ doc/examples_old/xz_pipe_decomp.c
+
+# Install the Doxygen generated documentation if they were built.
+install-data-local:
+ if test -d "$(srcdir)/doc/api" ; then \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)/api" && \
+ $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
+ "$(DESTDIR)$(docdir)/api"; \
+ fi
+
+# Remove the Doxygen generated documentation when uninstalling.
+uninstall-local:
+ rm -rf "$(DESTDIR)$(docdir)/api"
+endif
+
+EXTRA_DIST = \
+ po4a \
+ extra \
+ dos \
+ doxygen \
+ windows \
+ macosx \
+ cmake \
+ CMakeLists.txt \
+ autogen.sh \
+ COPYING.GPLv2 \
+ COPYING.GPLv3 \
+ COPYING.LGPLv2.1 \
+ INSTALL.generic \
+ PACKAGERS \
+ build-aux/manconv.sh \
+ build-aux/version.sh
+
+ACLOCAL_AMFLAGS = -I m4
+
+# List of man pages to convert to PDF and plain text in the dist-hook target.
+manfiles = \
+ 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
+
+# Create ChangeLog from output of "git log --date=iso --stat".
+# Convert the man pages to PDF and plain text (ASCII only) formats.
+dist-hook:
+ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
+ ( cd "$(srcdir)" && git log --date=iso --stat \
+ 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6^..HEAD ) \
+ > "$(distdir)/ChangeLog"; \
+ fi
+ if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
+ dest="$(distdir)/doc/man" && \
+ $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
+ for FILE in $(manfiles); do \
+ BASE=`basename $$FILE .1` && \
+ sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
+ sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
+ sh "$(srcdir)/build-aux/manconv.sh" ascii \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/txt/$$BASE.txt"; \
+ done; \
+ fi
+ if test -d "$(srcdir)/doc/api" ; then \
+ $(MKDIR_P) "$(distdir)/doc/api" && \
+ $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
+ "$(distdir)/doc/api"; \
+ fi
+
+# This works with GNU tar and gives cleaner package than normal 'make dist'.
+# This also ensures that the man page translations are up to date (dist-hook
+# would be too late for that).
+mydist:
+ sh "$(srcdir)/src/liblzma/validate_map.sh"
+ cd "$(srcdir)/po4a" && sh update-po
+ cd "$(srcdir)/doxygen" && sh update-doxygen
+ VERSION=$(VERSION); \
+ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
+ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
+ test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
+ fi; \
+ TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
+ $(MAKE) VERSION="$$VERSION" dist-gzip
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..2889d08
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,1121 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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_GNULIB_TRUE@am__append_1 = lib
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__dist_doc_DATA_DIST) \
+ $(am__dist_examples_DATA_DIST) \
+ $(am__dist_examplesold_DATA_DIST) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+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 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__dist_doc_DATA_DIST = AUTHORS COPYING COPYING.GPLv2 NEWS README \
+ THANKS TODO doc/faq.txt doc/history.txt doc/xz-file-format.txt \
+ doc/lzma-file-format.txt
+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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(examplesdir)" \
+ "$(DESTDIR)$(examplesolddir)"
+am__dist_examples_DATA_DIST = doc/examples/00_README.txt \
+ doc/examples/01_compress_easy.c doc/examples/02_decompress.c \
+ doc/examples/03_compress_custom.c \
+ doc/examples/04_compress_easy_mt.c doc/examples/Makefile
+am__dist_examplesold_DATA_DIST = doc/examples_old/xz_pipe_comp.c \
+ doc/examples_old/xz_pipe_decomp.c
+DATA = $(dist_doc_DATA) $(dist_examples_DATA) $(dist_examplesold_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+ config.h.in
+# 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 = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/build-aux/compile \
+ $(top_srcdir)/build-aux/config.guess \
+ $(top_srcdir)/build-aux/config.rpath \
+ $(top_srcdir)/build-aux/config.sub \
+ $(top_srcdir)/build-aux/install-sh \
+ $(top_srcdir)/build-aux/ltmain.sh \
+ $(top_srcdir)/build-aux/missing ABOUT-NLS AUTHORS COPYING \
+ ChangeLog INSTALL NEWS README THANKS TODO build-aux/compile \
+ build-aux/config.guess build-aux/config.rpath \
+ build-aux/config.sub build-aux/install-sh build-aux/ltmain.sh \
+ build-aux/missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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@
+
+# Use -n to prevent gzip from adding a timestamp to the .gz headers.
+GZIP_ENV = -9n
+DIST_SUBDIRS = lib src po tests debug
+SUBDIRS = $(am__append_1) src po tests
+@COND_DOC_TRUE@dist_doc_DATA = \
+@COND_DOC_TRUE@ AUTHORS \
+@COND_DOC_TRUE@ COPYING \
+@COND_DOC_TRUE@ COPYING.GPLv2 \
+@COND_DOC_TRUE@ NEWS \
+@COND_DOC_TRUE@ README \
+@COND_DOC_TRUE@ THANKS \
+@COND_DOC_TRUE@ TODO \
+@COND_DOC_TRUE@ doc/faq.txt \
+@COND_DOC_TRUE@ doc/history.txt \
+@COND_DOC_TRUE@ doc/xz-file-format.txt \
+@COND_DOC_TRUE@ doc/lzma-file-format.txt
+
+@COND_DOC_TRUE@examplesdir = $(docdir)/examples
+@COND_DOC_TRUE@dist_examples_DATA = \
+@COND_DOC_TRUE@ doc/examples/00_README.txt \
+@COND_DOC_TRUE@ doc/examples/01_compress_easy.c \
+@COND_DOC_TRUE@ doc/examples/02_decompress.c \
+@COND_DOC_TRUE@ doc/examples/03_compress_custom.c \
+@COND_DOC_TRUE@ doc/examples/04_compress_easy_mt.c \
+@COND_DOC_TRUE@ doc/examples/Makefile
+
+@COND_DOC_TRUE@examplesolddir = $(docdir)/examples_old
+@COND_DOC_TRUE@dist_examplesold_DATA = \
+@COND_DOC_TRUE@ doc/examples_old/xz_pipe_comp.c \
+@COND_DOC_TRUE@ doc/examples_old/xz_pipe_decomp.c
+
+EXTRA_DIST = \
+ po4a \
+ extra \
+ dos \
+ doxygen \
+ windows \
+ macosx \
+ cmake \
+ CMakeLists.txt \
+ autogen.sh \
+ COPYING.GPLv2 \
+ COPYING.GPLv3 \
+ COPYING.LGPLv2.1 \
+ INSTALL.generic \
+ PACKAGERS \
+ build-aux/manconv.sh \
+ build-aux/version.sh
+
+ACLOCAL_AMFLAGS = -I m4
+
+# List of man pages to convert to PDF and plain text in the dist-hook target.
+manfiles = \
+ 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
+
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-dist_docDATA: $(dist_doc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+ done
+
+uninstall-dist_docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+install-dist_examplesDATA: $(dist_examples_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \
+ done
+
+uninstall-dist_examplesDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir)
+install-dist_examplesoldDATA: $(dist_examplesold_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_examplesold_DATA)'; test -n "$(examplesolddir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(examplesolddir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(examplesolddir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesolddir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesolddir)" || exit $$?; \
+ done
+
+uninstall-dist_examplesoldDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_examplesold_DATA)'; test -n "$(examplesolddir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(examplesolddir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(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-recursive
+
+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"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+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
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+distdir: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @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
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+ @if test -z "$(am__skip_length_check)" && find "$(distdir)" -type f -print | \
+ grep '^...................................................................................................' 1>&2; then \
+ echo 'error: the above filenames are too long' 1>&2; \
+ exit 1; \
+ else :; fi
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(docdir)" "$(DESTDIR)$(examplesdir)" "$(DESTDIR)$(examplesolddir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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_DOC_FALSE@install-data-local:
+@COND_DOC_FALSE@uninstall-local:
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local install-dist_docDATA \
+ install-dist_examplesDATA install-dist_examplesoldDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-dist_docDATA uninstall-dist_examplesDATA \
+ uninstall-dist_examplesoldDATA uninstall-local
+
+.MAKE: $(am__recursive_targets) all install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
+ dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local \
+ install-dist_docDATA install-dist_examplesDATA \
+ install-dist_examplesoldDATA 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 installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-dist_docDATA \
+ uninstall-dist_examplesDATA uninstall-dist_examplesoldDATA \
+ uninstall-local
+
+.PRECIOUS: Makefile
+
+
+# Install the Doxygen generated documentation if they were built.
+@COND_DOC_TRUE@install-data-local:
+@COND_DOC_TRUE@ if test -d "$(srcdir)/doc/api" ; then \
+@COND_DOC_TRUE@ $(MKDIR_P) "$(DESTDIR)$(docdir)/api" && \
+@COND_DOC_TRUE@ $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
+@COND_DOC_TRUE@ "$(DESTDIR)$(docdir)/api"; \
+@COND_DOC_TRUE@ fi
+
+# Remove the Doxygen generated documentation when uninstalling.
+@COND_DOC_TRUE@uninstall-local:
+@COND_DOC_TRUE@ rm -rf "$(DESTDIR)$(docdir)/api"
+
+# Create ChangeLog from output of "git log --date=iso --stat".
+# Convert the man pages to PDF and plain text (ASCII only) formats.
+dist-hook:
+ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
+ ( cd "$(srcdir)" && git log --date=iso --stat \
+ 6060f7dc76fd6c2a8a1f8e85d0e4d86bb78273e6^..HEAD ) \
+ > "$(distdir)/ChangeLog"; \
+ fi
+ if type groff > /dev/null 2>&1 && type ps2pdf > /dev/null 2>&1; then \
+ dest="$(distdir)/doc/man" && \
+ $(MKDIR_P) "$$dest/pdf-a4" "$$dest/pdf-letter" "$$dest/txt" && \
+ for FILE in $(manfiles); do \
+ BASE=`basename $$FILE .1` && \
+ sh "$(srcdir)/build-aux/manconv.sh" pdf a4 \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/pdf-a4/$$BASE-a4.pdf" && \
+ sh "$(srcdir)/build-aux/manconv.sh" pdf letter \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/pdf-letter/$$BASE-letter.pdf" && \
+ sh "$(srcdir)/build-aux/manconv.sh" ascii \
+ < "$(srcdir)/$$FILE" \
+ > "$$dest/txt/$$BASE.txt"; \
+ done; \
+ fi
+ if test -d "$(srcdir)/doc/api" ; then \
+ $(MKDIR_P) "$(distdir)/doc/api" && \
+ $(INSTALL_DATA) "$(srcdir)"/doc/api/* \
+ "$(distdir)/doc/api"; \
+ fi
+
+# This works with GNU tar and gives cleaner package than normal 'make dist'.
+# This also ensures that the man page translations are up to date (dist-hook
+# would be too late for that).
+mydist:
+ sh "$(srcdir)/src/liblzma/validate_map.sh"
+ cd "$(srcdir)/po4a" && sh update-po
+ cd "$(srcdir)/doxygen" && sh update-doxygen
+ VERSION=$(VERSION); \
+ if test -d "$(srcdir)/.git" && type git > /dev/null 2>&1; then \
+ SNAPSHOT=`cd "$(srcdir)" && git describe --abbrev=4 | cut -b2-`; \
+ test -n "$$SNAPSHOT" && VERSION=$$SNAPSHOT; \
+ fi; \
+ TAR_OPTIONS='--owner=0 --group=0 --numeric-owner --mode=u+rw,go+r-w' \
+ $(MAKE) VERSION="$$VERSION" dist-gzip
+
+# 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:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..d26b636
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,1798 @@
+
+XZ Utils Release Notes
+======================
+
+5.4.5 (2023-11-01)
+
+ * liblzma:
+
+ - Use __attribute__((__no_sanitize_address__)) to avoid address
+ sanitization with CRC64 CLMUL. It uses 16-byte-aligned reads
+ which can extend past the bounds of the input buffer and
+ inherently trigger address sanitization errors. This isn't
+ a bug.
+
+ - Fixed an assertion failure that could be triggered by a large
+ unpadded_size argument. It was verified that there was no
+ other bug than the assertion failure.
+
+ - Fixed a bug that prevented building with Windows Vista
+ threading when __attribute__((__constructor__)) is not
+ supported.
+
+ * xz now properly handles special files such as "con" or "nul" on
+ Windows. Before this fix, the following wrote "foo" to the
+ console and deleted the input file "con_xz":
+
+ echo foo | xz > con_xz
+ xz --suffix=_xz --decompress con_xz
+
+ * Build systems:
+
+ - Allow builds with Windows win95 threading and small mode when
+ __attribute__((__constructor__)) is supported.
+
+ - Added a new line to liblzma.pc for MSYS2 (Windows):
+
+ Cflags.private: -DLZMA_API_STATIC
+
+ When compiling code that will link against static liblzma,
+ the LZMA_API_STATIC macro needs to be defined on Windows.
+
+ - CMake specific changes:
+
+ * Fixed a bug that allowed CLOCK_MONOTONIC to be used even
+ if the check for it failed.
+
+ * Fixed a bug where configuring CMake multiple times
+ resulted in HAVE_CLOCK_GETTIME and HAVE_CLOCK_MONOTONIC
+ not being set.
+
+ * Fixed the build with MinGW-w64-based Clang/LLVM 17.
+ llvm-windres now has more accurate GNU windres emulation
+ so the GNU windres workaround from 5.4.1 is needed with
+ llvm-windres version 17 too.
+
+ * The import library on Windows is now properly named
+ "liblzma.dll.a" instead of "libliblzma.dll.a"
+
+ * Fixed a bug causing the Ninja Generator to fail on
+ UNIX-like systems. This bug was introduced in 5.4.0.
+
+ * Added a new option to disable CLMUL CRC64.
+
+ * A module-definition (.def) file is now created when
+ building liblzma.dll with MinGW-w64.
+
+ * The pkg-config liblzma.pc file is now installed on all
+ builds except when using MSVC on Windows.
+
+ * Added large file support by default for platforms that
+ need it to handle files larger than 2 GiB. This includes
+ MinGW-w64, even 64-bit builds.
+
+ * Small fixes and improvements to the tests.
+
+ * Updated translations: Chinese (simplified) and Esperanto.
+
+
+5.4.4 (2023-08-02)
+
+ * liblzma and xzdec can now build against WASI SDK when threading
+ support is disabled. xz and tests don't build yet.
+
+ * CMake:
+
+ - Fixed a bug preventing other projects from including liblzma
+ multiple times using find_package().
+
+ - Don't create broken symlinks in Cygwin and MSYS2 unless
+ supported by the environment. This prevented building for the
+ default MSYS2 environment. The problem was introduced in
+ xz 5.4.0.
+
+ * Documentation:
+
+ - Small improvements to man pages.
+
+ - Small improvements and typo fixes for liblzma API
+ documentation.
+
+ * Tests:
+
+ - Added a new section to INSTALL to describe basic test usage
+ and address recent questions about building the tests when
+ cross compiling.
+
+ - Small fixes and improvements to the tests.
+
+ * Translations:
+
+ - Fixed a mistake that caused one of the error messages to not
+ be translated. This only affected versions 5.4.2 and 5.4.3.
+
+ - Updated the Chinese (simplified), Croatian, Esperanto, German,
+ Korean, Polish, Romanian, Spanish, Swedish, Ukrainian, and
+ Vietnamese translations.
+
+ - Updated the German, Korean, Romanian, and Ukrainian man page
+ translations.
+
+
+5.4.3 (2023-05-04)
+
+ * All fixes from 5.2.12
+
+ * Features in the CMake build can now be disabled as CMake cache
+ variables, similar to the Autotools build.
+
+ * Minor update to the Croatian translation.
+
+
+5.4.2 (2023-03-18)
+
+ * All fixes from 5.2.11 that were not included in 5.4.1.
+
+ * If xz is built with support for the Capsicum sandbox but running
+ in an environment that doesn't support Capsicum, xz now runs
+ normally without sandboxing instead of exiting with an error.
+
+ * liblzma:
+
+ - Documentation was updated to improve the style, consistency,
+ and completeness of the liblzma API headers.
+
+ - The Doxygen-generated HTML documentation for the liblzma API
+ header files is now included in the source release and is
+ installed as part of "make install". All JavaScript is
+ removed to simplify license compliance and to reduce the
+ install size.
+
+ - Fixed a minor bug in lzma_str_from_filters() that produced
+ too many filters in the output string instead of reporting
+ an error if the input array had more than four filters. This
+ bug did not affect xz.
+
+ * Build systems:
+
+ - autogen.sh now invokes the doxygen tool via the new wrapper
+ script doxygen/update-doxygen, unless the command line option
+ --no-doxygen is used.
+
+ - Added microlzma_encoder.c and microlzma_decoder.c to the
+ VS project files for Windows and to the CMake build. These
+ should have been included in 5.3.2alpha.
+
+ * Tests:
+
+ - Added a test to the CMake build that was forgotten in the
+ previous release.
+
+ - Added and refactored a few tests.
+
+ * Translations:
+
+ - Updated the Brazilian Portuguese translation.
+
+ - Added Brazilian Portuguese man page translation.
+
+
+5.4.1 (2023-01-11)
+
+ * liblzma:
+
+ - Fixed the return value of lzma_microlzma_encoder() if the
+ LZMA options lc/lp/pb are invalid. Invalid lc/lp/pb options
+ made the function return LZMA_STREAM_END without encoding
+ anything instead of returning LZMA_OPTIONS_ERROR.
+
+ - Windows / Visual Studio: Workaround a possible compiler bug
+ when targeting 32-bit x86 and compiling the CLMUL version of
+ the CRC64 code. The CLMUL code isn't enabled by the Windows
+ project files but it is in the CMake-based builds.
+
+ * Build systems:
+
+ - Windows-specific CMake changes:
+
+ * Don't try to enable CLMUL CRC64 code if _mm_set_epi64x()
+ isn't available. This fixes CMake-based build with Visual
+ Studio 2013.
+
+ * Created a workaround for a build failure with windres
+ from GNU binutils. It is used only when the C compiler
+ is GCC (not Clang). The workaround is incompatible
+ with llvm-windres, resulting in "XZx20Utils" instead
+ of "XZ Utils" in the resource file, but without the
+ workaround llvm-windres works correctly. See the
+ comment in CMakeLists.txt for details.
+
+ * Included the resource files in the xz and xzdec build
+ rules. Building the command line tools is still
+ experimental but possible with MinGW-w64.
+
+ - Visual Studio: Added stream_decoder_mt.c to the project
+ files. Now the threaded decompressor lzma_stream_decoder_mt()
+ gets built. CMake-based build wasn't affected.
+
+ - Updated windows/INSTALL-MSVC.txt to mention that CMake-based
+ build is now the preferred method with Visual Studio. The
+ project files will probably be removed after 5.4.x releases.
+
+ - Changes to #defines in config.h:
+
+ * HAVE_DECL_CLOCK_MONOTONIC was replaced by
+ HAVE_CLOCK_MONOTONIC. The old macro was always defined
+ in configure-generated config.h to either 0 or 1. The
+ new macro is defined (to 1) only if the declaration of
+ CLOCK_MONOTONIC is available. This matches the way most
+ other config.h macros work and makes things simpler with
+ other build systems.
+
+ * HAVE_DECL_PROGRAM_INVOCATION_NAME was replaced by
+ HAVE_PROGRAM_INVOCATION_NAME for the same reason.
+
+ * Tests:
+
+ - Fixed test script compatibility with ancient /bin/sh
+ versions. Now the five test_compress_* tests should
+ no longer fail on Solaris 10.
+
+ - Added and refactored a few tests.
+
+ * Translations:
+
+ - Updated the Catalan and Esperanto translations.
+
+ - Added Korean and Ukrainian man page translations.
+
+
+5.4.0 (2022-12-13)
+
+ This bumps the minor version of liblzma because new features were
+ added. The API and ABI are still backward compatible with liblzma
+ 5.2.x and 5.0.x.
+
+ Since 5.3.5beta:
+
+ * All fixes from 5.2.10.
+
+ * The ARM64 filter is now stable. The xz option is now --arm64.
+ Decompression requires XZ Utils 5.4.0. In the future the ARM64
+ filter will be supported by XZ for Java, XZ Embedded (including
+ the version in Linux), LZMA SDK, and 7-Zip.
+
+ * Translations:
+
+ - Updated Catalan, Croatian, German, Romanian, and Turkish
+ translations.
+
+ - Updated German man page translations.
+
+ - Added Romanian man page translations.
+
+ Summary of new features added in the 5.3.x development releases:
+
+ * liblzma:
+
+ - Added threaded .xz decompressor lzma_stream_decoder_mt().
+ It can use multiple threads with .xz files that have multiple
+ Blocks with size information in Block Headers. The threaded
+ encoder in xz has always created such files.
+
+ Single-threaded encoder cannot store the size information in
+ Block Headers even if one used LZMA_FULL_FLUSH to create
+ multiple Blocks, so this threaded decoder cannot use multiple
+ threads with such files.
+
+ If there are multiple Streams (concatenated .xz files), one
+ Stream will be decompressed completely before starting the
+ next Stream.
+
+ - A new decoder flag LZMA_FAIL_FAST was added. It makes the
+ threaded decompressor report errors soon instead of first
+ flushing all pending data before the error location.
+
+ - New Filter IDs:
+ * LZMA_FILTER_ARM64 is for ARM64 binaries.
+ * LZMA_FILTER_LZMA1EXT is for raw LZMA1 streams that don't
+ necessarily use the end marker.
+
+ - Added lzma_str_to_filters(), lzma_str_from_filters(), and
+ lzma_str_list_filters() to convert a preset or a filter chain
+ string to a lzma_filter[] and vice versa. These should make
+ it easier to write applications that allow users to specify
+ custom compression options.
+
+ - Added lzma_filters_free() which can be convenient for freeing
+ the filter options in a filter chain (an array of lzma_filter
+ structures).
+
+ - lzma_file_info_decoder() to makes it a little easier to get
+ the Index field from .xz files. This helps in getting the
+ uncompressed file size but an easy-to-use random access
+ API is still missing which has existed in XZ for Java for
+ a long time.
+
+ - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
+ It is used by erofs-utils and may be used by others too.
+
+ The MicroLZMA format is a raw LZMA stream (without end marker)
+ whose first byte (always 0x00) has been replaced with
+ bitwise-negation of the LZMA properties (lc/lp/pb). It was
+ created for use in EROFS but may be used in other contexts
+ as well where it is important to avoid wasting bytes for
+ stream headers or footers. The format is also supported by
+ XZ Embedded (the XZ Embedded version in Linux got MicroLZMA
+ support in Linux 5.16).
+
+ The MicroLZMA encoder API in liblzma can compress into a
+ fixed-sized output buffer so that as much data is compressed
+ as can be fit into the buffer while still creating a valid
+ MicroLZMA stream. This is needed for EROFS.
+
+ - Added lzma_lzip_decoder() to decompress the .lz (lzip) file
+ format version 0 and the original unextended version 1 files.
+ Also lzma_auto_decoder() supports .lz files.
+
+ - lzma_filters_update() can now be used with the multi-threaded
+ encoder (lzma_stream_encoder_mt()) to change the filter chain
+ after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
+
+ - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
+ finders that require at least 3 or 4. Now it is internally
+ rounded up if needed.
+
+ - CLMUL-based CRC64 on x86-64 and E2K with runtime processor
+ detection. On 32-bit x86 it currently isn't available unless
+ --disable-assembler is used which can make the non-CLMUL
+ CRC64 slower; this might be fixed in the future.
+
+ - Building with --disable-threads --enable-small
+ is now thread-safe if the compiler supports
+ __attribute__((__constructor__)).
+
+ * xz:
+
+ - Using -T0 (--threads=0) will now use multi-threaded encoder
+ even on a single-core system. This is to ensure that output
+ from the same xz binary is identical on both single-core and
+ multi-core systems.
+
+ - --threads=+1 or -T+1 is now a way to put xz into
+ multi-threaded mode while using only one worker thread.
+ The + is ignored if the number is not 1.
+
+ - A default soft memory usage limit is now used for compression
+ when -T0 is used and no explicit limit has been specified.
+ This soft limit is used to restrict the number of threads
+ but if the limit is exceeded with even one thread then xz
+ will continue with one thread using the multi-threaded
+ encoder and this limit is ignored. If the number of threads
+ is specified manually then no default limit will be used;
+ this affects only -T0.
+
+ This change helps on systems that have very many cores and
+ using all of them for xz makes no sense. Previously xz -T0
+ could run out of memory on such systems because it attempted
+ to reserve memory for too many threads.
+
+ This also helps with 32-bit builds which don't have a large
+ amount of address space that would be required for many
+ threads. The default soft limit for -T0 is at most 1400 MiB
+ on all 32-bit platforms.
+
+ - Previously a low value in --memlimit-compress wouldn't cause
+ xz to switch from multi-threaded mode to single-threaded mode
+ if the limit cannot otherwise be met; xz failed instead. Now
+ xz can switch to single-threaded mode and then, if needed,
+ scale down the LZMA2 dictionary size too just like it already
+ did when it was started in single-threaded mode.
+
+ - The option --no-adjust no longer prevents xz from scaling down
+ the number of threads as that doesn't affect the compressed
+ output (only performance). Now --no-adjust only prevents
+ adjustments that affect compressed output, that is, with
+ --no-adjust xz won't switch from multi-threaded mode to
+ single-threaded mode and won't scale down the LZMA2
+ dictionary size.
+
+ - Added a new option --memlimit-mt-decompress=LIMIT. This is
+ used to limit the number of decompressor threads (possibly
+ falling back to single-threaded mode) but it will never make
+ xz refuse to decompress a file. This has a system-specific
+ default value because without any limit xz could end up
+ allocating memory for the whole compressed input file, the
+ whole uncompressed output file, multiple thread-specific
+ decompressor instances and so on. Basically xz could
+ attempt to use an insane amount of memory even with fairly
+ common files. The system-specific default value is currently
+ the same as the one used for compression with -T0.
+
+ The new option works together with the existing option
+ --memlimit-decompress=LIMIT. The old option sets a hard limit
+ that must not be exceeded (xz will refuse to decompress)
+ while the new option only restricts the number of threads.
+ If the limit set with --memlimit-mt-decompress is greater
+ than the limit set with --memlimit-compress, then the latter
+ value is used also for --memlimit-mt-decompress.
+
+ - Added new information to the output of xz --info-memory and
+ new fields to the output of xz --robot --info-memory.
+
+ - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
+ now that liblzma handles it.
+
+ - Don't mention endianness for ARM and ARM-Thumb filters in
+ --long-help. The filters only work for little endian
+ instruction encoding but modern ARM processors using
+ big endian data access still use little endian
+ instruction encoding. So the help text was misleading.
+ In contrast, the PowerPC filter is only for big endian
+ 32/64-bit PowerPC code. Little endian PowerPC would need
+ a separate filter.
+
+ - Added decompression support for the .lz (lzip) file format
+ version 0 and the original unextended version 1. It is
+ autodetected by default. See also the option --format on
+ the xz man page.
+
+ - Sandboxing enabled by default:
+ * Capsicum (FreeBSD)
+ * pledge(2) (OpenBSD)
+
+ * Scripts now support the .lz format using xz.
+
+ * A few new tests were added.
+
+ * The liblzma-specific tests are now supported in CMake-based
+ builds too ("make test").
+
+
+5.3.5beta (2022-12-01)
+
+ * All fixes from 5.2.9.
+
+ * liblzma:
+
+ - Added new LZMA_FILTER_LZMA1EXT for raw encoder and decoder to
+ handle raw LZMA1 streams that don't have end of payload marker
+ (EOPM) alias end of stream (EOS) marker. It can be used in
+ filter chains, for example, with the x86 BCJ filter.
+
+ - Added lzma_str_to_filters(), lzma_str_from_filters(), and
+ lzma_str_list_filters() to make it easier for applications
+ to get custom compression options from a user and convert
+ it to an array of lzma_filter structures.
+
+ - Added lzma_filters_free().
+
+ - lzma_filters_update() can now be used with the multi-threaded
+ encoder (lzma_stream_encoder_mt()) to change the filter chain
+ after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
+
+ - In lzma_options_lzma, allow nice_len = 2 and 3 with the match
+ finders that require at least 3 or 4. Now it is internally
+ rounded up if needed.
+
+ - ARM64 filter was modified. It is still experimental.
+
+ - Fixed LTO build with Clang if -fgnuc-version=10 or similar
+ was used to make Clang look like GCC >= 10. Now it uses
+ __has_attribute(__symver__) which should be reliable.
+
+ * xz:
+
+ - --threads=+1 or -T+1 is now a way to put xz into multi-threaded
+ mode while using only one worker thread.
+
+ - In --lzma2=nice=NUMBER allow 2 and 3 with all match finders
+ now that liblzma handles it.
+
+ * Updated translations: Chinese (simplified), Korean, and Turkish.
+
+
+5.3.4alpha (2022-11-15)
+
+ * All fixes from 5.2.7 and 5.2.8.
+
+ * liblzma:
+
+ - Minor improvements to the threaded decoder.
+
+ - Added CRC64 implementation that uses SSSE3, SSE4.1, and CLMUL
+ instructions on 32/64-bit x86 and E2K. On 32-bit x86 it's
+ not enabled unless --disable-assembler is used but then
+ the non-CLMUL code might be slower. Processor support is
+ detected at runtime so this is built by default on x86-64
+ and E2K. On these platforms, if compiler flags indicate
+ unconditional CLMUL support (-msse4.1 -mpclmul) then the
+ generic version is not built, making liblzma 8-9 KiB smaller
+ compared to having both versions included.
+
+ With extremely compressible files this can make decompression
+ up to twice as fast but with typical files 5 % improvement
+ is a more realistic expectation.
+
+ The CLMUL version is slower than the generic version with
+ tiny inputs (especially at 1-8 bytes per call, but up to
+ 16 bytes). In normal use in xz this doesn't matter at all.
+
+ - Added an experimental ARM64 filter. This is *not* the final
+ version! Files created with this experimental version won't
+ be supported in the future versions! The filter design is
+ a compromise where improving one use case makes some other
+ cases worse.
+
+ - Added decompression support for the .lz (lzip) file format
+ version 0 and the original unextended version 1. See the
+ API docs of lzma_lzip_decoder() for details. Also
+ lzma_auto_decoder() supports .lz files.
+
+ - Building with --disable-threads --enable-small
+ is now thread-safe if the compiler supports
+ __attribute__((__constructor__))
+
+ * xz:
+
+ - Added support for OpenBSD's pledge(2) as a sandboxing method.
+
+ - Don't mention endianness for ARM and ARM-Thumb filters in
+ --long-help. The filters only work for little endian
+ instruction encoding but modern ARM processors using
+ big endian data access still use little endian
+ instruction encoding. So the help text was misleading.
+ In contrast, the PowerPC filter is only for big endian
+ 32/64-bit PowerPC code. Little endian PowerPC would need
+ a separate filter.
+
+ - Added --experimental-arm64. This will be renamed once the
+ filter is finished. Files created with this experimental
+ filter will not be supported in the future!
+
+ - Added new fields to the output of xz --robot --info-memory.
+
+ - Added decompression support for the .lz (lzip) file format
+ version 0 and the original unextended version 1. It is
+ autodetected by default. See also the option --format on
+ the xz man page.
+
+ * Scripts now support the .lz format using xz.
+
+ * Build systems:
+
+ - New #defines in config.h: HAVE_ENCODER_ARM64,
+ HAVE_DECODER_ARM64, HAVE_LZIP_DECODER, HAVE_CPUID_H,
+ HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR, HAVE_USABLE_CLMUL
+
+ - New configure options: --disable-clmul-crc,
+ --disable-microlzma, --disable-lzip-decoder, and
+ 'pledge' is now an option in --enable-sandbox (but
+ it's autodetected by default anyway).
+
+ - INSTALL was updated to document the new configure options.
+
+ - PACKAGERS now lists also --disable-microlzma and
+ --disable-lzip-decoder as configure options that must
+ not be used in builds for non-embedded use.
+
+ * Tests:
+
+ - Fix some of the tests so that they skip instead of fail if
+ certain features have been disabled with configure options.
+ It's still not perfect.
+
+ - Other improvements to tests.
+
+ * Updated translations: Croatian, Finnish, Hungarian, Polish,
+ Romanian, Spanish, Swedish, and Ukrainian.
+
+
+5.3.3alpha (2022-08-22)
+
+ * All fixes from 5.2.6.
+
+ * liblzma:
+
+ - Fixed 32-bit build.
+
+ - Added threaded .xz decompressor lzma_stream_decoder_mt().
+ It can use multiple threads with .xz files that have multiple
+ Blocks with size information in Block Headers. The threaded
+ encoder in xz has always created such files.
+
+ Single-threaded encoder cannot store the size information in
+ Block Headers even if one used LZMA_FULL_FLUSH to create
+ multiple Blocks, so this threaded decoder cannot use multiple
+ threads with such files.
+
+ If there are multiple Streams (concatenated .xz files), one
+ Stream will be decompressed completely before starting the
+ next Stream.
+
+ - A new decoder flag LZMA_FAIL_FAST was added. It makes the
+ threaded decompressor report errors soon instead of first
+ flushing all pending data before the error location.
+
+ * xz:
+
+ - Using -T0 (--threads=0) will now use multi-threaded encoder
+ even on a single-core system. This is to ensure that output
+ from the same xz binary is identical on both single-core and
+ multi-core systems.
+
+ - A default soft memory usage limit is now used for compression
+ when -T0 is used and no explicit limit has been specified.
+ This soft limit is used to restrict the number of threads
+ but if the limit is exceeded with even one thread then xz
+ will continue with one thread using the multi-threaded
+ encoder and this limit is ignored. If the number of threads
+ is specified manually then no default limit will be used;
+ this affects only -T0.
+
+ This change helps on systems that have very many cores and
+ using all of them for xz makes no sense. Previously xz -T0
+ could run out of memory on such systems because it attempted
+ to reserve memory for too many threads.
+
+ This also helps with 32-bit builds which don't have a large
+ amount of address space that would be required for many
+ threads. The default limit is 1400 MiB on all 32-bit
+ platforms with -T0.
+
+ Now xz -T0 should just work. It might use too few threads
+ in some cases but at least it shouldn't easily run out of
+ memory. It's possible that this will be tweaked before 5.4.0.
+
+ - Changes to --memlimit-compress and --no-adjust:
+
+ In single-threaded mode, --memlimit-compress can make xz
+ scale down the LZMA2 dictionary size to meet the memory usage
+ limit. This obviously affects the compressed output. However,
+ if xz was in threaded mode, --memlimit-compress could make xz
+ reduce the number of threads but it wouldn't make xz switch
+ from multi-threaded mode to single-threaded mode or scale
+ down the LZMA2 dictionary size. This seemed illogical.
+
+ Now --memlimit-compress can make xz switch to single-threaded
+ mode if one thread in multi-threaded mode uses too much
+ memory. If memory usage is still too high, then the LZMA2
+ dictionary size can be scaled down too.
+
+ The option --no-adjust was also changed so that it no longer
+ prevents xz from scaling down the number of threads as that
+ doesn't affect compressed output (only performance). After
+ this commit --no-adjust only prevents adjustments that affect
+ compressed output, that is, with --no-adjust xz won't switch
+ from multithreaded mode to single-threaded mode and won't
+ scale down the LZMA2 dictionary size.
+
+ - Added a new option --memlimit-mt-decompress=LIMIT. This is
+ used to limit the number of decompressor threads (possibly
+ falling back to single-threaded mode) but it will never make
+ xz refuse to decompress a file. This has a system-specific
+ default value because without any limit xz could end up
+ allocating memory for the whole compressed input file, the
+ whole uncompressed output file, multiple thread-specific
+ decompressor instances and so on. Basically xz could
+ attempt to use an insane amount of memory even with fairly
+ common files.
+
+ The new option works together with the existing option
+ --memlimit-decompress=LIMIT. The old option sets a hard limit
+ that must not be exceeded (xz will refuse to decompress)
+ while the new option only restricts the number of threads.
+ If the limit set with --memlimit-mt-decompress is greater
+ than the limit set with --memlimit-compress, then the latter
+ value is used also for --memlimit-mt-decompress.
+
+ * Tests:
+
+ - Added a few more tests.
+
+ - Added tests/code_coverage.sh to create a code coverage report
+ of the tests.
+
+ * Build systems:
+
+ - Automake's parallel test harness is now used to make tests
+ finish faster.
+
+ - Added the CMake files to the distribution tarball. These were
+ supposed to be in 5.2.5 already.
+
+ - Added liblzma tests to the CMake build.
+
+ - Windows: Fix building of liblzma.dll with the included
+ Visual Studio project files.
+
+
+5.3.2alpha (2021-10-28)
+
+ This release was made on short notice so that recent erofs-utils can
+ be built with LZMA support without needing a snapshot from xz.git.
+ Thus many pending things were not included, not even updated
+ translations (which would need to be updated for the new --list
+ strings anyway).
+
+ * All fixes from 5.2.5.
+
+ * xz:
+
+ - When copying metadata from the source file to the destination
+ file, don't try to set the group (GID) if it is already set
+ correctly. This avoids a failure on OpenBSD (and possibly on
+ a few other OSes) where files may get created so that their
+ group doesn't belong to the user, and fchown(2) can fail even
+ if it needs to do nothing.
+
+ - The --keep option now accepts symlinks, hardlinks, and
+ setuid, setgid, and sticky files. Previously this required
+ using --force.
+
+ - Split the long strings used in --list and --info-memory modes
+ to make them much easier for translators.
+
+ - If built with sandbox support and enabling the sandbox fails,
+ xz will now immediately exit with exit status of 1. Previously
+ it would only display a warning if -vv was used.
+
+ - Cap --memlimit-compress to 2000 MiB on MIPS32 because on
+ MIPS32 userspace processes are limited to 2 GiB of address
+ space.
+
+ * liblzma:
+
+ - Added lzma_microlzma_encoder() and lzma_microlzma_decoder().
+ The API is in lzma/container.h.
+
+ The MicroLZMA format is a raw LZMA stream (without end marker)
+ whose first byte (always 0x00) has been replaced with
+ bitwise-negation of the LZMA properties (lc/lp/pb). It was
+ created for use in EROFS but may be used in other contexts
+ as well where it is important to avoid wasting bytes for
+ stream headers or footers. The format is also supported by
+ XZ Embedded.
+
+ The MicroLZMA encoder API in liblzma can compress into a
+ fixed-sized output buffer so that as much data is compressed
+ as can be fit into the buffer while still creating a valid
+ MicroLZMA stream. This is needed for EROFS.
+
+ - Added fuzzing support.
+
+ - Support Intel Control-flow Enforcement Technology (CET) in
+ 32-bit x86 assembly files.
+
+ - Visual Studio: Use non-standard _MSVC_LANG to detect C++
+ standard version in the lzma.h API header. It's used to
+ detect when "noexcept" can be used.
+
+ * Scripts:
+
+ - Fix exit status of xzdiff/xzcmp. Exit status could be 2 when
+ the correct value is 1.
+
+ - Fix exit status of xzgrep.
+
+ - Detect corrupt .bz2 files in xzgrep.
+
+ - Add zstd support to xzgrep and xzdiff/xzcmp.
+
+ - Fix less(1) version detection in xzless. It failed if the
+ version number from "less -V" contained a dot.
+
+ * Fix typos and technical issues in man pages.
+
+ * Build systems:
+
+ - Windows: Fix building of resource files when config.h isn't
+ used. CMake + Visual Studio can now build liblzma.dll.
+
+ - Various fixes to the CMake support. It might still need a few
+ more fixes even for liblzma-only builds.
+
+
+5.3.1alpha (2018-04-29)
+
+ * All fixes from 5.2.4.
+
+ * Add lzma_file_info_decoder() into liblzma and use it in xz to
+ implement the --list feature.
+
+ * Capsicum sandbox support is enabled by default where available
+ (FreeBSD >= 10).
+
+
+5.2.10 (2022-12-13)
+
+ * xz: Don't modify argv[] when parsing the --memlimit* and
+ --block-list command line options. This fixes confusing
+ arguments in process listing (like "ps auxf").
+
+ * GNU/Linux only: Use __has_attribute(__symver__) to detect if
+ that attribute is supported. This fixes build on Mandriva where
+ Clang is patched to define __GNUC__ to 11 by default (instead
+ of 4 as used by Clang upstream).
+
+
+5.2.9 (2022-11-30)
+
+ * liblzma:
+
+ - Fixed an infinite loop in LZMA encoder initialization
+ if dict_size >= 2 GiB. (The encoder only supports up
+ to 1536 MiB.)
+
+ - Fixed two cases of invalid free() that can happen if
+ a tiny allocation fails in encoder re-initialization
+ or in lzma_filters_update(). These bugs had some
+ similarities with the bug fixed in 5.2.7.
+
+ - Fixed lzma_block_encoder() not allowing the use of
+ LZMA_SYNC_FLUSH with lzma_code() even though it was
+ documented to be supported. The sync-flush code in
+ the Block encoder was already used internally via
+ lzma_stream_encoder(), so this was just a missing flag
+ in the lzma_block_encoder() API function.
+
+ - GNU/Linux only: Don't put symbol versions into static
+ liblzma as it breaks things in some cases (and even if
+ it didn't break anything, symbol versions in static
+ libraries are useless anyway). The downside of the fix
+ is that if the configure options --with-pic or --without-pic
+ are used then it's not possible to build both shared and
+ static liblzma at the same time on GNU/Linux anymore;
+ with those options --disable-static or --disable-shared
+ must be used too.
+
+ * New email address for bug reports is <xz@tukaani.org> which
+ forwards messages to Lasse Collin and Jia Tan.
+
+
+5.2.8 (2022-11-13)
+
+ * xz:
+
+ - If xz cannot remove an input file when it should, this
+ is now treated as a warning (exit status 2) instead of
+ an error (exit status 1). This matches GNU gzip and it
+ is more logical as at that point the output file has
+ already been successfully closed.
+
+ - Fix handling of .xz files with an unsupported check type.
+ Previously such printed a warning message but then xz
+ behaved as if an error had occurred (didn't decompress,
+ exit status 1). Now a warning is printed, decompression
+ is done anyway, and exit status is 2. This used to work
+ slightly before 5.0.0. In practice this bug matters only
+ if xz has been built with some check types disabled. As
+ instructed in PACKAGERS, such builds should be done in
+ special situations only.
+
+ - Fix "xz -dc --single-stream tests/files/good-0-empty.xz"
+ which failed with "Internal error (bug)". That is,
+ --single-stream was broken if the first .xz stream in
+ the input file didn't contain any uncompressed data.
+
+ - Fix displaying file sizes in the progress indicator when
+ working in passthru mode and there are multiple input files.
+ Just like "gzip -cdf", "xz -cdf" works like "cat" when the
+ input file isn't a supported compressed file format. In
+ this case the file size counters weren't reset between
+ files so with multiple input files the progress indicator
+ displayed an incorrect (too large) value.
+
+ * liblzma:
+
+ - API docs in lzma/container.h:
+ * Update the list of decoder flags in the decoder
+ function docs.
+ * Explain LZMA_CONCATENATED behavior with .lzma files
+ in lzma_auto_decoder() docs.
+
+ - OpenBSD: Use HW_NCPUONLINE to detect the number of
+ available hardware threads in lzma_physmem().
+
+ - Fix use of wrong macro to detect x86 SSE2 support.
+ __SSE2_MATH__ was used with GCC/Clang but the correct
+ one is __SSE2__. The first one means that SSE2 is used
+ for floating point math which is irrelevant here.
+ The affected SSE2 code isn't used on x86-64 so this affects
+ only 32-bit x86 builds that use -msse2 without -mfpmath=sse
+ (there is no runtime detection for SSE2). It improves LZMA
+ compression speed (not decompression).
+
+ - Fix the build with Intel C compiler 2021 (ICC, not ICX)
+ on Linux. It defines __GNUC__ to 10 but doesn't support
+ the __symver__ attribute introduced in GCC 10.
+
+ * Scripts: Ignore warnings from xz by using --quiet --no-warn.
+ This is needed if the input .xz files use an unsupported
+ check type.
+
+ * Translations:
+
+ - Updated Croatian and Turkish translations.
+
+ - One new translations wasn't included because it needed
+ technical fixes. It will be in upcoming 5.4.0. No new
+ translations will be added to the 5.2.x branch anymore.
+
+ - Renamed the French man page translation file from
+ fr_FR.po to fr.po and thus also its install directory
+ (like /usr/share/man/fr_FR -> .../fr).
+
+ - Man page translations for upcoming 5.4.0 are now handled
+ in the Translation Project.
+
+ * Update doc/faq.txt a little so it's less out-of-date.
+
+
+5.2.7 (2022-09-30)
+
+ * liblzma:
+
+ - Made lzma_filters_copy() to never modify the destination
+ array if an error occurs. lzma_stream_encoder() and
+ lzma_stream_encoder_mt() already assumed this. Before this
+ change, if a tiny memory allocation in lzma_filters_copy()
+ failed it would lead to a crash (invalid free() or invalid
+ memory reads) in the cleanup paths of these two encoder
+ initialization functions.
+
+ - Added missing integer overflow check to lzma_index_append().
+ This affects xz --list and other applications that decode
+ the Index field from .xz files using lzma_index_decoder().
+ Normal decompression of .xz files doesn't call this code
+ and thus most applications using liblzma aren't affected
+ by this bug.
+
+ - Single-threaded .xz decoder (lzma_stream_decoder()): If
+ lzma_code() returns LZMA_MEMLIMIT_ERROR it is now possible
+ to use lzma_memlimit_set() to increase the limit and continue
+ decoding. This was supposed to work from the beginning
+ but there was a bug. With other decoders (.lzma or
+ threaded .xz decoder) this already worked correctly.
+
+ - Fixed accumulation of integrity check type statistics in
+ lzma_index_cat(). This bug made lzma_index_checks() return
+ only the type of the integrity check of the last Stream
+ when multiple lzma_indexes were concatenated. Most
+ applications don't use these APIs but in xz it made
+ xz --list not list all check types from concatenated .xz
+ files. In xz --list --verbose only the per-file "Check:"
+ lines were affected and in xz --robot --list only the "file"
+ line was affected.
+
+ - Added ABI compatibility with executables that were linked
+ against liblzma in RHEL/CentOS 7 or other liblzma builds
+ that had copied the problematic patch from RHEL/CentOS 7
+ (xz-5.2.2-compat-libs.patch). For the details, see the
+ comment at the top of src/liblzma/validate_map.sh.
+
+ WARNING: This uses __symver__ attribute with GCC >= 10.
+ In other cases the traditional __asm__(".symver ...")
+ is used. Using link-time optimization (LTO, -flto) with
+ GCC versions older than 10 can silently result in
+ broken liblzma.so.5 (incorrect symbol versions)! If you
+ want to use -flto with GCC, you must use GCC >= 10.
+ LTO with Clang seems to work even with the traditional
+ __asm__(".symver ...") method.
+
+ * xzgrep: Fixed compatibility with old shells that break if
+ comments inside command substitutions have apostrophes (').
+ This problem was introduced in 5.2.6.
+
+ * Build systems:
+
+ - New #define in config.h: HAVE_SYMBOL_VERSIONS_LINUX
+
+ - Windows: Fixed liblzma.dll build with Visual Studio project
+ files. It broke in 5.2.6 due to a change that was made to
+ improve CMake support.
+
+ - Windows: Building liblzma with UNICODE defined should now
+ work.
+
+ - CMake files are now actually included in the release tarball.
+ They should have been in 5.2.5 already.
+
+ - Minor CMake fixes and improvements.
+
+ * Added a new translation: Turkish
+
+
+5.2.6 (2022-08-12)
+
+ * xz:
+
+ - The --keep option now accepts symlinks, hardlinks, and
+ setuid, setgid, and sticky files. Previously this required
+ using --force.
+
+ - When copying metadata from the source file to the destination
+ file, don't try to set the group (GID) if it is already set
+ correctly. This avoids a failure on OpenBSD (and possibly on
+ a few other OSes) where files may get created so that their
+ group doesn't belong to the user, and fchown(2) can fail even
+ if it needs to do nothing.
+
+ - Cap --memlimit-compress to 2000 MiB instead of 4020 MiB on
+ MIPS32 because on MIPS32 userspace processes are limited
+ to 2 GiB of address space.
+
+ * liblzma:
+
+ - Fixed a missing error-check in the threaded encoder. If a
+ small memory allocation fails, a .xz file with an invalid
+ Index field would be created. Decompressing such a file would
+ produce the correct output but result in an error at the end.
+ Thus this is a "mild" data corruption bug. Note that while
+ a failed memory allocation can trigger the bug, it cannot
+ cause invalid memory access.
+
+ - The decoder for .lzma files now supports files that have
+ uncompressed size stored in the header and still use the
+ end of payload marker (end of stream marker) at the end
+ of the LZMA stream. Such files are rare but, according to
+ the documentation in LZMA SDK, they are valid.
+ doc/lzma-file-format.txt was updated too.
+
+ - Improved 32-bit x86 assembly files:
+ * Support Intel Control-flow Enforcement Technology (CET)
+ * Use non-executable stack on FreeBSD.
+
+ - Visual Studio: Use non-standard _MSVC_LANG to detect C++
+ standard version in the lzma.h API header. It's used to
+ detect when "noexcept" can be used.
+
+ * xzgrep:
+
+ - Fixed arbitrary command injection via a malicious filename
+ (CVE-2022-1271, ZDI-CAN-16587). A standalone patch for
+ this was released to the public on 2022-04-07. A slight
+ robustness improvement has been made since then and, if
+ using GNU or *BSD grep, a new faster method is now used
+ that doesn't use the old sed-based construct at all. This
+ also fixes bad output with GNU grep >= 3.5 (2020-09-27)
+ when xzgrepping binary files.
+
+ This vulnerability was discovered by:
+ cleemy desu wayo working with Trend Micro Zero Day Initiative
+
+ - Fixed detection of corrupt .bz2 files.
+
+ - Improved error handling to fix exit status in some situations
+ and to fix handling of signals: in some situations a signal
+ didn't make xzgrep exit when it clearly should have. It's
+ possible that the signal handling still isn't quite perfect
+ but hopefully it's good enough.
+
+ - Documented exit statuses on the man page.
+
+ - xzegrep and xzfgrep now use "grep -E" and "grep -F" instead
+ of the deprecated egrep and fgrep commands.
+
+ - Fixed parsing of the options -E, -F, -G, -P, and -X. The
+ problem occurred when multiple options were specified in
+ a single argument, for example,
+
+ echo foo | xzgrep -Fe foo
+
+ treated foo as a filename because -Fe wasn't correctly
+ split into -F -e.
+
+ - Added zstd support.
+
+ * xzdiff/xzcmp:
+
+ - Fixed wrong exit status. Exit status could be 2 when the
+ correct value is 1.
+
+ - Documented on the man page that exit status of 2 is used
+ for decompression errors.
+
+ - Added zstd support.
+
+ * xzless:
+
+ - Fix less(1) version detection. It failed if the version number
+ from "less -V" contained a dot.
+
+ * Translations:
+
+ - Added new translations: Catalan, Croatian, Esperanto,
+ Korean, Portuguese, Romanian, Serbian, Spanish, Swedish,
+ and Ukrainian
+
+ - Updated the Brazilian Portuguese translation.
+
+ - Added French man page translation. This and the existing
+ German translation aren't complete anymore because the
+ English man pages got a few updates and the translators
+ weren't reached so that they could update their work.
+
+ * Build systems:
+
+ - Windows: Fix building of resource files when config.h isn't
+ used. CMake + Visual Studio can now build liblzma.dll.
+
+ - Various fixes to the CMake support. Building static or shared
+ liblzma should work fine in most cases. In contrast, building
+ the command line tools with CMake is still clearly incomplete
+ and experimental and should be used for testing only.
+
+
+5.2.5 (2020-03-17)
+
+ * liblzma:
+
+ - Fixed several C99/C11 conformance bugs. Now the code is clean
+ under gcc/clang -fsanitize=undefined. Some of these changes
+ might have a negative effect on performance with old GCC
+ versions or compilers other than GCC and Clang. The configure
+ option --enable-unsafe-type-punning can be used to (mostly)
+ restore the old behavior but it shouldn't normally be used.
+
+ - Improved API documentation of lzma_properties_decode().
+
+ - Added a very minor encoder speed optimization.
+
+ * xz:
+
+ - Fixed a crash in "xz -dcfv not_an_xz_file". All four options
+ were required to trigger it. The crash occurred in the
+ progress indicator code when xz was in passthru mode where
+ xz works like "cat".
+
+ - Fixed an integer overflow with 32-bit off_t. It could happen
+ when decompressing a file that has a long run of zero bytes
+ which xz would try to write as a sparse file. Since the build
+ system enables large file support by default, off_t is
+ normally 64-bit even on 32-bit systems.
+
+ - Fixes for --flush-timeout:
+ * Fix semi-busy-waiting.
+ * Avoid unneeded flushes when no new input has arrived
+ since the previous flush was completed.
+
+ - Added a special case for 32-bit xz: If --memlimit-compress is
+ used to specify a limit that exceeds 4020 MiB, the limit will
+ be set to 4020 MiB. The values "0" and "max" aren't affected
+ by this and neither is decompression. This hack can be
+ helpful when a 32-bit xz has access to 4 GiB address space
+ but the specified memlimit exceeds 4 GiB. This can happen
+ e.g. with some scripts.
+
+ - Capsicum sandbox is now enabled by default where available
+ (FreeBSD >= 10). The sandbox debug messages (xz -vv) were
+ removed since they seemed to be more annoying than useful.
+
+ - DOS build now requires DJGPP 2.05 instead of 2.04beta.
+ A workaround for a locale problem with DJGPP 2.05 was added.
+
+ * xzgrep and other scripts:
+
+ - Added a configure option --enable-path-for-scripts=PREFIX.
+ It is disabled by default except on Solaris where the default
+ is /usr/xpg4/bin. See INSTALL for details.
+
+ - Added a workaround for a POSIX shell detection problem on
+ Solaris.
+
+ * Build systems:
+
+ - Added preliminary build instructions for z/OS. See INSTALL
+ section 1.2.9.
+
+ - Experimental CMake support was added. It should work to build
+ static liblzma on a few operating systems. It may or may not
+ work to build shared liblzma. On some platforms it can build
+ xz and xzdec too but those are only for testing. See the
+ comment in the beginning of CMakeLists.txt for details.
+
+ - Visual Studio project files were updated.
+ WindowsTargetPlatformVersion was removed from VS2017 files
+ and set to "10.0" in the added VS2019 files. In the future
+ the VS project files will be removed when CMake support is
+ good enough.
+
+ - New #defines in config.h: HAVE___BUILTIN_ASSUME_ALIGNED,
+ HAVE___BUILTIN_BSWAPXX, and TUKLIB_USE_UNSAFE_TYPE_PUNNING.
+
+ - autogen.sh has a new optional dependency on po4a and a new
+ option --no-po4a to skip that step. This matters only if one
+ wants to remake the build files. po4a is used to update the
+ translated man pages but as long as the man pages haven't
+ been modified, there's nothing to update and one can use
+ --no-po4a to avoid the dependency on po4a.
+
+ * Translations:
+
+ - XZ Utils translations are now handled by the Translation
+ Project: https://translationproject.org/domain/xz.html
+
+ - All man pages are now included in German too.
+
+ - New xz translations: Brazilian Portuguese, Finnish,
+ Hungarian, Chinese (simplified), Chinese (traditional),
+ and Danish (partial translation)
+
+ - Updated xz translations: French, German, Italian, and Polish
+
+ - Unfortunately a few new xz translations weren't included due
+ to technical problems like too long lines in --help output or
+ misaligned column headings in tables. In the future, many of
+ these strings will be split and e.g. the table column
+ alignment will be handled in software. This should make the
+ strings easier to translate.
+
+
+5.2.4 (2018-04-29)
+
+ * liblzma:
+
+ - Allow 0 as memory usage limit instead of returning
+ LZMA_PROG_ERROR. Now 0 is treated as if 1 byte was specified,
+ which effectively is the same as 0.
+
+ - Use "noexcept" keyword instead of "throw()" in the public
+ headers when a C++11 (or newer standard) compiler is used.
+
+ - Added a portability fix for recent Intel C Compilers.
+
+ - Microsoft Visual Studio build files have been moved under
+ windows/vs2013 and windows/vs2017.
+
+ * xz:
+
+ - Fix "xz --list --robot missing_or_bad_file.xz" which would
+ try to print an uninitialized string and thus produce garbage
+ output. Since the exit status is non-zero, most uses of such
+ a command won't try to interpret the garbage output.
+
+ - "xz --list foo.xz" could print "Internal error (bug)" in a
+ corner case where a specific memory usage limit had been set.
+
+
+5.2.3 (2016-12-30)
+
+ * xz:
+
+ - Always close a file before trying to delete it to avoid
+ problems on some operating system and file system combinations.
+
+ - Fixed copying of file timestamps on Windows.
+
+ - Added experimental (disabled by default) sandbox support using
+ Capsicum (FreeBSD >= 10). See --enable-sandbox in INSTALL.
+
+ * C99/C11 conformance fixes to liblzma. The issues affected at least
+ some builds using link-time optimizations.
+
+ * Fixed bugs in the rarely-used function lzma_index_dup().
+
+ * Use of external SHA-256 code is now disabled by default.
+ It can still be enabled by passing --enable-external-sha256
+ to configure. The reasons to disable it by default (see INSTALL
+ for more details):
+
+ - Some OS-specific SHA-256 implementations conflict with
+ OpenSSL and cause problems in programs that link against both
+ liblzma and libcrypto. At least FreeBSD 10 and MINIX 3.3.0
+ are affected.
+
+ - The internal SHA-256 is faster than the SHA-256 code in
+ some operating systems.
+
+ * Changed CPU core count detection to use sched_getaffinity() on
+ GNU/Linux and GNU/kFreeBSD.
+
+ * Fixes to the build-system and xz to make xz buildable even when
+ encoders, decoders, or threading have been disabled from libilzma
+ using configure options. These fixes added two new #defines to
+ config.h: HAVE_ENCODERS and HAVE_DECODERS.
+
+
+5.2.2 (2015-09-29)
+
+ * Fixed bugs in QNX-specific code.
+
+ * Omitted the use of pipe2() even if it is available to avoid
+ portability issues with some old Linux and glibc combinations.
+
+ * Updated German translation.
+
+ * Added project files to build static and shared liblzma (not the
+ whole XZ Utils) with Visual Studio 2013 update 2 or later.
+
+ * Documented that threaded decompression hasn't been implemented
+ yet. A 5.2.0 NEWS entry describing multi-threading support had
+ incorrectly said "decompression" when it should have said
+ "compression".
+
+
+5.2.1 (2015-02-26)
+
+ * Fixed a compression-ratio regression in fast mode of LZMA1 and
+ LZMA2. The bug is present in 5.1.4beta and 5.2.0 releases.
+
+ * Fixed a portability problem in xz that affected at least OpenBSD.
+
+ * Fixed xzdiff to be compatible with FreeBSD's mktemp which differs
+ from most other mktemp implementations.
+
+ * Changed CPU core count detection to use cpuset_getaffinity() on
+ FreeBSD.
+
+
+5.2.0 (2014-12-21)
+
+ Since 5.1.4beta:
+
+ * All fixes from 5.0.8
+
+ * liblzma: Fixed lzma_stream_encoder_mt_memusage() when a preset
+ was used.
+
+ * xzdiff: If mktemp isn't installed, mkdir will be used as
+ a fallback to create a temporary directory. Installing mktemp
+ is still recommended.
+
+ * Updated French, German, Italian, Polish, and Vietnamese
+ translations.
+
+ Summary of fixes and new features added in the 5.1.x development
+ releases:
+
+ * liblzma:
+
+ - Added support for multi-threaded compression. See the
+ lzma_mt structure, lzma_stream_encoder_mt(), and
+ lzma_stream_encoder_mt_memusage() in <lzma/container.h>,
+ lzma_get_progress() in <lzma/base.h>, and lzma_cputhreads()
+ in <lzma/hardware.h> for details.
+
+ - Made the uses of lzma_allocator const correct.
+
+ - Added lzma_block_uncomp_encode() to create uncompressed
+ .xz Blocks using LZMA2 uncompressed chunks.
+
+ - Added support for LZMA_IGNORE_CHECK.
+
+ - A few speed optimizations were made.
+
+ - Added support for symbol versioning. It is enabled by default
+ on GNU/Linux, other GNU-based systems, and FreeBSD.
+
+ - liblzma (not the whole XZ Utils) should now be buildable
+ with MSVC 2013 update 2 or later using windows/config.h.
+
+ * xz:
+
+ - Fixed a race condition in the signal handling. It was
+ possible that e.g. the first SIGINT didn't make xz exit
+ if reading or writing blocked and one had bad luck. The fix
+ is non-trivial, so as of writing it is unknown if it will be
+ backported to the v5.0 branch.
+
+ - Multi-threaded compression can be enabled with the
+ --threads (-T) option.
+ [Fixed: This originally said "decompression".]
+
+ - New command line options in xz: --single-stream,
+ --block-size=SIZE, --block-list=SIZES,
+ --flush-timeout=TIMEOUT, and --ignore-check.
+
+ - xz -lvv now shows the minimum xz version that is required to
+ decompress the file. Currently it is 5.0.0 for all supported
+ .xz files except files with empty LZMA2 streams require 5.0.2.
+
+ * xzdiff and xzgrep now support .lzo files if lzop is installed.
+ The .tzo suffix is also recognized as a shorthand for .tar.lzo.
+
+
+5.1.4beta (2014-09-14)
+
+ * All fixes from 5.0.6
+
+ * liblzma: Fixed the use of presets in threaded encoder
+ initialization.
+
+ * xz --block-list and --block-size can now be used together
+ in single-threaded mode. Previously the combination only
+ worked in multi-threaded mode.
+
+ * Added support for LZMA_IGNORE_CHECK to liblzma and made it
+ available in xz as --ignore-check.
+
+ * liblzma speed optimizations:
+
+ - Initialization of a new LZMA1 or LZMA2 encoder has been
+ optimized. (The speed of reinitializing an already-allocated
+ encoder isn't affected.) This helps when compressing many
+ small buffers with lzma_stream_buffer_encode() and other
+ similar situations where an already-allocated encoder state
+ isn't reused. This speed-up is visible in xz too if one
+ compresses many small files one at a time instead running xz
+ once and giving all files as command-line arguments.
+
+ - Buffer comparisons are now much faster when unaligned access
+ is allowed (configured with --enable-unaligned-access). This
+ speeds up encoding significantly. There is arch-specific code
+ for 32-bit and 64-bit x86 (32-bit needs SSE2 for the best
+ results and there's no run-time CPU detection for now).
+ For other archs there is only generic code which probably
+ isn't as optimal as arch-specific solutions could be.
+
+ - A few speed optimizations were made to the SHA-256 code.
+ (Note that the builtin SHA-256 code isn't used on all
+ operating systems.)
+
+ * liblzma can now be built with MSVC 2013 update 2 or later
+ using windows/config.h.
+
+ * Vietnamese translation was added.
+
+
+5.1.3alpha (2013-10-26)
+
+ * All fixes from 5.0.5
+
+ * liblzma:
+
+ - Fixed a deadlock in the threaded encoder.
+
+ - Made the uses of lzma_allocator const correct.
+
+ - Added lzma_block_uncomp_encode() to create uncompressed
+ .xz Blocks using LZMA2 uncompressed chunks.
+
+ - Added support for native threads on Windows and the ability
+ to detect the number of CPU cores.
+
+ * xz:
+
+ - Fixed a race condition in the signal handling. It was
+ possible that e.g. the first SIGINT didn't make xz exit
+ if reading or writing blocked and one had bad luck. The fix
+ is non-trivial, so as of writing it is unknown if it will be
+ backported to the v5.0 branch.
+
+ - Made the progress indicator work correctly in threaded mode.
+
+ - Threaded encoder now works together with --block-list=SIZES.
+
+ - Added preliminary support for --flush-timeout=TIMEOUT.
+ It can be useful for (somewhat) real-time streaming. For
+ now the decompression side has to be done with something
+ else than the xz tool due to how xz does buffering, but this
+ should be fixed.
+
+
+5.1.2alpha (2012-07-04)
+
+ * All fixes from 5.0.3 and 5.0.4
+
+ * liblzma:
+
+ - Fixed a deadlock and an invalid free() in the threaded encoder.
+
+ - Added support for symbol versioning. It is enabled by default
+ on GNU/Linux, other GNU-based systems, and FreeBSD.
+
+ - Use SHA-256 implementation from the operating system if one is
+ available in libc, libmd, or libutil. liblzma won't use e.g.
+ OpenSSL or libgcrypt to avoid introducing new dependencies.
+
+ - Fixed liblzma.pc for static linking.
+
+ - Fixed a few portability bugs.
+
+ * xz --decompress --single-stream now fixes the input position after
+ successful decompression. Now the following works:
+
+ echo foo | xz > foo.xz
+ echo bar | xz >> foo.xz
+ ( xz -dc --single-stream ; xz -dc --single-stream ) < foo.xz
+
+ Note that it doesn't work if the input is not seekable
+ or if there is Stream Padding between the concatenated
+ .xz Streams.
+
+ * xz -lvv now shows the minimum xz version that is required to
+ decompress the file. Currently it is 5.0.0 for all supported .xz
+ files except files with empty LZMA2 streams require 5.0.2.
+
+ * Added an *incomplete* implementation of --block-list=SIZES to xz.
+ It only works correctly in single-threaded mode and when
+ --block-size isn't used at the same time. --block-list allows
+ specifying the sizes of Blocks which can be useful e.g. when
+ creating files for random-access reading.
+
+
+5.1.1alpha (2011-04-12)
+
+ * All fixes from 5.0.2
+
+ * liblzma fixes that will also be included in 5.0.3:
+
+ - A memory leak was fixed.
+
+ - lzma_stream_buffer_encode() no longer creates an empty .xz
+ Block if encoding an empty buffer. Such an empty Block with
+ LZMA2 data would trigger a bug in 5.0.1 and older (see the
+ first bullet point in 5.0.2 notes). When releasing 5.0.2,
+ I thought that no encoder creates this kind of files but
+ I was wrong.
+
+ - Validate function arguments better in a few functions. Most
+ importantly, specifying an unsupported integrity check to
+ lzma_stream_buffer_encode() no longer creates a corrupt .xz
+ file. Probably no application tries to do that, so this
+ shouldn't be a big problem in practice.
+
+ - Document that lzma_block_buffer_encode(),
+ lzma_easy_buffer_encode(), lzma_stream_encoder(), and
+ lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
+
+ - The return values of the _memusage() functions are now
+ documented better.
+
+ * Support for multithreaded compression was added using the simplest
+ method, which splits the input data into blocks and compresses
+ them independently. Other methods will be added in the future.
+ The current method has room for improvement, e.g. it is possible
+ to reduce the memory usage.
+
+ * Added the options --single-stream and --block-size=SIZE to xz.
+
+ * xzdiff and xzgrep now support .lzo files if lzop is installed.
+ The .tzo suffix is also recognized as a shorthand for .tar.lzo.
+
+ * Support for short 8.3 filenames under DOS was added to xz. It is
+ experimental and may change before it gets into a stable release.
+
+
+5.0.8 (2014-12-21)
+
+ * Fixed an old bug in xzgrep that affected OpenBSD and probably
+ a few other operating systems too.
+
+ * Updated French and German translations.
+
+ * Added support for detecting the amount of RAM on AmigaOS/AROS.
+
+ * Minor build system updates.
+
+
+5.0.7 (2014-09-20)
+
+ * Fix regressions introduced in 5.0.6:
+
+ - Fix building with non-GNU make.
+
+ - Fix invalid Libs.private value in liblzma.pc which broke
+ static linking against liblzma if the linker flags were
+ taken from pkg-config.
+
+
+5.0.6 (2014-09-14)
+
+ * xzgrep now exits with status 0 if at least one file matched.
+
+ * A few minor portability and build system fixes
+
+
+5.0.5 (2013-06-30)
+
+ * lzmadec and liblzma's lzma_alone_decoder(): Support decompressing
+ .lzma files that have less common settings in the headers
+ (dictionary size other than 2^n or 2^n + 2^(n-1), or uncompressed
+ size greater than 256 GiB). The limitations existed to avoid false
+ positives when detecting .lzma files. The lc + lp <= 4 limitation
+ still remains since liblzma's LZMA decoder has that limitation.
+
+ NOTE: xz's .lzma support or liblzma's lzma_auto_decoder() are NOT
+ affected by this change. They still consider uncommon .lzma headers
+ as not being in the .lzma format. Changing this would give way too
+ many false positives.
+
+ * xz:
+
+ - Interaction of preset and custom filter chain options was
+ made less illogical. This affects only certain less typical
+ uses cases so few people are expected to notice this change.
+
+ Now when a custom filter chain option (e.g. --lzma2) is
+ specified, all preset options (-0 ... -9, -e) earlier are on
+ the command line are completely forgotten. Similarly, when
+ a preset option is specified, all custom filter chain options
+ earlier on the command line are completely forgotten.
+
+ Example 1: "xz -9 --lzma2=preset=5 -e" is equivalent to "xz -e"
+ which is equivalent to "xz -6e". Earlier -e didn't put xz back
+ into preset mode and thus the example command was equivalent
+ to "xz --lzma2=preset=5".
+
+ Example 2: "xz -9e --lzma2=preset=5 -7" is equivalent to
+ "xz -7". Earlier a custom filter chain option didn't make
+ xz forget the -e option so the example was equivalent to
+ "xz -7e".
+
+ - Fixes and improvements to error handling.
+
+ - Various fixes to the man page.
+
+ * xzless: Fixed to work with "less" versions 448 and later.
+
+ * xzgrep: Made -h an alias for --no-filename.
+
+ * Include the previously missing debug/translation.bash which can
+ be useful for translators.
+
+ * Include a build script for Mac OS X. This has been in the Git
+ repository since 2010 but due to a mistake in Makefile.am the
+ script hasn't been included in a release tarball before.
+
+
+5.0.4 (2012-06-22)
+
+ * liblzma:
+
+ - Fix lzma_index_init(). It could crash if memory allocation
+ failed.
+
+ - Fix the possibility of an incorrect LZMA_BUF_ERROR when a BCJ
+ filter is used and the application only provides exactly as
+ much output space as is the uncompressed size of the file.
+
+ - Fix a bug in doc/examples_old/xz_pipe_decompress.c. It didn't
+ check if the last call to lzma_code() really returned
+ LZMA_STREAM_END, which made the program think that truncated
+ files are valid.
+
+ - New example programs in doc/examples (old programs are now in
+ doc/examples_old). These have more comments and more detailed
+ error handling.
+
+ * Fix "xz -lvv foo.xz". It could crash on some corrupted files.
+
+ * Fix output of "xz --robot -lv" and "xz --robot -lvv" which
+ incorrectly printed the filename also in the "foo (x/x)" format.
+
+ * Fix exit status of "xzdiff foo.xz bar.xz".
+
+ * Fix exit status of "xzgrep foo binary_file".
+
+ * Fix portability to EBCDIC systems.
+
+ * Fix a configure issue on AIX with the XL C compiler. See INSTALL
+ for details.
+
+ * Update French, German, Italian, and Polish translations.
+
+
+5.0.3 (2011-05-21)
+
+ * liblzma fixes:
+
+ - A memory leak was fixed.
+
+ - lzma_stream_buffer_encode() no longer creates an empty .xz
+ Block if encoding an empty buffer. Such an empty Block with
+ LZMA2 data would trigger a bug in 5.0.1 and older (see the
+ first bullet point in 5.0.2 notes). When releasing 5.0.2,
+ I thought that no encoder creates this kind of files but
+ I was wrong.
+
+ - Validate function arguments better in a few functions. Most
+ importantly, specifying an unsupported integrity check to
+ lzma_stream_buffer_encode() no longer creates a corrupt .xz
+ file. Probably no application tries to do that, so this
+ shouldn't be a big problem in practice.
+
+ - Document that lzma_block_buffer_encode(),
+ lzma_easy_buffer_encode(), lzma_stream_encoder(), and
+ lzma_stream_buffer_encode() may return LZMA_UNSUPPORTED_CHECK.
+
+ - The return values of the _memusage() functions are now
+ documented better.
+
+ * Fix command name detection in xzgrep. xzegrep and xzfgrep now
+ correctly use egrep and fgrep instead of grep.
+
+ * French translation was added.
+
+
+5.0.2 (2011-04-01)
+
+ * LZMA2 decompressor now correctly accepts LZMA2 streams with no
+ uncompressed data. Previously it considered them corrupt. The
+ bug can affect applications that use raw LZMA2 streams. It is
+ very unlikely to affect .xz files because no compressor creates
+ .xz files with empty LZMA2 streams. (Empty .xz files are a
+ different thing than empty LZMA2 streams.)
+
+ * "xz --suffix=.foo filename.foo" now refuses to compress the
+ file due to it already having the suffix .foo. It was already
+ documented on the man page, but the code lacked the test.
+
+ * "xzgrep -l foo bar.xz" works now.
+
+ * Polish translation was added.
+
+
+5.0.1 (2011-01-29)
+
+ * xz --force now (de)compresses files that have setuid, setgid,
+ or sticky bit set and files that have multiple hard links.
+ The man page had it documented this way already, but the code
+ had a bug.
+
+ * gzip and bzip2 support in xzdiff was fixed.
+
+ * Portability fixes
+
+ * Minor fix to Czech translation
+
+
+5.0.0 (2010-10-23)
+
+ Only the most important changes compared to 4.999.9beta are listed
+ here. One change is especially important:
+
+ * The memory usage limit is now disabled by default. Some scripts
+ written before this change may have used --memory=max on xz command
+ line or in XZ_OPT. THESE USES OF --memory=max SHOULD BE REMOVED
+ NOW, because they interfere with user's ability to set the memory
+ usage limit himself. If user-specified limit causes problems to
+ your script, blame the user.
+
+ Other significant changes:
+
+ * Added support for XZ_DEFAULTS environment variable. This variable
+ allows users to set default options for xz, e.g. default memory
+ usage limit or default compression level. Scripts that use xz
+ must never set or unset XZ_DEFAULTS. Scripts should use XZ_OPT
+ instead if they need a way to pass options to xz via an
+ environment variable.
+
+ * The compression settings associated with the preset levels
+ -0 ... -9 have been changed. --extreme was changed a little too.
+ It is now less likely to make compression worse, but with some
+ files the new --extreme may compress slightly worse than the old
+ --extreme.
+
+ * If a preset level (-0 ... -9) is specified after a custom filter
+ chain options have been used (e.g. --lzma2), the custom filter
+ chain will be forgotten. Earlier the preset options were
+ completely ignored after custom filter chain options had been
+ seen.
+
+ * xz will create sparse files when decompressing if the uncompressed
+ data contains long sequences of binary zeros. This is done even
+ when writing to standard output that is connected to a regular
+ file and certain additional conditions are met to make it safe.
+
+ * Support for "xz --list" was added. Combine with --verbose or
+ --verbose --verbose (-vv) for detailed output.
+
+ * I had hoped that liblzma API would have been stable after
+ 4.999.9beta, but there have been a couple of changes in the
+ advanced features, which don't affect most applications:
+
+ - Index handling code was revised. If you were using the old
+ API, you will get a compiler error (so it's easy to notice).
+
+ - A subtle but important change was made to the Block handling
+ API. lzma_block.version has to be initialized even for
+ lzma_block_header_decode(). Code that doesn't do it will work
+ for now, but might break in the future, which makes this API
+ change easy to miss.
+
+ * The major soname has been bumped to 5.0.0. liblzma API and ABI
+ are now stable, so the need to recompile programs linking against
+ liblzma shouldn't arise soon.
+
diff --git a/PACKAGERS b/PACKAGERS
new file mode 100644
index 0000000..3042c66
--- /dev/null
+++ b/PACKAGERS
@@ -0,0 +1,243 @@
+
+Information to packagers of XZ Utils
+====================================
+
+ 0. Preface
+ 1. Package naming
+ 2. Package description
+ 3. License
+ 4. configure options
+ 5. Additional documentation
+ 6. Extra files
+ 7. Installing XZ Utils and LZMA Utils in parallel
+ 8. Example
+
+
+0. Preface
+----------
+
+ This document is meant for people who create and maintain XZ Utils
+ packages for operating system distributions. The focus is on GNU/Linux
+ systems, but most things apply to other systems too.
+
+ While the standard "configure && make DESTDIR=$PKG install" should
+ give a pretty good package, there are some details which packagers
+ may want to tweak.
+
+ Packagers should also read the INSTALL file.
+
+
+1. Package naming
+-----------------
+
+ The preferred name for the XZ Utils package is "xz", because that's
+ the name of the upstream tarball. Naturally you may have good reasons
+ to use some other name; I won't get angry about it. ;-) It's just nice
+ to be able to point people to the correct package name without asking
+ what distro they have.
+
+ If your distro policy is to split things into small pieces, here is
+ one suggestion:
+
+ xz xz, xzdec, scripts (xzdiff, xzgrep, etc.), docs
+ xz-lzma lzma, unlzma, lzcat, lzgrep etc. symlinks and
+ lzmadec binary for compatibility with LZMA Utils
+ liblzma liblzma.so.*
+ liblzma-devel liblzma.so, liblzma.a, API headers
+ liblzma-doc Doxygen-generated liblzma API docs (HTML),
+ example programs
+
+
+2. Package description
+----------------------
+
+ Here is a suggestion which you may use as the package description.
+ If you can use only one-line description, pick only the first line.
+ Naturally, feel free to use some other description if you find it
+ better, and maybe send it to me too.
+
+ Library and command line tools for XZ and LZMA compressed files
+
+ XZ Utils provide a general purpose data compression library
+ and command line tools. The native file format is the .xz
+ format, but also the legacy .lzma format is supported. The .xz
+ format supports multiple compression algorithms, of which LZMA2
+ is currently the primary algorithm. With typical files, XZ Utils
+ create about 30 % smaller files than gzip.
+
+ If you are splitting XZ Utils into multiple packages, here are some
+ suggestions for package descriptions:
+
+ xz:
+
+ Command line tools for XZ and LZMA compressed files
+
+ This package includes the xz compression tool and other command
+ line tools from XZ Utils. xz has command line syntax similar to
+ that of gzip. The native file format is the .xz format, but also
+ the legacy .lzma format is supported. The .xz format supports
+ multiple compression algorithms, of which LZMA2 is currently the
+ primary algorithm. With typical files, XZ Utils create about 30 %
+ smaller files than gzip.
+
+ Note that this package doesn't include the files needed for
+ LZMA Utils 4.32.x compatibility. Install also the xz-lzma
+ package to make XZ Utils emulate LZMA Utils 4.32.x.
+
+ xz-lzma:
+
+ LZMA Utils emulation with XZ Utils
+
+ This package includes executables and symlinks to make
+ XZ Utils emulate lzma, unlzma, lzcat, and other command
+ line tools found from the legacy LZMA Utils 4.32.x package.
+
+ liblzma:
+
+ Library for XZ and LZMA compressed files
+
+ liblzma is a general purpose data compression library with
+ an API similar to that of zlib. liblzma supports multiple
+ algorithms, of which LZMA2 is currently the primary algorithm.
+ The native file format is .xz, but also the legacy .lzma
+ format and raw streams (no headers at all) are supported.
+
+ This package includes the shared library.
+
+ liblzma-devel:
+
+ Library for XZ and LZMA compressed files
+
+ This package includes the API headers, static library, and
+ other development files related to liblzma.
+
+ liblzma-doc:
+
+ liblzma API documentation in HTML and example usage
+
+ This package includes the Doxygen-generated liblzma API
+ HTML docs and example programs showing how to use liblzma.
+
+
+3. License
+----------
+
+ If the package manager supports a license field, you probably should
+ put GPLv2+ there (GNU GPL v2 or later). The interesting parts of
+ XZ Utils are in the public domain, but some less important files
+ ending up into the binary package are under GPLv2+. So it is simplest
+ to just say GPLv2+ if you cannot specify "public domain and GPLv2+".
+
+ If you split XZ Utils into multiple packages as described earlier
+ in this file, liblzma and liblzma-dev packages will contain only
+ public domain code (from XZ Utils at least; compiler or linker may
+ add some third-party code, which may be copyrighted).
+
+
+4. configure options
+--------------------
+
+ Unless you are building a package for a distribution that is meant
+ only for embedded systems, don't use the following configure options:
+
+ --enable-debug
+ --enable-encoders (*)
+ --enable-decoders
+ --enable-match-finders
+ --enable-checks
+ --enable-small (*)
+ --disable-threads (*)
+ --disable-microlzma (*)
+ --disable-lzip-decoder (*)
+
+ (*) These are OK when building xzdec and lzmadec as described
+ in INSTALL.
+
+ xzdec and lzmadec don't provide any functionality that isn't already
+ available in the xz tool. Shipping xzdec and lzmadec without size
+ optimization and statically-linked liblzma isn't very useful. Doing
+ that would give users the xzdec man page, which may make it easier
+ for people to find out that such tools exists, but the executables
+ wouldn't have any advantage over the full-featured xz.
+
+
+5. Additional documentation
+---------------------------
+
+ "make install" copies some additional documentation to $docdir
+ (--docdir in configure). There is a copy of the GNU GPL v2, which
+ can be replaced with a symlink if your distro ships with shared
+ copies of the common license texts.
+
+ The Doxygen-generated documentation (HTML) for the liblzma API
+ headers is included in the source release and will be installed by
+ "make install" to $docdir/api. All JavaScript is removed to
+ simplify license compliance and to reduce the install size. If the
+ liblzma API documentation is not desired, either run configure with
+ --disable-doc or remove the doc/api directory before running
+ "make install".
+
+
+6. Extra files
+--------------
+
+ The "extra" directory contains some small extra tools or other files.
+ The exact set of extra files can vary between XZ Utils releases. The
+ extra files have only limited use or they are too dangerous to be
+ put directly to $bindir (7z2lzma.sh is a good example, since it can
+ silently create corrupt output if certain conditions are not met).
+
+ If you feel like it, you may copy the extra directory under the doc
+ directory (e.g. /usr/share/doc/xz/extra). Maybe some people will find
+ them useful. However, most people needing these tools probably are
+ able to find them from the source package too.
+
+ The "debug" directory contains some tools that are useful only when
+ hacking on XZ Utils. Don't package these tools.
+
+
+7. Installing XZ Utils and LZMA Utils in parallel
+-------------------------------------------------
+
+ XZ Utils and LZMA Utils 4.32.x can be installed in parallel by
+ omitting the compatibility symlinks (lzma, unlzma, lzcat, lzgrep etc.)
+ from the XZ Utils package. It's probably a good idea to still package
+ the symlinks into a separate package so that users may choose if they
+ want to use XZ Utils or LZMA Utils for handling .lzma files.
+
+
+8. Example
+----------
+
+ Here is an example for i686 GNU/Linux that
+ - links xz and lzmainfo against shared liblzma;
+ - links size-optimized xzdec and lzmadec against static liblzma
+ while avoiding libpthread dependency;
+ - includes only shared liblzma in the final package; and
+ - copies also the "extra" directory to the package.
+
+ PKG=/tmp/xz-pkg
+ tar xf xz-x.y.z.tar.gz
+ cd xz-x.y.z
+ ./configure \
+ --prefix=/usr \
+ --disable-static \
+ --disable-xzdec \
+ --disable-lzmadec \
+ CFLAGS='-march=i686 -mtune=generic -O2'
+ make
+ make DESTDIR=$PKG install-strip
+ make clean
+ ./configure \
+ --prefix=/usr \
+ --disable-shared \
+ --disable-nls \
+ --disable-encoders \
+ --enable-small \
+ --disable-threads \
+ CFLAGS='-march=i686 -mtune=generic -Os'
+ make -C src/liblzma
+ make -C src/xzdec
+ make -C src/xzdec DESTDIR=$PKG install-strip
+ cp -a extra $PKG/usr/share/doc/xz
+
diff --git a/README b/README
new file mode 100644
index 0000000..9e76301
--- /dev/null
+++ b/README
@@ -0,0 +1,307 @@
+
+XZ Utils
+========
+
+ 0. Overview
+ 1. Documentation
+ 1.1. Overall documentation
+ 1.2. Documentation for command-line tools
+ 1.3. Documentation for liblzma
+ 2. Version numbering
+ 3. Reporting bugs
+ 4. Translations
+ 5. Other implementations of the .xz format
+ 6. Contact information
+
+
+0. Overview
+-----------
+
+ XZ Utils provide a general-purpose data-compression library plus
+ command-line tools. The native file format is the .xz format, but
+ also the legacy .lzma format is supported. The .xz format supports
+ multiple compression algorithms, which are called "filters" in the
+ context of XZ Utils. The primary filter is currently LZMA2. With
+ typical files, XZ Utils create about 30 % smaller files than gzip.
+
+ To ease adapting support for the .xz format into existing applications
+ and scripts, the API of liblzma is somewhat similar to the API of the
+ popular zlib library. For the same reason, the command-line tool xz
+ has a command-line syntax similar to that of gzip.
+
+ When aiming for the highest compression ratio, the LZMA2 encoder uses
+ a lot of CPU time and may use, depending on the settings, even
+ hundreds of megabytes of RAM. However, in fast modes, the LZMA2 encoder
+ competes with bzip2 in compression speed, RAM usage, and compression
+ ratio.
+
+ LZMA2 is reasonably fast to decompress. It is a little slower than
+ gzip, but a lot faster than bzip2. Being fast to decompress means
+ that the .xz format is especially nice when the same file will be
+ decompressed very many times (usually on different computers), which
+ is the case e.g. when distributing software packages. In such
+ situations, it's not too bad if the compression takes some time,
+ since that needs to be done only once to benefit many people.
+
+ With some file types, combining (or "chaining") LZMA2 with an
+ additional filter can improve the compression ratio. A filter chain may
+ contain up to four filters, although usually only one or two are used.
+ For example, putting a BCJ (Branch/Call/Jump) filter before LZMA2
+ in the filter chain can improve compression ratio of executable files.
+
+ Since the .xz format allows adding new filter IDs, it is possible that
+ some day there will be a filter that is, for example, much faster to
+ compress than LZMA2 (but probably with worse compression ratio).
+ Similarly, it is possible that some day there is a filter that will
+ compress better than LZMA2.
+
+ XZ Utils supports multithreaded compression. XZ Utils doesn't support
+ multithreaded decompression yet. It has been planned though and taken
+ into account when designing the .xz file format. In the future, files
+ that were created in threaded mode can be decompressed in threaded
+ mode too.
+
+
+1. Documentation
+----------------
+
+1.1. Overall documentation
+
+ README This file
+
+ INSTALL.generic Generic install instructions for those not familiar
+ with packages using GNU Autotools
+ INSTALL Installation instructions specific to XZ Utils
+ PACKAGERS Information to packagers of XZ Utils
+
+ COPYING XZ Utils copyright and license information
+ COPYING.GPLv2 GNU General Public License version 2
+ COPYING.GPLv3 GNU General Public License version 3
+ COPYING.LGPLv2.1 GNU Lesser General Public License version 2.1
+
+ AUTHORS The main authors of XZ Utils
+ THANKS Incomplete list of people who have helped making
+ this software
+ NEWS User-visible changes between XZ Utils releases
+ ChangeLog Detailed list of changes (commit log)
+ TODO Known bugs and some sort of to-do list
+
+ Note that only some of the above files are included in binary
+ packages.
+
+
+1.2. Documentation for command-line tools
+
+ The command-line tools are documented as man pages. In source code
+ releases (and possibly also in some binary packages), the man pages
+ are also provided in plain text (ASCII only) and PDF formats in the
+ directory "doc/man" to make the man pages more accessible to those
+ whose operating system doesn't provide an easy way to view man pages.
+
+
+1.3. Documentation for liblzma
+
+ The liblzma API headers include short docs about each function
+ and data type as Doxygen tags. These docs should be quite OK as
+ a quick reference.
+
+ There are a few example/tutorial programs that should help in
+ getting started with liblzma. In the source package the examples
+ are in "doc/examples" and in binary packages they may be under
+ "examples" in the same directory as this README.
+
+ Since the liblzma API has similarities to the zlib API, some people
+ may find it useful to read the zlib docs and tutorial too:
+
+ https://zlib.net/manual.html
+ https://zlib.net/zlib_how.html
+
+
+2. Version numbering
+--------------------
+
+ The version number format of XZ Utils is X.Y.ZS:
+
+ - X is the major version. When this is incremented, the library
+ API and ABI break.
+
+ - Y is the minor version. It is incremented when new features
+ are added without breaking the existing API or ABI. An even Y
+ indicates a stable release and an odd Y indicates unstable
+ (alpha or beta version).
+
+ - Z is the revision. This has a different meaning for stable and
+ unstable releases:
+
+ * Stable: Z is incremented when bugs get fixed without adding
+ any new features. This is intended to be convenient for
+ downstream distributors that want bug fixes but don't want
+ any new features to minimize the risk of introducing new bugs.
+
+ * Unstable: Z is just a counter. API or ABI of features added
+ in earlier unstable releases having the same X.Y may break.
+
+ - S indicates stability of the release. It is missing from the
+ stable releases, where Y is an even number. When Y is odd, S
+ is either "alpha" or "beta" to make it very clear that such
+ versions are not stable releases. The same X.Y.Z combination is
+ not used for more than one stability level, i.e. after X.Y.Zalpha,
+ the next version can be X.Y.(Z+1)beta but not X.Y.Zbeta.
+
+
+3. Reporting bugs
+-----------------
+
+ Naturally it is easiest for me if you already know what causes the
+ unexpected behavior. Even better if you have a patch to propose.
+ However, quite often the reason for unexpected behavior is unknown,
+ so here are a few things to do before sending a bug report:
+
+ 1. Try to create a small example how to reproduce the issue.
+
+ 2. Compile XZ Utils with debugging code using configure switches
+ --enable-debug and, if possible, --disable-shared. If you are
+ using GCC, use CFLAGS='-O0 -ggdb3'. Don't strip the resulting
+ binaries.
+
+ 3. Turn on core dumps. The exact command depends on your shell;
+ for example in GNU bash it is done with "ulimit -c unlimited",
+ and in tcsh with "limit coredumpsize unlimited".
+
+ 4. Try to reproduce the suspected bug. If you get "assertion failed"
+ message, be sure to include the complete message in your bug
+ report. If the application leaves a coredump, get a backtrace
+ using gdb:
+ $ gdb /path/to/app-binary # Load the app to the debugger.
+ (gdb) core core # Open the coredump.
+ (gdb) bt # Print the backtrace. Copy & paste to bug report.
+ (gdb) quit # Quit gdb.
+
+ Report your bug via email or IRC (see Contact information below).
+ Don't send core dump files or any executables. If you have a small
+ example file(s) (total size less than 256 KiB), please include
+ it/them as an attachment. If you have bigger test files, put them
+ online somewhere and include a URL to the file(s) in the bug report.
+
+ Always include the exact version number of XZ Utils in the bug report.
+ If you are using a snapshot from the git repository, use "git describe"
+ to get the exact snapshot version. If you are using XZ Utils shipped
+ in an operating system distribution, mention the distribution name,
+ distribution version, and exact xz package version; if you cannot
+ repeat the bug with the code compiled from unpatched source code,
+ you probably need to report a bug to your distribution's bug tracking
+ system.
+
+
+4. Translations
+---------------
+
+ The xz command line tool and all man pages can be translated.
+ The translations are handled via the Translation Project. If you
+ wish to help translating xz, please join the Translation Project:
+
+ https://translationproject.org/html/translators.html
+
+ Below are notes and testing instructions specific to xz
+ translations.
+
+ Testing can be done by installing xz into a temporary directory:
+
+ ./configure --disable-shared --prefix=/tmp/xz-test
+ # <Edit the .po file in the po directory.>
+ make -C po update-po
+ make install
+ bash debug/translation.bash | less
+ bash debug/translation.bash | less -S # For --list outputs
+
+ Repeat the above as needed (no need to re-run configure though).
+
+ Note especially the following:
+
+ - The output of --help and --long-help must look nice on
+ an 80-column terminal. It's OK to add extra lines if needed.
+
+ - In contrast, don't add extra lines to error messages and such.
+ They are often preceded with e.g. a filename on the same line,
+ so you have no way to predict where to put a \n. Let the terminal
+ do the wrapping even if it looks ugly. Adding new lines will be
+ even uglier in the generic case even if it looks nice in a few
+ limited examples.
+
+ - Be careful with column alignment in tables and table-like output
+ (--list, --list --verbose --verbose, --info-memory, --help, and
+ --long-help):
+
+ * All descriptions of options in --help should start in the
+ same column (but it doesn't need to be the same column as
+ in the English messages; just be consistent if you change it).
+ Check that both --help and --long-help look OK, since they
+ share several strings.
+
+ * --list --verbose and --info-memory print lines that have
+ the format "Description: %s". If you need a longer
+ description, you can put extra space between the colon
+ and %s. Then you may need to add extra space to other
+ strings too so that the result as a whole looks good (all
+ values start at the same column).
+
+ * The columns of the actual tables in --list --verbose --verbose
+ should be aligned properly. Abbreviate if necessary. It might
+ be good to keep at least 2 or 3 spaces between column headings
+ and avoid spaces in the headings so that the columns stand out
+ better, but this is a matter of opinion. Do what you think
+ looks best.
+
+ - Be careful to put a period at the end of a sentence when the
+ original version has it, and don't put it when the original
+ doesn't have it. Similarly, be careful with \n characters
+ at the beginning and end of the strings.
+
+ - Read the TRANSLATORS comments that have been extracted from the
+ source code and included in xz.pot. Some comments suggest
+ testing with a specific command which needs an .xz file. You
+ may use e.g. any tests/files/good-*.xz. However, these test
+ commands are included in translations.bash output, so reading
+ translations.bash output carefully can be enough.
+
+ - If you find language problems in the original English strings,
+ feel free to suggest improvements. Ask if something is unclear.
+
+ - The translated messages should be understandable (sometimes this
+ may be a problem with the original English messages too). Don't
+ make a direct word-by-word translation from English especially if
+ the result doesn't sound good in your language.
+
+ Thanks for your help!
+
+
+5. Other implementations of the .xz format
+------------------------------------------
+
+ 7-Zip and the p7zip port of 7-Zip support the .xz format starting
+ from the version 9.00alpha.
+
+ https://7-zip.org/
+ https://p7zip.sourceforge.net/
+
+ XZ Embedded is a limited implementation written for use in the Linux
+ kernel, but it is also suitable for other embedded use.
+
+ https://tukaani.org/xz/embedded.html
+
+ XZ for Java is a complete implementation written in pure Java.
+
+ https://tukaani.org/xz/java.html
+
+
+6. Contact information
+----------------------
+
+ If you have questions, bug reports, patches etc. related to XZ Utils,
+ the project maintainers Lasse Collin and Jia Tan can be reached via
+ <xz@tukaani.org>.
+
+ You might find Lasse also from #tukaani on Libera Chat (IRC).
+ The nick is Larhzu. The channel tends to be pretty quiet,
+ so just ask your question and someone might wake up.
+
diff --git a/THANKS b/THANKS
new file mode 100644
index 0000000..0206af9
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,174 @@
+
+Thanks
+======
+
+Some people have helped more, some less, but nevertheless everyone's help
+has been important. :-) In alphabetical order:
+ - Mark Adler
+ - H. Peter Anvin
+ - Jeff Bastian
+ - Nelson H. F. Beebe
+ - Karl Beldan
+ - Karl Berry
+ - Anders F. Björklund
+ - Emmanuel Blot
+ - Melanie Blower
+ - Alexander Bluhm
+ - Martin Blumenstingl
+ - Ben Boeckel
+ - Jakub Bogusz
+ - Adam Borowski
+ - Maarten Bosmans
+ - Lukas Braune
+ - Benjamin Buch
+ - Trent W. Buck
+ - Kevin R. Bulgrien
+ - James Buren
+ - David Burklund
+ - Frank Busse
+ - Daniel Mealha Cabrita
+ - Milo Casagrande
+ - Marek Černocký
+ - Tomer Chachamu
+ - Vitaly Chikunov
+ - Antoine Cœur
+ - Gabi Davar
+ - İhsan Doğan
+ - Chris Donawa
+ - Andrew Dudman
+ - Markus Duft
+ - İsmail Dönmez
+ - Paul Eggert
+ - Robert Elz
+ - Gilles Espinasse
+ - Denis Excoffier
+ - Vincent Fazio
+ - Michael Felt
+ - Michael Fox
+ - Mike Frysinger
+ - Daniel Richard G.
+ - Tomasz Gajc
+ - Bjarni Ingi Gislason
+ - John Paul Adrian Glaubitz
+ - Bill Glessner
+ - Michał Górny
+ - Jason Gorski
+ - Juan Manuel Guerrero
+ - Diederik de Haas
+ - Joachim Henke
+ - Christian Hesse
+ - Vincenzo Innocente
+ - Peter Ivanov
+ - Nicholas Jackson
+ - Sam James
+ - Hajin Jang
+ - Jouk Jansen
+ - Jun I Jin
+ - Kiyoshi Kanazawa
+ - Joona Kannisto
+ - Per Øyvind Karlsen
+ - Iouri Kharon
+ - Thomas Klausner
+ - Richard Koch
+ - Anton Kochkov
+ - Ville Koskinen
+ - Marcin Kowalczyk
+ - Jan Kratochvil
+ - Christian Kujau
+ - Stephan Kulow
+ - Ilya Kurdyukov
+ - Peter Lawler
+ - James M Leddy
+ - Vincent Lefevre
+ - Hin-Tak Leung
+ - Andraž 'ruskie' Levstik
+ - Cary Lewis
+ - Wim Lewis
+ - Xin Li
+ - Eric Lindblad
+ - Lorenzo De Liso
+ - H.J. Lu
+ - Bela Lubkin
+ - Gregory Margo
+ - Julien Marrec
+ - Ed Maste
+ - Martin Matuška
+ - Ivan A. Melnikov
+ - Jim Meyering
+ - Arkadiusz Miskiewicz
+ - Nathan Moinvaziri
+ - Étienne Mollier
+ - Conley Moorhous
+ - Rafał Mużyło
+ - Adrien Nader
+ - Evan Nemerson
+ - Hongbo Ni
+ - Jonathan Nieder
+ - Andre Noll
+ - Peter O'Gorman
+ - Dimitri Papadopoulos Orfanos
+ - Daniel Packard
+ - Filip Palian
+ - Peter Pallinger
+ - Rui Paulo
+ - Igor Pavlov
+ - Diego Elio Pettenò
+ - Elbert Pol
+ - Mikko Pouru
+ - Rich Prohaska
+ - Trần Ngọc Quân
+ - Pavel Raiskup
+ - Ole André Vadla Ravnås
+ - Eric S. Raymond
+ - Robert Readman
+ - Bernhard Reutner-Fischer
+ - Markus Rickert
+ - Cristian Rodríguez
+ - Christian von Roques
+ - Boud Roukema
+ - Torsten Rupp
+ - Stephen Sachs
+ - Jukka Salmi
+ - Agostino Sarubbo
+ - Alexandre Sauvé
+ - Benno Schulenberg
+ - Andreas Schwab
+ - Bhargava Shastry
+ - Dan Shechter
+ - Stuart Shelton
+ - Sebastian Andrzej Siewior
+ - Ville Skyttä
+ - Brad Smith
+ - Bruce Stark
+ - Pippijn van Steenhoven
+ - Martin Storsjö
+ - Jonathan Stott
+ - Dan Stromberg
+ - Jia Tan
+ - Vincent Torri
+ - Paul Townsend
+ - Mohammed Adnène Trojette
+ - Alexey Tourbin
+ - Taiki Tsunekawa
+ - Loganaden Velvindron
+ - Patrick J. Volkerding
+ - Martin Väth
+ - Adam Walling
+ - Jeffrey Walton
+ - Christian Weisgerber
+ - Dan Weiss
+ - Bert Wesarg
+ - Fredrik Wikstrom
+ - Jim Wilcoxson
+ - Ralf Wildenhues
+ - Charles Wilson
+ - Lars Wirzenius
+ - Pilorz Wojciech
+ - Ryan Young
+ - Andreas Zieringer
+
+Also thanks to all the people who have participated in the Tukaani project.
+
+I have probably forgot to add some names to the above list. Sorry about
+that and thanks for your help.
+
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..7b9a3ad
--- /dev/null
+++ b/TODO
@@ -0,0 +1,109 @@
+
+XZ Utils To-Do List
+===================
+
+Known bugs
+----------
+
+ The test suite is too incomplete.
+
+ If the memory usage limit is less than about 13 MiB, xz is unable to
+ automatically scale down the compression settings enough even though
+ it would be possible by switching from BT2/BT3/BT4 match finder to
+ HC3/HC4.
+
+ XZ Utils compress some files significantly worse than LZMA Utils.
+ This is due to faster compression presets used by XZ Utils, and
+ can often be worked around by using "xz --extreme". With some files
+ --extreme isn't enough though: it's most likely with files that
+ compress extremely well, so going from compression ratio of 0.003
+ to 0.004 means big relative increase in the compressed file size.
+
+ xz doesn't quote unprintable characters when it displays file names
+ given on the command line.
+
+ tuklib_exit() doesn't block signals => EINTR is possible.
+
+ SIGTSTP is not handled. If xz is stopped, the estimated remaining
+ time and calculated (de)compression speed won't make sense in the
+ progress indicator (xz --verbose).
+
+ If liblzma has created threads and fork() gets called, liblzma
+ code will break in the child process unless it calls exec() and
+ doesn't touch liblzma.
+
+
+Missing features
+----------------
+
+ Add support for storing metadata in .xz files. A preliminary
+ idea is to create a new Stream type for metadata. When both
+ metadata and data are wanted in the same .xz file, two or more
+ Streams would be concatenated.
+
+ The state stored in lzma_stream should be cloneable, which would
+ be mostly useful when using a preset dictionary in LZMA2, but
+ it may have other uses too. Compare to deflateCopy() in zlib.
+
+ Support LZMA_FINISH in raw decoder to indicate end of LZMA1 and
+ other streams that don't have an end of payload marker.
+
+ Adjust dictionary size when the input file size is known.
+ Maybe do this only if an option is given.
+
+ xz doesn't support copying extended attributes, access control
+ lists etc. from source to target file.
+
+ Multithreaded compression:
+ - Reduce memory usage of the current method.
+ - Implement threaded match finders.
+ - Implement pigz-style threading in LZMA2.
+
+ Buffer-to-buffer coding could use less RAM (especially when
+ decompressing LZMA1 or LZMA2).
+
+ I/O library is not implemented (similar to gzopen() in zlib).
+ It will be a separate library that supports uncompressed, .gz,
+ .bz2, .lzma, and .xz files.
+
+ Support changing lzma_options_lzma.mode with lzma_filters_update().
+
+ Support LZMA_FULL_FLUSH for lzma_stream_decoder() to stop at
+ Block and Stream boundaries.
+
+ lzma_strerror() to convert lzma_ret to human readable form?
+ This is tricky, because the same error codes are used with
+ slightly different meanings, and this cannot be fixed anymore.
+
+ Make it possible to adjust LZMA2 options in the middle of a Block
+ so that the encoding speed vs. compression ratio can be optimized
+ when the compressed data is streamed over network.
+
+ Improved BCJ filters. The current filters are small but they aren't
+ so great when compressing binary packages that contain various file
+ types. Specifically, they make things worse if there are static
+ libraries or Linux kernel modules. The filtering could also be
+ more effective (without getting overly complex), for example,
+ streamable variant BCJ2 from 7-Zip could be implemented.
+
+ Filter that autodetects specific data types in the input stream
+ and applies appropriate filters for the corrects parts of the input.
+ Perhaps combine this with the BCJ filter improvement point above.
+
+ Long-range LZ77 method as a separate filter or as a new LZMA2
+ match finder.
+
+
+Documentation
+-------------
+
+ More tutorial programs are needed for liblzma.
+
+ Document the LZMA1 and LZMA2 algorithms.
+
+
+Miscellaneous
+------------
+
+ Try to get the media type for .xz registered at IANA.
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..6d41ec8
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1196 @@
+# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 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 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.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
+[m4_warning([this file was generated for autoconf 2.71.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2021 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.16'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.16.5], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.16.5])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# Figure out how to run the assembler. -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 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.
+
+# AM_PROG_AS
+# ----------
+AC_DEFUN([AM_PROG_AS],
+[# By default we simply use the C compiler to build assembly code.
+AC_REQUIRE([AC_PROG_CC])
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
+AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
+])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 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.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2021 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.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2021 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.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2021 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.
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ AS_CASE([$CONFIG_FILES],
+ [*\'*], [eval set x "$CONFIG_FILES"],
+ [*], [set x $CONFIG_FILES])
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`AS_DIRNAME(["$am_mf"])`
+ am_filepart=`AS_BASENAME(["$am_mf"])`
+ AM_RUN_LOG([cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles]) || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).])
+ fi
+ AS_UNSET([am_dirpart])
+ AS_UNSET([am_filepart])
+ AS_UNSET([am_mf])
+ AS_UNSET([am_rc])
+ rm -f conftest-deps.mk
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 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 macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+m4_ifdef([_$0_ALREADY_INIT],
+ [m4_fatal([$0 expanded multiple times
+]m4_defn([_$0_ALREADY_INIT]))],
+ [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+AC_SUBST([CTAGS])
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+AC_SUBST([ETAGS])
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+AC_SUBST([CSCOPE])
+
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2021 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2021 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.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 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.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+ AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+ ['0:this is the am__doit target'],
+ [AS_CASE([$s],
+ [BSD], [am__include='.include' am__quote='"'],
+ [am__include='include' am__quote=''])])
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2021 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.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2021 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.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2021 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.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2021 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.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2021 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.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2021 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.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2021 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2021 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.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2021 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.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/ax_check_capsicum.m4])
+m4_include([m4/ax_pthread.m4])
+m4_include([m4/getopt.m4])
+m4_include([m4/gettext.m4])
+m4_include([m4/host-cpu-c-abi.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/intlmacosx.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
+m4_include([m4/nls.m4])
+m4_include([m4/po.m4])
+m4_include([m4/posix-shell.m4])
+m4_include([m4/progtest.m4])
+m4_include([m4/tuklib_common.m4])
+m4_include([m4/tuklib_cpucores.m4])
+m4_include([m4/tuklib_integer.m4])
+m4_include([m4/tuklib_mbstr.m4])
+m4_include([m4/tuklib_physmem.m4])
+m4_include([m4/tuklib_progname.m4])
+m4_include([m4/visibility.m4])
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..d5cec1b
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+set -e -x
+
+# The following six lines are almost identical to "autoreconf -fi" but faster.
+${AUTOPOINT:-autopoint} -f
+${LIBTOOLIZE:-libtoolize} -c -f || glibtoolize -c -f
+${ACLOCAL:-aclocal} -I m4
+${AUTOCONF:-autoconf}
+${AUTOHEADER:-autoheader}
+${AUTOMAKE:-automake} -acf --foreign
+
+# Generate the translated man pages and the doxygen documentation if the
+# "po4a" and "doxygen" tools are available.
+# This is *NOT* done by "autoreconf -fi" or when "make" is run.
+# Pass --no-po4a or --no-doxygen to this script to skip these steps.
+# It can be useful when you know that po4a or doxygen aren't available and
+# don't want autogen.sh to exit with non-zero exit status.
+generate_po4a="y"
+generate_doxygen="y"
+
+for arg in "$@"
+do
+ case $arg in
+ "--no-po4a")
+ generate_po4a="n"
+ ;;
+
+ "--no-doxygen")
+ generate_doxygen="n"
+ ;;
+ esac
+done
+
+if test "$generate_po4a" != "n"; then
+ cd po4a
+ sh update-po
+ cd ..
+fi
+
+if test "$generate_doxygen" != "n"; then
+ cd doxygen
+ sh update-doxygen
+ cd ..
+fi
+
+exit 0
diff --git a/build-aux/compile b/build-aux/compile
new file mode 100755
index 0000000..df363c8
--- /dev/null
+++ b/build-aux/compile
@@ -0,0 +1,348 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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, 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 <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN* | MSYS*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/* | msys/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/config.guess b/build-aux/config.guess
new file mode 100755
index 0000000..7f76b62
--- /dev/null
+++ b/build-aux/config.guess
@@ -0,0 +1,1754 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file 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 <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 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."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+ # prevent multiple calls if $tmp is already set
+ test "$tmp" && return 0
+ : "${TMPDIR=/tmp}"
+ # shellcheck disable=SC2039,SC3028
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+ dummy=$tmp/dummy
+ case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c"
+ for driver in cc gcc c89 c99 ; do
+ if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+ CC_FOR_BUILD=$driver
+ break
+ fi
+ done
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+ esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+ LIBC=unknown
+
+ set_cc_for_build
+ cat <<-EOF > "$dummy.c"
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #elif defined(__GLIBC__)
+ LIBC=gnu
+ #else
+ #include <stdarg.h>
+ /* First heuristic to detect musl libc. */
+ #ifdef __DEFINED_va_list
+ LIBC=musl
+ #endif
+ #endif
+ EOF
+ cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ eval "$cc_set_libc"
+
+ # Second heuristic to detect musl libc.
+ if [ "$LIBC" = unknown ] &&
+ command -v ldd >/dev/null &&
+ ldd --version 2>&1 | grep -q ^musl; then
+ LIBC=musl
+ fi
+
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ if [ "$LIBC" = unknown ]; then
+ LIBC=gnu
+ fi
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+ echo unknown)`
+ case $UNAME_MACHINE_ARCH in
+ aarch64eb) machine=aarch64_be-unknown ;;
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently (or will in the future) and ABI.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ os=netbsdelf
+ ;;
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case $UNAME_MACHINE_ARCH in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case $UNAME_VERSION in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ GUESS=$machine-${os}${release}${abi-}
+ ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+ ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+ ;;
+ *:SecBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+ ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+ ;;
+ *:MidnightBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+ ;;
+ *:ekkoBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+ ;;
+ *:SolidBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+ ;;
+ *:OS108:*:*)
+ GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+ ;;
+ macppc:MirBSD:*:*)
+ GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:MirBSD:*:*)
+ GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+ ;;
+ *:Sortix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-sortix
+ ;;
+ *:Twizzler:*:*)
+ GUESS=$UNAME_MACHINE-unknown-twizzler
+ ;;
+ *:Redox:*:*)
+ GUESS=$UNAME_MACHINE-unknown-redox
+ ;;
+ mips:OSF1:*.*)
+ GUESS=mips-dec-osf1
+ ;;
+ alpha:OSF1:*:*)
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ trap '' 0
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case $ALPHA_CPU_TYPE in
+ "EV4 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE=alpha ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE=alpha ;;
+ "EV5 (21164)")
+ UNAME_MACHINE=alphaev5 ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE=alphaev56 ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE=alphapca56 ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE=alphapca57 ;;
+ "EV6 (21264)")
+ UNAME_MACHINE=alphaev6 ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE=alphaev67 ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE=alphaev68 ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE=alphaev69 ;;
+ "EV7 (21364)")
+ UNAME_MACHINE=alphaev7 ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE=alphaev79 ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+ ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ GUESS=m68k-unknown-sysv4
+ ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-amigaos
+ ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ GUESS=$UNAME_MACHINE-unknown-morphos
+ ;;
+ *:OS/390:*:*)
+ GUESS=i370-ibm-openedition
+ ;;
+ *:z/VM:*:*)
+ GUESS=s390-ibm-zvmoe
+ ;;
+ *:OS400:*:*)
+ GUESS=powerpc-ibm-os400
+ ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ GUESS=arm-acorn-riscix$UNAME_RELEASE
+ ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ GUESS=arm-unknown-riscos
+ ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ GUESS=hppa1.1-hitachi-hiuxmpp
+ ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ case `(/bin/universe) 2>/dev/null` in
+ att) GUESS=pyramid-pyramid-sysv3 ;;
+ *) GUESS=pyramid-pyramid-bsd ;;
+ esac
+ ;;
+ NILE*:*:*:dcosx)
+ GUESS=pyramid-pyramid-svr4
+ ;;
+ DRS?6000:unix:4.0:6*)
+ GUESS=sparc-icl-nx6
+ ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) GUESS=sparc-icl-nx7 ;;
+ esac
+ ;;
+ s390x:SunOS:*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+ ;;
+ sun4H:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-hal-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris2$SUN_REL
+ ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ GUESS=i386-pc-auroraux$UNAME_RELEASE
+ ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ set_cc_for_build
+ SUN_ARCH=i386
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH=x86_64
+ fi
+ fi
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+ ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=sparc-sun-solaris3$SUN_REL
+ ;;
+ sun4*:SunOS:*:*)
+ case `/usr/bin/arch -k` in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+ GUESS=sparc-sun-sunos$SUN_REL
+ ;;
+ sun3*:SunOS:*:*)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+ case `/bin/arch` in
+ sun3)
+ GUESS=m68k-sun-sunos$UNAME_RELEASE
+ ;;
+ sun4)
+ GUESS=sparc-sun-sunos$UNAME_RELEASE
+ ;;
+ esac
+ ;;
+ aushp:SunOS:*:*)
+ GUESS=sparc-auspex-sunos$UNAME_RELEASE
+ ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ GUESS=m68k-atari-mint$UNAME_RELEASE
+ ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ GUESS=m68k-milan-mint$UNAME_RELEASE
+ ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ GUESS=m68k-hades-mint$UNAME_RELEASE
+ ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ GUESS=m68k-unknown-mint$UNAME_RELEASE
+ ;;
+ m68k:machten:*:*)
+ GUESS=m68k-apple-machten$UNAME_RELEASE
+ ;;
+ powerpc:machten:*:*)
+ GUESS=powerpc-apple-machten$UNAME_RELEASE
+ ;;
+ RISC*:Mach:*:*)
+ GUESS=mips-dec-mach_bsd4.3
+ ;;
+ RISC*:ULTRIX:*:*)
+ GUESS=mips-dec-ultrix$UNAME_RELEASE
+ ;;
+ VAX*:ULTRIX*:*:*)
+ GUESS=vax-dec-ultrix$UNAME_RELEASE
+ ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ GUESS=clipper-intergraph-clix$UNAME_RELEASE
+ ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=mips-mips-riscos$UNAME_RELEASE
+ ;;
+ Motorola:PowerMAX_OS:*:*)
+ GUESS=powerpc-motorola-powermax
+ ;;
+ Motorola:*:4.3:PL8-*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ GUESS=powerpc-harris-powermax
+ ;;
+ Night_Hawk:Power_UNIX:*:*)
+ GUESS=powerpc-harris-powerunix
+ ;;
+ m88k:CX/UX:7*:*)
+ GUESS=m88k-harris-cxux7
+ ;;
+ m88k:*:4*:R4*)
+ GUESS=m88k-motorola-sysv4
+ ;;
+ m88k:*:3*:R3*)
+ GUESS=m88k-motorola-sysv3
+ ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+ then
+ if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+ test "$TARGET_BINARY_INTERFACE"x = x
+ then
+ GUESS=m88k-dg-dgux$UNAME_RELEASE
+ else
+ GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+ fi
+ else
+ GUESS=i586-dg-dgux$UNAME_RELEASE
+ fi
+ ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ GUESS=m88k-dolphin-sysv3
+ ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ GUESS=m88k-motorola-sysv3
+ ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ GUESS=m88k-tektronix-sysv3
+ ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ GUESS=m68k-tektronix-bsd
+ ;;
+ *:IRIX*:*:*)
+ IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+ GUESS=mips-sgi-irix$IRIX_REL
+ ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ GUESS=i386-ibm-aix
+ ;;
+ ia64:AIX:*:*)
+ if test -x /usr/bin/oslevel ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+ ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+ then
+ GUESS=$SYSTEM_NAME
+ else
+ GUESS=rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ GUESS=rs6000-ibm-aix3.2.4
+ else
+ GUESS=rs6000-ibm-aix3.2
+ fi
+ ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if test -x /usr/bin/lslpp ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+ fi
+ GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+ ;;
+ *:AIX:*:*)
+ GUESS=rs6000-ibm-aix
+ ;;
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+ GUESS=romp-ibm-bsd4.4
+ ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to
+ ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ GUESS=rs6000-bull-bosx
+ ;;
+ DPX/2?00:B.O.S.:*:*)
+ GUESS=m68k-bull-sysv3
+ ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ GUESS=m68k-hp-bsd
+ ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ GUESS=m68k-hp-bsd4.4
+ ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ case $UNAME_MACHINE in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if test -x /usr/bin/getconf; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case $sc_cpu_version in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case $sc_kernel_bits in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if test "$HP_ARCH" = ""; then
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if test "$HP_ARCH" = hppa2.0w
+ then
+ set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH=hppa2.0w
+ else
+ HP_ARCH=hppa64
+ fi
+ fi
+ GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+ ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+ GUESS=ia64-hp-hpux$HPUX_REV
+ ;;
+ 3050*:HI-UX:*:*)
+ set_cc_for_build
+ sed 's/^ //' << EOF > "$dummy.c"
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ GUESS=unknown-hitachi-hiuxwe2
+ ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+ GUESS=hppa1.1-hp-bsd
+ ;;
+ 9000/8??:4.3bsd:*:*)
+ GUESS=hppa1.0-hp-bsd
+ ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ GUESS=hppa1.0-hp-mpeix
+ ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+ GUESS=hppa1.1-hp-osf
+ ;;
+ hp8??:OSF1:*:*)
+ GUESS=hppa1.0-hp-osf
+ ;;
+ i*86:OSF1:*:*)
+ if test -x /usr/sbin/sysversion ; then
+ GUESS=$UNAME_MACHINE-unknown-osf1mk
+ else
+ GUESS=$UNAME_MACHINE-unknown-osf1
+ fi
+ ;;
+ parisc*:Lites*:*:*)
+ GUESS=hppa1.1-hp-lites
+ ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ GUESS=c1-convex-bsd
+ ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ GUESS=c34-convex-bsd
+ ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ GUESS=c38-convex-bsd
+ ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ GUESS=c4-convex-bsd
+ ;;
+ CRAY*Y-MP:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=ymp-cray-unicos$CRAY_REL
+ ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=t90-cray-unicos$CRAY_REL
+ ;;
+ CRAY*T3E:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=alphaev5-cray-unicosmk$CRAY_REL
+ ;;
+ CRAY*SV1:*:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=sv1-cray-unicos$CRAY_REL
+ ;;
+ *:UNICOS/mp:*:*)
+ CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+ GUESS=craynv-cray-unicosmp$CRAY_REL
+ ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+ GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+ GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+ ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+ ;;
+ sparc*:BSD/OS:*:*)
+ GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+ ;;
+ *:BSD/OS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+ ;;
+ arm:FreeBSD:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ set_cc_for_build
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+ else
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+ fi
+ ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case $UNAME_PROCESSOR in
+ amd64)
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
+ esac
+ FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+ ;;
+ i*:CYGWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-cygwin
+ ;;
+ *:MINGW64*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw64
+ ;;
+ *:MINGW*:*)
+ GUESS=$UNAME_MACHINE-pc-mingw32
+ ;;
+ *:MSYS*:*)
+ GUESS=$UNAME_MACHINE-pc-msys
+ ;;
+ i*:PW*:*)
+ GUESS=$UNAME_MACHINE-pc-pw32
+ ;;
+ *:SerenityOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-serenity
+ ;;
+ *:Interix*:*)
+ case $UNAME_MACHINE in
+ x86)
+ GUESS=i586-pc-interix$UNAME_RELEASE
+ ;;
+ authenticamd | genuineintel | EM64T)
+ GUESS=x86_64-unknown-interix$UNAME_RELEASE
+ ;;
+ IA64)
+ GUESS=ia64-unknown-interix$UNAME_RELEASE
+ ;;
+ esac ;;
+ i*:UWIN*:*)
+ GUESS=$UNAME_MACHINE-pc-uwin
+ ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ GUESS=x86_64-pc-cygwin
+ ;;
+ prep*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
+ ;;
+ *:GNU:*:*)
+ # the GNU system
+ GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+ ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+ GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+ ;;
+ *:Minix:*:*)
+ GUESS=$UNAME_MACHINE-unknown-minix
+ ;;
+ aarch64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ arm*:Linux:*:*)
+ set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+ else
+ GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ ;;
+ avr32*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ cris:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ crisv32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+ ;;
+ e2k:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ frv:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ hexagon:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:Linux:*:*)
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+ ;;
+ ia64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ k1om:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m32r*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ m68*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ set_cc_for_build
+ IS_GLIBC=0
+ test x"${LIBC}" = xgnu && IS_GLIBC=1
+ sed 's/^ //' << EOF > "$dummy.c"
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #undef mips64
+ #undef mips64el
+ #if ${IS_GLIBC} && defined(_ABI64)
+ LIBCABI=gnuabi64
+ #else
+ #if ${IS_GLIBC} && defined(_ABIN32)
+ LIBCABI=gnuabin32
+ #else
+ LIBCABI=${LIBC}
+ #endif
+ #endif
+
+ #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa64r6
+ #else
+ #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+ CPU=mipsisa32r6
+ #else
+ #if defined(__mips64)
+ CPU=mips64
+ #else
+ CPU=mips
+ #endif
+ #endif
+ #endif
+
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ MIPS_ENDIAN=el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ MIPS_ENDIAN=
+ #else
+ MIPS_ENDIAN=
+ #endif
+ #endif
+EOF
+ cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+ eval "$cc_set_vars"
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+ ;;
+ mips64el:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ openrisc*:Linux:*:*)
+ GUESS=or1k-unknown-linux-$LIBC
+ ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ padre:Linux:*:*)
+ GUESS=sparc-unknown-linux-$LIBC
+ ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ GUESS=hppa64-unknown-linux-$LIBC
+ ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+ PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+ *) GUESS=hppa-unknown-linux-$LIBC ;;
+ esac
+ ;;
+ ppc64:Linux:*:*)
+ GUESS=powerpc64-unknown-linux-$LIBC
+ ;;
+ ppc:Linux:*:*)
+ GUESS=powerpc-unknown-linux-$LIBC
+ ;;
+ ppc64le:Linux:*:*)
+ GUESS=powerpc64le-unknown-linux-$LIBC
+ ;;
+ ppcle:Linux:*:*)
+ GUESS=powerpcle-unknown-linux-$LIBC
+ ;;
+ riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+ ;;
+ sh64*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sh*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ tile*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ vax:Linux:*:*)
+ GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+ ;;
+ x86_64:Linux:*:*)
+ set_cc_for_build
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_X32 >/dev/null
+ then
+ LIBCABI=${LIBC}x32
+ fi
+ fi
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+ ;;
+ xtensa*:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ GUESS=i386-sequent-sysv4
+ ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+ ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ GUESS=$UNAME_MACHINE-pc-os2-emx
+ ;;
+ i*86:XTS-300:*:STOP)
+ GUESS=$UNAME_MACHINE-unknown-stop
+ ;;
+ i*86:atheos:*:*)
+ GUESS=$UNAME_MACHINE-unknown-atheos
+ ;;
+ i*86:syllable:*:*)
+ GUESS=$UNAME_MACHINE-pc-syllable
+ ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ GUESS=i386-unknown-lynxos$UNAME_RELEASE
+ ;;
+ i*86:*DOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+ ;;
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+ fi
+ ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+ else
+ GUESS=$UNAME_MACHINE-pc-sysv32
+ fi
+ ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configure will decide that
+ # this is a cross-build.
+ GUESS=i586-pc-msdosdjgpp
+ ;;
+ Intel:Mach:3*:*)
+ GUESS=i386-pc-mach3
+ ;;
+ paragon:*:*:*)
+ GUESS=i860-intel-osf1
+ ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
+ fi
+ ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ GUESS=m68010-convergent-sysv
+ ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ GUESS=m68k-convergent-sysv
+ ;;
+ M680?0:D-NIX:5.3:*)
+ GUESS=m68k-diab-dnix
+ ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+ ;;
+ mc68030:UNIX_System_V:4.*:*)
+ GUESS=m68k-atari-sysv4
+ ;;
+ TSUNAMI:LynxOS:2.*:*)
+ GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ rs6000:LynxOS:2.*:*)
+ GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+ ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+ ;;
+ SM[BE]S:UNIX_SV:*:*)
+ GUESS=mips-dde-sysv$UNAME_RELEASE
+ ;;
+ RM*:ReliantUNIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ RM*:SINIX-*:*:*)
+ GUESS=mips-sni-sysv4
+ ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ GUESS=$UNAME_MACHINE-sni-sysv4
+ else
+ GUESS=ns32k-sni-sysv
+ fi
+ ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ GUESS=i586-unisys-sysv4
+ ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ GUESS=hppa1.1-stratus-sysv4
+ ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ GUESS=i860-stratus-sysv4
+ ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=$UNAME_MACHINE-stratus-vos
+ ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ GUESS=hppa1.1-stratus-vos
+ ;;
+ mc68*:A/UX:*:*)
+ GUESS=m68k-apple-aux$UNAME_RELEASE
+ ;;
+ news*:NEWS-OS:6*:*)
+ GUESS=mips-sony-newsos6
+ ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if test -d /usr/nec; then
+ GUESS=mips-nec-sysv$UNAME_RELEASE
+ else
+ GUESS=mips-unknown-sysv$UNAME_RELEASE
+ fi
+ ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ GUESS=powerpc-be-beos
+ ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ GUESS=powerpc-apple-beos
+ ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ GUESS=i586-pc-beos
+ ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ GUESS=i586-pc-haiku
+ ;;
+ x86_64:Haiku:*:*)
+ GUESS=x86_64-unknown-haiku
+ ;;
+ SX-4:SUPER-UX:*:*)
+ GUESS=sx4-nec-superux$UNAME_RELEASE
+ ;;
+ SX-5:SUPER-UX:*:*)
+ GUESS=sx5-nec-superux$UNAME_RELEASE
+ ;;
+ SX-6:SUPER-UX:*:*)
+ GUESS=sx6-nec-superux$UNAME_RELEASE
+ ;;
+ SX-7:SUPER-UX:*:*)
+ GUESS=sx7-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8:SUPER-UX:*:*)
+ GUESS=sx8-nec-superux$UNAME_RELEASE
+ ;;
+ SX-8R:SUPER-UX:*:*)
+ GUESS=sx8r-nec-superux$UNAME_RELEASE
+ ;;
+ SX-ACE:SUPER-UX:*:*)
+ GUESS=sxace-nec-superux$UNAME_RELEASE
+ ;;
+ Power*:Rhapsody:*:*)
+ GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+ ;;
+ *:Rhapsody:*:*)
+ GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+ ;;
+ arm64:Darwin:*:*)
+ GUESS=aarch64-apple-darwin$UNAME_RELEASE
+ ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p`
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ if command -v xcode-select > /dev/null 2> /dev/null && \
+ ! xcode-select --print-path > /dev/null 2> /dev/null ; then
+ # Avoid executing cc if there is no toolchain installed as
+ # cc will be a stub that puts up a graphical alert
+ # prompting the user to install developer tools.
+ CC_FOR_BUILD=no_compiler_found
+ else
+ set_cc_for_build
+ fi
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # uname -m returns i386 or x86_64
+ UNAME_PROCESSOR=$UNAME_MACHINE
+ fi
+ GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+ ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = x86; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+ ;;
+ *:QNX:*:4*)
+ GUESS=i386-pc-qnx
+ ;;
+ NEO-*:NONSTOP_KERNEL:*:*)
+ GUESS=neo-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ GUESS=nse-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsr-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSV-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsv-tandem-nsk$UNAME_RELEASE
+ ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ GUESS=nsx-tandem-nsk$UNAME_RELEASE
+ ;;
+ *:NonStop-UX:*:*)
+ GUESS=mips-compaq-nonstopux
+ ;;
+ BS2000:POSIX*:*:*)
+ GUESS=bs2000-siemens-sysv
+ ;;
+ DS/*:UNIX_System_V:*:*)
+ GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+ ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "${cputype-}" = 386; then
+ UNAME_MACHINE=i386
+ elif test "x${cputype-}" != x; then
+ UNAME_MACHINE=$cputype
+ fi
+ GUESS=$UNAME_MACHINE-unknown-plan9
+ ;;
+ *:TOPS-10:*:*)
+ GUESS=pdp10-unknown-tops10
+ ;;
+ *:TENEX:*:*)
+ GUESS=pdp10-unknown-tenex
+ ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ GUESS=pdp10-dec-tops20
+ ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ GUESS=pdp10-xkl-tops20
+ ;;
+ *:TOPS-20:*:*)
+ GUESS=pdp10-unknown-tops20
+ ;;
+ *:ITS:*:*)
+ GUESS=pdp10-unknown-its
+ ;;
+ SEI:*:*:SEIUX)
+ GUESS=mips-sei-seiux$UNAME_RELEASE
+ ;;
+ *:DragonFly:*:*)
+ DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+ GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+ ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case $UNAME_MACHINE in
+ A*) GUESS=alpha-dec-vms ;;
+ I*) GUESS=ia64-dec-vms ;;
+ V*) GUESS=vax-dec-vms ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ GUESS=i386-pc-xenix
+ ;;
+ i*86:skyos:*:*)
+ SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+ GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+ ;;
+ i*86:rdos:*:*)
+ GUESS=$UNAME_MACHINE-pc-rdos
+ ;;
+ i*86:Fiwix:*:*)
+ GUESS=$UNAME_MACHINE-pc-fiwix
+ ;;
+ *:AROS:*:*)
+ GUESS=$UNAME_MACHINE-unknown-aros
+ ;;
+ x86_64:VMkernel:*:*)
+ GUESS=$UNAME_MACHINE-unknown-esx
+ ;;
+ amd64:Isilon\ OneFS:*:*)
+ GUESS=x86_64-unknown-onefs
+ ;;
+ *:Unleashed:*:*)
+ GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+ ;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+ echo "$GUESS"
+ exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+ printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname un;
+ uname (&un);
+ printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+ struct utsname *un;
+ uname (&un);
+ printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+ printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+ ;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+ https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+ cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
new file mode 100755
index 0000000..1e1ab67
--- /dev/null
+++ b/build-aux/config.rpath
@@ -0,0 +1,684 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2022 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 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.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ nagfor*)
+ wl='-Wl,-Wl,,'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ F* | *Sun*Fortran*)
+ wl=
+ ;;
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ newsos6)
+ ;;
+ *nto* | *qnx*)
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ wl='-Qoption ld '
+ ;;
+ *)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # 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.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ haiku*)
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ 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
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ 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
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc)
+ ;;
+ m68k)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd2.[01]*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly* | midnightbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ *nto* | *qnx*)
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ case "$host_cpu" in
+ powerpc*)
+ library_names_spec='$libname$shrext' ;;
+ m68k)
+ library_names_spec='$libname.a' ;;
+ esac
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd[23].*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ freebsd* | dragonfly* | midnightbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ haiku*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ *nto* | *qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ tpf*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/build-aux/config.sub b/build-aux/config.sub
new file mode 100755
index 0000000..9b62e37
--- /dev/null
+++ b/build-aux/config.sub
@@ -0,0 +1,1890 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2021 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2021-12-25'
+
+# This file 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 <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX. However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2021 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."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo "$1"
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
+ ;;
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ basic_os=$field3-$field4
+ ;;
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ basic_os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ basic_os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ basic_os=$field3
+ ;;
+ esac
+ ;;
+ *-*)
+ # A lone config we happen to match not fitting any pattern
+ case $field1-$field2 in
+ decstation-3100)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ zephyr*)
+ basic_machine=$field1-unknown
+ basic_os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* \
+ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+ | ultra | tti* | harris | dolphin | highlevel | gould \
+ | cbm | ns | masscomp | apple | axis | knuth | cray \
+ | microblaze* | sim | cisco \
+ | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ basic_os=
+ ;;
+ *)
+ basic_machine=$field1
+ basic_os=$field2
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ basic_os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ basic_os=scout
+ ;;
+ alliant)
+ basic_machine=fx80-alliant
+ basic_os=
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ basic_os=
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ basic_os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ basic_os=sysv
+ ;;
+ amiga)
+ basic_machine=m68k-unknown
+ basic_os=
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ basic_os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ basic_os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ basic_os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ basic_os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ basic_os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ basic_os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ basic_os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ basic_os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ basic_os=cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ basic_os=bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ basic_os=bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ basic_os=bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ basic_os=bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ basic_os=bsd
+ ;;
+ cray)
+ basic_machine=j90-cray
+ basic_os=unicos
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ basic_os=
+ ;;
+ da30)
+ basic_machine=m68k-da30
+ basic_os=
+ ;;
+ decstation | pmax | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ basic_os=
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ basic_os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ basic_os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ basic_os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ basic_os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ basic_os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ basic_os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ basic_os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ basic_os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ basic_os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ basic_os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ basic_os=sysv3
+ ;;
+ hp300 | hp300hpux)
+ basic_machine=m68k-hp
+ basic_os=hpux
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ basic_os=bsd
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ basic_os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ basic_os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ basic_os=mach
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ basic_os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ basic_os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ basic_os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ basic_os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ basic_os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ basic_os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ basic_os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ basic_os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ basic_os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ basic_os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ basic_os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ basic_os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ basic_os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-pc
+ basic_os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ basic_os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ basic_os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ basic_os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ basic_os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ basic_os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ basic_os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ basic_os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ basic_os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ basic_os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ basic_os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ basic_os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ basic_os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ basic_os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ basic_os=linux
+ ;;
+ psp)
+ basic_machine=mipsallegrexel-sony
+ basic_os=psp
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ basic_os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ basic_os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ basic_os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ basic_os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ basic_os=seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ basic_os=
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ basic_os=sysv2
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ basic_os=
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ basic_os=sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ basic_os=
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ basic_os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ basic_os=sunos4
+ ;;
+ sun3)
+ basic_machine=m68k-sun
+ basic_os=
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ basic_os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ basic_os=sunos4
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ basic_os=
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ basic_os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ basic_os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ basic_os=solaris2
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ basic_os=
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ basic_os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ basic_os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ basic_os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ basic_os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ basic_os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ basic_os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ basic_os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ basic_os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ basic_os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ basic_os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ basic_os=vms
+ ;;
+ vsta)
+ basic_machine=i386-pc
+ basic_os=vsta
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ basic_os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ basic_os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ basic_os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ basic_os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ basic_os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ basic_os=
+ ;;
+ esac
+ ;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+ # Here we handle the default manufacturer of certain CPU types. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ cpu=hppa1.1
+ vendor=winbond
+ ;;
+ op50n)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ op60c)
+ cpu=hppa1.1
+ vendor=oki
+ ;;
+ ibm*)
+ cpu=i370
+ vendor=ibm
+ ;;
+ orion105)
+ cpu=clipper
+ vendor=highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ cpu=m68k
+ vendor=apple
+ ;;
+ pmac | pmac-mpw)
+ cpu=powerpc
+ vendor=apple
+ ;;
+
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ cpu=m68000
+ vendor=att
+ ;;
+ 3b*)
+ cpu=we32k
+ vendor=att
+ ;;
+ bluegene*)
+ cpu=powerpc
+ vendor=ibm
+ basic_os=cnk
+ ;;
+ decsystem10* | dec10*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops10
+ ;;
+ decsystem20* | dec20*)
+ cpu=pdp10
+ vendor=dec
+ basic_os=tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ cpu=m68k
+ vendor=motorola
+ ;;
+ dpx2*)
+ cpu=m68k
+ vendor=bull
+ basic_os=sysv3
+ ;;
+ encore | umax | mmax)
+ cpu=ns32k
+ vendor=encore
+ ;;
+ elxsi)
+ cpu=elxsi
+ vendor=elxsi
+ basic_os=${basic_os:-bsd}
+ ;;
+ fx2800)
+ cpu=i860
+ vendor=alliant
+ ;;
+ genix)
+ cpu=ns32k
+ vendor=ns
+ ;;
+ h3050r* | hiux*)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ cpu=m68000
+ vendor=hp
+ ;;
+ hp9k3[2-9][0-9])
+ cpu=m68k
+ vendor=hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ cpu=hppa1.1
+ vendor=hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ cpu=hppa1.0
+ vendor=hp
+ ;;
+ i*86v32)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv32
+ ;;
+ i*86v4*)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv4
+ ;;
+ i*86v)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=sysv
+ ;;
+ i*86sol2)
+ cpu=`echo "$1" | sed -e 's/86.*/86/'`
+ vendor=pc
+ basic_os=solaris2
+ ;;
+ j90 | j90-cray)
+ cpu=j90
+ vendor=cray
+ basic_os=${basic_os:-unicos}
+ ;;
+ iris | iris4d)
+ cpu=mips
+ vendor=sgi
+ case $basic_os in
+ irix*)
+ ;;
+ *)
+ basic_os=irix4
+ ;;
+ esac
+ ;;
+ miniframe)
+ cpu=m68000
+ vendor=convergent
+ ;;
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ cpu=m68k
+ vendor=atari
+ basic_os=mint
+ ;;
+ news-3600 | risc-news)
+ cpu=mips
+ vendor=sony
+ basic_os=newsos
+ ;;
+ next | m*-next)
+ cpu=m68k
+ vendor=next
+ case $basic_os in
+ openstep*)
+ ;;
+ nextstep*)
+ ;;
+ ns2*)
+ basic_os=nextstep2
+ ;;
+ *)
+ basic_os=nextstep3
+ ;;
+ esac
+ ;;
+ np1)
+ cpu=np1
+ vendor=gould
+ ;;
+ op50n-* | op60c-*)
+ cpu=hppa1.1
+ vendor=oki
+ basic_os=proelf
+ ;;
+ pa-hitachi)
+ cpu=hppa1.1
+ vendor=hitachi
+ basic_os=hiuxwe2
+ ;;
+ pbd)
+ cpu=sparc
+ vendor=tti
+ ;;
+ pbb)
+ cpu=m68k
+ vendor=tti
+ ;;
+ pc532)
+ cpu=ns32k
+ vendor=pc532
+ ;;
+ pn)
+ cpu=pn
+ vendor=gould
+ ;;
+ power)
+ cpu=power
+ vendor=ibm
+ ;;
+ ps2)
+ cpu=i386
+ vendor=ibm
+ ;;
+ rm[46]00)
+ cpu=mips
+ vendor=siemens
+ ;;
+ rtpc | rtpc-*)
+ cpu=romp
+ vendor=ibm
+ ;;
+ sde)
+ cpu=mipsisa32
+ vendor=sde
+ basic_os=${basic_os:-elf}
+ ;;
+ simso-wrs)
+ cpu=sparclite
+ vendor=wrs
+ basic_os=vxworks
+ ;;
+ tower | tower-32)
+ cpu=m68k
+ vendor=ncr
+ ;;
+ vpp*|vx|vx-*)
+ cpu=f301
+ vendor=fujitsu
+ ;;
+ w65)
+ cpu=w65
+ vendor=wdc
+ ;;
+ w89k-*)
+ cpu=hppa1.1
+ vendor=winbond
+ basic_os=proelf
+ ;;
+ none)
+ cpu=none
+ vendor=none
+ ;;
+ leon|leon[3-9])
+ cpu=sparc
+ vendor=$basic_machine
+ ;;
+ leon-*|leon[3-9]-*)
+ cpu=sparc
+ vendor=`echo "$basic_machine" | sed 's/-.*//'`
+ ;;
+
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+ IFS=$saved_IFS
+ ;;
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ cpu=$basic_machine
+ vendor=pc
+ ;;
+ # These rules are duplicated from below for sake of the special case above;
+ # i.e. things that normalized to x86 arches should also default to "pc"
+ pc98)
+ cpu=i386
+ vendor=pc
+ ;;
+ x64 | amd64)
+ cpu=x86_64
+ vendor=pc
+ ;;
+ # Recognize the basic CPU types without company name.
+ *)
+ cpu=$basic_machine
+ vendor=unknown
+ ;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+ # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+ # some cases the only manufacturer, in others, it is the most popular.
+ craynv-unknown)
+ vendor=cray
+ basic_os=${basic_os:-unicosmp}
+ ;;
+ c90-unknown | c90-cray)
+ vendor=cray
+ basic_os=${Basic_os:-unicos}
+ ;;
+ fx80-unknown)
+ vendor=alliant
+ ;;
+ romp-unknown)
+ vendor=ibm
+ ;;
+ mmix-unknown)
+ vendor=knuth
+ ;;
+ microblaze-unknown | microblazeel-unknown)
+ vendor=xilinx
+ ;;
+ rs6000-unknown)
+ vendor=ibm
+ ;;
+ vax-unknown)
+ vendor=dec
+ ;;
+ pdp11-unknown)
+ vendor=dec
+ ;;
+ we32k-unknown)
+ vendor=att
+ ;;
+ cydra-unknown)
+ vendor=cydrome
+ ;;
+ i370-ibm*)
+ vendor=ibm
+ ;;
+ orion-unknown)
+ vendor=highlevel
+ ;;
+ xps-unknown | xps100-unknown)
+ cpu=xps100
+ vendor=honeywell
+ ;;
+
+ # Here we normalize CPU types with a missing or matching vendor
+ armh-unknown | armh-alt)
+ cpu=armv7l
+ vendor=alt
+ basic_os=${basic_os:-linux-gnueabihf}
+ ;;
+ dpx20-unknown | dpx20-bull)
+ cpu=rs6000
+ vendor=bull
+ basic_os=${basic_os:-bosx}
+ ;;
+
+ # Here we normalize CPU types irrespective of the vendor
+ amd64-*)
+ cpu=x86_64
+ ;;
+ blackfin-*)
+ cpu=bfin
+ basic_os=linux
+ ;;
+ c54x-*)
+ cpu=tic54x
+ ;;
+ c55x-*)
+ cpu=tic55x
+ ;;
+ c6x-*)
+ cpu=tic6x
+ ;;
+ e500v[12]-*)
+ cpu=powerpc
+ basic_os=${basic_os}"spe"
+ ;;
+ mips3*-*)
+ cpu=mips64
+ ;;
+ ms1-*)
+ cpu=mt
+ ;;
+ m68knommu-*)
+ cpu=m68k
+ basic_os=linux
+ ;;
+ m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+ cpu=s12z
+ ;;
+ openrisc-*)
+ cpu=or32
+ ;;
+ parisc-*)
+ cpu=hppa
+ basic_os=linux
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ cpu=i586
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ cpu=i686
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ cpu=i686
+ ;;
+ pentium4-*)
+ cpu=i786
+ ;;
+ pc98-*)
+ cpu=i386
+ ;;
+ ppc-* | ppcbe-*)
+ cpu=powerpc
+ ;;
+ ppcle-* | powerpclittle-*)
+ cpu=powerpcle
+ ;;
+ ppc64-*)
+ cpu=powerpc64
+ ;;
+ ppc64le-* | powerpc64little-*)
+ cpu=powerpc64le
+ ;;
+ sb1-*)
+ cpu=mipsisa64sb1
+ ;;
+ sb1el-*)
+ cpu=mipsisa64sb1el
+ ;;
+ sh5e[lb]-*)
+ cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+ ;;
+ spur-*)
+ cpu=spur
+ ;;
+ strongarm-* | thumb-*)
+ cpu=arm
+ ;;
+ tx39-*)
+ cpu=mipstx39
+ ;;
+ tx39el-*)
+ cpu=mipstx39el
+ ;;
+ x64-*)
+ cpu=x86_64
+ ;;
+ xscale-* | xscalee[bl]-*)
+ cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+ ;;
+ arm64-* | aarch64le-*)
+ cpu=aarch64
+ ;;
+
+ # Recognize the canonical CPU Types that limit and/or modify the
+ # company names they are paired with.
+ cr16-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ crisv32-* | etraxfs*-*)
+ cpu=crisv32
+ vendor=axis
+ ;;
+ cris-* | etrax*-*)
+ cpu=cris
+ vendor=axis
+ ;;
+ crx-*)
+ basic_os=${basic_os:-elf}
+ ;;
+ neo-tandem)
+ cpu=neo
+ vendor=tandem
+ ;;
+ nse-tandem)
+ cpu=nse
+ vendor=tandem
+ ;;
+ nsr-tandem)
+ cpu=nsr
+ vendor=tandem
+ ;;
+ nsv-tandem)
+ cpu=nsv
+ vendor=tandem
+ ;;
+ nsx-tandem)
+ cpu=nsx
+ vendor=tandem
+ ;;
+ mipsallegrexel-sony)
+ cpu=mipsallegrexel
+ vendor=sony
+ ;;
+ tile*-*)
+ basic_os=${basic_os:-linux-gnu}
+ ;;
+
+ *)
+ # Recognize the canonical CPU types that are allowed with any
+ # company name.
+ case $cpu in
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | abacus \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+ | alphapca5[67] | alpha64pca5[67] \
+ | am33_2.0 \
+ | amdgcn \
+ | arc | arceb | arc32 | arc64 \
+ | arm | arm[lb]e | arme[lb] | armv* \
+ | avr | avr32 \
+ | asmjs \
+ | ba \
+ | be32 | be64 \
+ | bfin | bpf | bs2000 \
+ | c[123]* | c30 | [cjt]90 | c4x \
+ | c8051 | clipper | craynv | csky | cydra \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | elxsi | epiphany \
+ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+ | h8300 | h8500 \
+ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i*86 | i860 | i960 | ia16 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | loongarch32 | loongarch64 | loongarchx32 \
+ | m32c | m32r | m32rle \
+ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+ | m88110 | m88k | maxq | mb | mcore | mep | metag \
+ | microblaze | microblazeel \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64eb | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r3 | mipsisa32r3el \
+ | mipsisa32r5 | mipsisa32r5el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r3 | mipsisa64r3el \
+ | mipsisa64r5 | mipsisa64r5el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mmix \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nfp \
+ | nios | nios2 | nios2eb | nios2el \
+ | none | np1 | ns16k | ns32k | nvptx \
+ | open8 \
+ | or1k* \
+ | or32 \
+ | orion \
+ | picochip \
+ | pdp10 | pdp11 | pj | pjl | pn | power \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pru \
+ | pyramid \
+ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+ | rl78 | romp | rs6000 | rx \
+ | s390 | s390x \
+ | score \
+ | sh | shl \
+ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | spu \
+ | tahoe \
+ | thumbv7* \
+ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tron \
+ | ubicom32 \
+ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | vax \
+ | visium \
+ | w65 \
+ | wasm32 | wasm64 \
+ | we32k \
+ | x86 | x86_64 | xc16x | xgate | xps100 \
+ | xstormy16 | xtensa* \
+ | ymp \
+ | z8k | z80)
+ ;;
+
+ *)
+ echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+ digital*)
+ vendor=dec
+ ;;
+ commodore*)
+ vendor=cbm
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+ gnu/linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+ ;;
+ os2-emx)
+ kernel=os2
+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+ ;;
+ nto-qnx*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+ ;;
+ *-*)
+ # shellcheck disable=SC2162
+ saved_IFS=$IFS
+ IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+ IFS=$saved_IFS
+ ;;
+ # Default OS when just kernel was specified
+ nto*)
+ kernel=nto
+ os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+ ;;
+ linux*)
+ kernel=linux
+ os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+ ;;
+ *)
+ kernel=
+ os=$basic_os
+ ;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
+ ;;
+ bluegene*)
+ os=cnk
+ ;;
+ solaris1 | solaris1.*)
+ os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+ ;;
+ solaris)
+ os=solaris2
+ ;;
+ unixware*)
+ os=sysv4.2uw
+ ;;
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco*v* | scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ qnx*)
+ os=qnx
+ ;;
+ hiux*)
+ os=hiuxwe2
+ ;;
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
+ ;;
+ lynxos*)
+ # don't get caught up in next wildcard
+ ;;
+ lynx*)
+ os=lynxos
+ ;;
+ mac[0-9]*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
+ ;;
+ opened*)
+ os=openedition
+ ;;
+ os400*)
+ os=os400
+ ;;
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+ ;;
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+ ;;
+ wince*)
+ os=wince
+ ;;
+ utek*)
+ os=bsd
+ ;;
+ dynix*)
+ os=bsd
+ ;;
+ acis*)
+ os=aos
+ ;;
+ atheos*)
+ os=atheos
+ ;;
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
+ ;;
+ ctix* | uts*)
+ os=sysv
+ ;;
+ nova*)
+ os=rtmk-nova
+ ;;
+ ns2)
+ os=nextstep2
+ ;;
+ # Preserve the version number of sinix5.
+ sinix5.*)
+ os=`echo "$os" | sed -e 's|sinix|sysv|'`
+ ;;
+ sinix*)
+ os=sysv4
+ ;;
+ tpf*)
+ os=tpf
+ ;;
+ triton*)
+ os=sysv3
+ ;;
+ oss*)
+ os=sysv3
+ ;;
+ svr4*)
+ os=sysv4
+ ;;
+ svr3)
+ os=sysv3
+ ;;
+ sysvr4)
+ os=sysv4
+ ;;
+ ose*)
+ os=ose
+ ;;
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
+ ;;
+ dicos*)
+ os=dicos
+ ;;
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $cpu in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
+ ;;
+ *)
+ # No normalization, but not necessarily accepted, that comes below.
+ ;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+ score-*)
+ os=elf
+ ;;
+ spu-*)
+ os=elf
+ ;;
+ *-acorn)
+ os=riscix1.2
+ ;;
+ arm*-rebel)
+ kernel=linux
+ os=gnu
+ ;;
+ arm*-semi)
+ os=aout
+ ;;
+ c4x-* | tic4x-*)
+ os=coff
+ ;;
+ c8051-*)
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
+ ;;
+ hexagon-*)
+ os=elf
+ ;;
+ tic54x-*)
+ os=coff
+ ;;
+ tic55x-*)
+ os=coff
+ ;;
+ tic6x-*)
+ os=coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=tops20
+ ;;
+ pdp11-*)
+ os=none
+ ;;
+ *-dec | vax-*)
+ os=ultrix4.2
+ ;;
+ m68*-apollo)
+ os=domain
+ ;;
+ i386-sun)
+ os=sunos4.0.2
+ ;;
+ m68000-sun)
+ os=sunos3
+ ;;
+ m68*-cisco)
+ os=aout
+ ;;
+ mep-*)
+ os=elf
+ ;;
+ mips*-cisco)
+ os=elf
+ ;;
+ mips*-*)
+ os=elf
+ ;;
+ or32-*)
+ os=coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=sysv3
+ ;;
+ sparc-* | *-sun)
+ os=sunos4.1.1
+ ;;
+ pru-*)
+ os=elf
+ ;;
+ *-be)
+ os=beos
+ ;;
+ *-ibm)
+ os=aix
+ ;;
+ *-knuth)
+ os=mmixware
+ ;;
+ *-wec)
+ os=proelf
+ ;;
+ *-winbond)
+ os=proelf
+ ;;
+ *-oki)
+ os=proelf
+ ;;
+ *-hp)
+ os=hpux
+ ;;
+ *-hitachi)
+ os=hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=sysv
+ ;;
+ *-cbm)
+ os=amigaos
+ ;;
+ *-dg)
+ os=dgux
+ ;;
+ *-dolphin)
+ os=sysv3
+ ;;
+ m68k-ccur)
+ os=rtu
+ ;;
+ m88k-omron*)
+ os=luna
+ ;;
+ *-next)
+ os=nextstep
+ ;;
+ *-sequent)
+ os=ptx
+ ;;
+ *-crds)
+ os=unos
+ ;;
+ *-ns)
+ os=genix
+ ;;
+ i370-*)
+ os=mvs
+ ;;
+ *-gould)
+ os=sysv
+ ;;
+ *-highlevel)
+ os=bsd
+ ;;
+ *-encore)
+ os=bsd
+ ;;
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
+ ;;
+ *-masscomp)
+ os=rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=uxpv
+ ;;
+ *-rom68k)
+ os=coff
+ ;;
+ *-*bug)
+ os=coff
+ ;;
+ *-apple)
+ os=macos
+ ;;
+ *-atari*)
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
+ ;;
+ *)
+ os=none
+ ;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+ # Sometimes we do "kernel-libc", so those need to count as OSes.
+ musl* | newlib* | relibc* | uclibc*)
+ ;;
+ # Likewise for "kernel-abi"
+ eabi* | gnueabi*)
+ ;;
+ # VxWorks passes extra cpu info in the 4th filed.
+ simlinux | simwindows | spe)
+ ;;
+ # Now accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST end in a * to match a version number.
+ gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
+ | hiux* | abug | nacl* | netware* | windows* \
+ | os9* | macos* | osx* | ios* \
+ | mpw* | magic* | mmixware* | mon960* | lnews* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* | twizzler* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+ | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* | serenity* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | mint* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+ | fiwix* )
+ ;;
+ # This one is extra strict with allowed versions
+ sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ none)
+ ;;
+ *)
+ echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+ linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+ | linux-musl* | linux-relibc* | linux-uclibc* )
+ ;;
+ uclinux-uclibc* )
+ ;;
+ -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+ # These are just libc implementations, not actual OSes, and thus
+ # require a kernel.
+ echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+ exit 1
+ ;;
+ kfreebsd*-gnu* | kopensolaris*-gnu*)
+ ;;
+ vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ ;;
+ nto-qnx*)
+ ;;
+ os2-emx)
+ ;;
+ *-eabi* | *-gnueabi*)
+ ;;
+ -*)
+ # Blank kernel with real OS is always fine.
+ ;;
+ *-*)
+ echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+case $vendor in
+ unknown)
+ case $cpu-$os in
+ *-riscix*)
+ vendor=acorn
+ ;;
+ *-sunos*)
+ vendor=sun
+ ;;
+ *-cnk* | *-aix*)
+ vendor=ibm
+ ;;
+ *-beos*)
+ vendor=be
+ ;;
+ *-hpux*)
+ vendor=hp
+ ;;
+ *-mpeix*)
+ vendor=hp
+ ;;
+ *-hiux*)
+ vendor=hitachi
+ ;;
+ *-unos*)
+ vendor=crds
+ ;;
+ *-dgux*)
+ vendor=dg
+ ;;
+ *-luna*)
+ vendor=omron
+ ;;
+ *-genix*)
+ vendor=ns
+ ;;
+ *-clix*)
+ vendor=intergraph
+ ;;
+ *-mvs* | *-opened*)
+ vendor=ibm
+ ;;
+ *-os400*)
+ vendor=ibm
+ ;;
+ s390-* | s390x-*)
+ vendor=ibm
+ ;;
+ *-ptx*)
+ vendor=sequent
+ ;;
+ *-tpf*)
+ vendor=ibm
+ ;;
+ *-vxsim* | *-vxworks* | *-windiss*)
+ vendor=wrs
+ ;;
+ *-aux*)
+ vendor=apple
+ ;;
+ *-hms*)
+ vendor=hitachi
+ ;;
+ *-mpw* | *-macos*)
+ vendor=apple
+ ;;
+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+ vendor=atari
+ ;;
+ *-vos*)
+ vendor=stratus
+ ;;
+ esac
+ ;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/depcomp b/build-aux/depcomp
new file mode 100755
index 0000000..715e343
--- /dev/null
+++ b/build-aux/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
+
+# 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, 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 <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts '$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for ':'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+ "$@" $dashmflag |
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/install-sh b/build-aux/install-sh
new file mode 100755
index 0000000..ec298b5
--- /dev/null
+++ b/build-aux/install-sh
@@ -0,0 +1,541 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2020-11-14.01; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# 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
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
+ -s $stripprog installed files.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -p) cpprog="$cpprog -p";;
+
+ -s) stripcmd=$stripprog;;
+
+ -S) backupsuffix="$2"
+ shift;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dstbase=`basename "$src"`
+ case $dst in
+ */) dst=$dst$dstbase;;
+ *) dst=$dst/$dstbase;;
+ esac
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ case $dstdir in
+ */) dstdirslash=$dstdir;;
+ *) dstdirslash=$dstdir/;;
+ esac
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ # The $RANDOM variable is not portable (e.g., dash). Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap '
+ ret=$?
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+ exit $ret
+ ' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p'.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=${dstdirslash}_inst.$$_
+ rmtmp=${dstdirslash}_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask &&
+ { test -z "$stripcmd" || {
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
+ # which would cause strip to fail.
+ if test -z "$doit"; then
+ : >"$dsttmp" # No need to fork-exec 'touch'.
+ else
+ $doit touch "$dsttmp"
+ fi
+ }
+ } &&
+ $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
new file mode 100644
index 0000000..5506693
--- /dev/null
+++ b/build-aux/ltmain.sh
@@ -0,0 +1,11437 @@
+#! /usr/bin/env sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+## by inline-source v2019-02-19.15
+
+# libtool (GNU libtool) 2.4.7.4-1ec8f-dirty
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996-2019, 2021-2022 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 <http://www.gnu.org/licenses/>.
+
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.7.4-1ec8f-dirty
+package_revision=2.4.7.4
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2019-02-19.15; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# This is free software. There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2004-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it. See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
+
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
+#
+# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
+#
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
+
+
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
+fi
+
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test set = \"\${$_G_var+set}\"; then
+ save_$_G_var=\$$_G_var
+ $_G_var=C
+ export $_G_var
+ _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
+ fi"
+done
+# These NLS vars are set unconditionally (bootstrap issue #24). Unset those
+# in case the environment reset is needed later and the $save_* variant is not
+# defined (see the code above).
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp $nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+ 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
+
+
+# func_unset VAR
+# --------------
+# Portably unset VAR.
+# In some shells, an 'unset VAR' statement leaves a non-zero return
+# status if VAR is already unset, which might be problematic if the
+# statement is used at the end of a function (thus poisoning its return
+# value) or when 'set -e' is active (causing even a spurious abort of
+# the script in this case).
+func_unset ()
+{
+ { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
+}
+
+
+# Make sure CDPATH doesn't cause `cd` commands to output the target dir.
+func_unset CDPATH
+
+# Make sure ${,E,F}GREP behave sanely.
+func_unset GREP_OPTIONS
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+ _G_progs_list=$1
+ _G_check_func=$2
+ _G_PATH=${3-"$PATH"}
+
+ _G_path_prog_max=0
+ _G_path_prog_found=false
+ _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+ for _G_dir in $_G_PATH; do
+ IFS=$_G_save_IFS
+ test -z "$_G_dir" && _G_dir=.
+ for _G_prog_name in $_G_progs_list; do
+ for _exeext in '' .EXE; do
+ _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+ func_executable_p "$_G_path_prog" || continue
+ case `"$_G_path_prog" --version 2>&1` in
+ *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+ *) $_G_check_func $_G_path_prog
+ func_path_progs_result=$func_check_prog_result
+ ;;
+ esac
+ $_G_path_prog_found && break 3
+ done
+ done
+ done
+ IFS=$_G_save_IFS
+ test -z "$func_path_progs_result" && {
+ echo "no acceptable sed could be found in \$PATH" >&2
+ exit 1
+ }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+ _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for _G_i in 1 2 3 4 5 6 7; do
+ _G_sed_script=$_G_sed_script$nl$_G_sed_script
+ done
+ echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+ _G_sed_script=
+
+ func_check_prog_sed ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo '' >> conftest.nl
+ "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
+ rm -f conftest.sed
+ SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+ func_check_prog_grep ()
+ {
+ _G_path_prog=$1
+
+ _G_count=0
+ _G_path_prog_max=0
+ printf 0123456789 >conftest.in
+ while :
+ do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo 'GREP' >> conftest.nl
+ "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+ diff conftest.out conftest.nl >/dev/null 2>&1 || break
+ _G_count=`expr $_G_count + 1`
+ if test "$_G_count" -gt "$_G_path_prog_max"; then
+ # Best one so far, save it but keep looking for a better one
+ func_check_prog_result=$_G_path_prog
+ _G_path_prog_max=$_G_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test 10 -lt "$_G_count" && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out
+ }
+
+ func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
+ GREP=$func_path_progs_result
+}
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# All uppercase variable names are used for environment variables. These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
+
+: ${CP="cp -f"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes. A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same. If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion. Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+ s/$_G_bs4/&\\
+/g
+ s/^$_G_bs2$_G_dollar/$_G_bs&/
+ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+ s/\n//g"
+
+# require_check_ifs_backslash
+# ---------------------------
+# Check if we can use backslash as IFS='\' separator, and set
+# $check_ifs_backshlash_broken to ':' or 'false'.
+require_check_ifs_backslash=func_require_check_ifs_backslash
+func_require_check_ifs_backslash ()
+{
+ _G_save_IFS=$IFS
+ IFS='\'
+ _G_check_ifs_backshlash='a\\b'
+ for _G_i in $_G_check_ifs_backshlash
+ do
+ case $_G_i in
+ a)
+ check_ifs_backshlash_broken=false
+ ;;
+ '')
+ break
+ ;;
+ *)
+ check_ifs_backshlash_broken=:
+ break
+ ;;
+ esac
+ done
+ IFS=$_G_save_IFS
+ require_check_ifs_backslash=:
+}
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
+
+# By convention, finish your script with:
+#
+# exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
+
+# Make sure we have an absolute progpath for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath=$progdir/$progname
+ ;;
+ *)
+ _G_IFS=$IFS
+ IFS=${PATH_SEPARATOR-:}
+ for progdir in $PATH; do
+ IFS=$_G_IFS
+ test -x "$progdir/$progname" && break
+ done
+ IFS=$_G_IFS
+ test -n "$progdir" || progdir=`pwd`
+ progpath=$progdir/$progname
+ ;;
+esac
+
+
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
+
+opt_dry_run=false
+opt_quiet=false
+opt_verbose=false
+
+# Categories 'all' and 'none' are always available. Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'. Set
+# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+ $debug_cmd
+
+ test -t 1 && {
+ # COLORTERM and USE_ANSI_COLORS environment variables take
+ # precedence, because most terminfo databases neglect to describe
+ # whether color sequences are supported.
+ test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+ if test 1 = "$USE_ANSI_COLORS"; then
+ # Standard ANSI escape sequences
+ tc_reset=''
+ tc_bold=''; tc_standout=''
+ tc_red=''; tc_green=''
+ tc_blue=''; tc_cyan=''
+ else
+ # Otherwise trust the terminfo database after all.
+ test -n "`tput sgr0 2>/dev/null`" && {
+ tc_reset=`tput sgr0`
+ test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+ tc_standout=$tc_bold
+ test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+ test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+ test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+ test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+ test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+ }
+ fi
+ }
+
+ require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+ # We should try to minimise forks, especially on Windows where they are
+ # unreasonably slow, so skip the feature probes when bash or zsh are
+ # being used:
+ if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+ : ${_G_HAVE_ARITH_OP="yes"}
+ : ${_G_HAVE_XSI_OPS="yes"}
+ # The += operator was introduced in bash 3.1
+ case $BASH_VERSION in
+ [12].* | 3.0 | 3.0*) ;;
+ *)
+ : ${_G_HAVE_PLUSEQ_OP="yes"}
+ ;;
+ esac
+ fi
+
+ # _G_HAVE_PLUSEQ_OP
+ # Can be empty, in which case the shell is probed, "yes" if += is
+ # useable or anything else if it does not work.
+ test -z "$_G_HAVE_PLUSEQ_OP" \
+ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+ && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_append ()
+ {
+ $debug_cmd
+
+ eval "$1+=\$2"
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_append ()
+ {
+ $debug_cmd
+
+ eval "$1=\$$1\$2"
+ }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+ eval 'func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_arg pretty "$2"
+ eval "$1+=\\ \$func_quote_arg_result"
+ }'
+else
+ func_append_quoted ()
+ {
+ $debug_cmd
+
+ func_quote_arg pretty "$2"
+ eval "$1=\$$1\\ \$func_quote_arg_result"
+ }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE. For example:
+#
+# func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+ $debug_cmd
+
+ eval _G_current_value='`$ECHO $'$1'`'
+ _G_delim=`expr "$2" : '\(.\)'`
+
+ case $_G_delim$_G_current_value$_G_delim in
+ *"$2$_G_delim"*) ;;
+ *) func_append "$@" ;;
+ esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+ test -z "$_G_HAVE_ARITH_OP" \
+ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+ && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+ eval 'func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=$(( $* ))
+ }'
+else
+ func_arith ()
+ {
+ $debug_cmd
+
+ func_arith_result=`expr "$@"`
+ }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ # If this shell supports suffix pattern removal, then use it to avoid
+ # forking. Hide the definitions single quotes in case the shell chokes
+ # on unsupported syntax...
+ _b='func_basename_result=${1##*/}'
+ _d='case $1 in
+ */*) func_dirname_result=${1%/*}$2 ;;
+ * ) func_dirname_result=$3 ;;
+ esac'
+
+else
+ # ...otherwise fall back to using sed.
+ _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+ _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
+ if test "X$func_dirname_result" = "X$1"; then
+ func_dirname_result=$3
+ else
+ func_append func_dirname_result "$2"
+ fi'
+fi
+
+eval 'func_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+ $debug_cmd
+
+ '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+ $debug_cmd
+
+ '"$_b"'
+ '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ _G_infix=$1; shift
+ _G_indent=$_G_infix
+ _G_prefix="$progname: $_G_infix: "
+ _G_message=$*
+
+ # Strip color escape sequences before counting printable length
+ for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+ do
+ test -n "$_G_tc" && {
+ _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+ _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+ }
+ done
+ _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
+
+ func_echo_infix_1_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_infix_1_IFS
+ $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+ _G_prefix=$_G_indent
+ done
+ IFS=$func_echo_infix_1_IFS
+}
+
+
+# func_error ARG...
+# -----------------
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ $debug_cmd
+
+ func_error "$*"
+ exit $EXIT_FAILURE
+}
+
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $debug_cmd
+
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+ test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=${#1}
+ }'
+else
+ func_len ()
+ {
+ $debug_cmd
+
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+ }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ $debug_cmd
+
+ _G_directory_path=$1
+ _G_dir_list=
+
+ if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+ # Protect directory names starting with '-'
+ case $_G_directory_path in
+ -*) _G_directory_path=./$_G_directory_path ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$_G_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ _G_dir_list=$_G_directory_path:$_G_dir_list
+
+ # If the last portion added has no slash in it, the list is done
+ case $_G_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+ done
+ _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+ func_mkdir_p_IFS=$IFS; IFS=:
+ for _G_dir in $_G_dir_list; do
+ IFS=$func_mkdir_p_IFS
+ # mkdir can fail with a 'File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$_G_dir" 2>/dev/null || :
+ done
+ IFS=$func_mkdir_p_IFS
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$_G_directory_path" || \
+ func_fatal_error "Failed to create '$1'"
+ fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+ $debug_cmd
+
+ _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+ if test : = "$opt_dry_run"; then
+ # Return a directory name, but don't create it in dry-run mode
+ _G_tmpdir=$_G_template-$$
+ else
+
+ # If mktemp works, use that first and foremost
+ _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$_G_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+ func_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$_G_tmpdir"
+ umask $func_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$_G_tmpdir" || \
+ func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+ fi
+
+ $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+ $debug_cmd
+
+ # These SED scripts presuppose an absolute path with a trailing slash.
+ _G_pathcar='s|^/\([^/]*\).*$|\1|'
+ _G_pathcdr='s|^/[^/]*||'
+ _G_removedotparts=':dotsl
+ s|/\./|/|g
+ t dotsl
+ s|/\.$|/|'
+ _G_collapseslashes='s|/\{1,\}|/|g'
+ _G_finalslash='s|/*$|/|'
+
+ # Start from root dir and reassemble the path.
+ func_normal_abspath_result=
+ func_normal_abspath_tpath=$1
+ func_normal_abspath_altnamespace=
+ case $func_normal_abspath_tpath in
+ "")
+ # Empty path, that just means $cwd.
+ func_stripname '' '/' "`pwd`"
+ func_normal_abspath_result=$func_stripname_result
+ return
+ ;;
+ # The next three entries are used to spot a run of precisely
+ # two leading slashes without using negated character classes;
+ # we take advantage of case's first-match behaviour.
+ ///*)
+ # Unusual form of absolute path, do nothing.
+ ;;
+ //*)
+ # Not necessarily an ordinary path; POSIX reserves leading '//'
+ # and for example Cygwin uses it to access remote file shares
+ # over CIFS/SMB, so we conserve a leading double slash if found.
+ func_normal_abspath_altnamespace=/
+ ;;
+ /*)
+ # Absolute path, do nothing.
+ ;;
+ *)
+ # Relative path, prepend $cwd.
+ func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+ ;;
+ esac
+
+ # Cancel out all the simple stuff to save iterations. We also want
+ # the path to end with a slash for ease of parsing, so make sure
+ # there is one (and only one) here.
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+ while :; do
+ # Processed it all yet?
+ if test / = "$func_normal_abspath_tpath"; then
+ # If we ascended to the root using ".." the result may be empty now.
+ if test -z "$func_normal_abspath_result"; then
+ func_normal_abspath_result=/
+ fi
+ break
+ fi
+ func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcar"`
+ func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+ -e "$_G_pathcdr"`
+ # Figure out what to do with it
+ case $func_normal_abspath_tcomponent in
+ "")
+ # Trailing empty path component, ignore it.
+ ;;
+ ..)
+ # Parent dir; strip last assembled component from result.
+ func_dirname "$func_normal_abspath_result"
+ func_normal_abspath_result=$func_dirname_result
+ ;;
+ *)
+ # Actual path component, append it.
+ func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+ ;;
+ esac
+ done
+ # Restore leading double-slash if one was found on entry.
+ func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+ $debug_cmd
+
+ $opt_quiet || func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+ $debug_cmd
+
+ func_relative_path_result=
+ func_normal_abspath "$1"
+ func_relative_path_tlibdir=$func_normal_abspath_result
+ func_normal_abspath "$2"
+ func_relative_path_tbindir=$func_normal_abspath_result
+
+ # Ascend the tree starting from libdir
+ while :; do
+ # check if we have found a prefix of bindir
+ case $func_relative_path_tbindir in
+ $func_relative_path_tlibdir)
+ # found an exact match
+ func_relative_path_tcancelled=
+ break
+ ;;
+ $func_relative_path_tlibdir*)
+ # found a matching prefix
+ func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+ func_relative_path_tcancelled=$func_stripname_result
+ if test -z "$func_relative_path_result"; then
+ func_relative_path_result=.
+ fi
+ break
+ ;;
+ *)
+ func_dirname $func_relative_path_tlibdir
+ func_relative_path_tlibdir=$func_dirname_result
+ if test -z "$func_relative_path_tlibdir"; then
+ # Have to descend all the way to the root!
+ func_relative_path_result=../$func_relative_path_result
+ func_relative_path_tcancelled=$func_relative_path_tbindir
+ break
+ fi
+ func_relative_path_result=../$func_relative_path_result
+ ;;
+ esac
+ done
+
+ # Now calculate path; take care to avoid doubling-up slashes.
+ func_stripname '' '/' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ func_stripname '/' '/' "$func_relative_path_tcancelled"
+ if test -n "$func_stripname_result"; then
+ func_append func_relative_path_result "/$func_stripname_result"
+ fi
+
+ # Normalisation. If bindir is libdir, return '.' else relative path.
+ if test -n "$func_relative_path_result"; then
+ func_stripname './' '' "$func_relative_path_result"
+ func_relative_path_result=$func_stripname_result
+ fi
+
+ test -n "$func_relative_path_result" || func_relative_path_result=.
+
+ :
+}
+
+
+# func_quote_portable EVAL ARG
+# ----------------------------
+# Internal function to portably implement func_quote_arg. Note that we still
+# keep attention to performance here so we as much as possible try to avoid
+# calling sed binary (so far O(N) complexity as long as func_append is O(1)).
+func_quote_portable ()
+{
+ $debug_cmd
+
+ $require_check_ifs_backslash
+
+ func_quote_portable_result=$2
+
+ # one-time-loop (easy break)
+ while true
+ do
+ if $1; then
+ func_quote_portable_result=`$ECHO "$2" | $SED \
+ -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
+ break
+ fi
+
+ # Quote for eval.
+ case $func_quote_portable_result in
+ *[\\\`\"\$]*)
+ # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string
+ # contains the shell wildcard characters.
+ case $check_ifs_backshlash_broken$func_quote_portable_result in
+ :*|*[\[\*\?]*)
+ func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
+ | $SED "$sed_quote_subst"`
+ break
+ ;;
+ esac
+
+ func_quote_portable_old_IFS=$IFS
+ for _G_char in '\' '`' '"' '$'
+ do
+ # STATE($1) PREV($2) SEPARATOR($3)
+ set start "" ""
+ func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
+ IFS=$_G_char
+ for _G_part in $func_quote_portable_result
+ do
+ case $1 in
+ quote)
+ func_append func_quote_portable_result "$3$2"
+ set quote "$_G_part" "\\$_G_char"
+ ;;
+ start)
+ set first "" ""
+ func_quote_portable_result=
+ ;;
+ first)
+ set quote "$_G_part" ""
+ ;;
+ esac
+ done
+ done
+ IFS=$func_quote_portable_old_IFS
+ ;;
+ *) ;;
+ esac
+ break
+ done
+
+ func_quote_portable_unquoted_result=$func_quote_portable_result
+ case $func_quote_portable_result in
+ # double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and variable expansion
+ # for a subsequent eval.
+ # many bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_portable_result=\"$func_quote_portable_result\"
+ ;;
+ esac
+}
+
+
+# func_quotefast_eval ARG
+# -----------------------
+# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
+# but optimized for speed. Result is stored in $func_quotefast_eval.
+if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
+ printf -v _GL_test_printf_tilde %q '~'
+ if test '\~' = "$_GL_test_printf_tilde"; then
+ func_quotefast_eval ()
+ {
+ printf -v func_quotefast_eval_result %q "$1"
+ }
+ else
+ # Broken older Bash implementations. Make those faster too if possible.
+ func_quotefast_eval ()
+ {
+ case $1 in
+ '~'*)
+ func_quote_portable false "$1"
+ func_quotefast_eval_result=$func_quote_portable_result
+ ;;
+ *)
+ printf -v func_quotefast_eval_result %q "$1"
+ ;;
+ esac
+ }
+ fi
+else
+ func_quotefast_eval ()
+ {
+ func_quote_portable false "$1"
+ func_quotefast_eval_result=$func_quote_portable_result
+ }
+fi
+
+
+# func_quote_arg MODEs ARG
+# ------------------------
+# Quote one ARG to be evaled later. MODEs argument may contain zero or more
+# specifiers listed below separated by ',' character. This function returns two
+# values:
+# i) func_quote_arg_result
+# double-quoted (when needed), suitable for a subsequent eval
+# ii) func_quote_arg_unquoted_result
+# has all characters that are still active within double
+# quotes backslashified. Available only if 'unquoted' is specified.
+#
+# Available modes:
+# ----------------
+# 'eval' (default)
+# - escape shell special characters
+# 'expand'
+# - the same as 'eval'; but do not quote variable references
+# 'pretty'
+# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
+# be used later in func_quote to get output like: 'echo "a b"' instead
+# of 'echo a\ b'. This is slower than default on some shells.
+# 'unquoted'
+# - produce also $func_quote_arg_unquoted_result which does not contain
+# wrapping double-quotes.
+#
+# Examples for 'func_quote_arg pretty,unquoted string':
+#
+# string | *_result | *_unquoted_result
+# ------------+-----------------------+-------------------
+# " | \" | \"
+# a b | "a b" | a b
+# "a b" | "\"a b\"" | \"a b\"
+# * | "*" | *
+# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
+#
+# Examples for 'func_quote_arg pretty,unquoted,expand string':
+#
+# string | *_result | *_unquoted_result
+# --------------+---------------------+--------------------
+# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
+func_quote_arg ()
+{
+ _G_quote_expand=false
+ case ,$1, in
+ *,expand,*)
+ _G_quote_expand=:
+ ;;
+ esac
+
+ case ,$1, in
+ *,pretty,*|*,expand,*|*,unquoted,*)
+ func_quote_portable $_G_quote_expand "$2"
+ func_quote_arg_result=$func_quote_portable_result
+ func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
+ ;;
+ *)
+ # Faster quote-for-eval for some shells.
+ func_quotefast_eval "$2"
+ func_quote_arg_result=$func_quotefast_eval_result
+ ;;
+ esac
+}
+
+
+# func_quote MODEs ARGs...
+# ------------------------
+# Quote all ARGs to be evaled later and join them into single command. See
+# func_quote_arg's description for more info.
+func_quote ()
+{
+ $debug_cmd
+ _G_func_quote_mode=$1 ; shift
+ func_quote_result=
+ while test 0 -lt $#; do
+ func_quote_arg "$_G_func_quote_mode" "$1"
+ if test -n "$func_quote_result"; then
+ func_append func_quote_result " $func_quote_arg_result"
+ else
+ func_append func_quote_result "$func_quote_arg_result"
+ fi
+ shift
+ done
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# 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).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_stripname ()
+ {
+ $debug_cmd
+
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary variable first.
+ func_stripname_result=$3
+ func_stripname_result=${func_stripname_result#"$1"}
+ func_stripname_result=${func_stripname_result%"$2"}
+ }'
+else
+ func_stripname ()
+ {
+ $debug_cmd
+
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+ esac
+ }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ func_quote_arg pretty,expand "$_G_cmd"
+ eval "func_notquiet $func_quote_arg_result"
+
+ $opt_dry_run || {
+ eval "$_G_cmd"
+ _G_status=$?
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ $debug_cmd
+
+ _G_cmd=$1
+ _G_fail_exp=${2-':'}
+
+ $opt_quiet || {
+ func_quote_arg expand,pretty "$_G_cmd"
+ eval "func_echo $func_quote_arg_result"
+ }
+
+ $opt_dry_run || {
+ eval "$_G_user_locale
+ $_G_cmd"
+ _G_status=$?
+ eval "$_G_safe_locale"
+ if test 0 -ne "$_G_status"; then
+ eval "(exit $_G_status); $_G_fail_exp"
+ fi
+ }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result. All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+ $debug_cmd
+
+ case $1 in
+ [0-9]* | *[!a-zA-Z0-9_]*)
+ func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+ ;;
+ * )
+ func_tr_sh_result=$1
+ ;;
+ esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $debug_cmd
+
+ $opt_verbose && func_echo "$*"
+
+ :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+ $debug_cmd
+
+ $require_term_colors
+
+ func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+ $debug_cmd
+
+ # CATEGORY must be in the warning_categories list!
+ case " $warning_categories " in
+ *" $1 "*) ;;
+ *) func_internal_error "invalid warning category '$1'" ;;
+ esac
+
+ _G_category=$1
+ shift
+
+ case " $opt_warning_types " in
+ *" $_G_category "*) $warning_func ${1+"$@"} ;;
+ esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+ $debug_cmd
+
+ printf '%s\n%s\n' "$1" "$2" \
+ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false. Use it like this:
+#
+# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+ $debug_cmd
+
+ test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# This is free software. There is NO warranty; not even for
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Copyright (C) 2010-2019, 2021 Bootstrap Authors
+#
+# This file is dual licensed under the terms of the MIT license
+# <https://opensource.org/license/MIT>, and GPL version 2 or later
+# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# these licenses when using or redistributing this software or any of
+# the files within it. See the URLs above, or the file `LICENSE`
+# included in the Bootstrap distribution for the full license texts.
+
+# Please report bugs or propose patches to:
+# <https://github.com/gnulib-modules/bootstrap/issues>
+
+# Set a version string for this script.
+scriptversion=2019-02-19.15; # UTC
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+# #!/bin/sh
+# . relative/path/to/funclib.sh
+# . relative/path/to/options-parser
+# scriptversion=1.0
+# func_options ${1+"$@"}
+# eval set dummy "$func_options_result"; shift
+# ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# Copyright'.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug in processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'. Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+ --debug enable verbose shell tracing
+ -W, --warnings=CATEGORY
+ report the warnings falling in CATEGORY [all]
+ -v, --verbose verbosely report processing
+ --version print version information and exit
+ -h, --help print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+ 'all' show all warnings
+ 'none' turn off all the warnings
+ 'error' warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# in the main code. A hook is just a list of function names that can be
+# run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+ $debug_cmd
+
+ func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not accept hook functions." ;;
+ esac
+
+ eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of hook functions to be called by
+# FUNC_NAME.
+func_remove_hook ()
+{
+ $debug_cmd
+
+ eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_propagate_result FUNC_NAME_A FUNC_NAME_B
+# ---------------------------------------------
+# If the *_result variable of FUNC_NAME_A _is set_, assign its value to
+# *_result variable of FUNC_NAME_B.
+func_propagate_result ()
+{
+ $debug_cmd
+
+ func_propagate_result_result=:
+ if eval "test \"\${${1}_result+set}\" = set"
+ then
+ eval "${2}_result=\$${1}_result"
+ else
+ func_propagate_result_result=false
+ fi
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It's assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+ $debug_cmd
+
+ case " $hookable_fns " in
+ *" $1 "*) ;;
+ *) func_fatal_error "'$1' does not support hook functions." ;;
+ esac
+
+ eval _G_hook_fns=\$$1_hooks; shift
+
+ for _G_hook in $_G_hook_fns; do
+ func_unset "${_G_hook}_result"
+ eval $_G_hook '${1+"$@"}'
+ func_propagate_result $_G_hook func_run_hooks
+ if $func_propagate_result_result; then
+ eval set dummy "$func_run_hooks_result"; shift
+ fi
+ done
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list from your hook function. You may remove
+# or edit any options that you action, and then pass back the remaining
+# unprocessed options in '<hooked_function_name>_result', escaped
+# suitably for 'eval'.
+#
+# The '<hooked_function_name>_result' variable is automatically unset
+# before your hook gets called; for best performance, only set the
+# *_result variable when necessary (i.e. don't call the 'func_quote'
+# function unnecessarily because it can be an expensive operation on some
+# machines).
+#
+# Like this:
+#
+# my_options_prep ()
+# {
+# $debug_cmd
+#
+# # Extend the existing usage message.
+# usage_message=$usage_message'
+# -s, --silent don'\''t print informational messages
+# '
+# # No change in '$@' (ignored completely by this hook). Leave
+# # my_options_prep_result variable intact.
+# }
+# func_add_hook func_options_prep my_options_prep
+#
+#
+# my_silent_option ()
+# {
+# $debug_cmd
+#
+# args_changed=false
+#
+# # Note that, for efficiency, we parse as many options as we can
+# # recognise in a loop before passing the remainder back to the
+# # caller on the first unrecognised argument we encounter.
+# while test $# -gt 0; do
+# opt=$1; shift
+# case $opt in
+# --silent|-s) opt_silent=:
+# args_changed=:
+# ;;
+# # Separate non-argument short options:
+# -s*) func_split_short_opt "$_G_opt"
+# set dummy "$func_split_short_opt_name" \
+# "-$func_split_short_opt_arg" ${1+"$@"}
+# shift
+# args_changed=:
+# ;;
+# *) # Make sure the first unrecognised option "$_G_opt"
+# # is added back to "$@" in case we need it later,
+# # if $args_changed was set to 'true'.
+# set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+# esac
+# done
+#
+# # Only call 'func_quote' here if we processed at least one argument.
+# if $args_changed; then
+# func_quote eval ${1+"$@"}
+# my_silent_option_result=$func_quote_result
+# fi
+# }
+# func_add_hook func_parse_options my_silent_option
+#
+#
+# my_option_validation ()
+# {
+# $debug_cmd
+#
+# $opt_silent && $opt_verbose && func_fatal_help "\
+# '--silent' and '--verbose' options are mutually exclusive."
+# }
+# func_add_hook func_validate_options my_option_validation
+#
+# You'll also need to manually amend $usage_message to reflect the extra
+# options you parse. It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+ $debug_cmd
+
+ func_run_hooks func_options ${1+"$@"}
+ func_propagate_result func_run_hooks func_options_finish
+}
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
+{
+ $debug_cmd
+
+ _G_options_quoted=false
+
+ for my_func in options_prep parse_options validate_options options_finish
+ do
+ func_unset func_${my_func}_result
+ func_unset func_run_hooks_result
+ eval func_$my_func '${1+"$@"}'
+ func_propagate_result func_$my_func func_options
+ if $func_propagate_result_result; then
+ eval set dummy "$func_options_result"; shift
+ _G_options_quoted=:
+ fi
+ done
+
+ $_G_options_quoted || {
+ # As we (func_options) are top-level options-parser function and
+ # nobody quoted "$@" for us yet, we need to do it explicitly for
+ # caller.
+ func_quote eval ${1+"$@"}
+ func_options_result=$func_quote_result
+ }
+}
+
+
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters. If a hook function modifies that list, and
+# needs to propagate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before returning.
+func_hookable func_options_prep
+func_options_prep ()
+{
+ $debug_cmd
+
+ # Option defaults:
+ opt_verbose=false
+ opt_warning_types=
+
+ func_run_hooks func_options_prep ${1+"$@"}
+ func_propagate_result func_run_hooks func_options_prep
+}
+
+
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
+{
+ $debug_cmd
+
+ _G_parse_options_requote=false
+ # this just eases exit handling
+ while test $# -gt 0; do
+ # Defer to hook functions for initial option parsing, so they
+ # get priority in the event of reusing an option name.
+ func_run_hooks func_parse_options ${1+"$@"}
+ func_propagate_result func_run_hooks func_parse_options
+ if $func_propagate_result_result; then
+ eval set dummy "$func_parse_options_result"; shift
+ # Even though we may have changed "$@", we passed the "$@" array
+ # down into the hook and it quoted it for us (because we are in
+ # this if-branch). No need to quote it again.
+ _G_parse_options_requote=false
+ fi
+
+ # Break out of the loop if we already parsed every option.
+ test $# -gt 0 || break
+
+ # We expect that one of the options parsed in this function matches
+ # and thus we remove _G_opt from "$@" and need to re-quote.
+ _G_match_parse_options=:
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --debug|-x) debug_cmd='set -x'
+ func_echo "enabling shell trace mode" >&2
+ $debug_cmd
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ set dummy --warnings none ${1+"$@"}
+ shift
+ ;;
+
+ --warnings|--warning|-W)
+ if test $# = 0 && func_missing_arg $_G_opt; then
+ _G_parse_options_requote=:
+ break
+ fi
+ case " $warning_categories $1" in
+ *" $1 "*)
+ # trailing space prevents matching last $1 above
+ func_append_uniq opt_warning_types " $1"
+ ;;
+ *all)
+ opt_warning_types=$warning_categories
+ ;;
+ *none)
+ opt_warning_types=none
+ warning_func=:
+ ;;
+ *error)
+ opt_warning_types=$warning_categories
+ warning_func=func_fatal_error
+ ;;
+ *)
+ func_fatal_error \
+ "unsupported warning category: '$1'"
+ ;;
+ esac
+ shift
+ ;;
+
+ --verbose|-v) opt_verbose=: ;;
+ --version) func_version ;;
+ -\?|-h) func_usage ;;
+ --help) func_help ;;
+
+ # Separate optargs to long options (plugins may need this):
+ --*=*) func_split_equals "$_G_opt"
+ set dummy "$func_split_equals_lhs" \
+ "$func_split_equals_rhs" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate optargs to short options:
+ -W*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ # Separate non-argument short options:
+ -\?*|-h*|-v*|-x*)
+ func_split_short_opt "$_G_opt"
+ set dummy "$func_split_short_opt_name" \
+ "-$func_split_short_opt_arg" ${1+"$@"}
+ shift
+ ;;
+
+ --) _G_parse_options_requote=: ; break ;;
+ -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
+ *) set dummy "$_G_opt" ${1+"$@"}; shift
+ _G_match_parse_options=false
+ break
+ ;;
+ esac
+
+ if $_G_match_parse_options; then
+ _G_parse_options_requote=:
+ fi
+ done
+
+ if $_G_parse_options_requote; then
+ # save modified positional parameters for caller
+ func_quote eval ${1+"$@"}
+ func_parse_options_result=$func_quote_result
+ fi
+}
+
+
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
+{
+ $debug_cmd
+
+ # Display all warnings if -W was not given.
+ test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
+
+ func_run_hooks func_validate_options ${1+"$@"}
+ func_propagate_result func_run_hooks func_validate_options
+
+ # Bail if the options were screwed!
+ $exit_cmd $EXIT_FAILURE
+}
+
+
+
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
+
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ eval \$ECHO \""$fatal_help"\"
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message"
+ exit 0
+}
+
+
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ $debug_cmd
+
+ func_error "Missing argument for '$1'."
+ exit_cmd=exit
+}
+
+
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables
+# after splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+ && (eval 'x=a/b/c;
+ test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+ && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=${1%%=*}
+ func_split_equals_rhs=${1#*=}
+ if test "x$func_split_equals_lhs" = "x$1"; then
+ func_split_equals_rhs=
+ fi
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_equals ()
+ {
+ $debug_cmd
+
+ func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+ func_split_equals_rhs=
+ test "x$func_split_equals_lhs=" = "x$1" \
+ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+ }
+fi #func_split_equals
+
+
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+ # This is an XSI compatible shell, allowing a faster implementation...
+ eval 'func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_arg=${1#??}
+ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+ }'
+else
+ # ...otherwise fall back to using expr, which is often a shell builtin.
+ func_split_short_opt ()
+ {
+ $debug_cmd
+
+ func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'`
+ func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+ }
+fi #func_split_short_opt
+
+
+# func_usage
+# ----------
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+ exit 0
+}
+
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+ $debug_cmd
+
+ eval \$ECHO \""Usage: $usage"\"
+ echo
+ $SED -n 's|^# ||
+ /^Written by/{
+ x;p;x
+ }
+ h
+ /^Written by/q' < "$progpath"
+ echo
+ eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+# The version message is extracted from the calling file's header
+# comments, with leading '# ' stripped:
+# 1. First display the progname and version
+# 2. Followed by the header comment line matching /^# Written by /
+# 3. Then a blank line followed by the first following line matching
+# /^# Copyright /
+# 4. Immediately followed by any lines between the previous matches,
+# except lines preceding the intervening completely blank line.
+# For example, see the header comments of this file.
+func_version ()
+{
+ $debug_cmd
+
+ printf '%s\n' "$progname $scriptversion"
+ $SED -n '
+ /^# Written by /!b
+ s|^# ||; p; n
+
+ :fwd2blnk
+ /./ {
+ n
+ b fwd2blnk
+ }
+ p; n
+
+ :holdwrnt
+ s|^# ||
+ s|^# *$||
+ /^Copyright /!{
+ /./H
+ n
+ b holdwrnt
+ }
+
+ s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+ G
+ s|\(\n\)\n*|\1|g
+ p; q' < "$progpath"
+
+ exit $?
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.7.4-1ec8f-dirty'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
+{
+ $debug_cmd
+
+ _G_message=$*
+
+ func_echo_IFS=$IFS
+ IFS=$nl
+ for _G_line in $_G_message; do
+ IFS=$func_echo_IFS
+ $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+ done
+ IFS=$func_echo_IFS
+}
+
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ $debug_cmd
+
+ $warning_func ${1+"$@"}
+}
+
+
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --mode=MODE use operation mode MODE
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+ host-triplet: $host
+ shell: $SHELL
+ compiler: $LTCC
+ compiler flags: $LTCFLAGS
+ linker: $LD (gnu? $with_gnu_ld)
+ version: $progname (GNU libtool) 2.4.7.4-1ec8f-dirty
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool@gnu.org>.
+GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+ exit 0
+}
+
+
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
+
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+ eval 'func_lo2o ()
+ {
+ case $1 in
+ *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+ * ) func_lo2o_result=$1 ;;
+ esac
+ }'
+
+ # func_xform LIBOBJ-OR-SOURCE
+ # ---------------------------
+ # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+ # suffix to a '.lo' libtool-object suffix.
+ eval 'func_xform ()
+ {
+ func_xform_result=${1%.*}.lo
+ }'
+else
+ # ...otherwise fall back to using sed.
+ func_lo2o ()
+ {
+ func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+ }
+
+ func_xform ()
+ {
+ func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+ }
+fi
+
+
+# func_fatal_configuration ARG...
+# -------------------------------
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_fatal_error ${1+"$@"} \
+ "See the $PACKAGE documentation for more information." \
+ "Fatal configuration error."
+}
+
+
+# func_config
+# -----------
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+
+# func_features
+# -------------
+# Display the features supported by this script.
+func_features ()
+{
+ echo "host: $host"
+ if test yes = "$build_libtool_libs"; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test yes = "$build_old_libs"; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+
+ exit $?
+}
+
+
+# func_enable_tag TAGNAME
+# -----------------------
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname=$1
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf=/$re_begincf/,/$re_endcf/p
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+ $debug_mode
+
+ # Option defaults:
+ opt_config=false
+ opt_dlopen=
+ opt_dry_run=false
+ opt_help=false
+ opt_mode=
+ opt_preserve_dup_deps=false
+ opt_quiet=false
+
+ nonopt=
+ preserve_args=
+
+ _G_rc_lt_options_prep=:
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ *)
+ _G_rc_lt_options_prep=false
+ ;;
+ esac
+
+ if $_G_rc_lt_options_prep; then
+ # Pass back the list of options.
+ func_quote eval ${1+"$@"}
+ libtool_options_prep_result=$func_quote_result
+ fi
+}
+func_add_hook func_options_prep libtool_options_prep
+
+
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
+{
+ $debug_cmd
+
+ _G_rc_lt_parse_options=false
+
+ # Perform our own loop to consume as many options as possible in
+ # each iteration.
+ while test $# -gt 0; do
+ _G_match_lt_parse_options=:
+ _G_opt=$1
+ shift
+ case $_G_opt in
+ --dry-run|--dryrun|-n)
+ opt_dry_run=:
+ ;;
+
+ --config) func_config ;;
+
+ --dlopen|-dlopen)
+ opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_preserve_dup_deps=: ;;
+
+ --features) func_features ;;
+
+ --finish) set dummy --mode finish ${1+"$@"}; shift ;;
+
+ --help) opt_help=: ;;
+
+ --help-all) opt_help=': help-all' ;;
+
+ --mode) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_mode=$1
+ case $1 in
+ # Valid mode arguments:
+ clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $_G_opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+ shift
+ ;;
+
+ --no-silent|--no-quiet)
+ opt_quiet=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-warnings|--no-warning|--no-warn)
+ opt_warning=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --no-verbose)
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --silent|--quiet)
+ opt_quiet=:
+ opt_verbose=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ --tag) test $# = 0 && func_missing_arg $_G_opt && break
+ opt_tag=$1
+ func_append preserve_args " $_G_opt $1"
+ func_enable_tag "$1"
+ shift
+ ;;
+
+ --verbose|-v) opt_quiet=false
+ opt_verbose=:
+ func_append preserve_args " $_G_opt"
+ ;;
+
+ # An option not handled by this hook function:
+ *) set dummy "$_G_opt" ${1+"$@"} ; shift
+ _G_match_lt_parse_options=false
+ break
+ ;;
+ esac
+ $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
+ done
+
+ if $_G_rc_lt_parse_options; then
+ # save modified positional parameters for caller
+ func_quote eval ${1+"$@"}
+ libtool_parse_options_result=$func_quote_result
+ fi
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+ # save first non-option argument
+ if test 0 -lt $#; then
+ nonopt=$1
+ shift
+ fi
+
+ # preserve --debug
+ test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+ ;;
+ esac
+
+ $opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ test yes != "$build_libtool_libs" \
+ && test yes != "$build_old_libs" \
+ && func_fatal_configuration "not configured to build any kind of library"
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+ func_error "unrecognized option '-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help=$help
+ help="Try '$progname --help --mode=$opt_mode' for more information."
+ }
+
+ # Pass back the unparsed argument list
+ func_quote eval ${1+"$@"}
+ libtool_validate_options_result=$func_quote_result
+}
+func_add_hook func_validate_options libtool_validate_options
+
+
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
+
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
+
+# Global variables.
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+ $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool '.la' library or '.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if 'file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case $lalib_p_line in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test yes = "$lalib_p"
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ test -f "$1" &&
+ $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $debug_cmd
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# 'FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $debug_cmd
+
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot. Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+ func_resolve_sysroot_result=$1
+ case $func_resolve_sysroot_result in
+ =*)
+ func_stripname '=' '' "$func_resolve_sysroot_result"
+ func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+ ;;
+ esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+ case $lt_sysroot:$1 in
+ ?*:"$lt_sysroot"*)
+ func_stripname "$lt_sysroot" '' "$1"
+ func_replace_sysroot_result='='$func_stripname_result
+ ;;
+ *)
+ # Including no sysroot.
+ func_replace_sysroot_result=$1
+ ;;
+ esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $debug_cmd
+
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_append_quoted CC_quoted "$arg"
+ done
+ CC_expanded=`func_echo_all $CC`
+ CC_quoted_expanded=`func_echo_all $CC_quoted`
+ case "$@ " in
+ " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with '--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=$1
+ if test yes = "$build_libtool_libs"; then
+ write_lobj=\'$2\'
+ else
+ write_lobj=none
+ fi
+
+ if test yes = "$build_old_libs"; then
+ write_oldobj=\'$3\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "$write_libobj"
+ }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+ $debug_cmd
+
+ func_convert_core_file_wine_to_w32_result=$1
+ if test -n "$1"; then
+ # Unfortunately, winepath does not exit with a non-zero error code, so we
+ # are forced to check the contents of stdout. On the other hand, if the
+ # command is not found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both error code of
+ # zero AND non-empty stdout, which explains the odd construction:
+ func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+ func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+ $SED -e "$sed_naive_backslashify"`
+ else
+ func_convert_core_file_wine_to_w32_result=
+ fi
+ fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+ $debug_cmd
+
+ # unfortunately, winepath doesn't convert paths, only file names
+ func_convert_core_path_wine_to_w32_result=
+ if test -n "$1"; then
+ oldIFS=$IFS
+ IFS=:
+ for func_convert_core_path_wine_to_w32_f in $1; do
+ IFS=$oldIFS
+ func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+ if test -n "$func_convert_core_file_wine_to_w32_result"; then
+ if test -z "$func_convert_core_path_wine_to_w32_result"; then
+ func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+ else
+ func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+ fi
+ fi
+ done
+ IFS=$oldIFS
+ fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+ $debug_cmd
+
+ if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+ func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+ if test "$?" -ne 0; then
+ # on failure, ensure result is empty
+ func_cygpath_result=
+ fi
+ else
+ func_cygpath_result=
+ func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+ fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format. Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+ $debug_cmd
+
+ # awkward: cmd appends spaces to result
+ func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+ $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+ $debug_cmd
+
+ if test -z "$2" && test -n "$1"; then
+ func_error "Could not determine host file name corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_file_result=$1
+ fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+ $debug_cmd
+
+ if test -z "$4" && test -n "$3"; then
+ func_error "Could not determine the host path corresponding to"
+ func_error " '$3'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This is a deliberately simplistic "conversion" and
+ # should not be "improved". See libtool.info.
+ if test "x$1" != "x$2"; then
+ lt_replace_pathsep_chars="s|$1|$2|g"
+ func_to_host_path_result=`echo "$3" |
+ $SED -e "$lt_replace_pathsep_chars"`
+ else
+ func_to_host_path_result=$3
+ fi
+ fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+ $debug_cmd
+
+ case $4 in
+ $1 ) func_to_host_path_result=$3$func_to_host_path_result
+ ;;
+ esac
+ case $4 in
+ $2 ) func_append func_to_host_path_result "$3"
+ ;;
+ esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+ $debug_cmd
+
+ $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result. If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+ $debug_cmd
+
+ case ,$2, in
+ *,"$to_tool_file_cmd",*)
+ func_to_tool_file_result=$1
+ ;;
+ *)
+ $to_tool_file_cmd "$1"
+ func_to_tool_file_result=$func_to_host_file_result
+ ;;
+ esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+ func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_msys_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+ # LT_CYGPATH in this case.
+ func_to_host_file_result=`cygpath -m "$1"`
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format. Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_file_wine_to_w32 "$1"
+ func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ func_convert_core_msys_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_msys_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set. Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_file_result=$1
+ if test -n "$1"; then
+ # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+ func_convert_core_file_wine_to_w32 "$1"
+ func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+ func_to_host_file_result=$func_cygpath_result
+ fi
+ func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format. If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+# file name conversion function : func_convert_file_X_to_Y ()
+# path conversion function : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same. If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+ $debug_cmd
+
+ if test -z "$to_host_path_cmd"; then
+ func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+ to_host_path_cmd=func_convert_path_$func_stripname_result
+ fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+ $debug_cmd
+
+ func_init_to_host_path_cmd
+ $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+ func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper. Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from ARG. MSYS
+ # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+ # and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_msys_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format. Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format. Requires a wine environment and
+# a working winepath. Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+ func_convert_path_check : ";" \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+ fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # See func_convert_path_msys_to_w32:
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set. Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+ $debug_cmd
+
+ func_to_host_path_result=$1
+ if test -n "$1"; then
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_stripname : : "$1"
+ func_to_host_path_tmp1=$func_stripname_result
+ func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+ func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+ func_to_host_path_result=$func_cygpath_result
+ func_convert_path_check : : \
+ "$func_to_host_path_tmp1" "$func_to_host_path_result"
+ func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+ fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+ $debug_cmd
+
+ func_dll_def_p_tmp=`$SED -n \
+ -e 's/^[ ]*//' \
+ -e '/^\(;.*\)*$/d' \
+ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
+ -e q \
+ "$1"`
+ test DEF = "$func_dll_def_p_tmp"
+}
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $debug_cmd
+
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile=$nonopt # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg=$arg
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj=$arg
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify '-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ func_append pie_flag " $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ func_append later " $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs=$IFS; IFS=,
+ for arg in $args; do
+ IFS=$save_ifs
+ func_append_quoted lastarg "$arg"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ func_append base_compile " $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg=$srcfile
+ srcfile=$arg
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_append_quoted base_compile "$lastarg"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with '-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj=$func_basename_result
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from '$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test yes = "$build_libtool_libs" \
+ || func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_arg pretty "$libobj"
+ test "X$libobj" != "X$func_quote_arg_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name '$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname=$func_basename_result
+ xdir=$func_dirname_result
+ lobj=$xdir$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test yes = "$build_old_libs"; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test no = "$compiler_c_o"; then
+ output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+ lockfile=$output_obj.lock
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test yes = "$need_locks"; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test warn = "$need_locks"; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ func_append removelist " $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ func_append removelist " $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+ srcfile=$func_to_tool_file_result
+ func_quote_arg pretty "$srcfile"
+ qsrcfile=$func_quote_arg_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test yes = "$build_libtool_libs"; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test no != "$pic_mode"; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ func_append command " -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test yes = "$suppress_opt"; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test yes = "$build_old_libs"; then
+ if test yes != "$pic_mode"; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test yes = "$compiler_c_o"; then
+ func_append command " -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ func_append command "$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test warn = "$need_locks" &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support '-c' and '-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test no != "$need_locks"; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+ test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $opt_mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to build PIC objects only
+ -prefer-non-pic try to build non-PIC objects only
+ -shared do not build a '.o' file suitable for static linking
+ -static only build a '.o' file suitable for static linking
+ -Wc,FLAG
+ -Xcompiler FLAG pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to '-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the '--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the 'install' or 'cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -bindir BINDIR specify path to binaries directory (for systems where
+ libraries must be found in the PATH setting at runtime)
+ -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE use a list of object files found in FILE to specify objects
+ -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+ -Wc,FLAG
+ -Xcompiler FLAG pass linker-specific FLAG directly to the compiler
+ -Wa,FLAG
+ -Xassembler FLAG pass linker-specific FLAG directly to the assembler
+ -Wl,FLAG
+ -Xlinker FLAG pass linker-specific FLAG directly to the linker
+ -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with '-') are ignored.
+
+Every other argument is treated as a filename. Files ending in '.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
+
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode '$opt_mode'"
+ ;;
+ esac
+
+ echo
+ $ECHO "Try '$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+ if test : = "$opt_help"; then
+ func_mode_help
+ else
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ func_mode_help
+ done
+ } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
+ {
+ func_help noexit
+ for opt_mode in compile link execute install finish uninstall clean; do
+ echo
+ func_mode_help
+ done
+ } |
+ $SED '1d
+ /^When reporting/,/^Report/{
+ H
+ d
+ }
+ $x
+ /information about other modes/d
+ /more detailed .*MODE/d
+ s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+ fi
+ exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $debug_cmd
+
+ # The first argument is the command name.
+ cmd=$nonopt
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $opt_dlopen; do
+ test -f "$file" \
+ || func_fatal_help "'$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "'$file' was not linked with '-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+
+ if test -f "$dir/$objdir/$dlname"; then
+ func_append dir "/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ ;;
+
+ *)
+ func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir=$absdir
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic=$magic
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -* | *.la | *.lo ) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file=$progdir/$program
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_append_quoted args "$file"
+ done
+
+ if $opt_dry_run; then
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ echo "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ else
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd=\$cmd$args
+ fi
+}
+
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $debug_cmd
+
+ libs=
+ libdirs=
+ admincmds=
+
+ for opt in "$nonopt" ${1+"$@"}
+ do
+ if test -d "$opt"; then
+ func_append libdirs " $opt"
+
+ elif test -f "$opt"; then
+ if func_lalib_unsafe_p "$opt"; then
+ func_append libs " $opt"
+ else
+ func_warning "'$opt' is not a valid libtool archive"
+ fi
+
+ else
+ func_fatal_error "invalid argument '$opt'"
+ fi
+ done
+
+ if test -n "$libs"; then
+ if test -n "$lt_sysroot"; then
+ sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+ sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+ else
+ sysroot_cmd=
+ fi
+
+ # Remove sysroot references
+ if $opt_dry_run; then
+ for lib in $libs; do
+ echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+ done
+ else
+ tmpdir=`func_mktempdir`
+ for lib in $libs; do
+ $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+ > $tmpdir/tmp-la
+ mv -f $tmpdir/tmp-la $lib
+ done
+ ${RM}r "$tmpdir"
+ fi
+ fi
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || func_append admincmds "
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_quiet && exit $EXIT_SUCCESS
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the '$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the '$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the '$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+ fi
+ echo
+
+ echo "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ echo "pages."
+ ;;
+ *)
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ echo "----------------------------------------------------------------------"
+ fi
+ exit $EXIT_SUCCESS
+}
+
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $debug_cmd
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
+ # Allow the use of GNU shtool's install command.
+ case $nonopt in *shtool*) :;; *) false;; esac
+ then
+ # Aesthetically quote it.
+ func_quote_arg pretty "$nonopt"
+ install_prog="$func_quote_arg_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_arg pretty "$arg"
+ func_append install_prog "$func_quote_arg_result"
+ install_shared_prog=$install_prog
+ case " $install_prog " in
+ *[\\\ /]cp\ *) install_cp=: ;;
+ *) install_cp=false ;;
+ esac
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=false
+ stripme=
+ no_mode=:
+ for arg
+ do
+ arg2=
+ if test -n "$dest"; then
+ func_append files " $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=: ;;
+ -f)
+ if $install_cp; then :; else
+ prev=$arg
+ fi
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ if test X-m = "X$prev" && test -n "$install_override_mode"; then
+ arg2=$install_override_mode
+ no_mode=false
+ fi
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_arg pretty "$arg"
+ func_append install_prog " $func_quote_arg_result"
+ if test -n "$arg2"; then
+ func_quote_arg pretty "$arg2"
+ fi
+ func_append install_shared_prog " $func_quote_arg_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prev' option requires an argument"
+
+ if test -n "$install_override_mode" && $no_mode; then
+ if $install_cp; then :; else
+ func_quote_arg pretty "$install_override_mode"
+ func_append install_shared_prog " -m $func_quote_arg_result"
+ fi
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=:
+ if $isdir; then
+ destdir=$dest
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir=$func_dirname_result
+ destname=$func_basename_result
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "'$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "'$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ func_append staticlibs " $file"
+ ;;
+
+ *.la)
+ func_resolve_sysroot "$file"
+ file=$func_resolve_sysroot_result
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "'$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append current_libdirs " $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) func_append future_libdirs " $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir=$func_dirname_result
+ func_append dir "$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking '$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname=$1
+ shift
+
+ srcname=$realname
+ test -n "$relink_command" && srcname=${realname}T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ os2*)
+ case $realname in
+ *_dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try 'ln -sf' first, because the 'ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib=$destdir/$realname
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name=$func_basename_result
+ instname=$dir/${name}i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest=$destfile
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to '$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test yes = "$build_old_libs"; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile=$destdir/$destname
+ else
+ func_basename "$file"
+ destfile=$func_basename_result
+ destfile=$destdir/$destfile
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=.exe
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script '$wrapper'"
+
+ finalize=:
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "'$lib' has not been installed in '$libdir'"
+ finalize=false
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test no = "$fast_install" && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if $finalize; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file=$func_basename_result
+ outputname=$tmpdir/$file
+ # Replace the output file specification.
+ relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_quiet || {
+ func_quote_arg expand,pretty "$relink_command"
+ eval "func_echo $func_quote_arg_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink '$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file=$outputname
+ else
+ func_warning "cannot relink '$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name=$func_basename_result
+
+ # Set up the ranlib parameters.
+ oldlib=$destdir/$name
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run '$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $debug_cmd
+
+ my_outputname=$1
+ my_originator=$2
+ my_pic_p=${3-false}
+ my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms=${my_outputname}S.c
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist=$output_objdir/$my_outputname.nm
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* 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_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test yes = "$dlself"; then
+ func_verbose "generating symbol list for '$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+ func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+ $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols=$output_objdir/$outputname.exp
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from '$dlprefile'"
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+ eval "curr_lafile=\$libfile_$func_tr_sh_result"
+ dlprefile_dlbasename=
+ if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+ # Use subshell, to avoid clobbering current variable values
+ dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+ if test -n "$dlprefile_dlname"; then
+ func_basename "$dlprefile_dlname"
+ dlprefile_dlbasename=$func_basename_result
+ else
+ # no lafile. user explicitly requested -dlpreopen <import library>.
+ $sharedlib_from_linklib_cmd "$dlprefile"
+ dlprefile_dlbasename=$sharedlib_from_linklib_result
+ fi
+ fi
+ $opt_dry_run || {
+ if test -n "$dlprefile_dlbasename"; then
+ eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+ else
+ func_warning "Could not compute DLL name from $name"
+ eval '$ECHO ": $name " >> "$nlist"'
+ fi
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ }
+ else # not an import lib
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ fi
+ ;;
+ *)
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ ;;
+ esac
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ func_show_eval '$RM "${nlist}I"'
+ if test -n "$global_symbol_to_import"; then
+ eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
+ fi
+
+ echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
+"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+ LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+ for (; symbol->name; ++symbol)
+ {"
+ $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+ echo >> "$output_objdir/$my_dlsyms" "\
+ }
+}"
+ fi
+ echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{ {\"$my_originator\", (void *) 0},"
+
+ if test -s "$nlist"I; then
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {\"@INIT@\", (void *) &lt_syminit},"
+ fi
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ echo >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ $my_pic_p && pic_flag_for_symtable=" $pic_flag"
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) func_append symtab_cflags " $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for '$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+ test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+ $debug_cmd
+
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+ test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+ $debug_cmd
+
+ win32_libid_type=unknown
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+ func_cygming_gnu_implib_p "$1"
+ then
+ win32_nmres=import
+ else
+ win32_nmres=
+ fi
+ ;;
+ *)
+ func_to_tool_file "$1" func_convert_file_msys_to_w32
+ win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s|.*|import|
+ p
+ q
+ }
+ }'`
+ ;;
+ esac
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+ $debug_cmd
+
+ sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+ $debug_cmd
+
+ match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+ $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+ $SED '/^Contents of section '"$match_literal"':/{
+ # Place marker at beginning of archive member dllname section
+ s/.*/====MARK====/
+ p
+ d
+ }
+ # These lines can sometimes be longer than 43 characters, but
+ # are always uninteresting
+ /:[ ]*file format pe[i]\{,1\}-/d
+ /^In archive [^:]*:/d
+ # Ensure marker is printed
+ /^====MARK====/p
+ # Remove all lines with less than 43 characters
+ /^.\{43\}/!d
+ # From remaining lines, remove first 43 characters
+ s/^.\{43\}//' |
+ $SED -n '
+ # Join marker and all lines until next marker into a single line
+ /^====MARK====/ b para
+ H
+ $ b para
+ b
+ :para
+ x
+ s/\n//g
+ # Remove the marker
+ s/^====MARK====//
+ # Remove trailing dots and whitespace
+ s/[\. \t]*$//
+ # Print
+ /./p' |
+ # we now have a list, one entry per line, of the stringified
+ # contents of the appropriate section of all members of the
+ # archive that possess that section. Heuristic: eliminate
+ # all those that have a first or second character that is
+ # a '.' (that is, objdump's representation of an unprintable
+ # character.) This should work for all archives with less than
+ # 0x302f exports -- but will fail for DLLs whose name actually
+ # begins with a literal '.' or a single character followed by
+ # a '.'.
+ #
+ # Of those that remain, print the first one.
+ $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+# $sharedlib_from_linklib_cmd
+# Result is available in the variable
+# $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+ $debug_cmd
+
+ if func_cygming_gnu_implib_p "$1"; then
+ # binutils import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+ elif func_cygming_ms_implib_p "$1"; then
+ # ms-generated import library
+ sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+ else
+ # unknown
+ sharedlib_from_linklib_result=
+ fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $debug_cmd
+
+ f_ex_an_ar_dir=$1; shift
+ f_ex_an_ar_oldlib=$1
+ if test yes = "$lock_old_archive_extraction"; then
+ lockfile=$f_ex_an_ar_oldlib.lock
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ fi
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+ 'stat=$?; rm -f "$lockfile"; exit $stat'
+ if test yes = "$lock_old_archive_extraction"; then
+ $opt_dry_run || rm -f "$lockfile"
+ fi
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $debug_cmd
+
+ my_gentop=$1; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=
+ my_xlib=
+ my_xabs=
+ my_xdir=
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib=$func_basename_result
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir=$my_gentop/$my_xlib_u
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches; do
+ func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+ $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+ cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+ func_extract_an_archive "`pwd`" "$darwin_base_archive"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+ done
+
+ func_extract_archives_result=$my_oldobjs
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=${1-no}
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# 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
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ file=\"\$0\""
+
+ func_quote_arg pretty "$ECHO"
+ qECHO=$func_quote_arg_result
+ $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+ ECHO=$qECHO
+ fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+ lt_script_arg0=\$0
+ shift
+ for lt_opt
+ do
+ case \"\$lt_opt\" in
+ --lt-debug) lt_option_debug=1 ;;
+ --lt-dump-script)
+ lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+ test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+ lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+ cat \"\$lt_dump_D/\$lt_dump_F\"
+ exit 0
+ ;;
+ --lt-*)
+ \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+
+ # Print the debug banner immediately:
+ if test -n \"\$lt_option_debug\"; then
+ echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+ fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+ lt_dump_args_N=1;
+ for lt_arg
+ do
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+ lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+ done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ if test -n \"\$lt_option_debug\"; then
+ \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+ func_lt_dump_args \${1+\"\$@\"} 1>&2
+ fi
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+ case \" \$* \" in
+ *\\ --lt-*)
+ for lt_wr_arg
+ do
+ case \$lt_wr_arg in
+ --lt-*) ;;
+ *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+ esac
+ shift
+ done ;;
+ esac
+ func_exec_program_core \${1+\"\$@\"}
+}
+
+ # Parse options
+ func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test yes = "$fast_install"; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ \$ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # fixup the dll searchpath if we need to.
+ #
+ # Fix the DLL searchpath if we need to. Do this before prepending
+ # to shlibpath, because on Windows, both are PATH and uninstalled
+ # libraries must come first.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ # Export our shlibpath_var if we have one.
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+ func_exec_program \${1+\"\$@\"}
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+*/
+EOF
+ cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat _stat
+# define chmod _chmod
+# define getcwd _getcwd
+# define putenv _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
+# define LT_PATHMAX PATH_MAX
+#elif defined MAXPATHLEN
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+ defined __OS2__
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free (stale); stale = 0; } \
+} while (0)
+
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+ cat <<EOF
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_path "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_path "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_path_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test yes = "$fast_install"; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ int rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ newargz = XMALLOC (char *, (size_t) argc + 1);
+
+ /* very simple arg parsing; don't want to rely on getopt
+ * also, copy all non cwrapper options to newargz, except
+ * argz[0], which is handled differently
+ */
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (STREQ (argv[i], dumpscript_opt))
+ {
+EOF
+ case $host in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ lt_dump_script (stdout);
+ return 0;
+ }
+ if (STREQ (argv[i], debug_opt))
+ {
+ lt_debug = 1;
+ continue;
+ }
+ if (STREQ (argv[i], ltwrapper_option_prefix))
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal (__FILE__, __LINE__,
+ "unrecognized %s option: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+EOF
+ cat <<EOF
+ /* The GNU banner must be the first non-error debug message */
+ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+ cat <<"EOF"
+ lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (before symlink chase) at: %s\n",
+ tmp_pathspec);
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) found exe (after symlink chase) at: %s\n",
+ actual_cwrapper_path);
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) libtool target name: %s\n",
+ target_name);
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must
+ be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+ because on Windows, both *_VARNAMEs are PATH but uninstalled
+ libraries must come first. */
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+ lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+ nonnull (lt_argv_zero));
+ for (i = 0; i < newargc; i++)
+ {
+ lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+ i, nonnull (newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ newargz = prepare_spawn (newargz);
+ rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ lt_debugprintf (__FILE__, __LINE__,
+ "(main) failed to launch target \"%s\": %s\n",
+ lt_argv_zero, nonnull (strerror (errno)));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+ nonempty (path));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ size_t tmp_len;
+ char *concat_name;
+
+ lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+ nonempty (wrapper));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = (size_t) (q - p);
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+ nonnull (strerror (errno)));
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ lt_debugprintf (__FILE__, __LINE__,
+ "checking path component for symlinks: %s\n",
+ tmp_pathspec);
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "error accessing file \"%s\": %s",
+ tmp_pathspec, nonnull (strerror (errno)));
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal (__FILE__, __LINE__,
+ "could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (STREQ (str, pat))
+ *str = '\0';
+ }
+ return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+ va_list args;
+ if (lt_debug)
+ {
+ (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+ }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+ int line, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+ va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+ return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+ return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_setenv) setting '%s' to '%s'\n",
+ nonnull (name), nonnull (value));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ size_t len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ size_t orig_value_len = strlen (orig_value);
+ size_t add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ size_t len = strlen (new_value);
+ while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[--len] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ lt_debugprintf (__FILE__, __LINE__,
+ "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ nonnull (name), nonnull (value));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+EOF
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XMALLOC (char *, argc + 1);
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = XMALLOC (char, length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+ func_emit_wrapper yes |
+ $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/ fputs ("\1", f);/p
+g
+D'
+ cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+ $debug_cmd
+
+ case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+ *import*) : ;;
+ *) false ;;
+ esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+ $debug_cmd
+
+ case " $compile_command " in
+ *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+ suncc_use_cstd_abi=no
+ ;;
+ *)
+ suncc_use_cstd_abi=yes
+ ;;
+ esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $debug_cmd
+
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll that has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ bindir=
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ os2dllname=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=false
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module=$wl-single_module
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test yes != "$build_libtool_libs" \
+ && func_fatal_configuration "cannot build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg=$1
+ shift
+ func_quote_arg pretty,unquoted "$arg"
+ qarg=$func_quote_arg_unquoted_result
+ func_append libtool_args " $func_quote_arg_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ bindir)
+ bindir=$arg
+ prev=
+ continue
+ ;;
+ dlfiles|dlprefiles)
+ $preload || {
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=:
+ }
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test no = "$dlself"; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test dlprefiles = "$prev"; then
+ dlself=yes
+ elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test dlfiles = "$prev"; then
+ func_append dlfiles " $arg"
+ else
+ func_append dlprefiles " $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols=$arg
+ test -f "$arg" \
+ || func_fatal_error "symbol file '$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex=$arg
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) func_append deplibs " $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir=$arg
+ prev=
+ continue
+ ;;
+ mllvm)
+ # Clang does not use LLVM to link, so we can simply discard any
+ # '-mllvm $arg' options when doing the link step.
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# func_append moreargs " $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ if test none != "$pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ fi
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file '$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ os2dllname)
+ os2dllname=$arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex=$arg
+ prev=
+ continue
+ ;;
+ release)
+ release=-$arg
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test rpath = "$prev"; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) func_append rpath " $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) func_append xrpath " $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds=$arg
+ prev=
+ continue
+ ;;
+ weak)
+ func_append weak_libs " $arg"
+ prev=
+ continue
+ ;;
+ xassembler)
+ func_append compiler_flags " -Xassembler $qarg"
+ prev=
+ func_append compile_command " -Xassembler $qarg"
+ func_append finalize_command " -Xassembler $qarg"
+ continue
+ ;;
+ xcclinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ func_append compiler_flags " $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ func_append linker_flags " $qarg"
+ func_append compiler_flags " $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg=$arg
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "'-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -bindir)
+ prev=bindir
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test X-export-symbols = "X$arg"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname "-L" '' "$arg"
+ if test -z "$func_stripname_result"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between '-L' and '$1'"
+ else
+ func_fatal_error "need path for '-L' option"
+ fi
+ fi
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of '$dir'"
+ dir=$absdir
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "* | *" $arg "*)
+ # Will only happen for absolute or sysroot arguments
+ ;;
+ *)
+ # Preserve sysroot, but never include relative directories
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+ *) func_append deplibs " -L$dir" ;;
+ esac
+ func_append lib_search_path " $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) func_append dllsearchpath ":$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ func_append deplibs " System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test X-lc = "X$arg" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test X-lc = "X$arg" && continue
+ ;;
+ esac
+ elif test X-lc_r = "X$arg"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ func_append deplibs " $arg"
+ continue
+ ;;
+
+ -mllvm)
+ prev=mllvm
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot|--sysroot)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+ # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
+ -pthread)
+ case $host in
+ *solaris2*) ;;
+ *)
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ func_append compiler_flags " $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module=$wl-multi_module
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+ func_warning "assuming '-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -os2dllname)
+ prev=os2dllname
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ =*)
+ func_stripname '=' '' "$dir"
+ dir=$lt_sysroot$func_stripname_result
+ ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_arg pretty "$flag"
+ func_append arg " $func_quote_arg_result"
+ func_append compiler_flags " $func_quote_arg_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs=$IFS; IFS=,
+ for flag in $args; do
+ IFS=$save_ifs
+ func_quote_arg pretty "$flag"
+ func_append arg " $wl$func_quote_arg_result"
+ func_append compiler_flags " $wl$func_quote_arg_result"
+ func_append linker_flags " $func_quote_arg_result"
+ done
+ IFS=$save_ifs
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xassembler)
+ prev=xassembler
+ continue
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
+ ;;
+
+ # Flags to be passed through unchanged, with rationale:
+ # -64, -mips[0-9] enable 64-bit mode for the SGI compiler
+ # -r[0-9][0-9]* specify processor for the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+ # +DA*, +DD* enable 64-bit mode for the HP compiler
+ # -q* compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+ # -F/path path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
+ # @file GCC response files
+ # -tp=* Portland pgcc target processor selection
+ # --sysroot=* for sysroot support
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
+ # -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fuse-ld=* Linker select flags for GCC
+ # -Wa,* Pass flags directly to the assembler
+ # -Werror, -Werror=* Report (specified) warnings as errors
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*)
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ func_append compiler_flags " $arg"
+ continue
+ ;;
+
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case $arg in
+ -Zlinker | -Zstack)
+ prev=xcompiler
+ ;;
+ esac
+ continue
+ else
+ # Otherwise treat like 'Some other compiler flag' below
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
+ fi
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
+ ;;
+
+ *.$objext)
+ # A standard object.
+ func_append objs " $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test none = "$pic_object" &&
+ test none = "$non_pic_object"; then
+ func_fatal_error "cannot find name of object for '$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ test none = "$pic_object" || {
+ # Prepend the subdirectory the object is found in.
+ pic_object=$xdir$pic_object
+
+ if test dlfiles = "$prev"; then
+ if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+ func_append dlfiles " $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test dlprefiles = "$prev"; then
+ # Preload the old-style object.
+ func_append dlprefiles " $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg=$pic_object
+ }
+
+ # Non-PIC object.
+ if test none != "$non_pic_object"; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object=$xdir$non_pic_object
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test none = "$pic_object"; then
+ arg=$non_pic_object
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object=$pic_object
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir=$func_dirname_result
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "'$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ func_append deplibs " $arg"
+ func_append old_deplibs " $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ func_resolve_sysroot "$arg"
+ if test dlfiles = "$prev"; then
+ # This library was specified with -dlopen.
+ func_append dlfiles " $func_resolve_sysroot_result"
+ prev=
+ elif test dlprefiles = "$prev"; then
+ # The library was specified with -dlpreopen.
+ func_append dlprefiles " $func_resolve_sysroot_result"
+ prev=
+ else
+ func_append deplibs " $func_resolve_sysroot_result"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the '$prevarg' option requires an argument"
+
+ if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname=$func_basename_result
+ libobjs_save=$libobjs
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
+ func_dirname "$output" "/" ""
+ output_objdir=$func_dirname_result$objdir
+ func_to_tool_file "$output_objdir/"
+ tool_output_objdir=$func_to_tool_file_result
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_preserve_dup_deps; then
+ case "$libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append libs " $deplib"
+ done
+
+ if test lib = "$linkmode"; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+ esac
+ func_append pre_post_deps " $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=false
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test lib,link = "$linkmode,$pass"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs=$tmp_deplibs
+ fi
+
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass"; then
+ libs=$deplibs
+ deplibs=
+ fi
+ if test prog = "$linkmode"; then
+ case $pass in
+ dlopen) libs=$dlfiles ;;
+ dlpreopen) libs=$dlprefiles ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test lib,dlpreopen = "$linkmode,$pass"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ func_resolve_sysroot "$lib"
+ case $lib in
+ *.la) func_source "$func_resolve_sysroot_result" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ func_basename "$deplib"
+ deplib_base=$func_basename_result
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) func_append deplibs " $deplib" ;;
+ esac
+ done
+ done
+ libs=$dlprefiles
+ fi
+ if test dlopen = "$pass"; then
+ # Collect dlpreopened libraries
+ save_deplibs=$deplibs
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=false
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append compiler_flags " $deplib"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test lib != "$linkmode" && test prog != "$linkmode"; then
+ func_warning "'-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test lib = "$linkmode"; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib=$searchdir/lib$name$search_ext
+ if test -f "$lib"; then
+ if test .la = "$search_ext"; then
+ found=:
+ else
+ found=false
+ fi
+ break 2
+ fi
+ done
+ done
+ if $found; then
+ # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll=$l
+ done
+ if test "X$ll" = "X$old_library"; then # only static version available
+ found=false
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+ lib=$ladir/$old_library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ else
+ # deplib doesn't seem to be a libtool library
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ *.ltframework)
+ if test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test lib = "$linkmode"; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) func_append new_inherited_linker_flags " $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test conv = "$pass" && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ prog)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test scan = "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ *)
+ func_warning "'-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test link = "$pass"; then
+ func_stripname '-R' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ dir=$func_resolve_sysroot_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) func_append xrpath " $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ lib=$func_resolve_sysroot_result
+ ;;
+ *.$libext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=false
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=:
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=:
+ ;;
+ esac
+ if $valid_a_lib; then
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ else
+ echo
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because the file extensions .$libext of this argument makes me believe"
+ echo "*** that it is just a static archive that I should not use here."
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test link != "$pass"; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test conv = "$pass"; then
+ deplibs="$deplib $deplibs"
+ elif test prog = "$linkmode"; then
+ if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ func_append newdlprefiles " $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ func_append newdlfiles " $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=:
+ continue
+ ;;
+ esac # case $deplib
+
+ $found || test -f "$lib" \
+ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "'$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir=$func_dirname_result
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test lib,link = "$linkmode,$pass" ||
+ test prog,scan = "$linkmode,$pass" ||
+ { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+ test -n "$dlopen" && func_append dlfiles " $dlopen"
+ test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+ fi
+
+ if test conv = "$pass"; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ func_append convenience " $ladir/$objdir/$old_library"
+ func_append old_convenience " $ladir/$objdir/$old_library"
+ elif test prog != "$linkmode" && test lib != "$linkmode"; then
+ func_fatal_error "'$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ if test -n "$old_library" &&
+ { test yes = "$prefer_static_libs" ||
+ test built,no = "$prefer_static_libs,$installed"; }; then
+ linklib=$old_library
+ else
+ for l in $old_library $library_names; do
+ linklib=$l
+ done
+ fi
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for '$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test dlopen = "$pass"; then
+ test -z "$libdir" \
+ && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
+ if test -z "$dlname" ||
+ test yes != "$dlopen_support" ||
+ test no = "$build_libtool_libs"
+ then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ func_append dlprefiles " $lib $dependency_libs"
+ else
+ func_append newdlfiles " $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of '$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir=$ladir
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname=$func_basename_result
+
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+ else
+ dir=$lt_sysroot$libdir
+ absdir=$lt_sysroot$libdir
+ fi
+ test yes = "$hardcode_automatic" && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir=$ladir
+ absdir=$abs_ladir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ else
+ dir=$ladir/$objdir
+ absdir=$abs_ladir/$objdir
+ # Remove this search path later
+ func_append notinst_path " $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test dlpreopen = "$pass"; then
+ if test -z "$libdir" && test prog = "$linkmode"; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+ *cygwin* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+ # (otherwise, the dlopen module name will be incorrect). We do
+ # this by putting the import library name into $newdlprefiles.
+ # We recover the dlopen module name by 'saving' the la file
+ # name in a special purpose variable, and (later) extracting the
+ # dlname from the la file.
+ if test -n "$dlname"; then
+ func_tr_sh "$dir/$linklib"
+ eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+ func_append newdlprefiles " $dir/$linklib"
+ else
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ fi
+ ;;
+ * )
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ func_append newdlprefiles " $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ func_append dlpreconveniencelibs " $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ func_append newdlprefiles " $dir/$dlname"
+ else
+ func_append newdlprefiles " $dir/$linklib"
+ fi
+ ;;
+ esac
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test lib = "$linkmode"; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test prog,link = "$linkmode,$pass"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test prog = "$linkmode" && test link != "$pass"; then
+ func_append newlib_search_path " $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=false
+ if test no != "$link_all_deplibs" || test -z "$library_names" ||
+ test no = "$build_libtool_libs"; then
+ linkalldeplibs=:
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result"
+ func_append newlib_search_path " $func_resolve_sysroot_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if $linkalldeplibs; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+ esac
+ fi
+ func_append tmp_libs " $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test prog,link = "$linkmode,$pass"; then
+ if test -n "$library_names" &&
+ { { test no = "$prefer_static_libs" ||
+ test built,yes = "$prefer_static_libs,$installed"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
+ # Make sure the rpath contains only unique directories.
+ case $temp_rpath: in
+ *"$absdir:"*) ;;
+ *) func_append temp_rpath "$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if $alldeplibs &&
+ { test pass_all = "$deplibs_check_method" ||
+ { test yes = "$build_libtool_libs" &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test built = "$use_static_libs" && test yes = "$installed"; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+ ;;
+ *)
+ if test no = "$installed"; then
+ func_append notinst_deplibs " $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule=$dlpremoduletest
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+ echo
+ if test prog = "$linkmode"; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test lib = "$linkmode" &&
+ test yes = "$hardcode_into_libs"; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) func_append compile_rpath " $absdir" ;;
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname=$dlname
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot=$soname
+ func_basename "$soroot"
+ soname=$func_basename_result
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from '$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for '$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test prog = "$linkmode" || test relink != "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test no = "$hardcode_direct"; then
+ add=$dir/$linklib
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+ *-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir=-L$dir ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we cannot
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library"; then
+ echo
+ echo "*** And there doesn't seem to be a static archive available"
+ echo "*** The link will probably fail, sorry"
+ else
+ add=$dir/$old_library
+ fi
+ elif test -n "$old_library"; then
+ add=$dir/$old_library
+ fi
+ fi
+ esac
+ elif test no = "$hardcode_minus_L"; then
+ case $host in
+ *-*-sunos*) add_shlibpath=$dir ;;
+ esac
+ add_dir=-L$dir
+ add=-l$name
+ elif test no = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$dir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$absdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ add_shlibpath=$dir
+ add=-l$name
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test yes != "$lib_linked"; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) func_append compile_shlibpath "$add_shlibpath:" ;;
+ esac
+ fi
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test yes != "$hardcode_direct" &&
+ test yes != "$hardcode_minus_L" &&
+ test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test prog = "$linkmode" || test relink = "$opt_mode"; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test yes = "$hardcode_direct" &&
+ test no = "$hardcode_direct_absolute"; then
+ add=$libdir/$linklib
+ elif test yes = "$hardcode_minus_L"; then
+ add_dir=-L$libdir
+ add=-l$name
+ elif test yes = "$hardcode_shlibpath_var"; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) func_append finalize_shlibpath "$libdir:" ;;
+ esac
+ add=-l$name
+ elif test yes = "$hardcode_automatic"; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add=$inst_prefix_dir$libdir/$linklib
+ else
+ add=$libdir/$linklib
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir=-L$libdir
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ func_append add_dir " -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add=-l$name
+ fi
+
+ if test prog = "$linkmode"; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test prog = "$linkmode"; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test unsupported != "$hardcode_direct"; then
+ test -n "$old_library" && linklib=$old_library
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test yes = "$build_libtool_libs"; then
+ # Not a shared library
+ if test pass_all != "$deplibs_check_method"; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test yes = "$module"; then
+ echo "*** But as you try to build a module library, libtool will still create "
+ echo "*** a static module, that should work as long as the dlopening application"
+ echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test lib = "$linkmode"; then
+ if test -n "$dependency_libs" &&
+ { test yes != "$hardcode_into_libs" ||
+ test yes = "$build_old_libs" ||
+ test yes = "$link_static"; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) func_append xrpath " $temp_xrpath";;
+ esac;;
+ *) func_append temp_deplibs " $libdir";;
+ esac
+ done
+ dependency_libs=$temp_deplibs
+ fi
+
+ func_append newlib_search_path " $absdir"
+ # Link against this library
+ test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ func_resolve_sysroot "$func_stripname_result";;
+ *) func_resolve_sysroot "$deplib" ;;
+ esac
+ if $opt_preserve_dup_deps; then
+ case "$tmp_libs " in
+ *" $func_resolve_sysroot_result "*)
+ func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+ esac
+ fi
+ func_append tmp_libs " $func_resolve_sysroot_result"
+ done
+
+ if test no != "$link_all_deplibs"; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path=$deplib ;;
+ *.la)
+ func_resolve_sysroot "$deplib"
+ deplib=$func_resolve_sysroot_result
+ func_dirname "$deplib" "" "."
+ dir=$func_dirname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of '$dir'"
+ absdir=$dir
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names"; then
+ for tmp in $deplibrary_names; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl"; then
+ depdepl=$absdir/$objdir/$depdepl
+ darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+ func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path=-L$absdir/$objdir
+ ;;
+ esac
+ else
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test link = "$pass"; then
+ if test prog = "$linkmode"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs=$newdependency_libs
+ if test dlpreopen = "$pass"; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test dlopen != "$pass"; then
+ test conv = "$pass" || {
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) func_append lib_search_path " $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ }
+
+ if test prog,link = "$linkmode,$pass"; then
+ vars="compile_deplibs finalize_deplibs"
+ else
+ vars=deplibs
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append tmp_libs " $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+
+ # Add Sun CC postdeps if required:
+ test CXX = "$tagname" && {
+ case $host_os in
+ linux*)
+ case `$CC -V 2>&1 | $SED 5q` in
+ *Sun\ C*) # Sun C++ 5.9
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ func_cc_basename "$CC"
+ case $func_cc_basename_result in
+ CC* | sunCC*)
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ }
+
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=
+ ;;
+ esac
+ if test -n "$i"; then
+ func_append tmp_libs " $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test prog = "$linkmode"; then
+ dlfiles=$newdlfiles
+ fi
+ if test prog = "$linkmode" || test lib = "$linkmode"; then
+ dlprefiles=$newdlprefiles
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "'-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs=$output
+ func_append objs "$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form 'libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test no = "$module" \
+ && func_fatal_help "libtool library '$output' must begin with 'lib'"
+
+ if test no != "$need_lib_prefix"; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test pass_all != "$deplibs_check_method"; then
+ func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
+ else
+ echo
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ func_append libobjs " $objs"
+ fi
+ fi
+
+ test no = "$dlself" \
+ || func_warning "'-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test 1 -lt "$#" \
+ && func_warning "ignoring multiple '-rpath's for a libtool library"
+
+ install_libdir=$1
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test yes = "$build_libtool_libs"; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a '.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs=$IFS; IFS=:
+ set dummy $vinfo 0 0 0
+ shift
+ IFS=$save_ifs
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to '-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major=$1
+ number_minor=$2
+ number_revision=$3
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # that has an extra 1 added just for fun
+ #
+ case $version_type in
+ # correct linux to gnu/linux during the next big refactor
+ darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_revision
+ ;;
+ freebsd-aout|qnx|sunos)
+ current=$number_major
+ revision=$number_minor
+ age=0
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age=$number_minor
+ revision=$number_minor
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current=$1
+ revision=$2
+ age=$3
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT '$current' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION '$revision' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE '$age' must be a nonnegative integer"
+ func_fatal_error "'$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE '$age' is greater than the current interface number '$current'"
+ func_fatal_error "'$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers
+ case $CC in
+ nagfor*)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;;
+ *)
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+ esac
+ ;;
+
+ freebsd-aout)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ freebsd-elf | midnightbsd-elf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ irix | nonstopux)
+ if test no = "$lt_irix_increment"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring=$verstring_prefix$major.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test 0 -ne "$loop"; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring_prefix$major.$iface:$verstring
+ done
+
+ # Before this point, $major must not contain '.'.
+ major=.$major
+ versuffix=$major.$revision
+ ;;
+
+ linux) # correct to gnu/linux during the next big refactor
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=.$current.$age.$revision
+ verstring=$current.$age.$revision
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test 0 -ne "$loop"; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring=$verstring:$iface.0
+ done
+
+ # Make executables depend on our current version.
+ func_append verstring ":$current.0"
+ ;;
+
+ qnx)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sco)
+ major=.$current
+ versuffix=.$current
+ ;;
+
+ sunos)
+ major=.$current
+ versuffix=.$current.$revision
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 file systems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type '$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring=0.0
+ ;;
+ esac
+ if test no = "$need_version"; then
+ versuffix=
+ else
+ versuffix=.0.0
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test yes,no = "$avoid_version,$need_version"; then
+ major=
+ versuffix=
+ verstring=
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test yes = "$allow_undefined"; then
+ if test unsupported = "$allow_undefined_flag"; then
+ if test yes = "$build_old_libs"; then
+ func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+ build_libtool_libs=no
+ else
+ func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+ fi
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag=$no_undefined_flag
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" :
+ func_append libobjs " $symfileobj"
+ test " " = "$libobjs" && libobjs=
+
+ if test relink != "$opt_mode"; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+ if test -n "$precious_files_regex"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ func_append removelist " $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+ func_append oldlibs " $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+ # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ func_replace_sysroot "$libdir"
+ func_append temp_xrpath " -R$func_replace_sysroot_result"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles=$dlfiles
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) func_append dlfiles " $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles=$dlprefiles
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) func_append dlprefiles " $lib" ;;
+ esac
+ done
+
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ func_append deplibs " System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test yes = "$build_libtool_need_lc"; then
+ func_append deplibs " -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=
+ versuffix=
+ major=
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which I believe you do not have"
+ echo "*** because a test_compile did reveal that the linker did not use it for"
+ echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ func_append newdeplibs " $i"
+ i=
+ ;;
+ esac
+ fi
+ if test -n "$i"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+ func_append newdeplibs " $i"
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because a test_compile did reveal that the linker did not use this one"
+ echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ func_append newdeplibs " $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ if test -n "$file_magic_glob"; then
+ libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+ else
+ libnameglob=$libname
+ fi
+ test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ if test yes = "$want_nocaseglob"; then
+ shopt -s nocaseglob
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ $nocaseglob
+ else
+ potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+ fi
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib=$potent_lib
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+ *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib"; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib=$potent_lib # see symlink-check above in file_magic test
+ if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ func_append newdeplibs " $a_deplib"
+ a_deplib=
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib"; then
+ droppeddeps=yes
+ echo
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have"
+ echo "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib"; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ func_append newdeplibs " $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=
+ tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+ if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+ for i in $predeps $postdeps; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
+ done
+ fi
+ case $tmp_deplibs in
+ *[!\ \ ]*)
+ echo
+ if test none = "$deplibs_check_method"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ ;;
+ esac
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test yes = "$droppeddeps"; then
+ if test yes = "$module"; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test no = "$allow_undefined"; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test no = "$build_old_libs"; then
+ oldlibs=$output_objdir/$libname.$libext
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ deplibs=$new_libs
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test yes = "$build_libtool_libs"; then
+ # Remove $wl instances when linking with ld.
+ # FIXME: should test the right _cmds variable.
+ case $archive_cmds in
+ *\$LD\ *) wl= ;;
+ esac
+ if test yes = "$hardcode_into_libs"; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath=$finalize_rpath
+ test relink = "$opt_mode" || rpath=$compile_rpath$rpath
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ func_replace_sysroot "$libdir"
+ libdir=$func_replace_sysroot_result
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append dep_rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath=$finalize_shlibpath
+ test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname=$1
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname=$realname
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib=$output_objdir/$realname
+ linknames=
+ for link
+ do
+ func_append linknames " $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols=$output_objdir/$libname.uexp
+ func_append delfiles " $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols=$export_symbols
+ export_symbols=
+ always_export_symbols=yes
+ }
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs=$IFS; IFS='~'
+ for cmd1 in $cmds; do
+ IFS=$save_ifs
+ # Take the normal branch if the nm_file_list_spec branch
+ # doesn't work or if tool conversion is not needed.
+ case $nm_file_list_spec~$to_tool_file_cmd in
+ *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+ try_normal_branch=yes
+ eval cmd=\"$cmd1\"
+ func_len " $cmd"
+ len=$func_len_result
+ ;;
+ *)
+ try_normal_branch=no
+ ;;
+ esac
+ if test yes = "$try_normal_branch" \
+ && { test "$len" -lt "$max_cmd_len" \
+ || test "$max_cmd_len" -le -1; }
+ then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ elif test -n "$nm_file_list_spec"; then
+ func_basename "$output"
+ output_la=$func_basename_result
+ save_libobjs=$libobjs
+ save_output=$output
+ output=$output_objdir/$output_la.nm
+ func_to_tool_file "$output"
+ libobjs=$nm_file_list_spec$func_to_tool_file_result
+ func_append delfiles " $output"
+ func_verbose "creating $NM input file list: $output"
+ for obj in $save_libobjs; do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > "$output"
+ eval cmd=\"$cmd1\"
+ func_show_eval "$cmd" 'exit $?'
+ output=$save_output
+ libobjs=$save_libobjs
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS=$save_ifs
+ if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ func_append tmp_deplibs " $test_deplib"
+ ;;
+ esac
+ done
+ deplibs=$tmp_deplibs
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test yes = "$compiler_needs_object" &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ func_append linker_flags " $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test : != "$skipped_export" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ func_basename "$output"
+ output_la=$func_basename_result
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test yes = "$compiler_needs_object"; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-$k.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test -z "$objlist" ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test 1 -eq "$k"; then
+ # The first file doesn't have a previous command to add.
+ reload_objs=$objlist
+ eval concat_cmds=\"$reload_cmds\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-$k.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-$k.$objext
+ objlist=" $obj"
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ reload_objs="$objlist $last_robj"
+ eval concat_cmds=\"\$concat_cmds$reload_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ func_append delfiles " $output"
+
+ else
+ output=
+ fi
+
+ ${skipped_export-false} && {
+ func_verbose "generating symbol list for '$libname.la'"
+ export_symbols=$output_objdir/$libname.exp
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ }
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs=$IFS; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_arg expand,pretty "$cmd"
+ eval "func_echo $func_quote_arg_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ ${skipped_export-false} && {
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols=$export_symbols
+ test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+ $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands, which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ }
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test yes = "$module" && test -n "$module_cmds"; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append libobjs " $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs=$IFS; IFS='~'
+ for cmd in $cmds; do
+ IFS=$sp$nl
+ eval cmd=\"$cmd\"
+ IFS=$save_ifs
+ $opt_quiet || {
+ func_quote_arg expand,pretty "$cmd"
+ eval "func_echo $func_quote_arg_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS=$save_ifs
+
+ # Restore the uninstalled library and exit
+ if test relink = "$opt_mode"; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test yes = "$module" || test yes = "$export_dynamic"; then
+ # On all known operating systems, these are identical.
+ dlname=$soname
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+ func_warning "'-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "'-l' and '-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "'-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "'-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object '$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj=$output
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # if reload_cmds runs $LD directly, get rid of -Wl from
+ # whole_archive_flag_spec and hope we can get by with turning comma
+ # into space.
+ case $reload_cmds in
+ *\$LD[\ \$]*) wl= ;;
+ esac
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+ reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
+ else
+ gentop=$output_objdir/${obj}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # If we're not building shared, we need to use non_pic_objs
+ test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
+ # Create the old-style object.
+ reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
+
+ output=$obj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ test yes = "$build_libtool_libs" || {
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ }
+
+ if test -n "$pic_flag" || test default != "$pic_mode"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output=$libobj
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "'-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "'-release' is ignored for programs"
+
+ $preload \
+ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test CXX = "$tagname"; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ func_append compile_command " $wl-bind_at_load"
+ func_append finalize_command " $wl-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ func_append new_libs " -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ ;;
+ *) func_append new_libs " $deplib" ;;
+ esac
+ done
+ compile_deplibs=$new_libs
+
+
+ func_append compile_command " $compile_deplibs"
+ func_append finalize_command " $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_rpath " $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append perm_rpath " $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) func_append dllsearchpath ":$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) func_append dllsearchpath ":$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath=$rpath
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs=$libdir
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ func_append rpath " $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) func_append finalize_perm_rpath " $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir=$hardcode_libdirs
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath=$rpath
+
+ if test -n "$libobjs" && test yes = "$build_old_libs"; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" false
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=:
+ case $host in
+ *cegcc* | *mingw32ce*)
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+ *cygwin* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+ if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+ wrappers_required=false
+ fi
+ ;;
+ esac
+ $wrappers_required || {
+ # Replace the output file specification.
+ compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ link_command=$compile_command$compile_rpath
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.$objext"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
+ fi
+
+ exit $exit_status
+ }
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ func_append rpath "$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test yes = "$no_install"; then
+ # We don't need to create a wrapper script.
+ link_command=$compile_var$compile_command$compile_rpath
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ case $hardcode_action,$fast_install in
+ relink,*)
+ # Fast installation is not supported
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "'$output' will be relinked during installation"
+ ;;
+ *,yes)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+ ;;
+ *,no)
+ link_command=$compile_var$compile_command$compile_rpath
+ relink_command=$finalize_var$finalize_command$finalize_rpath
+ ;;
+ *,needless)
+ link_command=$finalize_var$compile_command$finalize_rpath
+ relink_command=
+ ;;
+ esac
+
+ # Replace the output file specification.
+ link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ if test -n "$postlink_cmds"; then
+ func_to_tool_file "$output_objdir/$outputname"
+ postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+ func_execute_cmds "$postlink_cmds" 'exit $?'
+ fi
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_arg pretty "$var_value"
+ relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
+ fi
+ done
+ func_quote eval cd "`pwd`"
+ func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
+ relink_command=$func_quote_arg_unquoted_result
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource=$output_path/$objdir/lt-$output_name.c
+ cwrapper=$output_path/$output_name.exe
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host"; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ case $build_libtool_libs in
+ convenience)
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs=$convenience
+ build_libtool_libs=no
+ ;;
+ module)
+ oldobjs=$libobjs_save
+ addlibs=$old_convenience
+ build_libtool_libs=no
+ ;;
+ *)
+ oldobjs="$old_deplibs $non_pic_objects"
+ $preload && test -f "$symfileobj" \
+ && func_append oldobjs " $symfileobj"
+ addlibs=$old_convenience
+ ;;
+ esac
+
+ if test -n "$addlibs"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $addlibs
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ func_append oldobjs " $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ echo "copying selected object files to avoid basename conflicts..."
+ gentop=$output_objdir/${outputname}x
+ func_append generated " $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase=$func_basename_result
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ func_append oldobjs " $gentop/$newobj"
+ ;;
+ *) func_append oldobjs " $obj" ;;
+ esac
+ done
+ fi
+ func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+ tool_oldlib=$func_to_tool_file_result
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ elif test -n "$archiver_list_spec"; then
+ func_verbose "using command file archive linking..."
+ for obj in $oldobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result"
+ done > $output_objdir/$libname.libcmd
+ func_to_tool_file "$output_objdir/$libname.libcmd"
+ oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj"; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test -z "$oldobjs"; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test yes = "$build_old_libs" && old_library=$libname.$libext
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_arg pretty,unquoted "$var_value"
+ relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ func_quote eval cd "`pwd`"
+ relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ func_quote_arg pretty,unquoted "$relink_command"
+ relink_command=$func_quote_arg_unquoted_result
+ if test yes = "$hardcode_automatic"; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test yes = "$installed"; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output=$output_objdir/${outputname}i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name=$func_basename_result
+ func_resolve_sysroot "$deplib"
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ -L*)
+ func_stripname -L '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -L$func_replace_sysroot_result"
+ ;;
+ -R*)
+ func_stripname -R '' "$deplib"
+ func_replace_sysroot "$func_stripname_result"
+ func_append newdependency_libs " -R$func_replace_sysroot_result"
+ ;;
+ *) func_append newdependency_libs " $deplib" ;;
+ esac
+ done
+ dependency_libs=$newdependency_libs
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ *) func_append newdlfiles " $lib" ;;
+ esac
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name=$func_basename_result
+ eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "'$lib' is not a valid libtool archive"
+ func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles=$newdlprefiles
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlfiles " $abs"
+ done
+ dlfiles=$newdlfiles
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ func_append newdlprefiles " $abs"
+ done
+ dlprefiles=$newdlprefiles
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ # In fact, it would be nice if we could use this code for all target
+ # systems that can't hard-code library paths into their executables
+ # and that have no shared library path variable independent of PATH,
+ # but it turns out we can't easily determine that from inspecting
+ # libtool variables, so we have to hard-code the OSs to which it
+ # applies here; at the moment, that means platforms that use the PE
+ # object format with DLL files. See the long comment at the top of
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+ tdlname=$func_relative_path_result/$dlname
+ else
+ # Otherwise fall back on heuristic.
+ tdlname=../bin/$dlname
+ fi
+ ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that cannot go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test no,yes = "$installed,$need_relink"; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+ func_mode_link ${1+"$@"}
+fi
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $debug_cmd
+
+ RM=$nonopt
+ files=
+ rmforce=false
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic=$magic
+
+ for arg
+ do
+ case $arg in
+ -f) func_append RM " $arg"; rmforce=: ;;
+ -*) func_append RM " $arg" ;;
+ *) func_append files " $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir=$func_dirname_result
+ if test . = "$dir"; then
+ odir=$objdir
+ else
+ odir=$dir/$objdir
+ fi
+ func_basename "$file"
+ name=$func_basename_result
+ test uninstall = "$opt_mode" && odir=$dir
+
+ # Remember odir for removal later, being careful to avoid duplicates
+ if test clean = "$opt_mode"; then
+ case " $rmdirs " in
+ *" $odir "*) ;;
+ *) func_append rmdirs " $odir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif $rmforce; then
+ continue
+ fi
+
+ rmfiles=$file
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ func_append rmfiles " $odir/$n"
+ done
+ test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+ case $opt_mode in
+ clean)
+ case " $library_names " in
+ *" $dlname "*) ;;
+ *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+ esac
+ test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" && test none != "$pic_object"; then
+ func_append rmfiles " $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+ func_append rmfiles " $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test clean = "$opt_mode"; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ func_append rmfiles " $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ func_append rmfiles " $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+ if test yes = "$fast_install" && test -n "$relink_command"; then
+ func_append rmfiles " $odir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name"; then
+ func_append rmfiles " $odir/lt-$noexename.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+
+ # Try to remove the $objdir's in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+ func_mode_uninstall ${1+"$@"}
+fi
+
+test -z "$opt_mode" && {
+ help=$generic_help
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode '$opt_mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# where we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/build-aux/manconv.sh b/build-aux/manconv.sh
new file mode 100644
index 0000000..73e8e3b
--- /dev/null
+++ b/build-aux/manconv.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+###############################################################################
+#
+# Wrapper for GNU groff to convert man pages to a few formats
+#
+# Usage: manconv.sh FORMAT [PAPER_SIZE] < in.1 > out.suffix
+#
+# FORMAT can be ascii, utf8, ps, or pdf. PAPER_SIZE can be anything that
+# groff accepts, e.g. a4 or letter. See groff_font(5). PAPER_SIZE defaults
+# to a4 and is used only when FORMAT is ps (PostScript) or pdf.
+#
+# Multiple man pages can be given at once e.g. to create a single PDF file
+# with continuous page numbering.
+#
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+FORMAT=$1
+PAPER=${2-a4}
+
+# Make PostScript and PDF output more readable:
+# - Use 11 pt font instead of the default 10 pt.
+# - Use larger paragraph spacing than the default 0.4v (man(7) only).
+FONT=11
+PD=0.8
+
+SED_PD="
+/^\\.TH /s/\$/\\
+.PD $PD/
+s/^\\.PD\$/.PD $PD/"
+
+case $FORMAT in
+ ascii)
+ groff -t -mandoc -Tascii -P-c | col -bx
+ ;;
+ utf8)
+ groff -t -mandoc -Tutf8 -P-c | col -bx
+ ;;
+ ps)
+ sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
+ -rC1 -rS$FONT -Tps -P-p$PAPER
+ ;;
+ pdf)
+ sed "$SED_PD" | groff -dpaper=$PAPER -t -mandoc \
+ -rC1 -rS$FONT -Tps -P-p$PAPER | ps2pdf - -
+ ;;
+ *)
+ echo 'Invalid arguments' >&2
+ exit 1
+ ;;
+esac
diff --git a/build-aux/missing b/build-aux/missing
new file mode 100755
index 0000000..1fe1611
--- /dev/null
+++ b/build-aux/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# 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, 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 <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/test-driver b/build-aux/test-driver
new file mode 100755
index 0000000..be73b80
--- /dev/null
+++ b/build-aux/test-driver
@@ -0,0 +1,153 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2018-03-07.03; # UTC
+
+# Copyright (C) 2011-2021 Free Software Foundation, Inc.
+#
+# 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, 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 <https://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error. This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+ echo "$0: $*" >&2
+ print_usage >&2
+ exit 2
+}
+
+print_usage ()
+{
+ cat <<END
+Usage:
+ test-driver --test-name NAME --log-file PATH --trs-file PATH
+ [--expect-failure {yes|no}] [--color-tests {yes|no}]
+ [--enable-hard-errors {yes|no}] [--]
+ TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
+END
+}
+
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ *) break;;
+ esac
+ shift
+done
+
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file" = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+ usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+ usage_error "missing argument"
+fi
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='' # Red.
+ grn='' # Green.
+ lgn='' # Light green.
+ blu='' # Blue.
+ mgn='' # Magenta.
+ std='' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here. We create the file first, then append to it,
+# to ameliorate tests themselves also writing to the log file. Our tests
+# don't, but others can (automake bug#35762).
+: >"$log_file"
+"$@" >>"$log_file" 2>&1
+estatus=$?
+
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+ tweaked_estatus=1
+else
+ tweaked_estatus=$estatus
+fi
+
+case $tweaked_estatus:$expect_failure in
+ 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+ 0:*) col=$grn res=PASS recheck=no gcopy=no;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
+ *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
+ *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
+esac
+
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>"$log_file"
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/version.sh b/build-aux/version.sh
new file mode 100644
index 0000000..f9fcda7
--- /dev/null
+++ b/build-aux/version.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+#
+#############################################################################
+#
+# Get the version string from version.h and print it out without
+# trailing newline. This makes it suitable for use in configure.ac.
+#
+#############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+#############################################################################
+
+sed -n 's/LZMA_VERSION_STABILITY_ALPHA/alpha/
+ s/LZMA_VERSION_STABILITY_BETA/beta/
+ s/LZMA_VERSION_STABILITY_STABLE//
+ s/^#define LZMA_VERSION_[MPS][AIT][AJNT][A-Z]* //p' \
+ src/liblzma/api/lzma/version.h \
+ | tr '\n' '|' \
+ | sed 's/|/./; s/|/./; s/|//g' \
+ | tr -d '\r\n'
diff --git a/cmake/remove-ordinals.cmake b/cmake/remove-ordinals.cmake
new file mode 100644
index 0000000..96419d5
--- /dev/null
+++ b/cmake/remove-ordinals.cmake
@@ -0,0 +1,26 @@
+#############################################################################
+#
+# remove-ordinals.cmake
+#
+# Removes the ordinal numbers from a DEF file that has been created by
+# GNU ld or LLVM lld option --output-def (when creating a Windows DLL).
+# This should be equivalent: sed 's/ \+@ *[0-9]\+//'
+#
+# Usage:
+#
+# cmake -DINPUT_FILE=infile.def.in \
+# -DOUTPUT_FILE=outfile.def \
+# -P remove-ordinals.cmake
+#
+#############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+#############################################################################
+
+file(READ "${INPUT_FILE}" STR)
+string(REGEX REPLACE " +@ *[0-9]+" "" STR "${STR}")
+file(WRITE "${OUTPUT_FILE}" "${STR}")
diff --git a/cmake/tuklib_common.cmake b/cmake/tuklib_common.cmake
new file mode 100644
index 0000000..088a3cb
--- /dev/null
+++ b/cmake/tuklib_common.cmake
@@ -0,0 +1,49 @@
+#
+# tuklib_common.cmake - common functions and macros for tuklib_*.cmake files
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+function(tuklib_add_definitions TARGET_OR_ALL DEFINITIONS)
+ # DEFINITIONS may be an empty string/list but it's fine here. There is
+ # no need to quote ${DEFINITIONS} as empty arguments are fine here.
+ if(TARGET_OR_ALL STREQUAL "ALL")
+ add_compile_definitions(${DEFINITIONS})
+ else()
+ target_compile_definitions("${TARGET_OR_ALL}" PRIVATE ${DEFINITIONS})
+ endif()
+endfunction()
+
+function(tuklib_add_definition_if TARGET_OR_ALL VAR)
+ if(${VAR})
+ tuklib_add_definitions("${TARGET_OR_ALL}" "${VAR}")
+ endif()
+endfunction()
+
+# This is an over-simplified version of AC_USE_SYSTEM_EXTENSIONS in Autoconf
+# or gl_USE_SYSTEM_EXTENSIONS in gnulib.
+macro(tuklib_use_system_extensions TARGET_OR_ALL)
+ if(NOT WIN32)
+ # FIXME? The Solaris-specific __EXTENSIONS__ should be conditional
+ # even on Solaris. See gnulib: git log m4/extensions.m4.
+ # FIXME? gnulib and autoconf.git has lots of new stuff.
+ tuklib_add_definitions("${TARGET_OR_ALL}"
+ _GNU_SOURCE
+ __EXTENSIONS__
+ _POSIX_PTHREAD_SEMANTICS
+ _TANDEM_SOURCE
+ _ALL_SOURCE
+ )
+
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS
+ -D_GNU_SOURCE
+ -D__EXTENSIONS__
+ -D_POSIX_PTHREAD_SEMANTICS
+ -D_TANDEM_SOURCE
+ -D_ALL_SOURCE
+ )
+ endif()
+endmacro()
diff --git a/cmake/tuklib_cpucores.cmake b/cmake/tuklib_cpucores.cmake
new file mode 100644
index 0000000..ea16e42
--- /dev/null
+++ b/cmake/tuklib_cpucores.cmake
@@ -0,0 +1,180 @@
+#
+# tuklib_cpucores.cmake - see tuklib_cpucores.m4 for description and comments
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(CheckCSourceCompiles)
+include(CheckIncludeFile)
+
+function(tuklib_cpucores_internal_check)
+ if(WIN32 OR CYGWIN)
+ # Nothing to do, the tuklib_cpucores.c handles it.
+ set(TUKLIB_CPUCORES_DEFINITIONS "" CACHE INTERNAL "")
+ return()
+ endif()
+
+ # glibc-based systems (GNU/Linux and GNU/kFreeBSD) have
+ # sched_getaffinity(). The CPU_COUNT() macro was added in glibc 2.9.
+ # glibc 2.9 is old enough that if someone uses the code on older glibc,
+ # the fallback to sysconf() should be good enough.
+ #
+ # NOTE: This required that _GNU_SOURCE is defined. We assume that whatever
+ # feature test macros the caller wants to use are already set in
+ # CMAKE_REQUIRED_DEFINES and in the target defines.
+ check_c_source_compiles("
+ #include <sched.h>
+ int main(void)
+ {
+ cpu_set_t cpu_mask;
+ sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask);
+ return CPU_COUNT(&cpu_mask);
+ }
+ "
+ TUKLIB_CPUCORES_SCHED_GETAFFINITY)
+ if(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
+ set(TUKLIB_CPUCORES_DEFINITIONS
+ "TUKLIB_CPUCORES_SCHED_GETAFFINITY"
+ CACHE INTERNAL "")
+ return()
+ endif()
+
+ # 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.
+ check_c_source_compiles("
+ #include <sys/param.h>
+ #include <sys/cpuset.h>
+ int main(void)
+ {
+ cpuset_t set;
+ cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
+ sizeof(set), &set);
+ return 0;
+ }
+ "
+ TUKLIB_CPUCORES_CPUSET)
+ if(TUKLIB_CPUCORES_CPUSET)
+ set(TUKLIB_CPUCORES_DEFINITIONS "HAVE_PARAM_H;TUKLIB_CPUCORES_CPUSET"
+ CACHE INTERNAL "")
+ return()
+ endif()
+
+ # 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.
+ check_include_file(sys/param.h HAVE_SYS_PARAM_H)
+ if(HAVE_SYS_PARAM_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_PARAM_H)
+ endif()
+ check_c_source_compiles("
+ #ifdef __QNX__
+ compile error
+ #endif
+ #ifdef HAVE_SYS_PARAM_H
+ # include <sys/param.h>
+ #endif
+ #include <sys/sysctl.h>
+ 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_CPUCORES_SYSCTL)
+ if(TUKLIB_CPUCORES_SYSCTL)
+ if(HAVE_SYS_PARAM_H)
+ set(TUKLIB_CPUCORES_DEFINITIONS
+ "HAVE_PARAM_H;TUKLIB_CPUCORES_SYSCTL"
+ CACHE INTERNAL "")
+ else()
+ set(TUKLIB_CPUCORES_DEFINITIONS
+ "TUKLIB_CPUCORES_SYSCTL"
+ CACHE INTERNAL "")
+ endif()
+ return()
+ endif()
+
+ # Many platforms support sysconf().
+ check_c_source_compiles("
+ #include <unistd.h>
+ 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_CPUCORES_SYSCONF)
+ if(TUKLIB_CPUCORES_SYSCONF)
+ set(TUKLIB_CPUCORES_DEFINITIONS "TUKLIB_CPUCORES_SYSCONF"
+ CACHE INTERNAL "")
+ return()
+ endif()
+
+ # HP-UX
+ check_c_source_compiles("
+ #include <sys/param.h>
+ #include <sys/pstat.h>
+ int main(void)
+ {
+ struct pst_dynamic pst;
+ pstat_getdynamic(&pst, sizeof(pst), 1, 0);
+ (void)pst.psd_proc_cnt;
+ return 0;
+ }
+ "
+ TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+ if(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+ set(TUKLIB_CPUCORES_DEFINITIONS "TUKLIB_CPUCORES_PSTAT_GETDYNAMIC"
+ CACHE INTERNAL "")
+ return()
+ endif()
+endfunction()
+
+function(tuklib_cpucores TARGET_OR_ALL)
+ if(NOT DEFINED TUKLIB_CPUCORES_FOUND)
+ message(STATUS
+ "Checking how to detect the number of available CPU cores")
+ tuklib_cpucores_internal_check()
+
+ if(DEFINED TUKLIB_CPUCORES_DEFINITIONS)
+ set(TUKLIB_CPUCORES_FOUND 1 CACHE INTERNAL "")
+ else()
+ set(TUKLIB_CPUCORES_FOUND 0 CACHE INTERNAL "")
+ message(WARNING
+ "No method to detect the number of CPU cores was found")
+ endif()
+ endif()
+
+ if(TUKLIB_CPUCORES_FOUND)
+ tuklib_add_definitions("${TARGET_OR_ALL}"
+ "${TUKLIB_CPUCORES_DEFINITIONS}")
+ endif()
+endfunction()
diff --git a/cmake/tuklib_integer.cmake b/cmake/tuklib_integer.cmake
new file mode 100644
index 0000000..949d2d9
--- /dev/null
+++ b/cmake/tuklib_integer.cmake
@@ -0,0 +1,101 @@
+#
+# tuklib_integer.cmake - see tuklib_integer.m4 for description and comments
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(TestBigEndian)
+include(CheckCSourceCompiles)
+include(CheckIncludeFile)
+include(CheckSymbolExists)
+
+function(tuklib_integer TARGET_OR_ALL)
+ # Check for endianness. Unlike the Autoconf's AC_C_BIGENDIAN, this doesn't
+ # support Apple universal binaries. The CMake module will leave the
+ # variable unset so we can catch that situation here instead of continuing
+ # as if we were little endian.
+ test_big_endian(WORDS_BIGENDIAN)
+ if(NOT DEFINED WORDS_BIGENDIAN)
+ message(FATAL_ERROR "Cannot determine endianness")
+ endif()
+ tuklib_add_definition_if("${TARGET_OR_ALL}" WORDS_BIGENDIAN)
+
+ # Look for a byteswapping method.
+ check_c_source_compiles("
+ int main(void)
+ {
+ __builtin_bswap16(1);
+ __builtin_bswap32(1);
+ __builtin_bswap64(1);
+ return 0;
+ }
+ "
+ HAVE___BUILTIN_BSWAPXX)
+ if(HAVE___BUILTIN_BSWAPXX)
+ tuklib_add_definitions("${TARGET_OR_ALL}" HAVE___BUILTIN_BSWAPXX)
+ else()
+ check_include_file(byteswap.h HAVE_BYTESWAP_H)
+ if(HAVE_BYTESWAP_H)
+ tuklib_add_definitions("${TARGET_OR_ALL}" HAVE_BYTESWAP_H)
+ check_symbol_exists(bswap_16 byteswap.h HAVE_BSWAP_16)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_BSWAP_16)
+ check_symbol_exists(bswap_32 byteswap.h HAVE_BSWAP_32)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_BSWAP_32)
+ check_symbol_exists(bswap_64 byteswap.h HAVE_BSWAP_64)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_BSWAP_64)
+ else()
+ check_include_file(sys/endian.h HAVE_SYS_ENDIAN_H)
+ if(HAVE_SYS_ENDIAN_H)
+ tuklib_add_definitions("${TARGET_OR_ALL}" HAVE_SYS_ENDIAN_H)
+ else()
+ check_include_file(sys/byteorder.h HAVE_SYS_BYTEORDER_H)
+ tuklib_add_definition_if("${TARGET_OR_ALL}"
+ HAVE_SYS_BYTEORDER_H)
+ endif()
+ endif()
+ endif()
+
+ # Unaligned access is fast on x86(-64), big endian PowerPC, and usually on
+ # 32/64-bit ARM too. There are others too and ARM could be a false match.
+ #
+ # Guess the default value for the option.
+ # CMake's ability to give info about the target arch seems bad.
+ # The the same arch can have different name depending on the OS.
+ #
+ # FIXME: The regex is based on guessing, not on factual information!
+ #
+ # NOTE: Compared to the Autoconf test, this lacks the GCC/Clang test
+ # on ARM and always assumes that unaligned is fast on ARM.
+ set(FAST_UNALIGNED_GUESS OFF)
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES
+ "[Xx3456]86|^[Xx]64|^[Aa][Mm][Dd]64|^[Aa][Rr][Mm]|^aarch|^powerpc|^ppc")
+ if(NOT WORDS_BIGENDIAN OR
+ NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc|^ppc")
+ set(FAST_UNALIGNED_GUESS ON)
+ endif()
+ endif()
+ option(TUKLIB_FAST_UNALIGNED_ACCESS
+ "Enable if the system supports *fast* unaligned memory access \
+with 16-bit, 32-bit, and 64-bit integers."
+ "${FAST_UNALIGNED_GUESS}")
+ tuklib_add_definition_if("${TARGET_OR_ALL}" TUKLIB_FAST_UNALIGNED_ACCESS)
+
+ # Unsafe type punning:
+ option(TUKLIB_USE_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)."
+ OFF)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" TUKLIB_USE_UNSAFE_TYPE_PUNNING)
+
+ # Check for GCC/Clang __builtin_assume_aligned().
+ check_c_source_compiles(
+ "int main(void) { __builtin_assume_aligned(\"\", 1); return 0; }"
+ HAVE___BUILTIN_ASSUME_ALIGNED)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE___BUILTIN_ASSUME_ALIGNED)
+endfunction()
diff --git a/cmake/tuklib_large_file_support.cmake b/cmake/tuklib_large_file_support.cmake
new file mode 100644
index 0000000..0800faa
--- /dev/null
+++ b/cmake/tuklib_large_file_support.cmake
@@ -0,0 +1,52 @@
+#
+# tuklib_large_file_support.cmake
+#
+# If off_t is less than 64 bits by default and -D_FILE_OFFSET_BITS=64
+# makes off_t become 64-bit, the CMake option LARGE_FILE_SUPPORT is
+# provided (ON by default) and -D_FILE_OFFSET_BITS=64 is added to
+# the compile definitions if LARGE_FILE_SUPPORT is ON.
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(CheckCSourceCompiles)
+
+function(tuklib_large_file_support TARGET_OR_ALL)
+ # MSVC must be handled specially in the C code.
+ if(MSVC)
+ return()
+ endif()
+
+ set(TUKLIB_LARGE_FILE_SUPPORT_TEST
+ "#include <sys/types.h>
+ int foo[sizeof(off_t) >= 8 ? 1 : -1];
+ int main(void) { return 0; }")
+
+ check_c_source_compiles("${TUKLIB_LARGE_FILE_SUPPORT_TEST}"
+ TUKLIB_LARGE_FILE_SUPPORT_BY_DEFAULT)
+
+ if(NOT TUKLIB_LARGE_FILE_SUPPORT_BY_DEFAULT)
+ cmake_push_check_state()
+ # This needs -D.
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
+ check_c_source_compiles("${TUKLIB_LARGE_FILE_SUPPORT_TEST}"
+ TUKLIB_LARGE_FILE_SUPPORT_WITH_FOB64)
+ cmake_pop_check_state()
+ endif()
+
+ if(TUKLIB_LARGE_FILE_SUPPORT_WITH_FOB64)
+ # Show the option only when _FILE_OFFSET_BITS=64 affects sizeof(off_t).
+ option(LARGE_FILE_SUPPORT
+ "Use -D_FILE_OFFSET_BITS=64 to support files larger than 2 GiB."
+ ON)
+
+ if(LARGE_FILE_SUPPORT)
+ # This must not use -D.
+ tuklib_add_definitions("${TARGET_OR_ALL}" "_FILE_OFFSET_BITS=64")
+ endif()
+ endif()
+endfunction()
diff --git a/cmake/tuklib_mbstr.cmake b/cmake/tuklib_mbstr.cmake
new file mode 100644
index 0000000..e073be6
--- /dev/null
+++ b/cmake/tuklib_mbstr.cmake
@@ -0,0 +1,20 @@
+#
+# tuklib_mbstr.cmake - see tuklib_mbstr.m4 for description and comments
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(CheckSymbolExists)
+
+function(tuklib_mbstr TARGET_OR_ALL)
+ check_symbol_exists(mbrtowc wchar.h HAVE_MBRTOWC)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_MBRTOWC)
+
+ # NOTE: wcwidth() requires _GNU_SOURCE or _XOPEN_SOURCE on GNU/Linux.
+ check_symbol_exists(wcwidth wchar.h HAVE_WCWIDTH)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_WCWIDTH)
+endfunction()
diff --git a/cmake/tuklib_physmem.cmake b/cmake/tuklib_physmem.cmake
new file mode 100644
index 0000000..f5ed888
--- /dev/null
+++ b/cmake/tuklib_physmem.cmake
@@ -0,0 +1,150 @@
+#
+# tuklib_physmem.cmake - see tuklib_physmem.m4 for description and comments
+#
+# NOTE: Compared tuklib_physmem.m4, this lacks support for Tru64, IRIX, and
+# Linux sysinfo() (usually sysconf() is used on GNU/Linux).
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(CheckCSourceCompiles)
+include(CheckIncludeFile)
+
+function(tuklib_physmem_internal_check)
+ # Shortcut on Windows:
+ if(WIN32 OR CYGWIN)
+ # Nothing to do, the tuklib_physmem.c handles it.
+ set(TUKLIB_PHYSMEM_DEFINITIONS "" CACHE INTERNAL "")
+ return()
+ endif()
+
+ # Full check for special cases:
+ check_c_source_compiles("
+ #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_PHYSMEM_SPECIAL)
+ if(TUKLIB_PHYSMEM_SPECIAL)
+ # Nothing to do, the tuklib_physmem.c handles it.
+ set(TUKLIB_PHYSMEM_DEFINITIONS "" CACHE INTERNAL "")
+ return()
+ endif()
+
+ # 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).
+ check_c_source_compiles("
+ #include <sys/systemcfg.h>
+ int main(void)
+ {
+ (void)_system_configuration.physmem;
+ return 0;
+ }
+ "
+ TUKLIB_PHYSMEM_AIX)
+ if(TUKLIB_PHYSMEM_AIX)
+ set(TUKLIB_PHYSMEM_DEFINITIONS "TUKLIB_PHYSMEM_AIX" CACHE INTERNAL "")
+ return()
+ endif()
+
+ # sysconf()
+ check_c_source_compiles("
+ #include <unistd.h>
+ int main(void)
+ {
+ long i;
+ i = sysconf(_SC_PAGESIZE);
+ i = sysconf(_SC_PHYS_PAGES);
+ return 0;
+ }
+ "
+ TUKLIB_PHYSMEM_SYSCONF)
+ if(TUKLIB_PHYSMEM_SYSCONF)
+ set(TUKLIB_PHYSMEM_DEFINITIONS "TUKLIB_PHYSMEM_SYSCONF"
+ CACHE INTERNAL "")
+ return()
+ endif()
+
+ # sysctl()
+ check_include_file(sys/param.h HAVE_SYS_PARAM_H)
+ if(HAVE_SYS_PARAM_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_PARAM_H)
+ endif()
+
+ check_c_source_compiles("
+ #ifdef HAVE_SYS_PARAM_H
+ # include <sys/param.h>
+ #endif
+ #include <sys/sysctl.h>
+ 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_PHYSMEM_SYSCTL)
+ if(TUKLIB_PHYSMEM_SYSCTL)
+ if(HAVE_SYS_PARAM_H)
+ set(TUKLIB_PHYSMEM_DEFINITIONS
+ "HAVE_PARAM_H;TUKLIB_PHYSMEM_SYSCTL"
+ CACHE INTERNAL "")
+ else()
+ set(TUKLIB_PHYSMEM_DEFINITIONS
+ "TUKLIB_PHYSMEM_SYSCTL"
+ CACHE INTERNAL "")
+ endif()
+ return()
+ endif()
+
+ # HP-UX
+ check_c_source_compiles("
+ #include <sys/param.h>
+ #include <sys/pstat.h>
+ 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_PHYSMEM_PSTAT_GETSTATIC)
+ if(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
+ set(TUKLIB_PHYSMEM_DEFINITIONS "TUKLIB_PHYSMEM_PSTAT_GETSTATIC"
+ CACHE INTERNAL "")
+ return()
+ endif()
+endfunction()
+
+function(tuklib_physmem TARGET_OR_ALL)
+ if(NOT DEFINED TUKLIB_PHYSMEM_FOUND)
+ message(STATUS "Checking how to detect the amount of physical memory")
+ tuklib_physmem_internal_check()
+
+ if(DEFINED TUKLIB_PHYSMEM_DEFINITIONS)
+ set(TUKLIB_PHYSMEM_FOUND 1 CACHE INTERNAL "")
+ else()
+ set(TUKLIB_PHYSMEM_FOUND 0 CACHE INTERNAL "")
+ message(WARNING
+ "No method to detect the amount of physical memory was found")
+ endif()
+ endif()
+
+ if(TUKLIB_PHYSMEM_FOUND)
+ tuklib_add_definitions("${TARGET_OR_ALL}"
+ "${TUKLIB_PHYSMEM_DEFINITIONS}")
+ endif()
+endfunction()
diff --git a/cmake/tuklib_progname.cmake b/cmake/tuklib_progname.cmake
new file mode 100644
index 0000000..d4ab006
--- /dev/null
+++ b/cmake/tuklib_progname.cmake
@@ -0,0 +1,18 @@
+#
+# tuklib_progname.cmake - see tuklib_progname.m4 for description and comments
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+include("${CMAKE_CURRENT_LIST_DIR}/tuklib_common.cmake")
+include(CheckSymbolExists)
+
+function(tuklib_progname TARGET_OR_ALL)
+ # NOTE: This glibc extension requires _GNU_SOURCE.
+ check_symbol_exists(program_invocation_name errno.h
+ HAVE_PROGRAM_INVOCATION_NAME)
+ tuklib_add_definition_if("${TARGET_OR_ALL}" HAVE_PROGRAM_INVOCATION_NAME)
+endfunction()
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..5e254c3
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,601 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* How many MiB of RAM to assume if the real amount cannot be determined. */
+#undef ASSUME_RAM
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#undef ENABLE_NLS
+
+/* Define to 1 if bswap_16 is available. */
+#undef HAVE_BSWAP_16
+
+/* Define to 1 if bswap_32 is available. */
+#undef HAVE_BSWAP_32
+
+/* Define to 1 if bswap_64 is available. */
+#undef HAVE_BSWAP_64
+
+/* Define to 1 if you have the <byteswap.h> header file. */
+#undef HAVE_BYTESWAP_H
+
+/* Define to 1 if Capsicum is available. */
+#undef HAVE_CAPSICUM
+
+/* Define to 1 if the system has the type `CC_SHA256_CTX'. */
+#undef HAVE_CC_SHA256_CTX
+
+/* Define to 1 if you have the `CC_SHA256_Init' function. */
+#undef HAVE_CC_SHA256_INIT
+
+/* Define to 1 if you have the Mac OS X function
+ CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES
+
+/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if crc32 integrity check is enabled. */
+#undef HAVE_CHECK_CRC32
+
+/* Define to 1 if crc64 integrity check is enabled. */
+#undef HAVE_CHECK_CRC64
+
+/* Define to 1 if sha256 integrity check is enabled. */
+#undef HAVE_CHECK_SHA256
+
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 1 if `CLOCK_MONOTONIC' is declared in <time.h>. */
+#undef HAVE_CLOCK_MONOTONIC
+
+/* Define to 1 if you have the <CommonCrypto/CommonDigest.h> header file. */
+#undef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+
+/* Define to 1 if you have the <cpuid.h> header file. */
+#undef HAVE_CPUID_H
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if any of HAVE_DECODER_foo have been defined. */
+#undef HAVE_DECODERS
+
+/* Define to 1 if arm decoder is enabled. */
+#undef HAVE_DECODER_ARM
+
+/* Define to 1 if arm64 decoder is enabled. */
+#undef HAVE_DECODER_ARM64
+
+/* Define to 1 if armthumb decoder is enabled. */
+#undef HAVE_DECODER_ARMTHUMB
+
+/* Define to 1 if delta decoder is enabled. */
+#undef HAVE_DECODER_DELTA
+
+/* Define to 1 if ia64 decoder is enabled. */
+#undef HAVE_DECODER_IA64
+
+/* Define to 1 if lzma1 decoder is enabled. */
+#undef HAVE_DECODER_LZMA1
+
+/* Define to 1 if lzma2 decoder is enabled. */
+#undef HAVE_DECODER_LZMA2
+
+/* Define to 1 if powerpc decoder is enabled. */
+#undef HAVE_DECODER_POWERPC
+
+/* Define to 1 if sparc decoder is enabled. */
+#undef HAVE_DECODER_SPARC
+
+/* Define to 1 if x86 decoder is enabled. */
+#undef HAVE_DECODER_X86
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if any of HAVE_ENCODER_foo have been defined. */
+#undef HAVE_ENCODERS
+
+/* Define to 1 if arm encoder is enabled. */
+#undef HAVE_ENCODER_ARM
+
+/* Define to 1 if arm64 encoder is enabled. */
+#undef HAVE_ENCODER_ARM64
+
+/* Define to 1 if armthumb encoder is enabled. */
+#undef HAVE_ENCODER_ARMTHUMB
+
+/* Define to 1 if delta encoder is enabled. */
+#undef HAVE_ENCODER_DELTA
+
+/* Define to 1 if ia64 encoder is enabled. */
+#undef HAVE_ENCODER_IA64
+
+/* Define to 1 if lzma1 encoder is enabled. */
+#undef HAVE_ENCODER_LZMA1
+
+/* Define to 1 if lzma2 encoder is enabled. */
+#undef HAVE_ENCODER_LZMA2
+
+/* Define to 1 if powerpc encoder is enabled. */
+#undef HAVE_ENCODER_POWERPC
+
+/* Define to 1 if sparc encoder is enabled. */
+#undef HAVE_ENCODER_SPARC
+
+/* Define to 1 if x86 encoder is enabled. */
+#undef HAVE_ENCODER_X86
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if __attribute__((__constructor__)) is supported for functions.
+ */
+#undef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+
+/* Define to 1 if you have the `futimens' function. */
+#undef HAVE_FUTIMENS
+
+/* Define to 1 if you have the `futimes' function. */
+#undef HAVE_FUTIMES
+
+/* Define to 1 if you have the `futimesat' function. */
+#undef HAVE_FUTIMESAT
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long' function. */
+#undef HAVE_GETOPT_LONG
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define if you have the iconv() function and it works. */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the <immintrin.h> header file. */
+#undef HAVE_IMMINTRIN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if .lz (lzip) decompression support is enabled. */
+#undef HAVE_LZIP_DECODER
+
+/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
+#undef HAVE_MBRTOWC
+
+/* Define to 1 to enable bt2 match finder. */
+#undef HAVE_MF_BT2
+
+/* Define to 1 to enable bt3 match finder. */
+#undef HAVE_MF_BT3
+
+/* Define to 1 to enable bt4 match finder. */
+#undef HAVE_MF_BT4
+
+/* Define to 1 to enable hc3 match finder. */
+#undef HAVE_MF_HC3
+
+/* Define to 1 to enable hc4 match finder. */
+#undef HAVE_MF_HC4
+
+/* Define to 1 if you have the <minix/config.h> header file. */
+#undef HAVE_MINIX_CONFIG_H
+
+/* Define to 1 if getopt.h declares extern int optreset. */
+#undef HAVE_OPTRESET
+
+/* Define to 1 if you have the `pledge' function. */
+#undef HAVE_PLEDGE
+
+/* Define to 1 if you have the `posix_fadvise' function. */
+#undef HAVE_POSIX_FADVISE
+
+/* Define to 1 if `program_invocation_name' is declared in <errno.h>. */
+#undef HAVE_PROGRAM_INVOCATION_NAME
+
+/* Define to 1 if you have the `pthread_condattr_setclock' function. */
+#undef HAVE_PTHREAD_CONDATTR_SETCLOCK
+
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
+/* Define to 1 if you have the `SHA256Init' function. */
+#undef HAVE_SHA256INIT
+
+/* Define to 1 if the system has the type `SHA256_CTX'. */
+#undef HAVE_SHA256_CTX
+
+/* Define to 1 if you have the <sha256.h> header file. */
+#undef HAVE_SHA256_H
+
+/* Define to 1 if you have the `SHA256_Init' function. */
+#undef HAVE_SHA256_INIT
+
+/* Define to 1 if the system has the type `SHA2_CTX'. */
+#undef HAVE_SHA2_CTX
+
+/* Define to 1 if you have the <sha2.h> header file. */
+#undef HAVE_SHA2_H
+
+/* Define to 1 if optimizing for size. */
+#undef HAVE_SMALL
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if `st_atimensec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIMENSEC
+
+/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
+
+/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
+
+/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
+
+/* Define to 1 if `st_uatime' is a member of `struct stat'. */
+#undef HAVE_STRUCT_STAT_ST_UATIME
+
+/* Define to 1 to if GNU/Linux-specific details are unconditionally wanted for
+ symbol versioning. Define to 2 to if these are wanted only if also PIC is
+ defined (allows building both shared and static liblzma at the same time
+ with Libtool if neither --with-pic nor --without-pic is used). This define
+ must be used together with liblzma_linux.map. */
+#undef HAVE_SYMBOL_VERSIONS_LINUX
+
+/* Define to 1 if you have the <sys/byteorder.h> header file. */
+#undef HAVE_SYS_BYTEORDER_H
+
+/* Define to 1 if you have the <sys/capsicum.h> header file. */
+#undef HAVE_SYS_CAPSICUM_H
+
+/* Define to 1 if you have the <sys/endian.h> header file. */
+#undef HAVE_SYS_ENDIAN_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if the system has the type `uintptr_t'. */
+#undef HAVE_UINTPTR_T
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if _mm_set_epi64x and _mm_clmulepi64_si128 are usable. See
+ configure.ac for details. */
+#undef HAVE_USABLE_CLMUL
+
+/* Define to 1 if you have the `utime' function. */
+#undef HAVE_UTIME
+
+/* Define to 1 if you have the `utimes' function. */
+#undef HAVE_UTIMES
+
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+ declarations. */
+#undef HAVE_VISIBILITY
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define to 1 if you have the `wcwidth' function. */
+#undef HAVE_WCWIDTH
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `_futime' function. */
+#undef HAVE__FUTIME
+
+/* Define to 1 if _mm_movemask_epi8 is available. */
+#undef HAVE__MM_MOVEMASK_EPI8
+
+/* Define to 1 if the GNU C extension __builtin_assume_aligned is supported.
+ */
+#undef HAVE___BUILTIN_ASSUME_ALIGNED
+
+/* Define to 1 if the GNU C extensions __builtin_bswap16/32/64 are supported.
+ */
+#undef HAVE___BUILTIN_BSWAPXX
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Define to 1 when using POSIX threads (pthreads). */
+#undef MYTHREAD_POSIX
+
+/* Define to 1 when using Windows Vista compatible threads. This uses features
+ that are not available on Windows XP. */
+#undef MYTHREAD_VISTA
+
+/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This
+ avoids use of features that were added in Windows Vista. */
+#undef MYTHREAD_WIN95
+
+/* Define to 1 to disable debugging code. */
+#undef NDEBUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+ required in a freestanding environment). This macro is provided for
+ backward compatibility; new code need not use it. */
+#undef STDC_HEADERS
+
+/* Define to 1 if the number of available CPU cores can be detected with
+ cpuset(2). */
+#undef TUKLIB_CPUCORES_CPUSET
+
+/* Define to 1 if the number of available CPU cores can be detected with
+ pstat_getdynamic(). */
+#undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC
+
+/* Define to 1 if the number of available CPU cores can be detected with
+ sched_getaffinity() */
+#undef TUKLIB_CPUCORES_SCHED_GETAFFINITY
+
+/* Define to 1 if the number of available CPU cores can be detected with
+ sysconf(_SC_NPROCESSORS_ONLN) or sysconf(_SC_NPROC_ONLN). */
+#undef TUKLIB_CPUCORES_SYSCONF
+
+/* Define to 1 if the number of available CPU cores can be detected with
+ sysctl(). */
+#undef TUKLIB_CPUCORES_SYSCTL
+
+/* Define to 1 if the system supports fast unaligned access to 16-bit, 32-bit,
+ and 64-bit integers. */
+#undef TUKLIB_FAST_UNALIGNED_ACCESS
+
+/* Define to 1 if the amount of physical memory can be detected with
+ _system_configuration.physmem. */
+#undef TUKLIB_PHYSMEM_AIX
+
+/* Define to 1 if the amount of physical memory can be detected with
+ getinvent_r(). */
+#undef TUKLIB_PHYSMEM_GETINVENT_R
+
+/* Define to 1 if the amount of physical memory can be detected with
+ getsysinfo(). */
+#undef TUKLIB_PHYSMEM_GETSYSINFO
+
+/* Define to 1 if the amount of physical memory can be detected with
+ pstat_getstatic(). */
+#undef TUKLIB_PHYSMEM_PSTAT_GETSTATIC
+
+/* Define to 1 if the amount of physical memory can be detected with
+ sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES). */
+#undef TUKLIB_PHYSMEM_SYSCONF
+
+/* Define to 1 if the amount of physical memory can be detected with sysctl().
+ */
+#undef TUKLIB_PHYSMEM_SYSCTL
+
+/* Define to 1 if the amount of physical memory can be detected with Linux
+ sysinfo(). */
+#undef TUKLIB_PHYSMEM_SYSINFO
+
+/* 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. */
+#undef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable general extensions on macOS. */
+#ifndef _DARWIN_C_SOURCE
+# undef _DARWIN_C_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable X/Open compliant socket functions that do not require linking
+ with -lxnet on HP-UX 11.11. */
+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
+# undef _HPUX_ALT_XOPEN_SOCKET_API
+#endif
+/* Identify the host operating system as Minix.
+ This macro does not affect the system headers' behavior.
+ A future release of Autoconf may stop defining this macro. */
+#ifndef _MINIX
+# undef _MINIX
+#endif
+/* Enable general extensions on NetBSD.
+ Enable NetBSD compatibility extensions on Minix. */
+#ifndef _NETBSD_SOURCE
+# undef _NETBSD_SOURCE
+#endif
+/* Enable OpenBSD compatibility extensions on NetBSD.
+ Oddly enough, this does nothing on OpenBSD. */
+#ifndef _OPENBSD_SOURCE
+# undef _OPENBSD_SOURCE
+#endif
+/* Define to 1 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_SOURCE
+# undef _POSIX_SOURCE
+#endif
+/* Define to 2 if needed for POSIX-compatible behavior. */
+#ifndef _POSIX_1_SOURCE
+# undef _POSIX_1_SOURCE
+#endif
+/* Enable POSIX-compatible threading on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable X/Open extensions. Define to 500 only if necessary
+ to make mbstate_t available. */
+#ifndef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
+
+
+/* Version number of package */
+#undef VERSION
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT64_T
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+#undef _UINT8_T
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+ used. */
+#undef __GETOPT_PREFIX
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#undef int32_t
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#undef int64_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+ such a type exists and the standard includes do not define it. */
+#undef uint8_t
+
+/* Define to the type of an unsigned integer type wide enough to hold a
+ pointer, if such a type exists, and if the system does not define it. */
+#undef uintptr_t
diff --git a/configure b/configure
new file mode 100755
index 0000000..5f8aa8c
--- /dev/null
+++ b/configure
@@ -0,0 +1,24905 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.71 for XZ Utils 5.4.5.
+#
+# Report bugs to <xz@tukaani.org>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ 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 who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="as_nop=:
+if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else \$as_nop
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" )
+then :
+
+else \$as_nop
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+blah=\$(echo \$(echo blah))
+test x\"\$blah\" = xblah || exit 1
+test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1
+
+ 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\" ) || exit 1"
+ if (eval "$as_required") 2>/dev/null
+then :
+ as_have_required=yes
+else $as_nop
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
+then :
+
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
+then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
+then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi
+fi
+
+
+ if test "x$CONFIG_SHELL" != x
+then :
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+ if test x$as_have_required = xno
+then :
+ printf "%s\n" "$0: This script requires a shell more modern than all"
+ printf "%s\n" "$0: the shells that I found on your system."
+ if test ${ZSH_VERSION+y} ; then
+ printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and xz@tukaani.org
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+# as_fn_nop
+# ---------
+# Do nothing but, unlike ":", preserve the value of $?.
+as_fn_nop ()
+{
+ return $?
+}
+as_nop=as_fn_nop
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='XZ Utils'
+PACKAGE_TARNAME='xz'
+PACKAGE_VERSION='5.4.5'
+PACKAGE_STRING='XZ Utils 5.4.5'
+PACKAGE_BUGREPORT='xz@tukaani.org'
+PACKAGE_URL='https://tukaani.org/xz/'
+
+ac_unique_file="src/liblzma/common/common.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_c_list=
+gt_needs=
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+xz
+AM_CFLAGS
+COND_GNULIB_FALSE
+COND_GNULIB_TRUE
+HAVE_VISIBILITY
+CFLAG_VISIBILITY
+CAPSICUM_LIB
+COND_INTERNAL_SHA256_FALSE
+COND_INTERNAL_SHA256_TRUE
+GETOPT_H
+LIBOBJS
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+LTLIBICONV
+LIBICONV
+INTL_MACOSX_LIBS
+XGETTEXT_EXTRA_OPTIONS
+MSGMERGE_FOR_MSGFMT_OPTION
+MSGMERGE
+XGETTEXT_015
+XGETTEXT
+GMSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
+USE_NLS
+COND_SYMVERS_GENERIC_FALSE
+COND_SYMVERS_GENERIC_TRUE
+COND_SYMVERS_LINUX_FALSE
+COND_SYMVERS_LINUX_TRUE
+COND_SHARED_FALSE
+COND_SHARED_TRUE
+RC
+LT_SYS_LIBRARY_PATH
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+RANLIB
+ac_ct_AR
+AR
+FILECMD
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+COND_THREADS_FALSE
+COND_THREADS_TRUE
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CXX
+PTHREAD_CC
+ax_pthread_config
+EGREP
+GREP
+CPP
+SED
+am__fastdepCCAS_FALSE
+am__fastdepCCAS_TRUE
+CCASDEPMODE
+CCASFLAGS
+CCAS
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+LN_S
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+CSCOPE
+ETAGS
+CTAGS
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+PREFERABLY_POSIX_SHELL
+POSIX_SHELL
+enable_path_for_scripts
+COND_DOC_FALSE
+COND_DOC_TRUE
+COND_SCRIPTS_FALSE
+COND_SCRIPTS_TRUE
+COND_LZMALINKS_FALSE
+COND_LZMALINKS_TRUE
+COND_LZMAINFO_FALSE
+COND_LZMAINFO_TRUE
+COND_LZMADEC_FALSE
+COND_LZMADEC_TRUE
+COND_XZDEC_FALSE
+COND_XZDEC_TRUE
+COND_XZ_FALSE
+COND_XZ_TRUE
+COND_SMALL_FALSE
+COND_SMALL_TRUE
+COND_ASM_X86_FALSE
+COND_ASM_X86_TRUE
+COND_LZIP_DECODER_FALSE
+COND_LZIP_DECODER_TRUE
+COND_MICROLZMA_FALSE
+COND_MICROLZMA_TRUE
+COND_CHECK_SHA256_FALSE
+COND_CHECK_SHA256_TRUE
+COND_CHECK_CRC64_FALSE
+COND_CHECK_CRC64_TRUE
+COND_CHECK_CRC32_FALSE
+COND_CHECK_CRC32_TRUE
+COND_DECODER_LZ_FALSE
+COND_DECODER_LZ_TRUE
+COND_ENCODER_LZ_FALSE
+COND_ENCODER_LZ_TRUE
+COND_FILTER_LZ_FALSE
+COND_FILTER_LZ_TRUE
+COND_DECODER_SIMPLE_FALSE
+COND_DECODER_SIMPLE_TRUE
+COND_ENCODER_SIMPLE_FALSE
+COND_ENCODER_SIMPLE_TRUE
+COND_FILTER_SIMPLE_FALSE
+COND_FILTER_SIMPLE_TRUE
+COND_DECODER_SPARC_FALSE
+COND_DECODER_SPARC_TRUE
+COND_ENCODER_SPARC_FALSE
+COND_ENCODER_SPARC_TRUE
+COND_FILTER_SPARC_FALSE
+COND_FILTER_SPARC_TRUE
+COND_DECODER_ARM64_FALSE
+COND_DECODER_ARM64_TRUE
+COND_ENCODER_ARM64_FALSE
+COND_ENCODER_ARM64_TRUE
+COND_FILTER_ARM64_FALSE
+COND_FILTER_ARM64_TRUE
+COND_DECODER_ARMTHUMB_FALSE
+COND_DECODER_ARMTHUMB_TRUE
+COND_ENCODER_ARMTHUMB_FALSE
+COND_ENCODER_ARMTHUMB_TRUE
+COND_FILTER_ARMTHUMB_FALSE
+COND_FILTER_ARMTHUMB_TRUE
+COND_DECODER_ARM_FALSE
+COND_DECODER_ARM_TRUE
+COND_ENCODER_ARM_FALSE
+COND_ENCODER_ARM_TRUE
+COND_FILTER_ARM_FALSE
+COND_FILTER_ARM_TRUE
+COND_DECODER_IA64_FALSE
+COND_DECODER_IA64_TRUE
+COND_ENCODER_IA64_FALSE
+COND_ENCODER_IA64_TRUE
+COND_FILTER_IA64_FALSE
+COND_FILTER_IA64_TRUE
+COND_DECODER_POWERPC_FALSE
+COND_DECODER_POWERPC_TRUE
+COND_ENCODER_POWERPC_FALSE
+COND_ENCODER_POWERPC_TRUE
+COND_FILTER_POWERPC_FALSE
+COND_FILTER_POWERPC_TRUE
+COND_DECODER_X86_FALSE
+COND_DECODER_X86_TRUE
+COND_ENCODER_X86_FALSE
+COND_ENCODER_X86_TRUE
+COND_FILTER_X86_FALSE
+COND_FILTER_X86_TRUE
+COND_DECODER_DELTA_FALSE
+COND_DECODER_DELTA_TRUE
+COND_ENCODER_DELTA_FALSE
+COND_ENCODER_DELTA_TRUE
+COND_FILTER_DELTA_FALSE
+COND_FILTER_DELTA_TRUE
+COND_DECODER_LZMA2_FALSE
+COND_DECODER_LZMA2_TRUE
+COND_ENCODER_LZMA2_FALSE
+COND_ENCODER_LZMA2_TRUE
+COND_FILTER_LZMA2_FALSE
+COND_FILTER_LZMA2_TRUE
+COND_DECODER_LZMA1_FALSE
+COND_DECODER_LZMA1_TRUE
+COND_ENCODER_LZMA1_FALSE
+COND_ENCODER_LZMA1_TRUE
+COND_FILTER_LZMA1_FALSE
+COND_FILTER_LZMA1_TRUE
+COND_MAIN_DECODER_FALSE
+COND_MAIN_DECODER_TRUE
+COND_MAIN_ENCODER_FALSE
+COND_MAIN_ENCODER_TRUE
+LN_EXEEXT
+COND_W32_FALSE
+COND_W32_TRUE
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+runstatedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL
+am__quote'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_debug
+enable_encoders
+enable_decoders
+enable_match_finders
+enable_checks
+enable_external_sha256
+enable_microlzma
+enable_lzip_decoder
+enable_assembler
+enable_clmul_crc
+enable_small
+enable_threads
+enable_assume_ram
+enable_xz
+enable_xzdec
+enable_lzmadec
+enable_lzmainfo
+enable_lzma_links
+enable_scripts
+enable_doc
+enable_sandbox
+enable_path_for_scripts
+enable_silent_rules
+enable_dependency_tracking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_aix_soname
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_symbol_versions
+enable_nls
+enable_rpath
+with_libiconv_prefix
+with_libintl_prefix
+enable_largefile
+enable_unaligned_access
+enable_unsafe_type_punning
+enable_werror
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCAS
+CCASFLAGS
+CPP
+LT_SYS_LIBRARY_PATH'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: \`$ac_useropt'"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir runstatedir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures XZ Utils 5.4.5 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/xz]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of XZ Utils 5.4.5:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-debug Enable debugging code.
+ --enable-encoders=LIST Comma-separated list of encoders to build.
+ Default=all. Available encoders: lzma1 lzma2 delta
+ x86 powerpc ia64 arm armthumb arm64 sparc
+ --enable-decoders=LIST Comma-separated list of decoders to build.
+ Default=all. Available decoders are the same as
+ available encoders.
+ --enable-match-finders=LIST
+ Comma-separated list of match finders to build.
+ Default=all. At least one match finder is required
+ for encoding with the LZMA1 and LZMA2 filters.
+ Available match finders: hc3 hc4 bt2 bt3 bt4
+ --enable-checks=LIST Comma-separated list of integrity checks to build.
+ Default=all. Available integrity checks: crc32 crc64
+ sha256
+ --enable-external-sha256
+ Use SHA-256 code from the operating system. See
+ INSTALL for possible subtle problems.
+ --disable-microlzma Do not build MicroLZMA encoder and decoder. It is
+ needed by specific applications only, for example,
+ erofs-utils.
+ --disable-lzip-decoder Disable decompression support for .lz (lzip) files.
+ --disable-assembler Do not use assembler optimizations even if such
+ exist for the architecture.
+ --disable-clmul-crc Do not use carryless multiplication for CRC
+ calculation even if support for it is detected.
+ --enable-small Make liblzma smaller and a little slower. This is
+ disabled by default to optimize for speed.
+ --enable-threads=METHOD Supported METHODS are `yes', `no', `posix', `win95',
+ and `vista'. The default is `yes'. Using `no'
+ together with --enable-small makes liblzma thread
+ unsafe.
+ --enable-assume-ram=SIZE
+ If and only if the real amount of RAM cannot be
+ determined, assume SIZE MiB. The default is 128 MiB.
+ This affects the default memory usage limit.
+ --disable-xz do not build the xz tool
+ --disable-xzdec do not build xzdec
+ --disable-lzmadec do not build lzmadec (it exists primarily for LZMA
+ Utils compatibility)
+ --disable-lzmainfo do not build lzmainfo (it exists primarily for LZMA
+ Utils compatibility)
+ --disable-lzma-links do not create symlinks for LZMA Utils compatibility
+ --disable-scripts do not install the scripts xzdiff, xzgrep, xzless,
+ xzmore, and their symlinks
+ --disable-doc do not install documentation files to docdir (man
+ pages will still be installed)
+ --enable-sandbox=METHOD Sandboxing METHOD can be `auto', `no', `capsicum',
+ or `pledge'. The default is `auto' which enables
+ sandboxing if a supported sandboxing method is
+ found.
+ --enable-path-for-scripts=PREFIX
+ If PREFIX isn't empty, PATH=PREFIX:$PATH will be set
+ in the beginning of the scripts (xzgrep and others).
+ The default is empty except on Solaris the default
+ is /usr/xpg4/bin.
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-symbol-versions
+ Use symbol versioning for liblzma. Enabled by
+ default on GNU/Linux, other GNU-based systems, and
+ FreeBSD.
+ --disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
+ --disable-largefile omit support for large files
+ --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 only on x86,
+ x86_64, big endian PowerPC, and some ARM systems.
+ --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-werror Enable -Werror to abort compilation on all compiler
+ warnings.
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CCAS assembler compiler command (defaults to CC)
+ CCASFLAGS assembler compiler flags (defaults to CFLAGS)
+ CPP C preprocessor
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <xz@tukaani.org>.
+XZ Utils home page: <https://tukaani.org/xz/>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for configure.gnu first; this name is used for a wrapper for
+ # Metaconfig's "Configure" on case-insensitive file systems.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+XZ Utils configure 5.4.5
+generated by GNU Autoconf 2.71
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below. */
+
+#include <limits.h>
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main (void)
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
+# ------------------------------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
+ac_fn_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+printf %s "checking whether $as_decl_name is declared... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ eval ac_save_FLAGS=\$$6
+ as_fn_append $6 " $5"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ eval $6=\$ac_save_FLAGS
+
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_check_decl
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+printf %s "checking for uint$2_t... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
+ for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ case $ac_type in #(
+ uint$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"
+then :
+
+else $as_nop
+ break
+fi
+ done
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_uintX_t
+
+# ac_fn_c_find_intX_t LINENO BITS VAR
+# -----------------------------------
+# Finds a signed integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_intX_t ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
+printf %s "checking for int$2_t... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ eval "$3=no"
+ # Order is important - never check a type that is potentially smaller
+ # than half of the expected target width.
+ for ac_type in int$2_t 'int' 'long int' \
+ 'long long int' 'short int' 'signed char'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ enum { N = $2 / 2 - 1 };
+int
+main (void)
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ enum { N = $2 / 2 - 1 };
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+ < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ case $ac_type in #(
+ int$2_t) :
+ eval "$3=yes" ;; #(
+ *) :
+ eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ if eval test \"x\$"$3"\" = x"no"
+then :
+
+else $as_nop
+ break
+fi
+ done
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_intX_t
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid; break
+else $as_nop
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_lo=$ac_mid; break
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+else $as_nop
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_hi=$ac_mid
+else $as_nop
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval (void) { return $2; }
+static unsigned long int ulongval (void) { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main (void)
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else $as_nop
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+printf %s "checking for $2.$3... " >&6; }
+if eval test \${$4+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main (void)
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$4=yes"
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main (void)
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$4=yes"
+else $as_nop
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
+ac_configure_args_raw=
+for ac_arg
+do
+ case $ac_arg in
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_configure_args_raw " '$ac_arg'"
+done
+
+case $ac_configure_args_raw in
+ *$as_nl*)
+ ac_safe_unquote= ;;
+ *)
+ ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
+ ac_unsafe_a="$ac_unsafe_z#~"
+ ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
+ ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
+esac
+
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by XZ Utils $as_me 5.4.5, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ $ $0$ac_configure_args_raw
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ printf "%s\n" "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ printf "%s\n" "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ printf "%s\n" "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ printf "%s\n" "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ printf "%s\n" "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ printf "%s\n" "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ printf "%s\n" "$as_me: caught signal $ac_signal"
+ printf "%s\n" "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+printf "%s\n" "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
+
+printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ ac_site_files="$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
+else
+ ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+fi
+
+for ac_site_file in $ac_site_files
+do
+ case $ac_site_file in #(
+ */*) :
+ ;; #(
+ *) :
+ ac_site_file=./$ac_site_file ;;
+esac
+ if test -f "$ac_site_file" && test -r "$ac_site_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+
+# Test code for whether the C compiler supports C89 (body of main).
+ac_c_conftest_c89_main='
+ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
+'
+
+# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+
+# Test code for whether the C compiler supports C99 (body of main).
+ac_c_conftest_c99_main='
+ // Check bool.
+ _Bool success = false;
+ success |= (argc != 0);
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[0] = argv[0][0];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
+ || dynamic_array[ni.number - 1] != 543);
+'
+
+# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+int _Noreturn does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+
+# Test code for whether the C compiler supports C11 (body of main).
+ac_c_conftest_c11_main='
+ _Static_assert ((offsetof (struct anonymous, i)
+ == offsetof (struct anonymous, w.k)),
+ "Anonymous union alignment botch");
+ v1.i = 2;
+ v1.w.k = 5;
+ ok |= v1.i != 5;
+'
+
+# Test code for whether the C compiler supports C11 (complete).
+ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+${ac_c_conftest_c11_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ ${ac_c_conftest_c11_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C99 (complete).
+ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
+${ac_c_conftest_c99_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ ${ac_c_conftest_c99_main}
+ return ok;
+}
+"
+
+# Test code for whether the C compiler supports C89 (complete).
+ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
+
+int
+main (int argc, char **argv)
+{
+ int ok = 0;
+ ${ac_c_conftest_c89_main}
+ return ok;
+}
+"
+
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
+as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
+as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
+gt_needs="$gt_needs "
+
+# Auxiliary files required by this configure script.
+ac_aux_files="config.rpath ltmain.sh compile missing install-sh config.guess config.sub"
+
+# Locations in which to look for auxiliary files.
+ac_aux_dir_candidates="${srcdir}/build-aux"
+
+# Search for a directory containing all of the required auxiliary files,
+# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
+# If we don't find one directory that contains all the files we need,
+# we report the set of missing files from the *first* directory in
+# $ac_aux_dir_candidates and give up.
+ac_missing_aux_files=""
+ac_first_candidate=:
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in $ac_aux_dir_candidates
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ as_found=:
+
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
+ ac_aux_dir_found=yes
+ ac_install_sh=
+ for ac_aux in $ac_aux_files
+ do
+ # As a special case, if "install-sh" is required, that requirement
+ # can be satisfied by any of "install-sh", "install.sh", or "shtool",
+ # and $ac_install_sh is set appropriately for whichever one is found.
+ if test x"$ac_aux" = x"install-sh"
+ then
+ if test -f "${as_dir}install-sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
+ ac_install_sh="${as_dir}install-sh -c"
+ elif test -f "${as_dir}install.sh"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
+ ac_install_sh="${as_dir}install.sh -c"
+ elif test -f "${as_dir}shtool"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
+ ac_install_sh="${as_dir}shtool install -c"
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} install-sh"
+ else
+ break
+ fi
+ fi
+ else
+ if test -f "${as_dir}${ac_aux}"; then
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
+ else
+ ac_aux_dir_found=no
+ if $ac_first_candidate; then
+ ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
+ else
+ break
+ fi
+ fi
+ fi
+ done
+ if test "$ac_aux_dir_found" = yes; then
+ ac_aux_dir="$as_dir"
+ break
+ fi
+ ac_first_candidate=false
+
+ as_found=false
+done
+IFS=$as_save_IFS
+if $as_found
+then :
+
+else $as_nop
+ as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+fi
+
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+if test -f "${ac_aux_dir}config.guess"; then
+ ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
+fi
+if test -f "${ac_aux_dir}config.sub"; then
+ ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
+fi
+if test -f "$ac_aux_dir/configure"; then
+ ac_configure="$SHELL ${ac_aux_dir}configure"
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+echo
+echo "$PACKAGE_STRING"
+
+echo
+echo "System type:"
+# This is needed to know if assembler optimizations can be used.
+
+
+
+ # Make sure we can run config.sub.
+$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+printf %s "checking build system type... " >&6; }
+if test ${ac_cv_build+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+printf "%s\n" "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+printf %s "checking host system type... " >&6; }
+if test ${ac_cv_host+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+printf "%s\n" "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+# We do some special things on Windows (32-bit or 64-bit) builds.
+case $host_os in
+ mingw* | cygwin | msys) is_w32=yes ;;
+ *) is_w32=no ;;
+esac
+ if test "$is_w32" = yes; then
+ COND_W32_TRUE=
+ COND_W32_FALSE='#'
+else
+ COND_W32_TRUE='#'
+ COND_W32_FALSE=
+fi
+
+
+# We need to use $EXEEXT with $(LN_S) when creating symlinks to
+# executables. Cygwin is an exception to this, since it is recommended
+# that symlinks don't have the .exe suffix. To make this work, we
+# define LN_EXEEXT.
+#
+# MSYS2 is treated the same way as Cygwin. It uses plain "msys" like
+# the original MSYS when building MSYS/MSYS2-binaries. Hopefully this
+# doesn't break things for the original MSYS developers. Note that this
+# doesn't affect normal MSYS/MSYS2 users building non-MSYS/MSYS2 binaries
+# since in that case the $host_os is usually mingw32.
+case $host_os in
+ cygwin | msys) LN_EXEEXT= ;;
+ *) LN_EXEEXT='$(EXEEXT)' ;;
+esac
+
+
+echo
+echo "Configure options:"
+AM_CFLAGS=
+
+
+#############
+# Debugging #
+#############
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if debugging code should be compiled" >&5
+printf %s "checking if debugging code should be compiled... " >&6; }
+# Check whether --enable-debug was given.
+if test ${enable_debug+y}
+then :
+ enableval=$enable_debug;
+else $as_nop
+ enable_debug=no
+fi
+
+if test "x$enable_debug" = xyes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+
+printf "%s\n" "#define NDEBUG 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+###########
+# Filters #
+###########
+
+
+
+
+enable_filter_lzma1=no
+enable_encoder_lzma1=no
+enable_decoder_lzma1=no
+enable_filter_lzma2=no
+enable_encoder_lzma2=no
+enable_decoder_lzma2=no
+enable_filter_delta=no
+enable_encoder_delta=no
+enable_decoder_delta=no
+enable_filter_x86=no
+enable_encoder_x86=no
+enable_decoder_x86=no
+enable_filter_powerpc=no
+enable_encoder_powerpc=no
+enable_decoder_powerpc=no
+enable_filter_ia64=no
+enable_encoder_ia64=no
+enable_decoder_ia64=no
+enable_filter_arm=no
+enable_encoder_arm=no
+enable_decoder_arm=no
+enable_filter_armthumb=no
+enable_encoder_armthumb=no
+enable_decoder_armthumb=no
+enable_filter_arm64=no
+enable_encoder_arm64=no
+enable_decoder_arm64=no
+enable_filter_sparc=no
+enable_encoder_sparc=no
+enable_decoder_sparc=no
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which encoders to build" >&5
+printf %s "checking which encoders to build... " >&6; }
+# Check whether --enable-encoders was given.
+if test ${enable_encoders+y}
+then :
+ enableval=$enable_encoders;
+else $as_nop
+ enable_encoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc
+fi
+
+enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
+if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
+ enable_encoders=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (none)" >&5
+printf "%s\n" "(none)" >&6; }
+else
+ for arg in $enable_encoders
+ do
+ case $arg in
+ lzma1)
+ enable_filter_lzma1=yes
+ enable_encoder_lzma1=yes
+
+printf "%s\n" "#define HAVE_ENCODER_LZMA1 1" >>confdefs.h
+
+ ;;
+ lzma2)
+ enable_filter_lzma2=yes
+ enable_encoder_lzma2=yes
+
+printf "%s\n" "#define HAVE_ENCODER_LZMA2 1" >>confdefs.h
+
+ ;;
+ delta)
+ enable_filter_delta=yes
+ enable_encoder_delta=yes
+
+printf "%s\n" "#define HAVE_ENCODER_DELTA 1" >>confdefs.h
+
+ ;;
+ x86)
+ enable_filter_x86=yes
+ enable_encoder_x86=yes
+
+printf "%s\n" "#define HAVE_ENCODER_X86 1" >>confdefs.h
+
+ ;;
+ powerpc)
+ enable_filter_powerpc=yes
+ enable_encoder_powerpc=yes
+
+printf "%s\n" "#define HAVE_ENCODER_POWERPC 1" >>confdefs.h
+
+ ;;
+ ia64)
+ enable_filter_ia64=yes
+ enable_encoder_ia64=yes
+
+printf "%s\n" "#define HAVE_ENCODER_IA64 1" >>confdefs.h
+
+ ;;
+ arm)
+ enable_filter_arm=yes
+ enable_encoder_arm=yes
+
+printf "%s\n" "#define HAVE_ENCODER_ARM 1" >>confdefs.h
+
+ ;;
+ armthumb)
+ enable_filter_armthumb=yes
+ enable_encoder_armthumb=yes
+
+printf "%s\n" "#define HAVE_ENCODER_ARMTHUMB 1" >>confdefs.h
+
+ ;;
+ arm64)
+ enable_filter_arm64=yes
+ enable_encoder_arm64=yes
+
+printf "%s\n" "#define HAVE_ENCODER_ARM64 1" >>confdefs.h
+
+ ;;
+ sparc)
+ enable_filter_sparc=yes
+ enable_encoder_sparc=yes
+
+printf "%s\n" "#define HAVE_ENCODER_SPARC 1" >>confdefs.h
+
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "unknown filter: $arg" "$LINENO" 5
+ ;;
+ esac
+ done
+
+printf "%s\n" "#define HAVE_ENCODERS 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_encoders" >&5
+printf "%s\n" "$enable_encoders" >&6; }
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which decoders to build" >&5
+printf %s "checking which decoders to build... " >&6; }
+# Check whether --enable-decoders was given.
+if test ${enable_decoders+y}
+then :
+ enableval=$enable_decoders;
+else $as_nop
+ enable_decoders=lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc
+fi
+
+enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
+if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
+ enable_decoders=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (none)" >&5
+printf "%s\n" "(none)" >&6; }
+else
+ for arg in $enable_decoders
+ do
+ case $arg in
+ lzma1)
+ enable_filter_lzma1=yes
+ enable_decoder_lzma1=yes
+
+printf "%s\n" "#define HAVE_DECODER_LZMA1 1" >>confdefs.h
+
+ ;;
+ lzma2)
+ enable_filter_lzma2=yes
+ enable_decoder_lzma2=yes
+
+printf "%s\n" "#define HAVE_DECODER_LZMA2 1" >>confdefs.h
+
+ ;;
+ delta)
+ enable_filter_delta=yes
+ enable_decoder_delta=yes
+
+printf "%s\n" "#define HAVE_DECODER_DELTA 1" >>confdefs.h
+
+ ;;
+ x86)
+ enable_filter_x86=yes
+ enable_decoder_x86=yes
+
+printf "%s\n" "#define HAVE_DECODER_X86 1" >>confdefs.h
+
+ ;;
+ powerpc)
+ enable_filter_powerpc=yes
+ enable_decoder_powerpc=yes
+
+printf "%s\n" "#define HAVE_DECODER_POWERPC 1" >>confdefs.h
+
+ ;;
+ ia64)
+ enable_filter_ia64=yes
+ enable_decoder_ia64=yes
+
+printf "%s\n" "#define HAVE_DECODER_IA64 1" >>confdefs.h
+
+ ;;
+ arm)
+ enable_filter_arm=yes
+ enable_decoder_arm=yes
+
+printf "%s\n" "#define HAVE_DECODER_ARM 1" >>confdefs.h
+
+ ;;
+ armthumb)
+ enable_filter_armthumb=yes
+ enable_decoder_armthumb=yes
+
+printf "%s\n" "#define HAVE_DECODER_ARMTHUMB 1" >>confdefs.h
+
+ ;;
+ arm64)
+ enable_filter_arm64=yes
+ enable_decoder_arm64=yes
+
+printf "%s\n" "#define HAVE_DECODER_ARM64 1" >>confdefs.h
+
+ ;;
+ sparc)
+ enable_filter_sparc=yes
+ enable_decoder_sparc=yes
+
+printf "%s\n" "#define HAVE_DECODER_SPARC 1" >>confdefs.h
+
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "unknown filter: $arg" "$LINENO" 5
+ ;;
+ esac
+ done
+
+printf "%s\n" "#define HAVE_DECODERS 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_decoders" >&5
+printf "%s\n" "$enable_decoders" >&6; }
+fi
+
+if test "x$enable_encoder_lzma2$enable_encoder_lzma1" = xyesno \
+ || test "x$enable_decoder_lzma2$enable_decoder_lzma1" = xyesno; then
+ as_fn_error $? "LZMA2 requires that LZMA1 is also enabled." "$LINENO" 5
+fi
+
+ if test "x$enable_encoders" != xno; then
+ COND_MAIN_ENCODER_TRUE=
+ COND_MAIN_ENCODER_FALSE='#'
+else
+ COND_MAIN_ENCODER_TRUE='#'
+ COND_MAIN_ENCODER_FALSE=
+fi
+
+ if test "x$enable_decoders" != xno; then
+ COND_MAIN_DECODER_TRUE=
+ COND_MAIN_DECODER_FALSE='#'
+else
+ COND_MAIN_DECODER_TRUE='#'
+ COND_MAIN_DECODER_FALSE=
+fi
+
+
+ if test "x$enable_filter_lzma1" = xyes; then
+ COND_FILTER_LZMA1_TRUE=
+ COND_FILTER_LZMA1_FALSE='#'
+else
+ COND_FILTER_LZMA1_TRUE='#'
+ COND_FILTER_LZMA1_FALSE=
+fi
+
+ if test "x$enable_encoder_lzma1" = xyes; then
+ COND_ENCODER_LZMA1_TRUE=
+ COND_ENCODER_LZMA1_FALSE='#'
+else
+ COND_ENCODER_LZMA1_TRUE='#'
+ COND_ENCODER_LZMA1_FALSE=
+fi
+
+ if test "x$enable_decoder_lzma1" = xyes; then
+ COND_DECODER_LZMA1_TRUE=
+ COND_DECODER_LZMA1_FALSE='#'
+else
+ COND_DECODER_LZMA1_TRUE='#'
+ COND_DECODER_LZMA1_FALSE=
+fi
+
+ if test "x$enable_filter_lzma2" = xyes; then
+ COND_FILTER_LZMA2_TRUE=
+ COND_FILTER_LZMA2_FALSE='#'
+else
+ COND_FILTER_LZMA2_TRUE='#'
+ COND_FILTER_LZMA2_FALSE=
+fi
+
+ if test "x$enable_encoder_lzma2" = xyes; then
+ COND_ENCODER_LZMA2_TRUE=
+ COND_ENCODER_LZMA2_FALSE='#'
+else
+ COND_ENCODER_LZMA2_TRUE='#'
+ COND_ENCODER_LZMA2_FALSE=
+fi
+
+ if test "x$enable_decoder_lzma2" = xyes; then
+ COND_DECODER_LZMA2_TRUE=
+ COND_DECODER_LZMA2_FALSE='#'
+else
+ COND_DECODER_LZMA2_TRUE='#'
+ COND_DECODER_LZMA2_FALSE=
+fi
+
+ if test "x$enable_filter_delta" = xyes; then
+ COND_FILTER_DELTA_TRUE=
+ COND_FILTER_DELTA_FALSE='#'
+else
+ COND_FILTER_DELTA_TRUE='#'
+ COND_FILTER_DELTA_FALSE=
+fi
+
+ if test "x$enable_encoder_delta" = xyes; then
+ COND_ENCODER_DELTA_TRUE=
+ COND_ENCODER_DELTA_FALSE='#'
+else
+ COND_ENCODER_DELTA_TRUE='#'
+ COND_ENCODER_DELTA_FALSE=
+fi
+
+ if test "x$enable_decoder_delta" = xyes; then
+ COND_DECODER_DELTA_TRUE=
+ COND_DECODER_DELTA_FALSE='#'
+else
+ COND_DECODER_DELTA_TRUE='#'
+ COND_DECODER_DELTA_FALSE=
+fi
+
+ if test "x$enable_filter_x86" = xyes; then
+ COND_FILTER_X86_TRUE=
+ COND_FILTER_X86_FALSE='#'
+else
+ COND_FILTER_X86_TRUE='#'
+ COND_FILTER_X86_FALSE=
+fi
+
+ if test "x$enable_encoder_x86" = xyes; then
+ COND_ENCODER_X86_TRUE=
+ COND_ENCODER_X86_FALSE='#'
+else
+ COND_ENCODER_X86_TRUE='#'
+ COND_ENCODER_X86_FALSE=
+fi
+
+ if test "x$enable_decoder_x86" = xyes; then
+ COND_DECODER_X86_TRUE=
+ COND_DECODER_X86_FALSE='#'
+else
+ COND_DECODER_X86_TRUE='#'
+ COND_DECODER_X86_FALSE=
+fi
+
+ if test "x$enable_filter_powerpc" = xyes; then
+ COND_FILTER_POWERPC_TRUE=
+ COND_FILTER_POWERPC_FALSE='#'
+else
+ COND_FILTER_POWERPC_TRUE='#'
+ COND_FILTER_POWERPC_FALSE=
+fi
+
+ if test "x$enable_encoder_powerpc" = xyes; then
+ COND_ENCODER_POWERPC_TRUE=
+ COND_ENCODER_POWERPC_FALSE='#'
+else
+ COND_ENCODER_POWERPC_TRUE='#'
+ COND_ENCODER_POWERPC_FALSE=
+fi
+
+ if test "x$enable_decoder_powerpc" = xyes; then
+ COND_DECODER_POWERPC_TRUE=
+ COND_DECODER_POWERPC_FALSE='#'
+else
+ COND_DECODER_POWERPC_TRUE='#'
+ COND_DECODER_POWERPC_FALSE=
+fi
+
+ if test "x$enable_filter_ia64" = xyes; then
+ COND_FILTER_IA64_TRUE=
+ COND_FILTER_IA64_FALSE='#'
+else
+ COND_FILTER_IA64_TRUE='#'
+ COND_FILTER_IA64_FALSE=
+fi
+
+ if test "x$enable_encoder_ia64" = xyes; then
+ COND_ENCODER_IA64_TRUE=
+ COND_ENCODER_IA64_FALSE='#'
+else
+ COND_ENCODER_IA64_TRUE='#'
+ COND_ENCODER_IA64_FALSE=
+fi
+
+ if test "x$enable_decoder_ia64" = xyes; then
+ COND_DECODER_IA64_TRUE=
+ COND_DECODER_IA64_FALSE='#'
+else
+ COND_DECODER_IA64_TRUE='#'
+ COND_DECODER_IA64_FALSE=
+fi
+
+ if test "x$enable_filter_arm" = xyes; then
+ COND_FILTER_ARM_TRUE=
+ COND_FILTER_ARM_FALSE='#'
+else
+ COND_FILTER_ARM_TRUE='#'
+ COND_FILTER_ARM_FALSE=
+fi
+
+ if test "x$enable_encoder_arm" = xyes; then
+ COND_ENCODER_ARM_TRUE=
+ COND_ENCODER_ARM_FALSE='#'
+else
+ COND_ENCODER_ARM_TRUE='#'
+ COND_ENCODER_ARM_FALSE=
+fi
+
+ if test "x$enable_decoder_arm" = xyes; then
+ COND_DECODER_ARM_TRUE=
+ COND_DECODER_ARM_FALSE='#'
+else
+ COND_DECODER_ARM_TRUE='#'
+ COND_DECODER_ARM_FALSE=
+fi
+
+ if test "x$enable_filter_armthumb" = xyes; then
+ COND_FILTER_ARMTHUMB_TRUE=
+ COND_FILTER_ARMTHUMB_FALSE='#'
+else
+ COND_FILTER_ARMTHUMB_TRUE='#'
+ COND_FILTER_ARMTHUMB_FALSE=
+fi
+
+ if test "x$enable_encoder_armthumb" = xyes; then
+ COND_ENCODER_ARMTHUMB_TRUE=
+ COND_ENCODER_ARMTHUMB_FALSE='#'
+else
+ COND_ENCODER_ARMTHUMB_TRUE='#'
+ COND_ENCODER_ARMTHUMB_FALSE=
+fi
+
+ if test "x$enable_decoder_armthumb" = xyes; then
+ COND_DECODER_ARMTHUMB_TRUE=
+ COND_DECODER_ARMTHUMB_FALSE='#'
+else
+ COND_DECODER_ARMTHUMB_TRUE='#'
+ COND_DECODER_ARMTHUMB_FALSE=
+fi
+
+ if test "x$enable_filter_arm64" = xyes; then
+ COND_FILTER_ARM64_TRUE=
+ COND_FILTER_ARM64_FALSE='#'
+else
+ COND_FILTER_ARM64_TRUE='#'
+ COND_FILTER_ARM64_FALSE=
+fi
+
+ if test "x$enable_encoder_arm64" = xyes; then
+ COND_ENCODER_ARM64_TRUE=
+ COND_ENCODER_ARM64_FALSE='#'
+else
+ COND_ENCODER_ARM64_TRUE='#'
+ COND_ENCODER_ARM64_FALSE=
+fi
+
+ if test "x$enable_decoder_arm64" = xyes; then
+ COND_DECODER_ARM64_TRUE=
+ COND_DECODER_ARM64_FALSE='#'
+else
+ COND_DECODER_ARM64_TRUE='#'
+ COND_DECODER_ARM64_FALSE=
+fi
+
+ if test "x$enable_filter_sparc" = xyes; then
+ COND_FILTER_SPARC_TRUE=
+ COND_FILTER_SPARC_FALSE='#'
+else
+ COND_FILTER_SPARC_TRUE='#'
+ COND_FILTER_SPARC_FALSE=
+fi
+
+ if test "x$enable_encoder_sparc" = xyes; then
+ COND_ENCODER_SPARC_TRUE=
+ COND_ENCODER_SPARC_FALSE='#'
+else
+ COND_ENCODER_SPARC_TRUE='#'
+ COND_ENCODER_SPARC_FALSE=
+fi
+
+ if test "x$enable_decoder_sparc" = xyes; then
+ COND_DECODER_SPARC_TRUE=
+ COND_DECODER_SPARC_FALSE='#'
+else
+ COND_DECODER_SPARC_TRUE='#'
+ COND_DECODER_SPARC_FALSE=
+fi
+
+
+# The so called "simple filters" share common code.
+enable_filter_simple=no
+enable_encoder_simple=no
+enable_decoder_simple=no
+test "x$enable_filter_x86" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_x86" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_x86" = xyes && enable_decoder_simple=yes
+test "x$enable_filter_powerpc" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_powerpc" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_powerpc" = xyes && enable_decoder_simple=yes
+test "x$enable_filter_ia64" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_ia64" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_ia64" = xyes && enable_decoder_simple=yes
+test "x$enable_filter_arm" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_arm" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_arm" = xyes && enable_decoder_simple=yes
+test "x$enable_filter_armthumb" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_armthumb" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_armthumb" = xyes && enable_decoder_simple=yes
+test "x$enable_filter_arm64" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_arm64" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_arm64" = xyes && enable_decoder_simple=yes
+test "x$enable_filter_sparc" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_sparc" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_sparc" = xyes && enable_decoder_simple=yes
+ if test "x$enable_filter_simple" = xyes; then
+ COND_FILTER_SIMPLE_TRUE=
+ COND_FILTER_SIMPLE_FALSE='#'
+else
+ COND_FILTER_SIMPLE_TRUE='#'
+ COND_FILTER_SIMPLE_FALSE=
+fi
+
+ if test "x$enable_encoder_simple" = xyes; then
+ COND_ENCODER_SIMPLE_TRUE=
+ COND_ENCODER_SIMPLE_FALSE='#'
+else
+ COND_ENCODER_SIMPLE_TRUE='#'
+ COND_ENCODER_SIMPLE_FALSE=
+fi
+
+ if test "x$enable_decoder_simple" = xyes; then
+ COND_DECODER_SIMPLE_TRUE=
+ COND_DECODER_SIMPLE_FALSE='#'
+else
+ COND_DECODER_SIMPLE_TRUE='#'
+ COND_DECODER_SIMPLE_FALSE=
+fi
+
+
+# LZ-based filters share common code.
+enable_filter_lz=no
+enable_encoder_lz=no
+enable_decoder_lz=no
+test "x$enable_filter_lzma1" = xyes && enable_filter_lz=yes
+test "x$enable_encoder_lzma1" = xyes && enable_encoder_lz=yes
+test "x$enable_decoder_lzma1" = xyes && enable_decoder_lz=yes
+test "x$enable_filter_lzma2" = xyes && enable_filter_lz=yes
+test "x$enable_encoder_lzma2" = xyes && enable_encoder_lz=yes
+test "x$enable_decoder_lzma2" = xyes && enable_decoder_lz=yes
+ if test "x$enable_filter_lz" = xyes; then
+ COND_FILTER_LZ_TRUE=
+ COND_FILTER_LZ_FALSE='#'
+else
+ COND_FILTER_LZ_TRUE='#'
+ COND_FILTER_LZ_FALSE=
+fi
+
+ if test "x$enable_encoder_lz" = xyes; then
+ COND_ENCODER_LZ_TRUE=
+ COND_ENCODER_LZ_FALSE='#'
+else
+ COND_ENCODER_LZ_TRUE='#'
+ COND_ENCODER_LZ_FALSE=
+fi
+
+ if test "x$enable_decoder_lz" = xyes; then
+ COND_DECODER_LZ_TRUE=
+ COND_DECODER_LZ_FALSE='#'
+else
+ COND_DECODER_LZ_TRUE='#'
+ COND_DECODER_LZ_FALSE=
+fi
+
+
+
+#################
+# Match finders #
+#################
+
+
+
+enable_match_finder_hc3=no
+enable_match_finder_hc4=no
+enable_match_finder_bt2=no
+enable_match_finder_bt3=no
+enable_match_finder_bt4=no
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which match finders to build" >&5
+printf %s "checking which match finders to build... " >&6; }
+# Check whether --enable-match-finders was given.
+if test ${enable_match_finders+y}
+then :
+ enableval=$enable_match_finders;
+else $as_nop
+ enable_match_finders=hc3,hc4,bt2,bt3,bt4
+fi
+
+enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'`
+if test "x$enable_encoder_lz" = xyes ; then
+ if test -z "$enable_match_finders"; then
+ as_fn_error $? "At least one match finder is required for an LZ-based encoder." "$LINENO" 5
+ fi
+
+ for arg in $enable_match_finders
+ do
+ case $arg in
+ hc3)
+ enable_match_finder_hc3=yes
+
+printf "%s\n" "#define HAVE_MF_HC3 1" >>confdefs.h
+
+ ;;
+ hc4)
+ enable_match_finder_hc4=yes
+
+printf "%s\n" "#define HAVE_MF_HC4 1" >>confdefs.h
+
+ ;;
+ bt2)
+ enable_match_finder_bt2=yes
+
+printf "%s\n" "#define HAVE_MF_BT2 1" >>confdefs.h
+
+ ;;
+ bt3)
+ enable_match_finder_bt3=yes
+
+printf "%s\n" "#define HAVE_MF_BT3 1" >>confdefs.h
+
+ ;;
+ bt4)
+ enable_match_finder_bt4=yes
+
+printf "%s\n" "#define HAVE_MF_BT4 1" >>confdefs.h
+
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "unknown match finder: $arg" "$LINENO" 5
+ ;;
+ esac
+ done
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_match_finders" >&5
+printf "%s\n" "$enable_match_finders" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (none because not building any LZ-based encoder)" >&5
+printf "%s\n" "(none because not building any LZ-based encoder)" >&6; }
+fi
+
+
+####################
+# Integrity checks #
+####################
+
+
+
+enable_check_crc32=no
+enable_check_crc64=no
+enable_check_sha256=no
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which integrity checks to build" >&5
+printf %s "checking which integrity checks to build... " >&6; }
+# Check whether --enable-checks was given.
+if test ${enable_checks+y}
+then :
+ enableval=$enable_checks;
+else $as_nop
+ enable_checks=crc32,crc64,sha256
+fi
+
+enable_checks=`echo "$enable_checks" | sed 's/,/ /g'`
+if test "x$enable_checks" = xno || test "x$enable_checks" = x; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (none)" >&5
+printf "%s\n" "(none)" >&6; }
+else
+ for arg in $enable_checks
+ do
+ case $arg in
+ crc32)
+ enable_check_crc32=yes
+
+printf "%s\n" "#define HAVE_CHECK_CRC32 1" >>confdefs.h
+
+ ;;
+ crc64)
+ enable_check_crc64=yes
+
+printf "%s\n" "#define HAVE_CHECK_CRC64 1" >>confdefs.h
+
+ ;;
+ sha256)
+ enable_check_sha256=yes
+
+printf "%s\n" "#define HAVE_CHECK_SHA256 1" >>confdefs.h
+
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "unknown integrity check: $arg" "$LINENO" 5
+ ;;
+ esac
+ done
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_checks" >&5
+printf "%s\n" "$enable_checks" >&6; }
+fi
+if test "x$enable_check_crc32" = xno ; then
+ as_fn_error $? "For now, the CRC32 check must always be enabled." "$LINENO" 5
+fi
+
+ if test "x$enable_check_crc32" = xyes; then
+ COND_CHECK_CRC32_TRUE=
+ COND_CHECK_CRC32_FALSE='#'
+else
+ COND_CHECK_CRC32_TRUE='#'
+ COND_CHECK_CRC32_FALSE=
+fi
+
+ if test "x$enable_check_crc64" = xyes; then
+ COND_CHECK_CRC64_TRUE=
+ COND_CHECK_CRC64_FALSE='#'
+else
+ COND_CHECK_CRC64_TRUE='#'
+ COND_CHECK_CRC64_FALSE=
+fi
+
+ if test "x$enable_check_sha256" = xyes; then
+ COND_CHECK_SHA256_TRUE=
+ COND_CHECK_SHA256_FALSE='#'
+else
+ COND_CHECK_SHA256_TRUE='#'
+ COND_CHECK_SHA256_FALSE=
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if external SHA-256 should be used" >&5
+printf %s "checking if external SHA-256 should be used... " >&6; }
+# Check whether --enable-external-sha256 was given.
+if test ${enable_external_sha256+y}
+then :
+ enableval=$enable_external_sha256;
+else $as_nop
+ enable_external_sha256=no
+fi
+
+if test "x$enable_check_sha256" != "xyes"; then
+ enable_external_sha256=no
+fi
+if test "x$enable_external_sha256" = xyes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+#############
+# MicroLZMA #
+#############
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if MicroLZMA support should be built" >&5
+printf %s "checking if MicroLZMA support should be built... " >&6; }
+# Check whether --enable-microlzma was given.
+if test ${enable_microlzma+y}
+then :
+ enableval=$enable_microlzma;
+else $as_nop
+ enable_microlzma=yes
+fi
+
+case $enable_microlzma in
+ yes | no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_microlzma" >&5
+printf "%s\n" "$enable_microlzma" >&6; }
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "--enable-microlzma accepts only \`yes' or \`no'." "$LINENO" 5
+ ;;
+esac
+ if test "x$enable_microlzma" = xyes; then
+ COND_MICROLZMA_TRUE=
+ COND_MICROLZMA_FALSE='#'
+else
+ COND_MICROLZMA_TRUE='#'
+ COND_MICROLZMA_FALSE=
+fi
+
+
+
+#############################
+# .lz (lzip) format support #
+#############################
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if .lz (lzip) decompression support should be built" >&5
+printf %s "checking if .lz (lzip) decompression support should be built... " >&6; }
+# Check whether --enable-lzip-decoder was given.
+if test ${enable_lzip_decoder+y}
+then :
+ enableval=$enable_lzip_decoder;
+else $as_nop
+ enable_lzip_decoder=yes
+fi
+
+if test "x$enable_decoder_lzma1" != xyes; then
+ enable_lzip_decoder=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no because LZMA1 decoder is disabled" >&5
+printf "%s\n" "no because LZMA1 decoder is disabled" >&6; }
+elif test "x$enable_lzip_decoder" = xyes; then
+
+printf "%s\n" "#define HAVE_LZIP_DECODER 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+ if test "x$enable_lzip_decoder" = xyes; then
+ COND_LZIP_DECODER_TRUE=
+ COND_LZIP_DECODER_FALSE='#'
+else
+ COND_LZIP_DECODER_TRUE='#'
+ COND_LZIP_DECODER_FALSE=
+fi
+
+
+
+###########################
+# Assembler optimizations #
+###########################
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if assembler optimizations should be used" >&5
+printf %s "checking if assembler optimizations should be used... " >&6; }
+# Check whether --enable-assembler was given.
+if test ${enable_assembler+y}
+then :
+ enableval=$enable_assembler;
+else $as_nop
+ enable_assembler=yes
+fi
+
+if test "x$enable_assembler" = xyes; then
+ enable_assembler=no
+ case $host_os in
+ # Darwin should work too but only if not creating universal
+ # binaries. Solaris x86 could work too but I cannot test.
+ linux* | *bsd* | mingw* | cygwin | msys | *djgpp*)
+ case $host_cpu in
+ i?86) enable_assembler=x86 ;;
+ esac
+ ;;
+ esac
+fi
+case $enable_assembler in
+ x86 | no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_assembler" >&5
+printf "%s\n" "$enable_assembler" >&6; }
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "--enable-assembler accepts only \`yes', \`no', or \`x86' (32-bit)." "$LINENO" 5
+ ;;
+esac
+ if test "x$enable_assembler" = xx86; then
+ COND_ASM_X86_TRUE=
+ COND_ASM_X86_FALSE='#'
+else
+ COND_ASM_X86_TRUE='#'
+ COND_ASM_X86_FALSE=
+fi
+
+
+
+#############
+# CLMUL CRC #
+#############
+
+# Check whether --enable-clmul-crc was given.
+if test ${enable_clmul_crc+y}
+then :
+ enableval=$enable_clmul_crc;
+else $as_nop
+ enable_clmul_crc=yes
+fi
+
+
+
+#####################
+# Size optimization #
+#####################
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if small size is preferred over speed" >&5
+printf %s "checking if small size is preferred over speed... " >&6; }
+# Check whether --enable-small was given.
+if test ${enable_small+y}
+then :
+ enableval=$enable_small;
+else $as_nop
+ enable_small=no
+fi
+
+if test "x$enable_small" = xyes; then
+
+printf "%s\n" "#define HAVE_SMALL 1" >>confdefs.h
+
+elif test "x$enable_small" != xno; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "--enable-small accepts only \`yes' or \`no'" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_small" >&5
+printf "%s\n" "$enable_small" >&6; }
+ if test "x$enable_small" = xyes; then
+ COND_SMALL_TRUE=
+ COND_SMALL_FALSE='#'
+else
+ COND_SMALL_TRUE='#'
+ COND_SMALL_FALSE=
+fi
+
+
+
+#############
+# Threading #
+#############
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if threading support is wanted" >&5
+printf %s "checking if threading support is wanted... " >&6; }
+# Check whether --enable-threads was given.
+if test ${enable_threads+y}
+then :
+ enableval=$enable_threads;
+else $as_nop
+ enable_threads=yes
+fi
+
+
+if test "x$enable_threads" = xyes; then
+ case $host_os in
+ mingw*)
+ case $host_cpu in
+ i?86) enable_threads=win95 ;;
+ *) enable_threads=vista ;;
+ esac
+ ;;
+ *)
+ enable_threads=posix
+ ;;
+ esac
+fi
+
+case $enable_threads in
+ posix | win95 | vista)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, $enable_threads" >&5
+printf "%s\n" "yes, $enable_threads" >&6; }
+ ;;
+ no)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "--enable-threads only accepts \`yes', \`no', \`posix', \`win95', or \`vista'" "$LINENO" 5
+ ;;
+esac
+
+# We use the actual result a little later.
+
+
+#########################
+# Assumed amount of RAM #
+#########################
+
+# We use 128 MiB as default, because it will allow decompressing files
+# created with "xz -9". It would be slightly safer to guess a lower value,
+# but most systems, on which we don't have any way to determine the amount
+# of RAM, will probably have at least 128 MiB of RAM.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how much RAM to assume if the real amount is unknown" >&5
+printf %s "checking how much RAM to assume if the real amount is unknown... " >&6; }
+# Check whether --enable-assume-ram was given.
+if test ${enable_assume_ram+y}
+then :
+ enableval=$enable_assume_ram;
+else $as_nop
+ enable_assume_ram=128
+fi
+
+assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789`
+if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "--enable-assume-ram accepts only an integer argument" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_assume_ram MiB" >&5
+printf "%s\n" "$enable_assume_ram MiB" >&6; }
+
+printf "%s\n" "#define ASSUME_RAM $enable_assume_ram" >>confdefs.h
+
+
+
+#########################
+# Components to install #
+#########################
+
+# Check whether --enable-xz was given.
+if test ${enable_xz+y}
+then :
+ enableval=$enable_xz;
+else $as_nop
+ enable_xz=yes
+fi
+
+ if test x$enable_xz != xno; then
+ COND_XZ_TRUE=
+ COND_XZ_FALSE='#'
+else
+ COND_XZ_TRUE='#'
+ COND_XZ_FALSE=
+fi
+
+
+# Check whether --enable-xzdec was given.
+if test ${enable_xzdec+y}
+then :
+ enableval=$enable_xzdec;
+else $as_nop
+ enable_xzdec=yes
+fi
+
+test "x$enable_decoders" = xno && enable_xzdec=no
+ if test x$enable_xzdec != xno; then
+ COND_XZDEC_TRUE=
+ COND_XZDEC_FALSE='#'
+else
+ COND_XZDEC_TRUE='#'
+ COND_XZDEC_FALSE=
+fi
+
+
+# Check whether --enable-lzmadec was given.
+if test ${enable_lzmadec+y}
+then :
+ enableval=$enable_lzmadec;
+else $as_nop
+ enable_lzmadec=yes
+fi
+
+test "x$enable_decoder_lzma1" = xno && enable_lzmadec=no
+ if test x$enable_lzmadec != xno; then
+ COND_LZMADEC_TRUE=
+ COND_LZMADEC_FALSE='#'
+else
+ COND_LZMADEC_TRUE='#'
+ COND_LZMADEC_FALSE=
+fi
+
+
+# Check whether --enable-lzmainfo was given.
+if test ${enable_lzmainfo+y}
+then :
+ enableval=$enable_lzmainfo;
+else $as_nop
+ enable_lzmainfo=yes
+fi
+
+test "x$enable_decoder_lzma1" = xno && enable_lzmainfo=no
+ if test x$enable_lzmainfo != xno; then
+ COND_LZMAINFO_TRUE=
+ COND_LZMAINFO_FALSE='#'
+else
+ COND_LZMAINFO_TRUE='#'
+ COND_LZMAINFO_FALSE=
+fi
+
+
+# Check whether --enable-lzma-links was given.
+if test ${enable_lzma_links+y}
+then :
+ enableval=$enable_lzma_links;
+else $as_nop
+ enable_lzma_links=yes
+fi
+
+ if test x$enable_lzma_links != xno; then
+ COND_LZMALINKS_TRUE=
+ COND_LZMALINKS_FALSE='#'
+else
+ COND_LZMALINKS_TRUE='#'
+ COND_LZMALINKS_FALSE=
+fi
+
+
+# Check whether --enable-scripts was given.
+if test ${enable_scripts+y}
+then :
+ enableval=$enable_scripts;
+else $as_nop
+ enable_scripts=yes
+fi
+
+ if test x$enable_scripts != xno; then
+ COND_SCRIPTS_TRUE=
+ COND_SCRIPTS_FALSE='#'
+else
+ COND_SCRIPTS_TRUE='#'
+ COND_SCRIPTS_FALSE=
+fi
+
+
+# Check whether --enable-doc was given.
+if test ${enable_doc+y}
+then :
+ enableval=$enable_doc;
+else $as_nop
+ enable_doc=yes
+fi
+
+ if test x$enable_doc != xno; then
+ COND_DOC_TRUE=
+ COND_DOC_FALSE='#'
+else
+ COND_DOC_TRUE='#'
+ COND_DOC_FALSE=
+fi
+
+
+
+##############
+# Sandboxing #
+##############
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sandboxing should be used" >&5
+printf %s "checking if sandboxing should be used... " >&6; }
+# Check whether --enable-sandbox was given.
+if test ${enable_sandbox+y}
+then :
+ enableval=$enable_sandbox;
+else $as_nop
+ enable_sandbox=auto
+fi
+
+case $enable_sandbox in
+ auto)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: maybe (autodetect)" >&5
+printf "%s\n" "maybe (autodetect)" >&6; }
+ ;;
+ no | capsicum | pledge)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_sandbox" >&5
+printf "%s\n" "$enable_sandbox" >&6; }
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "--enable-sandbox only accepts \`auto', \`no', \`capsicum', or \`pledge'." "$LINENO" 5
+ ;;
+esac
+
+
+###########################
+# PATH prefix for scripts #
+###########################
+
+# The scripts can add a prefix to the search PATH so that POSIX tools
+# or the xz binary is always in the PATH.
+# Check whether --enable-path-for-scripts was given.
+if test ${enable_path_for_scripts+y}
+then :
+ enableval=$enable_path_for_scripts;
+else $as_nop
+
+ case $host_os in
+ solaris*) enable_path_for_scripts=/usr/xpg4/bin ;;
+ *) enable_path_for_scripts= ;;
+ esac
+
+fi
+
+if test -n "$enable_path_for_scripts" && test "x$enable_path_for_scripts" != xno ; then
+ enable_path_for_scripts="PATH=$enable_path_for_scripts:\$PATH"
+else
+ enable_path_for_scripts=
+fi
+
+
+
+###############################################################################
+# Checks for programs.
+###############################################################################
+
+echo
+case $host_os in
+ solaris*)
+ # The gnulib POSIX shell macro below may pick a shell that
+ # doesn't work with xzgrep. Workaround by picking a shell
+ # that is known to work.
+ if test -z "$gl_cv_posix_shell" && test -x /usr/xpg4/bin/sh; then
+ gl_cv_posix_shell=/usr/xpg4/bin/sh
+ fi
+ ;;
+esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a shell that conforms to POSIX" >&5
+printf %s "checking for a shell that conforms to POSIX... " >&6; }
+if test ${gl_cv_posix_shell+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gl_test_posix_shell_script='
+ func_return () {
+ (exit $1)
+ }
+ func_success () {
+ func_return 0
+ }
+ func_failure () {
+ func_return 1
+ }
+ func_ret_success () {
+ return 0
+ }
+ func_ret_failure () {
+ return 1
+ }
+ subshell_umask_sanity () {
+ (umask 22; (umask 0); test $(umask) -eq 22)
+ }
+ test "$(echo foo)" = foo &&
+ func_success &&
+ ! func_failure &&
+ func_ret_success &&
+ ! func_ret_failure &&
+ (set x && func_ret_success y && test x = "$1") &&
+ subshell_umask_sanity
+ '
+ for gl_cv_posix_shell in \
+ "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do
+ case $gl_cv_posix_shell in
+ /*)
+ "$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/dev/null \
+ && break;;
+ esac
+ done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_posix_shell" >&5
+printf "%s\n" "$gl_cv_posix_shell" >&6; }
+
+ 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
+
+
+
+if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then
+ as_fn_error $? "No POSIX conforming shell (sh) was found." "$LINENO" 5
+fi
+
+echo
+echo "Initializing Automake:"
+
+# We don't use "subdir-objects" yet because it breaks "make distclean" when
+# dependencies are enabled (as of Automake 1.14.1) due to this bug:
+# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
+# The -Wno-unsupported is used to silence warnings about missing
+# "subdir-objects".
+am__api_version='1.16'
+
+
+ # Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+printf %s "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test ${ac_cv_path_install+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ # Account for fact that we put trailing slashes in our PATH walk.
+case $as_dir in #((
+ ./ | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test ${ac_cv_path_install+y}; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+printf "%s\n" "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+printf %s "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
+
+
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+
+
+ if test x"${MISSING+set}" != xset; then
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
+printf %s "checking for a race-free mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test ${ac_cv_path_mkdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
+ case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir ('*'coreutils) '* | \
+ 'BusyBox '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test ${ac_cv_path_mkdir+y}; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+printf "%s\n" "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AWK+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+printf "%s\n" "$AWK" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval test \${ac_cv_prog_make_${ac_make}_set+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ SET_MAKE=
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test ${enable_silent_rules+y}
+then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+printf %s "checking whether $am_make supports nested variables... " >&6; }
+if test ${am_cv_make_support_nested_variables+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if printf "%s\n" 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='xz'
+ VERSION='5.4.5'
+
+
+printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
+
+
+printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+# Variables for tags utilities; see am/tags.am
+if test -z "$CTAGS"; then
+ CTAGS=ctags
+fi
+
+if test -z "$ETAGS"; then
+ ETAGS=etags
+fi
+
+if test -z "$CSCOPE"; then
+ CSCOPE=cscope
+fi
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+printf %s "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+printf "%s\n" "no, using $LN_S" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
+am__doit:
+ @echo this is the am__doit target >confinc.out
+.PHONY: am__doit
+END
+am__include="#"
+am__quote=
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+ { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+ (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ case $?:`cat confinc.out 2>/dev/null` in #(
+ '0:this is the am__doit target') :
+ case $s in #(
+ BSD) :
+ am__include='.include' am__quote='"' ;; #(
+ *) :
+ am__include='include' am__quote='' ;;
+esac ;; #(
+ *) :
+ ;;
+esac
+ if test "$am__include" != "#"; then
+ _am_result="yes ($s style)"
+ break
+ fi
+done
+rm -f confinc.* confmf.*
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+printf "%s\n" "${_am_result}" >&6; }
+
+# Check whether --enable-dependency-tracking was given.
+if test ${enable_dependency_tracking+y}
+then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
+set dummy ${ac_tool_prefix}clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+printf "%s\n" "$CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "clang", so it can be a program name with args.
+set dummy clang; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="clang"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+printf "%s\n" "$ac_ct_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+
+
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion -version; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+printf %s "checking whether the C compiler works... " >&6; }
+ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else $as_nop
+ ac_file=''
+fi
+if test -z "$ac_file"
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+printf %s "checking for C compiler default output file name... " >&6; }
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+printf "%s\n" "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+printf %s "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+printf "%s\n" "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main (void)
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+printf %s "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+printf "%s\n" "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+printf %s "checking for suffix of object files... " >&6; }
+if test ${ac_cv_objext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+printf "%s\n" "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
+printf %s "checking whether the compiler supports GNU C... " >&6; }
+if test ${ac_cv_c_compiler_gnu+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_compiler_gnu=yes
+else $as_nop
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+y}
+ac_save_CFLAGS=$CFLAGS
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+printf %s "checking whether $CC accepts -g... " >&6; }
+if test ${ac_cv_prog_cc_g+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+else $as_nop
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
+if test $ac_test_CFLAGS; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+ac_prog_cc_stdc=no
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
+printf %s "checking for $CC option to enable C11 features... " >&6; }
+if test ${ac_cv_prog_cc_c11+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c11=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c11_program
+_ACEOF
+for ac_arg in '' -std=gnu11
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c11=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c11" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c11" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c11" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
+ CC="$CC $ac_cv_prog_cc_c11"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
+ ac_prog_cc_stdc=c11
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
+printf %s "checking for $CC option to enable C99 features... " >&6; }
+if test ${ac_cv_prog_cc_c99+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c99_program
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c99" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c99" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
+ CC="$CC $ac_cv_prog_cc_c99"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+ ac_prog_cc_stdc=c99
+fi
+fi
+if test x$ac_prog_cc_stdc = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
+printf %s "checking for $CC option to enable C89 features... " >&6; }
+if test ${ac_cv_prog_cc_c89+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_c_conftest_c89_program
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+fi
+
+if test "x$ac_cv_prog_cc_c89" = xno
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+printf "%s\n" "unsupported" >&6; }
+else $as_nop
+ if test "x$ac_cv_prog_cc_c89" = x
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+printf "%s\n" "none needed" >&6; }
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
+ CC="$CC $ac_cv_prog_cc_c89"
+fi
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+ ac_prog_cc_stdc=c89
+fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+printf %s "checking whether $CC understands -c and -o together... " >&6; }
+if test ${am_cv_prog_cc_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+depcc="$CC" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CC_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+
+if test x$ac_cv_prog_cc_c99 = xno ; then
+ as_fn_error $? "No C99 compiler was found." "$LINENO" 5
+fi
+
+
+# By default we simply use the C compiler to build assembly code.
+
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+
+
+
+depcc="$CCAS" am_compiler_list=
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+printf %s "checking dependency style of $depcc... " >&6; }
+if test ${am_cv_CCAS_dependencies_compiler_type+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CCAS_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CCAS_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CCAS_dependencies_compiler_type=none
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5
+printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; }
+CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
+ am__fastdepCCAS_TRUE=
+ am__fastdepCCAS_FALSE='#'
+else
+ am__fastdepCCAS_TRUE='#'
+ am__fastdepCCAS_FALSE=
+fi
+
+
+
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test ${ac_cv_safe_to_define___extensions__+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_safe_to_define___extensions__=yes
+else $as_nop
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
+printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
+if test ${ac_cv_should_define__xopen_source+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_should_define__xopen_source=no
+ if test $ac_cv_header_wchar_h = yes
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE 500
+ #include <wchar.h>
+ mbstate_t x;
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_should_define__xopen_source=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
+printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
+
+ printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
+
+ printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
+
+ printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
+
+ printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+ if test $ac_cv_header_minix_config_h = yes
+then :
+ MINIX=yes
+ printf "%s\n" "#define _MINIX 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
+
+ printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+else $as_nop
+ MINIX=
+fi
+ if test $ac_cv_safe_to_define___extensions__ = yes
+then :
+ printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
+
+fi
+ if test $ac_cv_should_define__xopen_source = yes
+then :
+ printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+printf %s "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test ${ac_cv_prog_CPP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # Double quotes because $CC needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+printf "%s\n" "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+
+else $as_nop
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"
+then :
+ # Broken: success on invalid input.
+continue
+else $as_nop
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok
+then :
+
+else $as_nop
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+printf %s "checking for grep that handles long lines and -e... " >&6; }
+if test ${ac_cv_path_GREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in grep ggrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+printf "%s\n" "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+printf %s "checking for egrep... " >&6; }
+if test ${ac_cv_path_EGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in egrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+printf "%s\n" "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
+printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
+if test ${ac_cv_c_undeclared_builtin_options+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_save_CFLAGS=$CFLAGS
+ ac_cv_c_undeclared_builtin_options='cannot detect'
+ for ac_arg in '' -fno-builtin; do
+ CFLAGS="$ac_save_CFLAGS $ac_arg"
+ # This test program should *not* compile successfully.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+(void) strchr;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # This test program should compile successfully.
+ # No library function is consistently available on
+ # freestanding implementations, so test against a dummy
+ # declaration. Include always-available headers on the
+ # off chance that they somehow elicit warnings.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+extern void ac_decl (int, char *);
+
+int
+main (void)
+{
+(void) ac_decl (0, (char *) 0);
+ (void) ac_decl;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if test x"$ac_arg" = x
+then :
+ ac_cv_c_undeclared_builtin_options='none needed'
+else $as_nop
+ ac_cv_c_undeclared_builtin_options=$ac_arg
+fi
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ done
+ CFLAGS=$ac_save_CFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
+printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
+ case $ac_cv_c_undeclared_builtin_options in #(
+ 'cannot detect') :
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot make $CC report undeclared builtins
+See \`config.log' for more details" "$LINENO" 5; } ;; #(
+ 'none needed') :
+ ac_c_undeclared_builtin_options='' ;; #(
+ *) :
+ ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
+esac
+
+case $enable_threads in #(
+ posix) :
+
+ echo
+ echo "POSIX threading support:"
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+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"
+ if test "x$PTHREAD_CC" != "x"
+then :
+ CC="$PTHREAD_CC"
+fi
+ if test "x$PTHREAD_CXX" != "x"
+then :
+ CXX="$PTHREAD_CXX"
+fi
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
+printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char pthread_join ();
+int
+main (void)
+{
+return pthread_join ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ 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.)
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+ AX_PTHREAD_ZOS_MISSING
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
+then :
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
+printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
+fi
+rm -rf conftest*
+
+ ;;
+
+ 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?
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
+printf %s "checking whether $CC is Clang... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_CLANG=no
+ # Note that Autoconf sets GCC=yes for Clang as well as GCC
+ if test "x$GCC" = "xyes"; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ AX_PTHREAD_CC_IS_CLANG
+# endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
+then :
+ ax_cv_PTHREAD_CLANG=yes
+fi
+rm -rf conftest*
+
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
+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
+
+if test "x$GCC" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
+fi
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+if test "x$ax_pthread_clang" = "xyes"
+then :
+ ax_pthread_flags="-pthread,-lpthread -pthread"
+fi
+
+
+# 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
+if test "x$ax_pthread_check_macro" = "x--"
+then :
+ ax_pthread_check_cond=0
+else $as_nop
+ ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
+fi
+
+
+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)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+printf %s "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ *,*)
+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
+printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
+ ;;
+
+ -*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
+printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
+ PTHREAD_CFLAGS="$ax_pthread_try_flag"
+ ;;
+
+ pthread-config)
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ax_pthread_config+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ax_pthread_config"; then
+ ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ax_pthread_config="yes"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
+fi
+fi
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+printf "%s\n" "$ax_pthread_config" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ if test "x$ax_pthread_config" = "xno"
+then :
+ continue
+fi
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
+printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
+ 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.
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+# 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; }
+int
+main (void)
+{
+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) /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+printf "%s\n" "$ax_pthread_ok" >&6; }
+ if test "x$ax_pthread_ok" = "xyes"
+then :
+ break
+fi
+
+ 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.
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
+printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
+if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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=`printf "%s\n" "$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
+ if test "x$ax_pthread_try" = "xunknown"
+then :
+ break
+fi
+ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+ ac_link="$ax_pthread_save_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_link="$ax_pthread_2step_ac_link"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int main(void){return 0;}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+ ac_link="$ax_pthread_save_ac_link"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ if test "x$ax_pthread_try" = "x"
+then :
+ ax_pthread_try=no
+fi
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
+printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
+
+ 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.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+printf %s "checking for joinable pthread attribute... " >&6; }
+if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main (void)
+{
+int attr = $ax_pthread_attr; return attr /* ; */
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
+printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
+ 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"
+then :
+
+printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
+
+ ax_pthread_joinable_attr_defined=yes
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
+printf %s "checking whether more special flags are required for pthreads... " >&6; }
+if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ax_cv_PTHREAD_SPECIAL_FLAGS=no
+ case $host_os in
+ solaris*)
+ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
+printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
+ if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+ test "x$ax_pthread_special_flags_added" != "xyes"
+then :
+ PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+ ax_pthread_special_flags_added=yes
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main (void)
+{
+int i = PTHREAD_PRIO_INHERIT;
+ return i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_PTHREAD_PRIO_INHERIT=yes
+else $as_nop
+ ax_cv_PTHREAD_PRIO_INHERIT=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+ if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+ test "x$ax_pthread_prio_inherit_defined" != "xyes"
+then :
+
+printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+ ax_pthread_prio_inherit_defined=yes
+
+fi
+
+ 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*)
+ case "x/$CC" in #(
+ 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
+ case "x$CC" in #(
+ x/*) :
+
+ if as_fn_executable_p ${CC}_r
+then :
+ PTHREAD_CC="${CC}_r"
+fi
+ if test "x${CXX}" != "x"
+then :
+ if as_fn_executable_p ${CXX}_r
+then :
+ PTHREAD_CXX="${CXX}_r"
+fi
+fi
+ ;; #(
+ *) :
+
+ for ac_prog in ${CC}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CC="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+printf "%s\n" "$PTHREAD_CC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+
+ if test "x${CXX}" != "x"
+then :
+ for ac_prog in ${CXX}_r
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_PTHREAD_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$PTHREAD_CXX"; then
+ ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PTHREAD_CXX="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
+if test -n "$PTHREAD_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
+printf "%s\n" "$PTHREAD_CXX" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$PTHREAD_CXX" && break
+done
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+fi
+
+ ;;
+esac
+ ;; #(
+ *) :
+ ;;
+esac
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test "x$ax_pthread_ok" = "xyes"; then
+ :
+ :
+else
+ ax_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ LIBS="$LIBS $PTHREAD_LIBS"
+ AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
+
+
+
+printf "%s\n" "#define MYTHREAD_POSIX 1" >>confdefs.h
+
+
+ # These are nice to have but not mandatory.
+ #
+ # FIXME: xz uses clock_gettime if it is available and can do
+ # it even when threading is disabled. Moving this outside
+ # of pthread detection may be undesirable because then
+ # liblzma may get linked against librt even when librt isn't
+ # needed by liblzma.
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+printf %s "checking for library containing clock_gettime... " >&6; }
+if test ${ac_cv_search_clock_gettime+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char clock_gettime ();
+int
+main (void)
+{
+return clock_gettime ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' rt
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_clock_gettime+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_clock_gettime+y}
+then :
+
+else $as_nop
+ ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes
+then :
+ printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+fi
+ac_fn_c_check_func "$LINENO" "pthread_condattr_setclock" "ac_cv_func_pthread_condattr_setclock"
+if test "x$ac_cv_func_pthread_condattr_setclock" = xyes
+then :
+ printf "%s\n" "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
+
+fi
+
+ ac_fn_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include <time.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes
+then :
+
+printf "%s\n" "#define HAVE_CLOCK_MONOTONIC 1" >>confdefs.h
+
+fi
+ CFLAGS=$OLD_CFLAGS
+ ;; #(
+ win95) :
+
+
+printf "%s\n" "#define MYTHREAD_WIN95 1" >>confdefs.h
+
+ ;; #(
+ vista) :
+
+
+printf "%s\n" "#define MYTHREAD_VISTA 1" >>confdefs.h
+
+
+ ;; #(
+ *) :
+ ;;
+esac
+ if test "x$enable_threads" != xno; then
+ COND_THREADS_TRUE=
+ COND_THREADS_FALSE='#'
+else
+ COND_THREADS_TRUE='#'
+ COND_THREADS_FALSE=
+fi
+
+
+echo
+echo "Initializing Libtool:"
+
+case `pwd` in
+ *\ * | *\ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.7.4-1ec8f-dirty'
+macro_revision='2.4.7.4'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+# 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'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+printf %s "checking how to print strings... " >&6; }
+# 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*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+printf "%s\n" "printf" >&6; } ;;
+ print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+printf "%s\n" "print -r" >&6; } ;;
+ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+printf "%s\n" "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+printf %s "checking for a sed that does not truncate output... " >&6; }
+if test ${ac_cv_path_SED+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in sed gsed
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+printf "%s\n" "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+printf %s "checking for fgrep... " >&6; }
+if test ${ac_cv_path_FGREP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in fgrep
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_FGREP" || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ printf %s 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ printf "%s\n" 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+printf "%s\n" "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else $as_nop
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
+fi
+if test ${lt_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi
+fi
+
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${lt_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test ${lt_cv_path_NM+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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*) 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
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+printf "%s\n" "$lt_cv_path_NM" >&6; }
+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
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in dumpbin "link -dump"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+printf "%s\n" "$DUMPBIN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in dumpbin "link -dump"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+printf %s "checking the name lister ($NM) interface... " >&6; }
+if test ${lt_cv_nm_interface+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:$LINENO: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+printf "%s\n" "$lt_cv_nm_interface" >&6; }
+
+# find the maximum length of command line arguments
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+printf %s "checking the maximum length of command line arguments... " >&6; }
+if test ${lt_cv_sys_max_cmd_len+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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*)
+ # Under GNU Hurd, 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* | 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;
+ ;;
+
+ bitrig* | 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
+
+fi
+
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
+printf "%s\n" "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# 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
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+printf %s "checking how to convert $build file names to $host format... " >&6; }
+if test ${lt_cv_to_host_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # 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* ) # 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
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+printf %s "checking how to convert $build file names to toolchain format... " >&6; }
+if test ${lt_cv_to_tool_file_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+printf %s "checking for $LD option to reload object files... " >&6; }
+if test ${lt_cv_ld_reload_flag+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_reload_flag='-r'
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
+set dummy ${ac_tool_prefix}file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_FILECMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$FILECMD"; then
+ ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_FILECMD="${ac_tool_prefix}file"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+FILECMD=$ac_cv_prog_FILECMD
+if test -n "$FILECMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
+printf "%s\n" "$FILECMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_FILECMD"; then
+ ac_ct_FILECMD=$FILECMD
+ # Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_FILECMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_FILECMD"; then
+ ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_FILECMD="file"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
+if test -n "$ac_ct_FILECMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
+printf "%s\n" "$ac_ct_FILECMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_FILECMD" = x; then
+ FILECMD=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ FILECMD=$ac_ct_FILECMD
+ fi
+else
+ FILECMD="$ac_cv_prog_FILECMD"
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+printf %s "checking how to recognize dependent libraries... " >&6; }
+if test ${lt_cv_deplibs_check_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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.
+# 'test_compile' -- check by making test program.
+# '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* | 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)'
+ 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
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ 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* | bitrig*)
+ 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
+ ;;
+
+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
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+printf %s "checking how to associate runtime and link libraries... " >&6; }
+if test ${lt_cv_sharedlib_from_linklib_cmd+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | 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
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+printf "%s\n" "$AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$AR" && break
+ done
+fi
+if test -z "$AR"; then
+ ac_ct_AR=$AR
+ for ac_prog in ar
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AR+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="$ac_prog"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+printf "%s\n" "$ac_ct_AR" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_AR" && break
+done
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+fi
+
+: ${AR=ar}
+
+
+
+
+
+
+# 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 thats 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
+
+
+
+
+
+
+# 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.
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+printf %s "checking for archiver @FILE support... " >&6; }
+if test ${lt_cv_ar_at_file+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ar_at_file=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+ (eval $lt_ar_try) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+printf "%s\n" "$lt_cv_ar_at_file" >&6; }
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+printf "%s\n" "$STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_STRIP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+printf "%s\n" "$ac_ct_STRIP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# 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
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+printf %s "checking command to parse $NM output from $compiler object... " >&6; }
+if test ${lt_cv_sys_global_symbol_pipe+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+# 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* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+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 .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"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 .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/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* .* \(.*\)$/ {\"\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.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ 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 ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {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(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && 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_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT_DLSYM_CONST
+#else
+# define LT_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_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_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && 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" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ 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
+
+fi
+
+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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+printf "%s\n" "failed" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+printf "%s\n" "ok" >&6; }
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+printf %s "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test ${with_sysroot+y}
+then :
+ withval=$with_sysroot;
+else $as_nop
+ with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+printf "%s\n" "$with_sysroot" >&6; }
+ as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+ ;;
+esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+printf "%s\n" "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+printf %s "checking for a working dd... " >&6; }
+if test ${ac_cv_path_lt_DD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_prog in dd
+ do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >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
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+printf %s "checking how to truncate binary pipes... " >&6; }
+if test ${lt_cv_truncate_bin+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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 <conftest2.i >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"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+printf "%s\n" "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; 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-%%"`
+}
+
+# Check whether --enable-libtool-lock was given.
+if test ${enable_libtool_lock+y}
+then :
+ enableval=$enable_libtool_lock;
+fi
+
+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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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*)
+ # 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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*)
+ 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*)
+ 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"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+printf %s "checking whether the C compiler needs -belf... " >&6; }
+if test ${lt_cv_cc_needs_belf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_cc_needs_belf=yes
+else $as_nop
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
+ 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; 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
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$MANIFEST_TOOL"; then
+ ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+printf "%s\n" "$MANIFEST_TOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+ # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_MANIFEST_TOOL"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_MANIFEST_TOOL" = x; then
+ MANIFEST_TOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+ fi
+else
+ MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if test ${lt_cv_path_mainfest_tool+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&5
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+printf "%s\n" "$DSYMUTIL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+printf "%s\n" "$NMEDIT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_NMEDIT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+printf "%s\n" "$ac_ct_NMEDIT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+printf "%s\n" "$LIPO" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_LIPO+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+printf "%s\n" "$ac_ct_LIPO" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+printf "%s\n" "$OTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+printf "%s\n" "$ac_ct_OTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+printf "%s\n" "$OTOOL64" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OTOOL64+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+printf "%s\n" "$ac_ct_OTOOL64" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+printf %s "checking for -single_module linker flag... " >&6; }
+if test ${lt_cv_apple_cc_single_mod+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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" >&5
+ $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 >&5
+ # 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 >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+printf %s "checking for -exported_symbols_list linker flag... " >&6; }
+if test ${lt_cv_ld_exported_symbols_list+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_ld_exported_symbols_list=yes
+else $as_nop
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+printf %s "checking for -force_load linker flag... " >&6; }
+if test ${lt_cv_ld_force_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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" >&5
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+ echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
+ $AR $AR_FLAGS libconftest.a conftest.o 2>&5
+ echo "$RANLIB libconftest.a" >&5
+ $RANLIB libconftest.a 2>&5
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+ $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 >&5
+ 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 >&5
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+printf "%s\n" "$lt_cv_ld_force_load" >&6; }
+ 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' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ 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
+
+# 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$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
+
+fi
+
+
+
+
+
+# Set options
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_AS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+printf "%s\n" "$AS" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_AS+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AS="as"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+printf "%s\n" "$ac_ct_AS" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+printf "%s\n" "$DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+printf "%s\n" "$OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+ enable_dlopen=no
+
+
+
+ # Check whether --enable-shared was given.
+if test ${enable_shared+y}
+then :
+ enableval=$enable_shared; 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
+else $as_nop
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test ${enable_static+y}
+then :
+ enableval=$enable_static; 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
+else $as_nop
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test ${with_pic+y}
+then :
+ withval=$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
+else $as_nop
+ pic_mode=default
+fi
+
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test ${enable_fast_install+y}
+then :
+ enableval=$enable_fast_install; 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
+else $as_nop
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+printf %s "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test ${with_aix_soname+y}
+then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else $as_nop
+ if test ${lt_cv_with_aix_soname+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+printf "%s\n" "$with_aix_soname" >&6; }
+ 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
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+printf %s "checking for objdir... " >&6; }
+if test ${lt_cv_objdir+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+printf "%s\n" "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
+
+
+
+
+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
+
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+
+# 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+printf %s "checking for ${ac_tool_prefix}file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
+ 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
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+printf %s "checking for file... " >&6; }
+if test ${lt_cv_path_MAGIC_CMD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ 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
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
+ 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
+fi
+
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+printf "%s\n" "$MAGIC_CMD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC=$CC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$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(){return(0);}'
+
+
+
+
+
+
+
+# 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
+
+# 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
+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*
+
+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*
+
+
+## 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_prog_compiler_no_builtin_flag=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+ *)
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+ esac
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test ${lt_cv_prog_compiler_rtti_exceptions+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## 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\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ 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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-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_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | 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
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ 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_prog_compiler_pic='-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_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | 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).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-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_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-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_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## 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\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ 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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ 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>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works"; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o=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\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ 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.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $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*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test ${lt_cv_prog_compiler_c_o+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler_c_o=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\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ 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.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $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*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+printf %s "checking if we can lock with hard links... " >&6; }
+ 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+printf "%s\n" "$hard_links" >&6; }
+ if test no = "$hard_links"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # 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'.
+ exclude_expsyms='_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.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | 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
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=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
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$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
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ 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
+ ld_shlibs=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
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$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...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $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
+ ld_shlibs=no
+ fi
+ ;;
+
+ haiku*)
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ link_all_deplibs=yes
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$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'
+ archive_expsym_cmds='$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'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ file_list_spec='@'
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$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.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='$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'
+ ;;
+
+ 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
+ whole_archive_flag_spec='$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
+ whole_archive_flag_spec='$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*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ 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
+ whole_archive_flag_spec='$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'
+ compiler_needs_object=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | $SED 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='$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'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='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*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ archive_expsym_cmds='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
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$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
+ ld_shlibs=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
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=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
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test no = "$ld_shlibs"; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$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.
+ hardcode_minus_L=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=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
+ export_symbols_cmds='$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
+ export_symbols_cmds='`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.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='$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.
+ hardcode_direct=no
+ hardcode_direct_absolute=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
+ hardcode_direct=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
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ 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
+
+ export_dynamic_flag_spec='$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.
+ always_export_symbols=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.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`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_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$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
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$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.
+ if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ if test ${lt_cv_aix_libpath_+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }'
+ lt_cv_aix_libpath_=`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_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test -z "$lt_cv_aix_libpath_"; then
+ lt_cv_aix_libpath_=/usr/lib:/lib
+ fi
+
+fi
+
+ aix_libpath=$lt_cv_aix_libpath_
+fi
+
+ hardcode_libdir_flag_spec='$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.
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ fi
+ archive_cmds_need_lc=yes
+ archive_expsym_cmds='$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.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$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
+ archive_expsym_cmds="$archive_expsym_cmds"'~$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
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | 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*)
+ # Native MSVC or ICC
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ file_list_spec='@'
+ # 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.
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+ enable_shared_with_static_runtimes=yes
+ exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ old_postinstall_cmds='chmod 644 $oldlib'
+ postlink_cmds='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
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=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.
+ archive_cmds='$CC -o $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.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ enable_shared_with_static_runtimes=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+ else
+ whole_archive_flag_spec=''
+ fi
+ link_all_deplibs=yes
+ allow_undefined_flag=$_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
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="$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"
+ module_expsym_cmds="$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"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=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*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly* | midnightbsd*)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ archive_cmds='$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
+ archive_cmds='$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
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$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*)
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+
+ # 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)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+printf %s "checking if $CC understands -b... " >&6; }
+if test ${lt_cv_prog_compiler__b+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_prog_compiler__b=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -b"
+ 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>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler__b=yes
+ fi
+ else
+ lt_cv_prog_compiler__b=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ archive_cmds='$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.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if test ${lt_cv_irix_exported_symbol+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo (void) { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_irix_exported_symbol=yes
+else $as_nop
+ lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$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
+ archive_cmds='$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'
+ archive_expsym_cmds='$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
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
+ else
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$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'
+ archive_expsym_cmds='$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'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ file_list_spec='@'
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$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
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$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
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$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'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$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'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=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
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=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.
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='$wl-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$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.
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+printf "%s\n" "$ld_shlibs" >&6; }
+test no = "$ld_shlibs" && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $archive_cmds 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.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+printf %s "checking whether -lc should be explicitly linked in... " >&6; }
+if test ${lt_cv_archive_cmds_need_lc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ lt_cv_archive_cmds_need_lc=no
+ else
+ lt_cv_archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
+ archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+printf %s "checking dynamic linker characteristics... " >&6; }
+
+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* | 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* | 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
+
+
+
+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 --with-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<name>.so
+ # instead of lib<name>.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* | 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
+ 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'
+ 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'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+ mingw* | 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*)
+ # Native MSVC or ICC
+ 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*)
+ 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`'
+
+ 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
+ shlibpath_var=LD_LIBRARY_PATH
+ 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_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+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
+ ;;
+
+# 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'
+ 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'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$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
+ if test ${lt_cv_shlibpath_overrides_runpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
+then :
+ lt_cv_shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+fi
+
+ 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* directores 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'
+ ;;
+
+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
+ ;;
+
+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* | bitrig*)
+ 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
+ ;;
+
+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
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+printf "%s\n" "$dynamic_linker" >&6; }
+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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+printf %s "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test yes = "$hardcode_automatic"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$hardcode_direct" &&
+ # 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, )" &&
+ test no != "$hardcode_minus_L"; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+printf "%s\n" "$hardcode_action" >&6; }
+
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; 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
+
+
+
+
+
+
+ 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* | 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dl_dlopen=yes
+else $as_nop
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ 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_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = xyes
+then :
+ lt_cv_dlopen=shl_load
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+printf %s "checking for shl_load in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_shl_load+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main (void)
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dld_shl_load=yes
+else $as_nop
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = xyes
+then :
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
+else $as_nop
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+printf %s "checking for dlopen in -ldl... " >&6; }
+if test ${ac_cv_lib_dl_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dl_dlopen=yes
+else $as_nop
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+printf %s "checking for dlopen in -lsvld... " >&6; }
+if test ${ac_cv_lib_svld_dlopen+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main (void)
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_svld_dlopen=yes
+else $as_nop
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = xyes
+then :
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+printf %s "checking for dld_link in -ldld... " >&6; }
+if test ${ac_cv_lib_dld_dld_link+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main (void)
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_dld_dld_link=yes
+else $as_nop
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = xyes
+then :
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ 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"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+printf %s "checking whether a program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self=cross
+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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+printf "%s\n" "$lt_cv_dlopen_self" >&6; }
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
+if test ${lt_cv_dlopen_self_static+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test yes = "$cross_compiling"; then :
+ lt_cv_dlopen_self_static=cross
+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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ 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 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
+ 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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+printf %s "checking whether stripping libraries is possible... " >&6; }
+if test -z "$STRIP"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+else
+ if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ 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"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ ;;
+ freebsd*)
+ if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
+ old_striplib="$STRIP --strip-debug"
+ striplib="$STRIP --strip-unneeded"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ fi
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ ;;
+ esac
+ fi
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report what library types will actually be built
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+printf %s "checking if libtool supports shared libraries... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+printf "%s\n" "$can_build_shared" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+printf %s "checking whether to build shared libraries... " >&6; }
+ 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+printf "%s\n" "$enable_shared" >&6; }
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+printf %s "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+printf "%s\n" "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$RC"; then
+ ac_cv_prog_RC="$RC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RC="${ac_tool_prefix}windres"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RC=$ac_cv_prog_RC
+if test -n "$RC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
+printf "%s\n" "$RC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RC"; then
+ ac_ct_RC=$RC
+ # Extract the first word of "windres", so it can be a program name with args.
+set dummy windres; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$ac_ct_RC"; then
+ ac_cv_prog_ac_ct_RC="$ac_ct_RC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RC="windres"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RC=$ac_cv_prog_ac_ct_RC
+if test -n "$ac_ct_RC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5
+printf "%s\n" "$ac_ct_RC" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RC" = x; then
+ RC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RC=$ac_ct_RC
+ fi
+else
+ RC="$ac_cv_prog_RC"
+fi
+
+
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$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.
+
+
+
+
+
+
+# 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
+
+
+# save warnings/boilerplate of simple test code
+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*
+
+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*
+
+
+# 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
+compiler_RC=$CC
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
+
+lt_cv_prog_compiler_c_o_RC=yes
+
+if test -n "$compiler"; then
+ :
+
+
+
+fi
+
+GCC=$lt_save_GCC
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+
+
+# This is a bit wrong since it is possible to request that only some libs
+# are built as shared. Using that feature isn't so common though, and this
+# breaks only on Windows (at least for now) if the user enables only some
+# libs as shared.
+ if test "x$enable_shared" != xno; then
+ COND_SHARED_TRUE=
+ COND_SHARED_FALSE='#'
+else
+ COND_SHARED_TRUE='#'
+ COND_SHARED_FALSE=
+fi
+
+
+#####################
+# Symbol versioning #
+#####################
+
+# NOTE: This checks if we are building shared or static library
+# and if --with-pic or --without-pic was used. Thus this check
+# must be after Libtool initialization.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if library symbol versioning should be used" >&5
+printf %s "checking if library symbol versioning should be used... " >&6; }
+# Check whether --enable-symbol-versions was given.
+if test ${enable_symbol_versions+y}
+then :
+ enableval=$enable_symbol_versions;
+else $as_nop
+ enable_symbol_versions=auto
+fi
+
+if test "x$enable_symbol_versions" = xauto; then
+ case $host_os in
+ # NOTE: Even if one omits -gnu on GNU/Linux (e.g.
+ # i486-slackware-linux), configure will (via config.sub)
+ # append -gnu (e.g. i486-slackware-linux-gnu), and this
+ # test will work correctly.
+ gnu* | *-gnu* | freebsd*)
+ enable_symbol_versions=yes
+ ;;
+ *)
+ enable_symbol_versions=no
+ ;;
+ esac
+fi
+
+# There are two variants for symbol versioning.
+# See src/liblzma/validate_map.sh for details.
+#
+# On GNU/Linux, extra symbols are added in the C code. These extra symbols
+# must not be put into a static library as they can cause problems (and
+# even if they didn't cause problems, they would be useless). On other
+# systems symbol versioning may be used too but there is no problem as only
+# a linker script is specified in src/liblzma/Makefile.am and that isn't
+# used when creating a static library.
+#
+# Libtool always uses -DPIC when building shared libraries by default and
+# doesn't use it for static libs by default. This can be overridden with
+# --with-pic and --without-pic though. As long as neither --with-pic nor
+# --without-pic is used then we can use #ifdef PIC to detect if the file is
+# being built for a shared library.
+if test "x$enable_symbol_versions" = xno ; then
+ enable_symbol_versions=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+elif test "x$enable_shared" = xno ; then
+ enable_symbol_versions=no
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (not building a shared library)" >&5
+printf "%s\n" "no (not building a shared library)" >&6; }
+else
+ case "$host_cpu-$host_os" in
+ microblaze*)
+ # GCC 12 on MicroBlaze doesn't support __symver__
+ # attribute. It's simplest and safest to use the
+ # generic version on that platform since then only
+ # the linker script is needed. The RHEL/CentOS 7
+ # compatibility symbols don't matter on MicroBlaze.
+ enable_symbol_versions=generic
+ ;;
+ *-linux*)
+ case "$pic_mode-$enable_static" in
+ default-*)
+ # Use symvers if PIC is defined.
+ have_symbol_versions_linux=2
+ ;;
+ *-no)
+ # Not building static library.
+ # Use symvers unconditionally.
+ have_symbol_versions_linux=1
+ ;;
+ *)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: " >&5
+printf "%s\n" "" >&6; }
+ as_fn_error $? "
+ On GNU/Linux, building both shared and static library at the same time
+ is not supported if --with-pic or --without-pic is used.
+ Use either --disable-shared or --disable-static to build one type
+ of library at a time. If both types are needed, build one at a time,
+ possibly picking only src/liblzma/.libs/liblzma.a from the static build." "$LINENO" 5
+ ;;
+ esac
+ enable_symbol_versions=linux
+
+printf "%s\n" "#define HAVE_SYMBOL_VERSIONS_LINUX $have_symbol_versions_linux" >>confdefs.h
+
+ ;;
+ *)
+ enable_symbol_versions=generic
+ ;;
+ esac
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($enable_symbol_versions)" >&5
+printf "%s\n" "yes ($enable_symbol_versions)" >&6; }
+fi
+
+ if test "x$enable_symbol_versions" = xlinux; then
+ COND_SYMVERS_LINUX_TRUE=
+ COND_SYMVERS_LINUX_FALSE='#'
+else
+ COND_SYMVERS_LINUX_TRUE='#'
+ COND_SYMVERS_LINUX_FALSE=
+fi
+
+ if test "x$enable_symbol_versions" = xgeneric; then
+ COND_SYMVERS_GENERIC_TRUE=
+ COND_SYMVERS_GENERIC_FALSE='#'
+else
+ COND_SYMVERS_GENERIC_TRUE='#'
+ COND_SYMVERS_GENERIC_FALSE=
+fi
+
+
+
+###############################################################################
+# Checks for libraries.
+###############################################################################
+
+echo
+echo "Initializing gettext:"
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+printf %s "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test ${enable_nls+y}
+then :
+ enableval=$enable_nls; USE_NLS=$enableval
+else $as_nop
+ USE_NLS=yes
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+printf "%s\n" "$USE_NLS" >&6; }
+
+
+
+
+ GETTEXT_MACRO_VERSION=0.20
+
+
+
+
+# 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 "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_MSGFMT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_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..." >&5
+ if $ac_dir/$ac_word --statistics /dev/null >&5 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); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+printf "%s\n" "$MSGFMT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_GMSGFMT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+printf "%s\n" "$GMSGFMT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+
+ 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
+
+
+
+# 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 "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_XGETTEXT+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_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..." >&5
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 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); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+printf "%s\n" "$XGETTEXT" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ rm -f messages.po
+
+ 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
+
+
+
+# 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 "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_MSGMERGE+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_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..." >&5
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+printf "%s\n" "$MSGMERGE" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+ if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
+ else
+ if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
+ else
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
+ fi
+ fi
+
+
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+ ac_config_commands="$ac_config_commands po-directories"
+
+
+
+ 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_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+
+# Check whether --with-gnu-ld was given.
+if test ${with_gnu_ld+y}
+then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else $as_nop
+ with_gnu_ld=no
+fi
+
+# 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
+
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
+printf %s "checking for ld... " >&6; }
+elif test "$GCC" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+printf %s "checking for ld used by $CC... " >&6; }
+elif test "$with_gnu_ld" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+printf %s "checking for GNU ld... " >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+printf %s "checking for non-GNU ld... " >&6; }
+fi
+if test -n "$LD"; then
+ # Let the user override the test with a path.
+ :
+else
+ if test ${acl_cv_path_LD+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ 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*)
+ # 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_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$acl_save_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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+ fi
+ case $host in
+ *-*-aix*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __powerpc64__ || defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # The compiler produces 64-bit code. Add option '-b64' so that the
+ # linker groks 64-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -b64 "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+ esac
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ sparc64-*-netbsd*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ # The compiler produces 32-bit code. Add option '-m elf32_sparc'
+ # so that the linker groks 32-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -m elf32_sparc "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+ esac
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ esac
+
+fi
+
+ LD="$acl_cv_path_LD"
+fi
+if test -n "$LD"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+printf "%s\n" "$LD" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
+if test ${acl_cv_prog_gnu_ld+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes
+ ;;
+*)
+ acl_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+printf %s "checking for shared library run path origin... " >&6; }
+if test ${acl_cv_rpath+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+printf "%s\n" "$acl_cv_rpath" >&6; }
+ 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"
+ # Check whether --enable-rpath was given.
+if test ${enable_rpath+y}
+then :
+ enableval=$enable_rpath; :
+else $as_nop
+ enable_rpath=yes
+fi
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
+printf %s "checking 32-bit host C ABI... " >&6; }
+if test ${gl_cv_host_cpu_c_abi_32bit+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if test -n "$gl_cv_host_cpu_c_abi"; then
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
+ esac
+ else
+ case "$host_cpu" in
+
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh1234 | sh1234elb \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ # CPUs that only support a 64-bit ABI.
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+
+ i[34567]86 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ 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.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64) \
+ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ 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.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ 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__.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ 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.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=yes
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ 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.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __powerpc64__ || defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_host_cpu_c_abi_32bit=no
+else $as_nop
+ gl_cv_host_cpu_c_abi_32bit=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown
+ ;;
+ esac
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
+printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
+
+ HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5
+printf %s "checking for ELF binary format... " >&6; }
+if test ${gl_cv_elf+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined __ELF__ || (defined __linux__ && defined __EDG__)
+ Extensible Linking Format
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Extensible Linking Format" >/dev/null 2>&1
+then :
+ gl_cv_elf=yes
+else $as_nop
+ gl_cv_elf=no
+fi
+rm -rf conftest*
+
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5
+printf "%s\n" "$gl_cv_elf" >&6; }
+ 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.
+ 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
+ else
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
+printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
+if test ${acl_cv_libdirstems+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ acl_libdirstem3=
+ case "$host_os" in
+ solaris*)
+ 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
+ ;;
+ *)
+ 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_save_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_save_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"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
+printf "%s\n" "$acl_cv_libdirstems" >&6; }
+ 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/,.*//'`
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test ${with_libiconv_prefix+y}
+then :
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
+ fi
+ 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
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ LIBICONV_PREFIX=
+ HAVE_LIBICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ 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"
+ 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" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ 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
+ 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
+ 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 $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ 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
+ 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
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ 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
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ 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
+ if test "$acl_hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ 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
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ 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" = 'iconv'; then
+ LIBICONV_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" = 'iconv'; then
+ LIBICONV_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" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ 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 $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ 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
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ 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 $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ 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
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ 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
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ 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
+ 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*)
+ 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)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
+if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main (void)
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else $as_nop
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5
+printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; }
+if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main (void)
+{
+CFLocaleCopyPreferredLanguages();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ gt_cv_func_CFLocaleCopyPreferredLanguages=yes
+else $as_nop
+ gt_cv_func_CFLocaleCopyPreferredLanguages=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5
+printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; }
+ if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+
+printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ 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"
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+
+ 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
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+ 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
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+printf %s "checking for GNU gettext in libc... " >&6; }
+if eval test \${$gt_func_gnugettext_libc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <libintl.h>
+#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
+
+int
+main (void)
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$gt_func_gnugettext_libc=yes"
+else $as_nop
+ eval "$gt_func_gnugettext_libc=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$gt_func_gnugettext_libc
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+printf %s "checking for iconv... " >&6; }
+if test ${am_cv_func_iconv+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main (void)
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main (void)
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+printf "%s\n" "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+printf %s "checking for working iconv... " >&6; }
+if test ${am_cv_func_iconv_works+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ am_save_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
+ if test "$cross_compiling" = yes
+then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+
+int
+main (void)
+{
+int result = 0;
+ /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
+ successful returns. This is even documented in
+ <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
+ {
+ 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 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 |= 2;
+ 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 |= 4;
+ 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 |= 8;
+ 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 |= 16;
+ 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;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ am_cv_func_iconv_works=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ test "$am_cv_func_iconv_works" = no || break
+ done
+ LIBS="$am_save_LIBS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+printf "%s\n" "$am_cv_func_iconv_works" >&6; }
+ 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
+
+printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+printf %s "checking how to link with libiconv... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+printf "%s\n" "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test ${with_libintl_prefix+y}
+then :
+ withval=$with_libintl_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
+ fi
+ 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
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ LIBINTL_PREFIX=
+ HAVE_LIBINTL=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ 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"
+ 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" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ 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
+ 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
+ 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 $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ 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
+ 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
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ 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
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ 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
+ if test "$acl_hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ 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
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ 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" = 'intl'; then
+ LIBINTL_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" = 'intl'; then
+ LIBINTL_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" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ 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 $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ 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
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ 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 $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ 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
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ 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
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ 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
+ 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*)
+ 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)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+printf %s "checking for GNU gettext in libintl... " >&6; }
+if eval test \${$gt_func_gnugettext_libintl+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <libintl.h>
+#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
+
+int
+main (void)
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ eval "$gt_func_gnugettext_libintl=yes"
+else $as_nop
+ eval "$gt_func_gnugettext_libintl=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <libintl.h>
+#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
+
+int
+main (void)
+{
+
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+eval ac_res=\$$gt_func_gnugettext_libintl
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ fi
+
+ 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; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ 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
+
+printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+printf %s "checking whether to use NLS... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+printf "%s\n" "$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+printf %s "checking where the gettext function comes from... " >&6; }
+ 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+printf "%s\n" "$gt_source" >&6; }
+ 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
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+printf %s "checking how to link with libintl... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+printf "%s\n" "$LIBINTL" >&6; }
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+
+printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
+
+ fi
+
+ POSUB=po
+ fi
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+###############################################################################
+# Checks for header files.
+###############################################################################
+
+echo
+echo "System headers and functions:"
+
+# There is currently no workarounds in this package if some of
+# these headers are missing.
+ for ac_header in fcntl.h limits.h sys/time.h
+do :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else $as_nop
+ as_fn_error $? "Required header file(s) are missing." "$LINENO" 5
+fi
+
+done
+
+# immintrin.h allows the use of the intrinsic functions if they are available.
+# cpuid.h may be used for detecting x86 processor features at runtime.
+ac_fn_c_check_header_compile "$LINENO" "immintrin.h" "ac_cv_header_immintrin_h" "$ac_includes_default"
+if test "x$ac_cv_header_immintrin_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_IMMINTRIN_H 1" >>confdefs.h
+
+fi
+ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default"
+if test "x$ac_cv_header_cpuid_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_CPUID_H 1" >>confdefs.h
+
+fi
+
+
+
+###############################################################################
+# Checks for typedefs, structures, and compiler characteristics.
+###############################################################################
+
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes
+then :
+
+printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+printf %s "checking for stdbool.h that conforms to C99... " >&6; }
+if test ${ac_cv_header_stdbool_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdbool.h>
+
+ #ifndef __bool_true_false_are_defined
+ #error "__bool_true_false_are_defined is not defined"
+ #endif
+ char a[__bool_true_false_are_defined == 1 ? 1 : -1];
+
+ /* Regardless of whether this is C++ or "_Bool" is a
+ valid type name, "true" and "false" should be usable
+ in #if expressions and integer constant expressions,
+ and "bool" should be a valid type name. */
+
+ #if !true
+ #error "'true' is not true"
+ #endif
+ #if true != 1
+ #error "'true' is not equal to 1"
+ #endif
+ char b[true == 1 ? 1 : -1];
+ char c[true];
+
+ #if false
+ #error "'false' is not false"
+ #endif
+ #if false != 0
+ #error "'false' is not equal to 0"
+ #endif
+ char d[false == 0 ? 1 : -1];
+
+ enum { e = false, f = true, g = false * true, h = true * 256 };
+
+ char i[(bool) 0.5 == true ? 1 : -1];
+ char j[(bool) 0.0 == false ? 1 : -1];
+ char k[sizeof (bool) > 0 ? 1 : -1];
+
+ struct sb { bool s: 1; bool t; } s;
+ char l[sizeof s.t > 0 ? 1 : -1];
+
+ /* The following fails for
+ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+ bool m[h];
+ char n[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char o[-1 - (bool) 0 < 0 ? 1 : -1];
+ /* Catch a bug in an HP-UX C compiler. See
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ bool p = true;
+ bool *pp = &p;
+
+ /* C 1999 specifies that bool, true, and false are to be
+ macros, but C++ 2011 and later overrule this. */
+ #if __cplusplus < 201103
+ #ifndef bool
+ #error "bool is not defined"
+ #endif
+ #ifndef false
+ #error "false is not defined"
+ #endif
+ #ifndef true
+ #error "true is not defined"
+ #endif
+ #endif
+
+ /* If _Bool is available, repeat with it all the tests
+ above that used bool. */
+ #ifdef HAVE__BOOL
+ struct sB { _Bool s: 1; _Bool t; } t;
+
+ char q[(_Bool) 0.5 == true ? 1 : -1];
+ char r[(_Bool) 0.0 == false ? 1 : -1];
+ char u[sizeof (_Bool) > 0 ? 1 : -1];
+ char v[sizeof t.t > 0 ? 1 : -1];
+
+ _Bool w[h];
+ char x[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
+ _Bool z = true;
+ _Bool *pz = &p;
+ #endif
+
+int
+main (void)
+{
+
+ bool ps = &s;
+ *pp |= p;
+ *pp |= ! p;
+
+ #ifdef HAVE__BOOL
+ _Bool pt = &t;
+ *pz |= z;
+ *pz |= ! z;
+ #endif
+
+ /* Refer to every declared value, so they cannot be
+ discarded as unused. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
+ + !l + !m + !n + !o + !p + !pp + !ps
+ #ifdef HAVE__BOOL
+ + !q + !r + !u + !v + !w + !x + !y + !z + !pt
+ #endif
+ );
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_header_stdbool_h=yes
+else $as_nop
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
+case $ac_cv_c_uint8_t in #(
+ no|yes) ;; #(
+ *)
+
+printf "%s\n" "#define _UINT8_T 1" >>confdefs.h
+
+
+printf "%s\n" "#define uint8_t $ac_cv_c_uint8_t" >>confdefs.h
+;;
+ esac
+
+ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
+case $ac_cv_c_uint16_t in #(
+ no|yes) ;; #(
+ *)
+
+
+printf "%s\n" "#define uint16_t $ac_cv_c_uint16_t" >>confdefs.h
+;;
+ esac
+
+ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
+case $ac_cv_c_int32_t in #(
+ no|yes) ;; #(
+ *)
+
+printf "%s\n" "#define int32_t $ac_cv_c_int32_t" >>confdefs.h
+;;
+esac
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+ no|yes) ;; #(
+ *)
+
+printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
+
+
+printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
+;;
+ esac
+
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
+case $ac_cv_c_int64_t in #(
+ no|yes) ;; #(
+ *)
+
+printf "%s\n" "#define int64_t $ac_cv_c_int64_t" >>confdefs.h
+;;
+esac
+
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
+case $ac_cv_c_uint64_t in #(
+ no|yes) ;; #(
+ *)
+
+printf "%s\n" "#define _UINT64_T 1" >>confdefs.h
+
+
+printf "%s\n" "#define uint64_t $ac_cv_c_uint64_t" >>confdefs.h
+;;
+ esac
+
+
+ ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
+if test "x$ac_cv_type_uintptr_t" = xyes
+then :
+
+printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
+
+else $as_nop
+ for ac_type in 'unsigned int' 'unsigned long int' \
+ 'unsigned long long int'; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
+test_array [0] = 0;
+return test_array [0];
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
+
+ ac_type=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ test -z "$ac_type" && break
+ done
+fi
+
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+printf %s "checking size of size_t... " >&6; }
+if test ${ac_cv_sizeof_size_t+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"
+then :
+
+else $as_nop
+ if test "$ac_cv_type_size_t" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (size_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+printf "%s\n" "$ac_cv_sizeof_size_t" >&6; }
+
+
+
+printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h
+
+
+
+# The command line tool can copy high resolution timestamps if such
+# information is available in struct stat. Otherwise one second accuracy
+# is used.
+ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct stat" "st_uatime" "ac_cv_member_struct_stat_st_uatime" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_uatime" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_UATIME 1" >>confdefs.h
+
+
+fi
+ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "$ac_includes_default"
+if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
+then :
+
+printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
+
+
+fi
+
+
+# Check whether --enable-largefile was given.
+if test ${enable_largefile+y}
+then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+printf %s "checking for special C compiler options needed for large files... " >&6; }
+if test ${ac_cv_sys_largefile_CC+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test ${ac_cv_sys_file_offset_bits+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test ${ac_cv_sys_large_files+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+printf "%s\n" "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+printf %s "checking whether byte ordering is bigendian... " >&6; }
+if test ${ac_cv_c_bigendian+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main (void)
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main (void)
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_bigendian=yes
+else $as_nop
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main (void)
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main (void)
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_bigendian=yes
+else $as_nop
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes
+then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+unsigned short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ unsigned short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ unsigned short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ unsigned short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main (void)
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main (void)
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+ ac_cv_c_bigendian=no
+else $as_nop
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+printf "%s\n" "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+
+printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+# __attribute__((__constructor__)) can be used for one-time initializations.
+# Use -Werror because some compilers accept unknown attributes and just
+# give a warning.
+#
+# FIXME? Unfortunately -Werror can cause trouble if CFLAGS contains options
+# that produce warnings for unrelated reasons. For example, GCC and Clang
+# support -Wunused-macros which will warn about "#define _GNU_SOURCE 1"
+# which will be among the #defines that Autoconf inserts to the beginning of
+# the test program. There seems to be no nice way to prevent Autoconf from
+# inserting the any defines to the test program.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if __attribute__((__constructor__)) can be used" >&5
+printf %s "checking if __attribute__((__constructor__)) can be used... " >&6; }
+have_func_attribute_constructor=no
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ __attribute__((__constructor__))
+ static void my_constructor_func(void) { return; }
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR 1" >>confdefs.h
+
+ have_func_attribute_constructor=yes
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+CFLAGS="$OLD_CFLAGS"
+
+
+# The Win95 threading lacks a thread-safe one-time initialization function.
+# The one-time initialization is needed for crc32_small.c and crc64_small.c
+# create the CRC tables. So if small mode is enabled, the threading mode is
+# win95, and the compiler does not support attribute constructor, then we
+# would end up with a multithreaded build that is thread-unsafe. As a
+# result this configuration is not allowed.
+if test "x$enable_small$enable_threads$have_func_attribute_constructor" \
+ = xyeswin95no; then
+ as_fn_error $? "
+ --enable-threads=win95 and --enable-small cannot be used
+ at the same time with a compiler that doesn't support
+ __attribute__((__constructor__))" "$LINENO" 5
+fi
+
+###############################################################################
+# Checks for library functions.
+###############################################################################
+
+# Gnulib replacements as needed
+
+ if test -z "$GETOPT_H"; then
+ for ac_header in getopt.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
+
+else $as_nop
+ GETOPT_H=getopt.h
+fi
+
+done
+ fi
+
+ if test -z "$GETOPT_H"; then
+
+ for ac_func in getopt_long
+do :
+ ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
+if test "x$ac_cv_func_getopt_long" = xyes
+then :
+ printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h
+
+else $as_nop
+ GETOPT_H=getopt.h
+fi
+
+done
+ fi
+
+ if test -z "$GETOPT_H"; then
+ ac_fn_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_optreset" = xyes
+then :
+
+printf "%s\n" "#define HAVE_OPTRESET 1" >>confdefs.h
+
+fi
+ fi
+
+
+
+
+ if test -n "$GETOPT_H"
+then :
+
+ case " $LIBOBJS " in
+ *" getopt.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
+ ;;
+esac
+
+ case " $LIBOBJS " in
+ *" getopt1.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt1.$ac_objext"
+ ;;
+esac
+
+
+ GETOPT_H=getopt.h
+
+printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+
+
+
+
+fi
+
+
+# Find the best function to set timestamps.
+
+ for ac_func in futimens futimes futimesat utimes _futime utime
+do :
+ as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ break
+fi
+
+done
+
+# This is nice to have but not mandatory.
+ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
+if test "x$ac_cv_func_posix_fadvise" = xyes
+then :
+ printf "%s\n" "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+
+
+ac_fn_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_program_invocation_name" = xyes
+then :
+
+printf "%s\n" "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
+
+fi
+
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if __builtin_bswap16/32/64 are supported" >&5
+printf %s "checking if __builtin_bswap16/32/64 are supported... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+__builtin_bswap16(1);
+ __builtin_bswap32(1);
+ __builtin_bswap64(1);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE___BUILTIN_BSWAPXX 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+ # Look for other byteswapping methods.
+ for ac_header in byteswap.h sys/endian.h sys/byteorder.h
+do :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ break
+fi
+
+done
+
+ # Even if we have byteswap.h we may lack the specific macros/functions.
+ if test x$ac_cv_header_byteswap_h = xyes ; then
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if bswap_16 is available" >&5
+printf %s "checking if bswap_16 is available... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <byteswap.h>
+int
+main(void)
+{
+ bswap_16(42);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_BSWAP_16 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if bswap_32 is available" >&5
+printf %s "checking if bswap_32 is available... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <byteswap.h>
+int
+main(void)
+{
+ bswap_32(42);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_BSWAP_32 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if bswap_64 is available" >&5
+printf %s "checking if bswap_64 is available... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <byteswap.h>
+int
+main(void)
+{
+ bswap_64(42);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_BSWAP_64 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+ fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if unaligned memory access should be used" >&5
+printf %s "checking if unaligned memory access should be used... " >&6; }
+# Check whether --enable-unaligned-access was given.
+if test ${enable_unaligned_access+y}
+then :
+ enableval=$enable_unaligned_access;
+else $as_nop
+ enable_unaligned_access=auto
+fi
+
+if test "x$enable_unaligned_access" = xauto ; then
+ # TODO: There may be other architectures, on which unaligned access
+ # is OK.
+ case $host_cpu in
+ i?86|x86_64|powerpc|powerpc64)
+ enable_unaligned_access=yes
+ ;;
+ arm*|aarch64*)
+ # On 32-bit and 64-bit ARM, GCC and Clang
+ # #define __ARM_FEATURE_UNALIGNED if
+ # unaligned access is supported.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifndef __ARM_FEATURE_UNALIGNED
+compile error
+#endif
+int main(void) { return 0; }
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ enable_unaligned_access=yes
+else $as_nop
+ enable_unaligned_access=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ *)
+ enable_unaligned_access=no
+ ;;
+ esac
+fi
+if test "x$enable_unaligned_access" = xyes ; then
+
+printf "%s\n" "#define TUKLIB_FAST_UNALIGNED_ACCESS 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if unsafe type punning should be used" >&5
+printf %s "checking if unsafe type punning should be used... " >&6; }
+# Check whether --enable-unsafe-type-punning was given.
+if test ${enable_unsafe_type_punning+y}
+then :
+ enableval=$enable_unsafe_type_punning;
+else $as_nop
+ enable_unsafe_type_punning=no
+fi
+
+if test "x$enable_unsafe_type_punning" = xyes ; then
+
+printf "%s\n" "#define TUKLIB_USE_UNSAFE_TYPE_PUNNING 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if __builtin_assume_aligned is supported" >&5
+printf %s "checking if __builtin_assume_aligned is supported... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+__builtin_assume_aligned("", 1);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE___BUILTIN_ASSUME_ALIGNED 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+
+
+# sys/param.h might be needed by sys/sysctl.h.
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to detect the amount of physical memory" >&5
+printf %s "checking how to detect the amount of physical memory... " >&6; }
+if test ${tuklib_cv_physmem_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+
+# 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.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#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
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_physmem_method=special
+else $as_nop
+
+
+# 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).
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/systemcfg.h>
+
+int
+main(void)
+{
+ (void)_system_configuration.physmem;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_physmem_method=aix
+else $as_nop
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <unistd.h>
+int
+main(void)
+{
+ long i;
+ i = sysconf(_SC_PAGESIZE);
+ i = sysconf(_SC_PHYS_PAGES);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_physmem_method=sysconf
+else $as_nop
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/sysctl.h>
+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;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_physmem_method=sysctl
+else $as_nop
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/sysinfo.h>
+#include <machine/hal_sysinfo.h>
+
+int
+main(void)
+{
+ int memkb;
+ int start = 0;
+ getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_physmem_method=getsysinfo
+else $as_nop
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/param.h>
+#include <sys/pstat.h>
+
+int
+main(void)
+{
+ struct pst_static pst;
+ pstat_getstatic(&pst, sizeof(pst), 1, 0);
+ (void)pst.physical_memory;
+ (void)pst.page_size;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_physmem_method=pstat_getstatic
+else $as_nop
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <invent.h>
+int
+main(void)
+{
+ inv_state_t *st = NULL;
+ setinvent_r(&st);
+ getinvent_r(st);
+ endinvent_r(st);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_physmem_method=getinvent_r
+else $as_nop
+
+
+# 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*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/sysinfo.h>
+int
+main(void)
+{
+ struct sysinfo si;
+ sysinfo(&si);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+ tuklib_cv_physmem_method=sysinfo
+
+else $as_nop
+
+ tuklib_cv_physmem_method=unknown
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ *)
+ tuklib_cv_physmem_method=unknown
+ ;;
+esac
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tuklib_cv_physmem_method" >&5
+printf "%s\n" "$tuklib_cv_physmem_method" >&6; }
+
+case $tuklib_cv_physmem_method in
+ aix)
+
+printf "%s\n" "#define TUKLIB_PHYSMEM_AIX 1" >>confdefs.h
+
+ ;;
+ sysconf)
+
+printf "%s\n" "#define TUKLIB_PHYSMEM_SYSCONF 1" >>confdefs.h
+
+ ;;
+ sysctl)
+
+printf "%s\n" "#define TUKLIB_PHYSMEM_SYSCTL 1" >>confdefs.h
+
+ ;;
+ getsysinfo)
+
+printf "%s\n" "#define TUKLIB_PHYSMEM_GETSYSINFO 1" >>confdefs.h
+
+ ;;
+ pstat_getstatic)
+
+printf "%s\n" "#define TUKLIB_PHYSMEM_PSTAT_GETSTATIC 1" >>confdefs.h
+
+ ;;
+ getinvent_r)
+
+printf "%s\n" "#define TUKLIB_PHYSMEM_GETINVENT_R 1" >>confdefs.h
+
+ ;;
+ sysinfo)
+
+printf "%s\n" "#define TUKLIB_PHYSMEM_SYSINFO 1" >>confdefs.h
+
+ ;;
+esac
+
+
+
+
+# sys/param.h might be needed by sys/sysctl.h.
+ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to detect the number of available CPU cores" >&5
+printf %s "checking how to detect the number of available CPU cores... " >&6; }
+if test ${tuklib_cv_cpucores_method+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+
+# 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.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+int main(void) { return 0; }
+#else
+compile error
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_cpucores_method=special
+else $as_nop
+
+
+# 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.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sched.h>
+int
+main(void)
+{
+ cpu_set_t cpu_mask;
+ sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask);
+ return CPU_COUNT(&cpu_mask);
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ tuklib_cv_cpucores_method=sched_getaffinity
+else $as_nop
+
+
+# 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.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/param.h>
+#include <sys/cpuset.h>
+
+int
+main(void)
+{
+ cpuset_t set;
+ cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
+ sizeof(set), &set);
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_cpucores_method=cpuset
+else $as_nop
+
+
+# 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.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __QNX__
+compile error
+#endif
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/sysctl.h>
+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;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_cpucores_method=sysctl
+else $as_nop
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <unistd.h>
+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;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_cpucores_method=sysconf
+else $as_nop
+
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/param.h>
+#include <sys/pstat.h>
+
+int
+main(void)
+{
+ struct pst_dynamic pst;
+ pstat_getdynamic(&pst, sizeof(pst), 1, 0);
+ (void)pst.psd_proc_cnt;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ tuklib_cv_cpucores_method=pstat_getdynamic
+else $as_nop
+
+
+ tuklib_cv_cpucores_method=unknown
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tuklib_cv_cpucores_method" >&5
+printf "%s\n" "$tuklib_cv_cpucores_method" >&6; }
+
+case $tuklib_cv_cpucores_method in
+ sched_getaffinity)
+
+printf "%s\n" "#define TUKLIB_CPUCORES_SCHED_GETAFFINITY 1" >>confdefs.h
+
+ ;;
+ cpuset)
+
+printf "%s\n" "#define TUKLIB_CPUCORES_CPUSET 1" >>confdefs.h
+
+ ;;
+ sysctl)
+
+printf "%s\n" "#define TUKLIB_CPUCORES_SYSCTL 1" >>confdefs.h
+
+ ;;
+ sysconf)
+
+printf "%s\n" "#define TUKLIB_CPUCORES_SYSCONF 1" >>confdefs.h
+
+ ;;
+ pstat_getdynamic)
+
+printf "%s\n" "#define TUKLIB_CPUCORES_PSTAT_GETDYNAMIC 1" >>confdefs.h
+
+ ;;
+esac
+
+
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
+printf %s "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
+if test ${ac_cv_func_mbrtowc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main (void)
+{
+wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_func_mbrtowc=yes
+else $as_nop
+ ac_cv_func_mbrtowc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
+printf "%s\n" "$ac_cv_func_mbrtowc" >&6; }
+ if test $ac_cv_func_mbrtowc = yes; then
+
+printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
+
+ fi
+
+ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth"
+if test "x$ac_cv_func_wcwidth" = xyes
+then :
+ printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h
+
+fi
+
+
+
+# If requested, check for system-provided SHA-256. At least the following
+# implementations are supported:
+#
+# OS Headers Library Type Function
+# FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init
+# NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init
+# OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init
+# Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init
+# MINIX 3 sys/types.h + sha2.h SHA256_CTX SHA256_Init
+# Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init
+#
+# Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead
+# of size_t.
+#
+sha256_header_found=no
+sha256_type_found=no
+sha256_func_found=no
+if test "x$enable_external_sha256" = "xyes"
+then :
+
+ # Test for Common Crypto before others, because Darwin has sha256.h
+ # too and we don't want to use that, because on older versions it
+ # uses OpenSSL functions, whose SHA256_Init is not guaranteed to
+ # succeed.
+ for ac_header in CommonCrypto/CommonDigest.h sha256.h sha2.h
+do :
+ as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+ sha256_header_found=yes ; break
+fi
+
+done
+ if test "x$sha256_header_found" = xyes; then
+ ac_fn_c_check_type "$LINENO" "CC_SHA256_CTX" "ac_cv_type_CC_SHA256_CTX" "#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+ # include <CommonCrypto/CommonDigest.h>
+ #endif
+ #ifdef HAVE_SHA256_H
+ # include <sha256.h>
+ #endif
+ #ifdef HAVE_SHA2_H
+ # include <sha2.h>
+ #endif
+"
+if test "x$ac_cv_type_CC_SHA256_CTX" = xyes
+then :
+
+printf "%s\n" "#define HAVE_CC_SHA256_CTX 1" >>confdefs.h
+
+sha256_type_found=yes
+fi
+ac_fn_c_check_type "$LINENO" "SHA256_CTX" "ac_cv_type_SHA256_CTX" "#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+ # include <CommonCrypto/CommonDigest.h>
+ #endif
+ #ifdef HAVE_SHA256_H
+ # include <sha256.h>
+ #endif
+ #ifdef HAVE_SHA2_H
+ # include <sha2.h>
+ #endif
+"
+if test "x$ac_cv_type_SHA256_CTX" = xyes
+then :
+
+printf "%s\n" "#define HAVE_SHA256_CTX 1" >>confdefs.h
+
+sha256_type_found=yes
+fi
+ac_fn_c_check_type "$LINENO" "SHA2_CTX" "ac_cv_type_SHA2_CTX" "#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+ # include <CommonCrypto/CommonDigest.h>
+ #endif
+ #ifdef HAVE_SHA256_H
+ # include <sha256.h>
+ #endif
+ #ifdef HAVE_SHA2_H
+ # include <sha2.h>
+ #endif
+"
+if test "x$ac_cv_type_SHA2_CTX" = xyes
+then :
+
+printf "%s\n" "#define HAVE_SHA2_CTX 1" >>confdefs.h
+
+sha256_type_found=yes
+fi
+
+ if test "x$sha256_type_found" = xyes ; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing SHA256Init" >&5
+printf %s "checking for library containing SHA256Init... " >&6; }
+if test ${ac_cv_search_SHA256Init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char SHA256Init ();
+int
+main (void)
+{
+return SHA256Init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' md
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_SHA256Init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_SHA256Init+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_SHA256Init+y}
+then :
+
+else $as_nop
+ ac_cv_search_SHA256Init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SHA256Init" >&5
+printf "%s\n" "$ac_cv_search_SHA256Init" >&6; }
+ac_res=$ac_cv_search_SHA256Init
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing SHA256_Init" >&5
+printf %s "checking for library containing SHA256_Init... " >&6; }
+if test ${ac_cv_search_SHA256_Init+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char SHA256_Init ();
+int
+main (void)
+{
+return SHA256_Init ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' md
+do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_search_SHA256_Init=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext
+ if test ${ac_cv_search_SHA256_Init+y}
+then :
+ break
+fi
+done
+if test ${ac_cv_search_SHA256_Init+y}
+then :
+
+else $as_nop
+ ac_cv_search_SHA256_Init=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SHA256_Init" >&5
+printf "%s\n" "$ac_cv_search_SHA256_Init" >&6; }
+ac_res=$ac_cv_search_SHA256_Init
+if test "$ac_res" != no
+then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+ for ac_func in CC_SHA256_Init SHA256Init SHA256_Init
+do :
+ as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"
+then :
+ cat >>confdefs.h <<_ACEOF
+#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+ sha256_func_found=yes ; break
+fi
+
+done
+ fi
+ fi
+
+fi
+ if test "x$sha256_func_found" = xno; then
+ COND_INTERNAL_SHA256_TRUE=
+ COND_INTERNAL_SHA256_FALSE='#'
+else
+ COND_INTERNAL_SHA256_TRUE='#'
+ COND_INTERNAL_SHA256_FALSE=
+fi
+
+if test "x$enable_external_sha256$sha256_func_found" = xyesno; then
+ as_fn_error $? "--enable-external-sha256 was specified but no supported external SHA-256 implementation was found" "$LINENO" 5
+fi
+
+# Check for SSE2 intrinsics. There is no run-time detection for SSE2 so if
+# compiler options enable SSE2 then SSE2 support is required by the binaries.
+# The compile-time check for SSE2 is done with #ifdefs because some compilers
+# (ICC, MSVC) allow SSE2 intrinsics even when SSE2 isn't enabled.
+ac_fn_check_decl "$LINENO" "_mm_movemask_epi8" "ac_cv_have_decl__mm_movemask_epi8" "#ifdef HAVE_IMMINTRIN_H
+#include <immintrin.h>
+#endif
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl__mm_movemask_epi8" = xyes
+then :
+
+printf "%s\n" "#define HAVE__MM_MOVEMASK_EPI8 1" >>confdefs.h
+
+fi
+
+# For faster CRC on 32/64-bit x86 and E2K (see also crc64_fast.c):
+#
+# - Check for the CLMUL intrinsic _mm_clmulepi64_si128 in <immintrin.h>.
+# Check also for _mm_set_epi64x for consistency with CMake build
+# where it's needed to disable CLMUL with VS2013.
+#
+# - Check that __attribute__((__target__("ssse3,sse4.1,pclmul"))) works
+# together with _mm_clmulepi64_si128 from <immintrin.h>. The attribute
+# was added in GCC 4.4 but some GCC 4.x versions don't allow intrinsics
+# with it. Exception: it must be not be used with EDG-based compilers
+# like ICC and the compiler on E2K.
+#
+# If everything above is supported, runtime detection will be used to keep the
+# binaries working on systems that don't support the required extensions.
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if _mm_clmulepi64_si128 is usable" >&5
+printf %s "checking if _mm_clmulepi64_si128 is usable... " >&6; }
+if test "x$enable_clmul_crc" = xno
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, --disable-clmul-crc was used" >&5
+printf "%s\n" "no, --disable-clmul-crc was used" >&6; }
+
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <immintrin.h>
+
+// CLMUL works on older E2K instruction set but it is slow due to emulation.
+#if defined(__e2k__) && __iset__ < 6
+# error
+#endif
+
+// Intel's old compiler (ICC) can define __GNUC__ but the attribute must not
+// be used with it. The new Clang-based ICX needs the attribute.
+// Checking for !defined(__EDG__) catches ICC and other EDG-based compilers.
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__)
+__attribute__((__target__("ssse3,sse4.1,pclmul")))
+#endif
+__m128i my_clmul(__m128i a)
+{
+ const __m128i b = _mm_set_epi64x(1, 2);
+ return _mm_clmulepi64_si128(a, b, 0);
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+
+printf "%s\n" "#define HAVE_USABLE_CLMUL 1" >>confdefs.h
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+
+# Check for sandbox support. If one is found, set enable_sandbox=found.
+case $enable_sandbox in #(
+ auto | capsicum) :
+
+
+# On FreeBSD >= 11.x and Linux, Capsicum is uses <sys/capsicum.h>.
+# If this header is found, it is assumed to be the right one.
+capsicum_header_found=no
+ for ac_header in sys/capsicum.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_capsicum_h" = xyes
+then :
+ printf "%s\n" "#define HAVE_SYS_CAPSICUM_H 1" >>confdefs.h
+ capsicum_header_found=yes
+fi
+
+done
+if test "$capsicum_header_found" = no ; then
+ # On FreeBSD 10.x Capsicum uses <sys/capability.h>. Such a header exists
+ # on Linux too but it describes POSIX.1e capabilities. Look for the
+ # declaration of cap_rights_limit to check if <sys/capability.h> is
+ # a Capsicum header.
+ ac_fn_check_decl "$LINENO" "cap_rights_limit" "ac_cv_have_decl_cap_rights_limit" "#include <sys/capability.h>
+" "$ac_c_undeclared_builtin_options" "CFLAGS"
+if test "x$ac_cv_have_decl_cap_rights_limit" = xyes
+then :
+ capsicum_header_found=yes
+fi
+fi
+
+capsicum_lib_found=no
+CAPSICUM_LIB=
+if test "$capsicum_header_found" = yes ; then
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ # FreeBSD >= 10.x has Capsicum functions in libc.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char cap_rights_limit ();
+int
+main (void)
+{
+return cap_rights_limit ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ capsicum_lib_found=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ # Linux has Capsicum functions in libcaprights.
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_rights_limit in -lcaprights" >&5
+printf %s "checking for cap_rights_limit in -lcaprights... " >&6; }
+if test ${ac_cv_lib_caprights_cap_rights_limit+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcaprights $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char cap_rights_limit ();
+int
+main (void)
+{
+return cap_rights_limit ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ac_cv_lib_caprights_cap_rights_limit=yes
+else $as_nop
+ ac_cv_lib_caprights_cap_rights_limit=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_caprights_cap_rights_limit" >&5
+printf "%s\n" "$ac_cv_lib_caprights_cap_rights_limit" >&6; }
+if test "x$ac_cv_lib_caprights_cap_rights_limit" = xyes
+then :
+ CAPSICUM_LIB=-lcaprights
+ capsicum_lib_found=yes
+fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
+
+if test "$capsicum_lib_found" = yes ; then
+
+printf "%s\n" "#define HAVE_CAPSICUM 1" >>confdefs.h
+
+ enable_sandbox=found
+else
+ :
+fi
+
+ ;; #(
+ *) :
+ ;;
+esac
+case $enable_sandbox in #(
+ auto | pledge) :
+
+
+ for ac_func in pledge
+do :
+ ac_fn_c_check_func "$LINENO" "pledge" "ac_cv_func_pledge"
+if test "x$ac_cv_func_pledge" = xyes
+then :
+ printf "%s\n" "#define HAVE_PLEDGE 1" >>confdefs.h
+ enable_sandbox=found ; break
+fi
+
+done
+
+ ;; #(
+ *) :
+ ;;
+esac
+
+# If a specific sandboxing method was explicitly requested and it wasn't
+# found, give an error.
+case $enable_sandbox in
+ auto | no | found)
+ ;;
+ *)
+ as_fn_error $? "$enable_sandbox support not found" "$LINENO" 5
+ ;;
+esac
+
+
+###############################################################################
+# If using GCC, set some additional AM_CFLAGS:
+###############################################################################
+
+if test "$GCC" = yes ; then
+ echo
+ echo "GCC extensions:"
+fi
+
+# Always do the visibility check but don't set AM_CFLAGS on Windows.
+# This way things get set properly even on Windows.
+
+
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
+printf %s "checking whether the -Werror option is usable... " >&6; }
+if test ${gl_cv_cc_vis_werror+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_cc_vis_werror=yes
+else $as_nop
+ gl_cv_cc_vis_werror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
+printf "%s\n" "$gl_cv_cc_vis_werror" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
+printf %s "checking for simple visibility declarations... " >&6; }
+if test ${gl_cv_cc_visibility+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ if test $gl_cv_cc_vis_werror = yes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+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) {}
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ gl_cv_cc_visibility=yes
+else $as_nop
+ gl_cv_cc_visibility=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CFLAGS="$gl_save_CFLAGS"
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
+printf "%s\n" "$gl_cv_cc_visibility" >&6; }
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+
+
+
+printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h
+
+
+if test -n "$CFLAG_VISIBILITY" && test "$is_w32" = no; then
+ AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
+fi
+
+if test "$GCC" = yes
+then :
+
+ # Enable as much warnings as possible. These commented warnings won't
+ # work for this package though:
+ # * -Wunreachable-code breaks several assert(0) cases, which are
+ # backed up with "return LZMA_PROG_ERROR".
+ # * -Wcast-qual would break various things where we need a non-const
+ # pointer although we don't modify anything through it.
+ # * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations
+ # don't seem so useful here; at least the last one gives some
+ # warnings which are not bugs.
+ # * -Wconversion still shows too many warnings.
+ #
+ # The flags before the empty line are for GCC and many of them
+ # are supported by Clang too. The flags after the empty line are
+ # for Clang.
+ for NEW_FLAG in \
+ -Wall \
+ -Wextra \
+ -Wvla \
+ -Wc99-c11-compat \
+ -Wformat=2 \
+ -Winit-self \
+ -Wmissing-include-dirs \
+ -Wshift-overflow=2 \
+ -Wstrict-overflow=3 \
+ -Walloc-zero \
+ -Wduplicated-cond \
+ -Wfloat-equal \
+ -Wundef \
+ -Wshadow \
+ -Wpointer-arith \
+ -Wbad-function-cast \
+ -Wwrite-strings \
+ -Wdate-time \
+ -Wsign-conversion \
+ -Wfloat-conversion \
+ -Wlogical-op \
+ -Waggregate-return \
+ -Wstrict-prototypes \
+ -Wold-style-definition \
+ -Wmissing-prototypes \
+ -Wmissing-declarations \
+ -Wredundant-decls \
+ \
+ -Wc99-compat \
+ -Wc11-extensions \
+ -Wc2x-compat \
+ -Wc2x-extensions \
+ -Wpre-c2x-compat \
+ -Warray-bounds-pointer-arithmetic \
+ -Wassign-enum \
+ -Wconditional-uninitialized \
+ -Wdocumentation \
+ -Wduplicate-enum \
+ -Wempty-translation-unit \
+ -Wflexible-array-extensions \
+ -Wmissing-variable-declarations \
+ -Wnewline-eof \
+ -Wshift-sign-overflow \
+ -Wstring-conversion
+ do
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts $NEW_FLAG" >&5
+printf %s "checking if $CC accepts $NEW_FLAG... " >&6; }
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $NEW_FLAG -Werror"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+void foo(void); void foo(void) { }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+ AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ CFLAGS="$OLD_CFLAGS"
+ done
+
+ # Check whether --enable-werror was given.
+if test ${enable_werror+y}
+then :
+ enableval=$enable_werror;
+else $as_nop
+ enable_werror=no
+fi
+
+ if test "x$enable_werror" = "xyes"; then
+ AM_CFLAGS="$AM_CFLAGS -Werror"
+ fi
+
+fi
+
+
+###############################################################################
+# Create the makefiles and config.h
+###############################################################################
+
+echo
+
+# Don't build the lib directory at all if we don't need any replacement
+# functions.
+ if test -n "$LIBOBJS"; then
+ COND_GNULIB_TRUE=
+ COND_GNULIB_FALSE='#'
+else
+ COND_GNULIB_TRUE='#'
+ COND_GNULIB_FALSE=
+fi
+
+
+# Add default AM_CFLAGS.
+
+
+# This is needed for src/scripts.
+xz=`echo xz | sed "$program_transform_name"`
+
+
+ac_config_files="$ac_config_files Makefile po/Makefile.in lib/Makefile src/Makefile src/liblzma/Makefile src/liblzma/api/Makefile src/xz/Makefile src/xzdec/Makefile src/lzmainfo/Makefile src/scripts/Makefile tests/Makefile debug/Makefile"
+
+ac_config_files="$ac_config_files src/scripts/xzdiff"
+
+ac_config_files="$ac_config_files src/scripts/xzgrep"
+
+ac_config_files="$ac_config_files src/scripts/xzmore"
+
+ac_config_files="$ac_config_files src/scripts/xzless"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ if test "x$cache_file" != "x/dev/null"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${COND_W32_TRUE}" && test -z "${COND_W32_FALSE}"; then
+ as_fn_error $? "conditional \"COND_W32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_MAIN_ENCODER_TRUE}" && test -z "${COND_MAIN_ENCODER_FALSE}"; then
+ as_fn_error $? "conditional \"COND_MAIN_ENCODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_MAIN_DECODER_TRUE}" && test -z "${COND_MAIN_DECODER_FALSE}"; then
+ as_fn_error $? "conditional \"COND_MAIN_DECODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_LZMA1_TRUE}" && test -z "${COND_FILTER_LZMA1_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_LZMA1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_LZMA1_TRUE}" && test -z "${COND_ENCODER_LZMA1_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_LZMA1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_LZMA1_TRUE}" && test -z "${COND_DECODER_LZMA1_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_LZMA1\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_LZMA2_TRUE}" && test -z "${COND_FILTER_LZMA2_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_LZMA2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_LZMA2_TRUE}" && test -z "${COND_ENCODER_LZMA2_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_LZMA2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_LZMA2_TRUE}" && test -z "${COND_DECODER_LZMA2_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_LZMA2\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_DELTA_TRUE}" && test -z "${COND_FILTER_DELTA_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_DELTA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_DELTA_TRUE}" && test -z "${COND_ENCODER_DELTA_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_DELTA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_DELTA_TRUE}" && test -z "${COND_DECODER_DELTA_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_DELTA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_X86_TRUE}" && test -z "${COND_FILTER_X86_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_X86\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_X86_TRUE}" && test -z "${COND_ENCODER_X86_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_X86\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_X86_TRUE}" && test -z "${COND_DECODER_X86_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_X86\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_POWERPC_TRUE}" && test -z "${COND_FILTER_POWERPC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_POWERPC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_POWERPC_TRUE}" && test -z "${COND_ENCODER_POWERPC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_POWERPC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_POWERPC_TRUE}" && test -z "${COND_DECODER_POWERPC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_POWERPC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_IA64_TRUE}" && test -z "${COND_FILTER_IA64_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_IA64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_IA64_TRUE}" && test -z "${COND_ENCODER_IA64_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_IA64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_IA64_TRUE}" && test -z "${COND_DECODER_IA64_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_IA64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_ARM_TRUE}" && test -z "${COND_FILTER_ARM_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_ARM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_ARM_TRUE}" && test -z "${COND_ENCODER_ARM_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_ARM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_ARM_TRUE}" && test -z "${COND_DECODER_ARM_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_ARM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_ARMTHUMB_TRUE}" && test -z "${COND_FILTER_ARMTHUMB_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_ARMTHUMB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_ARMTHUMB_TRUE}" && test -z "${COND_ENCODER_ARMTHUMB_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_ARMTHUMB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_ARMTHUMB_TRUE}" && test -z "${COND_DECODER_ARMTHUMB_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_ARMTHUMB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_ARM64_TRUE}" && test -z "${COND_FILTER_ARM64_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_ARM64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_ARM64_TRUE}" && test -z "${COND_ENCODER_ARM64_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_ARM64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_ARM64_TRUE}" && test -z "${COND_DECODER_ARM64_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_ARM64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_SPARC_TRUE}" && test -z "${COND_FILTER_SPARC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_SPARC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_SPARC_TRUE}" && test -z "${COND_ENCODER_SPARC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_SPARC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_SPARC_TRUE}" && test -z "${COND_DECODER_SPARC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_SPARC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_SIMPLE_TRUE}" && test -z "${COND_FILTER_SIMPLE_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_SIMPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_SIMPLE_TRUE}" && test -z "${COND_ENCODER_SIMPLE_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_SIMPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_SIMPLE_TRUE}" && test -z "${COND_DECODER_SIMPLE_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_SIMPLE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_FILTER_LZ_TRUE}" && test -z "${COND_FILTER_LZ_FALSE}"; then
+ as_fn_error $? "conditional \"COND_FILTER_LZ\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ENCODER_LZ_TRUE}" && test -z "${COND_ENCODER_LZ_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ENCODER_LZ\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DECODER_LZ_TRUE}" && test -z "${COND_DECODER_LZ_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DECODER_LZ\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_CHECK_CRC32_TRUE}" && test -z "${COND_CHECK_CRC32_FALSE}"; then
+ as_fn_error $? "conditional \"COND_CHECK_CRC32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_CHECK_CRC64_TRUE}" && test -z "${COND_CHECK_CRC64_FALSE}"; then
+ as_fn_error $? "conditional \"COND_CHECK_CRC64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_CHECK_SHA256_TRUE}" && test -z "${COND_CHECK_SHA256_FALSE}"; then
+ as_fn_error $? "conditional \"COND_CHECK_SHA256\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_MICROLZMA_TRUE}" && test -z "${COND_MICROLZMA_FALSE}"; then
+ as_fn_error $? "conditional \"COND_MICROLZMA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_LZIP_DECODER_TRUE}" && test -z "${COND_LZIP_DECODER_FALSE}"; then
+ as_fn_error $? "conditional \"COND_LZIP_DECODER\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_ASM_X86_TRUE}" && test -z "${COND_ASM_X86_FALSE}"; then
+ as_fn_error $? "conditional \"COND_ASM_X86\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_SMALL_TRUE}" && test -z "${COND_SMALL_FALSE}"; then
+ as_fn_error $? "conditional \"COND_SMALL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_XZ_TRUE}" && test -z "${COND_XZ_FALSE}"; then
+ as_fn_error $? "conditional \"COND_XZ\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_XZDEC_TRUE}" && test -z "${COND_XZDEC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_XZDEC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_LZMADEC_TRUE}" && test -z "${COND_LZMADEC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_LZMADEC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_LZMAINFO_TRUE}" && test -z "${COND_LZMAINFO_FALSE}"; then
+ as_fn_error $? "conditional \"COND_LZMAINFO\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_LZMALINKS_TRUE}" && test -z "${COND_LZMALINKS_FALSE}"; then
+ as_fn_error $? "conditional \"COND_LZMALINKS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_SCRIPTS_TRUE}" && test -z "${COND_SCRIPTS_FALSE}"; then
+ as_fn_error $? "conditional \"COND_SCRIPTS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_DOC_TRUE}" && test -z "${COND_DOC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_DOC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+printf %s "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
+printf "%s\n" "done" >&6; }
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_THREADS_TRUE}" && test -z "${COND_THREADS_FALSE}"; then
+ as_fn_error $? "conditional \"COND_THREADS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_SHARED_TRUE}" && test -z "${COND_SHARED_FALSE}"; then
+ as_fn_error $? "conditional \"COND_SHARED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_SYMVERS_LINUX_TRUE}" && test -z "${COND_SYMVERS_LINUX_FALSE}"; then
+ as_fn_error $? "conditional \"COND_SYMVERS_LINUX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_SYMVERS_GENERIC_TRUE}" && test -z "${COND_SYMVERS_GENERIC_FALSE}"; then
+ as_fn_error $? "conditional \"COND_SYMVERS_GENERIC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+if test -z "${COND_INTERNAL_SHA256_TRUE}" && test -z "${COND_INTERNAL_SHA256_FALSE}"; then
+ as_fn_error $? "conditional \"COND_INTERNAL_SHA256\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COND_GNULIB_TRUE}" && test -z "${COND_GNULIB_FALSE}"; then
+ as_fn_error $? "conditional \"COND_GNULIB\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+as_nop=:
+if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else $as_nop
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+
+# Reset variables that may have inherited troublesome values from
+# the environment.
+
+# IFS needs to be set, to space, tab, and newline, in precisely that order.
+# (If _AS_PATH_WALK were called with IFS unset, it would have the
+# side effect of setting IFS to empty, thus disabling word splitting.)
+# Quoting is to prevent editors from complaining about space-tab.
+as_nl='
+'
+export as_nl
+IFS=" "" $as_nl"
+
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# Ensure predictable behavior from utilities with locale-dependent output.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# We cannot yet rely on "unset" to work, but we need these variables
+# to be unset--not just set to an empty or harmless value--now, to
+# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
+# also avoids known problems related to "unset" and subshell syntax
+# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
+for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
+do eval test \${$as_var+y} \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+
+# Ensure that fds 0, 1, and 2 are open.
+if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
+if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
+if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
+
+# The user is always right.
+if ${PATH_SEPARATOR+false} :; then
+ 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 who we are. Look in the path if we contain no directory separator.
+as_myself=
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ test -r "$as_dir$0" && as_myself=$as_dir$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ printf "%s\n" "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
+then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else $as_nop
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
+then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else $as_nop
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+# Determine whether it's possible to make 'echo' print without a newline.
+# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
+# for compatibility with existing Makefiles.
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+# For backward compatibility with old third-party macros, we provide
+# the shell variables $as_echo and $as_echo_n. New code should use
+# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
+as_echo='printf %s\n'
+as_echo_n='printf %s'
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -pR'
+ fi
+else
+ as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by XZ Utils $as_me 5.4.5, which was
+generated by GNU Autoconf 2.71. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <xz@tukaani.org>.
+XZ Utils home page: <https://tukaani.org/xz/>."
+
+_ACEOF
+ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
+ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config='$ac_cs_config_escaped'
+ac_cs_version="\\
+XZ Utils config.status 5.4.5
+configured by $0, generated by GNU Autoconf 2.71,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2021 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ printf "%s\n" "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ printf "%s\n" "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ printf "%s\n" "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ printf "%s\n" "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
+
+
+# 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'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+LD_RC='`$ECHO "$LD_RC" | $SED "$delay_single_quote_subst"`'
+reload_flag_RC='`$ECHO "$reload_flag_RC" | $SED "$delay_single_quote_subst"`'
+reload_cmds_RC='`$ECHO "$reload_cmds_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_RC='`$ECHO "$old_archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
+compiler_RC='`$ECHO "$compiler_RC" | $SED "$delay_single_quote_subst"`'
+GCC_RC='`$ECHO "$GCC_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_RC='`$ECHO "$lt_prog_compiler_no_builtin_flag_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_RC='`$ECHO "$lt_prog_compiler_pic_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_RC='`$ECHO "$lt_prog_compiler_wl_RC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_RC='`$ECHO "$lt_prog_compiler_static_RC" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_RC='`$ECHO "$lt_cv_prog_compiler_c_o_RC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_RC='`$ECHO "$archive_cmds_need_lc_RC" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_RC='`$ECHO "$enable_shared_with_static_runtimes_RC" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_RC='`$ECHO "$export_dynamic_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_RC='`$ECHO "$whole_archive_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_RC='`$ECHO "$compiler_needs_object_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_RC='`$ECHO "$old_archive_from_new_cmds_RC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_RC='`$ECHO "$old_archive_from_expsyms_cmds_RC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_RC='`$ECHO "$archive_cmds_RC" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_RC='`$ECHO "$archive_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
+module_cmds_RC='`$ECHO "$module_cmds_RC" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_RC='`$ECHO "$module_expsym_cmds_RC" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_RC='`$ECHO "$with_gnu_ld_RC" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_RC='`$ECHO "$allow_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_RC='`$ECHO "$no_undefined_flag_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_RC='`$ECHO "$hardcode_libdir_flag_spec_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_RC='`$ECHO "$hardcode_libdir_separator_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_RC='`$ECHO "$hardcode_direct_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_RC='`$ECHO "$hardcode_direct_absolute_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_RC='`$ECHO "$hardcode_minus_L_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_RC='`$ECHO "$hardcode_shlibpath_var_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_RC='`$ECHO "$hardcode_automatic_RC" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_RC='`$ECHO "$inherit_rpath_RC" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_RC='`$ECHO "$link_all_deplibs_RC" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_RC='`$ECHO "$always_export_symbols_RC" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_RC='`$ECHO "$export_symbols_cmds_RC" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_RC='`$ECHO "$exclude_expsyms_RC" | $SED "$delay_single_quote_subst"`'
+include_expsyms_RC='`$ECHO "$include_expsyms_RC" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_RC='`$ECHO "$prelink_cmds_RC" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_RC='`$ECHO "$postlink_cmds_RC" | $SED "$delay_single_quote_subst"`'
+file_list_spec_RC='`$ECHO "$file_list_spec_RC" | $SED "$delay_single_quote_subst"`'
+hardcode_action_RC='`$ECHO "$hardcode_action_RC" | $SED "$delay_single_quote_subst"`'
+
+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 AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+FILECMD \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib \
+LD_RC \
+reload_flag_RC \
+compiler_RC \
+lt_prog_compiler_no_builtin_flag_RC \
+lt_prog_compiler_pic_RC \
+lt_prog_compiler_wl_RC \
+lt_prog_compiler_static_RC \
+lt_cv_prog_compiler_c_o_RC \
+export_dynamic_flag_spec_RC \
+whole_archive_flag_spec_RC \
+compiler_needs_object_RC \
+with_gnu_ld_RC \
+allow_undefined_flag_RC \
+no_undefined_flag_RC \
+hardcode_libdir_flag_spec_RC \
+hardcode_libdir_separator_RC \
+exclude_expsyms_RC \
+include_expsyms_RC \
+file_list_spec_RC; 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 reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postlink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path \
+reload_cmds_RC \
+old_archive_cmds_RC \
+old_archive_from_new_cmds_RC \
+old_archive_from_expsyms_cmds_RC \
+archive_cmds_RC \
+archive_expsym_cmds_RC \
+module_cmds_RC \
+module_expsym_cmds_RC \
+export_symbols_cmds_RC \
+prelink_cmds_RC \
+postlink_cmds_RC; 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
+
+ac_aux_dir='$ac_aux_dir'
+
+# 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
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+
+# 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%}"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/liblzma/Makefile") CONFIG_FILES="$CONFIG_FILES src/liblzma/Makefile" ;;
+ "src/liblzma/api/Makefile") CONFIG_FILES="$CONFIG_FILES src/liblzma/api/Makefile" ;;
+ "src/xz/Makefile") CONFIG_FILES="$CONFIG_FILES src/xz/Makefile" ;;
+ "src/xzdec/Makefile") CONFIG_FILES="$CONFIG_FILES src/xzdec/Makefile" ;;
+ "src/lzmainfo/Makefile") CONFIG_FILES="$CONFIG_FILES src/lzmainfo/Makefile" ;;
+ "src/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES src/scripts/Makefile" ;;
+ "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "debug/Makefile") CONFIG_FILES="$CONFIG_FILES debug/Makefile" ;;
+ "src/scripts/xzdiff") CONFIG_FILES="$CONFIG_FILES src/scripts/xzdiff" ;;
+ "src/scripts/xzgrep") CONFIG_FILES="$CONFIG_FILES src/scripts/xzgrep" ;;
+ "src/scripts/xzmore") CONFIG_FILES="$CONFIG_FILES src/scripts/xzmore" ;;
+ "src/scripts/xzless") CONFIG_FILES="$CONFIG_FILES src/scripts/xzless" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
+ test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
+ test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp= ac_tmp=
+ trap 'exit_status=$?
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$ac_tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ esac
+ case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+printf "%s\n" "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`printf "%s\n" "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$ac_tmp/stdin"
+ case $ac_file in
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$ac_tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ printf "%s\n" "/* $configure_input */" >&1 \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ # TODO: see whether this extra hack can be removed once we start
+ # requiring Autoconf 2.70 or later.
+ case $CONFIG_FILES in #(
+ *\'*) :
+ eval set x "$CONFIG_FILES" ;; #(
+ *) :
+ set x $CONFIG_FILES ;; #(
+ *) :
+ ;;
+esac
+ shift
+ # Used to flag and report bootstrapping failures.
+ am_rc=0
+ for am_mf
+ do
+ # Strip MF so we end up with the name of the file.
+ am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile which includes
+ # dependency-tracking related rules and includes.
+ # Grep'ing the whole file directly is not great: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+ || continue
+ am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$am_mf" : 'X\(//\)[^/]' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X"$am_mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$am_mf" : 'X\(//\)$' \| \
+ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+printf "%s\n" X/"$am_mf" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { echo "$as_me:$LINENO: cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles" >&5
+ (cd "$am_dirpart" \
+ && sed -e '/# am--include-marker/d' "$am_filepart" \
+ | $MAKE -f - am--depfiles) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } || am_rc=$?
+ done
+ if test $am_rc -ne 0; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
+ '--disable-dependency-tracking' option to at least be able to build
+ the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+ fi
+ { am_dirpart=; unset am_dirpart;}
+ { am_filepart=; unset am_filepart;}
+ { am_mf=; unset am_mf;}
+ { am_rc=; unset am_rc;}
+ rm -f conftest-deps.mk
+}
+ ;;
+ "libtool":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
+
+# Copyright (C) 2014 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 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 <http://www.gnu.org/licenses/>.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags='RC '
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# A file(cmd) program that detects file types.
+FILECMD=$lt_FILECMD
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive (by configure).
+lt_ar_flags=$lt_ar_flags
+
+# Flags to create an archive.
+AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# 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
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# 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.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# 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$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; 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-%%"`
+}
+
+
+# ### 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
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+
+ # 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"
+
+# ### BEGIN LIBTOOL TAG CONFIG: RC
+
+# The linker used to build libraries.
+LD=$lt_LD_RC
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_RC
+reload_cmds=$lt_reload_cmds_RC
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_RC
+
+# A language specific compiler.
+CC=$lt_compiler_RC
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_RC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_RC
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_RC
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_RC
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_RC
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_RC
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_RC
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_RC
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_RC
+
+# 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.
+hardcode_direct_absolute=$hardcode_direct_absolute_RC
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_RC
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_RC
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_RC
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_RC
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_RC
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_RC
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_RC
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_RC
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_RC
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_RC
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_RC
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_RC
+
+# ### END LIBTOOL TAG CONFIG: RC
+_LT_EOF
+
+ ;;
+ "po-directories":C)
+ 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 ;;
+ "src/scripts/xzdiff":F) chmod +x src/scripts/xzdiff ;;
+ "src/scripts/xzgrep":F) chmod +x src/scripts/xzgrep ;;
+ "src/scripts/xzmore":F) chmod +x src/scripts/xzmore ;;
+ "src/scripts/xzless":F) chmod +x src/scripts/xzless ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+# Some warnings
+if test x$tuklib_cv_physmem_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the amount of RAM."
+ echo "Consider using --enable-assume-ram (if you didn't already)"
+ echo "or make a patch to add support for this operating system."
+fi
+
+if test x$tuklib_cv_cpucores_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the number of CPU cores."
+fi
+
+if test "x$enable_threads$enable_small$have_func_attribute_constructor" \
+ = xnoyesno; then
+ echo
+ echo "NOTE:"
+ echo "liblzma will be thread-unsafe due to the combination"
+ echo "of --disable-threads --enable-small when using a compiler"
+ echo "that doesn't support __attribute__((__constructor__))."
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..1d1c811
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,1191 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+# NOTE: Don't add useless checks. autoscan detects this and that, but don't
+# let it confuse you. For example, we don't care about checking for behavior
+# of malloc(), stat(), or lstat(), since we don't use those functions in
+# a way that would cause the problems the autoconf macros check.
+
+AC_PREREQ([2.69])
+
+AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]),
+ [xz@tukaani.org], [xz], [https://tukaani.org/xz/])
+AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADERS([config.h])
+
+echo
+echo "$PACKAGE_STRING"
+
+echo
+echo "System type:"
+# This is needed to know if assembler optimizations can be used.
+AC_CANONICAL_HOST
+
+# We do some special things on Windows (32-bit or 64-bit) builds.
+case $host_os in
+ mingw* | cygwin | msys) is_w32=yes ;;
+ *) is_w32=no ;;
+esac
+AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
+
+# We need to use $EXEEXT with $(LN_S) when creating symlinks to
+# executables. Cygwin is an exception to this, since it is recommended
+# that symlinks don't have the .exe suffix. To make this work, we
+# define LN_EXEEXT.
+#
+# MSYS2 is treated the same way as Cygwin. It uses plain "msys" like
+# the original MSYS when building MSYS/MSYS2-binaries. Hopefully this
+# doesn't break things for the original MSYS developers. Note that this
+# doesn't affect normal MSYS/MSYS2 users building non-MSYS/MSYS2 binaries
+# since in that case the $host_os is usually mingw32.
+case $host_os in
+ cygwin | msys) LN_EXEEXT= ;;
+ *) LN_EXEEXT='$(EXEEXT)' ;;
+esac
+AC_SUBST([LN_EXEEXT])
+
+echo
+echo "Configure options:"
+AM_CFLAGS=
+
+
+#############
+# Debugging #
+#############
+
+AC_MSG_CHECKING([if debugging code should be compiled])
+AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging code.]),
+ [], enable_debug=no)
+if test "x$enable_debug" = xyes; then
+ AC_MSG_RESULT([yes])
+else
+ AC_DEFINE([NDEBUG], [1], [Define to 1 to disable debugging code.])
+ AC_MSG_RESULT([no])
+fi
+
+
+###########
+# Filters #
+###########
+
+m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,arm64,sparc])dnl
+m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,arm64,sparc])
+m4_define([LZ_FILTERS], [lzma1,lzma2])
+
+m4_foreach([NAME], [SUPPORTED_FILTERS],
+[enable_filter_[]NAME=no
+enable_encoder_[]NAME=no
+enable_decoder_[]NAME=no
+])dnl
+
+AC_MSG_CHECKING([which encoders to build])
+AC_ARG_ENABLE([encoders], AS_HELP_STRING([--enable-encoders=LIST],
+ [Comma-separated list of encoders to build. Default=all.
+ Available encoders:]
+ m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])),
+ [], [enable_encoders=SUPPORTED_FILTERS])
+enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
+if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
+ enable_encoders=no
+ AC_MSG_RESULT([(none)])
+else
+ for arg in $enable_encoders
+ do
+ case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
+ NAME)
+ enable_filter_[]NAME=yes
+ enable_encoder_[]NAME=yes
+ AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1],
+ [Define to 1 if] NAME [encoder is enabled.])
+ ;;])
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([unknown filter: $arg])
+ ;;
+ esac
+ done
+ AC_DEFINE([HAVE_ENCODERS], [1],
+ [Define to 1 if any of HAVE_ENCODER_foo have been defined.])
+ AC_MSG_RESULT([$enable_encoders])
+fi
+
+AC_MSG_CHECKING([which decoders to build])
+AC_ARG_ENABLE([decoders], AS_HELP_STRING([--enable-decoders=LIST],
+ [Comma-separated list of decoders to build. Default=all.
+ Available decoders are the same as available encoders.]),
+ [], [enable_decoders=SUPPORTED_FILTERS])
+enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
+if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
+ enable_decoders=no
+ AC_MSG_RESULT([(none)])
+else
+ for arg in $enable_decoders
+ do
+ case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
+ NAME)
+ enable_filter_[]NAME=yes
+ enable_decoder_[]NAME=yes
+ AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1],
+ [Define to 1 if] NAME [decoder is enabled.])
+ ;;])
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([unknown filter: $arg])
+ ;;
+ esac
+ done
+ AC_DEFINE([HAVE_DECODERS], [1],
+ [Define to 1 if any of HAVE_DECODER_foo have been defined.])
+ AC_MSG_RESULT([$enable_decoders])
+fi
+
+if test "x$enable_encoder_lzma2$enable_encoder_lzma1" = xyesno \
+ || test "x$enable_decoder_lzma2$enable_decoder_lzma1" = xyesno; then
+ AC_MSG_ERROR([LZMA2 requires that LZMA1 is also enabled.])
+fi
+
+AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoders" != xno)
+AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoders" != xno)
+
+m4_foreach([NAME], [SUPPORTED_FILTERS],
+[AM_CONDITIONAL(COND_FILTER_[]m4_toupper(NAME), test "x$enable_filter_[]NAME" = xyes)
+AM_CONDITIONAL(COND_ENCODER_[]m4_toupper(NAME), test "x$enable_encoder_[]NAME" = xyes)
+AM_CONDITIONAL(COND_DECODER_[]m4_toupper(NAME), test "x$enable_decoder_[]NAME" = xyes)
+])dnl
+
+# The so called "simple filters" share common code.
+enable_filter_simple=no
+enable_encoder_simple=no
+enable_decoder_simple=no
+m4_foreach([NAME], [SIMPLE_FILTERS],
+[test "x$enable_filter_[]NAME" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_[]NAME" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_[]NAME" = xyes && enable_decoder_simple=yes
+])dnl
+AM_CONDITIONAL(COND_FILTER_SIMPLE, test "x$enable_filter_simple" = xyes)
+AM_CONDITIONAL(COND_ENCODER_SIMPLE, test "x$enable_encoder_simple" = xyes)
+AM_CONDITIONAL(COND_DECODER_SIMPLE, test "x$enable_decoder_simple" = xyes)
+
+# LZ-based filters share common code.
+enable_filter_lz=no
+enable_encoder_lz=no
+enable_decoder_lz=no
+m4_foreach([NAME], [LZ_FILTERS],
+[test "x$enable_filter_[]NAME" = xyes && enable_filter_lz=yes
+test "x$enable_encoder_[]NAME" = xyes && enable_encoder_lz=yes
+test "x$enable_decoder_[]NAME" = xyes && enable_decoder_lz=yes
+])dnl
+AM_CONDITIONAL(COND_FILTER_LZ, test "x$enable_filter_lz" = xyes)
+AM_CONDITIONAL(COND_ENCODER_LZ, test "x$enable_encoder_lz" = xyes)
+AM_CONDITIONAL(COND_DECODER_LZ, test "x$enable_decoder_lz" = xyes)
+
+
+#################
+# Match finders #
+#################
+
+m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4])
+
+m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS],
+[enable_match_finder_[]NAME=no
+])
+
+AC_MSG_CHECKING([which match finders to build])
+AC_ARG_ENABLE([match-finders], AS_HELP_STRING([--enable-match-finders=LIST],
+ [Comma-separated list of match finders to build. Default=all.
+ At least one match finder is required for encoding with
+ the LZMA1 and LZMA2 filters. Available match finders:]
+ m4_translit(m4_defn([SUPPORTED_MATCH_FINDERS]), [,], [ ])), [],
+ [enable_match_finders=SUPPORTED_MATCH_FINDERS])
+enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'`
+if test "x$enable_encoder_lz" = xyes ; then
+ if test -z "$enable_match_finders"; then
+ AC_MSG_ERROR([At least one match finder is required for an LZ-based encoder.])
+ fi
+
+ for arg in $enable_match_finders
+ do
+ case $arg in m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [
+ NAME)
+ enable_match_finder_[]NAME=yes
+ AC_DEFINE(HAVE_MF_[]m4_toupper(NAME), [1],
+ [Define to 1 to enable] NAME [match finder.])
+ ;;])
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([unknown match finder: $arg])
+ ;;
+ esac
+ done
+ AC_MSG_RESULT([$enable_match_finders])
+else
+ AC_MSG_RESULT([(none because not building any LZ-based encoder)])
+fi
+
+
+####################
+# Integrity checks #
+####################
+
+m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256])
+
+m4_foreach([NAME], [SUPPORTED_CHECKS],
+[enable_check_[]NAME=no
+])dnl
+
+AC_MSG_CHECKING([which integrity checks to build])
+AC_ARG_ENABLE([checks], AS_HELP_STRING([--enable-checks=LIST],
+ [Comma-separated list of integrity checks to build.
+ Default=all. Available integrity checks:]
+ m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])),
+ [], [enable_checks=SUPPORTED_CHECKS])
+enable_checks=`echo "$enable_checks" | sed 's/,/ /g'`
+if test "x$enable_checks" = xno || test "x$enable_checks" = x; then
+ AC_MSG_RESULT([(none)])
+else
+ for arg in $enable_checks
+ do
+ case $arg in m4_foreach([NAME], [SUPPORTED_CHECKS], [
+ NAME)
+ enable_check_[]NAME=yes
+ AC_DEFINE(HAVE_CHECK_[]m4_toupper(NAME), [1],
+ [Define to 1 if] NAME
+ [integrity check is enabled.])
+ ;;])
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([unknown integrity check: $arg])
+ ;;
+ esac
+ done
+ AC_MSG_RESULT([$enable_checks])
+fi
+if test "x$enable_check_crc32" = xno ; then
+ AC_MSG_ERROR([For now, the CRC32 check must always be enabled.])
+fi
+
+m4_foreach([NAME], [SUPPORTED_CHECKS],
+[AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes)
+])dnl
+
+AC_MSG_CHECKING([if external SHA-256 should be used])
+AC_ARG_ENABLE([external-sha256], AS_HELP_STRING([--enable-external-sha256],
+ [Use SHA-256 code from the operating system.
+ See INSTALL for possible subtle problems.]),
+ [], [enable_external_sha256=no])
+if test "x$enable_check_sha256" != "xyes"; then
+ enable_external_sha256=no
+fi
+if test "x$enable_external_sha256" = xyes; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+
+
+#############
+# MicroLZMA #
+#############
+
+AC_MSG_CHECKING([if MicroLZMA support should be built])
+AC_ARG_ENABLE([microlzma], AS_HELP_STRING([--disable-microlzma],
+ [Do not build MicroLZMA encoder and decoder.
+ It is needed by specific applications only,
+ for example, erofs-utils.]),
+ [], [enable_microlzma=yes])
+case $enable_microlzma in
+ yes | no)
+ AC_MSG_RESULT([$enable_microlzma])
+ ;;
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-microlzma accepts only `yes' or `no'.])
+ ;;
+esac
+AM_CONDITIONAL(COND_MICROLZMA, test "x$enable_microlzma" = xyes)
+
+
+#############################
+# .lz (lzip) format support #
+#############################
+
+AC_MSG_CHECKING([if .lz (lzip) decompression support should be built])
+AC_ARG_ENABLE([lzip-decoder], AS_HELP_STRING([--disable-lzip-decoder],
+ [Disable decompression support for .lz (lzip) files.]),
+ [], [enable_lzip_decoder=yes])
+if test "x$enable_decoder_lzma1" != xyes; then
+ enable_lzip_decoder=no
+ AC_MSG_RESULT([no because LZMA1 decoder is disabled])
+elif test "x$enable_lzip_decoder" = xyes; then
+ AC_DEFINE([HAVE_LZIP_DECODER], [1],
+ [Define to 1 if .lz (lzip) decompression support is enabled.])
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+AM_CONDITIONAL(COND_LZIP_DECODER, test "x$enable_lzip_decoder" = xyes)
+
+
+###########################
+# Assembler optimizations #
+###########################
+
+AC_MSG_CHECKING([if assembler optimizations should be used])
+AC_ARG_ENABLE([assembler], AS_HELP_STRING([--disable-assembler],
+ [Do not use assembler optimizations even if such exist
+ for the architecture.]),
+ [], [enable_assembler=yes])
+if test "x$enable_assembler" = xyes; then
+ enable_assembler=no
+ case $host_os in
+ # Darwin should work too but only if not creating universal
+ # binaries. Solaris x86 could work too but I cannot test.
+ linux* | *bsd* | mingw* | cygwin | msys | *djgpp*)
+ case $host_cpu in
+ i?86) enable_assembler=x86 ;;
+ esac
+ ;;
+ esac
+fi
+case $enable_assembler in
+ x86 | no)
+ AC_MSG_RESULT([$enable_assembler])
+ ;;
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-assembler accepts only `yes', `no', or `x86' (32-bit).])
+ ;;
+esac
+AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
+
+
+#############
+# CLMUL CRC #
+#############
+
+AC_ARG_ENABLE([clmul-crc], AS_HELP_STRING([--disable-clmul-crc],
+ [Do not use carryless multiplication for CRC calculation
+ even if support for it is detected.]),
+ [], [enable_clmul_crc=yes])
+
+
+#####################
+# Size optimization #
+#####################
+
+AC_MSG_CHECKING([if small size is preferred over speed])
+AC_ARG_ENABLE([small], AS_HELP_STRING([--enable-small],
+ [Make liblzma smaller and a little slower.
+ This is disabled by default to optimize for speed.]),
+ [], [enable_small=no])
+if test "x$enable_small" = xyes; then
+ AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.])
+elif test "x$enable_small" != xno; then
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-small accepts only `yes' or `no'])
+fi
+AC_MSG_RESULT([$enable_small])
+AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
+
+
+#############
+# Threading #
+#############
+
+AC_MSG_CHECKING([if threading support is wanted])
+AC_ARG_ENABLE([threads], AS_HELP_STRING([--enable-threads=METHOD],
+ [Supported METHODS are `yes', `no', `posix', `win95', and
+ `vista'. The default is `yes'. Using `no' together with
+ --enable-small makes liblzma thread unsafe.]),
+ [], [enable_threads=yes])
+
+if test "x$enable_threads" = xyes; then
+ case $host_os in
+ mingw*)
+ case $host_cpu in
+ i?86) enable_threads=win95 ;;
+ *) enable_threads=vista ;;
+ esac
+ ;;
+ *)
+ enable_threads=posix
+ ;;
+ esac
+fi
+
+case $enable_threads in
+ posix | win95 | vista)
+ AC_MSG_RESULT([yes, $enable_threads])
+ ;;
+ no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-threads only accepts `yes', `no', `posix', `win95', or `vista'])
+ ;;
+esac
+
+# We use the actual result a little later.
+
+
+#########################
+# Assumed amount of RAM #
+#########################
+
+# We use 128 MiB as default, because it will allow decompressing files
+# created with "xz -9". It would be slightly safer to guess a lower value,
+# but most systems, on which we don't have any way to determine the amount
+# of RAM, will probably have at least 128 MiB of RAM.
+AC_MSG_CHECKING([how much RAM to assume if the real amount is unknown])
+AC_ARG_ENABLE([assume-ram], AS_HELP_STRING([--enable-assume-ram=SIZE],
+ [If and only if the real amount of RAM cannot be determined,
+ assume SIZE MiB. The default is 128 MiB. This affects the
+ default memory usage limit.]),
+ [], [enable_assume_ram=128])
+assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789`
+if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument])
+fi
+AC_MSG_RESULT([$enable_assume_ram MiB])
+AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram],
+ [How many MiB of RAM to assume if the real amount cannot
+ be determined.])
+
+
+#########################
+# Components to install #
+#########################
+
+AC_ARG_ENABLE([xz], [AS_HELP_STRING([--disable-xz],
+ [do not build the xz tool])],
+ [], [enable_xz=yes])
+AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno])
+
+AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec],
+ [do not build xzdec])],
+ [], [enable_xzdec=yes])
+test "x$enable_decoders" = xno && enable_xzdec=no
+AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno])
+
+AC_ARG_ENABLE([lzmadec], [AS_HELP_STRING([--disable-lzmadec],
+ [do not build lzmadec
+ (it exists primarily for LZMA Utils compatibility)])],
+ [], [enable_lzmadec=yes])
+test "x$enable_decoder_lzma1" = xno && enable_lzmadec=no
+AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno])
+
+AC_ARG_ENABLE([lzmainfo], [AS_HELP_STRING([--disable-lzmainfo],
+ [do not build lzmainfo
+ (it exists primarily for LZMA Utils compatibility)])],
+ [], [enable_lzmainfo=yes])
+test "x$enable_decoder_lzma1" = xno && enable_lzmainfo=no
+AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
+
+AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links],
+ [do not create symlinks for LZMA Utils compatibility])],
+ [], [enable_lzma_links=yes])
+AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno])
+
+AC_ARG_ENABLE([scripts], [AS_HELP_STRING([--disable-scripts],
+ [do not install the scripts xzdiff, xzgrep, xzless, xzmore,
+ and their symlinks])],
+ [], [enable_scripts=yes])
+AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno])
+
+AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc],
+ [do not install documentation files to docdir
+ (man pages will still be installed)])],
+ [], [enable_doc=yes])
+AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno])
+
+
+##############
+# Sandboxing #
+##############
+
+AC_MSG_CHECKING([if sandboxing should be used])
+AC_ARG_ENABLE([sandbox], [AS_HELP_STRING([--enable-sandbox=METHOD],
+ [Sandboxing METHOD can be
+ `auto', `no', `capsicum', or `pledge'.
+ The default is `auto' which enables sandboxing if
+ a supported sandboxing method is found.])],
+ [], [enable_sandbox=auto])
+case $enable_sandbox in
+ auto)
+ AC_MSG_RESULT([maybe (autodetect)])
+ ;;
+ no | capsicum | pledge)
+ AC_MSG_RESULT([$enable_sandbox])
+ ;;
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-sandbox only accepts `auto', `no', `capsicum', or `pledge'.])
+ ;;
+esac
+
+
+###########################
+# PATH prefix for scripts #
+###########################
+
+# The scripts can add a prefix to the search PATH so that POSIX tools
+# or the xz binary is always in the PATH.
+AC_ARG_ENABLE([path-for-scripts],
+ [AS_HELP_STRING([--enable-path-for-scripts=PREFIX],
+ [If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in
+ the beginning of the scripts (xzgrep and others).
+ The default is empty except on Solaris the default is
+ /usr/xpg4/bin.])],
+ [], [
+ case $host_os in
+ solaris*) enable_path_for_scripts=/usr/xpg4/bin ;;
+ *) enable_path_for_scripts= ;;
+ esac
+ ])
+if test -n "$enable_path_for_scripts" && test "x$enable_path_for_scripts" != xno ; then
+ enable_path_for_scripts="PATH=$enable_path_for_scripts:\$PATH"
+else
+ enable_path_for_scripts=
+fi
+AC_SUBST([enable_path_for_scripts])
+
+
+###############################################################################
+# Checks for programs.
+###############################################################################
+
+echo
+case $host_os in
+ solaris*)
+ # The gnulib POSIX shell macro below may pick a shell that
+ # doesn't work with xzgrep. Workaround by picking a shell
+ # that is known to work.
+ if test -z "$gl_cv_posix_shell" && test -x /usr/xpg4/bin/sh; then
+ gl_cv_posix_shell=/usr/xpg4/bin/sh
+ fi
+ ;;
+esac
+gl_POSIX_SHELL
+if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then
+ AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
+fi
+
+echo
+echo "Initializing Automake:"
+
+# We don't use "subdir-objects" yet because it breaks "make distclean" when
+# dependencies are enabled (as of Automake 1.14.1) due to this bug:
+# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
+# The -Wno-unsupported is used to silence warnings about missing
+# "subdir-objects".
+AM_INIT_AUTOMAKE([1.12 foreign tar-v7 filename-length-max=99 -Wno-unsupported])
+AC_PROG_LN_S
+
+dnl # Autoconf >= 2.70 warns that AC_PROG_CC_C99 is obsolete. However,
+dnl # we have to keep using AC_PROG_CC_C99 instead of AC_PROG_CC
+dnl # as long as we try to be compatible with Autoconf 2.69.
+AC_PROG_CC_C99
+if test x$ac_cv_prog_cc_c99 = xno ; then
+ AC_MSG_ERROR([No C99 compiler was found.])
+fi
+
+AM_PROG_CC_C_O
+AM_PROG_AS
+AC_USE_SYSTEM_EXTENSIONS
+
+AS_CASE([$enable_threads],
+ [posix], [
+ echo
+ echo "POSIX threading support:"
+ AX_PTHREAD([:]) dnl We don't need the HAVE_PTHREAD macro.
+ LIBS="$LIBS $PTHREAD_LIBS"
+ AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
+
+ dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX,
+ dnl but it's tricky to get it right together with
+ dnl AC_PROG_CC_C99. Thus, this is handled by telling the
+ dnl user in INSTALL to set the correct CC manually.
+
+ AC_DEFINE([MYTHREAD_POSIX], [1],
+ [Define to 1 when using POSIX threads (pthreads).])
+
+ # These are nice to have but not mandatory.
+ #
+ # FIXME: xz uses clock_gettime if it is available and can do
+ # it even when threading is disabled. Moving this outside
+ # of pthread detection may be undesirable because then
+ # liblzma may get linked against librt even when librt isn't
+ # needed by liblzma.
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ AC_SEARCH_LIBS([clock_gettime], [rt])
+ AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock])
+ AC_CHECK_DECL([CLOCK_MONOTONIC], [AC_DEFINE(
+ [HAVE_CLOCK_MONOTONIC], [1], [Define to 1 if
+ `CLOCK_MONOTONIC' is declared in <time.h>.])], [],
+ [[#include <time.h>]])
+ CFLAGS=$OLD_CFLAGS
+ ],
+ [win95], [
+ AC_DEFINE([MYTHREAD_WIN95], [1], [Define to 1 when using
+ Windows 95 (and thus XP) compatible threads.
+ This avoids use of features that were added in
+ Windows Vista.])
+ ],
+ [vista], [
+ AC_DEFINE([MYTHREAD_VISTA], [1], [Define to 1 when using
+ Windows Vista compatible threads. This uses
+ features that are not available on Windows XP.])
+ ]
+)
+AM_CONDITIONAL([COND_THREADS], [test "x$enable_threads" != xno])
+
+echo
+echo "Initializing Libtool:"
+LT_PREREQ([2.4])
+LT_INIT([win32-dll])
+LT_LANG([Windows Resource])
+
+# This is a bit wrong since it is possible to request that only some libs
+# are built as shared. Using that feature isn't so common though, and this
+# breaks only on Windows (at least for now) if the user enables only some
+# libs as shared.
+AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno])
+
+#####################
+# Symbol versioning #
+#####################
+
+# NOTE: This checks if we are building shared or static library
+# and if --with-pic or --without-pic was used. Thus this check
+# must be after Libtool initialization.
+AC_MSG_CHECKING([if library symbol versioning should be used])
+AC_ARG_ENABLE([symbol-versions], [AS_HELP_STRING([--enable-symbol-versions],
+ [Use symbol versioning for liblzma. Enabled by default on
+ GNU/Linux, other GNU-based systems, and FreeBSD.])],
+ [], [enable_symbol_versions=auto])
+if test "x$enable_symbol_versions" = xauto; then
+ case $host_os in
+ # NOTE: Even if one omits -gnu on GNU/Linux (e.g.
+ # i486-slackware-linux), configure will (via config.sub)
+ # append -gnu (e.g. i486-slackware-linux-gnu), and this
+ # test will work correctly.
+ gnu* | *-gnu* | freebsd*)
+ enable_symbol_versions=yes
+ ;;
+ *)
+ enable_symbol_versions=no
+ ;;
+ esac
+fi
+
+# There are two variants for symbol versioning.
+# See src/liblzma/validate_map.sh for details.
+#
+# On GNU/Linux, extra symbols are added in the C code. These extra symbols
+# must not be put into a static library as they can cause problems (and
+# even if they didn't cause problems, they would be useless). On other
+# systems symbol versioning may be used too but there is no problem as only
+# a linker script is specified in src/liblzma/Makefile.am and that isn't
+# used when creating a static library.
+#
+# Libtool always uses -DPIC when building shared libraries by default and
+# doesn't use it for static libs by default. This can be overridden with
+# --with-pic and --without-pic though. As long as neither --with-pic nor
+# --without-pic is used then we can use #ifdef PIC to detect if the file is
+# being built for a shared library.
+if test "x$enable_symbol_versions" = xno ; then
+ enable_symbol_versions=no
+ AC_MSG_RESULT([no])
+elif test "x$enable_shared" = xno ; then
+ enable_symbol_versions=no
+ AC_MSG_RESULT([no (not building a shared library)])
+else
+ case "$host_cpu-$host_os" in
+ microblaze*)
+ # GCC 12 on MicroBlaze doesn't support __symver__
+ # attribute. It's simplest and safest to use the
+ # generic version on that platform since then only
+ # the linker script is needed. The RHEL/CentOS 7
+ # compatibility symbols don't matter on MicroBlaze.
+ enable_symbol_versions=generic
+ ;;
+ *-linux*)
+ case "$pic_mode-$enable_static" in
+ default-*)
+ # Use symvers if PIC is defined.
+ have_symbol_versions_linux=2
+ ;;
+ *-no)
+ # Not building static library.
+ # Use symvers unconditionally.
+ have_symbol_versions_linux=1
+ ;;
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([
+ On GNU/Linux, building both shared and static library at the same time
+ is not supported if --with-pic or --without-pic is used.
+ Use either --disable-shared or --disable-static to build one type
+ of library at a time. If both types are needed, build one at a time,
+ possibly picking only src/liblzma/.libs/liblzma.a from the static build.])
+ ;;
+ esac
+ enable_symbol_versions=linux
+ AC_DEFINE_UNQUOTED([HAVE_SYMBOL_VERSIONS_LINUX],
+ [$have_symbol_versions_linux],
+ [Define to 1 to if GNU/Linux-specific details
+ are unconditionally wanted for symbol
+ versioning. Define to 2 to if these are wanted
+ only if also PIC is defined (allows building
+ both shared and static liblzma at the same
+ time with Libtool if neither --with-pic nor
+ --without-pic is used). This define must be
+ used together with liblzma_linux.map.])
+ ;;
+ *)
+ enable_symbol_versions=generic
+ ;;
+ esac
+ AC_MSG_RESULT([yes ($enable_symbol_versions)])
+fi
+
+AM_CONDITIONAL([COND_SYMVERS_LINUX],
+ [test "x$enable_symbol_versions" = xlinux])
+AM_CONDITIONAL([COND_SYMVERS_GENERIC],
+ [test "x$enable_symbol_versions" = xgeneric])
+
+
+###############################################################################
+# Checks for libraries.
+###############################################################################
+
+dnl Support for _REQUIRE_VERSION was added in gettext 0.19.6. If both
+dnl _REQUIRE_VERSION and _VERSION are present, the _VERSION is ignored.
+dnl We use both for compatibility with other programs in the Autotools family.
+echo
+echo "Initializing gettext:"
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
+AM_GNU_GETTEXT_VERSION([0.19.6])
+AM_GNU_GETTEXT([external])
+
+
+###############################################################################
+# Checks for header files.
+###############################################################################
+
+echo
+echo "System headers and functions:"
+
+# There is currently no workarounds in this package if some of
+# these headers are missing.
+AC_CHECK_HEADERS([fcntl.h limits.h sys/time.h],
+ [],
+ [AC_MSG_ERROR([Required header file(s) are missing.])])
+
+# immintrin.h allows the use of the intrinsic functions if they are available.
+# cpuid.h may be used for detecting x86 processor features at runtime.
+AC_CHECK_HEADERS([immintrin.h cpuid.h])
+
+
+###############################################################################
+# Checks for typedefs, structures, and compiler characteristics.
+###############################################################################
+
+AC_HEADER_STDBOOL
+
+AC_TYPE_UINT8_T
+AC_TYPE_UINT16_T
+AC_TYPE_INT32_T
+AC_TYPE_UINT32_T
+AC_TYPE_INT64_T
+AC_TYPE_UINT64_T
+AC_TYPE_UINTPTR_T
+
+AC_CHECK_SIZEOF([size_t])
+
+# The command line tool can copy high resolution timestamps if such
+# information is available in struct stat. Otherwise one second accuracy
+# is used.
+AC_CHECK_MEMBERS([
+ struct stat.st_atim.tv_nsec,
+ struct stat.st_atimespec.tv_nsec,
+ struct stat.st_atimensec,
+ struct stat.st_uatime,
+ struct stat.st_atim.st__tim.tv_nsec])
+
+AC_SYS_LARGEFILE
+AC_C_BIGENDIAN
+
+# __attribute__((__constructor__)) can be used for one-time initializations.
+# Use -Werror because some compilers accept unknown attributes and just
+# give a warning.
+#
+# FIXME? Unfortunately -Werror can cause trouble if CFLAGS contains options
+# that produce warnings for unrelated reasons. For example, GCC and Clang
+# support -Wunused-macros which will warn about "#define _GNU_SOURCE 1"
+# which will be among the #defines that Autoconf inserts to the beginning of
+# the test program. There seems to be no nice way to prevent Autoconf from
+# inserting the any defines to the test program.
+AC_MSG_CHECKING([if __attribute__((__constructor__)) can be used])
+have_func_attribute_constructor=no
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Werror"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ __attribute__((__constructor__))
+ static void my_constructor_func(void) { return; }
+]])], [
+ AC_DEFINE([HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR], [1],
+ [Define to 1 if __attribute__((__constructor__))
+ is supported for functions.])
+ have_func_attribute_constructor=yes
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+])
+CFLAGS="$OLD_CFLAGS"
+
+
+# The Win95 threading lacks a thread-safe one-time initialization function.
+# The one-time initialization is needed for crc32_small.c and crc64_small.c
+# create the CRC tables. So if small mode is enabled, the threading mode is
+# win95, and the compiler does not support attribute constructor, then we
+# would end up with a multithreaded build that is thread-unsafe. As a
+# result this configuration is not allowed.
+if test "x$enable_small$enable_threads$have_func_attribute_constructor" \
+ = xyeswin95no; then
+ AC_MSG_ERROR([
+ --enable-threads=win95 and --enable-small cannot be used
+ at the same time with a compiler that doesn't support
+ __attribute__((__constructor__))])
+fi
+
+###############################################################################
+# Checks for library functions.
+###############################################################################
+
+# Gnulib replacements as needed
+gl_GETOPT
+
+# Find the best function to set timestamps.
+AC_CHECK_FUNCS([futimens futimes futimesat utimes _futime utime], [break])
+
+# This is nice to have but not mandatory.
+AC_CHECK_FUNCS([posix_fadvise])
+
+TUKLIB_PROGNAME
+TUKLIB_INTEGER
+TUKLIB_PHYSMEM
+TUKLIB_CPUCORES
+TUKLIB_MBSTR
+
+# If requested, check for system-provided SHA-256. At least the following
+# implementations are supported:
+#
+# OS Headers Library Type Function
+# FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init
+# NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init
+# OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init
+# Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init
+# MINIX 3 sys/types.h + sha2.h SHA256_CTX SHA256_Init
+# Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init
+#
+# Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead
+# of size_t.
+#
+sha256_header_found=no
+sha256_type_found=no
+sha256_func_found=no
+AS_IF([test "x$enable_external_sha256" = "xyes"], [
+ # Test for Common Crypto before others, because Darwin has sha256.h
+ # too and we don't want to use that, because on older versions it
+ # uses OpenSSL functions, whose SHA256_Init is not guaranteed to
+ # succeed.
+ AC_CHECK_HEADERS(
+ [CommonCrypto/CommonDigest.h sha256.h sha2.h],
+ [sha256_header_found=yes ; break])
+ if test "x$sha256_header_found" = xyes; then
+ AC_CHECK_TYPES([CC_SHA256_CTX, SHA256_CTX, SHA2_CTX],
+ [sha256_type_found=yes], [],
+ [[#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+ # include <CommonCrypto/CommonDigest.h>
+ #endif
+ #ifdef HAVE_SHA256_H
+ # include <sha256.h>
+ #endif
+ #ifdef HAVE_SHA2_H
+ # include <sha2.h>
+ #endif]])
+ if test "x$sha256_type_found" = xyes ; then
+ AC_SEARCH_LIBS([SHA256Init], [md])
+ AC_SEARCH_LIBS([SHA256_Init], [md])
+ AC_CHECK_FUNCS([CC_SHA256_Init SHA256Init SHA256_Init],
+ [sha256_func_found=yes ; break])
+ fi
+ fi
+])
+AM_CONDITIONAL([COND_INTERNAL_SHA256], [test "x$sha256_func_found" = xno])
+if test "x$enable_external_sha256$sha256_func_found" = xyesno; then
+ AC_MSG_ERROR([--enable-external-sha256 was specified but no supported external SHA-256 implementation was found])
+fi
+
+# Check for SSE2 intrinsics. There is no run-time detection for SSE2 so if
+# compiler options enable SSE2 then SSE2 support is required by the binaries.
+# The compile-time check for SSE2 is done with #ifdefs because some compilers
+# (ICC, MSVC) allow SSE2 intrinsics even when SSE2 isn't enabled.
+AC_CHECK_DECL([_mm_movemask_epi8],
+ [AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1],
+ [Define to 1 if _mm_movemask_epi8 is available.])],
+ [],
+[#ifdef HAVE_IMMINTRIN_H
+#include <immintrin.h>
+#endif])
+
+# For faster CRC on 32/64-bit x86 and E2K (see also crc64_fast.c):
+#
+# - Check for the CLMUL intrinsic _mm_clmulepi64_si128 in <immintrin.h>.
+# Check also for _mm_set_epi64x for consistency with CMake build
+# where it's needed to disable CLMUL with VS2013.
+#
+# - Check that __attribute__((__target__("ssse3,sse4.1,pclmul"))) works
+# together with _mm_clmulepi64_si128 from <immintrin.h>. The attribute
+# was added in GCC 4.4 but some GCC 4.x versions don't allow intrinsics
+# with it. Exception: it must be not be used with EDG-based compilers
+# like ICC and the compiler on E2K.
+#
+# If everything above is supported, runtime detection will be used to keep the
+# binaries working on systems that don't support the required extensions.
+AC_MSG_CHECKING([if _mm_clmulepi64_si128 is usable])
+AS_IF([test "x$enable_clmul_crc" = xno], [
+ AC_MSG_RESULT([no, --disable-clmul-crc was used])
+], [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <immintrin.h>
+
+// CLMUL works on older E2K instruction set but it is slow due to emulation.
+#if defined(__e2k__) && __iset__ < 6
+# error
+#endif
+
+// Intel's old compiler (ICC) can define __GNUC__ but the attribute must not
+// be used with it. The new Clang-based ICX needs the attribute.
+// Checking for !defined(__EDG__) catches ICC and other EDG-based compilers.
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__)
+__attribute__((__target__("ssse3,sse4.1,pclmul")))
+#endif
+__m128i my_clmul(__m128i a)
+{
+ const __m128i b = _mm_set_epi64x(1, 2);
+ return _mm_clmulepi64_si128(a, b, 0);
+}
+ ]])], [
+ AC_DEFINE([HAVE_USABLE_CLMUL], [1],
+ [Define to 1 if _mm_set_epi64x and
+ _mm_clmulepi64_si128 are usable.
+ See configure.ac for details.])
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+])
+
+# Check for sandbox support. If one is found, set enable_sandbox=found.
+AS_CASE([$enable_sandbox],
+ [auto | capsicum], [
+ AX_CHECK_CAPSICUM([enable_sandbox=found], [:])
+ ]
+)
+AS_CASE([$enable_sandbox],
+ [auto | pledge], [
+ AC_CHECK_FUNCS([pledge], [enable_sandbox=found ; break])
+ ]
+)
+
+# If a specific sandboxing method was explicitly requested and it wasn't
+# found, give an error.
+case $enable_sandbox in
+ auto | no | found)
+ ;;
+ *)
+ AC_MSG_ERROR([$enable_sandbox support not found])
+ ;;
+esac
+
+
+###############################################################################
+# If using GCC, set some additional AM_CFLAGS:
+###############################################################################
+
+if test "$GCC" = yes ; then
+ echo
+ echo "GCC extensions:"
+fi
+
+# Always do the visibility check but don't set AM_CFLAGS on Windows.
+# This way things get set properly even on Windows.
+gl_VISIBILITY
+if test -n "$CFLAG_VISIBILITY" && test "$is_w32" = no; then
+ AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
+fi
+
+AS_IF([test "$GCC" = yes], [
+ # Enable as much warnings as possible. These commented warnings won't
+ # work for this package though:
+ # * -Wunreachable-code breaks several assert(0) cases, which are
+ # backed up with "return LZMA_PROG_ERROR".
+ # * -Wcast-qual would break various things where we need a non-const
+ # pointer although we don't modify anything through it.
+ # * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations
+ # don't seem so useful here; at least the last one gives some
+ # warnings which are not bugs.
+ # * -Wconversion still shows too many warnings.
+ #
+ # The flags before the empty line are for GCC and many of them
+ # are supported by Clang too. The flags after the empty line are
+ # for Clang.
+ for NEW_FLAG in \
+ -Wall \
+ -Wextra \
+ -Wvla \
+ -Wc99-c11-compat \
+ -Wformat=2 \
+ -Winit-self \
+ -Wmissing-include-dirs \
+ -Wshift-overflow=2 \
+ -Wstrict-overflow=3 \
+ -Walloc-zero \
+ -Wduplicated-cond \
+ -Wfloat-equal \
+ -Wundef \
+ -Wshadow \
+ -Wpointer-arith \
+ -Wbad-function-cast \
+ -Wwrite-strings \
+ -Wdate-time \
+ -Wsign-conversion \
+ -Wfloat-conversion \
+ -Wlogical-op \
+ -Waggregate-return \
+ -Wstrict-prototypes \
+ -Wold-style-definition \
+ -Wmissing-prototypes \
+ -Wmissing-declarations \
+ -Wredundant-decls \
+ \
+ -Wc99-compat \
+ -Wc11-extensions \
+ -Wc2x-compat \
+ -Wc2x-extensions \
+ -Wpre-c2x-compat \
+ -Warray-bounds-pointer-arithmetic \
+ -Wassign-enum \
+ -Wconditional-uninitialized \
+ -Wdocumentation \
+ -Wduplicate-enum \
+ -Wempty-translation-unit \
+ -Wflexible-array-extensions \
+ -Wmissing-variable-declarations \
+ -Wnewline-eof \
+ -Wshift-sign-overflow \
+ -Wstring-conversion
+ do
+ AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $NEW_FLAG -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+ [[void foo(void); void foo(void) { }]])], [
+ AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+ CFLAGS="$OLD_CFLAGS"
+ done
+
+ AC_ARG_ENABLE([werror],
+ AS_HELP_STRING([--enable-werror], [Enable -Werror to abort
+ compilation on all compiler warnings.]),
+ [], [enable_werror=no])
+ if test "x$enable_werror" = "xyes"; then
+ AM_CFLAGS="$AM_CFLAGS -Werror"
+ fi
+])
+
+
+###############################################################################
+# Create the makefiles and config.h
+###############################################################################
+
+echo
+
+# Don't build the lib directory at all if we don't need any replacement
+# functions.
+AM_CONDITIONAL([COND_GNULIB], test -n "$LIBOBJS")
+
+# Add default AM_CFLAGS.
+AC_SUBST([AM_CFLAGS])
+
+# This is needed for src/scripts.
+xz=`echo xz | sed "$program_transform_name"`
+AC_SUBST([xz])
+
+AC_CONFIG_FILES([
+ Makefile
+ po/Makefile.in
+ lib/Makefile
+ src/Makefile
+ src/liblzma/Makefile
+ src/liblzma/api/Makefile
+ src/xz/Makefile
+ src/xzdec/Makefile
+ src/lzmainfo/Makefile
+ src/scripts/Makefile
+ tests/Makefile
+ debug/Makefile
+])
+AC_CONFIG_FILES([src/scripts/xzdiff], [chmod +x src/scripts/xzdiff])
+AC_CONFIG_FILES([src/scripts/xzgrep], [chmod +x src/scripts/xzgrep])
+AC_CONFIG_FILES([src/scripts/xzmore], [chmod +x src/scripts/xzmore])
+AC_CONFIG_FILES([src/scripts/xzless], [chmod +x src/scripts/xzless])
+
+AC_OUTPUT
+
+# Some warnings
+if test x$tuklib_cv_physmem_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the amount of RAM."
+ echo "Consider using --enable-assume-ram (if you didn't already)"
+ echo "or make a patch to add support for this operating system."
+fi
+
+if test x$tuklib_cv_cpucores_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the number of CPU cores."
+fi
+
+if test "x$enable_threads$enable_small$have_func_attribute_constructor" \
+ = xnoyesno; then
+ echo
+ echo "NOTE:"
+ echo "liblzma will be thread-unsafe due to the combination"
+ echo "of --disable-threads --enable-small when using a compiler"
+ echo "that doesn't support __attribute__((__constructor__))."
+fi
diff --git a/debug/Makefile.am b/debug/Makefile.am
new file mode 100644
index 0000000..9026fd9
--- /dev/null
+++ b/debug/Makefile.am
@@ -0,0 +1,30 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+EXTRA_DIST = \
+ translation.bash
+
+noinst_PROGRAMS = \
+ repeat \
+ sync_flush \
+ full_flush \
+ memusage \
+ crc32 \
+ known_sizes \
+ hex2bin
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/common \
+ -I$(top_srcdir)/src/liblzma/api
+
+LDADD = $(top_builddir)/src/liblzma/liblzma.la
+
+if COND_GNULIB
+LDADD += $(top_builddir)/lib/libgnu.a
+endif
+
+LDADD += $(LTLIBINTL)
diff --git a/debug/Makefile.in b/debug/Makefile.in
new file mode 100644
index 0000000..256be27
--- /dev/null
+++ b/debug/Makefile.in
@@ -0,0 +1,735 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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@
+noinst_PROGRAMS = repeat$(EXEEXT) sync_flush$(EXEEXT) \
+ full_flush$(EXEEXT) memusage$(EXEEXT) crc32$(EXEEXT) \
+ known_sizes$(EXEEXT) hex2bin$(EXEEXT)
+@COND_GNULIB_TRUE@am__append_1 = $(top_builddir)/lib/libgnu.a
+subdir = debug
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 =
+PROGRAMS = $(noinst_PROGRAMS)
+crc32_SOURCES = crc32.c
+crc32_OBJECTS = crc32.$(OBJEXT)
+crc32_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+crc32_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_1) $(am__DEPENDENCIES_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 =
+full_flush_SOURCES = full_flush.c
+full_flush_OBJECTS = full_flush.$(OBJEXT)
+full_flush_LDADD = $(LDADD)
+full_flush_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_1) $(am__DEPENDENCIES_1)
+hex2bin_SOURCES = hex2bin.c
+hex2bin_OBJECTS = hex2bin.$(OBJEXT)
+hex2bin_LDADD = $(LDADD)
+hex2bin_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_1) $(am__DEPENDENCIES_1)
+known_sizes_SOURCES = known_sizes.c
+known_sizes_OBJECTS = known_sizes.$(OBJEXT)
+known_sizes_LDADD = $(LDADD)
+known_sizes_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_1) $(am__DEPENDENCIES_1)
+memusage_SOURCES = memusage.c
+memusage_OBJECTS = memusage.$(OBJEXT)
+memusage_LDADD = $(LDADD)
+memusage_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_1) $(am__DEPENDENCIES_1)
+repeat_SOURCES = repeat.c
+repeat_OBJECTS = repeat.$(OBJEXT)
+repeat_LDADD = $(LDADD)
+repeat_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_1) $(am__DEPENDENCIES_1)
+sync_flush_SOURCES = sync_flush.c
+sync_flush_OBJECTS = sync_flush.$(OBJEXT)
+sync_flush_LDADD = $(LDADD)
+sync_flush_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_1) $(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)/crc32.Po ./$(DEPDIR)/full_flush.Po \
+ ./$(DEPDIR)/hex2bin.Po ./$(DEPDIR)/known_sizes.Po \
+ ./$(DEPDIR)/memusage.Po ./$(DEPDIR)/repeat.Po \
+ ./$(DEPDIR)/sync_flush.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 = crc32.c full_flush.c hex2bin.c known_sizes.c memusage.c \
+ repeat.c sync_flush.c
+DIST_SOURCES = crc32.c full_flush.c hex2bin.c known_sizes.c memusage.c \
+ repeat.c sync_flush.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__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/build-aux/depcomp README
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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 = \
+ translation.bash
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/common \
+ -I$(top_srcdir)/src/liblzma/api
+
+LDADD = $(top_builddir)/src/liblzma/liblzma.la $(am__append_1) \
+ $(LTLIBINTL)
+all: 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 debug/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign debug/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-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+crc32$(EXEEXT): $(crc32_OBJECTS) $(crc32_DEPENDENCIES) $(EXTRA_crc32_DEPENDENCIES)
+ @rm -f crc32$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(crc32_OBJECTS) $(crc32_LDADD) $(LIBS)
+
+full_flush$(EXEEXT): $(full_flush_OBJECTS) $(full_flush_DEPENDENCIES) $(EXTRA_full_flush_DEPENDENCIES)
+ @rm -f full_flush$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(full_flush_OBJECTS) $(full_flush_LDADD) $(LIBS)
+
+hex2bin$(EXEEXT): $(hex2bin_OBJECTS) $(hex2bin_DEPENDENCIES) $(EXTRA_hex2bin_DEPENDENCIES)
+ @rm -f hex2bin$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(hex2bin_OBJECTS) $(hex2bin_LDADD) $(LIBS)
+
+known_sizes$(EXEEXT): $(known_sizes_OBJECTS) $(known_sizes_DEPENDENCIES) $(EXTRA_known_sizes_DEPENDENCIES)
+ @rm -f known_sizes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(known_sizes_OBJECTS) $(known_sizes_LDADD) $(LIBS)
+
+memusage$(EXEEXT): $(memusage_OBJECTS) $(memusage_DEPENDENCIES) $(EXTRA_memusage_DEPENDENCIES)
+ @rm -f memusage$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(memusage_OBJECTS) $(memusage_LDADD) $(LIBS)
+
+repeat$(EXEEXT): $(repeat_OBJECTS) $(repeat_DEPENDENCIES) $(EXTRA_repeat_DEPENDENCIES)
+ @rm -f repeat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(repeat_OBJECTS) $(repeat_LDADD) $(LIBS)
+
+sync_flush$(EXEEXT): $(sync_flush_OBJECTS) $(sync_flush_DEPENDENCIES) $(EXTRA_sync_flush_DEPENDENCIES)
+ @rm -f sync_flush$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(sync_flush_OBJECTS) $(sync_flush_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc32.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/full_flush.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hex2bin.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/known_sizes.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memusage.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repeat.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_flush.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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
+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)
+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:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-generic clean-libtool clean-noinstPROGRAMS \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/crc32.Po
+ -rm -f ./$(DEPDIR)/full_flush.Po
+ -rm -f ./$(DEPDIR)/hex2bin.Po
+ -rm -f ./$(DEPDIR)/known_sizes.Po
+ -rm -f ./$(DEPDIR)/memusage.Po
+ -rm -f ./$(DEPDIR)/repeat.Po
+ -rm -f ./$(DEPDIR)/sync_flush.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)/crc32.Po
+ -rm -f ./$(DEPDIR)/full_flush.Po
+ -rm -f ./$(DEPDIR)/hex2bin.Po
+ -rm -f ./$(DEPDIR)/known_sizes.Po
+ -rm -f ./$(DEPDIR)/memusage.Po
+ -rm -f ./$(DEPDIR)/repeat.Po
+ -rm -f ./$(DEPDIR)/sync_flush.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: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
+ clean-generic clean-libtool clean-noinstPROGRAMS 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 \
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# 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:
diff --git a/debug/README b/debug/README
new file mode 100644
index 0000000..d42b272
--- /dev/null
+++ b/debug/README
@@ -0,0 +1,17 @@
+
+Debug tools
+-----------
+
+ This directory contains a few tiny programs that may be helpful when
+ debugging XZ Utils.
+
+ These tools are not meant to be installed. Often one needs to edit
+ the source code a little to make the programs do the wanted things.
+ If you don't know how these programs could help you, it is likely
+ that they really are useless to you.
+
+ These aren't intended to be used as example programs. They take some
+ shortcuts here and there, which correct programs should not do. Many
+ possible errors (especially I/O errors) are ignored. Don't report
+ bugs or send patches to fix this kind of bugs.
+
diff --git a/debug/crc32.c b/debug/crc32.c
new file mode 100644
index 0000000..e545a3c
--- /dev/null
+++ b/debug/crc32.c
@@ -0,0 +1,39 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc32.c
+/// \brief Primitive CRC32 calculation tool
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "lzma.h"
+#include <stdio.h>
+
+
+int
+main(void)
+{
+ uint32_t crc = 0;
+
+ do {
+ uint8_t buf[BUFSIZ];
+ const size_t size = fread(buf, 1, sizeof(buf), stdin);
+ crc = lzma_crc32(buf, size, crc);
+ } while (!ferror(stdin) && !feof(stdin));
+
+ //printf("%08" PRIX32 "\n", crc);
+
+ // I want it little endian so it's easy to work with hex editor.
+ printf("%02" PRIX32 " ", crc & 0xFF);
+ printf("%02" PRIX32 " ", (crc >> 8) & 0xFF);
+ printf("%02" PRIX32 " ", (crc >> 16) & 0xFF);
+ printf("%02" PRIX32 " ", crc >> 24);
+ printf("\n");
+
+ return 0;
+}
diff --git a/debug/full_flush.c b/debug/full_flush.c
new file mode 100644
index 0000000..227f737
--- /dev/null
+++ b/debug/full_flush.c
@@ -0,0 +1,103 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file full_flush.c
+/// \brief Encode files using LZMA_FULL_FLUSH
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "lzma.h"
+#include <stdio.h>
+
+#define CHUNK 64
+
+
+static lzma_stream strm = LZMA_STREAM_INIT;
+static FILE *file_in;
+
+
+static void
+encode(size_t size, lzma_action action)
+{
+ uint8_t in[CHUNK];
+ uint8_t out[CHUNK];
+ lzma_ret ret;
+
+ do {
+ if (strm.avail_in == 0 && size > 0) {
+ const size_t amount = my_min(size, CHUNK);
+ strm.avail_in = fread(in, 1, amount, file_in);
+ strm.next_in = in;
+ size -= amount; // Intentionally not using avail_in.
+ }
+
+ strm.next_out = out;
+ strm.avail_out = CHUNK;
+
+ ret = lzma_code(&strm, size == 0 ? action : LZMA_RUN);
+
+ if (ret != LZMA_OK && ret != LZMA_STREAM_END) {
+ fprintf(stderr, "%s:%u: %s: ret == %d\n",
+ __FILE__, __LINE__, __func__, ret);
+ exit(1);
+ }
+
+ fwrite(out, 1, CHUNK - strm.avail_out, stdout);
+
+ } while (size > 0 || strm.avail_out == 0);
+
+ if ((action == LZMA_RUN && ret != LZMA_OK)
+ || (action != LZMA_RUN && ret != LZMA_STREAM_END)) {
+ fprintf(stderr, "%s:%u: %s: ret == %d\n",
+ __FILE__, __LINE__, __func__, ret);
+ exit(1);
+ }
+}
+
+
+int
+main(int argc, char **argv)
+{
+ file_in = argc > 1 ? fopen(argv[1], "rb") : stdin;
+
+
+ // Config
+ lzma_options_lzma opt_lzma;
+ if (lzma_lzma_preset(&opt_lzma, 1)) {
+ fprintf(stderr, "preset failed\n");
+ exit(1);
+ }
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+ filters[0].id = LZMA_FILTER_LZMA2;
+ filters[0].options = &opt_lzma;
+ filters[1].id = LZMA_VLI_UNKNOWN;
+
+ // Init
+ if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_CRC32) != LZMA_OK) {
+ fprintf(stderr, "init failed\n");
+ exit(1);
+ }
+
+// if (lzma_easy_encoder(&strm, 1)) {
+// fprintf(stderr, "init failed\n");
+// exit(1);
+// }
+
+ // Encoding
+ encode(0, LZMA_FULL_FLUSH);
+ encode(6, LZMA_FULL_FLUSH);
+ encode(0, LZMA_FULL_FLUSH);
+ encode(7, LZMA_FULL_FLUSH);
+ encode(0, LZMA_FULL_FLUSH);
+ encode(0, LZMA_FINISH);
+
+ // Clean up
+ lzma_end(&strm);
+
+ return 0;
+}
diff --git a/debug/hex2bin.c b/debug/hex2bin.c
new file mode 100644
index 0000000..7324624
--- /dev/null
+++ b/debug/hex2bin.c
@@ -0,0 +1,53 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file hex2bin.c
+/// \brief Converts hexadecimal input strings to binary
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include <stdio.h>
+#include <ctype.h>
+
+
+static int
+getbin(int x)
+{
+ if (x >= '0' && x <= '9')
+ return x - '0';
+
+ if (x >= 'A' && x <= 'F')
+ return x - 'A' + 10;
+
+ return x - 'a' + 10;
+}
+
+
+int
+main(void)
+{
+ while (true) {
+ int byte = getchar();
+ if (byte == EOF)
+ return 0;
+ if (!isxdigit(byte))
+ continue;
+
+ const int digit = getchar();
+ if (digit == EOF || !isxdigit(digit)) {
+ fprintf(stderr, "Invalid input\n");
+ return 1;
+ }
+
+ byte = (getbin(byte) << 4) | getbin(digit);
+ if (putchar(byte) == EOF) {
+ perror(NULL);
+ return 1;
+ }
+ }
+}
diff --git a/debug/known_sizes.c b/debug/known_sizes.c
new file mode 100644
index 0000000..6c3641f
--- /dev/null
+++ b/debug/known_sizes.c
@@ -0,0 +1,129 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file known_sizes.c
+/// \brief Encodes .lzma Stream with sizes known in Block Header
+///
+/// The input file is encoded in RAM, and the known Compressed Size
+/// and/or Uncompressed Size values are stored in the Block Header.
+/// As of writing there's no such Stream encoder in liblzma.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "lzma.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/unistd.h>
+#include <stdio.h>
+
+
+// Support file sizes up to 1 MiB. We use this for output space too, so files
+// close to 1 MiB had better compress at least a little or we have a buffer
+// overflow.
+#define BUFFER_SIZE (1U << 20)
+
+
+int
+main(void)
+{
+ // Allocate the buffers.
+ uint8_t *in = malloc(BUFFER_SIZE);
+ uint8_t *out = malloc(BUFFER_SIZE);
+ if (in == NULL || out == NULL)
+ return 1;
+
+ // Fill the input buffer.
+ const size_t in_size = fread(in, 1, BUFFER_SIZE, stdin);
+
+ // Filter setup
+ lzma_options_lzma opt_lzma;
+ if (lzma_lzma_preset(&opt_lzma, 1))
+ return 1;
+
+ lzma_filter filters[] = {
+ {
+ .id = LZMA_FILTER_LZMA2,
+ .options = &opt_lzma
+ },
+ {
+ .id = LZMA_VLI_UNKNOWN
+ }
+ };
+
+ lzma_block block = {
+ .check = LZMA_CHECK_CRC32,
+ .compressed_size = BUFFER_SIZE, // Worst case reserve
+ .uncompressed_size = in_size,
+ .filters = filters,
+ };
+
+ lzma_stream strm = LZMA_STREAM_INIT;
+ if (lzma_block_encoder(&strm, &block) != LZMA_OK)
+ return 1;
+
+ // Reserve space for Stream Header and Block Header. We need to
+ // calculate the size of the Block Header first.
+ if (lzma_block_header_size(&block) != LZMA_OK)
+ return 1;
+
+ size_t out_size = LZMA_STREAM_HEADER_SIZE + block.header_size;
+
+ strm.next_in = in;
+ strm.avail_in = in_size;
+ strm.next_out = out + out_size;
+ strm.avail_out = BUFFER_SIZE - out_size;
+
+ if (lzma_code(&strm, LZMA_FINISH) != LZMA_STREAM_END)
+ return 1;
+
+ out_size += strm.total_out;
+
+ if (lzma_block_header_encode(&block, out + LZMA_STREAM_HEADER_SIZE)
+ != LZMA_OK)
+ return 1;
+
+ lzma_index *idx = lzma_index_init(NULL);
+ if (idx == NULL)
+ return 1;
+
+ if (lzma_index_append(idx, NULL, block.header_size + strm.total_out,
+ strm.total_in) != LZMA_OK)
+ return 1;
+
+ if (lzma_index_encoder(&strm, idx) != LZMA_OK)
+ return 1;
+
+ if (lzma_code(&strm, LZMA_RUN) != LZMA_STREAM_END)
+ return 1;
+
+ out_size += strm.total_out;
+
+ lzma_end(&strm);
+
+ lzma_index_end(idx, NULL);
+
+ // Encode the Stream Header and Stream Footer. backwards_size is
+ // needed only for the Stream Footer.
+ lzma_stream_flags sf = {
+ .backward_size = strm.total_out,
+ .check = block.check,
+ };
+
+ if (lzma_stream_header_encode(&sf, out) != LZMA_OK)
+ return 1;
+
+ if (lzma_stream_footer_encode(&sf, out + out_size) != LZMA_OK)
+ return 1;
+
+ out_size += LZMA_STREAM_HEADER_SIZE;
+
+ // Write out the file.
+ fwrite(out, 1, out_size, stdout);
+
+ return 0;
+}
diff --git a/debug/memusage.c b/debug/memusage.c
new file mode 100644
index 0000000..bd72b5a
--- /dev/null
+++ b/debug/memusage.c
@@ -0,0 +1,51 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file memusage.c
+/// \brief Calculates memory usage using lzma_memory_usage()
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "lzma.h"
+#include <stdio.h>
+
+int
+main(void)
+{
+ lzma_options_lzma lzma = {
+ .dict_size = (1U << 30) + (1U << 29),
+ .lc = 3,
+ .lp = 0,
+ .pb = 2,
+ .preset_dict = NULL,
+ .preset_dict_size = 0,
+ .mode = LZMA_MODE_NORMAL,
+ .nice_len = 48,
+ .mf = LZMA_MF_BT4,
+ .depth = 0,
+ };
+
+/*
+ lzma_options_filter filters[] = {
+ { LZMA_FILTER_LZMA1,
+ (lzma_options_lzma *)&lzma_preset_lzma[6 - 1] },
+ { UINT64_MAX, NULL }
+ };
+*/
+ lzma_filter filters[] = {
+ { LZMA_FILTER_LZMA1, &lzma },
+ { UINT64_MAX, NULL }
+ };
+
+ printf("Encoder: %10" PRIu64 " B\n",
+ lzma_raw_encoder_memusage(filters));
+ printf("Decoder: %10" PRIu64 " B\n",
+ lzma_raw_decoder_memusage(filters));
+
+ return 0;
+}
diff --git a/debug/repeat.c b/debug/repeat.c
new file mode 100644
index 0000000..a00bde2
--- /dev/null
+++ b/debug/repeat.c
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file repeat.c
+/// \brief Repeats given string given times
+///
+/// This program can be useful when debugging run-length encoder in
+/// the Subblock filter, especially the condition when repeat count
+/// doesn't fit into 28-bit integer.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include <stdio.h>
+
+
+int
+main(int argc, char **argv)
+{
+ if (argc != 3) {
+ fprintf(stderr, "Usage: %s COUNT STRING\n", argv[0]);
+ exit(1);
+ }
+
+ unsigned long long count = strtoull(argv[1], NULL, 10);
+ const size_t size = strlen(argv[2]);
+
+ while (count-- != 0)
+ fwrite(argv[2], 1, size, stdout);
+
+ return !!(ferror(stdout) || fclose(stdout));
+}
diff --git a/debug/sync_flush.c b/debug/sync_flush.c
new file mode 100644
index 0000000..2292333
--- /dev/null
+++ b/debug/sync_flush.c
@@ -0,0 +1,125 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file sync_flush.c
+/// \brief Encode files using LZMA_SYNC_FLUSH
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "lzma.h"
+#include <stdio.h>
+
+#define CHUNK 64
+
+
+static lzma_stream strm = LZMA_STREAM_INIT;
+static FILE *file_in;
+
+
+static void
+encode(size_t size, lzma_action action)
+{
+ uint8_t in[CHUNK];
+ uint8_t out[CHUNK];
+ lzma_ret ret;
+
+ do {
+ if (strm.avail_in == 0 && size > 0) {
+ const size_t amount = my_min(size, CHUNK);
+ strm.avail_in = fread(in, 1, amount, file_in);
+ strm.next_in = in;
+ size -= amount; // Intentionally not using avail_in.
+ }
+
+ strm.next_out = out;
+ strm.avail_out = CHUNK;
+
+ ret = lzma_code(&strm, size == 0 ? action : LZMA_RUN);
+
+ if (ret != LZMA_OK && ret != LZMA_STREAM_END) {
+ fprintf(stderr, "%s:%u: %s: ret == %d\n",
+ __FILE__, __LINE__, __func__, ret);
+ exit(1);
+ }
+
+ fwrite(out, 1, CHUNK - strm.avail_out, stdout);
+
+ } while (size > 0 || strm.avail_out == 0);
+
+ if ((action == LZMA_RUN && ret != LZMA_OK)
+ || (action != LZMA_RUN && ret != LZMA_STREAM_END)) {
+ fprintf(stderr, "%s:%u: %s: ret == %d\n",
+ __FILE__, __LINE__, __func__, ret);
+ exit(1);
+ }
+}
+
+
+int
+main(int argc, char **argv)
+{
+ file_in = argc > 1 ? fopen(argv[1], "rb") : stdin;
+
+ // Config
+ lzma_options_lzma opt_lzma = {
+ .dict_size = 1U << 16,
+ .lc = LZMA_LC_DEFAULT,
+ .lp = LZMA_LP_DEFAULT,
+ .pb = LZMA_PB_DEFAULT,
+ .preset_dict = NULL,
+ .mode = LZMA_MODE_NORMAL,
+ .nice_len = 32,
+ .mf = LZMA_MF_HC3,
+ .depth = 0,
+ };
+
+ lzma_options_delta opt_delta = {
+ .dist = 16
+ };
+
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+ filters[0].id = LZMA_FILTER_LZMA2;
+ filters[0].options = &opt_lzma;
+ filters[1].id = LZMA_VLI_UNKNOWN;
+
+ // Init
+ if (lzma_stream_encoder(&strm, filters, LZMA_CHECK_CRC32) != LZMA_OK) {
+ fprintf(stderr, "init failed\n");
+ exit(1);
+ }
+
+ // Encoding
+ encode(0, LZMA_SYNC_FLUSH);
+ encode(6, LZMA_SYNC_FLUSH);
+ encode(0, LZMA_SYNC_FLUSH);
+ encode(7, LZMA_SYNC_FLUSH);
+ encode(0, LZMA_SYNC_FLUSH);
+ encode(0, LZMA_FINISH);
+
+/*
+ encode(53, LZMA_SYNC_FLUSH);
+ opt_lzma.lc = 2;
+ opt_lzma.lp = 1;
+ opt_lzma.pb = 0;
+ if (lzma_filters_update(&strm, filters) != LZMA_OK) {
+ fprintf(stderr, "update failed\n");
+ exit(1);
+ }
+ encode(404, LZMA_FINISH);
+*/
+
+ // Clean up
+ lzma_end(&strm);
+
+ return 0;
+
+ // Prevent useless warnings so we don't need to have special CFLAGS
+ // to disable -Werror.
+ (void)opt_lzma;
+ (void)opt_delta;
+}
diff --git a/debug/translation.bash b/debug/translation.bash
new file mode 100644
index 0000000..df4210d
--- /dev/null
+++ b/debug/translation.bash
@@ -0,0 +1,100 @@
+#!/bin/bash
+
+###############################################################################
+#
+# Script to check output of some translated messages
+#
+# This should be useful for translators to check that the translated strings
+# look good. This doesn't make xz print all possible strings, but it should
+# cover most of the cases where mistakes can easily happen.
+#
+# Give the path and filename of the xz executable as an argument. If no
+# arguments are given, this script uses ../src/xz/xz (relative to the
+# location of this script).
+#
+# You may want to pipe the output of this script to less -S to view the
+# tables printed by xz --list on a 80-column terminal. On the other hand,
+# viewing the other messages may be better without -S.
+#
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+set -e
+
+# If an argument was given, use it to set the location of the xz executable.
+unset XZ
+if [ -n "$1" ]; then
+ XZ=$1
+ [ "x${XZ:0:1}" != "x/" ] && XZ="$PWD/$XZ"
+fi
+
+# Locate top_srcdir and go there.
+top_srcdir="$(cd -- "$(dirname -- "$0")" && cd .. && pwd)"
+cd -- "$top_srcdir"
+
+# If XZ wasn't already set, use the default location.
+XZ=${XZ-"$PWD/src/xz/xz"}
+if [ "$(type -t "$XZ" || true)" != "file" ]; then
+ echo "Give the location of the xz executable as an argument" \
+ "to this script."
+ exit 1
+fi
+XZ=$(type -p -- "$XZ")
+
+# Print the xz version and locale information.
+echo "$XZ --version"
+"$XZ" --version
+echo
+if [ -d .git ] && type git > /dev/null 2>&1; then
+ echo "Source code version in $PWD:"
+ git describe --abbrev=4
+fi
+echo
+locale
+echo
+
+# Make the test files directory the current directory.
+cd tests/files
+
+# Put xz in PATH so that argv[0] stays short.
+PATH=${XZ%/*}:$PATH
+
+# Some of the test commands are error messages and thus don't
+# return successfully.
+set +e
+
+for CMD in \
+ "xz --foobarbaz" \
+ "xz --memlimit=123abcd" \
+ "xz --memlimit=40MiB -6 /dev/null" \
+ "xz --memlimit=0 --info-memory" \
+ "xz --memlimit-compress=1234MiB --memlimit-decompress=50MiB --info-memory" \
+ "xz --verbose --verbose /dev/null | cat" \
+ "xz --lzma2=foobarbaz" \
+ "xz --lzma2=foobarbaz=abcd" \
+ "xz --lzma2=mf=abcd" \
+ "xz --lzma2=preset=foobarbaz" \
+ "xz --lzma2=mf=bt4,nice=2" \
+ "xz --lzma2=nice=50000" \
+ "xz --help" \
+ "xz --long-help" \
+ "xz --list good-*lzma2*" \
+ "xz --list good-1-check*" \
+ "xz --list --verbose good-*lzma2*" \
+ "xz --list --verbose good-1-check*" \
+ "xz --list --verbose --verbose good-*lzma2*" \
+ "xz --list --verbose --verbose good-1-check*" \
+ "xz --list --verbose --verbose unsupported-check.xz"
+do
+ echo "-----------------------------------------------------------"
+ echo
+ echo "\$ $CMD"
+ eval "$CMD"
+ echo
+done 2>&1
diff --git a/doc/api/annotated.html b/doc/api/annotated.html
new file mode 100644
index 0000000..4016c49
--- /dev/null
+++ b/doc/api/annotated.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Data Structures</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle"><div class="title">Data Structures</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
+<table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__allocator.html" target="_self">lzma_allocator</a></td><td class="desc">Custom functions for memory handling </td></tr>
+<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__block.html" target="_self">lzma_block</a></td><td class="desc">Options for the Block and Block Header encoders and decoders </td></tr>
+<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__filter.html" target="_self">lzma_filter</a></td><td class="desc">Filter options </td></tr>
+<tr id="row_3_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__index__iter.html" target="_self">lzma_index_iter</a></td><td class="desc">Iterator to get information about Blocks and Streams </td></tr>
+<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__mt.html" target="_self">lzma_mt</a></td><td class="desc">Multithreading options </td></tr>
+<tr id="row_5_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__options__bcj.html" target="_self">lzma_options_bcj</a></td><td class="desc">Options for BCJ filters </td></tr>
+<tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__options__delta.html" target="_self">lzma_options_delta</a></td><td class="desc">Options for the Delta filter </td></tr>
+<tr id="row_7_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__options__lzma.html" target="_self">lzma_options_lzma</a></td><td class="desc">Options specific to the LZMA1 and LZMA2 filters </td></tr>
+<tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__stream.html" target="_self">lzma_stream</a></td><td class="desc">Passing data to and from liblzma </td></tr>
+<tr id="row_9_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="structlzma__stream__flags.html" target="_self">lzma_stream_flags</a></td><td class="desc">Options for encoding/decoding Stream Header and Stream Footer </td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/base_8h.html b/doc/api/base_8h.html
new file mode 100644
index 0000000..417ccef
--- /dev/null
+++ b/doc/api/base_8h.html
@@ -0,0 +1,580 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/base.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">base.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Data types and functions used in many places in liblzma API.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__allocator.html">lzma_allocator</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom functions for memory handling. <a href="structlzma__allocator.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html">lzma_stream</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Passing data to and from liblzma. <a href="structlzma__stream.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:af31f0c8b6f14359cd082b9559f7f3e01"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#af31f0c8b6f14359cd082b9559f7f3e01">LZMA_STREAM_INIT</a></td></tr>
+<tr class="memdesc:af31f0c8b6f14359cd082b9559f7f3e01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization for <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a>. <br /></td></tr>
+<tr class="separator:af31f0c8b6f14359cd082b9559f7f3e01"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:abbc819c74b484c846825ae1388a50a59"><td class="memItemLeft" align="right" valign="top">typedef unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a></td></tr>
+<tr class="memdesc:abbc819c74b484c846825ae1388a50a59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boolean. <br /></td></tr>
+<tr class="separator:abbc819c74b484c846825ae1388a50a59"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab1a60127c640135687a5bcc232cec906"><td class="memItemLeft" align="right" valign="top">typedef struct lzma_internal_s&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#ab1a60127c640135687a5bcc232cec906">lzma_internal</a></td></tr>
+<tr class="memdesc:ab1a60127c640135687a5bcc232cec906"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal data structure. <br /></td></tr>
+<tr class="separator:ab1a60127c640135687a5bcc232cec906"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:a05805a07754b2aa22f7d443eb7ece41a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#a05805a07754b2aa22f7d443eb7ece41a">lzma_reserved_enum</a> { <b>LZMA_RESERVED_ENUM</b> = 0
+ }</td></tr>
+<tr class="memdesc:a05805a07754b2aa22f7d443eb7ece41a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of reserved enumeration variable in structures. <a href="base_8h.html#a05805a07754b2aa22f7d443eb7ece41a">More...</a><br /></td></tr>
+<tr class="separator:a05805a07754b2aa22f7d443eb7ece41a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8494e0457e1463d6d2b6836018d87b6e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> { <br />
+&#160;&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eac003781ccb81bbd5578e29abed8a8cfe">LZMA_OK</a> = 0
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea91ecc6fab14c13ad36224afbcb4e55c4">LZMA_STREAM_END</a> = 1
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa720d30092d504d7d138a320db1905ef">LZMA_NO_CHECK</a> = 2
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea989f393a1772d85bf545a9da48fc7ac2">LZMA_UNSUPPORTED_CHECK</a> = 3
+, <br />
+&#160;&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa5b648c18da0f584f621cfdf7fef1bdb">LZMA_GET_CHECK</a> = 4
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea567e1464feca03900a5425fb45b2f5b6">LZMA_MEM_ERROR</a> = 5
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa1d705effe6026f32c0fe9756b6326bc">LZMA_MEMLIMIT_ERROR</a> = 6
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea63b7a58949854eb9307f8e351358d56c">LZMA_FORMAT_ERROR</a> = 7
+, <br />
+&#160;&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa9ff6dfee36b7aba4fae60706d37425f">LZMA_OPTIONS_ERROR</a> = 8
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea3aa72729a844790e39b4e1101a731dfb">LZMA_DATA_ERROR</a> = 9
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea9ca0ecb62459bdc84d6af47d16b23ae5">LZMA_BUF_ERROR</a> = 10
+, <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea2dac8d451cb38da8550653d0d7be4ec2">LZMA_PROG_ERROR</a> = 11
+, <br />
+&#160;&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea6cf28e5345851f13bd798a4eab8cc939">LZMA_SEEK_NEEDED</a> = 12
+, <b>LZMA_RET_INTERNAL1</b> = 101
+, <b>LZMA_RET_INTERNAL2</b> = 102
+, <b>LZMA_RET_INTERNAL3</b> = 103
+, <br />
+&#160;&#160;<b>LZMA_RET_INTERNAL4</b> = 104
+, <b>LZMA_RET_INTERNAL5</b> = 105
+, <b>LZMA_RET_INTERNAL6</b> = 106
+, <b>LZMA_RET_INTERNAL7</b> = 107
+, <br />
+&#160;&#160;<b>LZMA_RET_INTERNAL8</b> = 108
+<br />
+ }</td></tr>
+<tr class="memdesc:a8494e0457e1463d6d2b6836018d87b6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return values used by several functions in liblzma. <a href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">More...</a><br /></td></tr>
+<tr class="separator:a8494e0457e1463d6d2b6836018d87b6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa92efcbf3cecfcac79c81fc645fce77e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">lzma_action</a> { <br />
+&#160;&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1">LZMA_RUN</a> = 0
+, <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170">LZMA_SYNC_FLUSH</a> = 1
+, <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77eaab46f0d7c721f1ec377e9575eab2586f">LZMA_FULL_FLUSH</a> = 2
+, <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77eaf7bf60e3555a4d10ffad3ecc3d2e01f1">LZMA_FULL_BARRIER</a> = 4
+, <br />
+&#160;&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea7d24fb3c6c144d13bcb091195b8ebec1">LZMA_FINISH</a> = 3
+<br />
+ }</td></tr>
+<tr class="memdesc:aa92efcbf3cecfcac79c81fc645fce77e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The `action' argument for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> <a href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">More...</a><br /></td></tr>
+<tr class="separator:aa92efcbf3cecfcac79c81fc645fce77e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a28cc09bc422d5ba1e0187c9f2af5d957"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957">lzma_code</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">lzma_action</a> action) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a28cc09bc422d5ba1e0187c9f2af5d957"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode or decode data. <br /></td></tr>
+<tr class="separator:a28cc09bc422d5ba1e0187c9f2af5d957"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a854ff37464ae1225febf14db1af43308"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308">lzma_end</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm) lzma_nothrow</td></tr>
+<tr class="memdesc:a854ff37464ae1225febf14db1af43308"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free memory allocated for the coder data structures. <br /></td></tr>
+<tr class="separator:a854ff37464ae1225febf14db1af43308"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab6447cd68eeecbd6b88f21daeb8ce751"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#ab6447cd68eeecbd6b88f21daeb8ce751">lzma_get_progress</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow</td></tr>
+<tr class="memdesc:ab6447cd68eeecbd6b88f21daeb8ce751"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get progress information. <br /></td></tr>
+<tr class="separator:ab6447cd68eeecbd6b88f21daeb8ce751"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a418b210cf206782a73cd9de7dc27f670"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#a418b210cf206782a73cd9de7dc27f670">lzma_memusage</a> (const <a class="el" href="structlzma__stream.html">lzma_stream</a> *strm) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a418b210cf206782a73cd9de7dc27f670"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the memory usage of decoder filter chain. <br /></td></tr>
+<tr class="separator:a418b210cf206782a73cd9de7dc27f670"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac871bc2ead5d482c6d6b3d51bfec365c"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#ac871bc2ead5d482c6d6b3d51bfec365c">lzma_memlimit_get</a> (const <a class="el" href="structlzma__stream.html">lzma_stream</a> *strm) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:ac871bc2ead5d482c6d6b3d51bfec365c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current memory usage limit. <br /></td></tr>
+<tr class="separator:ac871bc2ead5d482c6d6b3d51bfec365c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afc49d4cf75b73128a167df3407505f7b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html#afc49d4cf75b73128a167df3407505f7b">lzma_memlimit_set</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint64_t memlimit) lzma_nothrow</td></tr>
+<tr class="memdesc:afc49d4cf75b73128a167df3407505f7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the memory usage limit. <br /></td></tr>
+<tr class="separator:afc49d4cf75b73128a167df3407505f7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Data types and functions used in many places in liblzma API. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="af31f0c8b6f14359cd082b9559f7f3e01" name="af31f0c8b6f14359cd082b9559f7f3e01"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af31f0c8b6f14359cd082b9559f7f3e01">&#9670;&#160;</a></span>LZMA_STREAM_INIT</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STREAM_INIT</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line"> { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \</div>
+<div class="line"> NULL, NULL, NULL, NULL, 0, 0, 0, 0, \</div>
+<div class="line"> LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }</div>
+</div><!-- fragment -->
+<p>Initialization for <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a>. </p>
+<p>When you declare an instance of <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a>, you can immediately initialize it so that initialization functions know that no memory has been allocated yet:</p>
+<p><a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> strm = LZMA_STREAM_INIT;</p>
+<p>If you need to initialize a dynamically allocated <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a>, you can use memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this violates the C standard since NULL may have different internal representation than zero, but it should be portable enough in practice. Anyway, for maximum portability, you can use something like this:</p>
+<p><a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> tmp = LZMA_STREAM_INIT; *strm = tmp; </p>
+
+</div>
+</div>
+<h2 class="groupheader">Typedef Documentation</h2>
+<a id="abbc819c74b484c846825ae1388a50a59" name="abbc819c74b484c846825ae1388a50a59"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abbc819c74b484c846825ae1388a50a59">&#9670;&#160;</a></span>lzma_bool</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef unsigned char <a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Boolean. </p>
+<p>This is here because C89 doesn't have stdbool.h. To set a value for variables having type lzma_bool, you can use</p><ul>
+<li>C99's `true' and `false' from stdbool.h;</li>
+<li>C++'s internal `true' and `false'; or</li>
+<li>integers one (true) and zero (false). </li>
+</ul>
+
+</div>
+</div>
+<a id="ab1a60127c640135687a5bcc232cec906" name="ab1a60127c640135687a5bcc232cec906"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab1a60127c640135687a5bcc232cec906">&#9670;&#160;</a></span>lzma_internal</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef struct lzma_internal_s <a class="el" href="base_8h.html#ab1a60127c640135687a5bcc232cec906">lzma_internal</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Internal data structure. </p>
+<p>The contents of this structure is not visible outside the library. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="a05805a07754b2aa22f7d443eb7ece41a" name="a05805a07754b2aa22f7d443eb7ece41a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a05805a07754b2aa22f7d443eb7ece41a">&#9670;&#160;</a></span>lzma_reserved_enum</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="base_8h.html#a05805a07754b2aa22f7d443eb7ece41a">lzma_reserved_enum</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Type of reserved enumeration variable in structures. </p>
+<p>To avoid breaking library ABI when new features are added, several structures contain extra variables that may be used in future. Since sizeof(enum) can be different than sizeof(int), and sizeof(enum) may even vary depending on the range of enumeration constants, we specify a separate type to be used for reserved enumeration variables. All enumeration constants in liblzma API will be non-negative and less than 128, which should guarantee that the ABI won't break even when new constants are added to existing enumerations. </p>
+
+</div>
+</div>
+<a id="a8494e0457e1463d6d2b6836018d87b6e" name="a8494e0457e1463d6d2b6836018d87b6e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8494e0457e1463d6d2b6836018d87b6e">&#9670;&#160;</a></span>lzma_ret</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Return values used by several functions in liblzma. </p>
+<p>Check the descriptions of specific functions to find out which return values they can return. With some functions the return values may have more specific meanings than described here; those differences are described per-function basis. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6eac003781ccb81bbd5578e29abed8a8cfe" name="a8494e0457e1463d6d2b6836018d87b6eac003781ccb81bbd5578e29abed8a8cfe"></a>LZMA_OK&#160;</td><td class="fielddoc"><p>Operation completed successfully. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea91ecc6fab14c13ad36224afbcb4e55c4" name="a8494e0457e1463d6d2b6836018d87b6ea91ecc6fab14c13ad36224afbcb4e55c4"></a>LZMA_STREAM_END&#160;</td><td class="fielddoc"><p>End of stream was reached. </p>
+<p>In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or LZMA_FINISH was finished. In decoder, this indicates that all the data was successfully decoded.</p>
+<p>In all cases, when LZMA_STREAM_END is returned, the last output bytes should be picked from strm-&gt;next_out. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6eaa720d30092d504d7d138a320db1905ef" name="a8494e0457e1463d6d2b6836018d87b6eaa720d30092d504d7d138a320db1905ef"></a>LZMA_NO_CHECK&#160;</td><td class="fielddoc"><p>Input stream has no integrity check. </p>
+<p>This return value can be returned only if the LZMA_TELL_NO_CHECK flag was used when initializing the decoder. LZMA_NO_CHECK is just a warning, and the decoding can be continued normally.</p>
+<p>It is possible to call <a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746" title="Get the type of the integrity check.">lzma_get_check()</a> immediately after lzma_code has returned LZMA_NO_CHECK. The result will naturally be LZMA_CHECK_NONE, but the possibility to call <a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746" title="Get the type of the integrity check.">lzma_get_check()</a> may be convenient in some applications. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea989f393a1772d85bf545a9da48fc7ac2" name="a8494e0457e1463d6d2b6836018d87b6ea989f393a1772d85bf545a9da48fc7ac2"></a>LZMA_UNSUPPORTED_CHECK&#160;</td><td class="fielddoc"><p>Cannot calculate the integrity check. </p>
+<p>The usage of this return value is different in encoders and decoders.</p>
+<p>Encoders can return this value only from the initialization function. If initialization fails with this value, the encoding cannot be done, because there's no way to produce output with the correct integrity check.</p>
+<p>Decoders can return this value only from <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> and only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when initializing the decoder. The decoding can still be continued normally even if the check type is unsupported, but naturally the check will not be validated, and possible errors may go undetected.</p>
+<p>With decoder, it is possible to call <a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746" title="Get the type of the integrity check.">lzma_get_check()</a> immediately after <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> has returned LZMA_UNSUPPORTED_CHECK. This way it is possible to find out what the unsupported Check ID was. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6eaa5b648c18da0f584f621cfdf7fef1bdb" name="a8494e0457e1463d6d2b6836018d87b6eaa5b648c18da0f584f621cfdf7fef1bdb"></a>LZMA_GET_CHECK&#160;</td><td class="fielddoc"><p>Integrity check type is now available. </p>
+<p>This value can be returned only by the <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> function and only if the decoder was initialized with the LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the application that it may now call <a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746" title="Get the type of the integrity check.">lzma_get_check()</a> to find out the Check ID. This can be used, for example, to implement a decoder that accepts only files that have strong enough integrity check. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea567e1464feca03900a5425fb45b2f5b6" name="a8494e0457e1463d6d2b6836018d87b6ea567e1464feca03900a5425fb45b2f5b6"></a>LZMA_MEM_ERROR&#160;</td><td class="fielddoc"><p>Cannot allocate memory. </p>
+<p>Memory allocation failed, or the size of the allocation would be greater than SIZE_MAX.</p>
+<p>Due to internal implementation reasons, the coding cannot be continued even if more memory were made available after LZMA_MEM_ERROR. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6eaa1d705effe6026f32c0fe9756b6326bc" name="a8494e0457e1463d6d2b6836018d87b6eaa1d705effe6026f32c0fe9756b6326bc"></a>LZMA_MEMLIMIT_ERROR&#160;</td><td class="fielddoc"><p>Memory usage limit was reached. </p>
+<p>Decoder would need more memory than allowed by the specified memory usage limit. To continue decoding, the memory usage limit has to be increased with <a class="el" href="base_8h.html#afc49d4cf75b73128a167df3407505f7b" title="Set the memory usage limit.">lzma_memlimit_set()</a>.</p>
+<p>liblzma 5.2.6 and earlier had a bug in single-threaded .xz decoder (<a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0" title="Initialize .xz Stream decoder.">lzma_stream_decoder()</a>) which made it impossible to continue decoding after LZMA_MEMLIMIT_ERROR even if the limit was increased using <a class="el" href="base_8h.html#afc49d4cf75b73128a167df3407505f7b" title="Set the memory usage limit.">lzma_memlimit_set()</a>. Other decoders worked correctly. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea63b7a58949854eb9307f8e351358d56c" name="a8494e0457e1463d6d2b6836018d87b6ea63b7a58949854eb9307f8e351358d56c"></a>LZMA_FORMAT_ERROR&#160;</td><td class="fielddoc"><p>File format not recognized. </p>
+<p>The decoder did not recognize the input as supported file format. This error can occur, for example, when trying to decode .lzma format file with lzma_stream_decoder, because lzma_stream_decoder accepts only the .xz format. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6eaa9ff6dfee36b7aba4fae60706d37425f" name="a8494e0457e1463d6d2b6836018d87b6eaa9ff6dfee36b7aba4fae60706d37425f"></a>LZMA_OPTIONS_ERROR&#160;</td><td class="fielddoc"><p>Invalid or unsupported options. </p>
+<p>Invalid or unsupported options, for example</p><ul>
+<li>unsupported filter(s) or filter options; or</li>
+<li>reserved bits set in headers (decoder only).</li>
+</ul>
+<p>Rebuilding liblzma with more features enabled, or upgrading to a newer version of liblzma may help. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea3aa72729a844790e39b4e1101a731dfb" name="a8494e0457e1463d6d2b6836018d87b6ea3aa72729a844790e39b4e1101a731dfb"></a>LZMA_DATA_ERROR&#160;</td><td class="fielddoc"><p>Data is corrupt. </p>
+<p>The usage of this return value is different in encoders and decoders. In both encoder and decoder, the coding cannot continue after this error.</p>
+<p>Encoders return this if size limits of the target file format would be exceeded. These limits are huge, thus getting this error from an encoder is mostly theoretical. For example, the maximum compressed and uncompressed size of a .xz Stream is roughly 8 EiB (2^63 bytes).</p>
+<p>Decoders return this error if the input data is corrupt. This can mean, for example, invalid CRC32 in headers or invalid check of uncompressed data. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea9ca0ecb62459bdc84d6af47d16b23ae5" name="a8494e0457e1463d6d2b6836018d87b6ea9ca0ecb62459bdc84d6af47d16b23ae5"></a>LZMA_BUF_ERROR&#160;</td><td class="fielddoc"><p>No progress is possible. </p>
+<p>This error code is returned when the coder cannot consume any new input and produce any new output. The most common reason for this error is that the input stream being decoded is truncated or corrupt.</p>
+<p>This error is not fatal. Coding can be continued normally by providing more input and/or more output space, if possible.</p>
+<p>Typically the first call to <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> that can do no progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only the second consecutive call doing no progress will return LZMA_BUF_ERROR. This is intentional.</p>
+<p>With zlib, Z_BUF_ERROR may be returned even if the application is doing nothing wrong, so apps will need to handle Z_BUF_ERROR specially. The above hack guarantees that liblzma never returns LZMA_BUF_ERROR to properly written applications unless the input file is truncated or corrupt. This should simplify the applications a little. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea2dac8d451cb38da8550653d0d7be4ec2" name="a8494e0457e1463d6d2b6836018d87b6ea2dac8d451cb38da8550653d0d7be4ec2"></a>LZMA_PROG_ERROR&#160;</td><td class="fielddoc"><p>Programming error. </p>
+<p>This indicates that the arguments given to the function are invalid or the internal state of the decoder is corrupt.</p><ul>
+<li>Function arguments are invalid or the structures pointed by the argument pointers are invalid e.g. if strm-&gt;next_out has been set to NULL and strm-&gt;avail_out &gt; 0 when calling <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>.</li>
+<li>lzma_* functions have been called in wrong order e.g. <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> was called right after <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a>.</li>
+<li>If errors occur randomly, the reason might be flaky hardware.</li>
+</ul>
+<p>If you think that your code is correct, this error code can be a sign of a bug in liblzma. See the documentation how to report bugs. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a8494e0457e1463d6d2b6836018d87b6ea6cf28e5345851f13bd798a4eab8cc939" name="a8494e0457e1463d6d2b6836018d87b6ea6cf28e5345851f13bd798a4eab8cc939"></a>LZMA_SEEK_NEEDED&#160;</td><td class="fielddoc"><p>Request to change the input file position. </p>
+<p>Some coders can do random access in the input file. The initialization functions of these coders take the file size as an argument. No other coders can return LZMA_SEEK_NEEDED.</p>
+<p>When this value is returned, the application must seek to the file position given in <a class="el" href="structlzma__stream.html#af7c43a61f3dfeb0b9c8487b7f275054e" title="New seek input position for LZMA_SEEK_NEEDED.">lzma_stream.seek_pos</a>. This value is guaranteed to never exceed the file size that was specified at the coder initialization.</p>
+<p>After seeking the application should read new input and pass it normally via <a class="el" href="structlzma__stream.html#a72fdc738c793f07a5c29715aa57802cf">lzma_stream.next_in</a> and .avail_in. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="aa92efcbf3cecfcac79c81fc645fce77e" name="aa92efcbf3cecfcac79c81fc645fce77e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa92efcbf3cecfcac79c81fc645fce77e">&#9670;&#160;</a></span>lzma_action</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">lzma_action</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>The `action' argument for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> </p>
+<p>After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER, or LZMA_FINISH, the same `action' must be used until <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> returns LZMA_STREAM_END. Also, the amount of input (that is, strm-&gt;avail_in) must not be modified by the application until <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> returns LZMA_STREAM_END. Changing the `action' or modifying the amount of input will make <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> return LZMA_PROG_ERROR. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1" name="aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1"></a>LZMA_RUN&#160;</td><td class="fielddoc"><p>Continue coding. </p>
+<p>Encoder: Encode as much input as possible. Some internal buffering will probably be done (depends on the filter chain in use), which causes latency: the input used won't usually be decodeable from the output of the same <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> call.</p>
+<p>Decoder: Decode as much input as possible and produce as much output as possible. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170" name="aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170"></a>LZMA_SYNC_FLUSH&#160;</td><td class="fielddoc"><p>Make all the input available at output. </p>
+<p>Normally the encoder introduces some latency. LZMA_SYNC_FLUSH forces all the buffered data to be available at output without resetting the internal state of the encoder. This way it is possible to use compressed stream for example for communication over network.</p>
+<p>Only some filters support LZMA_SYNC_FLUSH. Trying to use LZMA_SYNC_FLUSH with filters that don't support it will make <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> return LZMA_OPTIONS_ERROR. For example, LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.</p>
+<p>Using LZMA_SYNC_FLUSH very often can dramatically reduce the compression ratio. With some filters (for example, LZMA2), fine-tuning the compression options may help mitigate this problem significantly (for example, match finder with LZMA2).</p>
+<p>Decoders don't support LZMA_SYNC_FLUSH. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="aa92efcbf3cecfcac79c81fc645fce77eaab46f0d7c721f1ec377e9575eab2586f" name="aa92efcbf3cecfcac79c81fc645fce77eaab46f0d7c721f1ec377e9575eab2586f"></a>LZMA_FULL_FLUSH&#160;</td><td class="fielddoc"><p>Finish encoding of the current Block. </p>
+<p>All the input data going to the current Block must have been given to the encoder (the last bytes can still be pending in *next_in). Call <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> with LZMA_FULL_FLUSH until it returns LZMA_STREAM_END. Then continue normally with LZMA_RUN or finish the Stream with LZMA_FINISH.</p>
+<p>This action is currently supported only by Stream encoder and easy encoder (which uses Stream encoder). If there is no unfinished Block, no empty Block is created. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="aa92efcbf3cecfcac79c81fc645fce77eaf7bf60e3555a4d10ffad3ecc3d2e01f1" name="aa92efcbf3cecfcac79c81fc645fce77eaf7bf60e3555a4d10ffad3ecc3d2e01f1"></a>LZMA_FULL_BARRIER&#160;</td><td class="fielddoc"><p>Finish encoding of the current Block. </p>
+<p>This is like LZMA_FULL_FLUSH except that this doesn't necessarily wait until all the input has been made available via the output buffer. That is, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> might return LZMA_STREAM_END as soon as all the input has been consumed (avail_in == 0).</p>
+<p>LZMA_FULL_BARRIER is useful with a threaded encoder if one wants to split the .xz Stream into Blocks at specific offsets but doesn't care if the output isn't flushed immediately. Using LZMA_FULL_BARRIER allows keeping the threads busy while LZMA_FULL_FLUSH would make <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> wait until all the threads have finished until more data could be passed to the encoder.</p>
+<p>With a <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> initialized with the single-threaded <a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52" title="Initialize .xz Stream encoder using a custom filter chain.">lzma_stream_encoder()</a> or <a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4" title="Initialize .xz Stream encoder using a preset number.">lzma_easy_encoder()</a>, LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="aa92efcbf3cecfcac79c81fc645fce77ea7d24fb3c6c144d13bcb091195b8ebec1" name="aa92efcbf3cecfcac79c81fc645fce77ea7d24fb3c6c144d13bcb091195b8ebec1"></a>LZMA_FINISH&#160;</td><td class="fielddoc"><p>Finish the coding operation. </p>
+<p>All the input data must have been given to the encoder (the last bytes can still be pending in next_in). Call <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> with LZMA_FINISH until it returns LZMA_STREAM_END. Once LZMA_FINISH has been used, the amount of input must no longer be changed by the application.</p>
+<p>When decoding, using LZMA_FINISH is optional unless the LZMA_CONCATENATED flag was used when the decoder was initialized. When LZMA_CONCATENATED was not used, the only effect of LZMA_FINISH is that the amount of input must not be changed just like in the encoder. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a28cc09bc422d5ba1e0187c9f2af5d957" name="a28cc09bc422d5ba1e0187c9f2af5d957"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a28cc09bc422d5ba1e0187c9f2af5d957">&#9670;&#160;</a></span>lzma_code()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_code </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">lzma_action</a>&#160;</td>
+ <td class="paramname"><em>action</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encode or decode data. </p>
+<p>Once the <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> has been successfully initialized (e.g. with <a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52" title="Initialize .xz Stream encoder using a custom filter chain.">lzma_stream_encoder()</a>), the actual encoding or decoding is done using this function. The application has to update strm-&gt;next_in, strm-&gt;avail_in, strm-&gt;next_out, and strm-&gt;avail_out to pass input to and get output from liblzma.</p>
+<p>See the description of the coder-specific initialization function to find out what `action' values are supported by the coder.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">action</td><td>Action for this function to take. Must be a valid lzma_action enum value.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Any valid lzma_ret. See the lzma_ret enum description for more information. </dd></dl>
+
+</div>
+</div>
+<a id="a854ff37464ae1225febf14db1af43308" name="a854ff37464ae1225febf14db1af43308"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a854ff37464ae1225febf14db1af43308">&#9670;&#160;</a></span>lzma_end()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void lzma_end </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Free memory allocated for the coder data structures. </p>
+<p>After lzma_end(strm), strm-&gt;internal is guaranteed to be NULL. No other members of the <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> structure are touched.</p>
+<dl class="section note"><dt>Note</dt><dd>zlib indicates an error if application end()s unfinished stream structure. liblzma doesn't do this, and assumes that application knows what it is doing.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ab6447cd68eeecbd6b88f21daeb8ce751" name="ab6447cd68eeecbd6b88f21daeb8ce751"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab6447cd68eeecbd6b88f21daeb8ce751">&#9670;&#160;</a></span>lzma_get_progress()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void lzma_get_progress </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t *&#160;</td>
+ <td class="paramname"><em>progress_in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t *&#160;</td>
+ <td class="paramname"><em>progress_out</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get progress information. </p>
+<p>In single-threaded mode, applications can get progress information from strm-&gt;total_in and strm-&gt;total_out. In multi-threaded mode this is less useful because a significant amount of both input and output data gets buffered internally by liblzma. This makes total_in and total_out give misleading information and also makes the progress indicator updates non-smooth.</p>
+<p>This function gives realistic progress information also in multi-threaded mode by taking into account the progress made by each thread. In single-threaded mode *progress_in and *progress_out are set to strm-&gt;total_in and strm-&gt;total_out, respectively.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">progress_in</td><td>Pointer to the number of input bytes processed. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">progress_out</td><td>Pointer to the number of output bytes processed. </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a418b210cf206782a73cd9de7dc27f670" name="a418b210cf206782a73cd9de7dc27f670"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a418b210cf206782a73cd9de7dc27f670">&#9670;&#160;</a></span>lzma_memusage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_memusage </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the memory usage of decoder filter chain. </p>
+<p>This function is currently supported only when *strm has been initialized with a function that takes a memlimit argument. With other functions, you should use e.g. <a class="el" href="filter_8h.html#a730f9391e85a5979bcd1b32643ae7176" title="Calculate approximate memory requirements for raw encoder.">lzma_raw_encoder_memusage()</a> or <a class="el" href="filter_8h.html#a58511249ae9206d7de7c5d1f05842297" title="Calculate approximate memory requirements for raw decoder.">lzma_raw_decoder_memusage()</a> to estimate the memory requirements.</p>
+<p>This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big the memory usage limit should have been to decode the input. Note that this may give misleading information if decoding .xz Streams that have multiple Blocks, because each Block can have different memory requirements.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>How much memory is currently allocated for the filter decoders. If no filter chain is currently allocated, some non-zero value is still returned, which is less than or equal to what any filter chain would indicate as its memory requirement.</dd></dl>
+<p>If this function isn't supported by *strm or some other error occurs, zero is returned. </p>
+
+</div>
+</div>
+<a id="ac871bc2ead5d482c6d6b3d51bfec365c" name="ac871bc2ead5d482c6d6b3d51bfec365c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac871bc2ead5d482c6d6b3d51bfec365c">&#9670;&#160;</a></span>lzma_memlimit_get()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_memlimit_get </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the current memory usage limit. </p>
+<p>This function is supported only when *strm has been initialized with a function that takes a memlimit argument.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>On success, the current memory usage limit is returned (always non-zero). On error, zero is returned. </dd></dl>
+
+</div>
+</div>
+<a id="afc49d4cf75b73128a167df3407505f7b" name="afc49d4cf75b73128a167df3407505f7b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afc49d4cf75b73128a167df3407505f7b">&#9670;&#160;</a></span>lzma_memlimit_set()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_memlimit_set </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>memlimit</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Set the memory usage limit. </p>
+<p>This function is supported only when *strm has been initialized with a function that takes a memlimit argument.</p>
+<p>liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes this function to do nothing (leaving the limit unchanged) and still return LZMA_OK. Later versions treat 0 as if 1 had been specified (so <a class="el" href="base_8h.html#ac871bc2ead5d482c6d6b3d51bfec365c" title="Get the current memory usage limit.">lzma_memlimit_get()</a> will return 1 even if you specify 0 here).</p>
+<p>liblzma 5.2.6 and earlier had a bug in single-threaded .xz decoder (<a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0" title="Initialize .xz Stream decoder.">lzma_stream_decoder()</a>) which made it impossible to continue decoding after LZMA_MEMLIMIT_ERROR even if the limit was increased using <a class="el" href="base_8h.html#afc49d4cf75b73128a167df3407505f7b" title="Set the memory usage limit.">lzma_memlimit_set()</a>. Other decoders worked correctly.</p>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: New memory usage limit successfully set.</li>
+<li>LZMA_MEMLIMIT_ERROR: The new limit is too small. The limit was not changed.</li>
+<li>LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't support memory usage limit. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/bc_s.png b/doc/api/bc_s.png
new file mode 100644
index 0000000..bb50b82
--- /dev/null
+++ b/doc/api/bc_s.png
Binary files differ
diff --git a/doc/api/bc_sd.png b/doc/api/bc_sd.png
new file mode 100644
index 0000000..8d8be4c
--- /dev/null
+++ b/doc/api/bc_sd.png
Binary files differ
diff --git a/doc/api/bcj_8h.html b/doc/api/bcj_8h.html
new file mode 100644
index 0000000..1dabca4
--- /dev/null
+++ b/doc/api/bcj_8h.html
@@ -0,0 +1,105 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/bcj.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> </div>
+ <div class="headertitle"><div class="title">bcj.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Branch/Call/Jump conversion filters.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__bcj.html">lzma_options_bcj</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for BCJ filters. <a href="structlzma__options__bcj.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:aa9eac1f580ddde3309518cd153d596b1"><td class="memItemLeft" align="right" valign="top"><a id="aa9eac1f580ddde3309518cd153d596b1" name="aa9eac1f580ddde3309518cd153d596b1"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_FILTER_X86</b>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x04)</td></tr>
+<tr class="memdesc:aa9eac1f580ddde3309518cd153d596b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter for x86 binaries. <br /></td></tr>
+<tr class="separator:aa9eac1f580ddde3309518cd153d596b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab7f667d4a5d319f227f23163cbea086f"><td class="memItemLeft" align="right" valign="top"><a id="ab7f667d4a5d319f227f23163cbea086f" name="ab7f667d4a5d319f227f23163cbea086f"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_FILTER_POWERPC</b>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x05)</td></tr>
+<tr class="memdesc:ab7f667d4a5d319f227f23163cbea086f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter for Big endian PowerPC binaries. <br /></td></tr>
+<tr class="separator:ab7f667d4a5d319f227f23163cbea086f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2fe36218a38f400e1ce40820758f7427"><td class="memItemLeft" align="right" valign="top"><a id="a2fe36218a38f400e1ce40820758f7427" name="a2fe36218a38f400e1ce40820758f7427"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_FILTER_IA64</b>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x06)</td></tr>
+<tr class="memdesc:a2fe36218a38f400e1ce40820758f7427"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter for IA-64 (Itanium) binaries. <br /></td></tr>
+<tr class="separator:a2fe36218a38f400e1ce40820758f7427"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a495a58f63ebc7a8b756099efba492f8b"><td class="memItemLeft" align="right" valign="top"><a id="a495a58f63ebc7a8b756099efba492f8b" name="a495a58f63ebc7a8b756099efba492f8b"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_FILTER_ARM</b>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x07)</td></tr>
+<tr class="memdesc:a495a58f63ebc7a8b756099efba492f8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter for ARM binaries. <br /></td></tr>
+<tr class="separator:a495a58f63ebc7a8b756099efba492f8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ec62e7e5e7df3d9af5b2ea3f857689a"><td class="memItemLeft" align="right" valign="top"><a id="a5ec62e7e5e7df3d9af5b2ea3f857689a" name="a5ec62e7e5e7df3d9af5b2ea3f857689a"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_FILTER_ARMTHUMB</b>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x08)</td></tr>
+<tr class="memdesc:a5ec62e7e5e7df3d9af5b2ea3f857689a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter for ARM-Thumb binaries. <br /></td></tr>
+<tr class="separator:a5ec62e7e5e7df3d9af5b2ea3f857689a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a50941088e93ef659c6b000bbcaf58143"><td class="memItemLeft" align="right" valign="top"><a id="a50941088e93ef659c6b000bbcaf58143" name="a50941088e93ef659c6b000bbcaf58143"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_FILTER_SPARC</b>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x09)</td></tr>
+<tr class="memdesc:a50941088e93ef659c6b000bbcaf58143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter for SPARC binaries. <br /></td></tr>
+<tr class="separator:a50941088e93ef659c6b000bbcaf58143"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a01765158cd31cac21b272b180628fc4b"><td class="memItemLeft" align="right" valign="top"><a id="a01765158cd31cac21b272b180628fc4b" name="a01765158cd31cac21b272b180628fc4b"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_FILTER_ARM64</b>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x0A)</td></tr>
+<tr class="memdesc:a01765158cd31cac21b272b180628fc4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter for ARM64 binaries. <br /></td></tr>
+<tr class="separator:a01765158cd31cac21b272b180628fc4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Branch/Call/Jump conversion filters. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/block_8h.html b/doc/api/block_8h.html
new file mode 100644
index 0000000..e2e1702
--- /dev/null
+++ b/doc/api/block_8h.html
@@ -0,0 +1,758 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/block.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">block.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>.xz Block handling
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html">lzma_block</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for the Block and Block Header encoders and decoders. <a href="structlzma__block.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:a9263c5b314592e658772e5eb83ffdd78"><td class="memItemLeft" align="right" valign="top"><a id="a9263c5b314592e658772e5eb83ffdd78" name="a9263c5b314592e658772e5eb83ffdd78"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_BLOCK_HEADER_SIZE_MIN</b>&#160;&#160;&#160;8</td></tr>
+<tr class="separator:a9263c5b314592e658772e5eb83ffdd78"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af7a39189d0721c55313a401b63811e49"><td class="memItemLeft" align="right" valign="top"><a id="af7a39189d0721c55313a401b63811e49" name="af7a39189d0721c55313a401b63811e49"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_BLOCK_HEADER_SIZE_MAX</b>&#160;&#160;&#160;1024</td></tr>
+<tr class="separator:af7a39189d0721c55313a401b63811e49"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac025c940683a70f4c7f956bad814fd5f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#ac025c940683a70f4c7f956bad814fd5f">lzma_block_header_size_decode</a>(b)&#160;&#160;&#160;(((uint32_t)(b) + 1) * 4)</td></tr>
+<tr class="memdesc:ac025c940683a70f4c7f956bad814fd5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode the Block Header Size field. <br /></td></tr>
+<tr class="separator:ac025c940683a70f4c7f956bad814fd5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ae9b47abc872d0b02c2da9d3fa5a7dacd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd">lzma_block_header_size</a> (<a class="el" href="structlzma__block.html">lzma_block</a> *block) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:ae9b47abc872d0b02c2da9d3fa5a7dacd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate Block Header Size. <br /></td></tr>
+<tr class="separator:ae9b47abc872d0b02c2da9d3fa5a7dacd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0eedbd6331d5708ea963260e6f2a92d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0">lzma_block_header_encode</a> (const <a class="el" href="structlzma__block.html">lzma_block</a> *block, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a0eedbd6331d5708ea963260e6f2a92d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode Block Header. <br /></td></tr>
+<tr class="separator:a0eedbd6331d5708ea963260e6f2a92d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7f5487c21a7b36a8bd17be36074d43c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9">lzma_block_header_decode</a> (<a class="el" href="structlzma__block.html">lzma_block</a> *block, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a7f5487c21a7b36a8bd17be36074d43c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode Block Header. <br /></td></tr>
+<tr class="separator:a7f5487c21a7b36a8bd17be36074d43c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6c3e102d76db06a07126a569abc6e2bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc">lzma_block_compressed_size</a> (<a class="el" href="structlzma__block.html">lzma_block</a> *block, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> unpadded_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a6c3e102d76db06a07126a569abc6e2bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate and set Compressed Size according to Unpadded Size. <br /></td></tr>
+<tr class="separator:a6c3e102d76db06a07126a569abc6e2bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a412d5605280fa29befae1b89e344bf30"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30">lzma_block_unpadded_size</a> (const <a class="el" href="structlzma__block.html">lzma_block</a> *block) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a412d5605280fa29befae1b89e344bf30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate Unpadded Size. <br /></td></tr>
+<tr class="separator:a412d5605280fa29befae1b89e344bf30"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a694424f9dfdd5151e01debac1c501fa9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a694424f9dfdd5151e01debac1c501fa9">lzma_block_total_size</a> (const <a class="el" href="structlzma__block.html">lzma_block</a> *block) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a694424f9dfdd5151e01debac1c501fa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the total encoded size of a Block. <br /></td></tr>
+<tr class="separator:a694424f9dfdd5151e01debac1c501fa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2218a49025a0b44f9a6f9d6d24359359"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359">lzma_block_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, <a class="el" href="structlzma__block.html">lzma_block</a> *block) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a2218a49025a0b44f9a6f9d6d24359359"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .xz Block encoder. <br /></td></tr>
+<tr class="separator:a2218a49025a0b44f9a6f9d6d24359359"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa92c73b2a228efe921fa2376aa7adc92"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92">lzma_block_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, <a class="el" href="structlzma__block.html">lzma_block</a> *block) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:aa92c73b2a228efe921fa2376aa7adc92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .xz Block decoder. <br /></td></tr>
+<tr class="separator:aa92c73b2a228efe921fa2376aa7adc92"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a58ff73e2572b529f48cc590bfffe5b4f"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a58ff73e2572b529f48cc590bfffe5b4f">lzma_block_buffer_bound</a> (size_t uncompressed_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a58ff73e2572b529f48cc590bfffe5b4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate maximum output size for single-call Block encoding. <br /></td></tr>
+<tr class="separator:a58ff73e2572b529f48cc590bfffe5b4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af415fa5130ab64e8760e9c39e856fa54"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54">lzma_block_buffer_encode</a> (<a class="el" href="structlzma__block.html">lzma_block</a> *block, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:af415fa5130ab64e8760e9c39e856fa54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call .xz Block encoder. <br /></td></tr>
+<tr class="separator:af415fa5130ab64e8760e9c39e856fa54"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5a260f634ccd5f54fb98f570d8d92d8c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c">lzma_block_uncomp_encode</a> (<a class="el" href="structlzma__block.html">lzma_block</a> *block, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a5a260f634ccd5f54fb98f570d8d92d8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call uncompressed .xz Block encoder. <br /></td></tr>
+<tr class="separator:a5a260f634ccd5f54fb98f570d8d92d8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0c6eb869d91b08f68648b1aa7a32ee9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f">lzma_block_buffer_decode</a> (<a class="el" href="structlzma__block.html">lzma_block</a> *block, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a0c6eb869d91b08f68648b1aa7a32ee9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call .xz Block decoder. <br /></td></tr>
+<tr class="separator:a0c6eb869d91b08f68648b1aa7a32ee9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>.xz Block handling </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="ac025c940683a70f4c7f956bad814fd5f" name="ac025c940683a70f4c7f956bad814fd5f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac025c940683a70f4c7f956bad814fd5f">&#9670;&#160;</a></span>lzma_block_header_size_decode</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define lzma_block_header_size_decode</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">b</td><td>)</td>
+ <td>&#160;&#160;&#160;(((uint32_t)(b) + 1) * 4)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode the Block Header Size field. </p>
+<p>To decode Block Header using <a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a>, the size of the Block Header has to be known and stored into <a class="el" href="structlzma__block.html#a6689c4f7524b2c05772a2d6151138610" title="Size of the Block Header field in bytes.">lzma_block.header_size</a>. The size can be calculated from the first byte of a Block using this macro. Note that if the first byte is 0x00, it indicates beginning of Index; use this macro only when the byte is not 0x00.</p>
+<p>There is no encoding macro because <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a> and <a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a> should be used. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ae9b47abc872d0b02c2da9d3fa5a7dacd" name="ae9b47abc872d0b02c2da9d3fa5a7dacd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae9b47abc872d0b02c2da9d3fa5a7dacd">&#9670;&#160;</a></span>lzma_block_header_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_header_size </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate Block Header Size. </p>
+<p>Calculate the minimum size needed for the Block Header field using the settings specified in the <a class="el" href="structlzma__block.html" title="Options for the Block and Block Header encoders and decoders.">lzma_block</a> structure. Note that it is OK to increase the calculated header_size value as long as it is a multiple of four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size just means that <a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a> will add Header Padding.</p>
+<dl class="section note"><dt>Note</dt><dd>This doesn't check that all the options are valid i.e. this may return LZMA_OK even if <a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a> or <a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a> would fail. If you want to validate the filter chain, consider using lzma_memlimit_encoder() which as a side-effect validates the filter chain.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">block</td><td>Block options</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Size calculated successfully and stored to block-&gt;header_size.</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported version, filters or filter options.</li>
+<li>LZMA_PROG_ERROR: Invalid values like compressed_size == 0. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a0eedbd6331d5708ea963260e6f2a92d0" name="a0eedbd6331d5708ea963260e6f2a92d0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0eedbd6331d5708ea963260e6f2a92d0">&#9670;&#160;</a></span>lzma_block_header_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_header_encode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encode Block Header. </p>
+<p>The caller must have calculated the size of the Block Header already with <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a>. If a value larger than the one calculated by <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a> is used, the Block Header will be padded to the specified size.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">block</td><td>Block options to be encoded. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer. This must be at least block-&gt;header_size bytes.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful. block-&gt;header_size bytes were written to output buffer.</li>
+<li>LZMA_OPTIONS_ERROR: Invalid or unsupported options.</li>
+<li>LZMA_PROG_ERROR: Invalid arguments, for example block-&gt;header_size is invalid or block-&gt;filters is NULL. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a7f5487c21a7b36a8bd17be36074d43c9" name="a7f5487c21a7b36a8bd17be36074d43c9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7f5487c21a7b36a8bd17be36074d43c9">&#9670;&#160;</a></span>lzma_block_header_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_header_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode Block Header. </p>
+<p>block-&gt;version should (usually) be set to the highest value supported by the application. If the application sets block-&gt;version to a value higher than supported by the current liblzma version, this function will downgrade block-&gt;version to the highest value supported by it. Thus one should check the value of block-&gt;version after calling this function if block-&gt;version was set to a non-zero value and the application doesn't otherwise know that the liblzma version being used is new enough to support the specified block-&gt;version.</p>
+<p>The size of the Block Header must have already been decoded with <a class="el" href="block_8h.html#ac025c940683a70f4c7f956bad814fd5f" title="Decode the Block Header Size field.">lzma_block_header_size_decode()</a> macro and stored to block-&gt;header_size.</p>
+<p>The integrity check type from Stream Header must have been stored to block-&gt;check.</p>
+<p>block-&gt;filters must have been allocated, but they don't need to be initialized (possible existing filter options are not freed).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">block</td><td>Destination for Block options </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() (and also free() if an error occurs). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer. This must be at least block-&gt;header_size bytes.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Decoding was successful. block-&gt;header_size bytes were read from the input buffer.</li>
+<li>LZMA_OPTIONS_ERROR: The Block Header specifies some unsupported options such as unsupported filters. This can happen also if block-&gt;version was set to a too low value compared to what would be required to properly represent the information stored in the Block Header.</li>
+<li>LZMA_DATA_ERROR: Block Header is corrupt, for example, the CRC32 doesn't match.</li>
+<li>LZMA_PROG_ERROR: Invalid arguments, for example block-&gt;header_size is invalid or block-&gt;filters is NULL. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a6c3e102d76db06a07126a569abc6e2bc" name="a6c3e102d76db06a07126a569abc6e2bc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6c3e102d76db06a07126a569abc6e2bc">&#9670;&#160;</a></span>lzma_block_compressed_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_compressed_size </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>unpadded_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Validate and set Compressed Size according to Unpadded Size. </p>
+<p>Block Header stores Compressed Size, but Index has Unpadded Size. If the application has already parsed the Index and is now decoding Blocks, it can calculate Compressed Size from Unpadded Size. This function does exactly that with error checking:</p>
+<ul>
+<li>Compressed Size calculated from Unpadded Size must be positive integer, that is, Unpadded Size must be big enough that after Block Header and Check fields there's still at least one byte for Compressed Size.</li>
+<li>If Compressed Size was present in Block Header, the new value calculated from Unpadded Size is compared against the value from Block Header.</li>
+</ul>
+<dl class="section note"><dt>Note</dt><dd>This function must be called _after_ decoding the Block Header field so that it can properly validate Compressed Size if it was present in Block Header.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">block</td><td>Block options: block-&gt;header_size must already be set with <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a>. </td></tr>
+ <tr><td class="paramname">unpadded_size</td><td>Unpadded Size from the Index field in bytes</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: block-&gt;compressed_size was set successfully.</li>
+<li>LZMA_DATA_ERROR: unpadded_size is too small compared to block-&gt;header_size and lzma_check_size(block-&gt;check).</li>
+<li>LZMA_PROG_ERROR: Some values are invalid. For example, block-&gt;header_size must be a multiple of four and between 8 and 1024 inclusive. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a412d5605280fa29befae1b89e344bf30" name="a412d5605280fa29befae1b89e344bf30"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a412d5605280fa29befae1b89e344bf30">&#9670;&#160;</a></span>lzma_block_unpadded_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_block_unpadded_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate Unpadded Size. </p>
+<p>The Index field stores Unpadded Size and Uncompressed Size. The latter can be taken directly from the <a class="el" href="structlzma__block.html" title="Options for the Block and Block Header encoders and decoders.">lzma_block</a> structure after coding a Block, but Unpadded Size needs to be calculated from Block Header Size, Compressed Size, and size of the Check field. This is where this function is needed.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">block</td><td>Block options: block-&gt;header_size must already be set with <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a>.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Unpadded Size on success, or zero on error. </dd></dl>
+
+</div>
+</div>
+<a id="a694424f9dfdd5151e01debac1c501fa9" name="a694424f9dfdd5151e01debac1c501fa9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a694424f9dfdd5151e01debac1c501fa9">&#9670;&#160;</a></span>lzma_block_total_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_block_total_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate the total encoded size of a Block. </p>
+<p>This is equivalent to <a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30" title="Calculate Unpadded Size.">lzma_block_unpadded_size()</a> except that the returned value includes the size of the Block Padding field.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">block</td><td>Block options: block-&gt;header_size must already be set with <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a>.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>On success, total encoded size of the Block. On error, zero is returned. </dd></dl>
+
+</div>
+</div>
+<a id="a2218a49025a0b44f9a6f9d6d24359359" name="a2218a49025a0b44f9a6f9d6d24359359"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2218a49025a0b44f9a6f9d6d24359359">&#9670;&#160;</a></span>lzma_block_encoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_encoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .xz Block encoder. </p>
+<p>Valid actions for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN, LZMA_SYNC_FLUSH (only if the filter chain supports it), and LZMA_FINISH.</p>
+<p>The Block encoder encodes the Block Data, Block Padding, and Check value. It does NOT encode the Block Header which can be encoded with <a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">block</td><td>Block options: block-&gt;version, block-&gt;check, and block-&gt;filters must have been initialized.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: All good, continue with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_UNSUPPORTED_CHECK: block-&gt;check specifies a Check ID that is not supported by this build of liblzma. Initializing the encoder failed.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="aa92c73b2a228efe921fa2376aa7adc92" name="aa92c73b2a228efe921fa2376aa7adc92"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa92c73b2a228efe921fa2376aa7adc92">&#9670;&#160;</a></span>lzma_block_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .xz Block decoder. </p>
+<p>Valid actions for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN and LZMA_FINISH. Using LZMA_FINISH is not required. It is supported only for convenience.</p>
+<p>The Block decoder decodes the Block Data, Block Padding, and Check value. It does NOT decode the Block Header which can be decoded with <a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">block</td><td>Block options</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: All good, continue with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>.</li>
+<li>LZMA_PROG_ERROR</li>
+<li>LZMA_MEM_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a58ff73e2572b529f48cc590bfffe5b4f" name="a58ff73e2572b529f48cc590bfffe5b4f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a58ff73e2572b529f48cc590bfffe5b4f">&#9670;&#160;</a></span>lzma_block_buffer_bound()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t lzma_block_buffer_bound </td>
+ <td>(</td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>uncompressed_size</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate maximum output size for single-call Block encoding. </p>
+<p>This is equivalent to <a class="el" href="container_8h.html#a66d4366a47b8332bff2a512f44f5c45e" title="Calculate output buffer size for single-call Stream encoder.">lzma_stream_buffer_bound()</a> but for .xz Blocks. See the documentation of <a class="el" href="container_8h.html#a66d4366a47b8332bff2a512f44f5c45e" title="Calculate output buffer size for single-call Stream encoder.">lzma_stream_buffer_bound()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">uncompressed_size</td><td>Size of the data to be encoded with the single-call Block encoder.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Maximum output size in bytes for single-call Block encoding. </dd></dl>
+
+</div>
+</div>
+<a id="af415fa5130ab64e8760e9c39e856fa54" name="af415fa5130ab64e8760e9c39e856fa54"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af415fa5130ab64e8760e9c39e856fa54">&#9670;&#160;</a></span>lzma_block_buffer_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_buffer_encode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call .xz Block encoder. </p>
+<p>In contrast to the multi-call encoder initialized with <a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a>, this function encodes also the Block Header. This is required to make it possible to write appropriate Block Header also in case the data isn't compressible, and different filter chain has to be used to encode the data in uncompressed form using uncompressed chunks of the LZMA2 filter.</p>
+<p>When the data isn't compressible, header_size, compressed_size, and uncompressed_size are set just like when the data was compressible, but it is possible that header_size is too small to hold the filter chain specified in block-&gt;filters, because that isn't necessarily the filter chain that was actually used to encode the data. <a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30" title="Calculate Unpadded Size.">lzma_block_unpadded_size()</a> still works normally, because it doesn't read the filters array.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">block</td><td>Block options: block-&gt;version, block-&gt;check, and block-&gt;filters must have been initialized. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_BUF_ERROR: Not enough output buffer space.</li>
+<li>LZMA_UNSUPPORTED_CHECK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a5a260f634ccd5f54fb98f570d8d92d8c" name="a5a260f634ccd5f54fb98f570d8d92d8c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5a260f634ccd5f54fb98f570d8d92d8c">&#9670;&#160;</a></span>lzma_block_uncomp_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_uncomp_encode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call uncompressed .xz Block encoder. </p>
+<p>This is like <a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a> except this doesn't try to compress the data and instead encodes the data using LZMA2 uncompressed chunks. The required output buffer size can be determined with <a class="el" href="block_8h.html#a58ff73e2572b529f48cc590bfffe5b4f" title="Calculate maximum output size for single-call Block encoding.">lzma_block_buffer_bound()</a>.</p>
+<p>Since the data won't be compressed, this function ignores block-&gt;filters. This function doesn't take <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> because this function doesn't allocate any memory from the heap.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">block</td><td>Block options: block-&gt;version, block-&gt;check, and block-&gt;filters must have been initialized. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_BUF_ERROR: Not enough output buffer space.</li>
+<li>LZMA_UNSUPPORTED_CHECK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a0c6eb869d91b08f68648b1aa7a32ee9f" name="a0c6eb869d91b08f68648b1aa7a32ee9f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0c6eb869d91b08f68648b1aa7a32ee9f">&#9670;&#160;</a></span>lzma_block_buffer_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_block_buffer_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__block.html">lzma_block</a> *&#160;</td>
+ <td class="paramname"><em>block</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>in_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call .xz Block decoder. </p>
+<p>This is single-call equivalent of <a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a>, and requires that the caller has already decoded Block Header and checked its memory usage.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">block</td><td>Block options </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_pos</td><td>The next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer; the first byte that won't be read is in[in_size]. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Decoding was successful.</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_BUF_ERROR: Output buffer was too small.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/check_8h.html b/doc/api/check_8h.html
new file mode 100644
index 0000000..2323c6c
--- /dev/null
+++ b/doc/api/check_8h.html
@@ -0,0 +1,340 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/check.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#define-members">Macros</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">check.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Integrity checks.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:acd221ababe30230d9647aab469ad80cb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html#acd221ababe30230d9647aab469ad80cb">LZMA_CHECK_ID_MAX</a>&#160;&#160;&#160;15</td></tr>
+<tr class="memdesc:acd221ababe30230d9647aab469ad80cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum valid Check ID. <br /></td></tr>
+<tr class="separator:acd221ababe30230d9647aab469ad80cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a379e931cf86351ab1d97896cda9abbe0"><td class="memItemLeft" align="right" valign="top"><a id="a379e931cf86351ab1d97896cda9abbe0" name="a379e931cf86351ab1d97896cda9abbe0"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_CHECK_SIZE_MAX</b>&#160;&#160;&#160;64</td></tr>
+<tr class="memdesc:a379e931cf86351ab1d97896cda9abbe0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum size of a Check field. <br /></td></tr>
+<tr class="separator:a379e931cf86351ab1d97896cda9abbe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:a0a6100c719ac9aa49be3fdf7519e8c3f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> { <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa7b9851d75abfabc08d7fc5b4aaeb6f20">LZMA_CHECK_NONE</a> = 0
+, <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa0be65014a40b5cb4ab32252b3709bef7">LZMA_CHECK_CRC32</a> = 1
+, <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa87b4b0697a1e1ccb6766dd5c2fa24afc">LZMA_CHECK_CRC64</a> = 4
+, <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3faf26a55ddd204a50ae87ec3432e7bc309">LZMA_CHECK_SHA256</a> = 10
+ }</td></tr>
+<tr class="memdesc:a0a6100c719ac9aa49be3fdf7519e8c3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of the integrity check (Check ID) <a href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">More...</a><br /></td></tr>
+<tr class="separator:a0a6100c719ac9aa49be3fdf7519e8c3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:ae9391ed2acfad0ce9357b68c608f07d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html#ae9391ed2acfad0ce9357b68c608f07d8">lzma_check_is_supported</a> (<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> check) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:ae9391ed2acfad0ce9357b68c608f07d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if the given Check ID is supported. <br /></td></tr>
+<tr class="separator:ae9391ed2acfad0ce9357b68c608f07d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afd3fda19575d9d4f864c626c02b7cb48"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html#afd3fda19575d9d4f864c626c02b7cb48">lzma_check_size</a> (<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> check) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:afd3fda19575d9d4f864c626c02b7cb48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the Check field with the given Check ID. <br /></td></tr>
+<tr class="separator:afd3fda19575d9d4f864c626c02b7cb48"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a760b569cce91bdd01e4ce9d78823c96d"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html#a760b569cce91bdd01e4ce9d78823c96d">lzma_crc32</a> (const uint8_t *buf, size_t size, uint32_t crc) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a760b569cce91bdd01e4ce9d78823c96d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate CRC32. <br /></td></tr>
+<tr class="separator:a760b569cce91bdd01e4ce9d78823c96d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aff2e74ce671b9f82a96adb549c68cea2"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html#aff2e74ce671b9f82a96adb549c68cea2">lzma_crc64</a> (const uint8_t *buf, size_t size, uint64_t crc) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:aff2e74ce671b9f82a96adb549c68cea2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate CRC64. <br /></td></tr>
+<tr class="separator:aff2e74ce671b9f82a96adb549c68cea2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8d7c3ffabfd024485f03fa209536c746"><td class="memItemLeft" align="right" valign="top"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746">lzma_get_check</a> (const <a class="el" href="structlzma__stream.html">lzma_stream</a> *strm) lzma_nothrow</td></tr>
+<tr class="memdesc:a8d7c3ffabfd024485f03fa209536c746"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the type of the integrity check. <br /></td></tr>
+<tr class="separator:a8d7c3ffabfd024485f03fa209536c746"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Integrity checks. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="acd221ababe30230d9647aab469ad80cb" name="acd221ababe30230d9647aab469ad80cb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acd221ababe30230d9647aab469ad80cb">&#9670;&#160;</a></span>LZMA_CHECK_ID_MAX</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_CHECK_ID_MAX&#160;&#160;&#160;15</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Maximum valid Check ID. </p>
+<p>The .xz file format specification specifies 16 Check IDs (0-15). Some of them are only reserved, that is, no actual Check algorithm has been assigned. When decoding, liblzma still accepts unknown Check IDs for future compatibility. If a valid but unsupported Check ID is detected, liblzma can indicate a warning; see the flags LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_TELL_ANY_CHECK in <a class="el" href="container_8h.html" title="File formats.">container.h</a>. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="a0a6100c719ac9aa49be3fdf7519e8c3f" name="a0a6100c719ac9aa49be3fdf7519e8c3f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0a6100c719ac9aa49be3fdf7519e8c3f">&#9670;&#160;</a></span>lzma_check</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Type of the integrity check (Check ID) </p>
+<p>The .xz format supports multiple types of checks that are calculated from the uncompressed data. They vary in both speed and ability to detect errors. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a0a6100c719ac9aa49be3fdf7519e8c3fa7b9851d75abfabc08d7fc5b4aaeb6f20" name="a0a6100c719ac9aa49be3fdf7519e8c3fa7b9851d75abfabc08d7fc5b4aaeb6f20"></a>LZMA_CHECK_NONE&#160;</td><td class="fielddoc"><p>No Check is calculated.</p>
+<p>Size of the Check field: 0 bytes </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a0a6100c719ac9aa49be3fdf7519e8c3fa0be65014a40b5cb4ab32252b3709bef7" name="a0a6100c719ac9aa49be3fdf7519e8c3fa0be65014a40b5cb4ab32252b3709bef7"></a>LZMA_CHECK_CRC32&#160;</td><td class="fielddoc"><p>CRC32 using the polynomial from the IEEE 802.3 standard</p>
+<p>Size of the Check field: 4 bytes </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a0a6100c719ac9aa49be3fdf7519e8c3fa87b4b0697a1e1ccb6766dd5c2fa24afc" name="a0a6100c719ac9aa49be3fdf7519e8c3fa87b4b0697a1e1ccb6766dd5c2fa24afc"></a>LZMA_CHECK_CRC64&#160;</td><td class="fielddoc"><p>CRC64 using the polynomial from the ECMA-182 standard</p>
+<p>Size of the Check field: 8 bytes </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a0a6100c719ac9aa49be3fdf7519e8c3faf26a55ddd204a50ae87ec3432e7bc309" name="a0a6100c719ac9aa49be3fdf7519e8c3faf26a55ddd204a50ae87ec3432e7bc309"></a>LZMA_CHECK_SHA256&#160;</td><td class="fielddoc"><p>SHA-256</p>
+<p>Size of the Check field: 32 bytes </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="ae9391ed2acfad0ce9357b68c608f07d8" name="ae9391ed2acfad0ce9357b68c608f07d8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae9391ed2acfad0ce9357b68c608f07d8">&#9670;&#160;</a></span>lzma_check_is_supported()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_check_is_supported </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td>
+ <td class="paramname"><em>check</em></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Test if the given Check ID is supported. </p>
+<p>LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always supported (even if liblzma is built with limited features).</p>
+<dl class="section note"><dt>Note</dt><dd>It is safe to call this with a value that is not in the range [0, 15]; in that case the return value is always false.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">check</td><td>Check ID</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if Check ID is supported by this liblzma build.</li>
+<li>false otherwise. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="afd3fda19575d9d4f864c626c02b7cb48" name="afd3fda19575d9d4f864c626c02b7cb48"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afd3fda19575d9d4f864c626c02b7cb48">&#9670;&#160;</a></span>lzma_check_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_check_size </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td>
+ <td class="paramname"><em>check</em></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the size of the Check field with the given Check ID. </p>
+<p>Although not all Check IDs have a check algorithm associated, the size of every Check is already frozen. This function returns the size (in bytes) of the Check field with the specified Check ID. The values are: { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 }</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">check</td><td>Check ID</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Size of the Check field in bytes. If the argument is not in the range [0, 15], UINT32_MAX is returned. </dd></dl>
+
+</div>
+</div>
+<a id="a760b569cce91bdd01e4ce9d78823c96d" name="a760b569cce91bdd01e4ce9d78823c96d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a760b569cce91bdd01e4ce9d78823c96d">&#9670;&#160;</a></span>lzma_crc32()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_crc32 </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>buf</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>crc</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate CRC32. </p>
+<p>Calculate CRC32 using the polynomial from the IEEE 802.3 standard.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">buf</td><td>Pointer to the input buffer </td></tr>
+ <tr><td class="paramname">size</td><td>Size of the input buffer </td></tr>
+ <tr><td class="paramname">crc</td><td>Previously returned CRC value. This is used to calculate the CRC of a big buffer in smaller chunks. Set to zero when starting a new calculation.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Updated CRC value, which can be passed to this function again to continue CRC calculation. </dd></dl>
+
+</div>
+</div>
+<a id="aff2e74ce671b9f82a96adb549c68cea2" name="aff2e74ce671b9f82a96adb549c68cea2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aff2e74ce671b9f82a96adb549c68cea2">&#9670;&#160;</a></span>lzma_crc64()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_crc64 </td>
+ <td>(</td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>buf</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>crc</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate CRC64. </p>
+<p>Calculate CRC64 using the polynomial from the ECMA-182 standard.</p>
+<p>This function is used similarly to <a class="el" href="check_8h.html#a760b569cce91bdd01e4ce9d78823c96d" title="Calculate CRC32.">lzma_crc32()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">buf</td><td>Pointer to the input buffer </td></tr>
+ <tr><td class="paramname">size</td><td>Size of the input buffer </td></tr>
+ <tr><td class="paramname">crc</td><td>Previously returned CRC value. This is used to calculate the CRC of a big buffer in smaller chunks. Set to zero when starting a new calculation.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Updated CRC value, which can be passed to this function again to continue CRC calculation. </dd></dl>
+
+</div>
+</div>
+<a id="a8d7c3ffabfd024485f03fa209536c746" name="a8d7c3ffabfd024485f03fa209536c746"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8d7c3ffabfd024485f03fa209536c746">&#9670;&#160;</a></span>lzma_get_check()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> lzma_get_check </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the type of the integrity check. </p>
+<p>This function can be called only immediately after <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> has returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK. Calling this function in any other situation has undefined behavior.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> meeting the above conditions.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Check ID in the <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a>, or undefined if called improperly. </dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/classes.html b/doc/api/classes.html
new file mode 100644
index 0000000..a010270
--- /dev/null
+++ b/doc/api/classes.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Data Structure Index</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle"><div class="title">Data Structure Index</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="qindex"><a class="qindex" href="#letter_L">L</a></div>
+<div class="classindex">
+<dl class="classindex even">
+<dt class="alphachar"><a id="letter_L" name="letter_L">L</a></dt>
+<dd><a class="el" href="structlzma__allocator.html">lzma_allocator</a></dd><dd><a class="el" href="structlzma__block.html">lzma_block</a></dd><dd><a class="el" href="structlzma__filter.html">lzma_filter</a></dd><dd><a class="el" href="structlzma__index__iter.html">lzma_index_iter</a></dd><dd><a class="el" href="structlzma__mt.html">lzma_mt</a></dd><dd><a class="el" href="structlzma__options__bcj.html">lzma_options_bcj</a></dd><dd><a class="el" href="structlzma__options__delta.html">lzma_options_delta</a></dd><dd><a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a></dd><dd><a class="el" href="structlzma__stream.html">lzma_stream</a></dd><dd><a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a></dd></dl>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/closed.png b/doc/api/closed.png
new file mode 100644
index 0000000..91f4888
--- /dev/null
+++ b/doc/api/closed.png
Binary files differ
diff --git a/doc/api/container_8h.html b/doc/api/container_8h.html
new file mode 100644
index 0000000..332b2b1
--- /dev/null
+++ b/doc/api/container_8h.html
@@ -0,0 +1,1279 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/container.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">container.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>File formats.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html">lzma_mt</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multithreading options. <a href="structlzma__mt.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:af3ca20ff228b363a82515c1aee9e27bc"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#af3ca20ff228b363a82515c1aee9e27bc">LZMA_PRESET_DEFAULT</a>&#160;&#160;&#160;UINT32_C(6)</td></tr>
+<tr class="memdesc:af3ca20ff228b363a82515c1aee9e27bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default compression preset. <br /></td></tr>
+<tr class="separator:af3ca20ff228b363a82515c1aee9e27bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a97e40265e355a21bd2465aaa5b85f03d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a97e40265e355a21bd2465aaa5b85f03d">LZMA_PRESET_LEVEL_MASK</a>&#160;&#160;&#160;UINT32_C(0x1F)</td></tr>
+<tr class="memdesc:a97e40265e355a21bd2465aaa5b85f03d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask for preset level. <br /></td></tr>
+<tr class="separator:a97e40265e355a21bd2465aaa5b85f03d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af524fe9af5737820fdadcd40a2c26deb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#af524fe9af5737820fdadcd40a2c26deb">LZMA_PRESET_EXTREME</a>&#160;&#160;&#160;(UINT32_C(1) &lt;&lt; 31)</td></tr>
+<tr class="memdesc:af524fe9af5737820fdadcd40a2c26deb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extreme compression preset. <br /></td></tr>
+<tr class="separator:af524fe9af5737820fdadcd40a2c26deb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ada9cd20febb28b5ed6656de9184a86e9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#ada9cd20febb28b5ed6656de9184a86e9">LZMA_TELL_NO_CHECK</a>&#160;&#160;&#160;UINT32_C(0x01)</td></tr>
+<tr class="separator:ada9cd20febb28b5ed6656de9184a86e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae21fb746037c82735d40d428c462e078"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#ae21fb746037c82735d40d428c462e078">LZMA_TELL_UNSUPPORTED_CHECK</a>&#160;&#160;&#160;UINT32_C(0x02)</td></tr>
+<tr class="separator:ae21fb746037c82735d40d428c462e078"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0bdde702a77ff42b90a99c0bf4147b6b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a0bdde702a77ff42b90a99c0bf4147b6b">LZMA_TELL_ANY_CHECK</a>&#160;&#160;&#160;UINT32_C(0x04)</td></tr>
+<tr class="separator:a0bdde702a77ff42b90a99c0bf4147b6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1289925ae1c63a8e86f69f3657118a4d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a1289925ae1c63a8e86f69f3657118a4d">LZMA_IGNORE_CHECK</a>&#160;&#160;&#160;UINT32_C(0x10)</td></tr>
+<tr class="separator:a1289925ae1c63a8e86f69f3657118a4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a563c84b5f368b3dd00d92ea903c5c33d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a563c84b5f368b3dd00d92ea903c5c33d">LZMA_CONCATENATED</a>&#160;&#160;&#160;UINT32_C(0x08)</td></tr>
+<tr class="separator:a563c84b5f368b3dd00d92ea903c5c33d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa1f469ed3d4b2eaf12f8081657efc9d5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#aa1f469ed3d4b2eaf12f8081657efc9d5">LZMA_FAIL_FAST</a>&#160;&#160;&#160;UINT32_C(0x20)</td></tr>
+<tr class="separator:aa1f469ed3d4b2eaf12f8081657efc9d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a62c853cf7dbf008bdbd97b2685c3eabf"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a62c853cf7dbf008bdbd97b2685c3eabf">lzma_easy_encoder_memusage</a> (uint32_t preset) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a62c853cf7dbf008bdbd97b2685c3eabf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate approximate memory usage of easy encoder. <br /></td></tr>
+<tr class="separator:a62c853cf7dbf008bdbd97b2685c3eabf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3562055d26c18fad067a7c7516eaddf5"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a3562055d26c18fad067a7c7516eaddf5">lzma_easy_decoder_memusage</a> (uint32_t preset) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a3562055d26c18fad067a7c7516eaddf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate approximate decoder memory usage of a preset. <br /></td></tr>
+<tr class="separator:a3562055d26c18fad067a7c7516eaddf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acbdad999c544872f0f5d242f0d1a4ed4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4">lzma_easy_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint32_t preset, <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> check) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:acbdad999c544872f0f5d242f0d1a4ed4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .xz Stream encoder using a preset number. <br /></td></tr>
+<tr class="separator:acbdad999c544872f0f5d242f0d1a4ed4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac5e71f2711b57391186671967435faf2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#ac5e71f2711b57391186671967435faf2">lzma_easy_buffer_encode</a> (uint32_t preset, <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> check, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow</td></tr>
+<tr class="memdesc:ac5e71f2711b57391186671967435faf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call .xz Stream encoding using a preset number. <br /></td></tr>
+<tr class="separator:ac5e71f2711b57391186671967435faf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1a97aec94c9fedd7646cfa51c4f4cd52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52">lzma_stream_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters, <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> check) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a1a97aec94c9fedd7646cfa51c4f4cd52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .xz Stream encoder using a custom filter chain. <br /></td></tr>
+<tr class="separator:a1a97aec94c9fedd7646cfa51c4f4cd52"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad7cf41496d77f4d346e006b26ed8e101"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#ad7cf41496d77f4d346e006b26ed8e101">lzma_stream_encoder_mt_memusage</a> (const <a class="el" href="structlzma__mt.html">lzma_mt</a> *options) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:ad7cf41496d77f4d346e006b26ed8e101"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate approximate memory usage of multithreaded .xz encoder. <br /></td></tr>
+<tr class="separator:ad7cf41496d77f4d346e006b26ed8e101"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3f8793518711ee84d1abf12ea3aaba42"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a3f8793518711ee84d1abf12ea3aaba42">lzma_stream_encoder_mt</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__mt.html">lzma_mt</a> *options) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a3f8793518711ee84d1abf12ea3aaba42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize multithreaded .xz Stream encoder. <br /></td></tr>
+<tr class="separator:a3f8793518711ee84d1abf12ea3aaba42"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a26fcc5bccdf3f862caa4c992d01e1a72"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a26fcc5bccdf3f862caa4c992d01e1a72">lzma_alone_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a> *options) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a26fcc5bccdf3f862caa4c992d01e1a72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .lzma encoder (legacy file format) <br /></td></tr>
+<tr class="separator:a26fcc5bccdf3f862caa4c992d01e1a72"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a66d4366a47b8332bff2a512f44f5c45e"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a66d4366a47b8332bff2a512f44f5c45e">lzma_stream_buffer_bound</a> (size_t uncompressed_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a66d4366a47b8332bff2a512f44f5c45e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate output buffer size for single-call Stream encoder. <br /></td></tr>
+<tr class="separator:a66d4366a47b8332bff2a512f44f5c45e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6e645ccaeace3b13a6981e03c6e190ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a6e645ccaeace3b13a6981e03c6e190ad">lzma_stream_buffer_encode</a> (<a class="el" href="structlzma__filter.html">lzma_filter</a> *filters, <a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> check, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a6e645ccaeace3b13a6981e03c6e190ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call .xz Stream encoder. <br /></td></tr>
+<tr class="separator:a6e645ccaeace3b13a6981e03c6e190ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abfc8f11acf837b167aa94b7071b54c30"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#abfc8f11acf837b167aa94b7071b54c30">lzma_microlzma_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a> *options) lzma_nothrow</td></tr>
+<tr class="memdesc:abfc8f11acf837b167aa94b7071b54c30"><td class="mdescLeft">&#160;</td><td class="mdescRight">MicroLZMA encoder. <br /></td></tr>
+<tr class="separator:abfc8f11acf837b167aa94b7071b54c30"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a02b7683ef98d8049788961370a8b28c0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0">lzma_stream_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a02b7683ef98d8049788961370a8b28c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .xz Stream decoder. <br /></td></tr>
+<tr class="separator:a02b7683ef98d8049788961370a8b28c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7179d178e6430c10e2006a467921e98e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a7179d178e6430c10e2006a467921e98e">lzma_stream_decoder_mt</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__mt.html">lzma_mt</a> *options) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a7179d178e6430c10e2006a467921e98e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize multithreaded .xz Stream decoder. <br /></td></tr>
+<tr class="separator:a7179d178e6430c10e2006a467921e98e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a21cbebf2771617bb1e956385cfb353e3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a21cbebf2771617bb1e956385cfb353e3">lzma_auto_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a21cbebf2771617bb1e956385cfb353e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode .xz, .lzma, and .lz (lzip) files with autodetection. <br /></td></tr>
+<tr class="separator:a21cbebf2771617bb1e956385cfb353e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5f43c3a1035e5a226dcd298f4162b861"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a5f43c3a1035e5a226dcd298f4162b861">lzma_alone_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a5f43c3a1035e5a226dcd298f4162b861"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .lzma decoder (legacy file format) <br /></td></tr>
+<tr class="separator:a5f43c3a1035e5a226dcd298f4162b861"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a97689f5709e0db1e2dac450f5ce4e5eb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#a97689f5709e0db1e2dac450f5ce4e5eb">lzma_lzip_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint64_t memlimit, uint32_t flags) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a97689f5709e0db1e2dac450f5ce4e5eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .lz (lzip) decoder (a foreign file format) <br /></td></tr>
+<tr class="separator:a97689f5709e0db1e2dac450f5ce4e5eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa58f237f6cea97ef0eb9bf5c37a3008d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#aa58f237f6cea97ef0eb9bf5c37a3008d">lzma_stream_buffer_decode</a> (uint64_t *memlimit, uint32_t flags, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:aa58f237f6cea97ef0eb9bf5c37a3008d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call .xz Stream decoder. <br /></td></tr>
+<tr class="separator:aa58f237f6cea97ef0eb9bf5c37a3008d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa8372dae3e7c907c36f7bb5426aeacdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html#aa8372dae3e7c907c36f7bb5426aeacdf">lzma_microlzma_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, uint64_t comp_size, uint64_t uncomp_size, <a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> uncomp_size_is_exact, uint32_t dict_size) lzma_nothrow</td></tr>
+<tr class="memdesc:aa8372dae3e7c907c36f7bb5426aeacdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">MicroLZMA decoder. <br /></td></tr>
+<tr class="separator:aa8372dae3e7c907c36f7bb5426aeacdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>File formats. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="af3ca20ff228b363a82515c1aee9e27bc" name="af3ca20ff228b363a82515c1aee9e27bc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af3ca20ff228b363a82515c1aee9e27bc">&#9670;&#160;</a></span>LZMA_PRESET_DEFAULT</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_PRESET_DEFAULT&#160;&#160;&#160;UINT32_C(6)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Default compression preset. </p>
+<p>It's not straightforward to recommend a default preset, because in some cases keeping the resource usage relatively low is more important that getting the maximum compression ratio. </p>
+
+</div>
+</div>
+<a id="a97e40265e355a21bd2465aaa5b85f03d" name="a97e40265e355a21bd2465aaa5b85f03d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a97e40265e355a21bd2465aaa5b85f03d">&#9670;&#160;</a></span>LZMA_PRESET_LEVEL_MASK</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_PRESET_LEVEL_MASK&#160;&#160;&#160;UINT32_C(0x1F)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Mask for preset level. </p>
+<p>This is useful only if you need to extract the level from the preset variable. That should be rare. </p>
+
+</div>
+</div>
+<a id="af524fe9af5737820fdadcd40a2c26deb" name="af524fe9af5737820fdadcd40a2c26deb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af524fe9af5737820fdadcd40a2c26deb">&#9670;&#160;</a></span>LZMA_PRESET_EXTREME</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_PRESET_EXTREME&#160;&#160;&#160;(UINT32_C(1) &lt;&lt; 31)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Extreme compression preset. </p>
+<p>This flag modifies the preset to make the encoding significantly slower while improving the compression ratio only marginally. This is useful when you don't mind spending time to get as small result as possible.</p>
+<p>This flag doesn't affect the memory usage requirements of the decoder (at least not significantly). The memory usage of the encoder may be increased a little but only at the lowest preset levels (0-3). </p>
+
+</div>
+</div>
+<a id="ada9cd20febb28b5ed6656de9184a86e9" name="ada9cd20febb28b5ed6656de9184a86e9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ada9cd20febb28b5ed6656de9184a86e9">&#9670;&#160;</a></span>LZMA_TELL_NO_CHECK</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_TELL_NO_CHECK&#160;&#160;&#160;UINT32_C(0x01)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This flag makes <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> return LZMA_NO_CHECK if the input stream being decoded has no integrity check. Note that when used with <a class="el" href="container_8h.html#a21cbebf2771617bb1e956385cfb353e3" title="Decode .xz, .lzma, and .lz (lzip) files with autodetection.">lzma_auto_decoder()</a>, all .lzma files will trigger LZMA_NO_CHECK if LZMA_TELL_NO_CHECK is used. </p>
+
+</div>
+</div>
+<a id="ae21fb746037c82735d40d428c462e078" name="ae21fb746037c82735d40d428c462e078"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae21fb746037c82735d40d428c462e078">&#9670;&#160;</a></span>LZMA_TELL_UNSUPPORTED_CHECK</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_TELL_UNSUPPORTED_CHECK&#160;&#160;&#160;UINT32_C(0x02)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This flag makes <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> return LZMA_UNSUPPORTED_CHECK if the input stream has an integrity check, but the type of the integrity check is not supported by this liblzma version or build. Such files can still be decoded, but the integrity check cannot be verified. </p>
+
+</div>
+</div>
+<a id="a0bdde702a77ff42b90a99c0bf4147b6b" name="a0bdde702a77ff42b90a99c0bf4147b6b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0bdde702a77ff42b90a99c0bf4147b6b">&#9670;&#160;</a></span>LZMA_TELL_ANY_CHECK</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_TELL_ANY_CHECK&#160;&#160;&#160;UINT32_C(0x04)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This flag makes <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> return LZMA_GET_CHECK as soon as the type of the integrity check is known. The type can then be got with <a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746" title="Get the type of the integrity check.">lzma_get_check()</a>. </p>
+
+</div>
+</div>
+<a id="a1289925ae1c63a8e86f69f3657118a4d" name="a1289925ae1c63a8e86f69f3657118a4d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1289925ae1c63a8e86f69f3657118a4d">&#9670;&#160;</a></span>LZMA_IGNORE_CHECK</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_IGNORE_CHECK&#160;&#160;&#160;UINT32_C(0x10)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This flag makes <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> not calculate and verify the integrity check of the compressed data in .xz files. This means that invalid integrity check values won't be detected and LZMA_DATA_ERROR won't be returned in such cases.</p>
+<p>This flag only affects the checks of the compressed data itself; the CRC32 values in the .xz headers will still be verified normally.</p>
+<p>Don't use this flag unless you know what you are doing. Possible reasons to use this flag:</p>
+<ul>
+<li>Trying to recover data from a corrupt .xz file.</li>
+<li>Speeding up decompression, which matters mostly with SHA-256 or with files that have compressed extremely well. It's recommended to not use this flag for this purpose unless the file integrity is verified externally in some other way.</li>
+</ul>
+<p>Support for this flag was added in liblzma 5.1.4beta. </p>
+
+</div>
+</div>
+<a id="a563c84b5f368b3dd00d92ea903c5c33d" name="a563c84b5f368b3dd00d92ea903c5c33d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a563c84b5f368b3dd00d92ea903c5c33d">&#9670;&#160;</a></span>LZMA_CONCATENATED</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_CONCATENATED&#160;&#160;&#160;UINT32_C(0x08)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This flag enables decoding of concatenated files with file formats that allow concatenating compressed files as is. From the formats currently supported by liblzma, only the .xz and .lz formats allow concatenated files. Concatenated files are not allowed with the legacy .lzma format.</p>
+<p>This flag also affects the usage of the `action' argument for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>. When LZMA_CONCATENATED is used, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> won't return LZMA_STREAM_END unless LZMA_FINISH is used as `action'. Thus, the application has to set LZMA_FINISH in the same way as it does when encoding.</p>
+<p>If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH as `action' for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>, but the usage of LZMA_FINISH isn't required. </p>
+
+</div>
+</div>
+<a id="aa1f469ed3d4b2eaf12f8081657efc9d5" name="aa1f469ed3d4b2eaf12f8081657efc9d5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa1f469ed3d4b2eaf12f8081657efc9d5">&#9670;&#160;</a></span>LZMA_FAIL_FAST</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_FAIL_FAST&#160;&#160;&#160;UINT32_C(0x20)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>This flag makes the threaded decoder report errors (like LZMA_DATA_ERROR) as soon as they are detected. This saves time when the application has no interest in a partially decompressed truncated or corrupt file. Note that due to timing randomness, if the same truncated or corrupt input is decompressed multiple times with this flag, a different amount of output may be produced by different runs, and even the error code might vary.</p>
+<p>When using LZMA_FAIL_FAST, it is recommended to use LZMA_FINISH to tell the decoder when no more input will be coming because it can help fast detection and reporting of truncated files. Note that in this situation truncated files might be diagnosed with LZMA_DATA_ERROR instead of LZMA_OK or LZMA_BUF_ERROR!</p>
+<p>Without this flag the threaded decoder will provide as much output as possible at first and then report the pending error. This default behavior matches the single-threaded decoder and provides repeatable behavior with truncated or corrupt input. There are a few special cases where the behavior can still differ like memory allocation failures (LZMA_MEM_ERROR).</p>
+<p>Single-threaded decoders currently ignore this flag.</p>
+<p>Support for this flag was added in liblzma 5.3.3alpha. Note that in older versions this flag isn't supported (LZMA_OPTIONS_ERROR) even by functions that ignore this flag in newer liblzma versions. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a62c853cf7dbf008bdbd97b2685c3eabf" name="a62c853cf7dbf008bdbd97b2685c3eabf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a62c853cf7dbf008bdbd97b2685c3eabf">&#9670;&#160;</a></span>lzma_easy_encoder_memusage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_easy_encoder_memusage </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>preset</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate approximate memory usage of easy encoder. </p>
+<p>This function is a wrapper for <a class="el" href="filter_8h.html#a730f9391e85a5979bcd1b32643ae7176" title="Calculate approximate memory requirements for raw encoder.">lzma_raw_encoder_memusage()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">preset</td><td>Compression preset (level and possible flags)</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of bytes of memory required for the given preset when encoding or UINT64_MAX on error. </dd></dl>
+
+</div>
+</div>
+<a id="a3562055d26c18fad067a7c7516eaddf5" name="a3562055d26c18fad067a7c7516eaddf5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3562055d26c18fad067a7c7516eaddf5">&#9670;&#160;</a></span>lzma_easy_decoder_memusage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_easy_decoder_memusage </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>preset</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate approximate decoder memory usage of a preset. </p>
+<p>This function is a wrapper for <a class="el" href="filter_8h.html#a58511249ae9206d7de7c5d1f05842297" title="Calculate approximate memory requirements for raw decoder.">lzma_raw_decoder_memusage()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">preset</td><td>Compression preset (level and possible flags)</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of bytes of memory required to decompress a file that was compressed using the given preset or UINT64_MAX on error. </dd></dl>
+
+</div>
+</div>
+<a id="acbdad999c544872f0f5d242f0d1a4ed4" name="acbdad999c544872f0f5d242f0d1a4ed4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acbdad999c544872f0f5d242f0d1a4ed4">&#9670;&#160;</a></span>lzma_easy_encoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_easy_encoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>preset</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td>
+ <td class="paramname"><em>check</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .xz Stream encoder using a preset number. </p>
+<p>This function is intended for those who just want to use the basic features of liblzma (that is, most developers out there).</p>
+<p>If initialization fails (return value is not LZMA_OK), all the memory allocated for *strm by liblzma is always freed. Thus, there is no need to call <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a> after failed initialization.</p>
+<p>If initialization succeeds, use <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to do the actual encoding. Valid values for `action' (the second argument of <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>) are LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future, there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">preset</td><td>Compression preset to use. A preset consist of level number and zero or more flags. Usually flags aren't used, so preset is simply a number [0, 9] which match the options -0 ... -9 of the xz command line tool. Additional flags can be be set using bitwise-or with the preset level number, e.g. 6 | LZMA_PRESET_EXTREME. </td></tr>
+ <tr><td class="paramname">check</td><td>Integrity check type to use. See <a class="el" href="check_8h.html" title="Integrity checks.">check.h</a> for available checks. The xz command line tool defaults to LZMA_CHECK_CRC64, which is a good choice if you are unsure. LZMA_CHECK_CRC32 is good too as long as the uncompressed file is not many gigabytes.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization succeeded. Use <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to encode your data.</li>
+<li>LZMA_MEM_ERROR: Memory allocation failed.</li>
+<li>LZMA_OPTIONS_ERROR: The given compression preset is not supported by this build of liblzma.</li>
+<li>LZMA_UNSUPPORTED_CHECK: The given check type is not supported by this liblzma build.</li>
+<li>LZMA_PROG_ERROR: One or more of the parameters have values that will never be valid. For example, strm == NULL. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ac5e71f2711b57391186671967435faf2" name="ac5e71f2711b57391186671967435faf2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac5e71f2711b57391186671967435faf2">&#9670;&#160;</a></span>lzma_easy_buffer_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_easy_buffer_encode </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>preset</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td>
+ <td class="paramname"><em>check</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call .xz Stream encoding using a preset number. </p>
+<p>The maximum required output buffer size can be calculated with <a class="el" href="container_8h.html#a66d4366a47b8332bff2a512f44f5c45e" title="Calculate output buffer size for single-call Stream encoder.">lzma_stream_buffer_bound()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">preset</td><td>Compression preset to use. See the description in <a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4" title="Initialize .xz Stream encoder using a preset number.">lzma_easy_encoder()</a>. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">check</td><td>Type of the integrity check to calculate from uncompressed data. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_BUF_ERROR: Not enough output buffer space.</li>
+<li>LZMA_UNSUPPORTED_CHECK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a1a97aec94c9fedd7646cfa51c4f4cd52" name="a1a97aec94c9fedd7646cfa51c4f4cd52"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1a97aec94c9fedd7646cfa51c4f4cd52">&#9670;&#160;</a></span>lzma_stream_encoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_encoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td>
+ <td class="paramname"><em>check</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .xz Stream encoder using a custom filter chain. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN. See filters.h for more information. </td></tr>
+ <tr><td class="paramname">check</td><td>Type of the integrity check to calculate from uncompressed data.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization was successful.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_UNSUPPORTED_CHECK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ad7cf41496d77f4d346e006b26ed8e101" name="ad7cf41496d77f4d346e006b26ed8e101"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad7cf41496d77f4d346e006b26ed8e101">&#9670;&#160;</a></span>lzma_stream_encoder_mt_memusage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_stream_encoder_mt_memusage </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__mt.html">lzma_mt</a> *&#160;</td>
+ <td class="paramname"><em>options</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate approximate memory usage of multithreaded .xz encoder. </p>
+<p>Since doing the encoding in threaded mode doesn't affect the memory requirements of single-threaded decompressor, you can use lzma_easy_decoder_memusage(options-&gt;preset) or lzma_raw_decoder_memusage(options-&gt;filters) to calculate the decompressor memory requirements.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">options</td><td>Compression options</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of bytes of memory required for encoding with the given options. If an error occurs, for example due to unsupported preset or filter chain, UINT64_MAX is returned. </dd></dl>
+
+</div>
+</div>
+<a id="a3f8793518711ee84d1abf12ea3aaba42" name="a3f8793518711ee84d1abf12ea3aaba42"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3f8793518711ee84d1abf12ea3aaba42">&#9670;&#160;</a></span>lzma_stream_encoder_mt()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_encoder_mt </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__mt.html">lzma_mt</a> *&#160;</td>
+ <td class="paramname"><em>options</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize multithreaded .xz Stream encoder. </p>
+<p>This provides the functionality of <a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4" title="Initialize .xz Stream encoder using a preset number.">lzma_easy_encoder()</a> and <a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52" title="Initialize .xz Stream encoder using a custom filter chain.">lzma_stream_encoder()</a> as a single function for multithreaded use.</p>
+<p>The supported actions for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be added in the future.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">options</td><td>Pointer to multithreaded compression options</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_UNSUPPORTED_CHECK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a26fcc5bccdf3f862caa4c992d01e1a72" name="a26fcc5bccdf3f862caa4c992d01e1a72"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a26fcc5bccdf3f862caa4c992d01e1a72">&#9670;&#160;</a></span>lzma_alone_encoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_alone_encoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a> *&#160;</td>
+ <td class="paramname"><em>options</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .lzma encoder (legacy file format) </p>
+<p>The .lzma format is sometimes called the LZMA_Alone format, which is the reason for the name of this function. The .lzma format supports only the LZMA1 filter. There is no support for integrity checks like CRC32.</p>
+<p>Use this function if and only if you need to create files readable by legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format is strongly recommended.</p>
+<p>The valid action values for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN and LZMA_FINISH. No kind of flushing is supported, because the file format doesn't make it possible.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">options</td><td>Pointer to encoder options</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a66d4366a47b8332bff2a512f44f5c45e" name="a66d4366a47b8332bff2a512f44f5c45e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a66d4366a47b8332bff2a512f44f5c45e">&#9670;&#160;</a></span>lzma_stream_buffer_bound()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t lzma_stream_buffer_bound </td>
+ <td>(</td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>uncompressed_size</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate output buffer size for single-call Stream encoder. </p>
+<p>When trying to compress incompressible data, the encoded size will be slightly bigger than the input data. This function calculates how much output buffer space is required to be sure that <a class="el" href="container_8h.html#a6e645ccaeace3b13a6981e03c6e190ad" title="Single-call .xz Stream encoder.">lzma_stream_buffer_encode()</a> doesn't return LZMA_BUF_ERROR.</p>
+<p>The calculated value is not exact, but it is guaranteed to be big enough. The actual maximum output space required may be slightly smaller (up to about 100 bytes). This should not be a problem in practice.</p>
+<p>If the calculated maximum size doesn't fit into size_t or would make the Stream grow past LZMA_VLI_MAX (which should never happen in practice), zero is returned to indicate the error.</p>
+<dl class="section note"><dt>Note</dt><dd>The limit calculated by this function applies only to single-call encoding. Multi-call encoding may (and probably will) have larger maximum expansion when encoding incompressible data. Currently there is no function to calculate the maximum expansion of multi-call encoding.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">uncompressed_size</td><td>Size in bytes of the uncompressed input data</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Maximum number of bytes needed to store the compressed data. </dd></dl>
+
+</div>
+</div>
+<a id="a6e645ccaeace3b13a6981e03c6e190ad" name="a6e645ccaeace3b13a6981e03c6e190ad"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6e645ccaeace3b13a6981e03c6e190ad">&#9670;&#160;</a></span>lzma_stream_buffer_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_buffer_encode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td>
+ <td class="paramname"><em>check</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call .xz Stream encoder. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN. See filters.h for more information. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">check</td><td>Type of the integrity check to calculate from uncompressed data. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_BUF_ERROR: Not enough output buffer space.</li>
+<li>LZMA_UNSUPPORTED_CHECK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="abfc8f11acf837b167aa94b7071b54c30" name="abfc8f11acf837b167aa94b7071b54c30"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abfc8f11acf837b167aa94b7071b54c30">&#9670;&#160;</a></span>lzma_microlzma_encoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_microlzma_encoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a> *&#160;</td>
+ <td class="paramname"><em>options</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>MicroLZMA encoder. </p>
+<p>The MicroLZMA format is a raw LZMA stream whose first byte (always 0x00) has been replaced with bitwise-negation of the LZMA properties (lc/lp/pb). This encoding ensures that the first byte of MicroLZMA stream is never 0x00. There is no end of payload marker and thus the uncompressed size must be stored separately. For the best error detection the dictionary size should be stored separately as well but alternatively one may use the uncompressed size as the dictionary size when decoding.</p>
+<p>With the MicroLZMA encoder, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> behaves slightly unusually. The action argument must be LZMA_FINISH and the return value will never be LZMA_OK. Thus the encoding is always done with a single <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> after the initialization. The benefit of the combination of initialization function and <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> is that memory allocations can be re-used for better performance.</p>
+<p><a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> will try to encode as much input as is possible to fit into the given output buffer. If not all input can be encoded, the stream will be finished without encoding all the input. The caller must check both input and output buffer usage after <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> (total_in and total_out in <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> can be convenient). Often <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> can fill the output buffer completely if there is a lot of input, but sometimes a few bytes may remain unused because the next LZMA symbol would require more space.</p>
+<p><a class="el" href="structlzma__stream.html#a5ff28ea4e39148723c19f59811627904">lzma_stream.avail_out</a> must be at least 6. Otherwise LZMA_PROG_ERROR will be returned.</p>
+<p>The LZMA dictionary should be reasonably low to speed up the encoder re-initialization. A good value is bigger than the resulting uncompressed size of most of the output chunks. For example, if output size is 4 KiB, dictionary size of 32 KiB or 64 KiB is good. If the data compresses extremely well, even 128 KiB may be useful.</p>
+<p>The MicroLZMA format and this encoder variant were made with the EROFS file system in mind. This format may be convenient in other embedded uses too where many small streams are needed. XZ Embedded includes a decoder for this format.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">options</td><td>Pointer to encoder options</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_STREAM_END: All good. Check the amounts of input used and output produced. Store the amount of input used (uncompressed size) as it needs to be known to decompress the data.</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR: In addition to the generic reasons for this error code, this may also be returned if there isn't enough output space (6 bytes) to create a valid MicroLZMA stream. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a02b7683ef98d8049788961370a8b28c0" name="a02b7683ef98d8049788961370a8b28c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a02b7683ef98d8049788961370a8b28c0">&#9670;&#160;</a></span>lzma_stream_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>memlimit</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .xz Stream decoder. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">memlimit</td><td>Memory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified. </td></tr>
+ <tr><td class="paramname">flags</td><td>Bitwise-or of zero or more of the decoder flags: LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK, LZMA_CONCATENATED, LZMA_FAIL_FAST</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization was successful.</li>
+<li>LZMA_MEM_ERROR: Cannot allocate memory.</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported flags</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a7179d178e6430c10e2006a467921e98e" name="a7179d178e6430c10e2006a467921e98e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7179d178e6430c10e2006a467921e98e">&#9670;&#160;</a></span>lzma_stream_decoder_mt()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_decoder_mt </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__mt.html">lzma_mt</a> *&#160;</td>
+ <td class="paramname"><em>options</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize multithreaded .xz Stream decoder. </p>
+<p>The decoder can decode multiple Blocks in parallel. This requires that each Block Header contains the Compressed Size and Uncompressed size fields which are added by the multi-threaded encoder, see <a class="el" href="container_8h.html#a3f8793518711ee84d1abf12ea3aaba42" title="Initialize multithreaded .xz Stream encoder.">lzma_stream_encoder_mt()</a>.</p>
+<p>A Stream with one Block will only utilize one thread. A Stream with multiple Blocks but without size information in Block Headers will be processed in single-threaded mode in the same way as done by <a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0" title="Initialize .xz Stream decoder.">lzma_stream_decoder()</a>. Concatenated Streams are processed one Stream at a time; no inter-Stream parallelization is done.</p>
+<p>This function behaves like <a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0" title="Initialize .xz Stream decoder.">lzma_stream_decoder()</a> when options-&gt;threads == 1 and options-&gt;memlimit_threading &lt;= 1.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">options</td><td>Pointer to multithreaded compression options</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization was successful.</li>
+<li>LZMA_MEM_ERROR: Cannot allocate memory.</li>
+<li>LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported flags.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a21cbebf2771617bb1e956385cfb353e3" name="a21cbebf2771617bb1e956385cfb353e3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a21cbebf2771617bb1e956385cfb353e3">&#9670;&#160;</a></span>lzma_auto_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_auto_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>memlimit</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode .xz, .lzma, and .lz (lzip) files with autodetection. </p>
+<p>This decoder autodetects between the .xz, .lzma, and .lz file formats, and calls <a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0" title="Initialize .xz Stream decoder.">lzma_stream_decoder()</a>, <a class="el" href="container_8h.html#a5f43c3a1035e5a226dcd298f4162b861" title="Initialize .lzma decoder (legacy file format)">lzma_alone_decoder()</a>, or <a class="el" href="container_8h.html#a97689f5709e0db1e2dac450f5ce4e5eb" title="Initialize .lz (lzip) decoder (a foreign file format)">lzma_lzip_decoder()</a> once the type of the input file has been detected.</p>
+<p>Support for .lz was added in 5.4.0.</p>
+<p>If the flag LZMA_CONCATENATED is used and the input is a .lzma file: For historical reasons concatenated .lzma files aren't supported. If there is trailing data after one .lzma stream, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> will return LZMA_DATA_ERROR. (<a class="el" href="container_8h.html#a5f43c3a1035e5a226dcd298f4162b861" title="Initialize .lzma decoder (legacy file format)">lzma_alone_decoder()</a> doesn't have such a check as it doesn't support any decoder flags. It will return LZMA_STREAM_END after one .lzma stream.)</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">memlimit</td><td>Memory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified. </td></tr>
+ <tr><td class="paramname">flags</td><td>Bitwise-or of zero or more of the decoder flags: LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK, LZMA_CONCATENATED, LZMA_FAIL_FAST</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization was successful.</li>
+<li>LZMA_MEM_ERROR: Cannot allocate memory.</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported flags</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a5f43c3a1035e5a226dcd298f4162b861" name="a5f43c3a1035e5a226dcd298f4162b861"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5f43c3a1035e5a226dcd298f4162b861">&#9670;&#160;</a></span>lzma_alone_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_alone_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>memlimit</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .lzma decoder (legacy file format) </p>
+<p>Valid `action' arguments to <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN and LZMA_FINISH. There is no need to use LZMA_FINISH, but it's allowed because it may simplify certain types of applications.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">memlimit</td><td>Memory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a97689f5709e0db1e2dac450f5ce4e5eb" name="a97689f5709e0db1e2dac450f5ce4e5eb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a97689f5709e0db1e2dac450f5ce4e5eb">&#9670;&#160;</a></span>lzma_lzip_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_lzip_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>memlimit</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .lz (lzip) decoder (a foreign file format) </p>
+<p>This decoder supports the .lz format version 0 and the unextended .lz format version 1:</p>
+<ul>
+<li>Files in the format version 0 were produced by lzip 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 lzip 1.18.</li>
+<li>lzip 1.3 added decompression support for .lz format version 1 files. Compression support was added in lzip 1.4. In lzip 1.6 the .lz format version 1 was extended to support the Sync Flush marker. This extension is not supported by liblzma. <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> will return LZMA_DATA_ERROR at the location of the Sync Flush marker. In practice files with the Sync Flush marker are very rare and thus liblzma can decompress almost all .lz files.</li>
+</ul>
+<p>Just like with <a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0" title="Initialize .xz Stream decoder.">lzma_stream_decoder()</a> for .xz files, LZMA_CONCATENATED should be used when decompressing normal standalone .lz files.</p>
+<p>The .lz format allows putting non-.lz data at the end of a file after at least one valid .lz member. That is, one can append custom data at the end of a .lz file and the decoder is required to ignore it. In liblzma this is relevant only when LZMA_CONCATENATED is used. In that case <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> will return LZMA_STREAM_END and leave <a class="el" href="structlzma__stream.html#a72fdc738c793f07a5c29715aa57802cf">lzma_stream.next_in</a> pointing to the first byte of the non-.lz data. An exception to this is if the first 1-3 bytes of the non-.lz data are identical to the .lz magic bytes (0x4C, 0x5A, 0x49, 0x50; "LZIP" in US-ASCII). In such a case the 1-3 bytes will have been ignored by <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>. If one wishes to locate the non-.lz data reliably, one must ensure that the first byte isn't 0x4C. Actually one should ensure that none of the first four bytes of trailing data are equal to the magic bytes because lzip &gt;= 1.20 requires it by default.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">memlimit</td><td>Memory usage limit as bytes. Use UINT64_MAX to effectively disable the limiter. </td></tr>
+ <tr><td class="paramname">flags</td><td>Bitwise-or of flags, or zero for no flags. All decoder flags listed above are supported although only LZMA_CONCATENATED and (in very rare cases) LZMA_IGNORE_CHECK are actually useful. LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_FAIL_FAST do nothing. LZMA_TELL_ANY_CHECK is supported for consistency only as CRC32 is always used in the .lz format.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization was successful.</li>
+<li>LZMA_MEM_ERROR: Cannot allocate memory.</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported flags</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="aa58f237f6cea97ef0eb9bf5c37a3008d" name="aa58f237f6cea97ef0eb9bf5c37a3008d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa58f237f6cea97ef0eb9bf5c37a3008d">&#9670;&#160;</a></span>lzma_stream_buffer_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_buffer_decode </td>
+ <td>(</td>
+ <td class="paramtype">uint64_t *&#160;</td>
+ <td class="paramname"><em>memlimit</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>in_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call .xz Stream decoder. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">memlimit</td><td>Pointer to how much memory the decoder is allowed to allocate. The value pointed by this pointer is modified if and only if LZMA_MEMLIMIT_ERROR is returned. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">flags</td><td>Bitwise-or of zero or more of the decoder flags: LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK, LZMA_IGNORE_CHECK, LZMA_CONCATENATED, LZMA_FAIL_FAST. Note that LZMA_TELL_ANY_CHECK is not allowed and will return LZMA_PROG_ERROR. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_pos</td><td>The next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer; the first byte that won't be read is in[in_size]. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if decoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Decoding was successful.</li>
+<li>LZMA_FORMAT_ERROR</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_NO_CHECK: This can be returned only if using the LZMA_TELL_NO_CHECK flag.</li>
+<li>LZMA_UNSUPPORTED_CHECK: This can be returned only if using the LZMA_TELL_UNSUPPORTED_CHECK flag.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. The minimum required memlimit value was stored to *memlimit.</li>
+<li>LZMA_BUF_ERROR: Output buffer was too small.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="aa8372dae3e7c907c36f7bb5426aeacdf" name="aa8372dae3e7c907c36f7bb5426aeacdf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa8372dae3e7c907c36f7bb5426aeacdf">&#9670;&#160;</a></span>lzma_microlzma_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_microlzma_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>comp_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>uncomp_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td>
+ <td class="paramname"><em>uncomp_size_is_exact</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>dict_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>MicroLZMA decoder. </p>
+<p>See <a class="el" href="container_8h.html#abfc8f11acf837b167aa94b7071b54c30" title="MicroLZMA encoder.">lzma_microlzma_encoder()</a> for more information.</p>
+<p>The <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> usage with this decoder is completely normal. The special behavior of <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> applies to <a class="el" href="container_8h.html#abfc8f11acf837b167aa94b7071b54c30" title="MicroLZMA encoder.">lzma_microlzma_encoder()</a> only.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">comp_size</td><td>Compressed size of the MicroLZMA stream. The caller must somehow know this exactly. </td></tr>
+ <tr><td class="paramname">uncomp_size</td><td>Uncompressed size of the MicroLZMA stream. If the exact uncompressed size isn't known, this can be set to a value that is at most as big as the exact uncompressed size would be, but then the next argument uncomp_size_is_exact must be false. </td></tr>
+ <tr><td class="paramname">uncomp_size_is_exact</td><td>If true, uncomp_size must be exactly correct. This will improve error detection at the end of the stream. If the exact uncompressed size isn't known, this must be false. uncomp_size must still be at most as big as the exact uncompressed size is. Setting this to false when the exact size is known will work but error detection at the end of the stream will be weaker. </td></tr>
+ <tr><td class="paramname">dict_size</td><td>LZMA dictionary size that was used when compressing the data. It is OK to use a bigger value too but liblzma will then allocate more memory than would actually be required and error detection will be slightly worse. (Note that with the implementation in XZ Embedded it doesn't affect the memory usage if one specifies bigger dictionary than actually required.)</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/delta_8h.html b/doc/api/delta_8h.html
new file mode 100644
index 0000000..dd64be2
--- /dev/null
+++ b/doc/api/delta_8h.html
@@ -0,0 +1,132 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/delta.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#enum-members">Enumerations</a> </div>
+ <div class="headertitle"><div class="title">delta.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Delta filter.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__delta.html">lzma_options_delta</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for the Delta filter. <a href="structlzma__options__delta.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:a7ced67235ad7a01ae31d32ecf1e634cb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="delta_8h.html#a7ced67235ad7a01ae31d32ecf1e634cb">LZMA_FILTER_DELTA</a>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x03)</td></tr>
+<tr class="memdesc:a7ced67235ad7a01ae31d32ecf1e634cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter ID. <br /></td></tr>
+<tr class="separator:a7ced67235ad7a01ae31d32ecf1e634cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a466886d9d01392f61bdf267687a4f96e"><td class="memItemLeft" align="right" valign="top"><a id="a466886d9d01392f61bdf267687a4f96e" name="a466886d9d01392f61bdf267687a4f96e"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_DELTA_DIST_MIN</b>&#160;&#160;&#160;1</td></tr>
+<tr class="memdesc:a466886d9d01392f61bdf267687a4f96e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum value for <a class="el" href="structlzma__options__delta.html#a31b4b0b5a2462cb9433c2663b8a62790" title="Delta distance.">lzma_options_delta.dist</a>. <br /></td></tr>
+<tr class="separator:a466886d9d01392f61bdf267687a4f96e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afdf8a5ce184ddf9f8070de637775da94"><td class="memItemLeft" align="right" valign="top"><a id="afdf8a5ce184ddf9f8070de637775da94" name="afdf8a5ce184ddf9f8070de637775da94"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_DELTA_DIST_MAX</b>&#160;&#160;&#160;256</td></tr>
+<tr class="memdesc:afdf8a5ce184ddf9f8070de637775da94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum value for <a class="el" href="structlzma__options__delta.html#a31b4b0b5a2462cb9433c2663b8a62790" title="Delta distance.">lzma_options_delta.dist</a>. <br /></td></tr>
+<tr class="separator:afdf8a5ce184ddf9f8070de637775da94"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:a04d84d7fa6cefdc219b6e2e96ff36fe1"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="delta_8h.html#a04d84d7fa6cefdc219b6e2e96ff36fe1">lzma_delta_type</a> { <b>LZMA_DELTA_TYPE_BYTE</b>
+ }</td></tr>
+<tr class="memdesc:a04d84d7fa6cefdc219b6e2e96ff36fe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of the delta calculation. <a href="delta_8h.html#a04d84d7fa6cefdc219b6e2e96ff36fe1">More...</a><br /></td></tr>
+<tr class="separator:a04d84d7fa6cefdc219b6e2e96ff36fe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Delta filter. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="a7ced67235ad7a01ae31d32ecf1e634cb" name="a7ced67235ad7a01ae31d32ecf1e634cb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7ced67235ad7a01ae31d32ecf1e634cb">&#9670;&#160;</a></span>LZMA_FILTER_DELTA</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_FILTER_DELTA&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x03)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Filter ID. </p>
+<p>Filter ID of the Delta filter. This is used as <a class="el" href="structlzma__filter.html#aef1d9709759f39e61db77547b2326929" title="Filter ID.">lzma_filter.id</a>. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="a04d84d7fa6cefdc219b6e2e96ff36fe1" name="a04d84d7fa6cefdc219b6e2e96ff36fe1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a04d84d7fa6cefdc219b6e2e96ff36fe1">&#9670;&#160;</a></span>lzma_delta_type</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="delta_8h.html#a04d84d7fa6cefdc219b6e2e96ff36fe1">lzma_delta_type</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Type of the delta calculation. </p>
+<p>Currently only byte-wise delta is supported. Other possible types could be, for example, delta of 16/32/64-bit little/big endian integers, but these are not currently planned since byte-wise delta is almost as good. </p>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html b/doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html
new file mode 100644
index 0000000..ff360ae
--- /dev/null
+++ b/doc/api/dir_b17a1d403082bd69a703ed987cf158fb.html
@@ -0,0 +1,104 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma Directory Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li class="current"><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle"><div class="title">lzma Directory Reference</div></div>
+</div><!--header-->
+<div class="contents">
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
+Files</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="base_8h.html">base.h</a></td></tr>
+<tr class="memdesc:base_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data types and functions used in many places in liblzma API. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bcj_8h.html">bcj.h</a></td></tr>
+<tr class="memdesc:bcj_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Branch/Call/Jump conversion filters. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="block_8h.html">block.h</a></td></tr>
+<tr class="memdesc:block_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">.xz Block handling <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="check_8h.html">check.h</a></td></tr>
+<tr class="memdesc:check_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Integrity checks. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="container_8h.html">container.h</a></td></tr>
+<tr class="memdesc:container_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">File formats. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="delta_8h.html">delta.h</a></td></tr>
+<tr class="memdesc:delta_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delta filter. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html">filter.h</a></td></tr>
+<tr class="memdesc:filter_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Common filter related types and functions. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8h.html">hardware.h</a></td></tr>
+<tr class="memdesc:hardware_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hardware information. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html">index.h</a></td></tr>
+<tr class="memdesc:index_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handling of .xz Index and related information. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index__hash_8h.html">index_hash.h</a></td></tr>
+<tr class="memdesc:index__hash_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate Index by using a hash function. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html">lzma12.h</a></td></tr>
+<tr class="memdesc:lzma12_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">LZMA1 and LZMA2 filters. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream__flags_8h.html">stream_flags.h</a></td></tr>
+<tr class="memdesc:stream__flags_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">.xz Stream Header and Stream Footer encoder and decoder <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="version_8h.html">version.h</a></td></tr>
+<tr class="memdesc:version_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Version number. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top"><span class="icondoc"></span>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html">vli.h</a></td></tr>
+<tr class="memdesc:vli_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variable-length integer handling. <br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/doc.svg b/doc/api/doc.svg
new file mode 100644
index 0000000..296728b
--- /dev/null
+++ b/doc/api/doc.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+<g style="fill:#195794">
+<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
+</g>
+<g style="fill:#BFD9F4;stroke-width:0">
+<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
+<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
+</g>
+</svg>
diff --git a/doc/api/docd.svg b/doc/api/docd.svg
new file mode 100644
index 0000000..65cf4b5
--- /dev/null
+++ b/doc/api/docd.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" width="16" height="24" viewBox="0 0 80 60" id="doc" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+<g style="fill:#A0C7EE">
+<path d="m 14,-1.1445312 c -2.824372,0 -5.1445313,2.320159 -5.1445312,5.1445312 v 72 c 0,2.824372 2.3201592,5.144531 5.1445312,5.144531 h 52 c 2.824372,0 5.144531,-2.320159 5.144531,-5.144531 V 23.699219 a 1.1447968,1.1447968 0 0 0 -0.01563,-0.1875 C 70.977847,22.605363 70.406495,21.99048 70.007812,21.591797 L 48.208984,-0.20898438 C 47.606104,-0.81186474 46.804652,-1.1445313 46,-1.1445312 Z m 1.144531,6.2890624 H 42.855469 V 24 c 0,1.724372 1.420159,3.144531 3.144531,3.144531 H 64.855469 V 74.855469 H 15.144531 Z m 34,4.4179688 L 60.4375,20.855469 H 49.144531 Z"/>
+</g>
+<g style="fill:#195794;stroke-width:0">
+<path d="M 3.0307167,13.993174 V 7.0307167 h 2.7576792 2.7576792 v 1.8826151 c 0,1.2578262 0.0099,1.9287572 0.029818,2.0216512 0.03884,0.181105 0.168631,0.348218 0.33827,0.43554 l 0.1355017,0.06975 1.9598092,0.0079 1.959809,0.0078 v 4.749829 4.749829 H 8 3.0307167 Z" transform="matrix(5,0,0,5,0,-30)" />
+<path d="M 9.8293515,9.0581469 V 7.9456453 l 1.1058025,1.1055492 c 0.608191,0.6080521 1.105802,1.1086775 1.105802,1.1125015 0,0.0038 -0.497611,0.007 -1.105802,0.007 H 9.8293515 Z" transform="matrix(5,0,0,5,0,-30)" />
+</g>
+</svg>
diff --git a/doc/api/doxygen.css b/doc/api/doxygen.css
new file mode 100644
index 0000000..6ce2813
--- /dev/null
+++ b/doc/api/doxygen.css
@@ -0,0 +1,2017 @@
+/* The standard CSS for doxygen 1.9.7*/
+
+html {
+/* page base colors */
+--page-background-color: white;
+--page-foreground-color: black;
+--page-link-color: #144779;
+--page-visited-link-color: #195794;
+
+/* index */
+--index-odd-item-bg-color: #F3F8FD;
+--index-even-item-bg-color: white;
+--index-header-color: black;
+--index-separator-color: #A0A0A0;
+
+/* header */
+--header-background-color: #F5F9FD;
+--header-separator-color: #A0C7EE;
+--header-gradient-image: url('nav_h.png');
+--group-header-separator-color: #4491DE;
+--group-header-color: #113B65;
+--inherit-header-color: gray;
+
+--footer-foreground-color: #0C2B4A;
+--footer-logo-width: 104px;
+--citation-label-color: #10375F;
+--glow-color: cyan;
+
+--title-background-color: white;
+--title-separator-color: #1E67AF;
+--directory-separator-color: #62A3E4;
+--separator-color: #1B5D9E;
+
+--blockquote-background-color: #F1F7FC;
+--blockquote-border-color: #62A3E4;
+
+--scrollbar-thumb-color: #62A3E4;
+--scrollbar-background-color: #F5F9FD;
+
+--icon-background-color: #257FD9;
+--icon-foreground-color: white;
+--icon-doc-image: url('doc.svg');
+--icon-folder-open-image: url('folderopen.svg');
+--icon-folder-closed-image: url('folderclosed.svg');
+
+/* brief member declaration list */
+--memdecl-background-color: #F5F9FD;
+--memdecl-separator-color: #C8DFF5;
+--memdecl-foreground-color: #555;
+--memdecl-template-color: #195794;
+
+/* detailed member list */
+--memdef-border-color: #74ADE7;
+--memdef-title-background-color: #D0E3F6;
+--memdef-title-gradient-image: url('nav_f.png');
+--memdef-proto-background-color: #CAE0F5;
+--memdef-proto-text-color: #0A233D;
+--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+--memdef-doc-background-color: white;
+--memdef-param-name-color: #602020;
+--memdef-template-color: #195794;
+
+/* tables */
+--table-cell-border-color: #0D2F50;
+--table-header-background-color: #123E6A;
+--table-header-foreground-color: #FFFFFF;
+
+/* labels */
+--label-background-color: #257FD9;
+--label-left-top-border-color: #1E67AF;
+--label-right-bottom-border-color: #A0C7EE;
+--label-foreground-color: white;
+
+/** navigation bar/tree/menu */
+--nav-background-color: #F5F9FD;
+--nav-foreground-color: #113C67;
+--nav-gradient-image: url('tab_b.png');
+--nav-gradient-hover-image: url('tab_h.png');
+--nav-gradient-active-image: url('tab_a.png');
+--nav-gradient-active-image-parent: url("../tab_a.png");
+--nav-separator-image: url('tab_s.png');
+--nav-breadcrumb-image: url('bc_s.png');
+--nav-breadcrumb-border-color: #9CC5EE;
+--nav-splitbar-image: url('splitbar.png');
+--nav-font-size-level1: 13px;
+--nav-font-size-level2: 10px;
+--nav-font-size-level3: 9px;
+--nav-text-normal-color: #0B2845;
+--nav-text-hover-color: white;
+--nav-text-active-color: white;
+--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+--nav-menu-button-color: #113C67;
+--nav-menu-background-color: white;
+--nav-menu-foreground-color: #555555;
+--nav-menu-toggle-color: rgba(255, 255, 255, 0.5);
+--nav-arrow-color: #62A3E4;
+--nav-arrow-selected-color: #62A3E4;
+
+/* table of contents */
+--toc-background-color: #EEF5FC;
+--toc-border-color: #BFD9F4;
+--toc-header-color: #195794;
+--toc-down-arrow-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='10px' width='5px' fill='grey'><text x='0' y='5' font-size='10'>&%238595;</text></svg>");
+
+/** search field */
+--search-background-color: white;
+--search-foreground-color: #909090;
+--search-magnification-image: url('mag.svg');
+--search-magnification-select-image: url('mag_sel.svg');
+--search-active-color: black;
+--search-filter-background-color: #F5F9FD;
+--search-filter-foreground-color: black;
+--search-filter-border-color: #5098E0;
+--search-filter-highlight-text-color: white;
+--search-filter-highlight-bg-color: #144779;
+--search-results-foreground-color: #174F86;
+--search-results-background-color: #E2EEFA;
+--search-results-border-color: black;
+--search-box-shadow: inset 0.5px 0.5px 3px 0px #555;
+
+/** code fragments */
+--code-keyword-color: #008000;
+--code-type-keyword-color: #604020;
+--code-flow-keyword-color: #E08000;
+--code-comment-color: #800000;
+--code-preprocessor-color: #806020;
+--code-string-literal-color: #002080;
+--code-char-literal-color: #008080;
+--code-xml-cdata-color: black;
+--code-vhdl-digit-color: #FF00FF;
+--code-vhdl-char-color: #000000;
+--code-vhdl-keyword-color: #700070;
+--code-vhdl-logic-color: #FF0000;
+--code-link-color: #195794;
+--code-external-link-color: #195794;
+--fragment-foreground-color: black;
+--fragment-background-color: #F9FBFE;
+--fragment-border-color: #A0C7EE;
+--fragment-lineno-border-color: #00FF00;
+--fragment-lineno-background-color: #E8E8E8;
+--fragment-lineno-foreground-color: black;
+--fragment-lineno-link-fg-color: #195794;
+--fragment-lineno-link-bg-color: #D8D8D8;
+--fragment-lineno-link-hover-fg-color: #195794;
+--fragment-lineno-link-hover-bg-color: #C8C8C8;
+--tooltip-foreground-color: black;
+--tooltip-background-color: white;
+--tooltip-border-color: gray;
+--tooltip-doc-color: grey;
+--tooltip-declaration-color: #006318;
+--tooltip-link-color: #195794;
+--tooltip-shadow: 1px 1px 7px gray;
+
+/** font-family */
+--font-family-normal: Roboto,sans-serif;
+--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed;
+--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+--font-family-title: Tahoma,Arial,sans-serif;
+--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif;
+--font-family-search: Arial,Verdana,sans-serif;
+--font-family-icon: Arial,Helvetica;
+--font-family-tooltip: Roboto,sans-serif;
+
+}
+
+@media (prefers-color-scheme: dark) {
+ html:not(.dark-mode) {
+ color-scheme: dark;
+
+/* page base colors */
+--page-background-color: black;
+--page-foreground-color: #C9D1D9;
+--page-link-color: #5098E0;
+--page-visited-link-color: #6DA9E5;
+
+/* index */
+--index-odd-item-bg-color: #02070C;
+--index-even-item-bg-color: black;
+--index-header-color: #A0C7EE;
+--index-separator-color: #10375F;
+
+/* header */
+--header-background-color: #010407;
+--header-separator-color: #040F1A;
+--header-gradient-image: url('nav_hd.png');
+--group-header-separator-color: #0B2845;
+--group-header-color: #5098E0;
+--inherit-header-color: #A0A0A0;
+
+--footer-foreground-color: #206DBA;
+--footer-logo-width: 60px;
+--citation-label-color: #5098E0;
+--glow-color: cyan;
+
+--title-background-color: #010509;
+--title-separator-color: #113A63;
+--directory-separator-color: #0B2845;
+--separator-color: #0B2845;
+
+--blockquote-background-color: #030C14;
+--blockquote-border-color: #0B2845;
+
+--scrollbar-thumb-color: #0B2845;
+--scrollbar-background-color: #010407;
+
+--icon-background-color: #10375F;
+--icon-foreground-color: #A0C7EE;
+--icon-doc-image: url('docd.svg');
+--icon-folder-open-image: url('folderopend.svg');
+--icon-folder-closed-image: url('folderclosedd.svg');
+
+/* brief member declaration list */
+--memdecl-background-color: #02070C;
+--memdecl-separator-color: #0D2D4D;
+--memdecl-foreground-color: #BBB;
+--memdecl-template-color: #3488DC;
+
+/* detailed member list */
+--memdef-border-color: #092138;
+--memdef-title-background-color: #071829;
+--memdef-title-gradient-image: url('nav_fd.png');
+--memdef-proto-background-color: #061524;
+--memdef-proto-text-color: #64A4E4;
+--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9);
+--memdef-doc-background-color: black;
+--memdef-param-name-color: #D28757;
+--memdef-template-color: #3488DC;
+
+/* tables */
+--table-cell-border-color: #0B2845;
+--table-header-background-color: #0B2845;
+--table-header-foreground-color: #A0C7EE;
+
+/* labels */
+--label-background-color: #113B65;
+--label-left-top-border-color: #195794;
+--label-right-bottom-border-color: #0B2845;
+--label-foreground-color: #CCCCCC;
+
+/** navigation bar/tree/menu */
+--nav-background-color: #030C14;
+--nav-foreground-color: #113C67;
+--nav-gradient-image: url('tab_bd.png');
+--nav-gradient-hover-image: url('tab_hd.png');
+--nav-gradient-active-image: url('tab_ad.png');
+--nav-gradient-active-image-parent: url("../tab_ad.png");
+--nav-separator-image: url('tab_sd.png');
+--nav-breadcrumb-image: url('bc_sd.png');
+--nav-breadcrumb-border-color: #0C2B4A;
+--nav-splitbar-image: url('splitbard.png');
+--nav-font-size-level1: 13px;
+--nav-font-size-level2: 10px;
+--nav-font-size-level3: 9px;
+--nav-text-normal-color: #8ABAEA;
+--nav-text-hover-color: #C5DDF5;
+--nav-text-active-color: #C5DDF5;
+--nav-text-normal-shadow: 0px 1px 1px black;
+--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
+--nav-menu-button-color: #8ABAEA;
+--nav-menu-background-color: #000204;
+--nav-menu-foreground-color: #BBBBBB;
+--nav-menu-toggle-color: rgba(255, 255, 255, 0.2);
+--nav-arrow-color: #10375F;
+--nav-arrow-selected-color: #5098E0;
+
+/* table of contents */
+--toc-background-color: #04101B;
+--toc-border-color: #081D32;
+--toc-header-color: #6DA9E5;
+--toc-down-arrow-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='10px' width='5px'><text x='0' y='5' font-size='10' fill='grey'>&%238595;</text></svg>");
+
+/** search field */
+--search-background-color: black;
+--search-foreground-color: #C5C5C5;
+--search-magnification-image: url('mag_d.svg');
+--search-magnification-select-image: url('mag_seld.svg');
+--search-active-color: #C5C5C5;
+--search-filter-background-color: #030C14;
+--search-filter-foreground-color: #5098E0;
+--search-filter-border-color: #3488DC;
+--search-filter-highlight-text-color: #93BFEC;
+--search-filter-highlight-bg-color: #0B2845;
+--search-results-background-color: #030C14;
+--search-results-foreground-color: #5098E0;
+--search-results-border-color: #3488DC;
+--search-box-shadow: inset 0.5px 0.5px 3px 0px #0E3255;
+
+/** code fragments */
+--code-keyword-color: #CC99CD;
+--code-type-keyword-color: #AB99CD;
+--code-flow-keyword-color: #E08000;
+--code-comment-color: #717790;
+--code-preprocessor-color: #65CABE;
+--code-string-literal-color: #7EC699;
+--code-char-literal-color: #00E0F0;
+--code-xml-cdata-color: #C9D1D9;
+--code-vhdl-digit-color: #FF00FF;
+--code-vhdl-char-color: #000000;
+--code-vhdl-keyword-color: #700070;
+--code-vhdl-logic-color: #FF0000;
+--code-link-color: #79C0FF;
+--code-external-link-color: #79C0FF;
+--fragment-foreground-color: #C9D1D9;
+--fragment-background-color: black;
+--fragment-border-color: #30363D;
+--fragment-lineno-border-color: #30363D;
+--fragment-lineno-background-color: black;
+--fragment-lineno-foreground-color: #6E7681;
+--fragment-lineno-link-fg-color: #6E7681;
+--fragment-lineno-link-bg-color: #303030;
+--fragment-lineno-link-hover-fg-color: #8E96A1;
+--fragment-lineno-link-hover-bg-color: #505050;
+--tooltip-foreground-color: #C9D1D9;
+--tooltip-background-color: #202020;
+--tooltip-border-color: #C9D1D9;
+--tooltip-doc-color: #D9E1E9;
+--tooltip-declaration-color: #20C348;
+--tooltip-link-color: #79C0FF;
+--tooltip-shadow: none;
+
+/** font-family */
+--font-family-normal: Roboto,sans-serif;
+--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed;
+--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+--font-family-title: Tahoma,Arial,sans-serif;
+--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif;
+--font-family-search: Arial,Verdana,sans-serif;
+--font-family-icon: Arial,Helvetica;
+--font-family-tooltip: Roboto,sans-serif;
+
+}}
+body {
+ background-color: var(--page-background-color);
+ color: var(--page-foreground-color);
+}
+
+body, table, div, p, dl {
+ font-weight: 400;
+ font-size: 14px;
+ font-family: var(--font-family-normal);
+ line-height: 22px;
+}
+
+/* @group Heading Levels */
+
+.title {
+ font-weight: 400;
+ font-size: 14px;
+ font-family: var(--font-family-normal);
+ line-height: 28px;
+ font-size: 150%;
+ font-weight: bold;
+ margin: 10px 2px;
+}
+
+h1.groupheader {
+ font-size: 150%;
+}
+
+h2.groupheader {
+ border-bottom: 1px solid var(--group-header-separator-color);
+ color: var(--group-header-color);
+ font-size: 150%;
+ font-weight: normal;
+ margin-top: 1.75em;
+ padding-top: 8px;
+ padding-bottom: 4px;
+ width: 100%;
+}
+
+h3.groupheader {
+ font-size: 100%;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ -webkit-transition: text-shadow 0.5s linear;
+ -moz-transition: text-shadow 0.5s linear;
+ -ms-transition: text-shadow 0.5s linear;
+ -o-transition: text-shadow 0.5s linear;
+ transition: text-shadow 0.5s linear;
+ margin-right: 15px;
+}
+
+h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
+ text-shadow: 0 0 15px var(--glow-color);
+}
+
+dt {
+ font-weight: bold;
+}
+
+p.startli, p.startdd {
+ margin-top: 2px;
+}
+
+th p.starttd, th p.intertd, th p.endtd {
+ font-size: 100%;
+ font-weight: 700;
+}
+
+p.starttd {
+ margin-top: 0px;
+}
+
+p.endli {
+ margin-bottom: 0px;
+}
+
+p.enddd {
+ margin-bottom: 4px;
+}
+
+p.endtd {
+ margin-bottom: 2px;
+}
+
+p.interli {
+}
+
+p.interdd {
+}
+
+p.intertd {
+}
+
+/* @end */
+
+caption {
+ font-weight: bold;
+}
+
+span.legend {
+ font-size: 70%;
+ text-align: center;
+}
+
+h3.version {
+ font-size: 90%;
+ text-align: center;
+}
+
+div.navtab {
+ padding-right: 15px;
+ text-align: right;
+ line-height: 110%;
+}
+
+div.navtab table {
+ border-spacing: 0;
+}
+
+td.navtab {
+ padding-right: 6px;
+ padding-left: 6px;
+}
+
+td.navtabHL {
+ background-image: var(--nav-gradient-active-image);
+ background-repeat:repeat-x;
+ padding-right: 6px;
+ padding-left: 6px;
+}
+
+td.navtabHL a, td.navtabHL a:visited {
+ color: var(--nav-text-hover-color);
+ text-shadow: var(--nav-text-hover-shadow);
+}
+
+a.navtab {
+ font-weight: bold;
+}
+
+div.qindex{
+ text-align: center;
+ width: 100%;
+ line-height: 140%;
+ font-size: 130%;
+ color: var(--index-separator-color);
+}
+
+dt.alphachar{
+ font-size: 180%;
+ font-weight: bold;
+}
+
+.alphachar a{
+ color: var(--index-header-color);
+}
+
+.alphachar a:hover, .alphachar a:visited{
+ text-decoration: none;
+}
+
+.classindex dl {
+ padding: 25px;
+ column-count:1
+}
+
+.classindex dd {
+ display:inline-block;
+ margin-left: 50px;
+ width: 90%;
+ line-height: 1.15em;
+}
+
+.classindex dl.even {
+ background-color: var(--index-even-item-bg-color);
+}
+
+.classindex dl.odd {
+ background-color: var(--index-odd-item-bg-color);
+}
+
+@media(min-width: 1120px) {
+ .classindex dl {
+ column-count:2
+ }
+}
+
+@media(min-width: 1320px) {
+ .classindex dl {
+ column-count:3
+ }
+}
+
+
+/* @group Link Styling */
+
+a {
+ color: var(--page-link-color);
+ font-weight: normal;
+ text-decoration: none;
+}
+
+.contents a:visited {
+ color: var(--page-visited-link-color);
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a.el {
+ font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code, a.code:visited, a.line, a.line:visited {
+ color: var(--code-link-color);
+}
+
+a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
+ color: var(--code-external-link-color);
+}
+
+a.code.hl_class { /* style for links to class names in code snippets */ }
+a.code.hl_struct { /* style for links to struct names in code snippets */ }
+a.code.hl_union { /* style for links to union names in code snippets */ }
+a.code.hl_interface { /* style for links to interface names in code snippets */ }
+a.code.hl_protocol { /* style for links to protocol names in code snippets */ }
+a.code.hl_category { /* style for links to category names in code snippets */ }
+a.code.hl_exception { /* style for links to exception names in code snippets */ }
+a.code.hl_service { /* style for links to service names in code snippets */ }
+a.code.hl_singleton { /* style for links to singleton names in code snippets */ }
+a.code.hl_concept { /* style for links to concept names in code snippets */ }
+a.code.hl_namespace { /* style for links to namespace names in code snippets */ }
+a.code.hl_package { /* style for links to package names in code snippets */ }
+a.code.hl_define { /* style for links to macro names in code snippets */ }
+a.code.hl_function { /* style for links to function names in code snippets */ }
+a.code.hl_variable { /* style for links to variable names in code snippets */ }
+a.code.hl_typedef { /* style for links to typedef names in code snippets */ }
+a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ }
+a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ }
+a.code.hl_signal { /* style for links to Qt signal names in code snippets */ }
+a.code.hl_slot { /* style for links to Qt slot names in code snippets */ }
+a.code.hl_friend { /* style for links to friend names in code snippets */ }
+a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ }
+a.code.hl_property { /* style for links to property names in code snippets */ }
+a.code.hl_event { /* style for links to event names in code snippets */ }
+a.code.hl_sequence { /* style for links to sequence names in code snippets */ }
+a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ }
+
+/* @end */
+
+dl.el {
+ margin-left: -1cm;
+}
+
+ul {
+ overflow: visible;
+}
+
+ul.multicol {
+ -moz-column-gap: 1em;
+ -webkit-column-gap: 1em;
+ column-gap: 1em;
+ -moz-column-count: 3;
+ -webkit-column-count: 3;
+ column-count: 3;
+ list-style-type: none;
+}
+
+#side-nav ul {
+ overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */
+}
+
+#main-nav ul {
+ overflow: visible; /* reset ul rule for the navigation bar drop down lists */
+}
+
+.fragment {
+ text-align: left;
+ direction: ltr;
+ overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/
+ overflow-y: hidden;
+}
+
+pre.fragment {
+ border: 1px solid var(--fragment-border-color);
+ background-color: var(--fragment-background-color);
+ color: var(--fragment-foreground-color);
+ padding: 4px 6px;
+ margin: 4px 8px 4px 2px;
+ overflow: auto;
+ word-wrap: break-word;
+ font-size: 9pt;
+ line-height: 125%;
+ font-family: var(--font-family-monospace);
+ font-size: 105%;
+}
+
+div.fragment {
+ padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/
+ margin: 4px 8px 4px 2px;
+ color: var(--fragment-foreground-color);
+ background-color: var(--fragment-background-color);
+ border: 1px solid var(--fragment-border-color);
+}
+
+div.line {
+ font-family: var(--font-family-monospace);
+ font-size: 13px;
+ min-height: 13px;
+ line-height: 1.2;
+ text-wrap: unrestricted;
+ white-space: -moz-pre-wrap; /* Moz */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: pre-wrap; /* CSS3 */
+ word-wrap: break-word; /* IE 5.5+ */
+ text-indent: -53px;
+ padding-left: 53px;
+ padding-bottom: 0px;
+ margin: 0px;
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+div.line:after {
+ content:"\000A";
+ white-space: pre;
+}
+
+div.line.glow {
+ background-color: var(--glow-color);
+ box-shadow: 0 0 10px var(--glow-color);
+}
+
+
+span.lineno {
+ padding-right: 4px;
+ margin-right: 9px;
+ text-align: right;
+ border-right: 2px solid var(--fragment-lineno-border-color);
+ color: var(--fragment-lineno-foreground-color);
+ background-color: var(--fragment-lineno-background-color);
+ white-space: pre;
+}
+span.lineno a, span.lineno a:visited {
+ color: var(--fragment-lineno-link-fg-color);
+ background-color: var(--fragment-lineno-link-bg-color);
+}
+
+span.lineno a:hover {
+ color: var(--fragment-lineno-link-hover-fg-color);
+ background-color: var(--fragment-lineno-link-hover-bg-color);
+}
+
+.lineno {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+div.classindex ul {
+ list-style: none;
+ padding-left: 0;
+}
+
+div.classindex span.ai {
+ display: inline-block;
+}
+
+div.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ font-weight: bold;
+}
+
+div.groupText {
+ margin-left: 16px;
+ font-style: italic;
+}
+
+body {
+ color: var(--page-foreground-color);
+ margin: 0;
+}
+
+div.contents {
+ margin-top: 10px;
+ margin-left: 12px;
+ margin-right: 8px;
+}
+
+p.formulaDsp {
+ text-align: center;
+}
+
+img.dark-mode-visible {
+ display: none;
+}
+img.light-mode-visible {
+ display: none;
+}
+
+img.formulaDsp {
+
+}
+
+img.formulaInl, img.inline {
+ vertical-align: middle;
+}
+
+div.center {
+ text-align: center;
+ margin-top: 0px;
+ margin-bottom: 0px;
+ padding: 0px;
+}
+
+div.center img {
+ border: 0px;
+}
+
+address.footer {
+ text-align: right;
+ padding-right: 12px;
+}
+
+img.footer {
+ border: 0px;
+ vertical-align: middle;
+ width: var(--footer-logo-width);
+}
+
+.compoundTemplParams {
+ color: var(--memdecl-template-color);
+ font-size: 80%;
+ line-height: 120%;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+ color: var(--code-keyword-color);
+}
+
+span.keywordtype {
+ color: var(--code-type-keyword-color);
+}
+
+span.keywordflow {
+ color: var(--code-flow-keyword-color);
+}
+
+span.comment {
+ color: var(--code-comment-color);
+}
+
+span.preprocessor {
+ color: var(--code-preprocessor-color);
+}
+
+span.stringliteral {
+ color: var(--code-string-literal-color);
+}
+
+span.charliteral {
+ color: var(--code-char-literal-color);
+}
+
+span.xmlcdata {
+ color: var(--code-xml-cdata-color);
+}
+
+span.vhdldigit {
+ color: var(--code-vhdl-digit-color);
+}
+
+span.vhdlchar {
+ color: var(--code-vhdl-char-color);
+}
+
+span.vhdlkeyword {
+ color: var(--code-vhdl-keyword-color);
+}
+
+span.vhdllogic {
+ color: var(--code-vhdl-logic-color);
+}
+
+blockquote {
+ background-color: var(--blockquote-background-color);
+ border-left: 2px solid var(--blockquote-border-color);
+ margin: 0 24px 0 4px;
+ padding: 0 12px 0 16px;
+}
+
+/* @end */
+
+td.tiny {
+ font-size: 75%;
+}
+
+.dirtab {
+ padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid var(--table-cell-border-color);
+}
+
+th.dirtab {
+ background-color: var(--table-header-background-color);
+ color: var(--table-header-foreground-color);
+ font-weight: bold;
+}
+
+hr {
+ height: 0px;
+ border: none;
+ border-top: 1px solid var(--separator-color);
+}
+
+hr.footer {
+ height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+ border-spacing: 0px;
+ padding: 0px;
+}
+
+.memberdecls td, .fieldtable tr {
+ -webkit-transition-property: background-color, box-shadow;
+ -webkit-transition-duration: 0.5s;
+ -moz-transition-property: background-color, box-shadow;
+ -moz-transition-duration: 0.5s;
+ -ms-transition-property: background-color, box-shadow;
+ -ms-transition-duration: 0.5s;
+ -o-transition-property: background-color, box-shadow;
+ -o-transition-duration: 0.5s;
+ transition-property: background-color, box-shadow;
+ transition-duration: 0.5s;
+}
+
+.memberdecls td.glow, .fieldtable tr.glow {
+ background-color: var(--glow-color);
+ box-shadow: 0 0 15px var(--glow-color);
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+ background-color: var(--memdecl-background-color);
+ border: none;
+ margin: 4px;
+ padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+ padding: 0px 8px 4px 8px;
+ color: var(--memdecl-foreground-color);
+}
+
+.memSeparator {
+ border-bottom: 1px solid var(--memdecl-separator-color);
+ line-height: 1px;
+ margin: 0px;
+ padding: 0px;
+}
+
+.memItemLeft, .memTemplItemLeft {
+ white-space: nowrap;
+}
+
+.memItemRight, .memTemplItemRight {
+ width: 100%;
+}
+
+.memTemplParams {
+ color: var(--memdecl-template-color);
+ white-space: nowrap;
+ font-size: 80%;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtitle {
+ padding: 8px;
+ border-top: 1px solid var(--memdef-border-color);
+ border-left: 1px solid var(--memdef-border-color);
+ border-right: 1px solid var(--memdef-border-color);
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ margin-bottom: -1px;
+ background-image: var(--memdef-title-gradient-image);
+ background-repeat: repeat-x;
+ background-color: var(--memdef-title-background-color);
+ line-height: 1.25;
+ font-weight: 300;
+ float:left;
+}
+
+.permalink
+{
+ font-size: 65%;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.memtemplate {
+ font-size: 80%;
+ color: var(--memdef-template-color);
+ font-weight: normal;
+ margin-left: 9px;
+}
+
+.mempage {
+ width: 100%;
+}
+
+.memitem {
+ padding: 0;
+ margin-bottom: 10px;
+ margin-right: 5px;
+ -webkit-transition: box-shadow 0.5s linear;
+ -moz-transition: box-shadow 0.5s linear;
+ -ms-transition: box-shadow 0.5s linear;
+ -o-transition: box-shadow 0.5s linear;
+ transition: box-shadow 0.5s linear;
+ display: table !important;
+ width: 100%;
+}
+
+.memitem.glow {
+ box-shadow: 0 0 15px var(--glow-color);
+}
+
+.memname {
+ font-weight: 400;
+ margin-left: 6px;
+}
+
+.memname td {
+ vertical-align: bottom;
+}
+
+.memproto, dl.reflist dt {
+ border-top: 1px solid var(--memdef-border-color);
+ border-left: 1px solid var(--memdef-border-color);
+ border-right: 1px solid var(--memdef-border-color);
+ padding: 6px 0px 6px 0px;
+ color: var(--memdef-proto-text-color);
+ font-weight: bold;
+ text-shadow: var(--memdef-proto-text-shadow);
+ background-color: var(--memdef-proto-background-color);
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ border-top-right-radius: 4px;
+}
+
+.overload {
+ font-family: var(--font-family-monospace);
+ font-size: 65%;
+}
+
+.memdoc, dl.reflist dd {
+ border-bottom: 1px solid var(--memdef-border-color);
+ border-left: 1px solid var(--memdef-border-color);
+ border-right: 1px solid var(--memdef-border-color);
+ padding: 6px 10px 2px 10px;
+ border-top-width: 0;
+ background-image:url('nav_g.png');
+ background-repeat:repeat-x;
+ background-color: var(--memdef-doc-background-color);
+ /* opera specific markup */
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+ /* firefox specific markup */
+ -moz-border-radius-bottomleft: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+ /* webkit specific markup */
+ -webkit-border-bottom-left-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+}
+
+dl.reflist dt {
+ padding: 5px;
+}
+
+dl.reflist dd {
+ margin: 0px 0px 10px 0px;
+ padding: 5px;
+}
+
+.paramkey {
+ text-align: right;
+}
+
+.paramtype {
+ white-space: nowrap;
+}
+
+.paramname {
+ color: var(--memdef-param-name-color);
+ white-space: nowrap;
+}
+.paramname em {
+ font-style: normal;
+}
+.paramname code {
+ line-height: 14px;
+}
+
+.params, .retval, .exception, .tparams {
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
+ font-weight: bold;
+ vertical-align: top;
+}
+
+.params .paramtype, .tparams .paramtype {
+ font-style: italic;
+ vertical-align: top;
+}
+
+.params .paramdir, .tparams .paramdir {
+ font-family: var(--font-family-monospace);
+ vertical-align: top;
+}
+
+table.mlabels {
+ border-spacing: 0px;
+}
+
+td.mlabels-left {
+ width: 100%;
+ padding: 0px;
+}
+
+td.mlabels-right {
+ vertical-align: bottom;
+ padding: 0px;
+ white-space: nowrap;
+}
+
+span.mlabels {
+ margin-left: 8px;
+}
+
+span.mlabel {
+ background-color: var(--label-background-color);
+ border-top:1px solid var(--label-left-top-border-color);
+ border-left:1px solid var(--label-left-top-border-color);
+ border-right:1px solid var(--label-right-bottom-border-color);
+ border-bottom:1px solid var(--label-right-bottom-border-color);
+ text-shadow: none;
+ color: var(--label-foreground-color);
+ margin-right: 4px;
+ padding: 2px 3px;
+ border-radius: 3px;
+ font-size: 7pt;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+
+
+
+/* @end */
+
+/* these are for tree view inside a (index) page */
+
+div.directory {
+ margin: 10px 0px;
+ border-top: 1px solid var(--directory-separator-color);
+ border-bottom: 1px solid var(--directory-separator-color);
+ width: 100%;
+}
+
+.directory table {
+ border-collapse:collapse;
+}
+
+.directory td {
+ margin: 0px;
+ padding: 0px;
+ vertical-align: top;
+}
+
+.directory td.entry {
+ white-space: nowrap;
+ padding-right: 6px;
+ padding-top: 3px;
+}
+
+.directory td.entry a {
+ outline:none;
+}
+
+.directory td.entry a img {
+ border: none;
+}
+
+.directory td.desc {
+ width: 100%;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 3px;
+ border-left: 1px solid rgba(0,0,0,0.05);
+}
+
+.directory tr.odd {
+ padding-left: 6px;
+ background-color: var(--index-odd-item-bg-color);
+}
+
+.directory tr.even {
+ padding-left: 6px;
+ background-color: var(--index-even-item-bg-color);
+}
+
+.directory img {
+ vertical-align: -30%;
+}
+
+.directory .levels {
+ white-space: nowrap;
+ width: 100%;
+ text-align: right;
+ font-size: 9pt;
+}
+
+.directory .levels span {
+ cursor: pointer;
+ padding-left: 2px;
+ padding-right: 2px;
+ color: var(--page-link-color);
+}
+
+.arrow {
+ color: var(--nav-arrow-color);
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ font-size: 80%;
+ display: inline-block;
+ width: 16px;
+ height: 22px;
+}
+
+.icon {
+ font-family: var(--font-family-icon);
+ line-height: normal;
+ font-weight: bold;
+ font-size: 12px;
+ height: 14px;
+ width: 16px;
+ display: inline-block;
+ background-color: var(--icon-background-color);
+ color: var(--icon-foreground-color);
+ text-align: center;
+ border-radius: 4px;
+ margin-left: 2px;
+ margin-right: 2px;
+}
+
+.icona {
+ width: 24px;
+ height: 22px;
+ display: inline-block;
+}
+
+.iconfopen {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:var(--icon-folder-open-image);
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+.iconfclosed {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:var(--icon-folder-closed-image);
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+.icondoc {
+ width: 24px;
+ height: 18px;
+ margin-bottom: 4px;
+ background-image:var(--icon-doc-image);
+ background-position: 0px -4px;
+ background-repeat: repeat-y;
+ vertical-align:top;
+ display: inline-block;
+}
+
+/* @end */
+
+div.dynheader {
+ margin-top: 8px;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+address {
+ font-style: normal;
+ color: var(--footer-foreground-color);
+}
+
+table.doxtable caption {
+ caption-side: top;
+}
+
+table.doxtable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.doxtable td, table.doxtable th {
+ border: 1px solid var(--table-cell-border-color);
+ padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+ background-color: var(--table-header-background-color);
+ color: var(--table-header-foreground-color);
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+table.fieldtable {
+ margin-bottom: 10px;
+ border: 1px solid var(--memdef-border-color);
+ border-spacing: 0px;
+ border-radius: 4px;
+ box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
+}
+
+.fieldtable td, .fieldtable th {
+ padding: 3px 7px 2px;
+}
+
+.fieldtable td.fieldtype, .fieldtable td.fieldname {
+ white-space: nowrap;
+ border-right: 1px solid var(--memdef-border-color);
+ border-bottom: 1px solid var(--memdef-border-color);
+ vertical-align: top;
+}
+
+.fieldtable td.fieldname {
+ padding-top: 3px;
+}
+
+.fieldtable td.fielddoc {
+ border-bottom: 1px solid var(--memdef-border-color);
+}
+
+.fieldtable td.fielddoc p:first-child {
+ margin-top: 0px;
+}
+
+.fieldtable td.fielddoc p:last-child {
+ margin-bottom: 2px;
+}
+
+.fieldtable tr:last-child td {
+ border-bottom: none;
+}
+
+.fieldtable th {
+ background-image: var(--memdef-title-gradient-image);
+ background-repeat:repeat-x;
+ background-color: var(--memdef-title-background-color);
+ font-size: 90%;
+ color: var(--memdef-proto-text-color);
+ padding-bottom: 4px;
+ padding-top: 5px;
+ text-align:left;
+ font-weight: 400;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom: 1px solid var(--memdef-border-color);
+}
+
+
+.tabsearch {
+ top: 0px;
+ left: 10px;
+ height: 36px;
+ background-image: var(--nav-gradient-image);
+ z-index: 101;
+ overflow: hidden;
+ font-size: 13px;
+}
+
+.navpath ul
+{
+ font-size: 11px;
+ background-image: var(--nav-gradient-image);
+ background-repeat:repeat-x;
+ background-position: 0 -5px;
+ height:30px;
+ line-height:30px;
+ color:var(--nav-text-normal-color);
+ border:solid 1px var(--nav-breadcrumb-border-color);
+ overflow:hidden;
+ margin:0px;
+ padding:0px;
+}
+
+.navpath li
+{
+ list-style-type:none;
+ float:left;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:var(--nav-breadcrumb-image);
+ background-repeat:no-repeat;
+ background-position:right;
+ color: var(--nav-foreground-color);
+}
+
+.navpath li.navelem a
+{
+ height:32px;
+ display:block;
+ text-decoration: none;
+ outline: none;
+ color: var(--nav-text-normal-color);
+ font-family: var(--font-family-nav);
+ text-shadow: var(--nav-text-normal-shadow);
+ text-decoration: none;
+}
+
+.navpath li.navelem a:hover
+{
+ color: var(--nav-text-hover-color);
+ text-shadow: var(--nav-text-hover-shadow);
+}
+
+.navpath li.footer
+{
+ list-style-type:none;
+ float:right;
+ padding-left:10px;
+ padding-right:15px;
+ background-image:none;
+ background-repeat:no-repeat;
+ background-position:right;
+ color: var(--footer-foreground-color);
+ font-size: 8pt;
+}
+
+
+div.summary
+{
+ float: right;
+ font-size: 8pt;
+ padding-right: 5px;
+ width: 50%;
+ text-align: right;
+}
+
+div.summary a
+{
+ white-space: nowrap;
+}
+
+table.classindex
+{
+ margin: 10px;
+ white-space: nowrap;
+ margin-left: 3%;
+ margin-right: 3%;
+ width: 94%;
+ border: 0;
+ border-spacing: 0;
+ padding: 0;
+}
+
+div.ingroups
+{
+ font-size: 8pt;
+ width: 50%;
+ text-align: left;
+}
+
+div.ingroups a
+{
+ white-space: nowrap;
+}
+
+div.header
+{
+ background-image: var(--header-gradient-image);
+ background-repeat:repeat-x;
+ background-color: var(--header-background-color);
+ margin: 0px;
+ border-bottom: 1px solid var(--header-separator-color);
+}
+
+div.headertitle
+{
+ padding: 5px 5px 5px 10px;
+}
+
+.PageDocRTL-title div.headertitle {
+ text-align: right;
+ direction: rtl;
+}
+
+dl {
+ padding: 0 0 0 0;
+}
+
+/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */
+dl.section {
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+dl.note {
+ margin-left: -7px;
+ padding-left: 3px;
+ border-left: 4px solid;
+ border-color: #D0C000;
+}
+
+dl.warning, dl.attention {
+ margin-left: -7px;
+ padding-left: 3px;
+ border-left: 4px solid;
+ border-color: #FF0000;
+}
+
+dl.pre, dl.post, dl.invariant {
+ margin-left: -7px;
+ padding-left: 3px;
+ border-left: 4px solid;
+ border-color: #00D000;
+}
+
+dl.deprecated {
+ margin-left: -7px;
+ padding-left: 3px;
+ border-left: 4px solid;
+ border-color: #505050;
+}
+
+dl.todo {
+ margin-left: -7px;
+ padding-left: 3px;
+ border-left: 4px solid;
+ border-color: #00C0E0;
+}
+
+dl.test {
+ margin-left: -7px;
+ padding-left: 3px;
+ border-left: 4px solid;
+ border-color: #3030E0;
+}
+
+dl.bug {
+ margin-left: -7px;
+ padding-left: 3px;
+ border-left: 4px solid;
+ border-color: #C08050;
+}
+
+dl.section dd {
+ margin-bottom: 6px;
+}
+
+
+#projectrow
+{
+ height: 56px;
+}
+
+#projectlogo
+{
+ text-align: center;
+ vertical-align: bottom;
+ border-collapse: separate;
+}
+
+#projectlogo img
+{
+ border: 0px none;
+}
+
+#projectalign
+{
+ vertical-align: middle;
+ padding-left: 0.5em;
+}
+
+#projectname
+{
+ font-size: 200%;
+ font-family: var(--font-family-title);
+ margin: 0px;
+ padding: 2px 0px;
+}
+
+#projectbrief
+{
+ font-size: 90%;
+ font-family: var(--font-family-title);
+ margin: 0px;
+ padding: 0px;
+}
+
+#projectnumber
+{
+ font-size: 50%;
+ font-family: 50% var(--font-family-title);
+ margin: 0px;
+ padding: 0px;
+}
+
+#titlearea
+{
+ padding: 0px;
+ margin: 0px;
+ width: 100%;
+ border-bottom: 1px solid var(--title-separator-color);
+ background-color: var(--title-background-color);
+}
+
+.image
+{
+ text-align: center;
+}
+
+.dotgraph
+{
+ text-align: center;
+}
+
+.mscgraph
+{
+ text-align: center;
+}
+
+.plantumlgraph
+{
+ text-align: center;
+}
+
+.diagraph
+{
+ text-align: center;
+}
+
+.caption
+{
+ font-weight: bold;
+}
+
+dl.citelist {
+ margin-bottom:50px;
+}
+
+dl.citelist dt {
+ color:var(--citation-label-color);
+ float:left;
+ font-weight:bold;
+ margin-right:10px;
+ padding:5px;
+ text-align:right;
+ width:52px;
+}
+
+dl.citelist dd {
+ margin:2px 0 2px 72px;
+ padding:5px 0;
+}
+
+div.toc {
+ padding: 14px 25px;
+ background-color: var(--toc-background-color);
+ border: 1px solid var(--toc-border-color);
+ border-radius: 7px 7px 7px 7px;
+ float: right;
+ height: auto;
+ margin: 0 8px 10px 10px;
+ width: 200px;
+}
+
+div.toc li {
+ background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent;
+ font: 10px/1.2 var(--font-family-toc);
+ margin-top: 5px;
+ padding-left: 10px;
+ padding-top: 2px;
+}
+
+div.toc h3 {
+ font: bold 12px/1.2 var(--font-family-toc);
+ color: var(--toc-header-color);
+ border-bottom: 0 none;
+ margin: 0;
+}
+
+div.toc ul {
+ list-style: none outside none;
+ border: medium none;
+ padding: 0px;
+}
+
+div.toc li.level1 {
+ margin-left: 0px;
+}
+
+div.toc li.level2 {
+ margin-left: 15px;
+}
+
+div.toc li.level3 {
+ margin-left: 15px;
+}
+
+div.toc li.level4 {
+ margin-left: 15px;
+}
+
+span.emoji {
+ /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html
+ * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort;
+ */
+}
+
+span.obfuscator {
+ display: none;
+}
+
+.inherit_header {
+ font-weight: bold;
+ color: var(--inherit-header-color);
+ cursor: pointer;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.inherit_header td {
+ padding: 6px 0px 2px 5px;
+}
+
+.inherit {
+ display: none;
+}
+
+tr.heading h2 {
+ margin-top: 12px;
+ margin-bottom: 4px;
+}
+
+/* tooltip related style info */
+
+.ttc {
+ position: absolute;
+ display: none;
+}
+
+#powerTip {
+ cursor: default;
+ /*white-space: nowrap;*/
+ color: var(--tooltip-foreground-color);
+ background-color: var(--tooltip-background-color);
+ border: 1px solid var(--tooltip-border-color);
+ border-radius: 4px 4px 4px 4px;
+ box-shadow: var(--tooltip-shadow);
+ display: none;
+ font-size: smaller;
+ max-width: 80%;
+ opacity: 0.9;
+ padding: 1ex 1em 1em;
+ position: absolute;
+ z-index: 2147483647;
+}
+
+#powerTip div.ttdoc {
+ color: var(--tooltip-doc-color);
+ font-style: italic;
+}
+
+#powerTip div.ttname a {
+ font-weight: bold;
+}
+
+#powerTip a {
+ color: var(--tooltip-link-color);
+}
+
+#powerTip div.ttname {
+ font-weight: bold;
+}
+
+#powerTip div.ttdeci {
+ color: var(--tooltip-declaration-color);
+}
+
+#powerTip div {
+ margin: 0px;
+ padding: 0px;
+ font-size: 12px;
+ font-family: var(--font-family-tooltip);
+ line-height: 16px;
+}
+
+#powerTip:before, #powerTip:after {
+ content: "";
+ position: absolute;
+ margin: 0px;
+}
+
+#powerTip.n:after, #powerTip.n:before,
+#powerTip.s:after, #powerTip.s:before,
+#powerTip.w:after, #powerTip.w:before,
+#powerTip.e:after, #powerTip.e:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.nw:after, #powerTip.nw:before,
+#powerTip.sw:after, #powerTip.sw:before {
+ border: solid transparent;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+}
+
+#powerTip.n:after, #powerTip.s:after,
+#powerTip.w:after, #powerTip.e:after,
+#powerTip.nw:after, #powerTip.ne:after,
+#powerTip.sw:after, #powerTip.se:after {
+ border-color: rgba(255, 255, 255, 0);
+}
+
+#powerTip.n:before, #powerTip.s:before,
+#powerTip.w:before, #powerTip.e:before,
+#powerTip.nw:before, #powerTip.ne:before,
+#powerTip.sw:before, #powerTip.se:before {
+ border-color: rgba(128, 128, 128, 0);
+}
+
+#powerTip.n:after, #powerTip.n:before,
+#powerTip.ne:after, #powerTip.ne:before,
+#powerTip.nw:after, #powerTip.nw:before {
+ top: 100%;
+}
+
+#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
+ border-top-color: var(--tooltip-background-color);
+ border-width: 10px;
+ margin: 0px -10px;
+}
+#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before {
+ border-top-color: var(--tooltip-border-color);
+ border-width: 11px;
+ margin: 0px -11px;
+}
+#powerTip.n:after, #powerTip.n:before {
+ left: 50%;
+}
+
+#powerTip.nw:after, #powerTip.nw:before {
+ right: 14px;
+}
+
+#powerTip.ne:after, #powerTip.ne:before {
+ left: 14px;
+}
+
+#powerTip.s:after, #powerTip.s:before,
+#powerTip.se:after, #powerTip.se:before,
+#powerTip.sw:after, #powerTip.sw:before {
+ bottom: 100%;
+}
+
+#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
+ border-bottom-color: var(--tooltip-background-color);
+ border-width: 10px;
+ margin: 0px -10px;
+}
+
+#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
+ border-bottom-color: var(--tooltip-border-color);
+ border-width: 11px;
+ margin: 0px -11px;
+}
+
+#powerTip.s:after, #powerTip.s:before {
+ left: 50%;
+}
+
+#powerTip.sw:after, #powerTip.sw:before {
+ right: 14px;
+}
+
+#powerTip.se:after, #powerTip.se:before {
+ left: 14px;
+}
+
+#powerTip.e:after, #powerTip.e:before {
+ left: 100%;
+}
+#powerTip.e:after {
+ border-left-color: var(--tooltip-border-color);
+ border-width: 10px;
+ top: 50%;
+ margin-top: -10px;
+}
+#powerTip.e:before {
+ border-left-color: var(--tooltip-border-color);
+ border-width: 11px;
+ top: 50%;
+ margin-top: -11px;
+}
+
+#powerTip.w:after, #powerTip.w:before {
+ right: 100%;
+}
+#powerTip.w:after {
+ border-right-color: var(--tooltip-border-color);
+ border-width: 10px;
+ top: 50%;
+ margin-top: -10px;
+}
+#powerTip.w:before {
+ border-right-color: var(--tooltip-border-color);
+ border-width: 11px;
+ top: 50%;
+ margin-top: -11px;
+}
+
+@media print
+{
+ #top { display: none; }
+ #side-nav { display: none; }
+ #nav-path { display: none; }
+ body { overflow:visible; }
+ h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
+ .summary { display: none; }
+ .memitem { page-break-inside: avoid; }
+ #doc-content
+ {
+ margin-left:0 !important;
+ height:auto !important;
+ width:auto !important;
+ overflow:inherit;
+ display:inline;
+ }
+}
+
+/* @group Markdown */
+
+table.markdownTable {
+ border-collapse:collapse;
+ margin-top: 4px;
+ margin-bottom: 4px;
+}
+
+table.markdownTable td, table.markdownTable th {
+ border: 1px solid var(--table-cell-border-color);
+ padding: 3px 7px 2px;
+}
+
+table.markdownTable tr {
+}
+
+th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone {
+ background-color: var(--table-header-background-color);
+ color: var(--table-header-foreground-color);
+ font-size: 110%;
+ padding-bottom: 4px;
+ padding-top: 5px;
+}
+
+th.markdownTableHeadLeft, td.markdownTableBodyLeft {
+ text-align: left
+}
+
+th.markdownTableHeadRight, td.markdownTableBodyRight {
+ text-align: right
+}
+
+th.markdownTableHeadCenter, td.markdownTableBodyCenter {
+ text-align: center
+}
+
+tt, code, kbd, samp
+{
+ display: inline-block;
+}
+/* @end */
+
+u {
+ text-decoration: underline;
+}
+
+details>summary {
+ list-style-type: none;
+}
+
+details > summary::-webkit-details-marker {
+ display: none;
+}
+
+details>summary::before {
+ content: "\25ba";
+ padding-right:4px;
+ font-size: 80%;
+}
+
+details[open]>summary::before {
+ content: "\25bc";
+ padding-right:4px;
+ font-size: 80%;
+}
+
+body {
+ scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color);
+}
+
+::-webkit-scrollbar {
+ background-color: var(--scrollbar-background-color);
+ height: 12px;
+ width: 12px;
+}
+::-webkit-scrollbar-thumb {
+ border-radius: 6px;
+ box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color);
+ border: solid 2px transparent;
+}
+::-webkit-scrollbar-corner {
+ background-color: var(--scrollbar-background-color);
+}
+
diff --git a/doc/api/doxygen.svg b/doc/api/doxygen.svg
new file mode 100644
index 0000000..363aa45
--- /dev/null
+++ b/doc/api/doxygen.svg
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" viewBox="0 0 104 31" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <defs>
+ <linearGradient id="a">
+ <stop stop-color="#1E67AF" offset="0"/>
+ <stop stop-color="#3488DC" offset="1"/>
+ </linearGradient>
+ <linearGradient id="d" x1="31.474" x2="31.474" y1="24.821" y2="26.773" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+ <linearGradient id="c" x1="31.474" x2="31.474" y1="24.821" y2="26.773" gradientTransform="matrix(.6816 0 0 1.0248 72.391 -.91809)" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+ <linearGradient id="b" x1="56.295" x2="56.295" y1="24.622" y2="26.574" gradientUnits="userSpaceOnUse" xlink:href="#a"/>
+ <linearGradient id="e" x1="49.067" x2="48.956" y1="19.719" y2="9.5227" gradientTransform="matrix(.97968 0 0 1.0207 -.25579 -.25579)" gradientUnits="userSpaceOnUse">
+ <stop stop-color="#98C3ED" offset="0"/>
+ <stop stop-color="#E2EEFA" offset="1"/>
+ </linearGradient>
+ <filter id="f" x="-.010676" y="-.045304" width="1.0214" height="1.0906" color-interpolation-filters="sRGB">
+ <feGaussianBlur stdDeviation="0.45293203"/>
+ </filter>
+ </defs>
+ <g>
+ <path transform="translate(-2.5759 -27.848)" d="m13.609 32.203v6.8633h-0.05078c-0.40533-0.66867-0.96254-1.1715-1.6719-1.5059-0.69244-0.35193-1.4282-0.52734-2.2051-0.52734-0.96267 0-1.807 0.2027-2.5332 0.60742-0.72622 0.38713-1.3344 0.90556-1.8242 1.5566-0.47289 0.65108-0.83456 1.4092-1.0879 2.2715-0.23644 0.84464-0.35547 1.7236-0.35547 2.6387 0 0.95022 0.11902 1.8643 0.35547 2.7441 0.25333 0.87983 0.615 1.6633 1.0879 2.3496 0.48978 0.66867 1.1065 1.2066 1.8496 1.6113 0.74311 0.38713 1.6044 0.58008 2.584 0.58008 0.86133 0 1.6311-0.15787 2.3066-0.47461 0.69244-0.33434 1.2497-0.87227 1.6719-1.6113h0.05078v1.7422h3.4199v-18.846zm12.875 4.8301c-1.0302 0-1.9596 0.17541-2.7871 0.52734-0.82756 0.33434-1.5358 0.81965-2.127 1.4531-0.59111 0.61588-1.0483 1.3721-1.3691 2.2695-0.32089 0.87983-0.48047 1.866-0.48047 2.957s0.15958 2.0752 0.48047 2.9551c0.32089 0.87983 0.77803 1.6361 1.3691 2.2695 0.59111 0.61588 1.2994 1.0914 2.127 1.4258 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.0302 0 1.9596-0.16762 2.7871-0.50195 0.84444-0.33434 1.5612-0.8099 2.1523-1.4258 0.59111-0.63348 1.0483-1.3897 1.3691-2.2695 0.32089-0.87983 0.48047-1.8641 0.48047-2.9551s-0.15958-2.0772-0.48047-2.957c-0.32089-0.89743-0.77803-1.6536-1.3691-2.2695-0.59111-0.63348-1.3079-1.1188-2.1523-1.4531-0.82756-0.35193-1.7569-0.52734-2.7871-0.52734zm41.715 0c-0.912 0-1.7223 0.18516-2.4316 0.55469-0.69244 0.36953-1.2752 0.87043-1.748 1.5039-0.47289 0.61588-0.83651 1.337-1.0898 2.1641-0.23645 0.80944-0.35352 1.6553-0.35352 2.5352 0 0.93262 0.10007 1.8214 0.30273 2.666 0.21956 0.82704 0.55767 1.556 1.0137 2.1895 0.456 0.61588 1.0387 1.109 1.748 1.4785 0.70933 0.35193 1.5536 0.5293 2.5332 0.5293 0.79378 0 1.5446-0.16762 2.2539-0.50195 0.72622-0.35193 1.2834-0.88986 1.6719-1.6113h0.05078v1.7949c0.01689 0.96782-0.21071 1.7689-0.68359 2.4023-0.456 0.63348-1.1898 0.95117-2.2031 0.95117-0.64178 0-1.2075-0.14228-1.6973-0.42383-0.48978-0.26395-0.81939-0.74731-0.98828-1.4512h-3.5723c0.05067 0.77425 0.25276 1.435 0.60742 1.9805 0.37156 0.56309 0.8287 1.0192 1.3691 1.3711 0.55733 0.35193 1.1656 0.60726 1.8242 0.76562 0.67556 0.17597 1.3328 0.26562 1.9746 0.26562 1.5031 0 2.7025-0.21245 3.5977-0.63477 0.89511-0.42232 1.5798-0.94076 2.0527-1.5566 0.47289-0.59829 0.777-1.2493 0.91211-1.9531 0.152-0.70386 0.22656-1.3295 0.22656-1.875v-12.775h-3.4199v1.8223h-0.05078c-0.43911-0.79185-0.98782-1.3551-1.6465-1.6895-0.64178-0.33434-1.3926-0.50195-2.2539-0.50195zm16.523 0c-0.99644 0-1.9088 0.18516-2.7363 0.55469-0.81067 0.36953-1.5124 0.88018-2.1035 1.5312-0.59111 0.63348-1.0463 1.3897-1.3672 2.2695s-0.48047 1.831-0.48047 2.8516c0 1.0558 0.15108 2.0225 0.45508 2.9023 0.32089 0.87983 0.76758 1.6361 1.3418 2.2695 0.57422 0.63348 1.276 1.1266 2.1035 1.4785 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.4862 0 2.7517-0.35277 3.7988-1.0566 1.0471-0.70387 1.8254-1.8733 2.332-3.5098h-3.168c-0.11822 0.42232-0.43934 0.82772-0.96289 1.2148-0.52355 0.36953-1.1468 0.55274-1.873 0.55273-1.0133 0-1.7916-0.27286-2.332-0.81836-0.54044-0.5455-0.83605-1.4245-0.88672-2.6387h9.4492c0.06756-1.0558-0.01551-2.0673-0.25195-3.0352-0.23644-0.96782-0.62557-1.8293-1.166-2.5859-0.52356-0.75666-1.1998-1.355-2.0273-1.7949-0.82756-0.45751-1.7974-0.6875-2.9121-0.6875zm16.189 0c-0.76 0-1.5023 0.18516-2.2285 0.55469-0.72622 0.35193-1.3174 0.92299-1.7734 1.7148h-0.07617v-1.9004h-3.4199v13.646h3.5977v-7.1523c0-1.3901 0.21909-2.3841 0.6582-2.9824 0.43911-0.61588 1.1494-0.92383 2.1289-0.92383 0.86133 0 1.4611 0.28066 1.7988 0.84375 0.33777 0.5455 0.50586 1.3816 0.50586 2.5078v7.707h3.5976v-8.3926c0-0.84464-0.0765-1.6106-0.22851-2.2969-0.13511-0.70387-0.37971-1.2925-0.73438-1.7676-0.35466-0.49271-0.84386-0.87277-1.4688-1.1367-0.608-0.28155-1.3948-0.42188-2.3574-0.42188zm-66.063 0.36914 4.3066 6.4668-4.7129 7.1797h4.0293l2.7363-4.3027 2.7344 4.3027h4.1055l-4.8398-7.2578 4.3066-6.3887h-3.9766l-2.2793 3.5645-2.3066-3.5645zm13.275 0 4.584 12.803c0.10133 0.26395 0.15234 0.54461 0.15234 0.84375 0 0.40472-0.11707 0.77504-0.35352 1.1094-0.21956 0.33434-0.56617 0.52729-1.0391 0.58008-0.35467 0.0176-0.70979 0.0098-1.0645-0.02539-0.35467-0.03519-0.70128-0.07028-1.0391-0.10547v3.0879c0.37156 0.03519 0.73518 0.06051 1.0898 0.07813 0.37156 0.03519 0.74368 0.05273 1.1152 0.05273 1.2329 0 2.1943-0.23778 2.8867-0.71289 0.69244-0.47511 1.2326-1.2664 1.6211-2.375l5.4727-15.336h-3.7246l-2.8613 9.3438h-0.05078l-2.9648-9.3438zm-37.48 2.4551c0.59111 0 1.0823 0.12279 1.4707 0.36914 0.38844 0.24635 0.6991 0.57184 0.93555 0.97656 0.25333 0.38713 0.43187 0.84515 0.5332 1.373 0.10133 0.5103 0.15234 1.0482 0.15234 1.6113 0 0.56309-0.05101 1.1069-0.15234 1.6348-0.10133 0.5279-0.27137 1.0035-0.50781 1.4258-0.23644 0.40472-0.5556 0.73021-0.96094 0.97656-0.38844 0.24635-0.87959 0.36914-1.4707 0.36914-0.55733 0-1.038-0.12279-1.4434-0.36914-0.38844-0.26395-0.71806-0.59723-0.98828-1.002-0.25333-0.42232-0.43842-0.89788-0.55664-1.4258s-0.17773-1.0561-0.17773-1.584c-1e-7 -0.56309 0.05101-1.0991 0.15234-1.6094 0.11822-0.5279 0.29481-0.99567 0.53125-1.4004 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.24635 0.90303-0.36914 1.4941-0.36914zm15.84 0c0.608 0 1.1142 0.13253 1.5195 0.39648 0.42222 0.24635 0.75184 0.57184 0.98828 0.97656 0.25333 0.40472 0.42992 0.87054 0.53125 1.3984 0.10133 0.5279 0.15234 1.0658 0.15234 1.6113 0 0.5455-0.05101 1.0815-0.15234 1.6094-0.10134 0.5103-0.27792 0.97612-0.53125 1.3984-0.23644 0.40472-0.56606 0.73021-0.98828 0.97656-0.40533 0.24635-0.91153 0.36914-1.5195 0.36914-0.608 0-1.1142-0.12279-1.5195-0.36914s-0.73495-0.57184-0.98828-0.97656c-0.23644-0.42232-0.40648-0.88814-0.50781-1.3984-0.10133-0.5279-0.15234-1.0639-0.15234-1.6094 0-0.5455 0.05101-1.0834 0.15234-1.6113 0.10133-0.5279 0.27137-0.99371 0.50781-1.3984 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.26395 0.91153-0.39648 1.5195-0.39648zm42.602 0c0.59111 0 1.0803 0.11499 1.4688 0.34375 0.38844 0.22876 0.70105 0.5367 0.9375 0.92383 0.23644 0.38713 0.40648 0.8354 0.50781 1.3457 0.10133 0.49271 0.15039 1.0209 0.15039 1.584 0 0.4927-0.06606 0.96827-0.20117 1.4258-0.11822 0.43992-0.30526 0.83557-0.55859 1.1875-0.25333 0.35193-0.57445 0.63259-0.96289 0.84375-0.38844 0.21116-0.83513 0.31836-1.3418 0.31836-0.55733 0-1.021-0.12474-1.3926-0.37109-0.37156-0.24635-0.67566-0.56209-0.91211-0.94922-0.21956-0.38713-0.38109-0.81786-0.48242-1.293-0.08444-0.49271-0.12695-0.98581-0.12695-1.4785 0-0.5103 0.05101-0.99366 0.15234-1.4512 0.11822-0.47511 0.29676-0.89025 0.5332-1.2422 0.25333-0.36953 0.55744-0.65993 0.91211-0.87109 0.37156-0.21116 0.80974-0.31641 1.3164-0.31641zm15.535 0c0.87822 0 1.529 0.24753 1.9512 0.74023 0.43911 0.49271 0.74322 1.2138 0.91211 2.1641h-5.8535c0.01689-0.26395 0.0679-0.5641 0.15234-0.89844 0.10133-0.33434 0.26287-0.65008 0.48242-0.94922 0.23644-0.29914 0.54055-0.54667 0.91211-0.74023 0.38845-0.21116 0.86914-0.31641 1.4434-0.31641z" filter="url(#f)" opacity=".3" stroke="#969696"/>
+ <path d="m0.97202 24.161 43.605-0.0019 0.0508 3.3061-43.6 0.04174z" fill="url(#d)" stroke="#000" stroke-width=".5"/>
+ <path d="m10.283 3.5547v6.8633h-0.05078c-0.40533-0.66867-0.96254-1.1715-1.6719-1.5059-0.69244-0.35193-1.4282-0.52734-2.2051-0.52734-0.96267 0-1.807 0.2027-2.5332 0.60742-0.72622 0.38713-1.3344 0.90556-1.8242 1.5566-0.47289 0.65108-0.83456 1.4092-1.0879 2.2715-0.23644 0.84464-0.35547 1.7236-0.35547 2.6387 0 0.95022 0.11902 1.8643 0.35547 2.7441 0.25333 0.87983 0.615 1.6633 1.0879 2.3496 0.48978 0.66867 1.1065 1.2066 1.8496 1.6113 0.74311 0.38713 1.6044 0.58008 2.584 0.58008 0.86133 0 1.6311-0.15787 2.3066-0.47461 0.69244-0.33434 1.2497-0.87227 1.6719-1.6113h0.05078v1.7422h3.4199v-18.846zm12.875 4.8301c-1.0302 0-1.9596 0.17541-2.7871 0.52734-0.82756 0.33434-1.5358 0.81965-2.127 1.4531-0.59111 0.61588-1.0483 1.3721-1.3691 2.2695-0.32089 0.87983-0.48047 1.866-0.48047 2.957s0.15958 2.0752 0.48047 2.9551c0.32089 0.87983 0.77803 1.6361 1.3691 2.2695 0.59111 0.61588 1.2994 1.0914 2.127 1.4258 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.0302 0 1.9596-0.16762 2.7871-0.50195 0.84444-0.33434 1.5612-0.8099 2.1523-1.4258 0.59111-0.63348 1.0483-1.3897 1.3691-2.2695 0.32089-0.87983 0.48047-1.8641 0.48047-2.9551s-0.15958-2.0772-0.48047-2.957c-0.32089-0.89743-0.77803-1.6536-1.3691-2.2695-0.59111-0.63348-1.3079-1.1188-2.1523-1.4531-0.82756-0.35193-1.7569-0.52734-2.7871-0.52734zm41.715 0c-0.912 0-1.7223 0.18516-2.4316 0.55469-0.69244 0.36953-1.2752 0.87043-1.748 1.5039-0.47289 0.61588-0.83651 1.337-1.0898 2.1641-0.23644 0.80944-0.35352 1.6553-0.35352 2.5352 0 0.93262 0.10007 1.8214 0.30273 2.666 0.21956 0.82704 0.55767 1.556 1.0137 2.1895 0.456 0.61588 1.0387 1.109 1.748 1.4785 0.70933 0.35193 1.5536 0.5293 2.5332 0.5293 0.79378 0 1.5446-0.16762 2.2539-0.50195 0.72622-0.35193 1.2834-0.88986 1.6719-1.6113h0.05078v1.7949c0.01689 0.96782-0.21071 1.7689-0.68359 2.4023-0.456 0.63348-1.1898 0.95117-2.2031 0.95117-0.64178 0-1.2075-0.14228-1.6973-0.42383-0.48978-0.26395-0.81939-0.74731-0.98828-1.4512h-3.5723c0.05067 0.77425 0.25276 1.435 0.60742 1.9805 0.37156 0.56309 0.8287 1.0192 1.3691 1.3711 0.55733 0.35193 1.1656 0.60726 1.8242 0.76562 0.67556 0.17597 1.3328 0.26562 1.9746 0.26562 1.5031 0 2.7025-0.21245 3.5977-0.63477 0.89511-0.42232 1.5798-0.94076 2.0527-1.5566 0.47289-0.59829 0.777-1.2493 0.91211-1.9531 0.152-0.70386 0.22656-1.3295 0.22656-1.875v-12.775h-3.4199v1.8223h-0.05078c-0.43911-0.79185-0.98782-1.3551-1.6465-1.6895-0.64178-0.33434-1.3926-0.50195-2.2539-0.50195zm16.523 0c-0.99644 0-1.9088 0.18516-2.7363 0.55469-0.81067 0.36953-1.5124 0.88017-2.1035 1.5312-0.59111 0.63348-1.0463 1.3897-1.3672 2.2695s-0.48047 1.831-0.48047 2.8516c0 1.0558 0.15108 2.0225 0.45508 2.9023 0.32089 0.87983 0.76758 1.6361 1.3418 2.2695 0.57422 0.63348 1.276 1.1266 2.1035 1.4785 0.82756 0.33434 1.7569 0.50195 2.7871 0.50195 1.4862 0 2.7517-0.35278 3.7988-1.0566 1.0471-0.70386 1.8254-1.8733 2.332-3.5098h-3.168c-0.11822 0.42232-0.43934 0.82772-0.96289 1.2148-0.52355 0.36953-1.1468 0.55274-1.873 0.55273-1.0133 0-1.7916-0.27286-2.332-0.81836-0.54044-0.5455-0.83605-1.4245-0.88672-2.6387h9.4492c0.06756-1.0558-0.01551-2.0673-0.25195-3.0352-0.23644-0.96782-0.62557-1.8293-1.166-2.5859-0.52356-0.75666-1.1998-1.355-2.0273-1.7949-0.82756-0.45751-1.7974-0.6875-2.9121-0.6875zm16.189 0c-0.76 0-1.5023 0.18516-2.2285 0.55469-0.72622 0.35193-1.3174 0.923-1.7734 1.7148h-0.07617v-1.9004h-3.4199v13.646h3.5977v-7.1523c0-1.3901 0.21909-2.3841 0.6582-2.9824 0.43911-0.61588 1.1494-0.92383 2.1289-0.92383 0.86133 0 1.461 0.28066 1.7988 0.84375 0.33778 0.5455 0.50586 1.3816 0.50586 2.5078v7.707h3.5977v-8.3926c0-0.84464-0.0765-1.6106-0.22852-2.2969-0.13511-0.70387-0.3797-1.2925-0.73437-1.7676-0.35466-0.49271-0.84386-0.87277-1.4688-1.1367-0.608-0.28155-1.3948-0.42188-2.3574-0.42188zm-66.062 0.36914 4.3066 6.4668-4.7129 7.1797h4.0293l2.7363-4.3027 2.7344 4.3027h4.1055l-4.8398-7.2578 4.3066-6.3887h-3.9766l-2.2793 3.5645-2.3066-3.5645zm13.275 0 4.584 12.803c0.10133 0.26395 0.15234 0.54461 0.15234 0.84375 0 0.40472-0.11707 0.77504-0.35352 1.1094-0.21956 0.33434-0.56617 0.52729-1.0391 0.58008-0.35467 0.0176-0.70979 0.0098-1.0645-0.02539-0.35467-0.03519-0.70128-0.07027-1.0391-0.10547v3.0879c0.37156 0.03519 0.73518 0.06052 1.0898 0.07813 0.37156 0.03519 0.74368 0.05273 1.1152 0.05273 1.2329 0 2.1943-0.23778 2.8867-0.71289 0.69244-0.47511 1.2326-1.2664 1.6211-2.375l5.4727-15.336h-3.7246l-2.8613 9.3437h-0.05078l-2.9648-9.3437zm-37.48 2.4551c0.59111 0 1.0823 0.12279 1.4707 0.36914s0.6991 0.57184 0.93555 0.97656c0.25333 0.38713 0.43187 0.84515 0.5332 1.373 0.10133 0.5103 0.15234 1.0482 0.15234 1.6113 0 0.56309-0.05101 1.1069-0.15234 1.6348-0.10133 0.5279-0.27137 1.0035-0.50781 1.4258-0.23644 0.40472-0.5556 0.73021-0.96094 0.97656-0.38844 0.24635-0.87959 0.36914-1.4707 0.36914-0.55733 0-1.038-0.12279-1.4434-0.36914-0.38844-0.26395-0.71806-0.59723-0.98828-1.002-0.25333-0.42232-0.43842-0.89788-0.55664-1.4258s-0.17773-1.0561-0.17773-1.584c-1e-7 -0.56309 0.05101-1.0991 0.15234-1.6094 0.11822-0.5279 0.29481-0.99567 0.53125-1.4004 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.24635 0.90303-0.36914 1.4941-0.36914zm15.84 0c0.608 0 1.1142 0.13254 1.5195 0.39648 0.42222 0.24635 0.75184 0.57184 0.98828 0.97656 0.25333 0.40472 0.42992 0.87054 0.53125 1.3984 0.10133 0.5279 0.15234 1.0658 0.15234 1.6113 0 0.5455-0.05101 1.0815-0.15234 1.6094-0.10133 0.5103-0.27792 0.97612-0.53125 1.3984-0.23644 0.40472-0.56606 0.73021-0.98828 0.97656-0.40533 0.24635-0.91153 0.36914-1.5195 0.36914-0.608 0-1.1142-0.12279-1.5195-0.36914s-0.73495-0.57184-0.98828-0.97656c-0.23644-0.42232-0.40648-0.88813-0.50781-1.3984-0.10133-0.5279-0.15234-1.0639-0.15234-1.6094 0-0.5455 0.05101-1.0834 0.15234-1.6113 0.10133-0.5279 0.27137-0.99371 0.50781-1.3984 0.25333-0.40472 0.58295-0.73021 0.98828-0.97656 0.40533-0.26395 0.91153-0.39648 1.5195-0.39648zm42.602 0c0.59111 0 1.0803 0.11499 1.4688 0.34375 0.38844 0.22876 0.70106 0.5367 0.9375 0.92383 0.23644 0.38713 0.40648 0.8354 0.50781 1.3457 0.10133 0.49271 0.15039 1.0209 0.15039 1.584 0 0.49271-0.06606 0.96827-0.20117 1.4258-0.11822 0.43992-0.30526 0.83557-0.55859 1.1875-0.25333 0.35193-0.57445 0.63259-0.96289 0.84375-0.38844 0.21116-0.83513 0.31836-1.3418 0.31836-0.55733 0-1.021-0.12474-1.3926-0.37109-0.37156-0.24635-0.67566-0.56209-0.91211-0.94922-0.21956-0.38713-0.38109-0.81786-0.48242-1.293-0.08444-0.49271-0.12695-0.98581-0.12695-1.4785 0-0.5103 0.05101-0.99366 0.15234-1.4512 0.11822-0.47511 0.29676-0.89026 0.5332-1.2422 0.25333-0.36953 0.55744-0.65993 0.91211-0.87109 0.37156-0.21116 0.80974-0.31641 1.3164-0.31641zm15.535 0c0.87822 0 1.529 0.24753 1.9512 0.74024 0.43911 0.49271 0.74322 1.2138 0.91211 2.1641h-5.8535c0.01689-0.26395 0.0679-0.5641 0.15234-0.89844 0.10133-0.33434 0.26287-0.65008 0.48242-0.94922 0.23644-0.29914 0.54055-0.54667 0.91211-0.74023 0.38845-0.21116 0.86914-0.31641 1.4434-0.31641z" fill="url(#e)" stroke="#195794" stroke-width=".7"/>
+ <path d="m52.988 27.291c0.99602-1.0359 1.3944-1.8725 1.7928-3.1076l3.8247-0.03984c0.3113 1.6096 0.82413 2.5137 1.6335 3.1474z" fill="url(#b)" stroke="#000" stroke-width=".5"/>
+ <path d="m73.89 24.04 28.885-0.2011-0.12476 3.3879-31.033 0.16229c1.2621-1.0234 1.9665-2.2859 2.2724-3.3491z" fill="url(#c)" stroke="#000" stroke-width=".41788"/>
+ </g>
+</svg>
diff --git a/doc/api/files.html b/doc/api/files.html
new file mode 100644
index 0000000..459665c
--- /dev/null
+++ b/doc/api/files.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): File List</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li class="current"><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="headertitle"><div class="title">File List</div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
+<div class="levels">[detail level <span >1</span><span >2</span>]</div><table class="directory">
+<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" >&#9660;</span><span id="img_0_" class="iconfopen" >&#160;</span><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html" target="_self">lzma</a></td><td class="desc"></td></tr>
+<tr id="row_0_0_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="base_8h.html" target="_self">base.h</a></td><td class="desc">Data types and functions used in many places in liblzma API </td></tr>
+<tr id="row_0_1_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="bcj_8h.html" target="_self">bcj.h</a></td><td class="desc">Branch/Call/Jump conversion filters </td></tr>
+<tr id="row_0_2_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="block_8h.html" target="_self">block.h</a></td><td class="desc">.xz Block handling </td></tr>
+<tr id="row_0_3_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="check_8h.html" target="_self">check.h</a></td><td class="desc">Integrity checks </td></tr>
+<tr id="row_0_4_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="container_8h.html" target="_self">container.h</a></td><td class="desc">File formats </td></tr>
+<tr id="row_0_5_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="delta_8h.html" target="_self">delta.h</a></td><td class="desc">Delta filter </td></tr>
+<tr id="row_0_6_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="filter_8h.html" target="_self">filter.h</a></td><td class="desc">Common filter related types and functions </td></tr>
+<tr id="row_0_7_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="hardware_8h.html" target="_self">hardware.h</a></td><td class="desc">Hardware information </td></tr>
+<tr id="row_0_8_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="index_8h.html" target="_self">index.h</a></td><td class="desc">Handling of .xz Index and related information </td></tr>
+<tr id="row_0_9_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="index__hash_8h.html" target="_self">index_hash.h</a></td><td class="desc">Validate Index by using a hash function </td></tr>
+<tr id="row_0_10_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="lzma12_8h.html" target="_self">lzma12.h</a></td><td class="desc">LZMA1 and LZMA2 filters </td></tr>
+<tr id="row_0_11_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="stream__flags_8h.html" target="_self">stream_flags.h</a></td><td class="desc">.xz Stream Header and Stream Footer encoder and decoder </td></tr>
+<tr id="row_0_12_" class="odd"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="version_8h.html" target="_self">version.h</a></td><td class="desc">Version number </td></tr>
+<tr id="row_0_13_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="vli_8h.html" target="_self">vli.h</a></td><td class="desc">Variable-length integer handling </td></tr>
+<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icondoc"></span><a class="el" href="lzma_8h.html" target="_self">lzma.h</a></td><td class="desc">The public API of liblzma data compression library </td></tr>
+</table>
+</div><!-- directory -->
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/filter_8h.html b/doc/api/filter_8h.html
new file mode 100644
index 0000000..7f2ffaa
--- /dev/null
+++ b/doc/api/filter_8h.html
@@ -0,0 +1,1342 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/filter.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">filter.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Common filter related types and functions.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__filter.html">lzma_filter</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter options. <a href="structlzma__filter.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:ab33c0cc1728bf390e5b84f8bce1928ba"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#ab33c0cc1728bf390e5b84f8bce1928ba">LZMA_FILTERS_MAX</a>&#160;&#160;&#160;4</td></tr>
+<tr class="memdesc:ab33c0cc1728bf390e5b84f8bce1928ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of filters in a chain. <br /></td></tr>
+<tr class="separator:ab33c0cc1728bf390e5b84f8bce1928ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a41aa51eeb53190404439c31d8e9c97cd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a41aa51eeb53190404439c31d8e9c97cd">LZMA_STR_ALL_FILTERS</a>&#160;&#160;&#160;UINT32_C(0x01)</td></tr>
+<tr class="memdesc:a41aa51eeb53190404439c31d8e9c97cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow or show all filters. <br /></td></tr>
+<tr class="separator:a41aa51eeb53190404439c31d8e9c97cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:adc33f4c0c7b5d3ae36acc0437a904339"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#adc33f4c0c7b5d3ae36acc0437a904339">LZMA_STR_NO_VALIDATION</a>&#160;&#160;&#160;UINT32_C(0x02)</td></tr>
+<tr class="memdesc:adc33f4c0c7b5d3ae36acc0437a904339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Do not validate the filter chain in <a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30" title="Convert a string to a filter chain.">lzma_str_to_filters()</a> <br /></td></tr>
+<tr class="separator:adc33f4c0c7b5d3ae36acc0437a904339"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a09a775f6a78d28ca136acfb51ad5fa02"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a09a775f6a78d28ca136acfb51ad5fa02">LZMA_STR_ENCODER</a>&#160;&#160;&#160;UINT32_C(0x10)</td></tr>
+<tr class="memdesc:a09a775f6a78d28ca136acfb51ad5fa02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stringify encoder options. <br /></td></tr>
+<tr class="separator:a09a775f6a78d28ca136acfb51ad5fa02"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8a0f3fc03bdb84a294cdd53a98783104"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a8a0f3fc03bdb84a294cdd53a98783104">LZMA_STR_DECODER</a>&#160;&#160;&#160;UINT32_C(0x20)</td></tr>
+<tr class="memdesc:a8a0f3fc03bdb84a294cdd53a98783104"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stringify decoder options. <br /></td></tr>
+<tr class="separator:a8a0f3fc03bdb84a294cdd53a98783104"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a87e9ac4ae5829b092262223256141a29"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a87e9ac4ae5829b092262223256141a29">LZMA_STR_GETOPT_LONG</a>&#160;&#160;&#160;UINT32_C(0x40)</td></tr>
+<tr class="memdesc:a87e9ac4ae5829b092262223256141a29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Produce xz-compatible getopt_long() syntax. <br /></td></tr>
+<tr class="separator:a87e9ac4ae5829b092262223256141a29"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac0113c47caf98a735db2297936c5e857"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#ac0113c47caf98a735db2297936c5e857">LZMA_STR_NO_SPACES</a>&#160;&#160;&#160;UINT32_C(0x80)</td></tr>
+<tr class="memdesc:ac0113c47caf98a735db2297936c5e857"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use two dashes "--" instead of a space to separate filters. <br /></td></tr>
+<tr class="separator:ac0113c47caf98a735db2297936c5e857"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a3db3c36cd6e57658a74c53e4daa2bef6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a3db3c36cd6e57658a74c53e4daa2bef6">lzma_filter_encoder_is_supported</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> id) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:a3db3c36cd6e57658a74c53e4daa2bef6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if the given Filter ID is supported for encoding. <br /></td></tr>
+<tr class="separator:a3db3c36cd6e57658a74c53e4daa2bef6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acab0c67bf5b3a76f2b474c8e1da98938"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#acab0c67bf5b3a76f2b474c8e1da98938">lzma_filter_decoder_is_supported</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> id) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:acab0c67bf5b3a76f2b474c8e1da98938"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if the given Filter ID is supported for decoding. <br /></td></tr>
+<tr class="separator:acab0c67bf5b3a76f2b474c8e1da98938"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a611fe1176eeeda187b1bd8aef45040aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a611fe1176eeeda187b1bd8aef45040aa">lzma_filters_copy</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *src, <a class="el" href="structlzma__filter.html">lzma_filter</a> *dest, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a611fe1176eeeda187b1bd8aef45040aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy the filters array. <br /></td></tr>
+<tr class="separator:a611fe1176eeeda187b1bd8aef45040aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae06979d219897f5f4c29cbc7a96a8892"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#ae06979d219897f5f4c29cbc7a96a8892">lzma_filters_free</a> (<a class="el" href="structlzma__filter.html">lzma_filter</a> *filters, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow</td></tr>
+<tr class="memdesc:ae06979d219897f5f4c29cbc7a96a8892"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free the options in the array of <a class="el" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> structures. <br /></td></tr>
+<tr class="separator:ae06979d219897f5f4c29cbc7a96a8892"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a730f9391e85a5979bcd1b32643ae7176"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a730f9391e85a5979bcd1b32643ae7176">lzma_raw_encoder_memusage</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a730f9391e85a5979bcd1b32643ae7176"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate approximate memory requirements for raw encoder. <br /></td></tr>
+<tr class="separator:a730f9391e85a5979bcd1b32643ae7176"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a58511249ae9206d7de7c5d1f05842297"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a58511249ae9206d7de7c5d1f05842297">lzma_raw_decoder_memusage</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a58511249ae9206d7de7c5d1f05842297"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate approximate memory requirements for raw decoder. <br /></td></tr>
+<tr class="separator:a58511249ae9206d7de7c5d1f05842297"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2368e4129032345eb0738b0c6e085703"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a2368e4129032345eb0738b0c6e085703">lzma_raw_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a2368e4129032345eb0738b0c6e085703"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize raw encoder. <br /></td></tr>
+<tr class="separator:a2368e4129032345eb0738b0c6e085703"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae77b3b6c5eccd9d77bbafef0a8a203c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#ae77b3b6c5eccd9d77bbafef0a8a203c1">lzma_raw_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:ae77b3b6c5eccd9d77bbafef0a8a203c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize raw decoder. <br /></td></tr>
+<tr class="separator:ae77b3b6c5eccd9d77bbafef0a8a203c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4a8fd969df001e449ebe4421ab33bba5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a4a8fd969df001e449ebe4421ab33bba5">lzma_filters_update</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters) lzma_nothrow</td></tr>
+<tr class="memdesc:a4a8fd969df001e449ebe4421ab33bba5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the filter chain in the encoder. <br /></td></tr>
+<tr class="separator:a4a8fd969df001e449ebe4421ab33bba5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a226724ab3391b410281fdf656cc7c432"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a226724ab3391b410281fdf656cc7c432">lzma_raw_buffer_encode</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a226724ab3391b410281fdf656cc7c432"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call raw encoder. <br /></td></tr>
+<tr class="separator:a226724ab3391b410281fdf656cc7c432"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3b942df507e4f9a6d7525e5a4c6864e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a3b942df507e4f9a6d7525e5a4c6864e5">lzma_raw_buffer_decode</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t *in_pos, size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a3b942df507e4f9a6d7525e5a4c6864e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call raw decoder. <br /></td></tr>
+<tr class="separator:a3b942df507e4f9a6d7525e5a4c6864e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aee038818cf7bbe044c3f7a7c86998c1b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#aee038818cf7bbe044c3f7a7c86998c1b">lzma_properties_size</a> (uint32_t *size, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filter) lzma_nothrow</td></tr>
+<tr class="memdesc:aee038818cf7bbe044c3f7a7c86998c1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the Filter Properties field. <br /></td></tr>
+<tr class="separator:aee038818cf7bbe044c3f7a7c86998c1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8e00887086df5a44084ac22e48415de3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a8e00887086df5a44084ac22e48415de3">lzma_properties_encode</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filter, uint8_t *props) lzma_nothrow</td></tr>
+<tr class="memdesc:a8e00887086df5a44084ac22e48415de3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode the Filter Properties field. <br /></td></tr>
+<tr class="separator:a8e00887086df5a44084ac22e48415de3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a88d2e864b2039ac82802cc202278d478"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a88d2e864b2039ac82802cc202278d478">lzma_properties_decode</a> (<a class="el" href="structlzma__filter.html">lzma_filter</a> *filter, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *props, size_t props_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a88d2e864b2039ac82802cc202278d478"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode the Filter Properties field. <br /></td></tr>
+<tr class="separator:a88d2e864b2039ac82802cc202278d478"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a996c9c21840ed54e37bd1f664a79d940"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a996c9c21840ed54e37bd1f664a79d940">lzma_filter_flags_size</a> (uint32_t *size, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filter) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a996c9c21840ed54e37bd1f664a79d940"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate encoded size of a Filter Flags field. <br /></td></tr>
+<tr class="separator:a996c9c21840ed54e37bd1f664a79d940"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a96f23309bc21398fece18c00ebe7db98"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a96f23309bc21398fece18c00ebe7db98">lzma_filter_flags_encode</a> (const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filter, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a96f23309bc21398fece18c00ebe7db98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode Filter Flags into given buffer. <br /></td></tr>
+<tr class="separator:a96f23309bc21398fece18c00ebe7db98"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4cba9a4c658cce0ff01fd102b31ea1a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a4cba9a4c658cce0ff01fd102b31ea1a7">lzma_filter_flags_decode</a> (<a class="el" href="structlzma__filter.html">lzma_filter</a> *filter, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a4cba9a4c658cce0ff01fd102b31ea1a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode Filter Flags from given buffer. <br /></td></tr>
+<tr class="separator:a4cba9a4c658cce0ff01fd102b31ea1a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa042cf11749bc2183b27de1c3142da30"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30">lzma_str_to_filters</a> (const char *str, int *error_pos, <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters, uint32_t flags, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:aa042cf11749bc2183b27de1c3142da30"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a string to a filter chain. <br /></td></tr>
+<tr class="separator:aa042cf11749bc2183b27de1c3142da30"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7deeb86ef59a9111b8033681290e0fb0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#a7deeb86ef59a9111b8033681290e0fb0">lzma_str_from_filters</a> (char **str, const <a class="el" href="structlzma__filter.html">lzma_filter</a> *filters, uint32_t flags, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a7deeb86ef59a9111b8033681290e0fb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a filter chain to a string. <br /></td></tr>
+<tr class="separator:a7deeb86ef59a9111b8033681290e0fb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab51585b68796ce0270f87e615b923809"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="filter_8h.html#ab51585b68796ce0270f87e615b923809">lzma_str_list_filters</a> (char **str, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> filter_id, uint32_t flags, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:ab51585b68796ce0270f87e615b923809"><td class="mdescLeft">&#160;</td><td class="mdescRight">List available filters and/or their options (for help message) <br /></td></tr>
+<tr class="separator:ab51585b68796ce0270f87e615b923809"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Common filter related types and functions. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="ab33c0cc1728bf390e5b84f8bce1928ba" name="ab33c0cc1728bf390e5b84f8bce1928ba"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab33c0cc1728bf390e5b84f8bce1928ba">&#9670;&#160;</a></span>LZMA_FILTERS_MAX</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_FILTERS_MAX&#160;&#160;&#160;4</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Maximum number of filters in a chain. </p>
+<p>A filter chain can have 1-4 filters, of which three are allowed to change the size of the data. Usually only one or two filters are needed. </p>
+
+</div>
+</div>
+<a id="a41aa51eeb53190404439c31d8e9c97cd" name="a41aa51eeb53190404439c31d8e9c97cd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a41aa51eeb53190404439c31d8e9c97cd">&#9670;&#160;</a></span>LZMA_STR_ALL_FILTERS</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STR_ALL_FILTERS&#160;&#160;&#160;UINT32_C(0x01)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Allow or show all filters. </p>
+<p>By default only the filters supported in the .xz format are accept by <a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30" title="Convert a string to a filter chain.">lzma_str_to_filters()</a> or shown by <a class="el" href="filter_8h.html#ab51585b68796ce0270f87e615b923809" title="List available filters and/or their options (for help message)">lzma_str_list_filters()</a>. </p>
+
+</div>
+</div>
+<a id="adc33f4c0c7b5d3ae36acc0437a904339" name="adc33f4c0c7b5d3ae36acc0437a904339"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#adc33f4c0c7b5d3ae36acc0437a904339">&#9670;&#160;</a></span>LZMA_STR_NO_VALIDATION</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STR_NO_VALIDATION&#160;&#160;&#160;UINT32_C(0x02)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Do not validate the filter chain in <a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30" title="Convert a string to a filter chain.">lzma_str_to_filters()</a> </p>
+<p>By default <a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30" title="Convert a string to a filter chain.">lzma_str_to_filters()</a> can return an error if the filter chain as a whole isn't usable in the .xz format or in the raw encoder or decoder. With this flag, this validation is skipped. This flag doesn't affect the handling of the individual filter options. To allow non-.xz filters also LZMA_STR_ALL_FILTERS is needed. </p>
+
+</div>
+</div>
+<a id="a09a775f6a78d28ca136acfb51ad5fa02" name="a09a775f6a78d28ca136acfb51ad5fa02"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a09a775f6a78d28ca136acfb51ad5fa02">&#9670;&#160;</a></span>LZMA_STR_ENCODER</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STR_ENCODER&#160;&#160;&#160;UINT32_C(0x10)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Stringify encoder options. </p>
+<p>Show the filter-specific options that the encoder will use. This may be useful for verbose diagnostic messages.</p>
+<p>Note that if options were decoded from .xz headers then the encoder options may be undefined. This flag shouldn't be used in such a situation. </p>
+
+</div>
+</div>
+<a id="a8a0f3fc03bdb84a294cdd53a98783104" name="a8a0f3fc03bdb84a294cdd53a98783104"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8a0f3fc03bdb84a294cdd53a98783104">&#9670;&#160;</a></span>LZMA_STR_DECODER</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STR_DECODER&#160;&#160;&#160;UINT32_C(0x20)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Stringify decoder options. </p>
+<p>Show the filter-specific options that the decoder will use. This may be useful for showing what filter options were decoded from file headers. </p>
+
+</div>
+</div>
+<a id="a87e9ac4ae5829b092262223256141a29" name="a87e9ac4ae5829b092262223256141a29"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a87e9ac4ae5829b092262223256141a29">&#9670;&#160;</a></span>LZMA_STR_GETOPT_LONG</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STR_GETOPT_LONG&#160;&#160;&#160;UINT32_C(0x40)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Produce xz-compatible getopt_long() syntax. </p>
+<p>That is, "delta:dist=2 lzma2:dict=4MiB,pb=1,lp=1" becomes "--delta=dist=2 --lzma2=dict=4MiB,pb=1,lp=1".</p>
+<p>This syntax is compatible with xz 5.0.0 as long as the filters and their options are supported too. </p>
+
+</div>
+</div>
+<a id="ac0113c47caf98a735db2297936c5e857" name="ac0113c47caf98a735db2297936c5e857"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac0113c47caf98a735db2297936c5e857">&#9670;&#160;</a></span>LZMA_STR_NO_SPACES</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STR_NO_SPACES&#160;&#160;&#160;UINT32_C(0x80)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Use two dashes "--" instead of a space to separate filters. </p>
+<p>That is, "delta:dist=2 lzma2:pb=1,lp=1" becomes "delta:dist=2--lzma2:pb=1,lp=1". This looks slightly odd but this kind of strings should be usable on the command line without quoting. However, it is possible that future versions with new filter options might produce strings that require shell quoting anyway as the exact set of possible characters isn't frozen for now.</p>
+<p>It is guaranteed that the single quote (') will never be used in filter chain strings (even if LZMA_STR_NO_SPACES isn't used). </p>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a3db3c36cd6e57658a74c53e4daa2bef6" name="a3db3c36cd6e57658a74c53e4daa2bef6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3db3c36cd6e57658a74c53e4daa2bef6">&#9670;&#160;</a></span>lzma_filter_encoder_is_supported()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_filter_encoder_is_supported </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>id</em></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Test if the given Filter ID is supported for encoding. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">id</td><td>Filter ID</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if the Filter ID is supported for encoding by this liblzma build.</li>
+<li>false otherwise. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="acab0c67bf5b3a76f2b474c8e1da98938" name="acab0c67bf5b3a76f2b474c8e1da98938"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acab0c67bf5b3a76f2b474c8e1da98938">&#9670;&#160;</a></span>lzma_filter_decoder_is_supported()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_filter_decoder_is_supported </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>id</em></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Test if the given Filter ID is supported for decoding. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">id</td><td>Filter ID</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if the Filter ID is supported for decoding by this liblzma build.</li>
+<li>false otherwise. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a611fe1176eeeda187b1bd8aef45040aa" name="a611fe1176eeeda187b1bd8aef45040aa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a611fe1176eeeda187b1bd8aef45040aa">&#9670;&#160;</a></span>lzma_filters_copy()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_filters_copy </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Copy the filters array. </p>
+<p>Copy the Filter IDs and filter-specific options from src to dest. Up to LZMA_FILTERS_MAX filters are copied, plus the terminating .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least LZMA_FILTERS_MAX + 1 elements space unless the caller knows that src is smaller than that.</p>
+<p>Unless the filter-specific options is NULL, the Filter ID has to be supported by liblzma, because liblzma needs to know the size of every filter-specific options structure. The filter-specific options are not validated. If options is NULL, any unsupported Filter IDs are copied without returning an error.</p>
+<p>Old filter-specific options in dest are not freed, so dest doesn't need to be initialized by the caller in any way.</p>
+<p>If an error occurs, memory possibly already allocated by this function is always freed. liblzma versions older than 5.2.7 may modify the dest array and leave its contents in an undefined state if an error occurs. liblzma 5.2.7 and newer only modify the dest array when returning LZMA_OK.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">src</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">dest</td><td>Destination filter array </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options is not NULL.</li>
+<li>LZMA_PROG_ERROR: src or dest is NULL. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ae06979d219897f5f4c29cbc7a96a8892" name="ae06979d219897f5f4c29cbc7a96a8892"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae06979d219897f5f4c29cbc7a96a8892">&#9670;&#160;</a></span>lzma_filters_free()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void lzma_filters_free </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Free the options in the array of <a class="el" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> structures. </p>
+<p>This frees the filter chain options. The filters array itself is not freed.</p>
+<p>The filters array must have at most LZMA_FILTERS_MAX + 1 elements including the terminating element which must have .id = LZMA_VLI_UNKNOWN. For all elements before the terminating element:</p><ul>
+<li>options will be freed using the given <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> or, if allocator is NULL, using free().</li>
+<li>options will be set to NULL.</li>
+<li>id will be set to LZMA_VLI_UNKNOWN.</li>
+</ul>
+<p>If filters is NULL, this does nothing. Again, this never frees the filters array itself.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN. </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a730f9391e85a5979bcd1b32643ae7176" name="a730f9391e85a5979bcd1b32643ae7176"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a730f9391e85a5979bcd1b32643ae7176">&#9670;&#160;</a></span>lzma_raw_encoder_memusage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_raw_encoder_memusage </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate approximate memory requirements for raw encoder. </p>
+<p>This function can be used to calculate the memory requirements for Block and Stream encoders too because Block and Stream encoders don't need significantly more memory than raw encoder.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of bytes of memory required for the given filter chain when encoding or UINT64_MAX on error. </dd></dl>
+
+</div>
+</div>
+<a id="a58511249ae9206d7de7c5d1f05842297" name="a58511249ae9206d7de7c5d1f05842297"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a58511249ae9206d7de7c5d1f05842297">&#9670;&#160;</a></span>lzma_raw_decoder_memusage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_raw_decoder_memusage </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate approximate memory requirements for raw decoder. </p>
+<p>This function can be used to calculate the memory requirements for Block and Stream decoders too because Block and Stream decoders don't need significantly more memory than raw decoder.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of bytes of memory required for the given filter chain when decoding or UINT64_MAX on error. </dd></dl>
+
+</div>
+</div>
+<a id="a2368e4129032345eb0738b0c6e085703" name="a2368e4129032345eb0738b0c6e085703"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2368e4129032345eb0738b0c6e085703">&#9670;&#160;</a></span>lzma_raw_encoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_raw_encoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize raw encoder. </p>
+<p>This function may be useful when implementing custom file formats.</p>
+<p>The `action' with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> can be LZMA_RUN, LZMA_SYNC_FLUSH (if the filter chain supports it), or LZMA_FINISH.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ae77b3b6c5eccd9d77bbafef0a8a203c1" name="ae77b3b6c5eccd9d77bbafef0a8a203c1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae77b3b6c5eccd9d77bbafef0a8a203c1">&#9670;&#160;</a></span>lzma_raw_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_raw_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize raw decoder. </p>
+<p>The initialization of raw decoder goes similarly to raw encoder.</p>
+<p>The `action' with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> can be LZMA_RUN or LZMA_FINISH. Using LZMA_FINISH is not required, it is supported just for convenience.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a4a8fd969df001e449ebe4421ab33bba5" name="a4a8fd969df001e449ebe4421ab33bba5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4a8fd969df001e449ebe4421ab33bba5">&#9670;&#160;</a></span>lzma_filters_update()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_filters_update </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Update the filter chain in the encoder. </p>
+<p>This function may be called after <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> has returned LZMA_STREAM_END when LZMA_FULL_BARRIER, LZMA_FULL_FLUSH, or LZMA_SYNC_FLUSH was used:</p>
+<ul>
+<li>After LZMA_FULL_BARRIER or LZMA_FULL_FLUSH: Single-threaded .xz Stream encoder (<a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52" title="Initialize .xz Stream encoder using a custom filter chain.">lzma_stream_encoder()</a>) and (since liblzma 5.4.0) multi-threaded Stream encoder (<a class="el" href="container_8h.html#a3f8793518711ee84d1abf12ea3aaba42" title="Initialize multithreaded .xz Stream encoder.">lzma_stream_encoder_mt()</a>) allow setting a new filter chain to be used for the next Block(s).</li>
+<li>After LZMA_SYNC_FLUSH: Raw encoder (<a class="el" href="filter_8h.html#a2368e4129032345eb0738b0c6e085703" title="Initialize raw encoder.">lzma_raw_encoder()</a>), Block encoder (<a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a>), and single-threaded .xz Stream encoder (<a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52" title="Initialize .xz Stream encoder using a custom filter chain.">lzma_stream_encoder()</a>) allow changing certain filter-specific options in the middle of encoding. The actual filters in the chain (Filter IDs) must not be changed! Currently only the lc, lp, and pb options of LZMA2 (not LZMA1) can be changed this way.</li>
+<li>In the future some filters might allow changing some of their options without any barrier or flushing but currently such filters don't exist.</li>
+</ul>
+<p>This function may also be called when no data has been compressed yet although this is rarely useful. In that case, this function will behave as if LZMA_FULL_FLUSH (Stream encoders) or LZMA_SYNC_FLUSH (Raw or Block encoder) had been used right before calling this function.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> that is at least initialized with LZMA_STREAM_INIT. </td></tr>
+ <tr><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_MEMLIMIT_ERROR</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a226724ab3391b410281fdf656cc7c432" name="a226724ab3391b410281fdf656cc7c432"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a226724ab3391b410281fdf656cc7c432">&#9670;&#160;</a></span>lzma_raw_buffer_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_raw_buffer_encode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call raw encoder. </p>
+<dl class="section note"><dt>Note</dt><dd>There is no function to calculate how big output buffer would surely be big enough. (<a class="el" href="container_8h.html#a66d4366a47b8332bff2a512f44f5c45e" title="Calculate output buffer size for single-call Stream encoder.">lzma_stream_buffer_bound()</a> works only for <a class="el" href="container_8h.html#a6e645ccaeace3b13a6981e03c6e190ad" title="Single-call .xz Stream encoder.">lzma_stream_buffer_encode()</a>; raw encoder won't necessarily meet that bound.)</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_BUF_ERROR: Not enough output buffer space.</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a3b942df507e4f9a6d7525e5a4c6864e5" name="a3b942df507e4f9a6d7525e5a4c6864e5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3b942df507e4f9a6d7525e5a4c6864e5">&#9670;&#160;</a></span>lzma_raw_buffer_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_raw_buffer_decode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>in_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call raw decoder. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_pos</td><td>The next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer; the first byte that won't be read is in[in_size]. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Decoding was successful.</li>
+<li>LZMA_BUF_ERROR: Not enough output buffer space.</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="aee038818cf7bbe044c3f7a7c86998c1b" name="aee038818cf7bbe044c3f7a7c86998c1b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aee038818cf7bbe044c3f7a7c86998c1b">&#9670;&#160;</a></span>lzma_properties_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_properties_size </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t *&#160;</td>
+ <td class="paramname"><em>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filter</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the size of the Filter Properties field. </p>
+<p>This function may be useful when implementing custom file formats using the raw encoder and decoder.</p>
+<dl class="section note"><dt>Note</dt><dd>This function validates the Filter ID, but does not necessarily validate the options. Thus, it is possible that this returns LZMA_OK while the following call to <a class="el" href="filter_8h.html#a8e00887086df5a44084ac22e48415de3" title="Encode the Filter Properties field.">lzma_properties_encode()</a> returns LZMA_OPTIONS_ERROR.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">size</td><td>Pointer to uint32_t to hold the size of the properties </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">filter</td><td>Filter ID and options (the size of the properties may vary depending on the options)</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a8e00887086df5a44084ac22e48415de3" name="a8e00887086df5a44084ac22e48415de3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8e00887086df5a44084ac22e48415de3">&#9670;&#160;</a></span>lzma_properties_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_properties_encode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>props</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encode the Filter Properties field. </p>
+<dl class="section note"><dt>Note</dt><dd>Even this function won't validate more options than actually necessary. Thus, it is possible that encoding the properties succeeds but using the same options to initialize the encoder will fail.</dd>
+<dd>
+If <a class="el" href="filter_8h.html#aee038818cf7bbe044c3f7a7c86998c1b" title="Get the size of the Filter Properties field.">lzma_properties_size()</a> indicated that the size of the Filter Properties field is zero, calling <a class="el" href="filter_8h.html#a8e00887086df5a44084ac22e48415de3" title="Encode the Filter Properties field.">lzma_properties_encode()</a> is not required, but it won't do any harm either.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">filter</td><td>Filter ID and options </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">props</td><td>Buffer to hold the encoded options. The size of the buffer must have been already determined with <a class="el" href="filter_8h.html#aee038818cf7bbe044c3f7a7c86998c1b" title="Get the size of the Filter Properties field.">lzma_properties_size()</a>.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a88d2e864b2039ac82802cc202278d478" name="a88d2e864b2039ac82802cc202278d478"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a88d2e864b2039ac82802cc202278d478">&#9670;&#160;</a></span>lzma_properties_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_properties_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>props</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>props_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode the Filter Properties field. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">filter</td><td>filter-&gt;id must have been set to the correct Filter ID. filter-&gt;options doesn't need to be initialized (it's not freed by this function). The decoded options will be stored in filter-&gt;options; it's application's responsibility to free it when appropriate. filter-&gt;options is set to NULL if there are no properties or if an error occurs. </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). and in case of an error, also free(). </td></tr>
+ <tr><td class="paramname">props</td><td>Input buffer containing the properties. </td></tr>
+ <tr><td class="paramname">props_size</td><td>Size of the properties. This must be the exact size; giving too much or too little input will return LZMA_OPTIONS_ERROR.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a996c9c21840ed54e37bd1f664a79d940" name="a996c9c21840ed54e37bd1f664a79d940"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a996c9c21840ed54e37bd1f664a79d940">&#9670;&#160;</a></span>lzma_filter_flags_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_filter_flags_size </td>
+ <td>(</td>
+ <td class="paramtype">uint32_t *&#160;</td>
+ <td class="paramname"><em>size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filter</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate encoded size of a Filter Flags field. </p>
+<p>Knowing the size of Filter Flags is useful to know when allocating memory to hold the encoded Filter Flags.</p>
+<dl class="section note"><dt>Note</dt><dd>If you need to calculate size of List of Filter Flags, you need to loop over every <a class="el" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> entry.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">size</td><td>Pointer to integer to hold the calculated size </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">filter</td><td>Filter ID and associated options whose encoded size is to be calculated</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: *size set successfully. Note that this doesn't guarantee that filter-&gt;options is valid, thus <a class="el" href="filter_8h.html#a96f23309bc21398fece18c00ebe7db98" title="Encode Filter Flags into given buffer.">lzma_filter_flags_encode()</a> may still fail.</li>
+<li>LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.</li>
+<li>LZMA_PROG_ERROR: Invalid options </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a96f23309bc21398fece18c00ebe7db98" name="a96f23309bc21398fece18c00ebe7db98"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a96f23309bc21398fece18c00ebe7db98">&#9670;&#160;</a></span>lzma_filter_flags_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_filter_flags_encode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encode Filter Flags into given buffer. </p>
+<p>In contrast to some functions, this doesn't allocate the needed buffer. This is due to how this function is used internally by liblzma.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">filter</td><td>Filter ID and options to be encoded </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>out[*out_pos] is the next write position. This is updated by the encoder. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>out[out_size] is the first byte to not write.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_OPTIONS_ERROR: Invalid or unsupported options.</li>
+<li>LZMA_PROG_ERROR: Invalid options or not enough output buffer space (you should have checked it with <a class="el" href="filter_8h.html#a996c9c21840ed54e37bd1f664a79d940" title="Calculate encoded size of a Filter Flags field.">lzma_filter_flags_size()</a>). </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a4cba9a4c658cce0ff01fd102b31ea1a7" name="a4cba9a4c658cce0ff01fd102b31ea1a7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4cba9a4c658cce0ff01fd102b31ea1a7">&#9670;&#160;</a></span>lzma_filter_flags_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_filter_flags_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>in_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode Filter Flags from given buffer. </p>
+<p>The decoded result is stored into *filter. The old value of filter-&gt;options is not free()d. If anything other than LZMA_OK is returned, filter-&gt;options is set to NULL.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">filter</td><td>Destination filter. The decoded Filter ID will be stored in filter-&gt;id. If options are needed they will be allocated and the pointer will be stored in filter-&gt;options. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">in_pos</td><td>The next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer; the first byte that won't be read is in[in_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_OPTIONS_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="aa042cf11749bc2183b27de1c3142da30" name="aa042cf11749bc2183b27de1c3142da30"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa042cf11749bc2183b27de1c3142da30">&#9670;&#160;</a></span>lzma_str_to_filters()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char * lzma_str_to_filters </td>
+ <td>(</td>
+ <td class="paramtype">const char *&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">int *&#160;</td>
+ <td class="paramname"><em>error_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Convert a string to a filter chain. </p>
+<p>This tries to make it easier to write applications that allow users to set custom compression options. This only handles the filter configuration (including presets) but not the number of threads, block size, check type, or memory limits.</p>
+<p>The input string can be either a preset or a filter chain. Presets begin with a digit 0-9 and may be followed by zero or more flags which are lower-case letters. Currently only "e" is supported, matching LZMA_PRESET_EXTREME. For partial xz command line syntax compatibility, a preset string may start with a single dash "-".</p>
+<p>A filter chain consists of one or more "filtername:opt1=value1,opt2=value2" strings separated by one or more spaces. Leading and trailing spaces are ignored. All names and values must be lower-case. Extra commas in the option list are ignored. The order of filters is significant: when encoding, the uncompressed input data goes to the leftmost filter first. Normally "lzma2" is the last filter in the chain.</p>
+<p>If one wishes to avoid spaces, for example, to avoid shell quoting, it is possible to use two dashes "--" instead of spaces to separate the filters.</p>
+<p>For xz command line compatibility, each filter may be prefixed with two dashes "--" and the colon ":" separating the filter name from the options may be replaced with an equals sign "=".</p>
+<p>By default, only filters that can be used in the .xz format are accepted. To allow all filters (LZMA1) use the flag LZMA_STR_ALL_FILTERS.</p>
+<p>By default, very basic validation is done for the filter chain as a whole, for example, that LZMA2 is only used as the last filter in the chain. The validation isn't perfect though and it's possible that this function succeeds but using the filter chain for encoding or decoding will still result in LZMA_OPTIONS_ERROR. To disable this validation, use the flag LZMA_STR_NO_VALIDATION.</p>
+<p>The available filter names and their options are available via <a class="el" href="filter_8h.html#ab51585b68796ce0270f87e615b923809" title="List available filters and/or their options (for help message)">lzma_str_list_filters()</a>. See the xz man page for the description of filter names and options.</p>
+<p>For command line applications, below is an example how an error message can be displayed. Note the use of an empty string for the field width. If "^" was used there it would create an off-by-one error except at the very beginning of the line.</p>
+<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> *str = ...; <span class="comment">// From user</span></div>
+<div class="line"><a class="code hl_struct" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> filters[<a class="code hl_define" href="filter_8h.html#ab33c0cc1728bf390e5b84f8bce1928ba" title="Maximum number of filters in a chain.">LZMA_FILTERS_MAX</a> + 1];</div>
+<div class="line"><span class="keywordtype">int</span> pos;</div>
+<div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span> *msg = <a class="code hl_function" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30" title="Convert a string to a filter chain.">lzma_str_to_filters</a>(str, &amp;pos, filters, 0, NULL);</div>
+<div class="line"><span class="keywordflow">if</span> (msg != NULL) {</div>
+<div class="line"> printf(<span class="stringliteral">&quot;%s: Error in XZ compression options:\n&quot;</span>, argv[0]);</div>
+<div class="line"> printf(<span class="stringliteral">&quot;%s: %s\n&quot;</span>, argv[0], str);</div>
+<div class="line"> printf(<span class="stringliteral">&quot;%s: %*s^\n&quot;</span>, argv[0], errpos, <span class="stringliteral">&quot;&quot;</span>);</div>
+<div class="line"> printf(<span class="stringliteral">&quot;%s: %s\n&quot;</span>, argv[0], msg);</div>
+<div class="line">}</div>
+</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">str</td><td>User-supplied string describing a preset or a filter chain. If a default value is needed and you don't know what would be good, use "6" since that is the default preset in xz too. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">error_pos</td><td>If this isn't NULL, this value will be set on both success and on all errors. This tells the location of the error in the string. This is an int to make it straightforward to use this as printf() field width. The value is guaranteed to be in the range [0, INT_MAX] even if strlen(str) somehow was greater than INT_MAX. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">filters</td><td>An array of <a class="el" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> structures. There must be LZMA_FILTERS_MAX + 1 (that is, five) elements in the array. The old contents are ignored so it doesn't need to be initialized. This array is modified only if this function returns NULL. Once the allocated filter options are no longer needed, <a class="el" href="filter_8h.html#ae06979d219897f5f4c29cbc7a96a8892" title="Free the options in the array of lzma_filter structures.">lzma_filters_free()</a> can be used to free the options (it doesn't free the filters array itself). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">flags</td><td>Bitwise-or of zero or more of the flags LZMA_STR_ALL_FILTERS and LZMA_STR_NO_VALIDATION. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>On success, NULL is returned. On error, a statically-allocated error message is returned which together with the error_pos should give some idea what is wrong. </dd></dl>
+
+</div>
+</div>
+<a id="a7deeb86ef59a9111b8033681290e0fb0" name="a7deeb86ef59a9111b8033681290e0fb0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7deeb86ef59a9111b8033681290e0fb0">&#9670;&#160;</a></span>lzma_str_from_filters()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_str_from_filters </td>
+ <td>(</td>
+ <td class="paramtype">char **&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td>
+ <td class="paramname"><em>filters</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Convert a filter chain to a string. </p>
+<p>Use cases:</p>
+<ul>
+<li>Verbose output showing the full encoder options to the user (use LZMA_STR_ENCODER in flags)</li>
+<li>Showing the filters and options that are required to decode a file (use LZMA_STR_DECODER in flags)</li>
+<li>Showing the filter names without any options in informational messages where the technical details aren't important (no flags). In this case the .options in the filters array are ignored and may be NULL even if a filter has a mandatory options structure.</li>
+</ul>
+<p>Note that even if the filter chain was specified using a preset, the resulting filter chain isn't reversed to a preset. So if you specify "6" to <a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30" title="Convert a string to a filter chain.">lzma_str_to_filters()</a> then <a class="el" href="filter_8h.html#a7deeb86ef59a9111b8033681290e0fb0" title="Convert a filter chain to a string.">lzma_str_from_filters()</a> will produce a string containing "lzma2".</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">str</td><td>On success *str will be set to point to an allocated string describing the given filter chain. Old value is ignored. On error *str is always set to NULL. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">filters</td><td>Array of filters terminated with .id == LZMA_VLI_UNKNOWN. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">flags</td><td>Bitwise-or of zero or more of the flags LZMA_STR_ENCODER, LZMA_STR_DECODER, LZMA_STR_GETOPT_LONG, and LZMA_STR_NO_SPACES. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_OPTIONS_ERROR: Empty filter chain (filters[0].id == LZMA_VLI_UNKNOWN) or the filter chain includes a Filter ID that is not supported by this function.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ab51585b68796ce0270f87e615b923809" name="ab51585b68796ce0270f87e615b923809"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab51585b68796ce0270f87e615b923809">&#9670;&#160;</a></span>lzma_str_list_filters()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_str_list_filters </td>
+ <td>(</td>
+ <td class="paramtype">char **&#160;</td>
+ <td class="paramname"><em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>filter_id</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>flags</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>List available filters and/or their options (for help message) </p>
+<p>If a filter_id is given then only one line is created which contains the filter name. If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then the options read by the encoder or decoder are printed on the same line.</p>
+<p>If filter_id is LZMA_VLI_UNKNOWN then all supported .xz-compatible filters are listed:</p>
+<ul>
+<li>If neither LZMA_STR_ENCODER nor LZMA_STR_DECODER is used then the supported filter names are listed on a single line separated by spaces.</li>
+<li>If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then filters and the supported options are listed one filter per line. There won't be a newline after the last filter.</li>
+<li>If LZMA_STR_ALL_FILTERS is used then the list will include also those filters that cannot be used in the .xz format (LZMA1).</li>
+</ul>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">str</td><td>On success *str will be set to point to an allocated string listing the filters and options. Old value is ignored. On error *str is always set to NULL. </td></tr>
+ <tr><td class="paramname">filter_id</td><td>Filter ID or LZMA_VLI_UNKNOWN. </td></tr>
+ <tr><td class="paramname">flags</td><td>Bitwise-or of zero or more of the flags LZMA_STR_ALL_FILTERS, LZMA_STR_ENCODER, LZMA_STR_DECODER, and LZMA_STR_GETOPT_LONG. </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported filter_id or flags</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/folderclosed.svg b/doc/api/folderclosed.svg
new file mode 100644
index 0000000..47d22df
--- /dev/null
+++ b/doc/api/folderclosed.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+<g style="fill:#195794;">
+<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
+</g>
+<g style="fill:#BFD9F4;stroke-width:0;">
+<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
+</g>
+</svg>
diff --git a/doc/api/folderclosedd.svg b/doc/api/folderclosedd.svg
new file mode 100644
index 0000000..8fe0031
--- /dev/null
+++ b/doc/api/folderclosedd.svg
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+<g style="fill:#A0C7EE;">
+<path d="M1,5.998l-0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm2,-0l-0,16.002c-0,0.796 0.316,1.559 0.879,2.121c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121c0,-3.486 0,-8.514 0,-12c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998Z"/>
+</g>
+<g style="fill:#195794;stroke-width:0;">
+<path d="M 5.6063709,24.951908 C 4.3924646,24.775461 3.4197129,23.899792 3.1031586,22.698521 L 3.0216155,22.389078 V 13.997725 5.6063709 L 3.1037477,5.2982247 C 3.3956682,4.2029881 4.1802788,3.412126 5.2787258,3.105917 5.5646428,3.0262132 5.6154982,3.0244963 8.0611641,3.0119829 l 2.4911989,-0.012746 1.932009,1.9300342 c 1.344142,1.3427669 1.976319,1.9498819 2.07763,1.9952626 0.137456,0.061571 0.474218,0.066269 6.006826,0.083795 l 5.861206,0.018568 0.29124,0.081916 c 1.094895,0.3079569 1.890116,1.109428 2.175567,2.192667 l 0.08154,0.3094425 V 16 22.389078 l -0.08154,0.309443 c -0.28446,1.079482 -1.086411,1.888085 -2.175567,2.193614 l -0.29124,0.0817 -10.302616,0.0049 c -5.700217,0.0027 -10.4001945,-0.0093 -10.5210471,-0.02684 z"/>
+</g>
+</svg>
diff --git a/doc/api/folderopen.svg b/doc/api/folderopen.svg
new file mode 100644
index 0000000..9565570
--- /dev/null
+++ b/doc/api/folderopen.svg
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+<g style="fill:#195794;">
+<path
+ d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"
+ id="path2" />
+</g>
+<g style="fill:#BFD9F4;stroke-width:0;">
+<path
+ d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z"
+ id="path199" /><path
+ d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z"
+ id="path201" />
+</g>
+</svg>
diff --git a/doc/api/folderopend.svg b/doc/api/folderopend.svg
new file mode 100644
index 0000000..e72e225
--- /dev/null
+++ b/doc/api/folderopend.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" width="16" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve">
+<g style="fill:#A0C7EE;">
+<path d="M1,5.998l0,16.002c-0,1.326 0.527,2.598 1.464,3.536c0.938,0.937 2.21,1.464 3.536,1.464c5.322,0 14.678,-0 20,0c1.326,0 2.598,-0.527 3.536,-1.464c0.937,-0.938 1.464,-2.21 1.464,-3.536c0,-3.486 0,-8.514 0,-12c0,-1.326 -0.527,-2.598 -1.464,-3.536c-0.938,-0.937 -2.21,-1.464 -3.536,-1.464c-0,0 -10.586,0 -10.586,0c0,-0 -3.707,-3.707 -3.707,-3.707c-0.187,-0.188 -0.442,-0.293 -0.707,-0.293l-5.002,0c-2.76,0 -4.998,2.238 -4.998,4.998Zm28,14.415l-3.456,-5.925c-0.538,-0.921 -1.524,-1.488 -2.591,-1.488c-0,0 -12.905,0 -12.906,0c-1.067,0 -2.053,0.567 -2.591,1.488l-4.453,7.635c0.03,0.751 0.342,1.465 0.876,1.998c0.562,0.563 1.325,0.879 2.121,0.879l20,0c0.796,0 1.559,-0.316 2.121,-0.879c0.563,-0.562 0.879,-1.325 0.879,-2.121l0,-1.587Zm0,-3.969l0,-6.444c0,-0.796 -0.316,-1.559 -0.879,-2.121c-0.562,-0.563 -1.325,-0.879 -2.121,-0.879c-7.738,0 -11,0 -11,0c-0.265,0 -0.52,-0.105 -0.707,-0.293c-0,0 -3.707,-3.707 -3.707,-3.707c-0,0 -4.588,0 -4.588,0c-1.656,0 -2.998,1.342 -2.998,2.998l0,12.16l2.729,-4.677c0.896,-1.536 2.54,-2.481 4.318,-2.481c3.354,0 9.552,0 12.906,0c1.778,0 3.422,0.945 4.318,2.481l1.729,2.963Z"/>
+</g>
+<g style="fill:#195794;stroke-width:0;">
+<path d="M 5.3879408,24.913408 C 4.1598821,24.650818 3.1571088,23.558656 3.053503,22.370876 L 3.0312746,22.116041 5.2606813,18.293515 C 6.486855,16.191126 7.5598351,14.372696 7.6450818,14.25256 8.0043056,13.746312 8.5423079,13.363007 9.2104664,13.137285 l 0.2548351,-0.08609 6.9294785,-0.0097 c 6.805096,-0.0095 6.934944,-0.0084 7.234011,0.06267 0.695577,0.165199 1.290483,0.557253 1.714887,1.130141 0.08158,0.110125 0.938747,1.556711 1.90481,3.214634 l 1.756479,3.014406 -0.0186,0.971942 c -0.01387,0.724723 -0.03365,1.032131 -0.07778,1.208575 -0.242792,0.970733 -0.88732,1.735415 -1.772382,2.102793 -0.58835,0.244217 0.247209,0.227436 -11.161974,0.224159 -9.0281537,-0.0026 -10.3636023,-0.0098 -10.5862902,-0.05746 z" />
+<path d="M 3.0126385,11.849829 3.0235061,5.5881684 3.1020974,5.2969283 C 3.3478146,4.3863605 3.93576,3.6757372 4.756668,3.2971229 5.3293315,3.0330025 5.1813272,3.0450949 8.0130385,3.0310668 l 2.5522875,-0.012644 1.918693,1.9107086 c 1.404146,1.3983023 1.964459,1.9332518 2.089351,1.9947704 l 0.170657,0.084062 5.897611,0.019367 c 5.553257,0.018236 5.910365,0.023213 6.116041,0.085231 1.102257,0.3323708 1.857042,1.1184422 2.154229,2.2435244 0.05645,0.2137228 0.06373,0.5643981 0.07519,3.6220748 0.0076,2.032169 -5.42e-4,3.370979 -0.02041,3.349261 -0.0182,-0.0199 -0.414296,-0.691472 -0.880217,-1.492382 -0.46592,-0.80091 -0.93093,-1.577954 -1.033354,-1.726764 -0.735716,-1.0689 -1.983568,-1.844244 -3.315972,-2.060353 -0.280375,-0.04548 -1.345158,-0.05334 -7.238708,-0.05347 -4.713933,-1.09e-4 -6.9931825,0.01221 -7.1717862,0.03874 -1.3002273,0.193134 -2.4770512,0.889916 -3.283628,1.944192 -0.1076466,0.140705 -0.8359664,1.353438 -1.6184885,2.694963 L 3.0017709,18.11149 Z" />
+</g>
+</svg>
diff --git a/doc/api/functions.html b/doc/api/functions.html
new file mode 100644
index 0000000..b50cf73
--- /dev/null
+++ b/doc/api/functions.html
@@ -0,0 +1,210 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Data Fields</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li class="current"><a href="functions.html"><span>All</span></a></li>
+ <li><a href="functions_vars.html"><span>Variables</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow4" class="tabs3">
+ <ul class="tablist">
+ <li><a href="#index_a"><span>a</span></a></li>
+ <li><a href="#index_b"><span>b</span></a></li>
+ <li><a href="#index_c"><span>c</span></a></li>
+ <li><a href="#index_d"><span>d</span></a></li>
+ <li><a href="#index_e"><span>e</span></a></li>
+ <li><a href="#index_f"><span>f</span></a></li>
+ <li><a href="#index_h"><span>h</span></a></li>
+ <li><a href="#index_i"><span>i</span></a></li>
+ <li><a href="#index_l"><span>l</span></a></li>
+ <li><a href="#index_m"><span>m</span></a></li>
+ <li><a href="#index_n"><span>n</span></a></li>
+ <li><a href="#index_o"><span>o</span></a></li>
+ <li><a href="#index_p"><span>p</span></a></li>
+ <li><a href="#index_r"><span>r</span></a></li>
+ <li><a href="#index_s"><span>s</span></a></li>
+ <li><a href="#index_t"><span>t</span></a></li>
+ <li><a href="#index_u"><span>u</span></a></li>
+ <li class="current"><a href="#index_v"><span>v</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:</div>
+
+<h3><a id="index_a" name="index_a"></a>- a -</h3><ul>
+<li>alloc&#160;:&#160;<a class="el" href="structlzma__allocator.html#aba5c4369af94cc9943423b49171462ec">lzma_allocator</a></li>
+<li>allocator&#160;:&#160;<a class="el" href="structlzma__stream.html#a4eb2f3e87e32cc4bea613898b0bd353f">lzma_stream</a></li>
+<li>avail_in&#160;:&#160;<a class="el" href="structlzma__stream.html#abb680ecea31910cbda1d7a6ad4f191c0">lzma_stream</a></li>
+<li>avail_out&#160;:&#160;<a class="el" href="structlzma__stream.html#a5ff28ea4e39148723c19f59811627904">lzma_stream</a></li>
+</ul>
+
+
+<h3><a id="index_b" name="index_b"></a>- b -</h3><ul>
+<li>backward_size&#160;:&#160;<a class="el" href="structlzma__stream__flags.html#aaa65ed7a55a098f829f04dba25d0f212">lzma_stream_flags</a></li>
+<li>block_count&#160;:&#160;<a class="el" href="structlzma__index__iter.html#abc6ee9be23e54f31aed07382c8caaf7c">lzma_index_iter</a></li>
+<li>block_size&#160;:&#160;<a class="el" href="structlzma__mt.html#a20cdc7865266ccb88da36a6e68f84d15">lzma_mt</a></li>
+</ul>
+
+
+<h3><a id="index_c" name="index_c"></a>- c -</h3><ul>
+<li>check&#160;:&#160;<a class="el" href="structlzma__block.html#a80cd9d3025991db4a476ce7588f853e6">lzma_block</a>, <a class="el" href="structlzma__mt.html#ae38846e8aca5b20d2a86a2364283b730">lzma_mt</a>, <a class="el" href="structlzma__stream__flags.html#ab1052ea7047c8d67f127f33278166647">lzma_stream_flags</a></li>
+<li>compressed_file_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a26436e75d4c2b5dd8d1de24140d8003e">lzma_index_iter</a></li>
+<li>compressed_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a426705df8dde4b094a42f91ea20a46ac">lzma_index_iter</a></li>
+<li>compressed_size&#160;:&#160;<a class="el" href="structlzma__block.html#a8383d489c9ffea8af390669a105c74e5">lzma_block</a>, <a class="el" href="structlzma__index__iter.html#a6e73b1f37e3fcf1e9491e4a53b2c52c7">lzma_index_iter</a></li>
+<li>compressed_stream_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a578bba553c43dc59a5e4032d4f6c89a3">lzma_index_iter</a></li>
+</ul>
+
+
+<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
+<li>depth&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a4226f686e8c9f6288595fe23d0e15713">lzma_options_lzma</a></li>
+<li>dict_size&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#aeb3f86002405a1191af86def46fca5ad">lzma_options_lzma</a></li>
+<li>dist&#160;:&#160;<a class="el" href="structlzma__options__delta.html#a31b4b0b5a2462cb9433c2663b8a62790">lzma_options_delta</a></li>
+</ul>
+
+
+<h3><a id="index_e" name="index_e"></a>- e -</h3><ul>
+<li>ext_flags&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#ade251d13ef46bcacb4e052b83693878c">lzma_options_lzma</a></li>
+<li>ext_size_high&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#ae5b3c2375c43ddfacf093980385fb9e3">lzma_options_lzma</a></li>
+<li>ext_size_low&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a971da8385dcebd01e60235afb3b717f9">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_f" name="index_f"></a>- f -</h3><ul>
+<li>filters&#160;:&#160;<a class="el" href="structlzma__block.html#a5900e517e6e0a473a3184074ae7defd1">lzma_block</a>, <a class="el" href="structlzma__mt.html#ad43a62ef2178c76405e5be0ece7a98b4">lzma_mt</a></li>
+<li>flags&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a223a046bcf09077a6e720967682deeae">lzma_index_iter</a>, <a class="el" href="structlzma__mt.html#a1c2fe028f547bf58b48b5199557d9a9f">lzma_mt</a></li>
+<li>free&#160;:&#160;<a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009">lzma_allocator</a></li>
+</ul>
+
+
+<h3><a id="index_h" name="index_h"></a>- h -</h3><ul>
+<li>header_size&#160;:&#160;<a class="el" href="structlzma__block.html#a6689c4f7524b2c05772a2d6151138610">lzma_block</a></li>
+</ul>
+
+
+<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
+<li>id&#160;:&#160;<a class="el" href="structlzma__filter.html#aef1d9709759f39e61db77547b2326929">lzma_filter</a></li>
+<li>ignore_check&#160;:&#160;<a class="el" href="structlzma__block.html#a516ac9cc63bc1a4fadd9fbfc189a206b">lzma_block</a></li>
+<li>internal&#160;:&#160;<a class="el" href="structlzma__stream.html#a209da54c2fb5dea40ad011c8408300d0">lzma_stream</a></li>
+</ul>
+
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>lc&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a95f6188e5b5f05c50ec463a315df3585">lzma_options_lzma</a></li>
+<li>lp&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a0fe9c54e808fce3090b6994d95fe41fe">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
+<li>memlimit_stop&#160;:&#160;<a class="el" href="structlzma__mt.html#ab5e0b530d4c572c7a2361aabbad656aa">lzma_mt</a></li>
+<li>memlimit_threading&#160;:&#160;<a class="el" href="structlzma__mt.html#a5a7fb0c7c2db350e09e77477bc3c9509">lzma_mt</a></li>
+<li>mf&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#aa99612cd52259093007f33513882dcd0">lzma_options_lzma</a></li>
+<li>mode&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a1d711df9bda046fd3899abf21fa250d5">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>next_in&#160;:&#160;<a class="el" href="structlzma__stream.html#a72fdc738c793f07a5c29715aa57802cf">lzma_stream</a></li>
+<li>next_out&#160;:&#160;<a class="el" href="structlzma__stream.html#a14ee64ed636ddcb775edf87e2b9f42ec">lzma_stream</a></li>
+<li>nice_len&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a0352ea7f8b6a43b745a44f6cb4e2d263">lzma_options_lzma</a></li>
+<li>number&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a115a307dbc778a9de296376dc39c7b23">lzma_index_iter</a></li>
+<li>number_in_file&#160;:&#160;<a class="el" href="structlzma__index__iter.html#abe5333de53562189012d5ed084c0ef98">lzma_index_iter</a></li>
+<li>number_in_stream&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a35a752d344ff5d35d2a858a20bd6e5e8">lzma_index_iter</a></li>
+</ul>
+
+
+<h3><a id="index_o" name="index_o"></a>- o -</h3><ul>
+<li>opaque&#160;:&#160;<a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268">lzma_allocator</a></li>
+<li>options&#160;:&#160;<a class="el" href="structlzma__filter.html#a10dfbaa1601793657d12320bef933ee6">lzma_filter</a></li>
+</ul>
+
+
+<h3><a id="index_p" name="index_p"></a>- p -</h3><ul>
+<li>padding&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a48cfc856f283fe00b0df37402e012818">lzma_index_iter</a></li>
+<li>pb&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#acae107b3d3e9d0d4fe16103be22f4408">lzma_options_lzma</a></li>
+<li>preset&#160;:&#160;<a class="el" href="structlzma__mt.html#ab3883b5644752cdd15f01387d58dd050">lzma_mt</a></li>
+<li>preset_dict&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a16a58c1ee3ec18c820d5cb03dde3739a">lzma_options_lzma</a></li>
+<li>preset_dict_size&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a655ad4cce9e4dac9cf2a5c8daaa629e0">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_r" name="index_r"></a>- r -</h3><ul>
+<li>raw_check&#160;:&#160;<a class="el" href="structlzma__block.html#a25e9bf1bb1699017694b18ca24f965d2">lzma_block</a></li>
+</ul>
+
+
+<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
+<li>seek_pos&#160;:&#160;<a class="el" href="structlzma__stream.html#af7c43a61f3dfeb0b9c8487b7f275054e">lzma_stream</a></li>
+<li>start_offset&#160;:&#160;<a class="el" href="structlzma__options__bcj.html#a3f5a3c62cd82ce89433684f12ed096ac">lzma_options_bcj</a></li>
+</ul>
+
+
+<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
+<li>threads&#160;:&#160;<a class="el" href="structlzma__mt.html#a881761f858dbda33c697e74acde0be70">lzma_mt</a></li>
+<li>timeout&#160;:&#160;<a class="el" href="structlzma__mt.html#a298992bf7d2154d8dd814560219d10c2">lzma_mt</a></li>
+<li>total_in&#160;:&#160;<a class="el" href="structlzma__stream.html#a1a411e1755d6185756caefabc3932c7b">lzma_stream</a></li>
+<li>total_out&#160;:&#160;<a class="el" href="structlzma__stream.html#a80d703ffdfd7661e344fe7b61ff737fa">lzma_stream</a></li>
+<li>total_size&#160;:&#160;<a class="el" href="structlzma__index__iter.html#ae164ca3d7492dcf5883769c38baac30e">lzma_index_iter</a></li>
+<li>type&#160;:&#160;<a class="el" href="structlzma__options__delta.html#af3f1ece7f8c472f4a794953b414c7cd7">lzma_options_delta</a></li>
+</ul>
+
+
+<h3><a id="index_u" name="index_u"></a>- u -</h3><ul>
+<li>uncompressed_file_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a2f3ecf341b5dc043e9673759b8ff47b9">lzma_index_iter</a></li>
+<li>uncompressed_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#abd374b748b4a42e122b90841709609bc">lzma_index_iter</a></li>
+<li>uncompressed_size&#160;:&#160;<a class="el" href="structlzma__block.html#a17362d38d1946dd16a9686557ec19a94">lzma_block</a>, <a class="el" href="structlzma__index__iter.html#aafc48408ed40060a84ecd66bae5e1b23">lzma_index_iter</a></li>
+<li>uncompressed_stream_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a0fc4959fab08e1a6a4902c728c735a99">lzma_index_iter</a></li>
+<li>unpadded_size&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a9f4e405b9884be08e3a35bc06e3e15df">lzma_index_iter</a></li>
+</ul>
+
+
+<h3><a id="index_v" name="index_v"></a>- v -</h3><ul>
+<li>version&#160;:&#160;<a class="el" href="structlzma__block.html#ac3936a5b0ec3f9b8f9c7ad68e7d149a5">lzma_block</a>, <a class="el" href="structlzma__stream__flags.html#a61e9151869d5b77c868aaa4958e74d10">lzma_stream_flags</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/functions_vars.html b/doc/api/functions_vars.html
new file mode 100644
index 0000000..f6d689c
--- /dev/null
+++ b/doc/api/functions_vars.html
@@ -0,0 +1,210 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Data Fields - Variables</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li><a href="functions.html"><span>All</span></a></li>
+ <li class="current"><a href="functions_vars.html"><span>Variables</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow4" class="tabs3">
+ <ul class="tablist">
+ <li><a href="#index_a"><span>a</span></a></li>
+ <li><a href="#index_b"><span>b</span></a></li>
+ <li><a href="#index_c"><span>c</span></a></li>
+ <li><a href="#index_d"><span>d</span></a></li>
+ <li><a href="#index_e"><span>e</span></a></li>
+ <li><a href="#index_f"><span>f</span></a></li>
+ <li><a href="#index_h"><span>h</span></a></li>
+ <li><a href="#index_i"><span>i</span></a></li>
+ <li><a href="#index_l"><span>l</span></a></li>
+ <li><a href="#index_m"><span>m</span></a></li>
+ <li><a href="#index_n"><span>n</span></a></li>
+ <li><a href="#index_o"><span>o</span></a></li>
+ <li><a href="#index_p"><span>p</span></a></li>
+ <li><a href="#index_r"><span>r</span></a></li>
+ <li><a href="#index_s"><span>s</span></a></li>
+ <li><a href="#index_t"><span>t</span></a></li>
+ <li><a href="#index_u"><span>u</span></a></li>
+ <li class="current"><a href="#index_v"><span>v</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented variables with links to the struct/union documentation for each field:</div>
+
+<h3><a id="index_a" name="index_a"></a>- a -</h3><ul>
+<li>alloc&#160;:&#160;<a class="el" href="structlzma__allocator.html#aba5c4369af94cc9943423b49171462ec">lzma_allocator</a></li>
+<li>allocator&#160;:&#160;<a class="el" href="structlzma__stream.html#a4eb2f3e87e32cc4bea613898b0bd353f">lzma_stream</a></li>
+<li>avail_in&#160;:&#160;<a class="el" href="structlzma__stream.html#abb680ecea31910cbda1d7a6ad4f191c0">lzma_stream</a></li>
+<li>avail_out&#160;:&#160;<a class="el" href="structlzma__stream.html#a5ff28ea4e39148723c19f59811627904">lzma_stream</a></li>
+</ul>
+
+
+<h3><a id="index_b" name="index_b"></a>- b -</h3><ul>
+<li>backward_size&#160;:&#160;<a class="el" href="structlzma__stream__flags.html#aaa65ed7a55a098f829f04dba25d0f212">lzma_stream_flags</a></li>
+<li>block_count&#160;:&#160;<a class="el" href="structlzma__index__iter.html#abc6ee9be23e54f31aed07382c8caaf7c">lzma_index_iter</a></li>
+<li>block_size&#160;:&#160;<a class="el" href="structlzma__mt.html#a20cdc7865266ccb88da36a6e68f84d15">lzma_mt</a></li>
+</ul>
+
+
+<h3><a id="index_c" name="index_c"></a>- c -</h3><ul>
+<li>check&#160;:&#160;<a class="el" href="structlzma__block.html#a80cd9d3025991db4a476ce7588f853e6">lzma_block</a>, <a class="el" href="structlzma__mt.html#ae38846e8aca5b20d2a86a2364283b730">lzma_mt</a>, <a class="el" href="structlzma__stream__flags.html#ab1052ea7047c8d67f127f33278166647">lzma_stream_flags</a></li>
+<li>compressed_file_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a26436e75d4c2b5dd8d1de24140d8003e">lzma_index_iter</a></li>
+<li>compressed_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a426705df8dde4b094a42f91ea20a46ac">lzma_index_iter</a></li>
+<li>compressed_size&#160;:&#160;<a class="el" href="structlzma__block.html#a8383d489c9ffea8af390669a105c74e5">lzma_block</a>, <a class="el" href="structlzma__index__iter.html#a6e73b1f37e3fcf1e9491e4a53b2c52c7">lzma_index_iter</a></li>
+<li>compressed_stream_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a578bba553c43dc59a5e4032d4f6c89a3">lzma_index_iter</a></li>
+</ul>
+
+
+<h3><a id="index_d" name="index_d"></a>- d -</h3><ul>
+<li>depth&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a4226f686e8c9f6288595fe23d0e15713">lzma_options_lzma</a></li>
+<li>dict_size&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#aeb3f86002405a1191af86def46fca5ad">lzma_options_lzma</a></li>
+<li>dist&#160;:&#160;<a class="el" href="structlzma__options__delta.html#a31b4b0b5a2462cb9433c2663b8a62790">lzma_options_delta</a></li>
+</ul>
+
+
+<h3><a id="index_e" name="index_e"></a>- e -</h3><ul>
+<li>ext_flags&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#ade251d13ef46bcacb4e052b83693878c">lzma_options_lzma</a></li>
+<li>ext_size_high&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#ae5b3c2375c43ddfacf093980385fb9e3">lzma_options_lzma</a></li>
+<li>ext_size_low&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a971da8385dcebd01e60235afb3b717f9">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_f" name="index_f"></a>- f -</h3><ul>
+<li>filters&#160;:&#160;<a class="el" href="structlzma__block.html#a5900e517e6e0a473a3184074ae7defd1">lzma_block</a>, <a class="el" href="structlzma__mt.html#ad43a62ef2178c76405e5be0ece7a98b4">lzma_mt</a></li>
+<li>flags&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a223a046bcf09077a6e720967682deeae">lzma_index_iter</a>, <a class="el" href="structlzma__mt.html#a1c2fe028f547bf58b48b5199557d9a9f">lzma_mt</a></li>
+<li>free&#160;:&#160;<a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009">lzma_allocator</a></li>
+</ul>
+
+
+<h3><a id="index_h" name="index_h"></a>- h -</h3><ul>
+<li>header_size&#160;:&#160;<a class="el" href="structlzma__block.html#a6689c4f7524b2c05772a2d6151138610">lzma_block</a></li>
+</ul>
+
+
+<h3><a id="index_i" name="index_i"></a>- i -</h3><ul>
+<li>id&#160;:&#160;<a class="el" href="structlzma__filter.html#aef1d9709759f39e61db77547b2326929">lzma_filter</a></li>
+<li>ignore_check&#160;:&#160;<a class="el" href="structlzma__block.html#a516ac9cc63bc1a4fadd9fbfc189a206b">lzma_block</a></li>
+<li>internal&#160;:&#160;<a class="el" href="structlzma__stream.html#a209da54c2fb5dea40ad011c8408300d0">lzma_stream</a></li>
+</ul>
+
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>lc&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a95f6188e5b5f05c50ec463a315df3585">lzma_options_lzma</a></li>
+<li>lp&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a0fe9c54e808fce3090b6994d95fe41fe">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_m" name="index_m"></a>- m -</h3><ul>
+<li>memlimit_stop&#160;:&#160;<a class="el" href="structlzma__mt.html#ab5e0b530d4c572c7a2361aabbad656aa">lzma_mt</a></li>
+<li>memlimit_threading&#160;:&#160;<a class="el" href="structlzma__mt.html#a5a7fb0c7c2db350e09e77477bc3c9509">lzma_mt</a></li>
+<li>mf&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#aa99612cd52259093007f33513882dcd0">lzma_options_lzma</a></li>
+<li>mode&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a1d711df9bda046fd3899abf21fa250d5">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_n" name="index_n"></a>- n -</h3><ul>
+<li>next_in&#160;:&#160;<a class="el" href="structlzma__stream.html#a72fdc738c793f07a5c29715aa57802cf">lzma_stream</a></li>
+<li>next_out&#160;:&#160;<a class="el" href="structlzma__stream.html#a14ee64ed636ddcb775edf87e2b9f42ec">lzma_stream</a></li>
+<li>nice_len&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a0352ea7f8b6a43b745a44f6cb4e2d263">lzma_options_lzma</a></li>
+<li>number&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a115a307dbc778a9de296376dc39c7b23">lzma_index_iter</a></li>
+<li>number_in_file&#160;:&#160;<a class="el" href="structlzma__index__iter.html#abe5333de53562189012d5ed084c0ef98">lzma_index_iter</a></li>
+<li>number_in_stream&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a35a752d344ff5d35d2a858a20bd6e5e8">lzma_index_iter</a></li>
+</ul>
+
+
+<h3><a id="index_o" name="index_o"></a>- o -</h3><ul>
+<li>opaque&#160;:&#160;<a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268">lzma_allocator</a></li>
+<li>options&#160;:&#160;<a class="el" href="structlzma__filter.html#a10dfbaa1601793657d12320bef933ee6">lzma_filter</a></li>
+</ul>
+
+
+<h3><a id="index_p" name="index_p"></a>- p -</h3><ul>
+<li>padding&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a48cfc856f283fe00b0df37402e012818">lzma_index_iter</a></li>
+<li>pb&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#acae107b3d3e9d0d4fe16103be22f4408">lzma_options_lzma</a></li>
+<li>preset&#160;:&#160;<a class="el" href="structlzma__mt.html#ab3883b5644752cdd15f01387d58dd050">lzma_mt</a></li>
+<li>preset_dict&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a16a58c1ee3ec18c820d5cb03dde3739a">lzma_options_lzma</a></li>
+<li>preset_dict_size&#160;:&#160;<a class="el" href="structlzma__options__lzma.html#a655ad4cce9e4dac9cf2a5c8daaa629e0">lzma_options_lzma</a></li>
+</ul>
+
+
+<h3><a id="index_r" name="index_r"></a>- r -</h3><ul>
+<li>raw_check&#160;:&#160;<a class="el" href="structlzma__block.html#a25e9bf1bb1699017694b18ca24f965d2">lzma_block</a></li>
+</ul>
+
+
+<h3><a id="index_s" name="index_s"></a>- s -</h3><ul>
+<li>seek_pos&#160;:&#160;<a class="el" href="structlzma__stream.html#af7c43a61f3dfeb0b9c8487b7f275054e">lzma_stream</a></li>
+<li>start_offset&#160;:&#160;<a class="el" href="structlzma__options__bcj.html#a3f5a3c62cd82ce89433684f12ed096ac">lzma_options_bcj</a></li>
+</ul>
+
+
+<h3><a id="index_t" name="index_t"></a>- t -</h3><ul>
+<li>threads&#160;:&#160;<a class="el" href="structlzma__mt.html#a881761f858dbda33c697e74acde0be70">lzma_mt</a></li>
+<li>timeout&#160;:&#160;<a class="el" href="structlzma__mt.html#a298992bf7d2154d8dd814560219d10c2">lzma_mt</a></li>
+<li>total_in&#160;:&#160;<a class="el" href="structlzma__stream.html#a1a411e1755d6185756caefabc3932c7b">lzma_stream</a></li>
+<li>total_out&#160;:&#160;<a class="el" href="structlzma__stream.html#a80d703ffdfd7661e344fe7b61ff737fa">lzma_stream</a></li>
+<li>total_size&#160;:&#160;<a class="el" href="structlzma__index__iter.html#ae164ca3d7492dcf5883769c38baac30e">lzma_index_iter</a></li>
+<li>type&#160;:&#160;<a class="el" href="structlzma__options__delta.html#af3f1ece7f8c472f4a794953b414c7cd7">lzma_options_delta</a></li>
+</ul>
+
+
+<h3><a id="index_u" name="index_u"></a>- u -</h3><ul>
+<li>uncompressed_file_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a2f3ecf341b5dc043e9673759b8ff47b9">lzma_index_iter</a></li>
+<li>uncompressed_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#abd374b748b4a42e122b90841709609bc">lzma_index_iter</a></li>
+<li>uncompressed_size&#160;:&#160;<a class="el" href="structlzma__block.html#a17362d38d1946dd16a9686557ec19a94">lzma_block</a>, <a class="el" href="structlzma__index__iter.html#aafc48408ed40060a84ecd66bae5e1b23">lzma_index_iter</a></li>
+<li>uncompressed_stream_offset&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a0fc4959fab08e1a6a4902c728c735a99">lzma_index_iter</a></li>
+<li>unpadded_size&#160;:&#160;<a class="el" href="structlzma__index__iter.html#a9f4e405b9884be08e3a35bc06e3e15df">lzma_index_iter</a></li>
+</ul>
+
+
+<h3><a id="index_v" name="index_v"></a>- v -</h3><ul>
+<li>version&#160;:&#160;<a class="el" href="structlzma__block.html#ac3936a5b0ec3f9b8f9c7ad68e7d149a5">lzma_block</a>, <a class="el" href="structlzma__stream__flags.html#a61e9151869d5b77c868aaa4958e74d10">lzma_stream_flags</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals.html b/doc/api/globals.html
new file mode 100644
index 0000000..f80423c
--- /dev/null
+++ b/doc/api/globals.html
@@ -0,0 +1,272 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li class="current"><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li class="current"><a href="globals.html"><span>All</span></a></li>
+ <li><a href="globals_func.html"><span>Functions</span></a></li>
+ <li><a href="globals_type.html"><span>Typedefs</span></a></li>
+ <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+ <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
+ <li><a href="globals_defs.html"><span>Macros</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow4" class="tabs3">
+ <ul class="tablist">
+ <li class="current"><a href="globals.html#index_l"><span>l</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:</div>
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>lzma_action&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">base.h</a></li>
+<li>lzma_alone_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a5f43c3a1035e5a226dcd298f4162b861">container.h</a></li>
+<li>lzma_alone_encoder()&#160;:&#160;<a class="el" href="container_8h.html#a26fcc5bccdf3f862caa4c992d01e1a72">container.h</a></li>
+<li>lzma_auto_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a21cbebf2771617bb1e956385cfb353e3">container.h</a></li>
+<li>LZMA_BACKWARD_SIZE_MAX&#160;:&#160;<a class="el" href="stream__flags_8h.html#a2e5e09010880f8caa6cd6539c7341239">stream_flags.h</a></li>
+<li>LZMA_BACKWARD_SIZE_MIN&#160;:&#160;<a class="el" href="stream__flags_8h.html#ae8da8190f1396f66332073946bc45634">stream_flags.h</a></li>
+<li>lzma_block_buffer_bound()&#160;:&#160;<a class="el" href="block_8h.html#a58ff73e2572b529f48cc590bfffe5b4f">block.h</a></li>
+<li>lzma_block_buffer_decode()&#160;:&#160;<a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f">block.h</a></li>
+<li>lzma_block_buffer_encode()&#160;:&#160;<a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54">block.h</a></li>
+<li>lzma_block_compressed_size()&#160;:&#160;<a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc">block.h</a></li>
+<li>lzma_block_decoder()&#160;:&#160;<a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92">block.h</a></li>
+<li>lzma_block_encoder()&#160;:&#160;<a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359">block.h</a></li>
+<li>lzma_block_header_decode()&#160;:&#160;<a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9">block.h</a></li>
+<li>lzma_block_header_encode()&#160;:&#160;<a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0">block.h</a></li>
+<li>lzma_block_header_size()&#160;:&#160;<a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd">block.h</a></li>
+<li>lzma_block_header_size_decode&#160;:&#160;<a class="el" href="block_8h.html#ac025c940683a70f4c7f956bad814fd5f">block.h</a></li>
+<li>lzma_block_total_size()&#160;:&#160;<a class="el" href="block_8h.html#a694424f9dfdd5151e01debac1c501fa9">block.h</a></li>
+<li>lzma_block_uncomp_encode()&#160;:&#160;<a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c">block.h</a></li>
+<li>lzma_block_unpadded_size()&#160;:&#160;<a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30">block.h</a></li>
+<li>lzma_bool&#160;:&#160;<a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">base.h</a></li>
+<li>LZMA_BUF_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea9ca0ecb62459bdc84d6af47d16b23ae5">base.h</a></li>
+<li>lzma_check&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">check.h</a></li>
+<li>LZMA_CHECK_CRC32&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa0be65014a40b5cb4ab32252b3709bef7">check.h</a></li>
+<li>LZMA_CHECK_CRC64&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa87b4b0697a1e1ccb6766dd5c2fa24afc">check.h</a></li>
+<li>LZMA_CHECK_ID_MAX&#160;:&#160;<a class="el" href="check_8h.html#acd221ababe30230d9647aab469ad80cb">check.h</a></li>
+<li>lzma_check_is_supported()&#160;:&#160;<a class="el" href="check_8h.html#ae9391ed2acfad0ce9357b68c608f07d8">check.h</a></li>
+<li>LZMA_CHECK_NONE&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa7b9851d75abfabc08d7fc5b4aaeb6f20">check.h</a></li>
+<li>LZMA_CHECK_SHA256&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3faf26a55ddd204a50ae87ec3432e7bc309">check.h</a></li>
+<li>lzma_check_size()&#160;:&#160;<a class="el" href="check_8h.html#afd3fda19575d9d4f864c626c02b7cb48">check.h</a></li>
+<li>LZMA_CHECK_SIZE_MAX&#160;:&#160;<a class="el" href="check_8h.html#a379e931cf86351ab1d97896cda9abbe0">check.h</a></li>
+<li>lzma_code()&#160;:&#160;<a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957">base.h</a></li>
+<li>LZMA_CONCATENATED&#160;:&#160;<a class="el" href="container_8h.html#a563c84b5f368b3dd00d92ea903c5c33d">container.h</a></li>
+<li>lzma_cputhreads()&#160;:&#160;<a class="el" href="hardware_8h.html#a22f7a882b7a4b741a226abf62bdf46ca">hardware.h</a></li>
+<li>lzma_crc32()&#160;:&#160;<a class="el" href="check_8h.html#a760b569cce91bdd01e4ce9d78823c96d">check.h</a></li>
+<li>lzma_crc64()&#160;:&#160;<a class="el" href="check_8h.html#aff2e74ce671b9f82a96adb549c68cea2">check.h</a></li>
+<li>LZMA_DATA_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea3aa72729a844790e39b4e1101a731dfb">base.h</a></li>
+<li>LZMA_DELTA_DIST_MAX&#160;:&#160;<a class="el" href="delta_8h.html#afdf8a5ce184ddf9f8070de637775da94">delta.h</a></li>
+<li>LZMA_DELTA_DIST_MIN&#160;:&#160;<a class="el" href="delta_8h.html#a466886d9d01392f61bdf267687a4f96e">delta.h</a></li>
+<li>lzma_delta_type&#160;:&#160;<a class="el" href="delta_8h.html#a04d84d7fa6cefdc219b6e2e96ff36fe1">delta.h</a></li>
+<li>lzma_easy_buffer_encode()&#160;:&#160;<a class="el" href="container_8h.html#ac5e71f2711b57391186671967435faf2">container.h</a></li>
+<li>lzma_easy_decoder_memusage()&#160;:&#160;<a class="el" href="container_8h.html#a3562055d26c18fad067a7c7516eaddf5">container.h</a></li>
+<li>lzma_easy_encoder()&#160;:&#160;<a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4">container.h</a></li>
+<li>lzma_easy_encoder_memusage()&#160;:&#160;<a class="el" href="container_8h.html#a62c853cf7dbf008bdbd97b2685c3eabf">container.h</a></li>
+<li>lzma_end()&#160;:&#160;<a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308">base.h</a></li>
+<li>LZMA_FAIL_FAST&#160;:&#160;<a class="el" href="container_8h.html#aa1f469ed3d4b2eaf12f8081657efc9d5">container.h</a></li>
+<li>lzma_file_info_decoder()&#160;:&#160;<a class="el" href="index_8h.html#a7c5d77cf8532d95977d4571a1eb0a222">index.h</a></li>
+<li>LZMA_FILTER_ARM&#160;:&#160;<a class="el" href="bcj_8h.html#a495a58f63ebc7a8b756099efba492f8b">bcj.h</a></li>
+<li>LZMA_FILTER_ARM64&#160;:&#160;<a class="el" href="bcj_8h.html#a01765158cd31cac21b272b180628fc4b">bcj.h</a></li>
+<li>LZMA_FILTER_ARMTHUMB&#160;:&#160;<a class="el" href="bcj_8h.html#a5ec62e7e5e7df3d9af5b2ea3f857689a">bcj.h</a></li>
+<li>lzma_filter_decoder_is_supported()&#160;:&#160;<a class="el" href="filter_8h.html#acab0c67bf5b3a76f2b474c8e1da98938">filter.h</a></li>
+<li>LZMA_FILTER_DELTA&#160;:&#160;<a class="el" href="delta_8h.html#a7ced67235ad7a01ae31d32ecf1e634cb">delta.h</a></li>
+<li>lzma_filter_encoder_is_supported()&#160;:&#160;<a class="el" href="filter_8h.html#a3db3c36cd6e57658a74c53e4daa2bef6">filter.h</a></li>
+<li>lzma_filter_flags_decode()&#160;:&#160;<a class="el" href="filter_8h.html#a4cba9a4c658cce0ff01fd102b31ea1a7">filter.h</a></li>
+<li>lzma_filter_flags_encode()&#160;:&#160;<a class="el" href="filter_8h.html#a96f23309bc21398fece18c00ebe7db98">filter.h</a></li>
+<li>lzma_filter_flags_size()&#160;:&#160;<a class="el" href="filter_8h.html#a996c9c21840ed54e37bd1f664a79d940">filter.h</a></li>
+<li>LZMA_FILTER_IA64&#160;:&#160;<a class="el" href="bcj_8h.html#a2fe36218a38f400e1ce40820758f7427">bcj.h</a></li>
+<li>LZMA_FILTER_LZMA1&#160;:&#160;<a class="el" href="lzma12_8h.html#accedd16abcb758e7f748bac1102abda9">lzma12.h</a></li>
+<li>LZMA_FILTER_LZMA1EXT&#160;:&#160;<a class="el" href="lzma12_8h.html#a98a7fd42aa78a273a6b138629e46772d">lzma12.h</a></li>
+<li>LZMA_FILTER_LZMA2&#160;:&#160;<a class="el" href="lzma12_8h.html#a04f9d9a018a47cc99491e6e94e92f96b">lzma12.h</a></li>
+<li>LZMA_FILTER_POWERPC&#160;:&#160;<a class="el" href="bcj_8h.html#ab7f667d4a5d319f227f23163cbea086f">bcj.h</a></li>
+<li>LZMA_FILTER_SPARC&#160;:&#160;<a class="el" href="bcj_8h.html#a50941088e93ef659c6b000bbcaf58143">bcj.h</a></li>
+<li>LZMA_FILTER_X86&#160;:&#160;<a class="el" href="bcj_8h.html#aa9eac1f580ddde3309518cd153d596b1">bcj.h</a></li>
+<li>lzma_filters_copy()&#160;:&#160;<a class="el" href="filter_8h.html#a611fe1176eeeda187b1bd8aef45040aa">filter.h</a></li>
+<li>lzma_filters_free()&#160;:&#160;<a class="el" href="filter_8h.html#ae06979d219897f5f4c29cbc7a96a8892">filter.h</a></li>
+<li>LZMA_FILTERS_MAX&#160;:&#160;<a class="el" href="filter_8h.html#ab33c0cc1728bf390e5b84f8bce1928ba">filter.h</a></li>
+<li>lzma_filters_update()&#160;:&#160;<a class="el" href="filter_8h.html#a4a8fd969df001e449ebe4421ab33bba5">filter.h</a></li>
+<li>LZMA_FINISH&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea7d24fb3c6c144d13bcb091195b8ebec1">base.h</a></li>
+<li>LZMA_FORMAT_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea63b7a58949854eb9307f8e351358d56c">base.h</a></li>
+<li>LZMA_FULL_BARRIER&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77eaf7bf60e3555a4d10ffad3ecc3d2e01f1">base.h</a></li>
+<li>LZMA_FULL_FLUSH&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77eaab46f0d7c721f1ec377e9575eab2586f">base.h</a></li>
+<li>lzma_get_check()&#160;:&#160;<a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746">check.h</a></li>
+<li>LZMA_GET_CHECK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa5b648c18da0f584f621cfdf7fef1bdb">base.h</a></li>
+<li>lzma_get_progress()&#160;:&#160;<a class="el" href="base_8h.html#ab6447cd68eeecbd6b88f21daeb8ce751">base.h</a></li>
+<li>LZMA_IGNORE_CHECK&#160;:&#160;<a class="el" href="container_8h.html#a1289925ae1c63a8e86f69f3657118a4d">container.h</a></li>
+<li>lzma_index&#160;:&#160;<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">index.h</a></li>
+<li>lzma_index_append()&#160;:&#160;<a class="el" href="index_8h.html#ac347747eb933c7c408e6c801b33becc3">index.h</a></li>
+<li>lzma_index_block_count()&#160;:&#160;<a class="el" href="index_8h.html#add1a8c506f67dbc19cae6747107e3bec">index.h</a></li>
+<li>lzma_index_buffer_decode()&#160;:&#160;<a class="el" href="index_8h.html#a028b8b8d59a413f9682eea1269a6ae8b">index.h</a></li>
+<li>lzma_index_buffer_encode()&#160;:&#160;<a class="el" href="index_8h.html#add1ef06dec8a26d08ae8651cff0fd8d6">index.h</a></li>
+<li>lzma_index_cat()&#160;:&#160;<a class="el" href="index_8h.html#abc4db36b4bd67af01819be9dd045c34a">index.h</a></li>
+<li>lzma_index_checks()&#160;:&#160;<a class="el" href="index_8h.html#af8d6528a04241841bd0a4322b0c57eaa">index.h</a></li>
+<li>lzma_index_decoder()&#160;:&#160;<a class="el" href="index_8h.html#abb56fd1d5914f8900ece7b88b78e5e23">index.h</a></li>
+<li>lzma_index_dup()&#160;:&#160;<a class="el" href="index_8h.html#a5161e3f67156577882e1d95dcb57e33e">index.h</a></li>
+<li>lzma_index_encoder()&#160;:&#160;<a class="el" href="index_8h.html#a6800d70f3b2afca085496460cd03211d">index.h</a></li>
+<li>lzma_index_end()&#160;:&#160;<a class="el" href="index_8h.html#a0c2d0009f07fc315d5ac89e4bcd25abd">index.h</a></li>
+<li>lzma_index_file_size()&#160;:&#160;<a class="el" href="index_8h.html#ac875ed47d35385e5dac461b25c5ea1c9">index.h</a></li>
+<li>lzma_index_hash&#160;:&#160;<a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">index_hash.h</a></li>
+<li>lzma_index_hash_append()&#160;:&#160;<a class="el" href="index__hash_8h.html#a2bdbe4f0b5fa2fadb7528447feaaa97f">index_hash.h</a></li>
+<li>lzma_index_hash_decode()&#160;:&#160;<a class="el" href="index__hash_8h.html#a891eb955284c9117155f92eb0ddba44c">index_hash.h</a></li>
+<li>lzma_index_hash_end()&#160;:&#160;<a class="el" href="index__hash_8h.html#a7dacb41b9ec1c8df5d33dfdae97743b3">index_hash.h</a></li>
+<li>lzma_index_hash_init()&#160;:&#160;<a class="el" href="index__hash_8h.html#aaafae4967a4a266d97dc34a98bfcabfb">index_hash.h</a></li>
+<li>lzma_index_hash_size()&#160;:&#160;<a class="el" href="index__hash_8h.html#a0f8ab3b57b117f9547866156755c917f">index_hash.h</a></li>
+<li>lzma_index_init()&#160;:&#160;<a class="el" href="index_8h.html#a0850627d011111326d4278a3e2edec25">index.h</a></li>
+<li>LZMA_INDEX_ITER_ANY&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8af46f6e5c414471c7c96586f380e48315">index.h</a></li>
+<li>LZMA_INDEX_ITER_BLOCK&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8a2702617d60d6fc15138a749e06ef3414">index.h</a></li>
+<li>lzma_index_iter_init()&#160;:&#160;<a class="el" href="index_8h.html#aa78f02f18ed29d289a6ef37b8ea98a21">index.h</a></li>
+<li>lzma_index_iter_locate()&#160;:&#160;<a class="el" href="index_8h.html#ac4f56df9d210712e5d7add5502c9eb93">index.h</a></li>
+<li>lzma_index_iter_mode&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8">index.h</a></li>
+<li>lzma_index_iter_next()&#160;:&#160;<a class="el" href="index_8h.html#af428522e1b3eef137c65c5a01f766e0e">index.h</a></li>
+<li>LZMA_INDEX_ITER_NONEMPTY_BLOCK&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8aa49bf4d561d8f2c61d300edbb6c282c7">index.h</a></li>
+<li>lzma_index_iter_rewind()&#160;:&#160;<a class="el" href="index_8h.html#ae81438be8deff4894b104e65d8acdd24">index.h</a></li>
+<li>LZMA_INDEX_ITER_STREAM&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8a5b31d985de1c823151acdd7e4a966fc9">index.h</a></li>
+<li>lzma_index_memusage()&#160;:&#160;<a class="el" href="index_8h.html#a880def3727ecdd7f242807083d228fc5">index.h</a></li>
+<li>lzma_index_memused()&#160;:&#160;<a class="el" href="index_8h.html#a4118805ac7be6618aca6d6d7e5e4dde7">index.h</a></li>
+<li>lzma_index_size()&#160;:&#160;<a class="el" href="index_8h.html#a669ed1a82b1941217cfbb07e7826afc2">index.h</a></li>
+<li>lzma_index_stream_count()&#160;:&#160;<a class="el" href="index_8h.html#afd159a765b09b0cf79186069a848d07e">index.h</a></li>
+<li>lzma_index_stream_flags()&#160;:&#160;<a class="el" href="index_8h.html#a79a19669237f19f0b11c9f3be80a62b4">index.h</a></li>
+<li>lzma_index_stream_padding()&#160;:&#160;<a class="el" href="index_8h.html#a3ed82f96c688f3c953f6509b6f4e2ef3">index.h</a></li>
+<li>lzma_index_stream_size()&#160;:&#160;<a class="el" href="index_8h.html#af3630369b43c9ccc906065d759b49663">index.h</a></li>
+<li>lzma_index_total_size()&#160;:&#160;<a class="el" href="index_8h.html#a7829942b83ee1fa5b6443cc248b81041">index.h</a></li>
+<li>lzma_index_uncompressed_size()&#160;:&#160;<a class="el" href="index_8h.html#a620fe6317f1f9d7af9cc27c748bf07d6">index.h</a></li>
+<li>lzma_internal&#160;:&#160;<a class="el" href="base_8h.html#ab1a60127c640135687a5bcc232cec906">base.h</a></li>
+<li>lzma_lzip_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a97689f5709e0db1e2dac450f5ce4e5eb">container.h</a></li>
+<li>lzma_lzma_preset()&#160;:&#160;<a class="el" href="lzma12_8h.html#aa62c28944fe3575653a4c25780400d77">lzma12.h</a></li>
+<li>lzma_match_finder&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma12.h</a></li>
+<li>LZMA_MEM_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea567e1464feca03900a5425fb45b2f5b6">base.h</a></li>
+<li>LZMA_MEMLIMIT_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa1d705effe6026f32c0fe9756b6326bc">base.h</a></li>
+<li>lzma_memlimit_get()&#160;:&#160;<a class="el" href="base_8h.html#ac871bc2ead5d482c6d6b3d51bfec365c">base.h</a></li>
+<li>lzma_memlimit_set()&#160;:&#160;<a class="el" href="base_8h.html#afc49d4cf75b73128a167df3407505f7b">base.h</a></li>
+<li>lzma_memusage()&#160;:&#160;<a class="el" href="base_8h.html#a418b210cf206782a73cd9de7dc27f670">base.h</a></li>
+<li>LZMA_MF_BT2&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a7ab212446c3f6520f5c33ccfa4b3386a">lzma12.h</a></li>
+<li>LZMA_MF_BT3&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a983ecc59bf3e07a7c43fea551ea11865">lzma12.h</a></li>
+<li>LZMA_MF_BT4&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a468c32cdea9861d1ff98478364e6c547">lzma12.h</a></li>
+<li>LZMA_MF_HC3&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a6eb38f634021a192cada8a978b5de93b">lzma12.h</a></li>
+<li>LZMA_MF_HC4&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a0944620f4949289c2ebde613cae12b04">lzma12.h</a></li>
+<li>lzma_mf_is_supported()&#160;:&#160;<a class="el" href="lzma12_8h.html#aefba1f7214ddcf8cd408a0702e8642b5">lzma12.h</a></li>
+<li>lzma_microlzma_decoder()&#160;:&#160;<a class="el" href="container_8h.html#aa8372dae3e7c907c36f7bb5426aeacdf">container.h</a></li>
+<li>lzma_microlzma_encoder()&#160;:&#160;<a class="el" href="container_8h.html#abfc8f11acf837b167aa94b7071b54c30">container.h</a></li>
+<li>lzma_mode&#160;:&#160;<a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma12.h</a></li>
+<li>LZMA_MODE_FAST&#160;:&#160;<a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866ac8c0926a91b4f756e11121efd30648cc">lzma12.h</a></li>
+<li>lzma_mode_is_supported()&#160;:&#160;<a class="el" href="lzma12_8h.html#ad1add1c2600fdbb3d737e4fb3465dfcb">lzma12.h</a></li>
+<li>LZMA_MODE_NORMAL&#160;:&#160;<a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866ad37225f30d5cd21fc8bb3eaba283bbf9">lzma12.h</a></li>
+<li>LZMA_NO_CHECK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa720d30092d504d7d138a320db1905ef">base.h</a></li>
+<li>LZMA_OK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eac003781ccb81bbd5578e29abed8a8cfe">base.h</a></li>
+<li>LZMA_OPTIONS_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa9ff6dfee36b7aba4fae60706d37425f">base.h</a></li>
+<li>lzma_physmem()&#160;:&#160;<a class="el" href="hardware_8h.html#a85363e453b34272a9f26c9fdffb041ee">hardware.h</a></li>
+<li>LZMA_PRESET_DEFAULT&#160;:&#160;<a class="el" href="container_8h.html#af3ca20ff228b363a82515c1aee9e27bc">container.h</a></li>
+<li>LZMA_PRESET_EXTREME&#160;:&#160;<a class="el" href="container_8h.html#af524fe9af5737820fdadcd40a2c26deb">container.h</a></li>
+<li>LZMA_PRESET_LEVEL_MASK&#160;:&#160;<a class="el" href="container_8h.html#a97e40265e355a21bd2465aaa5b85f03d">container.h</a></li>
+<li>LZMA_PROG_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea2dac8d451cb38da8550653d0d7be4ec2">base.h</a></li>
+<li>lzma_properties_decode()&#160;:&#160;<a class="el" href="filter_8h.html#a88d2e864b2039ac82802cc202278d478">filter.h</a></li>
+<li>lzma_properties_encode()&#160;:&#160;<a class="el" href="filter_8h.html#a8e00887086df5a44084ac22e48415de3">filter.h</a></li>
+<li>lzma_properties_size()&#160;:&#160;<a class="el" href="filter_8h.html#aee038818cf7bbe044c3f7a7c86998c1b">filter.h</a></li>
+<li>lzma_raw_buffer_decode()&#160;:&#160;<a class="el" href="filter_8h.html#a3b942df507e4f9a6d7525e5a4c6864e5">filter.h</a></li>
+<li>lzma_raw_buffer_encode()&#160;:&#160;<a class="el" href="filter_8h.html#a226724ab3391b410281fdf656cc7c432">filter.h</a></li>
+<li>lzma_raw_decoder()&#160;:&#160;<a class="el" href="filter_8h.html#ae77b3b6c5eccd9d77bbafef0a8a203c1">filter.h</a></li>
+<li>lzma_raw_decoder_memusage()&#160;:&#160;<a class="el" href="filter_8h.html#a58511249ae9206d7de7c5d1f05842297">filter.h</a></li>
+<li>lzma_raw_encoder()&#160;:&#160;<a class="el" href="filter_8h.html#a2368e4129032345eb0738b0c6e085703">filter.h</a></li>
+<li>lzma_raw_encoder_memusage()&#160;:&#160;<a class="el" href="filter_8h.html#a730f9391e85a5979bcd1b32643ae7176">filter.h</a></li>
+<li>lzma_reserved_enum&#160;:&#160;<a class="el" href="base_8h.html#a05805a07754b2aa22f7d443eb7ece41a">base.h</a></li>
+<li>lzma_ret&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">base.h</a></li>
+<li>LZMA_RUN&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1">base.h</a></li>
+<li>LZMA_SEEK_NEEDED&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea6cf28e5345851f13bd798a4eab8cc939">base.h</a></li>
+<li>lzma_set_ext_size&#160;:&#160;<a class="el" href="lzma12_8h.html#a73ed0293db4e59d73a702d66fef537c3">lzma12.h</a></li>
+<li>LZMA_STR_ALL_FILTERS&#160;:&#160;<a class="el" href="filter_8h.html#a41aa51eeb53190404439c31d8e9c97cd">filter.h</a></li>
+<li>LZMA_STR_DECODER&#160;:&#160;<a class="el" href="filter_8h.html#a8a0f3fc03bdb84a294cdd53a98783104">filter.h</a></li>
+<li>LZMA_STR_ENCODER&#160;:&#160;<a class="el" href="filter_8h.html#a09a775f6a78d28ca136acfb51ad5fa02">filter.h</a></li>
+<li>lzma_str_from_filters()&#160;:&#160;<a class="el" href="filter_8h.html#a7deeb86ef59a9111b8033681290e0fb0">filter.h</a></li>
+<li>LZMA_STR_GETOPT_LONG&#160;:&#160;<a class="el" href="filter_8h.html#a87e9ac4ae5829b092262223256141a29">filter.h</a></li>
+<li>lzma_str_list_filters()&#160;:&#160;<a class="el" href="filter_8h.html#ab51585b68796ce0270f87e615b923809">filter.h</a></li>
+<li>LZMA_STR_NO_SPACES&#160;:&#160;<a class="el" href="filter_8h.html#ac0113c47caf98a735db2297936c5e857">filter.h</a></li>
+<li>LZMA_STR_NO_VALIDATION&#160;:&#160;<a class="el" href="filter_8h.html#adc33f4c0c7b5d3ae36acc0437a904339">filter.h</a></li>
+<li>lzma_str_to_filters()&#160;:&#160;<a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30">filter.h</a></li>
+<li>lzma_stream_buffer_bound()&#160;:&#160;<a class="el" href="container_8h.html#a66d4366a47b8332bff2a512f44f5c45e">container.h</a></li>
+<li>lzma_stream_buffer_decode()&#160;:&#160;<a class="el" href="container_8h.html#aa58f237f6cea97ef0eb9bf5c37a3008d">container.h</a></li>
+<li>lzma_stream_buffer_encode()&#160;:&#160;<a class="el" href="container_8h.html#a6e645ccaeace3b13a6981e03c6e190ad">container.h</a></li>
+<li>lzma_stream_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0">container.h</a></li>
+<li>lzma_stream_decoder_mt()&#160;:&#160;<a class="el" href="container_8h.html#a7179d178e6430c10e2006a467921e98e">container.h</a></li>
+<li>lzma_stream_encoder()&#160;:&#160;<a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52">container.h</a></li>
+<li>lzma_stream_encoder_mt()&#160;:&#160;<a class="el" href="container_8h.html#a3f8793518711ee84d1abf12ea3aaba42">container.h</a></li>
+<li>lzma_stream_encoder_mt_memusage()&#160;:&#160;<a class="el" href="container_8h.html#ad7cf41496d77f4d346e006b26ed8e101">container.h</a></li>
+<li>LZMA_STREAM_END&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea91ecc6fab14c13ad36224afbcb4e55c4">base.h</a></li>
+<li>lzma_stream_flags_compare()&#160;:&#160;<a class="el" href="stream__flags_8h.html#a3e25ca4205021302882a696283d45263">stream_flags.h</a></li>
+<li>lzma_stream_footer_decode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#aa92a383f85753bb79ee23227fa68186c">stream_flags.h</a></li>
+<li>lzma_stream_footer_encode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#a438249a75ea8da952a7474b92bfe7b7a">stream_flags.h</a></li>
+<li>lzma_stream_header_decode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#ae03198e464f0d296e601ff841e100805">stream_flags.h</a></li>
+<li>lzma_stream_header_encode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#a2ebb8d6dff23daeb3de398913b845eff">stream_flags.h</a></li>
+<li>LZMA_STREAM_HEADER_SIZE&#160;:&#160;<a class="el" href="stream__flags_8h.html#ada7e0a4f5e7146f547962cb9e9ef08ee">stream_flags.h</a></li>
+<li>LZMA_STREAM_INIT&#160;:&#160;<a class="el" href="base_8h.html#af31f0c8b6f14359cd082b9559f7f3e01">base.h</a></li>
+<li>LZMA_SYNC_FLUSH&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170">base.h</a></li>
+<li>LZMA_TELL_ANY_CHECK&#160;:&#160;<a class="el" href="container_8h.html#a0bdde702a77ff42b90a99c0bf4147b6b">container.h</a></li>
+<li>LZMA_TELL_NO_CHECK&#160;:&#160;<a class="el" href="container_8h.html#ada9cd20febb28b5ed6656de9184a86e9">container.h</a></li>
+<li>LZMA_TELL_UNSUPPORTED_CHECK&#160;:&#160;<a class="el" href="container_8h.html#ae21fb746037c82735d40d428c462e078">container.h</a></li>
+<li>LZMA_UNSUPPORTED_CHECK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea989f393a1772d85bf545a9da48fc7ac2">base.h</a></li>
+<li>LZMA_VERSION&#160;:&#160;<a class="el" href="version_8h.html#a156c47ff34aa0c2b726d0daf799f10a0">version.h</a></li>
+<li>LZMA_VERSION_COMMIT&#160;:&#160;<a class="el" href="version_8h.html#a7fd6169ff15ac7f01f94970359a331ea">version.h</a></li>
+<li>LZMA_VERSION_MAJOR&#160;:&#160;<a class="el" href="version_8h.html#aa0f450c9d3b0ff5f88b55888ed55701f">version.h</a></li>
+<li>LZMA_VERSION_MINOR&#160;:&#160;<a class="el" href="version_8h.html#af8fd295cf8aa349b0731423ad7a56134">version.h</a></li>
+<li>lzma_version_number()&#160;:&#160;<a class="el" href="version_8h.html#a72f929c9b9e8e730b790b3f8c80c3c80">version.h</a></li>
+<li>LZMA_VERSION_PATCH&#160;:&#160;<a class="el" href="version_8h.html#a8b550373cbff381f15d4308b852a3c2a">version.h</a></li>
+<li>LZMA_VERSION_STABILITY&#160;:&#160;<a class="el" href="version_8h.html#ae289abe5dcc203c7cda9f6a9a2f36b3a">version.h</a></li>
+<li>LZMA_VERSION_STRING&#160;:&#160;<a class="el" href="version_8h.html#a57bb143c993c305a53e9aade831a546c">version.h</a></li>
+<li>lzma_version_string()&#160;:&#160;<a class="el" href="version_8h.html#a8998c1d8b4b5c2c1218bdfd58fdb1baa">version.h</a></li>
+<li>lzma_vli&#160;:&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">vli.h</a></li>
+<li>LZMA_VLI_BYTES_MAX&#160;:&#160;<a class="el" href="vli_8h.html#a063ecff4133aa2f8899b9fa3fdefd310">vli.h</a></li>
+<li>LZMA_VLI_C&#160;:&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">vli.h</a></li>
+<li>lzma_vli_decode()&#160;:&#160;<a class="el" href="vli_8h.html#a7b7d50e1074e0e2bcd81c29a5f7461c7">vli.h</a></li>
+<li>lzma_vli_encode()&#160;:&#160;<a class="el" href="vli_8h.html#a50bbb77e9ec3b72c25586aa700c20970">vli.h</a></li>
+<li>lzma_vli_is_valid&#160;:&#160;<a class="el" href="vli_8h.html#a4f67ed698215d865a2b87a95ab1320dd">vli.h</a></li>
+<li>LZMA_VLI_MAX&#160;:&#160;<a class="el" href="vli_8h.html#a7b782528bd1934db7c020adbedb20ec9">vli.h</a></li>
+<li>lzma_vli_size()&#160;:&#160;<a class="el" href="vli_8h.html#a8d53e0b69934b43da8721fa6f1e8cc4f">vli.h</a></li>
+<li>LZMA_VLI_UNKNOWN&#160;:&#160;<a class="el" href="vli_8h.html#a5a4b28254a30c859018b896ed371d69a">vli.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals_defs.html b/doc/api/globals_defs.html
new file mode 100644
index 0000000..a7b945c
--- /dev/null
+++ b/doc/api/globals_defs.html
@@ -0,0 +1,119 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li class="current"><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li><a href="globals.html"><span>All</span></a></li>
+ <li><a href="globals_func.html"><span>Functions</span></a></li>
+ <li><a href="globals_type.html"><span>Typedefs</span></a></li>
+ <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+ <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
+ <li class="current"><a href="globals_defs.html"><span>Macros</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow4" class="tabs3">
+ <ul class="tablist">
+ <li class="current"><a href="#index_l"><span>l</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented macros with links to the documentation:</div>
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>LZMA_BACKWARD_SIZE_MAX&#160;:&#160;<a class="el" href="stream__flags_8h.html#a2e5e09010880f8caa6cd6539c7341239">stream_flags.h</a></li>
+<li>LZMA_BACKWARD_SIZE_MIN&#160;:&#160;<a class="el" href="stream__flags_8h.html#ae8da8190f1396f66332073946bc45634">stream_flags.h</a></li>
+<li>lzma_block_header_size_decode&#160;:&#160;<a class="el" href="block_8h.html#ac025c940683a70f4c7f956bad814fd5f">block.h</a></li>
+<li>LZMA_CHECK_ID_MAX&#160;:&#160;<a class="el" href="check_8h.html#acd221ababe30230d9647aab469ad80cb">check.h</a></li>
+<li>LZMA_CHECK_SIZE_MAX&#160;:&#160;<a class="el" href="check_8h.html#a379e931cf86351ab1d97896cda9abbe0">check.h</a></li>
+<li>LZMA_CONCATENATED&#160;:&#160;<a class="el" href="container_8h.html#a563c84b5f368b3dd00d92ea903c5c33d">container.h</a></li>
+<li>LZMA_DELTA_DIST_MAX&#160;:&#160;<a class="el" href="delta_8h.html#afdf8a5ce184ddf9f8070de637775da94">delta.h</a></li>
+<li>LZMA_DELTA_DIST_MIN&#160;:&#160;<a class="el" href="delta_8h.html#a466886d9d01392f61bdf267687a4f96e">delta.h</a></li>
+<li>LZMA_FAIL_FAST&#160;:&#160;<a class="el" href="container_8h.html#aa1f469ed3d4b2eaf12f8081657efc9d5">container.h</a></li>
+<li>LZMA_FILTER_ARM&#160;:&#160;<a class="el" href="bcj_8h.html#a495a58f63ebc7a8b756099efba492f8b">bcj.h</a></li>
+<li>LZMA_FILTER_ARM64&#160;:&#160;<a class="el" href="bcj_8h.html#a01765158cd31cac21b272b180628fc4b">bcj.h</a></li>
+<li>LZMA_FILTER_ARMTHUMB&#160;:&#160;<a class="el" href="bcj_8h.html#a5ec62e7e5e7df3d9af5b2ea3f857689a">bcj.h</a></li>
+<li>LZMA_FILTER_DELTA&#160;:&#160;<a class="el" href="delta_8h.html#a7ced67235ad7a01ae31d32ecf1e634cb">delta.h</a></li>
+<li>LZMA_FILTER_IA64&#160;:&#160;<a class="el" href="bcj_8h.html#a2fe36218a38f400e1ce40820758f7427">bcj.h</a></li>
+<li>LZMA_FILTER_LZMA1&#160;:&#160;<a class="el" href="lzma12_8h.html#accedd16abcb758e7f748bac1102abda9">lzma12.h</a></li>
+<li>LZMA_FILTER_LZMA1EXT&#160;:&#160;<a class="el" href="lzma12_8h.html#a98a7fd42aa78a273a6b138629e46772d">lzma12.h</a></li>
+<li>LZMA_FILTER_LZMA2&#160;:&#160;<a class="el" href="lzma12_8h.html#a04f9d9a018a47cc99491e6e94e92f96b">lzma12.h</a></li>
+<li>LZMA_FILTER_POWERPC&#160;:&#160;<a class="el" href="bcj_8h.html#ab7f667d4a5d319f227f23163cbea086f">bcj.h</a></li>
+<li>LZMA_FILTER_SPARC&#160;:&#160;<a class="el" href="bcj_8h.html#a50941088e93ef659c6b000bbcaf58143">bcj.h</a></li>
+<li>LZMA_FILTER_X86&#160;:&#160;<a class="el" href="bcj_8h.html#aa9eac1f580ddde3309518cd153d596b1">bcj.h</a></li>
+<li>LZMA_FILTERS_MAX&#160;:&#160;<a class="el" href="filter_8h.html#ab33c0cc1728bf390e5b84f8bce1928ba">filter.h</a></li>
+<li>LZMA_IGNORE_CHECK&#160;:&#160;<a class="el" href="container_8h.html#a1289925ae1c63a8e86f69f3657118a4d">container.h</a></li>
+<li>LZMA_PRESET_DEFAULT&#160;:&#160;<a class="el" href="container_8h.html#af3ca20ff228b363a82515c1aee9e27bc">container.h</a></li>
+<li>LZMA_PRESET_EXTREME&#160;:&#160;<a class="el" href="container_8h.html#af524fe9af5737820fdadcd40a2c26deb">container.h</a></li>
+<li>LZMA_PRESET_LEVEL_MASK&#160;:&#160;<a class="el" href="container_8h.html#a97e40265e355a21bd2465aaa5b85f03d">container.h</a></li>
+<li>lzma_set_ext_size&#160;:&#160;<a class="el" href="lzma12_8h.html#a73ed0293db4e59d73a702d66fef537c3">lzma12.h</a></li>
+<li>LZMA_STR_ALL_FILTERS&#160;:&#160;<a class="el" href="filter_8h.html#a41aa51eeb53190404439c31d8e9c97cd">filter.h</a></li>
+<li>LZMA_STR_DECODER&#160;:&#160;<a class="el" href="filter_8h.html#a8a0f3fc03bdb84a294cdd53a98783104">filter.h</a></li>
+<li>LZMA_STR_ENCODER&#160;:&#160;<a class="el" href="filter_8h.html#a09a775f6a78d28ca136acfb51ad5fa02">filter.h</a></li>
+<li>LZMA_STR_GETOPT_LONG&#160;:&#160;<a class="el" href="filter_8h.html#a87e9ac4ae5829b092262223256141a29">filter.h</a></li>
+<li>LZMA_STR_NO_SPACES&#160;:&#160;<a class="el" href="filter_8h.html#ac0113c47caf98a735db2297936c5e857">filter.h</a></li>
+<li>LZMA_STR_NO_VALIDATION&#160;:&#160;<a class="el" href="filter_8h.html#adc33f4c0c7b5d3ae36acc0437a904339">filter.h</a></li>
+<li>LZMA_STREAM_HEADER_SIZE&#160;:&#160;<a class="el" href="stream__flags_8h.html#ada7e0a4f5e7146f547962cb9e9ef08ee">stream_flags.h</a></li>
+<li>LZMA_STREAM_INIT&#160;:&#160;<a class="el" href="base_8h.html#af31f0c8b6f14359cd082b9559f7f3e01">base.h</a></li>
+<li>LZMA_TELL_ANY_CHECK&#160;:&#160;<a class="el" href="container_8h.html#a0bdde702a77ff42b90a99c0bf4147b6b">container.h</a></li>
+<li>LZMA_TELL_NO_CHECK&#160;:&#160;<a class="el" href="container_8h.html#ada9cd20febb28b5ed6656de9184a86e9">container.h</a></li>
+<li>LZMA_TELL_UNSUPPORTED_CHECK&#160;:&#160;<a class="el" href="container_8h.html#ae21fb746037c82735d40d428c462e078">container.h</a></li>
+<li>LZMA_VERSION&#160;:&#160;<a class="el" href="version_8h.html#a156c47ff34aa0c2b726d0daf799f10a0">version.h</a></li>
+<li>LZMA_VERSION_COMMIT&#160;:&#160;<a class="el" href="version_8h.html#a7fd6169ff15ac7f01f94970359a331ea">version.h</a></li>
+<li>LZMA_VERSION_MAJOR&#160;:&#160;<a class="el" href="version_8h.html#aa0f450c9d3b0ff5f88b55888ed55701f">version.h</a></li>
+<li>LZMA_VERSION_MINOR&#160;:&#160;<a class="el" href="version_8h.html#af8fd295cf8aa349b0731423ad7a56134">version.h</a></li>
+<li>LZMA_VERSION_PATCH&#160;:&#160;<a class="el" href="version_8h.html#a8b550373cbff381f15d4308b852a3c2a">version.h</a></li>
+<li>LZMA_VERSION_STABILITY&#160;:&#160;<a class="el" href="version_8h.html#ae289abe5dcc203c7cda9f6a9a2f36b3a">version.h</a></li>
+<li>LZMA_VERSION_STRING&#160;:&#160;<a class="el" href="version_8h.html#a57bb143c993c305a53e9aade831a546c">version.h</a></li>
+<li>LZMA_VLI_BYTES_MAX&#160;:&#160;<a class="el" href="vli_8h.html#a063ecff4133aa2f8899b9fa3fdefd310">vli.h</a></li>
+<li>LZMA_VLI_C&#160;:&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">vli.h</a></li>
+<li>lzma_vli_is_valid&#160;:&#160;<a class="el" href="vli_8h.html#a4f67ed698215d865a2b87a95ab1320dd">vli.h</a></li>
+<li>LZMA_VLI_MAX&#160;:&#160;<a class="el" href="vli_8h.html#a7b782528bd1934db7c020adbedb20ec9">vli.h</a></li>
+<li>LZMA_VLI_UNKNOWN&#160;:&#160;<a class="el" href="vli_8h.html#a5a4b28254a30c859018b896ed371d69a">vli.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals_enum.html b/doc/api/globals_enum.html
new file mode 100644
index 0000000..1820871
--- /dev/null
+++ b/doc/api/globals_enum.html
@@ -0,0 +1,71 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li class="current"><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li><a href="globals.html"><span>All</span></a></li>
+ <li><a href="globals_func.html"><span>Functions</span></a></li>
+ <li><a href="globals_type.html"><span>Typedefs</span></a></li>
+ <li class="current"><a href="globals_enum.html"><span>Enumerations</span></a></li>
+ <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
+ <li><a href="globals_defs.html"><span>Macros</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented enums with links to the documentation:</div><ul>
+<li>lzma_action&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77e">base.h</a></li>
+<li>lzma_check&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">check.h</a></li>
+<li>lzma_delta_type&#160;:&#160;<a class="el" href="delta_8h.html#a04d84d7fa6cefdc219b6e2e96ff36fe1">delta.h</a></li>
+<li>lzma_index_iter_mode&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8">index.h</a></li>
+<li>lzma_match_finder&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma12.h</a></li>
+<li>lzma_mode&#160;:&#160;<a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma12.h</a></li>
+<li>lzma_reserved_enum&#160;:&#160;<a class="el" href="base_8h.html#a05805a07754b2aa22f7d443eb7ece41a">base.h</a></li>
+<li>lzma_ret&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">base.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals_eval.html b/doc/api/globals_eval.html
new file mode 100644
index 0000000..51424c7
--- /dev/null
+++ b/doc/api/globals_eval.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li class="current"><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li><a href="globals.html"><span>All</span></a></li>
+ <li><a href="globals_func.html"><span>Functions</span></a></li>
+ <li><a href="globals_type.html"><span>Typedefs</span></a></li>
+ <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+ <li class="current"><a href="globals_eval.html"><span>Enumerator</span></a></li>
+ <li><a href="globals_defs.html"><span>Macros</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow4" class="tabs3">
+ <ul class="tablist">
+ <li class="current"><a href="#index_l"><span>l</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented enum values with links to the documentation:</div>
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>LZMA_BUF_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea9ca0ecb62459bdc84d6af47d16b23ae5">base.h</a></li>
+<li>LZMA_CHECK_CRC32&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa0be65014a40b5cb4ab32252b3709bef7">check.h</a></li>
+<li>LZMA_CHECK_CRC64&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa87b4b0697a1e1ccb6766dd5c2fa24afc">check.h</a></li>
+<li>LZMA_CHECK_NONE&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3fa7b9851d75abfabc08d7fc5b4aaeb6f20">check.h</a></li>
+<li>LZMA_CHECK_SHA256&#160;:&#160;<a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3faf26a55ddd204a50ae87ec3432e7bc309">check.h</a></li>
+<li>LZMA_DATA_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea3aa72729a844790e39b4e1101a731dfb">base.h</a></li>
+<li>LZMA_FINISH&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea7d24fb3c6c144d13bcb091195b8ebec1">base.h</a></li>
+<li>LZMA_FORMAT_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea63b7a58949854eb9307f8e351358d56c">base.h</a></li>
+<li>LZMA_FULL_BARRIER&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77eaf7bf60e3555a4d10ffad3ecc3d2e01f1">base.h</a></li>
+<li>LZMA_FULL_FLUSH&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77eaab46f0d7c721f1ec377e9575eab2586f">base.h</a></li>
+<li>LZMA_GET_CHECK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa5b648c18da0f584f621cfdf7fef1bdb">base.h</a></li>
+<li>LZMA_INDEX_ITER_ANY&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8af46f6e5c414471c7c96586f380e48315">index.h</a></li>
+<li>LZMA_INDEX_ITER_BLOCK&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8a2702617d60d6fc15138a749e06ef3414">index.h</a></li>
+<li>LZMA_INDEX_ITER_NONEMPTY_BLOCK&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8aa49bf4d561d8f2c61d300edbb6c282c7">index.h</a></li>
+<li>LZMA_INDEX_ITER_STREAM&#160;:&#160;<a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8a5b31d985de1c823151acdd7e4a966fc9">index.h</a></li>
+<li>LZMA_MEM_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea567e1464feca03900a5425fb45b2f5b6">base.h</a></li>
+<li>LZMA_MEMLIMIT_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa1d705effe6026f32c0fe9756b6326bc">base.h</a></li>
+<li>LZMA_MF_BT2&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a7ab212446c3f6520f5c33ccfa4b3386a">lzma12.h</a></li>
+<li>LZMA_MF_BT3&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a983ecc59bf3e07a7c43fea551ea11865">lzma12.h</a></li>
+<li>LZMA_MF_BT4&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a468c32cdea9861d1ff98478364e6c547">lzma12.h</a></li>
+<li>LZMA_MF_HC3&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a6eb38f634021a192cada8a978b5de93b">lzma12.h</a></li>
+<li>LZMA_MF_HC4&#160;:&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a0944620f4949289c2ebde613cae12b04">lzma12.h</a></li>
+<li>LZMA_MODE_FAST&#160;:&#160;<a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866ac8c0926a91b4f756e11121efd30648cc">lzma12.h</a></li>
+<li>LZMA_MODE_NORMAL&#160;:&#160;<a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866ad37225f30d5cd21fc8bb3eaba283bbf9">lzma12.h</a></li>
+<li>LZMA_NO_CHECK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa720d30092d504d7d138a320db1905ef">base.h</a></li>
+<li>LZMA_OK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eac003781ccb81bbd5578e29abed8a8cfe">base.h</a></li>
+<li>LZMA_OPTIONS_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6eaa9ff6dfee36b7aba4fae60706d37425f">base.h</a></li>
+<li>LZMA_PROG_ERROR&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea2dac8d451cb38da8550653d0d7be4ec2">base.h</a></li>
+<li>LZMA_RUN&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea868472b76492afcaef54020a481890b1">base.h</a></li>
+<li>LZMA_SEEK_NEEDED&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea6cf28e5345851f13bd798a4eab8cc939">base.h</a></li>
+<li>LZMA_STREAM_END&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea91ecc6fab14c13ad36224afbcb4e55c4">base.h</a></li>
+<li>LZMA_SYNC_FLUSH&#160;:&#160;<a class="el" href="base_8h.html#aa92efcbf3cecfcac79c81fc645fce77ea14d75152afcda85d215e877fdd9c4170">base.h</a></li>
+<li>LZMA_UNSUPPORTED_CHECK&#160;:&#160;<a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6ea989f393a1772d85bf545a9da48fc7ac2">base.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals_func.html b/doc/api/globals_func.html
new file mode 100644
index 0000000..091e519
--- /dev/null
+++ b/doc/api/globals_func.html
@@ -0,0 +1,177 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li class="current"><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li><a href="globals.html"><span>All</span></a></li>
+ <li class="current"><a href="globals_func.html"><span>Functions</span></a></li>
+ <li><a href="globals_type.html"><span>Typedefs</span></a></li>
+ <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+ <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
+ <li><a href="globals_defs.html"><span>Macros</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow4" class="tabs3">
+ <ul class="tablist">
+ <li class="current"><a href="#index_l"><span>l</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented functions with links to the documentation:</div>
+
+<h3><a id="index_l" name="index_l"></a>- l -</h3><ul>
+<li>lzma_alone_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a5f43c3a1035e5a226dcd298f4162b861">container.h</a></li>
+<li>lzma_alone_encoder()&#160;:&#160;<a class="el" href="container_8h.html#a26fcc5bccdf3f862caa4c992d01e1a72">container.h</a></li>
+<li>lzma_auto_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a21cbebf2771617bb1e956385cfb353e3">container.h</a></li>
+<li>lzma_block_buffer_bound()&#160;:&#160;<a class="el" href="block_8h.html#a58ff73e2572b529f48cc590bfffe5b4f">block.h</a></li>
+<li>lzma_block_buffer_decode()&#160;:&#160;<a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f">block.h</a></li>
+<li>lzma_block_buffer_encode()&#160;:&#160;<a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54">block.h</a></li>
+<li>lzma_block_compressed_size()&#160;:&#160;<a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc">block.h</a></li>
+<li>lzma_block_decoder()&#160;:&#160;<a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92">block.h</a></li>
+<li>lzma_block_encoder()&#160;:&#160;<a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359">block.h</a></li>
+<li>lzma_block_header_decode()&#160;:&#160;<a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9">block.h</a></li>
+<li>lzma_block_header_encode()&#160;:&#160;<a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0">block.h</a></li>
+<li>lzma_block_header_size()&#160;:&#160;<a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd">block.h</a></li>
+<li>lzma_block_total_size()&#160;:&#160;<a class="el" href="block_8h.html#a694424f9dfdd5151e01debac1c501fa9">block.h</a></li>
+<li>lzma_block_uncomp_encode()&#160;:&#160;<a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c">block.h</a></li>
+<li>lzma_block_unpadded_size()&#160;:&#160;<a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30">block.h</a></li>
+<li>lzma_check_is_supported()&#160;:&#160;<a class="el" href="check_8h.html#ae9391ed2acfad0ce9357b68c608f07d8">check.h</a></li>
+<li>lzma_check_size()&#160;:&#160;<a class="el" href="check_8h.html#afd3fda19575d9d4f864c626c02b7cb48">check.h</a></li>
+<li>lzma_code()&#160;:&#160;<a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957">base.h</a></li>
+<li>lzma_cputhreads()&#160;:&#160;<a class="el" href="hardware_8h.html#a22f7a882b7a4b741a226abf62bdf46ca">hardware.h</a></li>
+<li>lzma_crc32()&#160;:&#160;<a class="el" href="check_8h.html#a760b569cce91bdd01e4ce9d78823c96d">check.h</a></li>
+<li>lzma_crc64()&#160;:&#160;<a class="el" href="check_8h.html#aff2e74ce671b9f82a96adb549c68cea2">check.h</a></li>
+<li>lzma_easy_buffer_encode()&#160;:&#160;<a class="el" href="container_8h.html#ac5e71f2711b57391186671967435faf2">container.h</a></li>
+<li>lzma_easy_decoder_memusage()&#160;:&#160;<a class="el" href="container_8h.html#a3562055d26c18fad067a7c7516eaddf5">container.h</a></li>
+<li>lzma_easy_encoder()&#160;:&#160;<a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4">container.h</a></li>
+<li>lzma_easy_encoder_memusage()&#160;:&#160;<a class="el" href="container_8h.html#a62c853cf7dbf008bdbd97b2685c3eabf">container.h</a></li>
+<li>lzma_end()&#160;:&#160;<a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308">base.h</a></li>
+<li>lzma_file_info_decoder()&#160;:&#160;<a class="el" href="index_8h.html#a7c5d77cf8532d95977d4571a1eb0a222">index.h</a></li>
+<li>lzma_filter_decoder_is_supported()&#160;:&#160;<a class="el" href="filter_8h.html#acab0c67bf5b3a76f2b474c8e1da98938">filter.h</a></li>
+<li>lzma_filter_encoder_is_supported()&#160;:&#160;<a class="el" href="filter_8h.html#a3db3c36cd6e57658a74c53e4daa2bef6">filter.h</a></li>
+<li>lzma_filter_flags_decode()&#160;:&#160;<a class="el" href="filter_8h.html#a4cba9a4c658cce0ff01fd102b31ea1a7">filter.h</a></li>
+<li>lzma_filter_flags_encode()&#160;:&#160;<a class="el" href="filter_8h.html#a96f23309bc21398fece18c00ebe7db98">filter.h</a></li>
+<li>lzma_filter_flags_size()&#160;:&#160;<a class="el" href="filter_8h.html#a996c9c21840ed54e37bd1f664a79d940">filter.h</a></li>
+<li>lzma_filters_copy()&#160;:&#160;<a class="el" href="filter_8h.html#a611fe1176eeeda187b1bd8aef45040aa">filter.h</a></li>
+<li>lzma_filters_free()&#160;:&#160;<a class="el" href="filter_8h.html#ae06979d219897f5f4c29cbc7a96a8892">filter.h</a></li>
+<li>lzma_filters_update()&#160;:&#160;<a class="el" href="filter_8h.html#a4a8fd969df001e449ebe4421ab33bba5">filter.h</a></li>
+<li>lzma_get_check()&#160;:&#160;<a class="el" href="check_8h.html#a8d7c3ffabfd024485f03fa209536c746">check.h</a></li>
+<li>lzma_get_progress()&#160;:&#160;<a class="el" href="base_8h.html#ab6447cd68eeecbd6b88f21daeb8ce751">base.h</a></li>
+<li>lzma_index_append()&#160;:&#160;<a class="el" href="index_8h.html#ac347747eb933c7c408e6c801b33becc3">index.h</a></li>
+<li>lzma_index_block_count()&#160;:&#160;<a class="el" href="index_8h.html#add1a8c506f67dbc19cae6747107e3bec">index.h</a></li>
+<li>lzma_index_buffer_decode()&#160;:&#160;<a class="el" href="index_8h.html#a028b8b8d59a413f9682eea1269a6ae8b">index.h</a></li>
+<li>lzma_index_buffer_encode()&#160;:&#160;<a class="el" href="index_8h.html#add1ef06dec8a26d08ae8651cff0fd8d6">index.h</a></li>
+<li>lzma_index_cat()&#160;:&#160;<a class="el" href="index_8h.html#abc4db36b4bd67af01819be9dd045c34a">index.h</a></li>
+<li>lzma_index_checks()&#160;:&#160;<a class="el" href="index_8h.html#af8d6528a04241841bd0a4322b0c57eaa">index.h</a></li>
+<li>lzma_index_decoder()&#160;:&#160;<a class="el" href="index_8h.html#abb56fd1d5914f8900ece7b88b78e5e23">index.h</a></li>
+<li>lzma_index_dup()&#160;:&#160;<a class="el" href="index_8h.html#a5161e3f67156577882e1d95dcb57e33e">index.h</a></li>
+<li>lzma_index_encoder()&#160;:&#160;<a class="el" href="index_8h.html#a6800d70f3b2afca085496460cd03211d">index.h</a></li>
+<li>lzma_index_end()&#160;:&#160;<a class="el" href="index_8h.html#a0c2d0009f07fc315d5ac89e4bcd25abd">index.h</a></li>
+<li>lzma_index_file_size()&#160;:&#160;<a class="el" href="index_8h.html#ac875ed47d35385e5dac461b25c5ea1c9">index.h</a></li>
+<li>lzma_index_hash_append()&#160;:&#160;<a class="el" href="index__hash_8h.html#a2bdbe4f0b5fa2fadb7528447feaaa97f">index_hash.h</a></li>
+<li>lzma_index_hash_decode()&#160;:&#160;<a class="el" href="index__hash_8h.html#a891eb955284c9117155f92eb0ddba44c">index_hash.h</a></li>
+<li>lzma_index_hash_end()&#160;:&#160;<a class="el" href="index__hash_8h.html#a7dacb41b9ec1c8df5d33dfdae97743b3">index_hash.h</a></li>
+<li>lzma_index_hash_init()&#160;:&#160;<a class="el" href="index__hash_8h.html#aaafae4967a4a266d97dc34a98bfcabfb">index_hash.h</a></li>
+<li>lzma_index_hash_size()&#160;:&#160;<a class="el" href="index__hash_8h.html#a0f8ab3b57b117f9547866156755c917f">index_hash.h</a></li>
+<li>lzma_index_init()&#160;:&#160;<a class="el" href="index_8h.html#a0850627d011111326d4278a3e2edec25">index.h</a></li>
+<li>lzma_index_iter_init()&#160;:&#160;<a class="el" href="index_8h.html#aa78f02f18ed29d289a6ef37b8ea98a21">index.h</a></li>
+<li>lzma_index_iter_locate()&#160;:&#160;<a class="el" href="index_8h.html#ac4f56df9d210712e5d7add5502c9eb93">index.h</a></li>
+<li>lzma_index_iter_next()&#160;:&#160;<a class="el" href="index_8h.html#af428522e1b3eef137c65c5a01f766e0e">index.h</a></li>
+<li>lzma_index_iter_rewind()&#160;:&#160;<a class="el" href="index_8h.html#ae81438be8deff4894b104e65d8acdd24">index.h</a></li>
+<li>lzma_index_memusage()&#160;:&#160;<a class="el" href="index_8h.html#a880def3727ecdd7f242807083d228fc5">index.h</a></li>
+<li>lzma_index_memused()&#160;:&#160;<a class="el" href="index_8h.html#a4118805ac7be6618aca6d6d7e5e4dde7">index.h</a></li>
+<li>lzma_index_size()&#160;:&#160;<a class="el" href="index_8h.html#a669ed1a82b1941217cfbb07e7826afc2">index.h</a></li>
+<li>lzma_index_stream_count()&#160;:&#160;<a class="el" href="index_8h.html#afd159a765b09b0cf79186069a848d07e">index.h</a></li>
+<li>lzma_index_stream_flags()&#160;:&#160;<a class="el" href="index_8h.html#a79a19669237f19f0b11c9f3be80a62b4">index.h</a></li>
+<li>lzma_index_stream_padding()&#160;:&#160;<a class="el" href="index_8h.html#a3ed82f96c688f3c953f6509b6f4e2ef3">index.h</a></li>
+<li>lzma_index_stream_size()&#160;:&#160;<a class="el" href="index_8h.html#af3630369b43c9ccc906065d759b49663">index.h</a></li>
+<li>lzma_index_total_size()&#160;:&#160;<a class="el" href="index_8h.html#a7829942b83ee1fa5b6443cc248b81041">index.h</a></li>
+<li>lzma_index_uncompressed_size()&#160;:&#160;<a class="el" href="index_8h.html#a620fe6317f1f9d7af9cc27c748bf07d6">index.h</a></li>
+<li>lzma_lzip_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a97689f5709e0db1e2dac450f5ce4e5eb">container.h</a></li>
+<li>lzma_lzma_preset()&#160;:&#160;<a class="el" href="lzma12_8h.html#aa62c28944fe3575653a4c25780400d77">lzma12.h</a></li>
+<li>lzma_memlimit_get()&#160;:&#160;<a class="el" href="base_8h.html#ac871bc2ead5d482c6d6b3d51bfec365c">base.h</a></li>
+<li>lzma_memlimit_set()&#160;:&#160;<a class="el" href="base_8h.html#afc49d4cf75b73128a167df3407505f7b">base.h</a></li>
+<li>lzma_memusage()&#160;:&#160;<a class="el" href="base_8h.html#a418b210cf206782a73cd9de7dc27f670">base.h</a></li>
+<li>lzma_mf_is_supported()&#160;:&#160;<a class="el" href="lzma12_8h.html#aefba1f7214ddcf8cd408a0702e8642b5">lzma12.h</a></li>
+<li>lzma_microlzma_decoder()&#160;:&#160;<a class="el" href="container_8h.html#aa8372dae3e7c907c36f7bb5426aeacdf">container.h</a></li>
+<li>lzma_microlzma_encoder()&#160;:&#160;<a class="el" href="container_8h.html#abfc8f11acf837b167aa94b7071b54c30">container.h</a></li>
+<li>lzma_mode_is_supported()&#160;:&#160;<a class="el" href="lzma12_8h.html#ad1add1c2600fdbb3d737e4fb3465dfcb">lzma12.h</a></li>
+<li>lzma_physmem()&#160;:&#160;<a class="el" href="hardware_8h.html#a85363e453b34272a9f26c9fdffb041ee">hardware.h</a></li>
+<li>lzma_properties_decode()&#160;:&#160;<a class="el" href="filter_8h.html#a88d2e864b2039ac82802cc202278d478">filter.h</a></li>
+<li>lzma_properties_encode()&#160;:&#160;<a class="el" href="filter_8h.html#a8e00887086df5a44084ac22e48415de3">filter.h</a></li>
+<li>lzma_properties_size()&#160;:&#160;<a class="el" href="filter_8h.html#aee038818cf7bbe044c3f7a7c86998c1b">filter.h</a></li>
+<li>lzma_raw_buffer_decode()&#160;:&#160;<a class="el" href="filter_8h.html#a3b942df507e4f9a6d7525e5a4c6864e5">filter.h</a></li>
+<li>lzma_raw_buffer_encode()&#160;:&#160;<a class="el" href="filter_8h.html#a226724ab3391b410281fdf656cc7c432">filter.h</a></li>
+<li>lzma_raw_decoder()&#160;:&#160;<a class="el" href="filter_8h.html#ae77b3b6c5eccd9d77bbafef0a8a203c1">filter.h</a></li>
+<li>lzma_raw_decoder_memusage()&#160;:&#160;<a class="el" href="filter_8h.html#a58511249ae9206d7de7c5d1f05842297">filter.h</a></li>
+<li>lzma_raw_encoder()&#160;:&#160;<a class="el" href="filter_8h.html#a2368e4129032345eb0738b0c6e085703">filter.h</a></li>
+<li>lzma_raw_encoder_memusage()&#160;:&#160;<a class="el" href="filter_8h.html#a730f9391e85a5979bcd1b32643ae7176">filter.h</a></li>
+<li>lzma_str_from_filters()&#160;:&#160;<a class="el" href="filter_8h.html#a7deeb86ef59a9111b8033681290e0fb0">filter.h</a></li>
+<li>lzma_str_list_filters()&#160;:&#160;<a class="el" href="filter_8h.html#ab51585b68796ce0270f87e615b923809">filter.h</a></li>
+<li>lzma_str_to_filters()&#160;:&#160;<a class="el" href="filter_8h.html#aa042cf11749bc2183b27de1c3142da30">filter.h</a></li>
+<li>lzma_stream_buffer_bound()&#160;:&#160;<a class="el" href="container_8h.html#a66d4366a47b8332bff2a512f44f5c45e">container.h</a></li>
+<li>lzma_stream_buffer_decode()&#160;:&#160;<a class="el" href="container_8h.html#aa58f237f6cea97ef0eb9bf5c37a3008d">container.h</a></li>
+<li>lzma_stream_buffer_encode()&#160;:&#160;<a class="el" href="container_8h.html#a6e645ccaeace3b13a6981e03c6e190ad">container.h</a></li>
+<li>lzma_stream_decoder()&#160;:&#160;<a class="el" href="container_8h.html#a02b7683ef98d8049788961370a8b28c0">container.h</a></li>
+<li>lzma_stream_decoder_mt()&#160;:&#160;<a class="el" href="container_8h.html#a7179d178e6430c10e2006a467921e98e">container.h</a></li>
+<li>lzma_stream_encoder()&#160;:&#160;<a class="el" href="container_8h.html#a1a97aec94c9fedd7646cfa51c4f4cd52">container.h</a></li>
+<li>lzma_stream_encoder_mt()&#160;:&#160;<a class="el" href="container_8h.html#a3f8793518711ee84d1abf12ea3aaba42">container.h</a></li>
+<li>lzma_stream_encoder_mt_memusage()&#160;:&#160;<a class="el" href="container_8h.html#ad7cf41496d77f4d346e006b26ed8e101">container.h</a></li>
+<li>lzma_stream_flags_compare()&#160;:&#160;<a class="el" href="stream__flags_8h.html#a3e25ca4205021302882a696283d45263">stream_flags.h</a></li>
+<li>lzma_stream_footer_decode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#aa92a383f85753bb79ee23227fa68186c">stream_flags.h</a></li>
+<li>lzma_stream_footer_encode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#a438249a75ea8da952a7474b92bfe7b7a">stream_flags.h</a></li>
+<li>lzma_stream_header_decode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#ae03198e464f0d296e601ff841e100805">stream_flags.h</a></li>
+<li>lzma_stream_header_encode()&#160;:&#160;<a class="el" href="stream__flags_8h.html#a2ebb8d6dff23daeb3de398913b845eff">stream_flags.h</a></li>
+<li>lzma_version_number()&#160;:&#160;<a class="el" href="version_8h.html#a72f929c9b9e8e730b790b3f8c80c3c80">version.h</a></li>
+<li>lzma_version_string()&#160;:&#160;<a class="el" href="version_8h.html#a8998c1d8b4b5c2c1218bdfd58fdb1baa">version.h</a></li>
+<li>lzma_vli_decode()&#160;:&#160;<a class="el" href="vli_8h.html#a7b7d50e1074e0e2bcd81c29a5f7461c7">vli.h</a></li>
+<li>lzma_vli_encode()&#160;:&#160;<a class="el" href="vli_8h.html#a50bbb77e9ec3b72c25586aa700c20970">vli.h</a></li>
+<li>lzma_vli_size()&#160;:&#160;<a class="el" href="vli_8h.html#a8d53e0b69934b43da8721fa6f1e8cc4f">vli.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/globals_type.html b/doc/api/globals_type.html
new file mode 100644
index 0000000..cd7aa3f
--- /dev/null
+++ b/doc/api/globals_type.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): Globals</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li class="current"><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow3" class="tabs2">
+ <ul class="tablist">
+ <li><a href="globals.html"><span>All</span></a></li>
+ <li><a href="globals_func.html"><span>Functions</span></a></li>
+ <li class="current"><a href="globals_type.html"><span>Typedefs</span></a></li>
+ <li><a href="globals_enum.html"><span>Enumerations</span></a></li>
+ <li><a href="globals_eval.html"><span>Enumerator</span></a></li>
+ <li><a href="globals_defs.html"><span>Macros</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="contents">
+<div class="textblock">Here is a list of all documented typedefs with links to the documentation:</div><ul>
+<li>lzma_bool&#160;:&#160;<a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">base.h</a></li>
+<li>lzma_index&#160;:&#160;<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">index.h</a></li>
+<li>lzma_index_hash&#160;:&#160;<a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">index_hash.h</a></li>
+<li>lzma_internal&#160;:&#160;<a class="el" href="base_8h.html#ab1a60127c640135687a5bcc232cec906">base.h</a></li>
+<li>lzma_vli&#160;:&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">vli.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/hardware_8h.html b/doc/api/hardware_8h.html
new file mode 100644
index 0000000..fd302e2
--- /dev/null
+++ b/doc/api/hardware_8h.html
@@ -0,0 +1,123 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/hardware.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">hardware.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Hardware information.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a85363e453b34272a9f26c9fdffb041ee"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8h.html#a85363e453b34272a9f26c9fdffb041ee">lzma_physmem</a> (void) lzma_nothrow</td></tr>
+<tr class="memdesc:a85363e453b34272a9f26c9fdffb041ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total amount of physical memory (RAM) in bytes. <br /></td></tr>
+<tr class="separator:a85363e453b34272a9f26c9fdffb041ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a22f7a882b7a4b741a226abf62bdf46ca"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="hardware_8h.html#a22f7a882b7a4b741a226abf62bdf46ca">lzma_cputhreads</a> (void) lzma_nothrow</td></tr>
+<tr class="memdesc:a22f7a882b7a4b741a226abf62bdf46ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of processor cores or threads. <br /></td></tr>
+<tr class="separator:a22f7a882b7a4b741a226abf62bdf46ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Hardware information. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead.</dd></dl>
+<p>Since liblzma can consume a lot of system resources, it also provides ways to limit the resource usage. Applications linking against liblzma need to do the actual decisions how much resources to let liblzma to use. To ease making these decisions, liblzma provides functions to find out the relevant capabilities of the underlying hardware. Currently there is only a function to find out the amount of RAM, but in the future there will be also a function to detect how many concurrent threads the system can run.</p>
+<dl class="section note"><dt>Note</dt><dd>On some operating systems, these function may temporarily load a shared library or open file descriptor(s) to find out the requested hardware information. Unless the application assumes that specific file descriptors are not touched by other threads, this should have no effect on thread safety. Possible operations involving file descriptors will restart the syscalls if they return EINTR. </dd></dl>
+</div><h2 class="groupheader">Function Documentation</h2>
+<a id="a85363e453b34272a9f26c9fdffb041ee" name="a85363e453b34272a9f26c9fdffb041ee"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a85363e453b34272a9f26c9fdffb041ee">&#9670;&#160;</a></span>lzma_physmem()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_physmem </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the total amount of physical memory (RAM) in bytes. </p>
+<p>This function may be useful when determining a reasonable memory usage limit for decompressing or how much memory it is OK to use for compressing.</p>
+<dl class="section return"><dt>Returns</dt><dd>On success, the total amount of physical memory in bytes is returned. If the amount of RAM cannot be determined, zero is returned. This can happen if an error occurs or if there is no code in liblzma to detect the amount of RAM on the specific operating system. </dd></dl>
+
+</div>
+</div>
+<a id="a22f7a882b7a4b741a226abf62bdf46ca" name="a22f7a882b7a4b741a226abf62bdf46ca"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a22f7a882b7a4b741a226abf62bdf46ca">&#9670;&#160;</a></span>lzma_cputhreads()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_cputhreads </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the number of processor cores or threads. </p>
+<p>This function may be useful when determining how many threads to use. If the hardware supports more than one thread per CPU core, the number of hardware threads is returned if that information is available.</p>
+<dl class="section return"><dt>Returns</dt><dd>On success, the number of available CPU threads or cores is returned. If this information isn't available or an error occurs, zero is returned. </dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/index.html b/doc/api/index.html
new file mode 100644
index 0000000..b3f8cce
--- /dev/null
+++ b/doc/api/index.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): liblzma (XZ Utils)</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div><div class="header">
+ <div class="headertitle"><div class="title">liblzma (XZ Utils) </div></div>
+</div><!--header-->
+<div class="contents">
+<div class="textblock"><p>liblzma is a public domain general-purpose data compression library with a zlib-like API. The native file format is .xz, but also the old .lzma format and raw (no headers) streams are supported. Multiple compression algorithms (filters) are supported. Currently LZMA2 is the primary filter.</p>
+<p>liblzma is part of XZ Utils <a href="https://tukaani.org/xz/">https://tukaani.org/xz/</a>. XZ Utils includes a gzip-like command line tool named xz and some other tools. XZ Utils is developed and maintained by Lasse Collin and Jia Tan.</p>
+<p>Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK <a href="https://7-zip.org/sdk.html">https://7-zip.org/sdk.html</a>.</p>
+<p>The SHA-256 implementation is based on the public domain code found from 7-Zip <a href="https://7-zip.org/">https://7-zip.org/</a>, which has a modified version of the public domain SHA-256 code found from Crypto++ <a href="https://www.cryptopp.com/">https://www.cryptopp.com/</a>. The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai. </p>
+</div></div><!-- PageDoc -->
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/index_8h.html b/doc/api/index_8h.html
new file mode 100644
index 0000000..f0de050
--- /dev/null
+++ b/doc/api/index_8h.html
@@ -0,0 +1,1268 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/index.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">index.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Handling of .xz Index and related information.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__index__iter.html">lzma_index_iter</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterator to get information about Blocks and Streams. <a href="structlzma__index__iter.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:afc18c1443b3b9aa0d146b44e8755b62e"><td class="memItemLeft" align="right" valign="top">typedef struct lzma_index_s&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a></td></tr>
+<tr class="memdesc:afc18c1443b3b9aa0d146b44e8755b62e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque data type to hold the Index(es) and other information. <br /></td></tr>
+<tr class="separator:afc18c1443b3b9aa0d146b44e8755b62e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:a712b43192d944bf2f767711343cd9ca8"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8">lzma_index_iter_mode</a> { <a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8af46f6e5c414471c7c96586f380e48315">LZMA_INDEX_ITER_ANY</a> = 0
+, <a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8a5b31d985de1c823151acdd7e4a966fc9">LZMA_INDEX_ITER_STREAM</a> = 1
+, <a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8a2702617d60d6fc15138a749e06ef3414">LZMA_INDEX_ITER_BLOCK</a> = 2
+, <a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8aa49bf4d561d8f2c61d300edbb6c282c7">LZMA_INDEX_ITER_NONEMPTY_BLOCK</a> = 3
+ }</td></tr>
+<tr class="memdesc:a712b43192d944bf2f767711343cd9ca8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Operation mode for <a class="el" href="index_8h.html#af428522e1b3eef137c65c5a01f766e0e" title="Get the next Block or Stream.">lzma_index_iter_next()</a> <a href="index_8h.html#a712b43192d944bf2f767711343cd9ca8">More...</a><br /></td></tr>
+<tr class="separator:a712b43192d944bf2f767711343cd9ca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a880def3727ecdd7f242807083d228fc5"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a880def3727ecdd7f242807083d228fc5">lzma_index_memusage</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> streams, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> blocks) lzma_nothrow</td></tr>
+<tr class="memdesc:a880def3727ecdd7f242807083d228fc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate memory usage of lzma_index. <br /></td></tr>
+<tr class="separator:a880def3727ecdd7f242807083d228fc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4118805ac7be6618aca6d6d7e5e4dde7"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a4118805ac7be6618aca6d6d7e5e4dde7">lzma_index_memused</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow</td></tr>
+<tr class="memdesc:a4118805ac7be6618aca6d6d7e5e4dde7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the memory usage of an existing lzma_index. <br /></td></tr>
+<tr class="separator:a4118805ac7be6618aca6d6d7e5e4dde7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0850627d011111326d4278a3e2edec25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a0850627d011111326d4278a3e2edec25">lzma_index_init</a> (const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow</td></tr>
+<tr class="memdesc:a0850627d011111326d4278a3e2edec25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate and initialize a new lzma_index structure. <br /></td></tr>
+<tr class="separator:a0850627d011111326d4278a3e2edec25"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0c2d0009f07fc315d5ac89e4bcd25abd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a0c2d0009f07fc315d5ac89e4bcd25abd">lzma_index_end</a> (<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow</td></tr>
+<tr class="memdesc:a0c2d0009f07fc315d5ac89e4bcd25abd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocate lzma_index. <br /></td></tr>
+<tr class="separator:a0c2d0009f07fc315d5ac89e4bcd25abd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac347747eb933c7c408e6c801b33becc3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#ac347747eb933c7c408e6c801b33becc3">lzma_index_append</a> (<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> unpadded_size, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:ac347747eb933c7c408e6c801b33becc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new Block to lzma_index. <br /></td></tr>
+<tr class="separator:ac347747eb933c7c408e6c801b33becc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a79a19669237f19f0b11c9f3be80a62b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a79a19669237f19f0b11c9f3be80a62b4">lzma_index_stream_flags</a> (<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i, const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *stream_flags) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a79a19669237f19f0b11c9f3be80a62b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Stream Flags. <br /></td></tr>
+<tr class="separator:a79a19669237f19f0b11c9f3be80a62b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af8d6528a04241841bd0a4322b0c57eaa"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#af8d6528a04241841bd0a4322b0c57eaa">lzma_index_checks</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:af8d6528a04241841bd0a4322b0c57eaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the types of integrity Checks. <br /></td></tr>
+<tr class="separator:af8d6528a04241841bd0a4322b0c57eaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3ed82f96c688f3c953f6509b6f4e2ef3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a3ed82f96c688f3c953f6509b6f4e2ef3">lzma_index_stream_padding</a> (<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> stream_padding) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a3ed82f96c688f3c953f6509b6f4e2ef3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the amount of Stream Padding. <br /></td></tr>
+<tr class="separator:a3ed82f96c688f3c953f6509b6f4e2ef3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afd159a765b09b0cf79186069a848d07e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#afd159a765b09b0cf79186069a848d07e">lzma_index_stream_count</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:afd159a765b09b0cf79186069a848d07e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of Streams. <br /></td></tr>
+<tr class="separator:afd159a765b09b0cf79186069a848d07e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:add1a8c506f67dbc19cae6747107e3bec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#add1a8c506f67dbc19cae6747107e3bec">lzma_index_block_count</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:add1a8c506f67dbc19cae6747107e3bec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of Blocks. <br /></td></tr>
+<tr class="separator:add1a8c506f67dbc19cae6747107e3bec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a669ed1a82b1941217cfbb07e7826afc2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a669ed1a82b1941217cfbb07e7826afc2">lzma_index_size</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a669ed1a82b1941217cfbb07e7826afc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the Index field as bytes. <br /></td></tr>
+<tr class="separator:a669ed1a82b1941217cfbb07e7826afc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af3630369b43c9ccc906065d759b49663"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#af3630369b43c9ccc906065d759b49663">lzma_index_stream_size</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:af3630369b43c9ccc906065d759b49663"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total size of the Stream. <br /></td></tr>
+<tr class="separator:af3630369b43c9ccc906065d759b49663"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7829942b83ee1fa5b6443cc248b81041"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a7829942b83ee1fa5b6443cc248b81041">lzma_index_total_size</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a7829942b83ee1fa5b6443cc248b81041"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total size of the Blocks. <br /></td></tr>
+<tr class="separator:a7829942b83ee1fa5b6443cc248b81041"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac875ed47d35385e5dac461b25c5ea1c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#ac875ed47d35385e5dac461b25c5ea1c9">lzma_index_file_size</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:ac875ed47d35385e5dac461b25c5ea1c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total size of the file. <br /></td></tr>
+<tr class="separator:ac875ed47d35385e5dac461b25c5ea1c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a620fe6317f1f9d7af9cc27c748bf07d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a620fe6317f1f9d7af9cc27c748bf07d6">lzma_index_uncompressed_size</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a620fe6317f1f9d7af9cc27c748bf07d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the uncompressed size of the file. <br /></td></tr>
+<tr class="separator:a620fe6317f1f9d7af9cc27c748bf07d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa78f02f18ed29d289a6ef37b8ea98a21"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#aa78f02f18ed29d289a6ef37b8ea98a21">lzma_index_iter_init</a> (<a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *iter, const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow</td></tr>
+<tr class="memdesc:aa78f02f18ed29d289a6ef37b8ea98a21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize an iterator. <br /></td></tr>
+<tr class="separator:aa78f02f18ed29d289a6ef37b8ea98a21"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae81438be8deff4894b104e65d8acdd24"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#ae81438be8deff4894b104e65d8acdd24">lzma_index_iter_rewind</a> (<a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *iter) lzma_nothrow</td></tr>
+<tr class="memdesc:ae81438be8deff4894b104e65d8acdd24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rewind the iterator. <br /></td></tr>
+<tr class="separator:ae81438be8deff4894b104e65d8acdd24"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af428522e1b3eef137c65c5a01f766e0e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#af428522e1b3eef137c65c5a01f766e0e">lzma_index_iter_next</a> (<a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *iter, <a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8">lzma_index_iter_mode</a> mode) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:af428522e1b3eef137c65c5a01f766e0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next Block or Stream. <br /></td></tr>
+<tr class="separator:af428522e1b3eef137c65c5a01f766e0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac4f56df9d210712e5d7add5502c9eb93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#ac4f56df9d210712e5d7add5502c9eb93">lzma_index_iter_locate</a> (<a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *iter, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> target) lzma_nothrow</td></tr>
+<tr class="memdesc:ac4f56df9d210712e5d7add5502c9eb93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Locate a Block. <br /></td></tr>
+<tr class="separator:ac4f56df9d210712e5d7add5502c9eb93"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abc4db36b4bd67af01819be9dd045c34a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#abc4db36b4bd67af01819be9dd045c34a">lzma_index_cat</a> (<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *dest, <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *src, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:abc4db36b4bd67af01819be9dd045c34a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Concatenate lzma_indexes. <br /></td></tr>
+<tr class="separator:abc4db36b4bd67af01819be9dd045c34a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5161e3f67156577882e1d95dcb57e33e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a5161e3f67156577882e1d95dcb57e33e">lzma_index_dup</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a5161e3f67156577882e1d95dcb57e33e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Duplicate lzma_index. <br /></td></tr>
+<tr class="separator:a5161e3f67156577882e1d95dcb57e33e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6800d70f3b2afca085496460cd03211d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a6800d70f3b2afca085496460cd03211d">lzma_index_encoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a6800d70f3b2afca085496460cd03211d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .xz Index encoder. <br /></td></tr>
+<tr class="separator:a6800d70f3b2afca085496460cd03211d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abb56fd1d5914f8900ece7b88b78e5e23"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#abb56fd1d5914f8900ece7b88b78e5e23">lzma_index_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> **i, uint64_t memlimit) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:abb56fd1d5914f8900ece7b88b78e5e23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize .xz Index decoder. <br /></td></tr>
+<tr class="separator:abb56fd1d5914f8900ece7b88b78e5e23"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:add1ef06dec8a26d08ae8651cff0fd8d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#add1ef06dec8a26d08ae8651cff0fd8d6">lzma_index_buffer_encode</a> (const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *i, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow</td></tr>
+<tr class="memdesc:add1ef06dec8a26d08ae8651cff0fd8d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call .xz Index encoder. <br /></td></tr>
+<tr class="separator:add1ef06dec8a26d08ae8651cff0fd8d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a028b8b8d59a413f9682eea1269a6ae8b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a028b8b8d59a413f9682eea1269a6ae8b">lzma_index_buffer_decode</a> (<a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> **i, uint64_t *memlimit, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a028b8b8d59a413f9682eea1269a6ae8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Single-call .xz Index decoder. <br /></td></tr>
+<tr class="separator:a028b8b8d59a413f9682eea1269a6ae8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7c5d77cf8532d95977d4571a1eb0a222"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index_8h.html#a7c5d77cf8532d95977d4571a1eb0a222">lzma_file_info_decoder</a> (<a class="el" href="structlzma__stream.html">lzma_stream</a> *strm, <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> **dest_index, uint64_t memlimit, uint64_t file_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a7c5d77cf8532d95977d4571a1eb0a222"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a .xz file information decoder. <br /></td></tr>
+<tr class="separator:a7c5d77cf8532d95977d4571a1eb0a222"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Handling of .xz Index and related information. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Typedef Documentation</h2>
+<a id="afc18c1443b3b9aa0d146b44e8755b62e" name="afc18c1443b3b9aa0d146b44e8755b62e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afc18c1443b3b9aa0d146b44e8755b62e">&#9670;&#160;</a></span>lzma_index</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef struct lzma_index_s <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Opaque data type to hold the Index(es) and other information. </p>
+<p>lzma_index often holds just one .xz Index and possibly the Stream Flags of the same Stream and size of the Stream Padding field. However, multiple lzma_indexes can be concatenated with <a class="el" href="index_8h.html#abc4db36b4bd67af01819be9dd045c34a" title="Concatenate lzma_indexes.">lzma_index_cat()</a> and then there may be information about multiple Streams in the same lzma_index.</p>
+<p>Notes about thread safety: Only one thread may modify lzma_index at a time. All functions that take non-const pointer to lzma_index modify it. As long as no thread is modifying the lzma_index, getting information from the same lzma_index can be done from multiple threads at the same time with functions that take a const pointer to lzma_index or use <a class="el" href="structlzma__index__iter.html" title="Iterator to get information about Blocks and Streams.">lzma_index_iter</a>. The same iterator must be used only by one thread at a time, of course, but there can be as many iterators for the same lzma_index as needed. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="a712b43192d944bf2f767711343cd9ca8" name="a712b43192d944bf2f767711343cd9ca8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a712b43192d944bf2f767711343cd9ca8">&#9670;&#160;</a></span>lzma_index_iter_mode</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8">lzma_index_iter_mode</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Operation mode for <a class="el" href="index_8h.html#af428522e1b3eef137c65c5a01f766e0e" title="Get the next Block or Stream.">lzma_index_iter_next()</a> </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a712b43192d944bf2f767711343cd9ca8af46f6e5c414471c7c96586f380e48315" name="a712b43192d944bf2f767711343cd9ca8af46f6e5c414471c7c96586f380e48315"></a>LZMA_INDEX_ITER_ANY&#160;</td><td class="fielddoc"><p>Get the next Block or Stream. </p>
+<p>Go to the next Block if the current Stream has at least one Block left. Otherwise go to the next Stream even if it has no Blocks. If the Stream has no Blocks (lzma_index_iter.stream.block_count == 0), lzma_index_iter.block will have undefined values. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a712b43192d944bf2f767711343cd9ca8a5b31d985de1c823151acdd7e4a966fc9" name="a712b43192d944bf2f767711343cd9ca8a5b31d985de1c823151acdd7e4a966fc9"></a>LZMA_INDEX_ITER_STREAM&#160;</td><td class="fielddoc"><p>Get the next Stream. </p>
+<p>Go to the next Stream even if the current Stream has unread Blocks left. If the next Stream has at least one Block, the iterator will point to the first Block. If there are no Blocks, lzma_index_iter.block will have undefined values. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a712b43192d944bf2f767711343cd9ca8a2702617d60d6fc15138a749e06ef3414" name="a712b43192d944bf2f767711343cd9ca8a2702617d60d6fc15138a749e06ef3414"></a>LZMA_INDEX_ITER_BLOCK&#160;</td><td class="fielddoc"><p>Get the next Block. </p>
+<p>Go to the next Block if the current Stream has at least one Block left. If the current Stream has no Blocks left, the next Stream with at least one Block is located and the iterator will be made to point to the first Block of that Stream. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a712b43192d944bf2f767711343cd9ca8aa49bf4d561d8f2c61d300edbb6c282c7" name="a712b43192d944bf2f767711343cd9ca8aa49bf4d561d8f2c61d300edbb6c282c7"></a>LZMA_INDEX_ITER_NONEMPTY_BLOCK&#160;</td><td class="fielddoc"><p>Get the next non-empty Block. </p>
+<p>This is like LZMA_INDEX_ITER_BLOCK except that it will skip Blocks whose Uncompressed Size is zero. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a880def3727ecdd7f242807083d228fc5" name="a880def3727ecdd7f242807083d228fc5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a880def3727ecdd7f242807083d228fc5">&#9670;&#160;</a></span>lzma_index_memusage()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_index_memusage </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>streams</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>blocks</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate memory usage of lzma_index. </p>
+<p>On disk, the size of the Index field depends on both the number of Records stored and the size of the Records (due to variable-length integer encoding). When the Index is kept in lzma_index structure, the memory usage depends only on the number of Records/Blocks stored in the Index(es), and in case of concatenated lzma_indexes, the number of Streams. The size in RAM is almost always significantly bigger than in the encoded form on disk.</p>
+<p>This function calculates an approximate amount of memory needed to hold the given number of Streams and Blocks in lzma_index structure. This value may vary between CPU architectures and also between liblzma versions if the internal implementation is modified.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">streams</td><td>Number of Streams </td></tr>
+ <tr><td class="paramname">blocks</td><td>Number of Blocks</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Approximate memory in bytes needed in a lzma_index structure. </dd></dl>
+
+</div>
+</div>
+<a id="a4118805ac7be6618aca6d6d7e5e4dde7" name="a4118805ac7be6618aca6d6d7e5e4dde7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4118805ac7be6618aca6d6d7e5e4dde7">&#9670;&#160;</a></span>lzma_index_memused()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_index_memused </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Calculate the memory usage of an existing lzma_index. </p>
+<p>This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i), lzma_index_block_count(i)).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Approximate memory in bytes used by the lzma_index structure. </dd></dl>
+
+</div>
+</div>
+<a id="a0850627d011111326d4278a3e2edec25" name="a0850627d011111326d4278a3e2edec25"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0850627d011111326d4278a3e2edec25">&#9670;&#160;</a></span>lzma_index_init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> * lzma_index_init </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Allocate and initialize a new lzma_index structure. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>On success, a pointer to an empty initialized lzma_index is returned. If allocation fails, NULL is returned. </dd></dl>
+
+</div>
+</div>
+<a id="a0c2d0009f07fc315d5ac89e4bcd25abd" name="a0c2d0009f07fc315d5ac89e4bcd25abd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0c2d0009f07fc315d5ac89e4bcd25abd">&#9670;&#160;</a></span>lzma_index_end()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void lzma_index_end </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Deallocate lzma_index. </p>
+<p>If i is NULL, this does nothing.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure to deallocate </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ac347747eb933c7c408e6c801b33becc3" name="ac347747eb933c7c408e6c801b33becc3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac347747eb933c7c408e6c801b33becc3">&#9670;&#160;</a></span>lzma_index_append()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_append </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>unpadded_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>uncompressed_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Add a new Block to lzma_index. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to a lzma_index structure </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramname">unpadded_size</td><td>Unpadded Size of a Block. This can be calculated with <a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30" title="Calculate Unpadded Size.">lzma_block_unpadded_size()</a> after encoding or decoding the Block. </td></tr>
+ <tr><td class="paramname">uncompressed_size</td><td>Uncompressed Size of a Block. This can be taken directly from <a class="el" href="structlzma__block.html" title="Options for the Block and Block Header encoders and decoders.">lzma_block</a> structure after encoding or decoding the Block.</td></tr>
+ </table>
+ </dd>
+</dl>
+<p>Appending a new Block does not invalidate iterators. For example, if an iterator was pointing to the end of the lzma_index, after <a class="el" href="index_8h.html#ac347747eb933c7c408e6c801b33becc3" title="Add a new Block to lzma_index.">lzma_index_append()</a> it is possible to read the next Block with an existing iterator.</p>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_DATA_ERROR: Compressed or uncompressed size of the Stream or size of the Index field would grow too big.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a79a19669237f19f0b11c9f3be80a62b4" name="a79a19669237f19f0b11c9f3be80a62b4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a79a19669237f19f0b11c9f3be80a62b4">&#9670;&#160;</a></span>lzma_index_stream_flags()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_stream_flags </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;</td>
+ <td class="paramname"><em>stream_flags</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Set the Stream Flags. </p>
+<p>Set the Stream Flags of the last (and typically the only) Stream in lzma_index. This can be useful when reading information from the lzma_index, because to decode Blocks, knowing the integrity check type is needed.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure </td></tr>
+ <tr><td class="paramname">stream_flags</td><td>Pointer to <a class="el" href="structlzma__stream__flags.html" title="Options for encoding/decoding Stream Header and Stream Footer.">lzma_stream_flags</a> structure. This is copied into the internal preallocated structure, so the caller doesn't need to keep the flags' data available after calling this function.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported stream_flags-&gt;version.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="af8d6528a04241841bd0a4322b0c57eaa" name="af8d6528a04241841bd0a4322b0c57eaa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af8d6528a04241841bd0a4322b0c57eaa">&#9670;&#160;</a></span>lzma_index_checks()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_index_checks </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the types of integrity Checks. </p>
+<p>If <a class="el" href="index_8h.html#a79a19669237f19f0b11c9f3be80a62b4" title="Set the Stream Flags.">lzma_index_stream_flags()</a> is used to set the Stream Flags for every Stream, <a class="el" href="index_8h.html#af8d6528a04241841bd0a4322b0c57eaa" title="Get the types of integrity Checks.">lzma_index_checks()</a> can be used to get a bitmask to indicate which Check types have been used. It can be useful e.g. if showing the Check types to the user.</p>
+<p>The bitmask is 1 &lt;&lt; check_id, e.g. CRC32 is 1 &lt;&lt; 1 and SHA-256 is 1 &lt;&lt; 10.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Bitmask indicating which Check types are used in the lzma_index </dd></dl>
+
+</div>
+</div>
+<a id="a3ed82f96c688f3c953f6509b6f4e2ef3" name="a3ed82f96c688f3c953f6509b6f4e2ef3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3ed82f96c688f3c953f6509b6f4e2ef3">&#9670;&#160;</a></span>lzma_index_stream_padding()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_stream_padding </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>stream_padding</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Set the amount of Stream Padding. </p>
+<p>Set the amount of Stream Padding of the last (and typically the only) Stream in the lzma_index. This is needed when planning to do random-access reading within multiple concatenated Streams.</p>
+<p>By default, the amount of Stream Padding is assumed to be zero bytes.</p>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_DATA_ERROR: The file size would grow too big.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="afd159a765b09b0cf79186069a848d07e" name="afd159a765b09b0cf79186069a848d07e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#afd159a765b09b0cf79186069a848d07e">&#9670;&#160;</a></span>lzma_index_stream_count()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_stream_count </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the number of Streams. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of Streams in the lzma_index </dd></dl>
+
+</div>
+</div>
+<a id="add1a8c506f67dbc19cae6747107e3bec" name="add1a8c506f67dbc19cae6747107e3bec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#add1a8c506f67dbc19cae6747107e3bec">&#9670;&#160;</a></span>lzma_index_block_count()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_block_count </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the number of Blocks. </p>
+<p>This returns the total number of Blocks in lzma_index. To get number of Blocks in individual Streams, use <a class="el" href="structlzma__index__iter.html" title="Iterator to get information about Blocks and Streams.">lzma_index_iter</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of blocks in the lzma_index </dd></dl>
+
+</div>
+</div>
+<a id="a669ed1a82b1941217cfbb07e7826afc2" name="a669ed1a82b1941217cfbb07e7826afc2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a669ed1a82b1941217cfbb07e7826afc2">&#9670;&#160;</a></span>lzma_index_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the size of the Index field as bytes. </p>
+<p>This is needed to verify the Backward Size field in the Stream Footer.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Size in bytes of the Index </dd></dl>
+
+</div>
+</div>
+<a id="af3630369b43c9ccc906065d759b49663" name="af3630369b43c9ccc906065d759b49663"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af3630369b43c9ccc906065d759b49663">&#9670;&#160;</a></span>lzma_index_stream_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_stream_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the total size of the Stream. </p>
+<p>If multiple lzma_indexes have been combined, this works as if the Blocks were in a single Stream. This is useful if you are going to combine Blocks from multiple Streams into a single new Stream.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Size in bytes of the Stream (if all Blocks are combined into one Stream). </dd></dl>
+
+</div>
+</div>
+<a id="a7829942b83ee1fa5b6443cc248b81041" name="a7829942b83ee1fa5b6443cc248b81041"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7829942b83ee1fa5b6443cc248b81041">&#9670;&#160;</a></span>lzma_index_total_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_total_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the total size of the Blocks. </p>
+<p>This doesn't include the Stream Header, Stream Footer, Stream Padding, or Index fields.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Size in bytes of all Blocks in the Stream(s) </dd></dl>
+
+</div>
+</div>
+<a id="ac875ed47d35385e5dac461b25c5ea1c9" name="ac875ed47d35385e5dac461b25c5ea1c9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac875ed47d35385e5dac461b25c5ea1c9">&#9670;&#160;</a></span>lzma_index_file_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_file_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the total size of the file. </p>
+<p>When no lzma_indexes have been combined with <a class="el" href="index_8h.html#abc4db36b4bd67af01819be9dd045c34a" title="Concatenate lzma_indexes.">lzma_index_cat()</a> and there is no Stream Padding, this function is identical to <a class="el" href="index_8h.html#af3630369b43c9ccc906065d759b49663" title="Get the total size of the Stream.">lzma_index_stream_size()</a>. If multiple lzma_indexes have been combined, this includes also the headers of each separate Stream and the possible Stream Padding fields.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Total size of the .xz file in bytes </dd></dl>
+
+</div>
+</div>
+<a id="a620fe6317f1f9d7af9cc27c748bf07d6" name="a620fe6317f1f9d7af9cc27c748bf07d6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a620fe6317f1f9d7af9cc27c748bf07d6">&#9670;&#160;</a></span>lzma_index_uncompressed_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_uncompressed_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the uncompressed size of the file. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Size in bytes of the uncompressed data in the file </dd></dl>
+
+</div>
+</div>
+<a id="aa78f02f18ed29d289a6ef37b8ea98a21" name="aa78f02f18ed29d289a6ef37b8ea98a21"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa78f02f18ed29d289a6ef37b8ea98a21">&#9670;&#160;</a></span>lzma_index_iter_init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void lzma_index_iter_init </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *&#160;</td>
+ <td class="paramname"><em>iter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize an iterator. </p>
+<p>This function associates the iterator with the given lzma_index, and calls <a class="el" href="index_8h.html#ae81438be8deff4894b104e65d8acdd24" title="Rewind the iterator.">lzma_index_iter_rewind()</a> on the iterator.</p>
+<p>This function doesn't allocate any memory, thus there is no lzma_index_iter_end(). The iterator is valid as long as the associated lzma_index is valid, that is, until <a class="el" href="index_8h.html#a0c2d0009f07fc315d5ac89e4bcd25abd" title="Deallocate lzma_index.">lzma_index_end()</a> or using it as source in <a class="el" href="index_8h.html#abc4db36b4bd67af01819be9dd045c34a" title="Concatenate lzma_indexes.">lzma_index_cat()</a>. Specifically, lzma_index doesn't become invalid if new Blocks are added to it with <a class="el" href="index_8h.html#ac347747eb933c7c408e6c801b33becc3" title="Add a new Block to lzma_index.">lzma_index_append()</a> or if it is used as the destination in <a class="el" href="index_8h.html#abc4db36b4bd67af01819be9dd045c34a" title="Concatenate lzma_indexes.">lzma_index_cat()</a>.</p>
+<p>It is safe to make copies of an initialized <a class="el" href="structlzma__index__iter.html" title="Iterator to get information about Blocks and Streams.">lzma_index_iter</a>, for example, to easily restart reading at some particular position.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">iter</td><td>Pointer to a <a class="el" href="structlzma__index__iter.html" title="Iterator to get information about Blocks and Streams.">lzma_index_iter</a> structure </td></tr>
+ <tr><td class="paramname">i</td><td>lzma_index to which the iterator will be associated </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="ae81438be8deff4894b104e65d8acdd24" name="ae81438be8deff4894b104e65d8acdd24"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae81438be8deff4894b104e65d8acdd24">&#9670;&#160;</a></span>lzma_index_iter_rewind()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void lzma_index_iter_rewind </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *&#160;</td>
+ <td class="paramname"><em>iter</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Rewind the iterator. </p>
+<p>Rewind the iterator so that next call to <a class="el" href="index_8h.html#af428522e1b3eef137c65c5a01f766e0e" title="Get the next Block or Stream.">lzma_index_iter_next()</a> will return the first Block or Stream.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">iter</td><td>Pointer to a <a class="el" href="structlzma__index__iter.html" title="Iterator to get information about Blocks and Streams.">lzma_index_iter</a> structure </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="af428522e1b3eef137c65c5a01f766e0e" name="af428522e1b3eef137c65c5a01f766e0e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af428522e1b3eef137c65c5a01f766e0e">&#9670;&#160;</a></span>lzma_index_iter_next()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_index_iter_next </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *&#160;</td>
+ <td class="paramname"><em>iter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="index_8h.html#a712b43192d944bf2f767711343cd9ca8">lzma_index_iter_mode</a>&#160;</td>
+ <td class="paramname"><em>mode</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the next Block or Stream. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">iter</td><td>Iterator initialized with <a class="el" href="index_8h.html#aa78f02f18ed29d289a6ef37b8ea98a21" title="Initialize an iterator.">lzma_index_iter_init()</a> </td></tr>
+ <tr><td class="paramname">mode</td><td>Specify what kind of information the caller wants to get. See lzma_index_iter_mode for details.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if no Block or Stream matching the mode is found. *iter is not updated (failure).</li>
+<li>false if the next Block or Stream matching the mode was found. *iter is updated (success). </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ac4f56df9d210712e5d7add5502c9eb93" name="ac4f56df9d210712e5d7add5502c9eb93"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac4f56df9d210712e5d7add5502c9eb93">&#9670;&#160;</a></span>lzma_index_iter_locate()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_index_iter_locate </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__index__iter.html">lzma_index_iter</a> *&#160;</td>
+ <td class="paramname"><em>iter</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>target</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Locate a Block. </p>
+<p>If it is possible to seek in the .xz file, it is possible to parse the Index field(s) and use <a class="el" href="index_8h.html#ac4f56df9d210712e5d7add5502c9eb93" title="Locate a Block.">lzma_index_iter_locate()</a> to do random-access reading with granularity of Block size.</p>
+<p>If the target is smaller than the uncompressed size of the Stream (can be checked with <a class="el" href="index_8h.html#a620fe6317f1f9d7af9cc27c748bf07d6" title="Get the uncompressed size of the file.">lzma_index_uncompressed_size()</a>):</p><ul>
+<li>Information about the Stream and Block containing the requested uncompressed offset is stored into *iter.</li>
+<li>Internal state of the iterator is adjusted so that <a class="el" href="index_8h.html#af428522e1b3eef137c65c5a01f766e0e" title="Get the next Block or Stream.">lzma_index_iter_next()</a> can be used to read subsequent Blocks or Streams.</li>
+</ul>
+<p>If the target is greater than the uncompressed size of the Stream, *iter is not modified.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">iter</td><td>Iterator that was earlier initialized with <a class="el" href="index_8h.html#aa78f02f18ed29d289a6ef37b8ea98a21" title="Initialize an iterator.">lzma_index_iter_init()</a>. </td></tr>
+ <tr><td class="paramname">target</td><td>Uncompressed target offset which the caller would like to locate from the Stream</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if the target is greater than or equal to the uncompressed size of the Stream (failure)</li>
+<li>false if the target is smaller than the uncompressed size of the Stream (success) </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="abc4db36b4bd67af01819be9dd045c34a" name="abc4db36b4bd67af01819be9dd045c34a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abc4db36b4bd67af01819be9dd045c34a">&#9670;&#160;</a></span>lzma_index_cat()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_cat </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>dest</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>src</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Concatenate lzma_indexes. </p>
+<p>Concatenating lzma_indexes is useful when doing random-access reading in multi-Stream .xz file, or when combining multiple Streams into single Stream.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">dest</td><td>lzma_index after which src is appended </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">src</td><td>lzma_index to be appended after dest. If this function succeeds, the memory allocated for src is freed or moved to be part of dest, and all iterators pointing to src will become invalid. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: lzma_indexes were concatenated successfully. src is now a dangling pointer.</li>
+<li>LZMA_DATA_ERROR: *dest would grow too big.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a5161e3f67156577882e1d95dcb57e33e" name="a5161e3f67156577882e1d95dcb57e33e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5161e3f67156577882e1d95dcb57e33e">&#9670;&#160;</a></span>lzma_index_dup()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> * lzma_index_dup </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Duplicate lzma_index. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index structure to be duplicated </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>A copy of the lzma_index, or NULL if memory allocation failed. </dd></dl>
+
+</div>
+</div>
+<a id="a6800d70f3b2afca085496460cd03211d" name="a6800d70f3b2afca085496460cd03211d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6800d70f3b2afca085496460cd03211d">&#9670;&#160;</a></span>lzma_index_encoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_encoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .xz Index encoder. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">strm</td><td>Pointer to properly prepared <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> </td></tr>
+ <tr><td class="paramname">i</td><td>Pointer to lzma_index which should be encoded.</td></tr>
+ </table>
+ </dd>
+</dl>
+<p>The valid `action' values for <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN and LZMA_FINISH. It is enough to use only one of them (you can choose freely).</p>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization succeeded, continue with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="abb56fd1d5914f8900ece7b88b78e5e23" name="abb56fd1d5914f8900ece7b88b78e5e23"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abb56fd1d5914f8900ece7b88b78e5e23">&#9670;&#160;</a></span>lzma_index_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> **&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>memlimit</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize .xz Index decoder. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">strm</td><td>Pointer to properly prepared <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">i</td><td>The decoded Index will be made available via this pointer. Initially this function will set *i to NULL (the old value is ignored). If decoding succeeds (<a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> returns LZMA_STREAM_END), *i will be set to point to a new lzma_index, which the application has to later free with <a class="el" href="index_8h.html#a0c2d0009f07fc315d5ac89e4bcd25abd" title="Deallocate lzma_index.">lzma_index_end()</a>. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">memlimit</td><td>How much memory the resulting lzma_index is allowed to require. liblzma 5.2.3 and earlier don't allow 0 here and return LZMA_PROG_ERROR; later versions treat 0 as if 1 had been specified.</td></tr>
+ </table>
+ </dd>
+</dl>
+<p>Valid `action' arguments to <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN and LZMA_FINISH. There is no need to use LZMA_FINISH, but it's allowed because it may simplify certain types of applications.</p>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Initialization succeeded, continue with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR</li>
+</ul>
+</dd></dl>
+<dl class="section note"><dt>Note</dt><dd>liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here but that error code has never been possible from this initialization function. </dd></dl>
+
+</div>
+</div>
+<a id="add1ef06dec8a26d08ae8651cff0fd8d6" name="add1ef06dec8a26d08ae8651cff0fd8d6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#add1ef06dec8a26d08ae8651cff0fd8d6">&#9670;&#160;</a></span>lzma_index_buffer_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_buffer_encode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> *&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call .xz Index encoder. </p>
+<dl class="section note"><dt>Note</dt><dd>This function doesn't take allocator argument since all the internal data is allocated on stack.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">i</td><td>lzma_index to be encoded </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. *out_pos is updated only if encoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_BUF_ERROR: Output buffer is too small. Use <a class="el" href="index_8h.html#a669ed1a82b1941217cfbb07e7826afc2" title="Get the size of the Index field as bytes.">lzma_index_size()</a> to find out how much output space is needed.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a028b8b8d59a413f9682eea1269a6ae8b" name="a028b8b8d59a413f9682eea1269a6ae8b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a028b8b8d59a413f9682eea1269a6ae8b">&#9670;&#160;</a></span>lzma_index_buffer_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_buffer_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> **&#160;</td>
+ <td class="paramname"><em>i</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t *&#160;</td>
+ <td class="paramname"><em>memlimit</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>in_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Single-call .xz Index decoder. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">i</td><td>If decoding succeeds, *i will point to a new lzma_index, which the application has to later free with <a class="el" href="index_8h.html#a0c2d0009f07fc315d5ac89e4bcd25abd" title="Deallocate lzma_index.">lzma_index_end()</a>. If an error occurs, *i will be NULL. The old value of *i is always ignored and thus doesn't need to be initialized by the caller. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">memlimit</td><td>Pointer to how much memory the resulting lzma_index is allowed to require. The value pointed by this pointer is modified if and only if LZMA_MEMLIMIT_ERROR is returned. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_pos</td><td>The next byte will be read from in[*in_pos]. *in_pos is updated only if decoding succeeds. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer; the first byte that won't be read is in[in_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Decoding was successful.</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_MEMLIMIT_ERROR: Memory usage limit was reached. The minimum required memlimit value was stored to *memlimit.</li>
+<li>LZMA_DATA_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a7c5d77cf8532d95977d4571a1eb0a222" name="a7c5d77cf8532d95977d4571a1eb0a222"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7c5d77cf8532d95977d4571a1eb0a222">&#9670;&#160;</a></span>lzma_file_info_decoder()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_file_info_decoder </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream.html">lzma_stream</a> *&#160;</td>
+ <td class="paramname"><em>strm</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="index_8h.html#afc18c1443b3b9aa0d146b44e8755b62e">lzma_index</a> **&#160;</td>
+ <td class="paramname"><em>dest_index</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>memlimit</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint64_t&#160;</td>
+ <td class="paramname"><em>file_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Initialize a .xz file information decoder. </p>
+<p>This decoder decodes the Stream Header, Stream Footer, Index, and Stream Padding field(s) from the input .xz file and stores the resulting combined index in *dest_index. This information can be used to get the uncompressed file size with lzma_index_uncompressed_size(*dest_index) or, for example, to implement random access reading by locating the Blocks in the Streams.</p>
+<p>To get the required information from the .xz file, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> may ask the application to seek in the input file by returning LZMA_SEEK_NEEDED and having the target file position specified in <a class="el" href="structlzma__stream.html#af7c43a61f3dfeb0b9c8487b7f275054e" title="New seek input position for LZMA_SEEK_NEEDED.">lzma_stream.seek_pos</a>. The number of seeks required depends on the input file and how big buffers the application provides. When possible, the decoder will seek backward and forward in the given buffer to avoid useless seek requests. Thus, if the application provides the whole file at once, no external seeking will be required (that is, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> won't return LZMA_SEEK_NEEDED).</p>
+<p>The value in <a class="el" href="structlzma__stream.html#a1a411e1755d6185756caefabc3932c7b">lzma_stream.total_in</a> can be used to estimate how much data liblzma had to read to get the file information. However, due to seeking and the way total_in is updated, the value of total_in will be somewhat inaccurate (a little too big). Thus, total_in is a good estimate but don't expect to see the same exact value for the same file if you change the input buffer size or switch to a different liblzma version.</p>
+<p>Valid `action' arguments to <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> are LZMA_RUN and LZMA_FINISH. You only need to use LZMA_RUN; LZMA_FINISH is only supported because it might be convenient for some applications. If you use LZMA_FINISH and if <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> asks the application to seek, remember to reset `action' back to LZMA_RUN unless you hit the end of the file again.</p>
+<p>Possible return values from <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>:</p><ul>
+<li>LZMA_OK: All OK so far, more input needed</li>
+<li>LZMA_SEEK_NEEDED: Provide more input starting from the absolute file position strm-&gt;seek_pos</li>
+<li>LZMA_STREAM_END: Decoding was successful, *dest_index has been set</li>
+<li>LZMA_FORMAT_ERROR: The input file is not in the .xz format (the expected magic bytes were not found from the beginning of the file)</li>
+<li>LZMA_OPTIONS_ERROR: File looks valid but contains headers that aren't supported by this version of liblzma</li>
+<li>LZMA_DATA_ERROR: File is corrupt</li>
+<li>LZMA_BUF_ERROR</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_MEMLIMIT_ERROR</li>
+<li>LZMA_PROG_ERROR</li>
+</ul>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">strm</td><td>Pointer to a properly prepared <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">dest_index</td><td>Pointer to a pointer where the decoder will put the decoded lzma_index. The old value of *dest_index is ignored (not freed). </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">memlimit</td><td>How much memory the resulting lzma_index is allowed to require. Use UINT64_MAX to effectively disable the limiter. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">file_size</td><td>Size of the input .xz file</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_MEM_ERROR</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/index__hash_8h.html b/doc/api/index__hash_8h.html
new file mode 100644
index 0000000..1f568ed
--- /dev/null
+++ b/doc/api/index__hash_8h.html
@@ -0,0 +1,311 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/index_hash.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">index_hash.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Validate Index by using a hash function.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:a2db9f438838c8ff72a8a6fd3fc856f8c"><td class="memItemLeft" align="right" valign="top"><a id="a2db9f438838c8ff72a8a6fd3fc856f8c" name="a2db9f438838c8ff72a8a6fd3fc856f8c"></a>
+typedef struct lzma_index_hash_s&#160;</td><td class="memItemRight" valign="bottom"><b>lzma_index_hash</b></td></tr>
+<tr class="memdesc:a2db9f438838c8ff72a8a6fd3fc856f8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opaque data type to hold the Index hash. <br /></td></tr>
+<tr class="separator:a2db9f438838c8ff72a8a6fd3fc856f8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:aaafae4967a4a266d97dc34a98bfcabfb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index__hash_8h.html#aaafae4967a4a266d97dc34a98bfcabfb">lzma_index_hash_init</a> (<a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *index_hash, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:aaafae4967a4a266d97dc34a98bfcabfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate and initialize a new lzma_index_hash structure. <br /></td></tr>
+<tr class="separator:aaafae4967a4a266d97dc34a98bfcabfb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7dacb41b9ec1c8df5d33dfdae97743b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index__hash_8h.html#a7dacb41b9ec1c8df5d33dfdae97743b3">lzma_index_hash_end</a> (<a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *index_hash, const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *allocator) lzma_nothrow</td></tr>
+<tr class="memdesc:a7dacb41b9ec1c8df5d33dfdae97743b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocate lzma_index_hash structure. <br /></td></tr>
+<tr class="separator:a7dacb41b9ec1c8df5d33dfdae97743b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2bdbe4f0b5fa2fadb7528447feaaa97f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index__hash_8h.html#a2bdbe4f0b5fa2fadb7528447feaaa97f">lzma_index_hash_append</a> (<a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *index_hash, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> unpadded_size, <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> uncompressed_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a2bdbe4f0b5fa2fadb7528447feaaa97f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new Record to an Index hash. <br /></td></tr>
+<tr class="separator:a2bdbe4f0b5fa2fadb7528447feaaa97f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a891eb955284c9117155f92eb0ddba44c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index__hash_8h.html#a891eb955284c9117155f92eb0ddba44c">lzma_index_hash_decode</a> (<a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *index_hash, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a891eb955284c9117155f92eb0ddba44c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode and validate the Index field. <br /></td></tr>
+<tr class="separator:a891eb955284c9117155f92eb0ddba44c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0f8ab3b57b117f9547866156755c917f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="index__hash_8h.html#a0f8ab3b57b117f9547866156755c917f">lzma_index_hash_size</a> (const <a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *index_hash) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a0f8ab3b57b117f9547866156755c917f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the Index field as bytes. <br /></td></tr>
+<tr class="separator:a0f8ab3b57b117f9547866156755c917f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Validate Index by using a hash function. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead.</dd></dl>
+<p>Hashing makes it possible to use constant amount of memory to validate Index of arbitrary size. </p>
+</div><h2 class="groupheader">Function Documentation</h2>
+<a id="aaafae4967a4a266d97dc34a98bfcabfb" name="aaafae4967a4a266d97dc34a98bfcabfb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aaafae4967a4a266d97dc34a98bfcabfb">&#9670;&#160;</a></span>lzma_index_hash_init()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> * lzma_index_hash_init </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *&#160;</td>
+ <td class="paramname"><em>index_hash</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Allocate and initialize a new lzma_index_hash structure. </p>
+<p>If index_hash is NULL, this function allocates and initializes a new lzma_index_hash structure and returns a pointer to it. If allocation fails, NULL is returned.</p>
+<p>If index_hash is non-NULL, this function reinitializes the lzma_index_hash structure and returns the same pointer. In this case, return value cannot be NULL or a different pointer than the index_hash that was given as an argument.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">index_hash</td><td>Pointer to a lzma_index_hash structure or NULL. </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free().</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Initialized lzma_index_hash structure on success or NULL on failure. </dd></dl>
+
+</div>
+</div>
+<a id="a7dacb41b9ec1c8df5d33dfdae97743b3" name="a7dacb41b9ec1c8df5d33dfdae97743b3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7dacb41b9ec1c8df5d33dfdae97743b3">&#9670;&#160;</a></span>lzma_index_hash_end()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void lzma_index_hash_end </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *&#160;</td>
+ <td class="paramname"><em>index_hash</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td>
+ <td class="paramname"><em>allocator</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Deallocate lzma_index_hash structure. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">index_hash</td><td>Pointer to a lzma_index_hash structure to free. </td></tr>
+ <tr><td class="paramname">allocator</td><td><a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for custom allocator functions. Set to NULL to use malloc() and free(). </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="a2bdbe4f0b5fa2fadb7528447feaaa97f" name="a2bdbe4f0b5fa2fadb7528447feaaa97f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2bdbe4f0b5fa2fadb7528447feaaa97f">&#9670;&#160;</a></span>lzma_index_hash_append()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_hash_append </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *&#160;</td>
+ <td class="paramname"><em>index_hash</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>unpadded_size</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>uncompressed_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Add a new Record to an Index hash. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">index_hash</td><td>Pointer to a lzma_index_hash structure </td></tr>
+ <tr><td class="paramname">unpadded_size</td><td>Unpadded Size of a Block </td></tr>
+ <tr><td class="paramname">uncompressed_size</td><td>Uncompressed Size of a Block</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK</li>
+<li>LZMA_DATA_ERROR: Compressed or uncompressed size of the Stream or size of the Index field would grow too big.</li>
+<li>LZMA_PROG_ERROR: Invalid arguments or this function is being used when <a class="el" href="index__hash_8h.html#a891eb955284c9117155f92eb0ddba44c" title="Decode and validate the Index field.">lzma_index_hash_decode()</a> has already been used. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a891eb955284c9117155f92eb0ddba44c" name="a891eb955284c9117155f92eb0ddba44c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a891eb955284c9117155f92eb0ddba44c">&#9670;&#160;</a></span>lzma_index_hash_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_index_hash_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *&#160;</td>
+ <td class="paramname"><em>index_hash</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>in_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode and validate the Index field. </p>
+<p>After telling the sizes of all Blocks with <a class="el" href="index__hash_8h.html#a2bdbe4f0b5fa2fadb7528447feaaa97f" title="Add a new Record to an Index hash.">lzma_index_hash_append()</a>, the actual Index field is decoded with this function. Specifically, once decoding of the Index field has been started, no more Records can be added using <a class="el" href="index__hash_8h.html#a2bdbe4f0b5fa2fadb7528447feaaa97f" title="Add a new Record to an Index hash.">lzma_index_hash_append()</a>.</p>
+<p>This function doesn't use <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> structure to pass the input data. Instead, the input buffer is specified using three arguments. This is because it matches better the internal APIs of liblzma.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">index_hash</td><td>Pointer to a lzma_index_hash structure </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Pointer to the beginning of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">in_pos</td><td>in[*in_pos] is the next byte to process </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>in[in_size] is the first byte not to process</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: So far good, but more input is needed.</li>
+<li>LZMA_STREAM_END: Index decoded successfully and it matches the Records given with <a class="el" href="index__hash_8h.html#a2bdbe4f0b5fa2fadb7528447feaaa97f" title="Add a new Record to an Index hash.">lzma_index_hash_append()</a>.</li>
+<li>LZMA_DATA_ERROR: Index is corrupt or doesn't match the information given with <a class="el" href="index__hash_8h.html#a2bdbe4f0b5fa2fadb7528447feaaa97f" title="Add a new Record to an Index hash.">lzma_index_hash_append()</a>.</li>
+<li>LZMA_BUF_ERROR: Cannot progress because *in_pos &gt;= in_size.</li>
+<li>LZMA_PROG_ERROR </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a0f8ab3b57b117f9547866156755c917f" name="a0f8ab3b57b117f9547866156755c917f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0f8ab3b57b117f9547866156755c917f">&#9670;&#160;</a></span>lzma_index_hash_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_hash_size </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="index__hash_8h.html#a2db9f438838c8ff72a8a6fd3fc856f8c">lzma_index_hash</a> *&#160;</td>
+ <td class="paramname"><em>index_hash</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the size of the Index field as bytes. </p>
+<p>This is needed to verify the Backward Size field in the Stream Footer.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">index_hash</td><td>Pointer to a lzma_index_hash structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Size of the Index field in bytes. </dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/lzma12_8h.html b/doc/api/lzma12_8h.html
new file mode 100644
index 0000000..1d8330c
--- /dev/null
+++ b/doc/api/lzma12_8h.html
@@ -0,0 +1,436 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/lzma12.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#enum-members">Enumerations</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">lzma12.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>LZMA1 and LZMA2 filters.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options specific to the LZMA1 and LZMA2 filters. <a href="structlzma__options__lzma.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:accedd16abcb758e7f748bac1102abda9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#accedd16abcb758e7f748bac1102abda9">LZMA_FILTER_LZMA1</a>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x4000000000000001)</td></tr>
+<tr class="memdesc:accedd16abcb758e7f748bac1102abda9"><td class="mdescLeft">&#160;</td><td class="mdescRight">LZMA1 Filter ID (for raw encoder/decoder only, not in .xz) <br /></td></tr>
+<tr class="separator:accedd16abcb758e7f748bac1102abda9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a98a7fd42aa78a273a6b138629e46772d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#a98a7fd42aa78a273a6b138629e46772d">LZMA_FILTER_LZMA1EXT</a>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x4000000000000002)</td></tr>
+<tr class="memdesc:a98a7fd42aa78a273a6b138629e46772d"><td class="mdescLeft">&#160;</td><td class="mdescRight">LZMA1 Filter ID with extended options (for raw encoder/decoder) <br /></td></tr>
+<tr class="separator:a98a7fd42aa78a273a6b138629e46772d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a04f9d9a018a47cc99491e6e94e92f96b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#a04f9d9a018a47cc99491e6e94e92f96b">LZMA_FILTER_LZMA2</a>&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x21)</td></tr>
+<tr class="memdesc:a04f9d9a018a47cc99491e6e94e92f96b"><td class="mdescLeft">&#160;</td><td class="mdescRight">LZMA2 Filter ID. <br /></td></tr>
+<tr class="separator:a04f9d9a018a47cc99491e6e94e92f96b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a221f69f8a1f604c1aa5d79ae8afec1e0"><td class="memItemLeft" align="right" valign="top"><a id="a221f69f8a1f604c1aa5d79ae8afec1e0" name="a221f69f8a1f604c1aa5d79ae8afec1e0"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_DICT_SIZE_MIN</b>&#160;&#160;&#160;UINT32_C(4096)</td></tr>
+<tr class="separator:a221f69f8a1f604c1aa5d79ae8afec1e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abadf9a9599c106a1381756219c16f8ee"><td class="memItemLeft" align="right" valign="top"><a id="abadf9a9599c106a1381756219c16f8ee" name="abadf9a9599c106a1381756219c16f8ee"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_DICT_SIZE_DEFAULT</b>&#160;&#160;&#160;(UINT32_C(1) &lt;&lt; 23)</td></tr>
+<tr class="separator:abadf9a9599c106a1381756219c16f8ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a36552f4d49390d060692424817222d9c"><td class="memItemLeft" align="right" valign="top"><a id="a36552f4d49390d060692424817222d9c" name="a36552f4d49390d060692424817222d9c"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_LCLP_MIN</b>&#160;&#160;&#160;0</td></tr>
+<tr class="separator:a36552f4d49390d060692424817222d9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6890226055b5069e83835af1fb804654"><td class="memItemLeft" align="right" valign="top"><a id="a6890226055b5069e83835af1fb804654" name="a6890226055b5069e83835af1fb804654"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_LCLP_MAX</b>&#160;&#160;&#160;4</td></tr>
+<tr class="separator:a6890226055b5069e83835af1fb804654"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af3769f40103ec40516e1235c4b912d05"><td class="memItemLeft" align="right" valign="top"><a id="af3769f40103ec40516e1235c4b912d05" name="af3769f40103ec40516e1235c4b912d05"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_LC_DEFAULT</b>&#160;&#160;&#160;3</td></tr>
+<tr class="separator:af3769f40103ec40516e1235c4b912d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:afa8ed908b2c1a88f3a76c47610036e68"><td class="memItemLeft" align="right" valign="top"><a id="afa8ed908b2c1a88f3a76c47610036e68" name="afa8ed908b2c1a88f3a76c47610036e68"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_LP_DEFAULT</b>&#160;&#160;&#160;0</td></tr>
+<tr class="separator:afa8ed908b2c1a88f3a76c47610036e68"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a11ed595416a499021cd571f08bbd38bc"><td class="memItemLeft" align="right" valign="top"><a id="a11ed595416a499021cd571f08bbd38bc" name="a11ed595416a499021cd571f08bbd38bc"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_PB_MIN</b>&#160;&#160;&#160;0</td></tr>
+<tr class="separator:a11ed595416a499021cd571f08bbd38bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5e2661cef9dbcbb309239ec243a7c034"><td class="memItemLeft" align="right" valign="top"><a id="a5e2661cef9dbcbb309239ec243a7c034" name="a5e2661cef9dbcbb309239ec243a7c034"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_PB_MAX</b>&#160;&#160;&#160;4</td></tr>
+<tr class="separator:a5e2661cef9dbcbb309239ec243a7c034"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5072e13ce7b6abcdffdf6456da5959a1"><td class="memItemLeft" align="right" valign="top"><a id="a5072e13ce7b6abcdffdf6456da5959a1" name="a5072e13ce7b6abcdffdf6456da5959a1"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_PB_DEFAULT</b>&#160;&#160;&#160;2</td></tr>
+<tr class="separator:a5072e13ce7b6abcdffdf6456da5959a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad088307349f27b38fda0d1f21588adc9"><td class="memItemLeft" align="right" valign="top"><a id="ad088307349f27b38fda0d1f21588adc9" name="ad088307349f27b38fda0d1f21588adc9"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_LZMA1EXT_ALLOW_EOPM</b>&#160;&#160;&#160;UINT32_C(0x01)</td></tr>
+<tr class="separator:ad088307349f27b38fda0d1f21588adc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a73ed0293db4e59d73a702d66fef537c3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#a73ed0293db4e59d73a702d66fef537c3">lzma_set_ext_size</a>(opt_lzma2, u64size)</td></tr>
+<tr class="memdesc:a73ed0293db4e59d73a702d66fef537c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to set the 64-bit uncompressed size in ext_size_*. <br /></td></tr>
+<tr class="separator:a73ed0293db4e59d73a702d66fef537c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
+Enumerations</h2></td></tr>
+<tr class="memitem:acf740075f86fa61dc408d6d0dbf8fa80"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a> { <br />
+&#160;&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a6eb38f634021a192cada8a978b5de93b">LZMA_MF_HC3</a> = 0x03
+, <a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a0944620f4949289c2ebde613cae12b04">LZMA_MF_HC4</a> = 0x04
+, <a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a7ab212446c3f6520f5c33ccfa4b3386a">LZMA_MF_BT2</a> = 0x12
+, <a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a983ecc59bf3e07a7c43fea551ea11865">LZMA_MF_BT3</a> = 0x13
+, <br />
+&#160;&#160;<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80a468c32cdea9861d1ff98478364e6c547">LZMA_MF_BT4</a> = 0x14
+<br />
+ }</td></tr>
+<tr class="memdesc:acf740075f86fa61dc408d6d0dbf8fa80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Match finders. <a href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">More...</a><br /></td></tr>
+<tr class="separator:acf740075f86fa61dc408d6d0dbf8fa80"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1032316e3075c2c8086fb17104b91866"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma_mode</a> { <a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866ac8c0926a91b4f756e11121efd30648cc">LZMA_MODE_FAST</a> = 1
+, <a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866ad37225f30d5cd21fc8bb3eaba283bbf9">LZMA_MODE_NORMAL</a> = 2
+ }</td></tr>
+<tr class="memdesc:a1032316e3075c2c8086fb17104b91866"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compression modes. <a href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">More...</a><br /></td></tr>
+<tr class="separator:a1032316e3075c2c8086fb17104b91866"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:aefba1f7214ddcf8cd408a0702e8642b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#aefba1f7214ddcf8cd408a0702e8642b5">lzma_mf_is_supported</a> (<a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a> match_finder) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:aefba1f7214ddcf8cd408a0702e8642b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if given match finder is supported. <br /></td></tr>
+<tr class="separator:aefba1f7214ddcf8cd408a0702e8642b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad1add1c2600fdbb3d737e4fb3465dfcb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#ad1add1c2600fdbb3d737e4fb3465dfcb">lzma_mode_is_supported</a> (<a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma_mode</a> mode) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:ad1add1c2600fdbb3d737e4fb3465dfcb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if given compression mode is supported. <br /></td></tr>
+<tr class="separator:ad1add1c2600fdbb3d737e4fb3465dfcb"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa62c28944fe3575653a4c25780400d77"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="lzma12_8h.html#aa62c28944fe3575653a4c25780400d77">lzma_lzma_preset</a> (<a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a> *options, uint32_t preset) lzma_nothrow</td></tr>
+<tr class="memdesc:aa62c28944fe3575653a4c25780400d77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a compression preset to <a class="el" href="structlzma__options__lzma.html" title="Options specific to the LZMA1 and LZMA2 filters.">lzma_options_lzma</a> structure. <br /></td></tr>
+<tr class="separator:aa62c28944fe3575653a4c25780400d77"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>LZMA1 and LZMA2 filters. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="accedd16abcb758e7f748bac1102abda9" name="accedd16abcb758e7f748bac1102abda9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#accedd16abcb758e7f748bac1102abda9">&#9670;&#160;</a></span>LZMA_FILTER_LZMA1</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_FILTER_LZMA1&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x4000000000000001)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>LZMA1 Filter ID (for raw encoder/decoder only, not in .xz) </p>
+<p>LZMA1 is the very same thing as what was called just LZMA in LZMA Utils, 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from accidentally using LZMA when they actually want LZMA2. </p>
+
+</div>
+</div>
+<a id="a98a7fd42aa78a273a6b138629e46772d" name="a98a7fd42aa78a273a6b138629e46772d"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a98a7fd42aa78a273a6b138629e46772d">&#9670;&#160;</a></span>LZMA_FILTER_LZMA1EXT</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_FILTER_LZMA1EXT&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x4000000000000002)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>LZMA1 Filter ID with extended options (for raw encoder/decoder) </p>
+<p>This is like LZMA_FILTER_LZMA1 but with this ID a few extra options are supported in the <a class="el" href="structlzma__options__lzma.html" title="Options specific to the LZMA1 and LZMA2 filters.">lzma_options_lzma</a> structure:</p>
+<ul>
+<li>A flag to tell the encoder if the end of payload marker (EOPM) alias end of stream (EOS) marker must be written at the end of the stream. In contrast, LZMA_FILTER_LZMA1 always writes the end marker.</li>
+<li>Decoder needs to be told the uncompressed size of the stream or that it is unknown (using the special value UINT64_MAX). If the size is known, a flag can be set to allow the presence of the end marker anyway. In contrast, LZMA_FILTER_LZMA1 always behaves as if the uncompressed size was unknown.</li>
+</ul>
+<p>This allows handling file formats where LZMA1 streams are used but where the end marker isn't allowed or where it might not (always) be present. This extended LZMA1 functionality is provided as a Filter ID for raw encoder and decoder instead of adding new encoder and decoder initialization functions because this way it is possible to also use extra filters, for example, LZMA_FILTER_X86 in a filter chain with LZMA_FILTER_LZMA1EXT, which might be needed to handle some file formats. </p>
+
+</div>
+</div>
+<a id="a04f9d9a018a47cc99491e6e94e92f96b" name="a04f9d9a018a47cc99491e6e94e92f96b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a04f9d9a018a47cc99491e6e94e92f96b">&#9670;&#160;</a></span>LZMA_FILTER_LZMA2</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_FILTER_LZMA2&#160;&#160;&#160;<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(0x21)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>LZMA2 Filter ID. </p>
+<p>Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion when trying to compress incompressible data), possibility to change lc/lp/pb in the middle of encoding, and some other internal improvements. </p>
+
+</div>
+</div>
+<a id="a73ed0293db4e59d73a702d66fef537c3" name="a73ed0293db4e59d73a702d66fef537c3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a73ed0293db4e59d73a702d66fef537c3">&#9670;&#160;</a></span>lzma_set_ext_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define lzma_set_ext_size</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">opt_lzma2, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">u64size&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { \</div>
+<div class="line"> (opt_lzma2).ext_size_low = (uint32_t)(u64size); \</div>
+<div class="line"> (opt_lzma2).ext_size_high = (uint32_t)((uint64_t)(u64size) &gt;&gt; 32); \</div>
+<div class="line">} <span class="keywordflow">while</span> (0)</div>
+</div><!-- fragment -->
+<p>Macro to set the 64-bit uncompressed size in ext_size_*. </p>
+<p>This might be convenient when decoding using LZMA_FILTER_LZMA1EXT. This isn't used with LZMA_FILTER_LZMA1 or LZMA_FILTER_LZMA2. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Enumeration Type Documentation</h2>
+<a id="acf740075f86fa61dc408d6d0dbf8fa80" name="acf740075f86fa61dc408d6d0dbf8fa80"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acf740075f86fa61dc408d6d0dbf8fa80">&#9670;&#160;</a></span>lzma_match_finder</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Match finders. </p>
+<p>Match finder has major effect on both speed and compression ratio. Usually hash chains are faster than binary trees.</p>
+<p>If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better choice, because binary trees get much higher compression ratio penalty with LZMA_SYNC_FLUSH.</p>
+<p>The memory usage formulas are only rough estimates, which are closest to reality when dict_size is a power of two. The formulas are more complex in reality, and can also change a little between liblzma versions. Use <a class="el" href="filter_8h.html#a730f9391e85a5979bcd1b32643ae7176" title="Calculate approximate memory requirements for raw encoder.">lzma_raw_encoder_memusage()</a> to get more accurate estimate of memory usage. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="acf740075f86fa61dc408d6d0dbf8fa80a6eb38f634021a192cada8a978b5de93b" name="acf740075f86fa61dc408d6d0dbf8fa80a6eb38f634021a192cada8a978b5de93b"></a>LZMA_MF_HC3&#160;</td><td class="fielddoc"><p>Hash Chain with 2- and 3-byte hashing. </p>
+<p>Minimum nice_len: 3</p>
+<p>Memory usage:</p><ul>
+<li>dict_size &lt;= 16 MiB: dict_size * 7.5</li>
+<li>dict_size &gt; 16 MiB: dict_size * 5.5 + 64 MiB </li>
+</ul>
+</td></tr>
+<tr><td class="fieldname"><a id="acf740075f86fa61dc408d6d0dbf8fa80a0944620f4949289c2ebde613cae12b04" name="acf740075f86fa61dc408d6d0dbf8fa80a0944620f4949289c2ebde613cae12b04"></a>LZMA_MF_HC4&#160;</td><td class="fielddoc"><p>Hash Chain with 2-, 3-, and 4-byte hashing. </p>
+<p>Minimum nice_len: 4</p>
+<p>Memory usage:</p><ul>
+<li>dict_size &lt;= 32 MiB: dict_size * 7.5</li>
+<li>dict_size &gt; 32 MiB: dict_size * 6.5 </li>
+</ul>
+</td></tr>
+<tr><td class="fieldname"><a id="acf740075f86fa61dc408d6d0dbf8fa80a7ab212446c3f6520f5c33ccfa4b3386a" name="acf740075f86fa61dc408d6d0dbf8fa80a7ab212446c3f6520f5c33ccfa4b3386a"></a>LZMA_MF_BT2&#160;</td><td class="fielddoc"><p>Binary Tree with 2-byte hashing. </p>
+<p>Minimum nice_len: 2</p>
+<p>Memory usage: dict_size * 9.5 </p>
+</td></tr>
+<tr><td class="fieldname"><a id="acf740075f86fa61dc408d6d0dbf8fa80a983ecc59bf3e07a7c43fea551ea11865" name="acf740075f86fa61dc408d6d0dbf8fa80a983ecc59bf3e07a7c43fea551ea11865"></a>LZMA_MF_BT3&#160;</td><td class="fielddoc"><p>Binary Tree with 2- and 3-byte hashing. </p>
+<p>Minimum nice_len: 3</p>
+<p>Memory usage:</p><ul>
+<li>dict_size &lt;= 16 MiB: dict_size * 11.5</li>
+<li>dict_size &gt; 16 MiB: dict_size * 9.5 + 64 MiB </li>
+</ul>
+</td></tr>
+<tr><td class="fieldname"><a id="acf740075f86fa61dc408d6d0dbf8fa80a468c32cdea9861d1ff98478364e6c547" name="acf740075f86fa61dc408d6d0dbf8fa80a468c32cdea9861d1ff98478364e6c547"></a>LZMA_MF_BT4&#160;</td><td class="fielddoc"><p>Binary Tree with 2-, 3-, and 4-byte hashing. </p>
+<p>Minimum nice_len: 4</p>
+<p>Memory usage:</p><ul>
+<li>dict_size &lt;= 32 MiB: dict_size * 11.5</li>
+<li>dict_size &gt; 32 MiB: dict_size * 10.5 </li>
+</ul>
+</td></tr>
+</table>
+
+</div>
+</div>
+<a id="a1032316e3075c2c8086fb17104b91866" name="a1032316e3075c2c8086fb17104b91866"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1032316e3075c2c8086fb17104b91866">&#9670;&#160;</a></span>lzma_mode</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">enum <a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma_mode</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Compression modes. </p>
+<p>This selects the function used to analyze the data produced by the match finder. </p>
+<table class="fieldtable">
+<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a1032316e3075c2c8086fb17104b91866ac8c0926a91b4f756e11121efd30648cc" name="a1032316e3075c2c8086fb17104b91866ac8c0926a91b4f756e11121efd30648cc"></a>LZMA_MODE_FAST&#160;</td><td class="fielddoc"><p>Fast compression. </p>
+<p>Fast mode is usually at its best when combined with a hash chain match finder. </p>
+</td></tr>
+<tr><td class="fieldname"><a id="a1032316e3075c2c8086fb17104b91866ad37225f30d5cd21fc8bb3eaba283bbf9" name="a1032316e3075c2c8086fb17104b91866ad37225f30d5cd21fc8bb3eaba283bbf9"></a>LZMA_MODE_NORMAL&#160;</td><td class="fielddoc"><p>Normal compression. </p>
+<p>This is usually notably slower than fast mode. Use this together with binary tree match finders to expose the full potential of the LZMA1 or LZMA2 encoder. </p>
+</td></tr>
+</table>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="aefba1f7214ddcf8cd408a0702e8642b5" name="aefba1f7214ddcf8cd408a0702e8642b5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aefba1f7214ddcf8cd408a0702e8642b5">&#9670;&#160;</a></span>lzma_mf_is_supported()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_mf_is_supported </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a>&#160;</td>
+ <td class="paramname"><em>match_finder</em></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Test if given match finder is supported. </p>
+<p>It is safe to call this with a value that isn't listed in lzma_match_finder enumeration; the return value will be false.</p>
+<p>There is no way to list which match finders are available in this particular liblzma version and build. It would be useless, because a new match finder, which the application developer wasn't aware, could require giving additional options to the encoder that the older match finders don't need.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">match_finder</td><td>Match finder ID</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if the match finder is supported by this liblzma build.</li>
+<li>false otherwise. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ad1add1c2600fdbb3d737e4fb3465dfcb" name="ad1add1c2600fdbb3d737e4fb3465dfcb"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad1add1c2600fdbb3d737e4fb3465dfcb">&#9670;&#160;</a></span>lzma_mode_is_supported()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_mode_is_supported </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma_mode</a>&#160;</td>
+ <td class="paramname"><em>mode</em></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Test if given compression mode is supported. </p>
+<p>It is safe to call this with a value that isn't listed in lzma_mode enumeration; the return value will be false.</p>
+<p>There is no way to list which modes are available in this particular liblzma version and build. It would be useless, because a new compression mode, which the application developer wasn't aware, could require giving additional options to the encoder that the older modes don't need.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">mode</td><td>Mode ID.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if the compression mode is supported by this liblzma build.</li>
+<li>false otherwise. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="aa62c28944fe3575653a4c25780400d77" name="aa62c28944fe3575653a4c25780400d77"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa62c28944fe3575653a4c25780400d77">&#9670;&#160;</a></span>lzma_lzma_preset()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_lzma_preset </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__options__lzma.html">lzma_options_lzma</a> *&#160;</td>
+ <td class="paramname"><em>options</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint32_t&#160;</td>
+ <td class="paramname"><em>preset</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Set a compression preset to <a class="el" href="structlzma__options__lzma.html" title="Options specific to the LZMA1 and LZMA2 filters.">lzma_options_lzma</a> structure. </p>
+<p>0 is the fastest and 9 is the slowest. These match the switches -0 .. -9 of the xz command line tool. In addition, it is possible to bitwise-or flags to the preset. Currently only LZMA_PRESET_EXTREME is supported. The flags are defined in <a class="el" href="container_8h.html" title="File formats.">container.h</a>, because the flags are used also with <a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4" title="Initialize .xz Stream encoder using a preset number.">lzma_easy_encoder()</a>.</p>
+<p>The preset levels are subject to changes between liblzma versions.</p>
+<p>This function is available only if LZMA1 or LZMA2 encoder has been enabled when building liblzma.</p>
+<p>If features (like certain match finders) have been disabled at build time, then the function may return success (false) even though the resulting LZMA1/LZMA2 options may not be usable for encoder initialization (LZMA_OPTIONS_ERROR).</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">options</td><td>Pointer to LZMA1 or LZMA2 options to be filled </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">preset</td><td>Preset level bitwse-ORed with preset flags</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>lzma_bool:<ul>
+<li>true if the preset is not supported (failure).</li>
+<li>false otherwise (success). </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/lzma_8h.html b/doc/api/lzma_8h.html
new file mode 100644
index 0000000..ec417c6
--- /dev/null
+++ b/doc/api/lzma_8h.html
@@ -0,0 +1,109 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#define-members">Macros</a> </div>
+ <div class="headertitle"><div class="title">lzma.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>The public API of liblzma data compression library.
+<a href="#details">More...</a></p>
+<div class="textblock"><code>#include &lt;stddef.h&gt;</code><br />
+<code>#include &lt;inttypes.h&gt;</code><br />
+<code>#include &lt;limits.h&gt;</code><br />
+<code>#include &quot;<a class="el" href="version_8h.html">lzma/version.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="base_8h.html">lzma/base.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="vli_8h.html">lzma/vli.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="check_8h.html">lzma/check.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="filter_8h.html">lzma/filter.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="bcj_8h.html">lzma/bcj.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="delta_8h.html">lzma/delta.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="lzma12_8h.html">lzma/lzma12.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="container_8h.html">lzma/container.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="stream__flags_8h.html">lzma/stream_flags.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="block_8h.html">lzma/block.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="index_8h.html">lzma/index.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="index__hash_8h.html">lzma/index_hash.h</a>&quot;</code><br />
+<code>#include &quot;<a class="el" href="hardware_8h.html">lzma/hardware.h</a>&quot;</code><br />
+</div><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:acecee981dc3f28418f54035e20d7e578"><td class="memItemLeft" align="right" valign="top"><a id="acecee981dc3f28418f54035e20d7e578" name="acecee981dc3f28418f54035e20d7e578"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>UINT32_C</b>(n)&#160;&#160;&#160;n ## U</td></tr>
+<tr class="separator:acecee981dc3f28418f54035e20d7e578"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ac6548785b283106d4d7bfc7a4ef87fc4"><td class="memItemLeft" align="right" valign="top"><a id="ac6548785b283106d4d7bfc7a4ef87fc4" name="ac6548785b283106d4d7bfc7a4ef87fc4"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>UINT64_C</b>(n)&#160;&#160;&#160;n ## UL</td></tr>
+<tr class="separator:ac6548785b283106d4d7bfc7a4ef87fc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab5eb23180f7cc12b7d6c04a8ec067fdd"><td class="memItemLeft" align="right" valign="top"><a id="ab5eb23180f7cc12b7d6c04a8ec067fdd" name="ab5eb23180f7cc12b7d6c04a8ec067fdd"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>UINT32_MAX</b>&#160;&#160;&#160;(UINT32_C(4294967295))</td></tr>
+<tr class="separator:ab5eb23180f7cc12b7d6c04a8ec067fdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a30654b4b67d97c42ca3f9b6052dda916"><td class="memItemLeft" align="right" valign="top"><a id="a30654b4b67d97c42ca3f9b6052dda916" name="a30654b4b67d97c42ca3f9b6052dda916"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>UINT64_MAX</b>&#160;&#160;&#160;(UINT64_C(18446744073709551615))</td></tr>
+<tr class="separator:a30654b4b67d97c42ca3f9b6052dda916"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a55854429aba444dbb0bd8325fed4eece"><td class="memItemLeft" align="right" valign="top"><a id="a55854429aba444dbb0bd8325fed4eece" name="a55854429aba444dbb0bd8325fed4eece"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>lzma_nothrow</b></td></tr>
+<tr class="separator:a55854429aba444dbb0bd8325fed4eece"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:adbc570ea8654f0c96699e38249ac8032"><td class="memItemLeft" align="right" valign="top"><a id="adbc570ea8654f0c96699e38249ac8032" name="adbc570ea8654f0c96699e38249ac8032"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>lzma_attr_pure</b>&#160;&#160;&#160;lzma_attribute((__pure__))</td></tr>
+<tr class="separator:adbc570ea8654f0c96699e38249ac8032"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0aaafb664f89a525ff22530d61704556"><td class="memItemLeft" align="right" valign="top"><a id="a0aaafb664f89a525ff22530d61704556" name="a0aaafb664f89a525ff22530d61704556"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>lzma_attr_const</b>&#160;&#160;&#160;lzma_attribute((__const__))</td></tr>
+<tr class="separator:a0aaafb664f89a525ff22530d61704556"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af15e147fcd7986ec4dd82660aec2b695"><td class="memItemLeft" align="right" valign="top"><a id="af15e147fcd7986ec4dd82660aec2b695" name="af15e147fcd7986ec4dd82660aec2b695"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>lzma_attr_warn_unused_result</b>&#160;&#160;&#160; lzma_attribute((__warn_unused_result__))</td></tr>
+<tr class="separator:af15e147fcd7986ec4dd82660aec2b695"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af828f75941ade54f8379bb847da37349"><td class="memItemLeft" align="right" valign="top"><a id="af828f75941ade54f8379bb847da37349" name="af828f75941ade54f8379bb847da37349"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_H_INTERNAL</b>&#160;&#160;&#160;1</td></tr>
+<tr class="separator:af828f75941ade54f8379bb847da37349"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>The public API of liblzma data compression library. </p>
+</div></div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/nav_f.png b/doc/api/nav_f.png
new file mode 100644
index 0000000..113913e
--- /dev/null
+++ b/doc/api/nav_f.png
Binary files differ
diff --git a/doc/api/nav_fd.png b/doc/api/nav_fd.png
new file mode 100644
index 0000000..978df01
--- /dev/null
+++ b/doc/api/nav_fd.png
Binary files differ
diff --git a/doc/api/nav_g.png b/doc/api/nav_g.png
new file mode 100644
index 0000000..2093a23
--- /dev/null
+++ b/doc/api/nav_g.png
Binary files differ
diff --git a/doc/api/nav_h.png b/doc/api/nav_h.png
new file mode 100644
index 0000000..4e34efd
--- /dev/null
+++ b/doc/api/nav_h.png
Binary files differ
diff --git a/doc/api/nav_hd.png b/doc/api/nav_hd.png
new file mode 100644
index 0000000..b717d93
--- /dev/null
+++ b/doc/api/nav_hd.png
Binary files differ
diff --git a/doc/api/open.png b/doc/api/open.png
new file mode 100644
index 0000000..b4e49d8
--- /dev/null
+++ b/doc/api/open.png
Binary files differ
diff --git a/doc/api/splitbar.png b/doc/api/splitbar.png
new file mode 100644
index 0000000..ee781cf
--- /dev/null
+++ b/doc/api/splitbar.png
Binary files differ
diff --git a/doc/api/splitbard.png b/doc/api/splitbard.png
new file mode 100644
index 0000000..aa4d029
--- /dev/null
+++ b/doc/api/splitbard.png
Binary files differ
diff --git a/doc/api/stream__flags_8h.html b/doc/api/stream__flags_8h.html
new file mode 100644
index 0000000..5cc0df9
--- /dev/null
+++ b/doc/api/stream__flags_8h.html
@@ -0,0 +1,348 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/stream_flags.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#nested-classes">Data Structures</a> &#124;
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">stream_flags.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>.xz Stream Header and Stream Footer encoder and decoder
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
+Data Structures</h2></td></tr>
+<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a></td></tr>
+<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for encoding/decoding Stream Header and Stream Footer. <a href="structlzma__stream__flags.html#details">More...</a><br /></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:ada7e0a4f5e7146f547962cb9e9ef08ee"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream__flags_8h.html#ada7e0a4f5e7146f547962cb9e9ef08ee">LZMA_STREAM_HEADER_SIZE</a>&#160;&#160;&#160;12</td></tr>
+<tr class="memdesc:ada7e0a4f5e7146f547962cb9e9ef08ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of Stream Header and Stream Footer. <br /></td></tr>
+<tr class="separator:ada7e0a4f5e7146f547962cb9e9ef08ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae8da8190f1396f66332073946bc45634"><td class="memItemLeft" align="right" valign="top"><a id="ae8da8190f1396f66332073946bc45634" name="ae8da8190f1396f66332073946bc45634"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_BACKWARD_SIZE_MIN</b>&#160;&#160;&#160;4</td></tr>
+<tr class="memdesc:ae8da8190f1396f66332073946bc45634"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minimum value for <a class="el" href="structlzma__stream__flags.html#aaa65ed7a55a098f829f04dba25d0f212" title="Backward Size.">lzma_stream_flags.backward_size</a>. <br /></td></tr>
+<tr class="separator:ae8da8190f1396f66332073946bc45634"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2e5e09010880f8caa6cd6539c7341239"><td class="memItemLeft" align="right" valign="top"><a id="a2e5e09010880f8caa6cd6539c7341239" name="a2e5e09010880f8caa6cd6539c7341239"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_BACKWARD_SIZE_MAX</b>&#160;&#160;&#160;(<a class="el" href="vli_8h.html#a2d8bf5322898bfa11945848420585881">LZMA_VLI_C</a>(1) &lt;&lt; 34)</td></tr>
+<tr class="memdesc:a2e5e09010880f8caa6cd6539c7341239"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum value for <a class="el" href="structlzma__stream__flags.html#aaa65ed7a55a098f829f04dba25d0f212" title="Backward Size.">lzma_stream_flags.backward_size</a>. <br /></td></tr>
+<tr class="separator:a2e5e09010880f8caa6cd6539c7341239"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a2ebb8d6dff23daeb3de398913b845eff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream__flags_8h.html#a2ebb8d6dff23daeb3de398913b845eff">lzma_stream_header_encode</a> (const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a2ebb8d6dff23daeb3de398913b845eff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode Stream Header. <br /></td></tr>
+<tr class="separator:a2ebb8d6dff23daeb3de398913b845eff"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a438249a75ea8da952a7474b92bfe7b7a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream__flags_8h.html#a438249a75ea8da952a7474b92bfe7b7a">lzma_stream_footer_encode</a> (const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *options, uint8_t *out) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:a438249a75ea8da952a7474b92bfe7b7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode Stream Footer. <br /></td></tr>
+<tr class="separator:a438249a75ea8da952a7474b92bfe7b7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae03198e464f0d296e601ff841e100805"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream__flags_8h.html#ae03198e464f0d296e601ff841e100805">lzma_stream_header_decode</a> (<a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:ae03198e464f0d296e601ff841e100805"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode Stream Header. <br /></td></tr>
+<tr class="separator:ae03198e464f0d296e601ff841e100805"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa92a383f85753bb79ee23227fa68186c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream__flags_8h.html#aa92a383f85753bb79ee23227fa68186c">lzma_stream_footer_decode</a> (<a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *options, const uint8_t *in) lzma_nothrow lzma_attr_warn_unused_result</td></tr>
+<tr class="memdesc:aa92a383f85753bb79ee23227fa68186c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode Stream Footer. <br /></td></tr>
+<tr class="separator:aa92a383f85753bb79ee23227fa68186c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3e25ca4205021302882a696283d45263"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stream__flags_8h.html#a3e25ca4205021302882a696283d45263">lzma_stream_flags_compare</a> (const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *a, const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *b) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a3e25ca4205021302882a696283d45263"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare two <a class="el" href="structlzma__stream__flags.html" title="Options for encoding/decoding Stream Header and Stream Footer.">lzma_stream_flags</a> structures. <br /></td></tr>
+<tr class="separator:a3e25ca4205021302882a696283d45263"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>.xz Stream Header and Stream Footer encoder and decoder </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="ada7e0a4f5e7146f547962cb9e9ef08ee" name="ada7e0a4f5e7146f547962cb9e9ef08ee"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ada7e0a4f5e7146f547962cb9e9ef08ee">&#9670;&#160;</a></span>LZMA_STREAM_HEADER_SIZE</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_STREAM_HEADER_SIZE&#160;&#160;&#160;12</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Size of Stream Header and Stream Footer. </p>
+<p>Stream Header and Stream Footer have the same size and they are not going to change even if a newer version of the .xz file format is developed in future. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a2ebb8d6dff23daeb3de398913b845eff" name="a2ebb8d6dff23daeb3de398913b845eff"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2ebb8d6dff23daeb3de398913b845eff">&#9670;&#160;</a></span>lzma_stream_header_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_header_encode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;</td>
+ <td class="paramname"><em>options</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encode Stream Header. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">options</td><td>Stream Header options to be encoded. options-&gt;backward_size is ignored and doesn't need to be initialized. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer of LZMA_STREAM_HEADER_SIZE bytes.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_OPTIONS_ERROR: options-&gt;version is not supported by this liblzma version.</li>
+<li>LZMA_PROG_ERROR: Invalid options. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a438249a75ea8da952a7474b92bfe7b7a" name="a438249a75ea8da952a7474b92bfe7b7a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a438249a75ea8da952a7474b92bfe7b7a">&#9670;&#160;</a></span>lzma_stream_footer_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_footer_encode </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;</td>
+ <td class="paramname"><em>options</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encode Stream Footer. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">options</td><td>Stream Footer options to be encoded. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer of LZMA_STREAM_HEADER_SIZE bytes.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Encoding was successful.</li>
+<li>LZMA_OPTIONS_ERROR: options-&gt;version is not supported by this liblzma version.</li>
+<li>LZMA_PROG_ERROR: Invalid options. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="ae03198e464f0d296e601ff841e100805" name="ae03198e464f0d296e601ff841e100805"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae03198e464f0d296e601ff841e100805">&#9670;&#160;</a></span>lzma_stream_header_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_header_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;</td>
+ <td class="paramname"><em>options</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode Stream Header. </p>
+<p>options-&gt;backward_size is always set to LZMA_VLI_UNKNOWN. This is to help comparing Stream Flags from Stream Header and Stream Footer with <a class="el" href="stream__flags_8h.html#a3e25ca4205021302882a696283d45263" title="Compare two lzma_stream_flags structures.">lzma_stream_flags_compare()</a>.</p>
+<dl class="section note"><dt>Note</dt><dd>When decoding .xz files that contain multiple Streams, it may make sense to print "file format not recognized" only if decoding of the Stream Header of the <em>first</em> Stream gives LZMA_FORMAT_ERROR. If non-first Stream Header gives LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is probably more appropriate. For example, the Stream decoder in liblzma uses LZMA_DATA_ERROR if LZMA_FORMAT_ERROR is returned by <a class="el" href="stream__flags_8h.html#ae03198e464f0d296e601ff841e100805" title="Decode Stream Header.">lzma_stream_header_decode()</a> when decoding non-first Stream.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">options</td><td>Target for the decoded Stream Header options. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer of LZMA_STREAM_HEADER_SIZE bytes.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Decoding was successful.</li>
+<li>LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given buffer cannot be Stream Header.</li>
+<li>LZMA_DATA_ERROR: CRC32 doesn't match, thus the header is corrupt.</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported options are present in the header. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="aa92a383f85753bb79ee23227fa68186c" name="aa92a383f85753bb79ee23227fa68186c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa92a383f85753bb79ee23227fa68186c">&#9670;&#160;</a></span>lzma_stream_footer_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_footer_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;</td>
+ <td class="paramname"><em>options</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode Stream Footer. </p>
+<dl class="section note"><dt>Note</dt><dd>If Stream Header was already decoded successfully, but decoding Stream Footer returns LZMA_FORMAT_ERROR, the application should probably report some other error message than "file format not recognized". The file likely is corrupt (possibly truncated). The Stream decoder in liblzma uses LZMA_DATA_ERROR in this situation.</dd></dl>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">options</td><td>Target for the decoded Stream Footer options. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer of LZMA_STREAM_HEADER_SIZE bytes.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Decoding was successful.</li>
+<li>LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given buffer cannot be Stream Footer.</li>
+<li>LZMA_DATA_ERROR: CRC32 doesn't match, thus the Stream Footer is corrupt.</li>
+<li>LZMA_OPTIONS_ERROR: Unsupported options are present in Stream Footer. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+<a id="a3e25ca4205021302882a696283d45263" name="a3e25ca4205021302882a696283d45263"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3e25ca4205021302882a696283d45263">&#9670;&#160;</a></span>lzma_stream_flags_compare()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_stream_flags_compare </td>
+ <td>(</td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;</td>
+ <td class="paramname"><em>a</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;</td>
+ <td class="paramname"><em>b</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Compare two <a class="el" href="structlzma__stream__flags.html" title="Options for encoding/decoding Stream Header and Stream Footer.">lzma_stream_flags</a> structures. </p>
+<p>backward_size values are compared only if both are not LZMA_VLI_UNKNOWN.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">a</td><td>Pointer to <a class="el" href="structlzma__stream__flags.html" title="Options for encoding/decoding Stream Header and Stream Footer.">lzma_stream_flags</a> structure </td></tr>
+ <tr><td class="paramname">b</td><td>Pointer to <a class="el" href="structlzma__stream__flags.html" title="Options for encoding/decoding Stream Header and Stream Footer.">lzma_stream_flags</a> structure</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Possible lzma_ret values:<ul>
+<li>LZMA_OK: Both are equal. If either had backward_size set to LZMA_VLI_UNKNOWN, backward_size values were not compared or validated.</li>
+<li>LZMA_DATA_ERROR: The structures differ.</li>
+<li>LZMA_OPTIONS_ERROR: version in either structure is greater than the maximum supported version (currently zero).</li>
+<li>LZMA_PROG_ERROR: Invalid value, e.g. invalid check or backward_size. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__allocator.html b/doc/api/structlzma__allocator.html
new file mode 100644
index 0000000..593647b
--- /dev/null
+++ b/doc/api/structlzma__allocator.html
@@ -0,0 +1,153 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_allocator Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_allocator Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Custom functions for memory handling.
+ <a href="structlzma__allocator.html#details">More...</a></p>
+
+<p><code>#include &lt;base.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:aba5c4369af94cc9943423b49171462ec"><td class="memItemLeft" align="right" valign="top">void *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__allocator.html#aba5c4369af94cc9943423b49171462ec">alloc</a> )(void *<a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268">opaque</a>, size_t nmemb, size_t size)</td></tr>
+<tr class="memdesc:aba5c4369af94cc9943423b49171462ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a custom memory allocation function. <br /></td></tr>
+<tr class="separator:aba5c4369af94cc9943423b49171462ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a3726deffd08393934263c04660208009"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009">free</a> )(void *<a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268">opaque</a>, void *ptr)</td></tr>
+<tr class="memdesc:a3726deffd08393934263c04660208009"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to a custom memory freeing function. <br /></td></tr>
+<tr class="separator:a3726deffd08393934263c04660208009"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aab293a5007a93299cc97ee8b5fb81268"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268">opaque</a></td></tr>
+<tr class="memdesc:aab293a5007a93299cc97ee8b5fb81268"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer passed to .<a class="el" href="structlzma__allocator.html#aba5c4369af94cc9943423b49171462ec" title="Pointer to a custom memory allocation function.">alloc()</a> and .<a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009" title="Pointer to a custom memory freeing function.">free()</a> <br /></td></tr>
+<tr class="separator:aab293a5007a93299cc97ee8b5fb81268"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Custom functions for memory handling. </p>
+<p>A pointer to <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> may be passed via <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> structure to liblzma, and some advanced functions take a pointer to <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> as a separate function argument. The library will use the functions specified in <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> for memory handling instead of the default malloc() and <a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009" title="Pointer to a custom memory freeing function.">free()</a>. C++ users should note that the custom memory handling functions must not throw exceptions.</p>
+<p>Single-threaded mode only: liblzma doesn't make an internal copy of <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a>. Thus, it is OK to change these function pointers in the middle of the coding process, but obviously it must be done carefully to make sure that the replacement `free' can deallocate memory allocated by the earlier `alloc' function(s).</p>
+<p>Multithreaded mode: liblzma might internally store pointers to the <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> given via the <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> structure. The application must not change the allocator pointer in <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> or the contents of the pointed <a class="el" href="structlzma__allocator.html" title="Custom functions for memory handling.">lzma_allocator</a> structure until <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a> has been used to free the memory associated with that <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a>. The allocation functions might be called simultaneously from multiple threads, and thus they must be thread safe. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="aba5c4369af94cc9943423b49171462ec" name="aba5c4369af94cc9943423b49171462ec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aba5c4369af94cc9943423b49171462ec">&#9670;&#160;</a></span>alloc</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void *(* lzma_allocator::alloc) (void *<a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268">opaque</a>, size_t nmemb, size_t size)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Pointer to a custom memory allocation function. </p>
+<p>If you don't want a custom allocator, but still want custom <a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009" title="Pointer to a custom memory freeing function.">free()</a>, set this to NULL and liblzma will use the standard malloc().</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">opaque</td><td><a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268" title="Pointer passed to .alloc() and .free()">lzma_allocator.opaque</a> (see below) </td></tr>
+ <tr><td class="paramname">nmemb</td><td>Number of elements like in calloc(). liblzma will always set nmemb to 1, so it is safe to ignore nmemb in a custom allocator if you like. The nmemb argument exists only for compatibility with zlib and libbzip2. </td></tr>
+ <tr><td class="paramname">size</td><td>Size of an element in bytes. liblzma never sets this to zero.</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Pointer to the beginning of a memory block of `size' bytes, or NULL if allocation fails for some reason. When allocation fails, functions of liblzma return LZMA_MEM_ERROR.</dd></dl>
+<p>The allocator should not waste time zeroing the allocated buffers. This is not only about speed, but also memory usage, since the operating system kernel doesn't necessarily allocate the requested memory in physical memory until it is actually used. With small input files, liblzma may actually need only a fraction of the memory that it requested for allocation.</p>
+<dl class="section note"><dt>Note</dt><dd>LZMA_MEM_ERROR is also used when the size of the allocation would be greater than SIZE_MAX. Thus, don't assume that the custom allocator must have returned NULL if some function from liblzma returns LZMA_MEM_ERROR. </dd></dl>
+
+</div>
+</div>
+<a id="a3726deffd08393934263c04660208009" name="a3726deffd08393934263c04660208009"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3726deffd08393934263c04660208009">&#9670;&#160;</a></span>free</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void(* lzma_allocator::free) (void *<a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268">opaque</a>, void *ptr)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Pointer to a custom memory freeing function. </p>
+<p>If you don't want a custom freeing function, but still want a custom allocator, set this to NULL and liblzma will use the standard <a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009" title="Pointer to a custom memory freeing function.">free()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">opaque</td><td><a class="el" href="structlzma__allocator.html#aab293a5007a93299cc97ee8b5fb81268" title="Pointer passed to .alloc() and .free()">lzma_allocator.opaque</a> (see below) </td></tr>
+ <tr><td class="paramname">ptr</td><td>Pointer returned by <a class="el" href="structlzma__allocator.html#aba5c4369af94cc9943423b49171462ec" title="Pointer to a custom memory allocation function.">lzma_allocator.alloc()</a>, or when it is set to NULL, a pointer returned by the standard malloc(). </td></tr>
+ </table>
+ </dd>
+</dl>
+
+</div>
+</div>
+<a id="aab293a5007a93299cc97ee8b5fb81268" name="aab293a5007a93299cc97ee8b5fb81268"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aab293a5007a93299cc97ee8b5fb81268">&#9670;&#160;</a></span>opaque</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void* lzma_allocator::opaque</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Pointer passed to .<a class="el" href="structlzma__allocator.html#aba5c4369af94cc9943423b49171462ec" title="Pointer to a custom memory allocation function.">alloc()</a> and .<a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009" title="Pointer to a custom memory freeing function.">free()</a> </p>
+<p>opaque is passed as the first argument to <a class="el" href="structlzma__allocator.html#aba5c4369af94cc9943423b49171462ec" title="Pointer to a custom memory allocation function.">lzma_allocator.alloc()</a> and <a class="el" href="structlzma__allocator.html#a3726deffd08393934263c04660208009" title="Pointer to a custom memory freeing function.">lzma_allocator.free()</a>. This intended to ease implementing custom memory allocation functions for use with liblzma.</p>
+<p>If you don't need this, you should set this to NULL. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="base_8h.html">base.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__block.html b/doc/api/structlzma__block.html
new file mode 100644
index 0000000..69aa245
--- /dev/null
+++ b/doc/api/structlzma__block.html
@@ -0,0 +1,347 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_block Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_block Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Options for the Block and Block Header encoders and decoders.
+ <a href="structlzma__block.html#details">More...</a></p>
+
+<p><code>#include &lt;block.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:ac3936a5b0ec3f9b8f9c7ad68e7d149a5"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#ac3936a5b0ec3f9b8f9c7ad68e7d149a5">version</a></td></tr>
+<tr class="memdesc:ac3936a5b0ec3f9b8f9c7ad68e7d149a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block format version. <br /></td></tr>
+<tr class="separator:ac3936a5b0ec3f9b8f9c7ad68e7d149a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6689c4f7524b2c05772a2d6151138610"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#a6689c4f7524b2c05772a2d6151138610">header_size</a></td></tr>
+<tr class="memdesc:a6689c4f7524b2c05772a2d6151138610"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the Block Header field in bytes. <br /></td></tr>
+<tr class="separator:a6689c4f7524b2c05772a2d6151138610"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a80cd9d3025991db4a476ce7588f853e6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#a80cd9d3025991db4a476ce7588f853e6">check</a></td></tr>
+<tr class="memdesc:a80cd9d3025991db4a476ce7588f853e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of integrity Check. <br /></td></tr>
+<tr class="separator:a80cd9d3025991db4a476ce7588f853e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8383d489c9ffea8af390669a105c74e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#a8383d489c9ffea8af390669a105c74e5">compressed_size</a></td></tr>
+<tr class="memdesc:a8383d489c9ffea8af390669a105c74e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the Compressed Data in bytes. <br /></td></tr>
+<tr class="separator:a8383d489c9ffea8af390669a105c74e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a17362d38d1946dd16a9686557ec19a94"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#a17362d38d1946dd16a9686557ec19a94">uncompressed_size</a></td></tr>
+<tr class="memdesc:a17362d38d1946dd16a9686557ec19a94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed Size in bytes. <br /></td></tr>
+<tr class="separator:a17362d38d1946dd16a9686557ec19a94"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5900e517e6e0a473a3184074ae7defd1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#a5900e517e6e0a473a3184074ae7defd1">filters</a></td></tr>
+<tr class="memdesc:a5900e517e6e0a473a3184074ae7defd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Array of filters. <br /></td></tr>
+<tr class="separator:a5900e517e6e0a473a3184074ae7defd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a25e9bf1bb1699017694b18ca24f965d2"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#a25e9bf1bb1699017694b18ca24f965d2">raw_check</a> [<a class="el" href="check_8h.html#a379e931cf86351ab1d97896cda9abbe0">LZMA_CHECK_SIZE_MAX</a>]</td></tr>
+<tr class="memdesc:a25e9bf1bb1699017694b18ca24f965d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raw value stored in the Check field. <br /></td></tr>
+<tr class="separator:a25e9bf1bb1699017694b18ca24f965d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a516ac9cc63bc1a4fadd9fbfc189a206b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__block.html#a516ac9cc63bc1a4fadd9fbfc189a206b">ignore_check</a></td></tr>
+<tr class="memdesc:a516ac9cc63bc1a4fadd9fbfc189a206b"><td class="mdescLeft">&#160;</td><td class="mdescRight">A flag to Block decoder to not verify the Check field. <br /></td></tr>
+<tr class="separator:a516ac9cc63bc1a4fadd9fbfc189a206b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Options for the Block and Block Header encoders and decoders. </p>
+<p>Different Block handling functions use different parts of this structure. Some read some members, other functions write, and some do both. Only the members listed for reading need to be initialized when the specified functions are called. The members marked for writing will be assigned new values at some point either by calling the given function or by later calls to <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="ac3936a5b0ec3f9b8f9c7ad68e7d149a5" name="ac3936a5b0ec3f9b8f9c7ad68e7d149a5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ac3936a5b0ec3f9b8f9c7ad68e7d149a5">&#9670;&#160;</a></span>version</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_block::version</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Block format version. </p>
+<p>To prevent API and ABI breakages when new features are needed, a version number is used to indicate which members in this structure are in use:</p><ul>
+<li>liblzma &gt;= 5.0.0: version = 0 is supported.</li>
+<li>liblzma &gt;= 5.1.4beta: Support for version = 1 was added, which adds the ignore_check member.</li>
+</ul>
+<p>If version is greater than one, most Block related functions will return LZMA_OPTIONS_ERROR (<a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a> works with any version value).</p>
+<p>Read by:</p><ul>
+<li><a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a></li>
+<li><a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a></li>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a></li>
+<li><a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc" title="Validate and set Compressed Size according to Unpadded Size.">lzma_block_compressed_size()</a></li>
+<li><a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30" title="Calculate Unpadded Size.">lzma_block_unpadded_size()</a></li>
+<li><a class="el" href="block_8h.html#a694424f9dfdd5151e01debac1c501fa9" title="Calculate the total encoded size of a Block.">lzma_block_total_size()</a></li>
+<li><a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a></li>
+<li><a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c" title="Single-call uncompressed .xz Block encoder.">lzma_block_uncomp_encode()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a></li>
+</ul>
+<p>Written by:</p><ul>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a> </li>
+</ul>
+
+</div>
+</div>
+<a id="a6689c4f7524b2c05772a2d6151138610" name="a6689c4f7524b2c05772a2d6151138610"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6689c4f7524b2c05772a2d6151138610">&#9670;&#160;</a></span>header_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_block::header_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Size of the Block Header field in bytes. </p>
+<p>This is always a multiple of four.</p>
+<p>Read by:</p><ul>
+<li><a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a></li>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a></li>
+<li><a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc" title="Validate and set Compressed Size according to Unpadded Size.">lzma_block_compressed_size()</a></li>
+<li><a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30" title="Calculate Unpadded Size.">lzma_block_unpadded_size()</a></li>
+<li><a class="el" href="block_8h.html#a694424f9dfdd5151e01debac1c501fa9" title="Calculate the total encoded size of a Block.">lzma_block_total_size()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a></li>
+</ul>
+<p>Written by:</p><ul>
+<li><a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a></li>
+<li><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a></li>
+<li><a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c" title="Single-call uncompressed .xz Block encoder.">lzma_block_uncomp_encode()</a> </li>
+</ul>
+
+</div>
+</div>
+<a id="a80cd9d3025991db4a476ce7588f853e6" name="a80cd9d3025991db4a476ce7588f853e6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a80cd9d3025991db4a476ce7588f853e6">&#9670;&#160;</a></span>check</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> lzma_block::check</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Type of integrity Check. </p>
+<p>The Check ID is not stored into the Block Header, thus its value must be provided also when decoding.</p>
+<p>Read by:</p><ul>
+<li><a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a></li>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a></li>
+<li><a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc" title="Validate and set Compressed Size according to Unpadded Size.">lzma_block_compressed_size()</a></li>
+<li><a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30" title="Calculate Unpadded Size.">lzma_block_unpadded_size()</a></li>
+<li><a class="el" href="block_8h.html#a694424f9dfdd5151e01debac1c501fa9" title="Calculate the total encoded size of a Block.">lzma_block_total_size()</a></li>
+<li><a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a> </li>
+</ul>
+
+</div>
+</div>
+<a id="a8383d489c9ffea8af390669a105c74e5" name="a8383d489c9ffea8af390669a105c74e5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8383d489c9ffea8af390669a105c74e5">&#9670;&#160;</a></span>compressed_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_block::compressed_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Size of the Compressed Data in bytes. </p>
+<p>Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder will store this value to the Block Header. Block encoder doesn't care about this value, but will set it once the encoding has been finished.</p>
+<p>Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will verify that the size of the Compressed Data field matches compressed_size.</p>
+<p>Usually you don't know this value when encoding in streamed mode, and thus cannot write this field into the Block Header.</p>
+<p>In non-streamed mode you can reserve space for this field before encoding the actual Block. After encoding the data, finish the Block by encoding the Block Header. Steps in detail:</p>
+<ul>
+<li>Set compressed_size to some big enough value. If you don't know better, use LZMA_VLI_MAX, but remember that bigger values take more space in Block Header.</li>
+<li>Call <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a> to see how much space you need to reserve for the Block Header.</li>
+<li>Encode the Block using <a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a> and <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>. It sets compressed_size to the correct value.</li>
+<li>Use <a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a> to encode the Block Header. Because space was reserved in the first step, you don't need to call <a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a> anymore, because due to reserving, header_size has to be big enough. If it is "too big", <a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a> will add enough Header Padding to make Block Header to match the size specified by header_size.</li>
+</ul>
+<p>Read by:</p><ul>
+<li><a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a></li>
+<li><a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a></li>
+<li><a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc" title="Validate and set Compressed Size according to Unpadded Size.">lzma_block_compressed_size()</a></li>
+<li><a class="el" href="block_8h.html#a412d5605280fa29befae1b89e344bf30" title="Calculate Unpadded Size.">lzma_block_unpadded_size()</a></li>
+<li><a class="el" href="block_8h.html#a694424f9dfdd5151e01debac1c501fa9" title="Calculate the total encoded size of a Block.">lzma_block_total_size()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a></li>
+</ul>
+<p>Written by:</p><ul>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a></li>
+<li><a class="el" href="block_8h.html#a6c3e102d76db06a07126a569abc6e2bc" title="Validate and set Compressed Size according to Unpadded Size.">lzma_block_compressed_size()</a></li>
+<li><a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a></li>
+<li><a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c" title="Single-call uncompressed .xz Block encoder.">lzma_block_uncomp_encode()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a> </li>
+</ul>
+
+</div>
+</div>
+<a id="a17362d38d1946dd16a9686557ec19a94" name="a17362d38d1946dd16a9686557ec19a94"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a17362d38d1946dd16a9686557ec19a94">&#9670;&#160;</a></span>uncompressed_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_block::uncompressed_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Uncompressed Size in bytes. </p>
+<p>This is handled very similarly to compressed_size above.</p>
+<p>uncompressed_size is needed by fewer functions than compressed_size. This is because uncompressed_size isn't needed to validate that Block stays within proper limits.</p>
+<p>Read by:</p><ul>
+<li><a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a></li>
+<li><a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a></li>
+</ul>
+<p>Written by:</p><ul>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a></li>
+<li><a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a></li>
+<li><a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c" title="Single-call uncompressed .xz Block encoder.">lzma_block_uncomp_encode()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a> </li>
+</ul>
+
+</div>
+</div>
+<a id="a5900e517e6e0a473a3184074ae7defd1" name="a5900e517e6e0a473a3184074ae7defd1"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5900e517e6e0a473a3184074ae7defd1">&#9670;&#160;</a></span>filters</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="structlzma__filter.html">lzma_filter</a>* lzma_block::filters</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Array of filters. </p>
+<p>There can be 1-4 filters. The end of the array is marked with .id = LZMA_VLI_UNKNOWN.</p>
+<p>Read by:</p><ul>
+<li><a class="el" href="block_8h.html#ae9b47abc872d0b02c2da9d3fa5a7dacd" title="Calculate Block Header Size.">lzma_block_header_size()</a></li>
+<li><a class="el" href="block_8h.html#a0eedbd6331d5708ea963260e6f2a92d0" title="Encode Block Header.">lzma_block_header_encode()</a></li>
+<li><a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a></li>
+</ul>
+<p>Written by:</p><ul>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a>: Note that this does NOT free() the old filter options structures. All unused filters[] will have .id == LZMA_VLI_UNKNOWN and .options == NULL. If decoding fails, all filters[] are guaranteed to be LZMA_VLI_UNKNOWN and NULL.</li>
+</ul>
+<dl class="section note"><dt>Note</dt><dd>Because of the array is terminated with .id = LZMA_VLI_UNKNOWN, the actual array must have LZMA_FILTERS_MAX + 1 members or the Block Header decoder will overflow the buffer. </dd></dl>
+
+</div>
+</div>
+<a id="a25e9bf1bb1699017694b18ca24f965d2" name="a25e9bf1bb1699017694b18ca24f965d2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a25e9bf1bb1699017694b18ca24f965d2">&#9670;&#160;</a></span>raw_check</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint8_t lzma_block::raw_check[<a class="el" href="check_8h.html#a379e931cf86351ab1d97896cda9abbe0">LZMA_CHECK_SIZE_MAX</a>]</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Raw value stored in the Check field. </p>
+<p>After successful coding, the first lzma_check_size(check) bytes of this array contain the raw value stored in the Check field.</p>
+<p>Note that CRC32 and CRC64 are stored in little endian byte order. Take it into account if you display the Check values to the user.</p>
+<p>Written by:</p><ul>
+<li><a class="el" href="block_8h.html#a2218a49025a0b44f9a6f9d6d24359359" title="Initialize .xz Block encoder.">lzma_block_encoder()</a></li>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#af415fa5130ab64e8760e9c39e856fa54" title="Single-call .xz Block encoder.">lzma_block_buffer_encode()</a></li>
+<li><a class="el" href="block_8h.html#a5a260f634ccd5f54fb98f570d8d92d8c" title="Single-call uncompressed .xz Block encoder.">lzma_block_uncomp_encode()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a> </li>
+</ul>
+
+</div>
+</div>
+<a id="a516ac9cc63bc1a4fadd9fbfc189a206b" name="a516ac9cc63bc1a4fadd9fbfc189a206b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a516ac9cc63bc1a4fadd9fbfc189a206b">&#9670;&#160;</a></span>ignore_check</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#abbc819c74b484c846825ae1388a50a59">lzma_bool</a> lzma_block::ignore_check</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>A flag to Block decoder to not verify the Check field. </p>
+<p>This member is supported by liblzma &gt;= 5.1.4beta if .version &gt;= 1.</p>
+<p>If this is set to true, the integrity check won't be calculated and verified. Unless you know what you are doing, you should leave this to false. (A reason to set this to true is when the file integrity is verified externally anyway and you want to speed up the decompression, which matters mostly when using SHA-256 as the integrity check.)</p>
+<p>If .version &gt;= 1, read by:</p><ul>
+<li><a class="el" href="block_8h.html#aa92c73b2a228efe921fa2376aa7adc92" title="Initialize .xz Block decoder.">lzma_block_decoder()</a></li>
+<li><a class="el" href="block_8h.html#a0c6eb869d91b08f68648b1aa7a32ee9f" title="Single-call .xz Block decoder.">lzma_block_buffer_decode()</a></li>
+</ul>
+<p>Written by (.version is ignored):</p><ul>
+<li><a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a> always sets this to false </li>
+</ul>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="block_8h.html">block.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__filter.html b/doc/api/structlzma__filter.html
new file mode 100644
index 0000000..b78081c
--- /dev/null
+++ b/doc/api/structlzma__filter.html
@@ -0,0 +1,114 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_filter Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_filter Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Filter options.
+ <a href="structlzma__filter.html#details">More...</a></p>
+
+<p><code>#include &lt;filter.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:aef1d9709759f39e61db77547b2326929"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__filter.html#aef1d9709759f39e61db77547b2326929">id</a></td></tr>
+<tr class="memdesc:aef1d9709759f39e61db77547b2326929"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter ID. <br /></td></tr>
+<tr class="separator:aef1d9709759f39e61db77547b2326929"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a10dfbaa1601793657d12320bef933ee6"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__filter.html#a10dfbaa1601793657d12320bef933ee6">options</a></td></tr>
+<tr class="memdesc:a10dfbaa1601793657d12320bef933ee6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to filter-specific options structure. <br /></td></tr>
+<tr class="separator:a10dfbaa1601793657d12320bef933ee6"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Filter options. </p>
+<p>This structure is used to pass a Filter ID and a pointer to the filter's options to liblzma. A few functions work with a single <a class="el" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> structure, while most functions expect a filter chain.</p>
+<p>A filter chain is indicated with an array of <a class="el" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> structures. The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to be able to hold any arbitrary filter chain. This is important when using <a class="el" href="block_8h.html#a7f5487c21a7b36a8bd17be36074d43c9" title="Decode Block Header.">lzma_block_header_decode()</a> from <a class="el" href="block_8h.html" title=".xz Block handling">block.h</a>, because a filter array that is too small would make liblzma write past the end of the array. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="aef1d9709759f39e61db77547b2326929" name="aef1d9709759f39e61db77547b2326929"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aef1d9709759f39e61db77547b2326929">&#9670;&#160;</a></span>id</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_filter::id</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Filter ID. </p>
+<p>Use constants whose name begin with `LZMA_FILTER_' to specify different filters. In an array of <a class="el" href="structlzma__filter.html" title="Filter options.">lzma_filter</a> structures, use LZMA_VLI_UNKNOWN to indicate end of filters.</p>
+<dl class="section note"><dt>Note</dt><dd>This is not an enum, because on some systems enums cannot be 64-bit. </dd></dl>
+
+</div>
+</div>
+<a id="a10dfbaa1601793657d12320bef933ee6" name="a10dfbaa1601793657d12320bef933ee6"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a10dfbaa1601793657d12320bef933ee6">&#9670;&#160;</a></span>options</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">void* lzma_filter::options</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Pointer to filter-specific options structure. </p>
+<p>If the filter doesn't need options, set this to NULL. If id is set to LZMA_VLI_UNKNOWN, options is ignored, and thus doesn't need be initialized. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="filter_8h.html">filter.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__index__iter.html b/doc/api/structlzma__index__iter.html
new file mode 100644
index 0000000..d75595a
--- /dev/null
+++ b/doc/api/structlzma__index__iter.html
@@ -0,0 +1,407 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_index_iter Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_index_iter Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Iterator to get information about Blocks and Streams.
+ <a href="structlzma__index__iter.html#details">More...</a></p>
+
+<p><code>#include &lt;index.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:ad92e1ccf25428b1a207dc1bdb4a45b2c"><td class="memItemLeft" ><a id="ad92e1ccf25428b1a207dc1bdb4a45b2c" name="ad92e1ccf25428b1a207dc1bdb4a45b2c"></a>
+struct {&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a49a96c22ae9b653df6263a7fe271807a"><td class="memItemLeft" >&#160;&#160;&#160;const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a> *&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a223a046bcf09077a6e720967682deeae">flags</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a49a96c22ae9b653df6263a7fe271807a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to Stream Flags. <a href="structlzma__index__iter.html#a223a046bcf09077a6e720967682deeae">More...</a><br /></td></tr>
+<tr class="separator:a49a96c22ae9b653df6263a7fe271807a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae8d181cfac5188dd4a678d4115fbbcb2"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a115a307dbc778a9de296376dc39c7b23">number</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:ae8d181cfac5188dd4a678d4115fbbcb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stream number in the lzma_index. <a href="structlzma__index__iter.html#a115a307dbc778a9de296376dc39c7b23">More...</a><br /></td></tr>
+<tr class="separator:ae8d181cfac5188dd4a678d4115fbbcb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aeff742c77bbdb23c7f31f6d179b47f31"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#abc6ee9be23e54f31aed07382c8caaf7c">block_count</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:aeff742c77bbdb23c7f31f6d179b47f31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of Blocks in the Stream. <a href="structlzma__index__iter.html#abc6ee9be23e54f31aed07382c8caaf7c">More...</a><br /></td></tr>
+<tr class="separator:aeff742c77bbdb23c7f31f6d179b47f31"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a286009ecb802eb150adb6c6ad1a50918"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a426705df8dde4b094a42f91ea20a46ac">compressed_offset</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a286009ecb802eb150adb6c6ad1a50918"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compressed start offset of this Stream. <a href="structlzma__index__iter.html#a426705df8dde4b094a42f91ea20a46ac">More...</a><br /></td></tr>
+<tr class="separator:a286009ecb802eb150adb6c6ad1a50918"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af1203268640946888544f0af52c19a66"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#abd374b748b4a42e122b90841709609bc">uncompressed_offset</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:af1203268640946888544f0af52c19a66"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed start offset of this Stream. <a href="structlzma__index__iter.html#abd374b748b4a42e122b90841709609bc">More...</a><br /></td></tr>
+<tr class="separator:af1203268640946888544f0af52c19a66"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a6e8737468f3bc6b779c78f45fe6c561c"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a6e73b1f37e3fcf1e9491e4a53b2c52c7">compressed_size</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a6e8737468f3bc6b779c78f45fe6c561c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compressed size of this Stream. <a href="structlzma__index__iter.html#a6e73b1f37e3fcf1e9491e4a53b2c52c7">More...</a><br /></td></tr>
+<tr class="separator:a6e8737468f3bc6b779c78f45fe6c561c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a591f6115029d2655276d7709a604cddc"><td class="memItemLeft" >
+&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<b>uncompressed_size</b>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a591f6115029d2655276d7709a604cddc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed size of this Stream. <br /></td></tr>
+<tr class="separator:a591f6115029d2655276d7709a604cddc"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a081a8169e2014da2f8c8539120809cb5"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a48cfc856f283fe00b0df37402e012818">padding</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a081a8169e2014da2f8c8539120809cb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of Stream Padding after this Stream. <a href="structlzma__index__iter.html#a48cfc856f283fe00b0df37402e012818">More...</a><br /></td></tr>
+<tr class="separator:a081a8169e2014da2f8c8539120809cb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad92e1ccf25428b1a207dc1bdb4a45b2c"><td class="memItemLeft" valign="top">}&#160;</td><td class="memItemRight" valign="bottom"><b>stream</b>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="separator:ad92e1ccf25428b1a207dc1bdb4a45b2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5092ff3be1ff1066585a9066dc5fd2b4"><td class="memItemLeft" ><a id="a5092ff3be1ff1066585a9066dc5fd2b4" name="a5092ff3be1ff1066585a9066dc5fd2b4"></a>
+struct {&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7f332b95b77bd86ea2b3f86fb30375bd"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#abe5333de53562189012d5ed084c0ef98">number_in_file</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a7f332b95b77bd86ea2b3f86fb30375bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block number in the file. <a href="structlzma__index__iter.html#abe5333de53562189012d5ed084c0ef98">More...</a><br /></td></tr>
+<tr class="separator:a7f332b95b77bd86ea2b3f86fb30375bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abc9701ec21240e8d2701afe55d742167"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a26436e75d4c2b5dd8d1de24140d8003e">compressed_file_offset</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:abc9701ec21240e8d2701afe55d742167"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compressed start offset of this Block. <a href="structlzma__index__iter.html#a26436e75d4c2b5dd8d1de24140d8003e">More...</a><br /></td></tr>
+<tr class="separator:abc9701ec21240e8d2701afe55d742167"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae5593002adfeef61b9325b33a4eb687d"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a2f3ecf341b5dc043e9673759b8ff47b9">uncompressed_file_offset</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:ae5593002adfeef61b9325b33a4eb687d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed start offset of this Block. <a href="structlzma__index__iter.html#a2f3ecf341b5dc043e9673759b8ff47b9">More...</a><br /></td></tr>
+<tr class="separator:ae5593002adfeef61b9325b33a4eb687d"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a19a8e58670a1b22612428d5da300f2d2"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a35a752d344ff5d35d2a858a20bd6e5e8">number_in_stream</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a19a8e58670a1b22612428d5da300f2d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Block number in this Stream. <a href="structlzma__index__iter.html#a35a752d344ff5d35d2a858a20bd6e5e8">More...</a><br /></td></tr>
+<tr class="separator:a19a8e58670a1b22612428d5da300f2d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4111d3bc81eb08bf42421814cd76ef33"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a578bba553c43dc59a5e4032d4f6c89a3">compressed_stream_offset</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a4111d3bc81eb08bf42421814cd76ef33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compressed start offset of this Block. <a href="structlzma__index__iter.html#a578bba553c43dc59a5e4032d4f6c89a3">More...</a><br /></td></tr>
+<tr class="separator:a4111d3bc81eb08bf42421814cd76ef33"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aba1991fc46f4ebd0a3ac0bec43d36d56"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a0fc4959fab08e1a6a4902c728c735a99">uncompressed_stream_offset</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:aba1991fc46f4ebd0a3ac0bec43d36d56"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed start offset of this Block. <a href="structlzma__index__iter.html#a0fc4959fab08e1a6a4902c728c735a99">More...</a><br /></td></tr>
+<tr class="separator:aba1991fc46f4ebd0a3ac0bec43d36d56"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8de4ea7cdf905303a31d851e222595db"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#aafc48408ed40060a84ecd66bae5e1b23">uncompressed_size</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a8de4ea7cdf905303a31d851e222595db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Uncompressed size of this Block. <a href="structlzma__index__iter.html#aafc48408ed40060a84ecd66bae5e1b23">More...</a><br /></td></tr>
+<tr class="separator:a8de4ea7cdf905303a31d851e222595db"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1eeb164c66c723607b3ee7ed68b4c22a"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#a9f4e405b9884be08e3a35bc06e3e15df">unpadded_size</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a1eeb164c66c723607b3ee7ed68b4c22a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unpadded size of this Block. <a href="structlzma__index__iter.html#a9f4e405b9884be08e3a35bc06e3e15df">More...</a><br /></td></tr>
+<tr class="separator:a1eeb164c66c723607b3ee7ed68b4c22a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a340f9c08cd05d0931468ab976050ffa2"><td class="memItemLeft" >&#160;&#160;&#160;<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;&#160;&#160;<a class="el" href="structlzma__index__iter.html#ae164ca3d7492dcf5883769c38baac30e">total_size</a>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="memdesc:a340f9c08cd05d0931468ab976050ffa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total compressed size. <a href="structlzma__index__iter.html#ae164ca3d7492dcf5883769c38baac30e">More...</a><br /></td></tr>
+<tr class="separator:a340f9c08cd05d0931468ab976050ffa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5092ff3be1ff1066585a9066dc5fd2b4"><td class="memItemLeft" valign="top">}&#160;</td><td class="memItemRight" valign="bottom"><b>block</b>&#160;</td><td class="memItemRight" valign="bottom"></td></tr>
+<tr class="separator:a5092ff3be1ff1066585a9066dc5fd2b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Iterator to get information about Blocks and Streams. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="a223a046bcf09077a6e720967682deeae" name="a223a046bcf09077a6e720967682deeae"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a223a046bcf09077a6e720967682deeae">&#9670;&#160;</a></span>flags</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="structlzma__stream__flags.html">lzma_stream_flags</a>* lzma_index_iter::flags</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Pointer to Stream Flags. </p>
+<p>This is NULL if Stream Flags have not been set for this Stream with <a class="el" href="index_8h.html#a79a19669237f19f0b11c9f3be80a62b4" title="Set the Stream Flags.">lzma_index_stream_flags()</a>. </p>
+
+</div>
+</div>
+<a id="a115a307dbc778a9de296376dc39c7b23" name="a115a307dbc778a9de296376dc39c7b23"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a115a307dbc778a9de296376dc39c7b23">&#9670;&#160;</a></span>number</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::number</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Stream number in the lzma_index. </p>
+<p>The first Stream is 1. </p>
+
+</div>
+</div>
+<a id="abc6ee9be23e54f31aed07382c8caaf7c" name="abc6ee9be23e54f31aed07382c8caaf7c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abc6ee9be23e54f31aed07382c8caaf7c">&#9670;&#160;</a></span>block_count</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::block_count</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Number of Blocks in the Stream. </p>
+<p>If this is zero, the block structure below has undefined values. </p>
+
+</div>
+</div>
+<a id="a426705df8dde4b094a42f91ea20a46ac" name="a426705df8dde4b094a42f91ea20a46ac"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a426705df8dde4b094a42f91ea20a46ac">&#9670;&#160;</a></span>compressed_offset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::compressed_offset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Compressed start offset of this Stream. </p>
+<p>The offset is relative to the beginning of the lzma_index (i.e. usually the beginning of the .xz file). </p>
+
+</div>
+</div>
+<a id="abd374b748b4a42e122b90841709609bc" name="abd374b748b4a42e122b90841709609bc"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abd374b748b4a42e122b90841709609bc">&#9670;&#160;</a></span>uncompressed_offset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::uncompressed_offset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Uncompressed start offset of this Stream. </p>
+<p>The offset is relative to the beginning of the lzma_index (i.e. usually the beginning of the .xz file). </p>
+
+</div>
+</div>
+<a id="a6e73b1f37e3fcf1e9491e4a53b2c52c7" name="a6e73b1f37e3fcf1e9491e4a53b2c52c7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a6e73b1f37e3fcf1e9491e4a53b2c52c7">&#9670;&#160;</a></span>compressed_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::compressed_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Compressed size of this Stream. </p>
+<p>This includes all headers except the possible Stream Padding after this Stream. </p>
+
+</div>
+</div>
+<a id="aafc48408ed40060a84ecd66bae5e1b23" name="aafc48408ed40060a84ecd66bae5e1b23"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aafc48408ed40060a84ecd66bae5e1b23">&#9670;&#160;</a></span>uncompressed_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::uncompressed_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Uncompressed size of this Stream. </p>
+<p>Uncompressed size of this Block.</p>
+<p>You should pass this to the Block decoder if you will decode this Block. It will allow the Block decoder to validate the uncompressed size. </p>
+
+</div>
+</div>
+<a id="a48cfc856f283fe00b0df37402e012818" name="a48cfc856f283fe00b0df37402e012818"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a48cfc856f283fe00b0df37402e012818">&#9670;&#160;</a></span>padding</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::padding</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Size of Stream Padding after this Stream. </p>
+<p>If it hasn't been set with <a class="el" href="index_8h.html#a3ed82f96c688f3c953f6509b6f4e2ef3" title="Set the amount of Stream Padding.">lzma_index_stream_padding()</a>, this defaults to zero. Stream Padding is always a multiple of four bytes. </p>
+
+</div>
+</div>
+<a id="abe5333de53562189012d5ed084c0ef98" name="abe5333de53562189012d5ed084c0ef98"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abe5333de53562189012d5ed084c0ef98">&#9670;&#160;</a></span>number_in_file</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::number_in_file</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Block number in the file. </p>
+<p>The first Block is 1. </p>
+
+</div>
+</div>
+<a id="a26436e75d4c2b5dd8d1de24140d8003e" name="a26436e75d4c2b5dd8d1de24140d8003e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a26436e75d4c2b5dd8d1de24140d8003e">&#9670;&#160;</a></span>compressed_file_offset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::compressed_file_offset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Compressed start offset of this Block. </p>
+<p>This offset is relative to the beginning of the lzma_index (i.e. usually the beginning of the .xz file). Normally this is where you should seek in the .xz file to start decompressing this Block. </p>
+
+</div>
+</div>
+<a id="a2f3ecf341b5dc043e9673759b8ff47b9" name="a2f3ecf341b5dc043e9673759b8ff47b9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a2f3ecf341b5dc043e9673759b8ff47b9">&#9670;&#160;</a></span>uncompressed_file_offset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::uncompressed_file_offset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Uncompressed start offset of this Block. </p>
+<p>This offset is relative to the beginning of the lzma_index (i.e. usually the beginning of the .xz file).</p>
+<p>When doing random-access reading, it is possible that the target offset is not exactly at Block boundary. One will need to compare the target offset against uncompressed_file_offset or uncompressed_stream_offset, and possibly decode and throw away some amount of data before reaching the target offset. </p>
+
+</div>
+</div>
+<a id="a35a752d344ff5d35d2a858a20bd6e5e8" name="a35a752d344ff5d35d2a858a20bd6e5e8"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a35a752d344ff5d35d2a858a20bd6e5e8">&#9670;&#160;</a></span>number_in_stream</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::number_in_stream</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Block number in this Stream. </p>
+<p>The first Block is 1. </p>
+
+</div>
+</div>
+<a id="a578bba553c43dc59a5e4032d4f6c89a3" name="a578bba553c43dc59a5e4032d4f6c89a3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a578bba553c43dc59a5e4032d4f6c89a3">&#9670;&#160;</a></span>compressed_stream_offset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::compressed_stream_offset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Compressed start offset of this Block. </p>
+<p>This offset is relative to the beginning of the Stream containing this Block. </p>
+
+</div>
+</div>
+<a id="a0fc4959fab08e1a6a4902c728c735a99" name="a0fc4959fab08e1a6a4902c728c735a99"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0fc4959fab08e1a6a4902c728c735a99">&#9670;&#160;</a></span>uncompressed_stream_offset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::uncompressed_stream_offset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Uncompressed start offset of this Block. </p>
+<p>This offset is relative to the beginning of the Stream containing this Block. </p>
+
+</div>
+</div>
+<a id="a9f4e405b9884be08e3a35bc06e3e15df" name="a9f4e405b9884be08e3a35bc06e3e15df"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a9f4e405b9884be08e3a35bc06e3e15df">&#9670;&#160;</a></span>unpadded_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::unpadded_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Unpadded size of this Block. </p>
+<p>You should pass this to the Block decoder if you will decode this Block. It will allow the Block decoder to validate the unpadded size. </p>
+
+</div>
+</div>
+<a id="ae164ca3d7492dcf5883769c38baac30e" name="ae164ca3d7492dcf5883769c38baac30e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae164ca3d7492dcf5883769c38baac30e">&#9670;&#160;</a></span>total_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_index_iter::total_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Total compressed size. </p>
+<p>This includes all headers and padding in this Block. This is useful if you need to know how many bytes the Block decoder will actually read. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="index_8h.html">index.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__mt.html b/doc/api/structlzma__mt.html
new file mode 100644
index 0000000..17a16cc
--- /dev/null
+++ b/doc/api/structlzma__mt.html
@@ -0,0 +1,256 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_mt Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_mt Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Multithreading options.
+ <a href="structlzma__mt.html#details">More...</a></p>
+
+<p><code>#include &lt;container.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:a1c2fe028f547bf58b48b5199557d9a9f"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#a1c2fe028f547bf58b48b5199557d9a9f">flags</a></td></tr>
+<tr class="memdesc:a1c2fe028f547bf58b48b5199557d9a9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags. <br /></td></tr>
+<tr class="separator:a1c2fe028f547bf58b48b5199557d9a9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a881761f858dbda33c697e74acde0be70"><td class="memItemLeft" align="right" valign="top"><a id="a881761f858dbda33c697e74acde0be70" name="a881761f858dbda33c697e74acde0be70"></a>
+uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>threads</b></td></tr>
+<tr class="memdesc:a881761f858dbda33c697e74acde0be70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of worker threads to use. <br /></td></tr>
+<tr class="separator:a881761f858dbda33c697e74acde0be70"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a20cdc7865266ccb88da36a6e68f84d15"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#a20cdc7865266ccb88da36a6e68f84d15">block_size</a></td></tr>
+<tr class="memdesc:a20cdc7865266ccb88da36a6e68f84d15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encoder only: Maximum uncompressed size of a Block. <br /></td></tr>
+<tr class="separator:a20cdc7865266ccb88da36a6e68f84d15"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a298992bf7d2154d8dd814560219d10c2"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#a298992bf7d2154d8dd814560219d10c2">timeout</a></td></tr>
+<tr class="memdesc:a298992bf7d2154d8dd814560219d10c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Timeout to allow <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to return early. <br /></td></tr>
+<tr class="separator:a298992bf7d2154d8dd814560219d10c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab3883b5644752cdd15f01387d58dd050"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#ab3883b5644752cdd15f01387d58dd050">preset</a></td></tr>
+<tr class="memdesc:ab3883b5644752cdd15f01387d58dd050"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encoder only: Compression preset. <br /></td></tr>
+<tr class="separator:ab3883b5644752cdd15f01387d58dd050"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad43a62ef2178c76405e5be0ece7a98b4"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structlzma__filter.html">lzma_filter</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#ad43a62ef2178c76405e5be0ece7a98b4">filters</a></td></tr>
+<tr class="memdesc:ad43a62ef2178c76405e5be0ece7a98b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encoder only: Filter chain (alternative to a preset) <br /></td></tr>
+<tr class="separator:ad43a62ef2178c76405e5be0ece7a98b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae38846e8aca5b20d2a86a2364283b730"><td class="memItemLeft" align="right" valign="top"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#ae38846e8aca5b20d2a86a2364283b730">check</a></td></tr>
+<tr class="memdesc:ae38846e8aca5b20d2a86a2364283b730"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encoder only: Integrity check type. <br /></td></tr>
+<tr class="separator:ae38846e8aca5b20d2a86a2364283b730"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5a7fb0c7c2db350e09e77477bc3c9509"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#a5a7fb0c7c2db350e09e77477bc3c9509">memlimit_threading</a></td></tr>
+<tr class="memdesc:a5a7fb0c7c2db350e09e77477bc3c9509"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory usage limit to reduce the number of threads. <br /></td></tr>
+<tr class="separator:a5a7fb0c7c2db350e09e77477bc3c9509"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab5e0b530d4c572c7a2361aabbad656aa"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__mt.html#ab5e0b530d4c572c7a2361aabbad656aa">memlimit_stop</a></td></tr>
+<tr class="memdesc:ab5e0b530d4c572c7a2361aabbad656aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory usage limit that should never be exceeded. <br /></td></tr>
+<tr class="separator:ab5e0b530d4c572c7a2361aabbad656aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Multithreading options. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="a1c2fe028f547bf58b48b5199557d9a9f" name="a1c2fe028f547bf58b48b5199557d9a9f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1c2fe028f547bf58b48b5199557d9a9f">&#9670;&#160;</a></span>flags</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_mt::flags</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Flags. </p>
+<p>Set this to zero if no flags are wanted.</p>
+<p>Encoder: No flags are currently supported.</p>
+<p>Decoder: Bitwise-or of zero or more of the decoder flags:</p><ul>
+<li>LZMA_TELL_NO_CHECK</li>
+<li>LZMA_TELL_UNSUPPORTED_CHECK</li>
+<li>LZMA_TELL_ANY_CHECK</li>
+<li>LZMA_IGNORE_CHECK</li>
+<li>LZMA_CONCATENATED</li>
+<li>LZMA_FAIL_FAST </li>
+</ul>
+
+</div>
+</div>
+<a id="a20cdc7865266ccb88da36a6e68f84d15" name="a20cdc7865266ccb88da36a6e68f84d15"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a20cdc7865266ccb88da36a6e68f84d15">&#9670;&#160;</a></span>block_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_mt::block_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encoder only: Maximum uncompressed size of a Block. </p>
+<p>The encoder will start a new .xz Block every block_size bytes. Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> the caller may tell liblzma to start a new Block earlier.</p>
+<p>With LZMA2, a recommended block size is 2-4 times the LZMA2 dictionary size. With very small dictionaries, it is recommended to use at least 1 MiB block size for good compression ratio, even if this is more than four times the dictionary size. Note that these are only recommendations for typical use cases; feel free to use other values. Just keep in mind that using a block size less than the LZMA2 dictionary size is waste of RAM.</p>
+<p>Set this to 0 to let liblzma choose the block size depending on the compression options. For LZMA2 it will be 3*dict_size or 1 MiB, whichever is more.</p>
+<p>For each thread, about 3 * block_size bytes of memory will be allocated. This may change in later liblzma versions. If so, the memory usage will probably be reduced, not increased. </p>
+
+</div>
+</div>
+<a id="a298992bf7d2154d8dd814560219d10c2" name="a298992bf7d2154d8dd814560219d10c2"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a298992bf7d2154d8dd814560219d10c2">&#9670;&#160;</a></span>timeout</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_mt::timeout</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Timeout to allow <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to return early. </p>
+<p>Multithreading can make liblzma consume input and produce output in a very bursty way: it may first read a lot of input to fill internal buffers, then no input or output occurs for a while.</p>
+<p>In single-threaded mode, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> won't return until it has either consumed all the input or filled the output buffer. If this is done in multithreaded mode, it may cause a call <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to take even tens of seconds, which isn't acceptable in all applications.</p>
+<p>To avoid very long blocking times in <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a>, a timeout (in milliseconds) may be set here. If <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> would block longer than this number of milliseconds, it will return with LZMA_OK. Reasonable values are 100 ms or more. The xz command line tool uses 300 ms.</p>
+<p>If long blocking times are acceptable, set timeout to a special value of 0. This will disable the timeout mechanism and will make <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> block until all the input is consumed or the output buffer has been filled.</p>
+<dl class="section note"><dt>Note</dt><dd>Even with a timeout, <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> might sometimes take a long time to return. No timing guarantees are made. </dd></dl>
+
+</div>
+</div>
+<a id="ab3883b5644752cdd15f01387d58dd050" name="ab3883b5644752cdd15f01387d58dd050"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab3883b5644752cdd15f01387d58dd050">&#9670;&#160;</a></span>preset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_mt::preset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encoder only: Compression preset. </p>
+<p>The preset is set just like with <a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4" title="Initialize .xz Stream encoder using a preset number.">lzma_easy_encoder()</a>. The preset is ignored if filters below is non-NULL. </p>
+
+</div>
+</div>
+<a id="ad43a62ef2178c76405e5be0ece7a98b4" name="ad43a62ef2178c76405e5be0ece7a98b4"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ad43a62ef2178c76405e5be0ece7a98b4">&#9670;&#160;</a></span>filters</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="structlzma__filter.html">lzma_filter</a>* lzma_mt::filters</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encoder only: Filter chain (alternative to a preset) </p>
+<p>If this is NULL, the preset above is used. Otherwise the preset is ignored and the filter chain specified here is used. </p>
+
+</div>
+</div>
+<a id="ae38846e8aca5b20d2a86a2364283b730" name="ae38846e8aca5b20d2a86a2364283b730"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae38846e8aca5b20d2a86a2364283b730">&#9670;&#160;</a></span>check</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> lzma_mt::check</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encoder only: Integrity check type. </p>
+<p>See <a class="el" href="check_8h.html" title="Integrity checks.">check.h</a> for available checks. The xz command line tool defaults to LZMA_CHECK_CRC64, which is a good choice if you are unsure. </p>
+
+</div>
+</div>
+<a id="a5a7fb0c7c2db350e09e77477bc3c9509" name="a5a7fb0c7c2db350e09e77477bc3c9509"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5a7fb0c7c2db350e09e77477bc3c9509">&#9670;&#160;</a></span>memlimit_threading</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_mt::memlimit_threading</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Memory usage limit to reduce the number of threads. </p>
+<p>Encoder: Ignored.</p>
+<p>Decoder:</p>
+<p>If the number of threads has been set so high that more than memlimit_threading bytes of memory would be needed, the number of threads will be reduced so that the memory usage will not exceed memlimit_threading bytes. However, if memlimit_threading cannot be met even in single-threaded mode, then decoding will continue in single-threaded mode and memlimit_threading may be exceeded even by a large amount. That is, memlimit_threading will never make <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> return LZMA_MEMLIMIT_ERROR. To truly cap the memory usage, see memlimit_stop below.</p>
+<p>Setting memlimit_threading to UINT64_MAX or a similar huge value means that liblzma is allowed to keep the whole compressed file and the whole uncompressed file in memory in addition to the memory needed by the decompressor data structures used by each thread! In other words, a reasonable value limit must be set here or it will cause problems sooner or later. If you have no idea what a reasonable value could be, try <a class="el" href="hardware_8h.html#a85363e453b34272a9f26c9fdffb041ee" title="Get the total amount of physical memory (RAM) in bytes.">lzma_physmem()</a> / 4 as a starting point. Setting this limit will never prevent decompression of a file; this will only reduce the number of threads.</p>
+<p>If memlimit_threading is greater than memlimit_stop, then the value of memlimit_stop will be used for both. </p>
+
+</div>
+</div>
+<a id="ab5e0b530d4c572c7a2361aabbad656aa" name="ab5e0b530d4c572c7a2361aabbad656aa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab5e0b530d4c572c7a2361aabbad656aa">&#9670;&#160;</a></span>memlimit_stop</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_mt::memlimit_stop</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Memory usage limit that should never be exceeded. </p>
+<p>Encoder: Ignored.</p>
+<p>Decoder: If decompressing will need more than this amount of memory even in the single-threaded mode, then <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> will return LZMA_MEMLIMIT_ERROR. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="container_8h.html">container.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__options__bcj.html b/doc/api/structlzma__options__bcj.html
new file mode 100644
index 0000000..b962092
--- /dev/null
+++ b/doc/api/structlzma__options__bcj.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_options_bcj Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_options_bcj Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Options for BCJ filters.
+ <a href="structlzma__options__bcj.html#details">More...</a></p>
+
+<p><code>#include &lt;bcj.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:a3f5a3c62cd82ce89433684f12ed096ac"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__bcj.html#a3f5a3c62cd82ce89433684f12ed096ac">start_offset</a></td></tr>
+<tr class="memdesc:a3f5a3c62cd82ce89433684f12ed096ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start offset for conversions. <br /></td></tr>
+<tr class="separator:a3f5a3c62cd82ce89433684f12ed096ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Options for BCJ filters. </p>
+<p>The BCJ filters never change the size of the data. Specifying options for them is optional: if pointer to options is NULL, default value is used. You probably never need to specify options to BCJ filters, so just set the options pointer to NULL and be happy.</p>
+<p>If options with non-default values have been specified when encoding, the same options must also be specified when decoding.</p>
+<dl class="section note"><dt>Note</dt><dd>At the moment, none of the BCJ filters support LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified, LZMA_OPTIONS_ERROR will be returned. If there is need, partial support for LZMA_SYNC_FLUSH can be added in future. Partial means that flushing would be possible only at offsets that are multiple of 2, 4, or 16 depending on the filter, except x86 which cannot be made to support LZMA_SYNC_FLUSH predictably. </dd></dl>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="a3f5a3c62cd82ce89433684f12ed096ac" name="a3f5a3c62cd82ce89433684f12ed096ac"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a3f5a3c62cd82ce89433684f12ed096ac">&#9670;&#160;</a></span>start_offset</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_bcj::start_offset</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Start offset for conversions. </p>
+<p>This setting is useful only when the same filter is used _separately_ for multiple sections of the same executable file, and the sections contain cross-section branch/call/jump instructions. In that case it is beneficial to set the start offset of the non-first sections so that the relative addresses of the cross-section branch/call/jump instructions will use the same absolute addresses as in the first section.</p>
+<p>When the pointer to options is NULL, the default value (zero) is used. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="bcj_8h.html">bcj.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__options__delta.html b/doc/api/structlzma__options__delta.html
new file mode 100644
index 0000000..294586d
--- /dev/null
+++ b/doc/api/structlzma__options__delta.html
@@ -0,0 +1,113 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_options_delta Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_options_delta Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Options for the Delta filter.
+ <a href="structlzma__options__delta.html#details">More...</a></p>
+
+<p><code>#include &lt;delta.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:af3f1ece7f8c472f4a794953b414c7cd7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="delta_8h.html#a04d84d7fa6cefdc219b6e2e96ff36fe1">lzma_delta_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__delta.html#af3f1ece7f8c472f4a794953b414c7cd7">type</a></td></tr>
+<tr class="separator:af3f1ece7f8c472f4a794953b414c7cd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a31b4b0b5a2462cb9433c2663b8a62790"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__delta.html#a31b4b0b5a2462cb9433c2663b8a62790">dist</a></td></tr>
+<tr class="memdesc:a31b4b0b5a2462cb9433c2663b8a62790"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delta distance. <br /></td></tr>
+<tr class="separator:a31b4b0b5a2462cb9433c2663b8a62790"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Options for the Delta filter. </p>
+<p>These options are needed by both encoder and decoder. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="af3f1ece7f8c472f4a794953b414c7cd7" name="af3f1ece7f8c472f4a794953b414c7cd7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af3f1ece7f8c472f4a794953b414c7cd7">&#9670;&#160;</a></span>type</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="delta_8h.html#a04d84d7fa6cefdc219b6e2e96ff36fe1">lzma_delta_type</a> lzma_options_delta::type</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>For now, this must always be LZMA_DELTA_TYPE_BYTE. </p>
+
+</div>
+</div>
+<a id="a31b4b0b5a2462cb9433c2663b8a62790" name="a31b4b0b5a2462cb9433c2663b8a62790"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a31b4b0b5a2462cb9433c2663b8a62790">&#9670;&#160;</a></span>dist</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_delta::dist</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Delta distance. </p>
+<p>With the only currently supported type, LZMA_DELTA_TYPE_BYTE, the distance is as bytes.</p>
+<p>Examples:</p><ul>
+<li>16-bit stereo audio: distance = 4 bytes</li>
+<li>24-bit RGB image data: distance = 3 bytes </li>
+</ul>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="delta_8h.html">delta.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__options__lzma.html b/doc/api/structlzma__options__lzma.html
new file mode 100644
index 0000000..f8e3adf
--- /dev/null
+++ b/doc/api/structlzma__options__lzma.html
@@ -0,0 +1,363 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_options_lzma Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_options_lzma Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Options specific to the LZMA1 and LZMA2 filters.
+ <a href="structlzma__options__lzma.html#details">More...</a></p>
+
+<p><code>#include &lt;lzma12.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:aeb3f86002405a1191af86def46fca5ad"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#aeb3f86002405a1191af86def46fca5ad">dict_size</a></td></tr>
+<tr class="memdesc:aeb3f86002405a1191af86def46fca5ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dictionary size in bytes. <br /></td></tr>
+<tr class="separator:aeb3f86002405a1191af86def46fca5ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a16a58c1ee3ec18c820d5cb03dde3739a"><td class="memItemLeft" align="right" valign="top">const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a16a58c1ee3ec18c820d5cb03dde3739a">preset_dict</a></td></tr>
+<tr class="memdesc:a16a58c1ee3ec18c820d5cb03dde3739a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to an initial dictionary. <br /></td></tr>
+<tr class="separator:a16a58c1ee3ec18c820d5cb03dde3739a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a655ad4cce9e4dac9cf2a5c8daaa629e0"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a655ad4cce9e4dac9cf2a5c8daaa629e0">preset_dict_size</a></td></tr>
+<tr class="memdesc:a655ad4cce9e4dac9cf2a5c8daaa629e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the preset dictionary. <br /></td></tr>
+<tr class="separator:a655ad4cce9e4dac9cf2a5c8daaa629e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a95f6188e5b5f05c50ec463a315df3585"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a95f6188e5b5f05c50ec463a315df3585">lc</a></td></tr>
+<tr class="memdesc:a95f6188e5b5f05c50ec463a315df3585"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of literal context bits. <br /></td></tr>
+<tr class="separator:a95f6188e5b5f05c50ec463a315df3585"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0fe9c54e808fce3090b6994d95fe41fe"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a0fe9c54e808fce3090b6994d95fe41fe">lp</a></td></tr>
+<tr class="memdesc:a0fe9c54e808fce3090b6994d95fe41fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of literal position bits. <br /></td></tr>
+<tr class="separator:a0fe9c54e808fce3090b6994d95fe41fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:acae107b3d3e9d0d4fe16103be22f4408"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#acae107b3d3e9d0d4fe16103be22f4408">pb</a></td></tr>
+<tr class="memdesc:acae107b3d3e9d0d4fe16103be22f4408"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of position bits. <br /></td></tr>
+<tr class="separator:acae107b3d3e9d0d4fe16103be22f4408"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1d711df9bda046fd3899abf21fa250d5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma_mode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a1d711df9bda046fd3899abf21fa250d5">mode</a></td></tr>
+<tr class="separator:a1d711df9bda046fd3899abf21fa250d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0352ea7f8b6a43b745a44f6cb4e2d263"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a0352ea7f8b6a43b745a44f6cb4e2d263">nice_len</a></td></tr>
+<tr class="memdesc:a0352ea7f8b6a43b745a44f6cb4e2d263"><td class="mdescLeft">&#160;</td><td class="mdescRight">Nice length of a match. <br /></td></tr>
+<tr class="separator:a0352ea7f8b6a43b745a44f6cb4e2d263"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aa99612cd52259093007f33513882dcd0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#aa99612cd52259093007f33513882dcd0">mf</a></td></tr>
+<tr class="separator:aa99612cd52259093007f33513882dcd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4226f686e8c9f6288595fe23d0e15713"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a4226f686e8c9f6288595fe23d0e15713">depth</a></td></tr>
+<tr class="memdesc:a4226f686e8c9f6288595fe23d0e15713"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum search depth in the match finder. <br /></td></tr>
+<tr class="separator:a4226f686e8c9f6288595fe23d0e15713"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ade251d13ef46bcacb4e052b83693878c"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#ade251d13ef46bcacb4e052b83693878c">ext_flags</a></td></tr>
+<tr class="memdesc:ade251d13ef46bcacb4e052b83693878c"><td class="mdescLeft">&#160;</td><td class="mdescRight">For LZMA_FILTER_LZMA1EXT: Extended flags. <br /></td></tr>
+<tr class="separator:ade251d13ef46bcacb4e052b83693878c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a971da8385dcebd01e60235afb3b717f9"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#a971da8385dcebd01e60235afb3b717f9">ext_size_low</a></td></tr>
+<tr class="memdesc:a971da8385dcebd01e60235afb3b717f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">For LZMA_FILTER_LZMA1EXT: Uncompressed size (low bits) <br /></td></tr>
+<tr class="separator:a971da8385dcebd01e60235afb3b717f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae5b3c2375c43ddfacf093980385fb9e3"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__options__lzma.html#ae5b3c2375c43ddfacf093980385fb9e3">ext_size_high</a></td></tr>
+<tr class="memdesc:ae5b3c2375c43ddfacf093980385fb9e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">For LZMA_FILTER_LZMA1EXT: Uncompressed size (high bits) <br /></td></tr>
+<tr class="separator:ae5b3c2375c43ddfacf093980385fb9e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Options specific to the LZMA1 and LZMA2 filters. </p>
+<p>Since LZMA1 and LZMA2 share most of the code, it's simplest to share the options structure too. For encoding, all but the reserved variables need to be initialized unless specifically mentioned otherwise. <a class="el" href="lzma12_8h.html#aa62c28944fe3575653a4c25780400d77" title="Set a compression preset to lzma_options_lzma structure.">lzma_lzma_preset()</a> can be used to get a good starting point.</p>
+<p>For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="aeb3f86002405a1191af86def46fca5ad" name="aeb3f86002405a1191af86def46fca5ad"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aeb3f86002405a1191af86def46fca5ad">&#9670;&#160;</a></span>dict_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::dict_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Dictionary size in bytes. </p>
+<p>Dictionary size indicates how many bytes of the recently processed uncompressed data is kept in memory. One method to reduce size of the uncompressed data is to store distance-length pairs, which indicate what data to repeat from the dictionary buffer. Thus, the bigger the dictionary, the better the compression ratio usually is.</p>
+<p>Maximum size of the dictionary depends on multiple things:</p><ul>
+<li>Memory usage limit</li>
+<li>Available address space (not a problem on 64-bit systems)</li>
+<li>Selected match finder (encoder only)</li>
+</ul>
+<p>Currently the maximum dictionary size for encoding is 1.5 GiB (i.e. (UINT32_C(1) &lt;&lt; 30) + (UINT32_C(1) &lt;&lt; 29)) even on 64-bit systems for certain match finder implementation reasons. In the future, there may be match finders that support bigger dictionaries.</p>
+<p>Decoder already supports dictionaries up to 4 GiB - 1 B (i.e. UINT32_MAX), so increasing the maximum dictionary size of the encoder won't cause problems for old decoders.</p>
+<p>Because extremely small dictionaries sizes would have unneeded overhead in the decoder, the minimum dictionary size is 4096 bytes.</p>
+<dl class="section note"><dt>Note</dt><dd>When decoding, too big dictionary does no other harm than wasting memory. </dd></dl>
+
+</div>
+</div>
+<a id="a16a58c1ee3ec18c820d5cb03dde3739a" name="a16a58c1ee3ec18c820d5cb03dde3739a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a16a58c1ee3ec18c820d5cb03dde3739a">&#9670;&#160;</a></span>preset_dict</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const uint8_t* lzma_options_lzma::preset_dict</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Pointer to an initial dictionary. </p>
+<p>It is possible to initialize the LZ77 history window using a preset dictionary. It is useful when compressing many similar, relatively small chunks of data independently from each other. The preset dictionary should contain typical strings that occur in the files being compressed. The most probable strings should be near the end of the preset dictionary.</p>
+<p>This feature should be used only in special situations. For now, it works correctly only with raw encoding and decoding. Currently none of the container formats supported by liblzma allow preset dictionary when decoding, thus if you create a .xz or .lzma file with preset dictionary, it cannot be decoded with the regular decoder functions. In the future, the .xz format will likely get support for preset dictionary though. </p>
+
+</div>
+</div>
+<a id="a655ad4cce9e4dac9cf2a5c8daaa629e0" name="a655ad4cce9e4dac9cf2a5c8daaa629e0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a655ad4cce9e4dac9cf2a5c8daaa629e0">&#9670;&#160;</a></span>preset_dict_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::preset_dict_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Size of the preset dictionary. </p>
+<p>Specifies the size of the preset dictionary. If the size is bigger than dict_size, only the last dict_size bytes are processed.</p>
+<p>This variable is read only when preset_dict is not NULL. If preset_dict is not NULL but preset_dict_size is zero, no preset dictionary is used (identical to only setting preset_dict to NULL). </p>
+
+</div>
+</div>
+<a id="a95f6188e5b5f05c50ec463a315df3585" name="a95f6188e5b5f05c50ec463a315df3585"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a95f6188e5b5f05c50ec463a315df3585">&#9670;&#160;</a></span>lc</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::lc</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Number of literal context bits. </p>
+<p>How many of the highest bits of the previous uncompressed eight-bit byte (also known as `literal') are taken into account when predicting the bits of the next literal.</p>
+<p>E.g. 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 lc is at least 3, the literal coding can take advantage of this property in the uncompressed data.</p>
+<p>There is a limit that applies to literal context bits and literal position bits together: lc + lp &lt;= 4. Without this limit the decoding could become very slow, which could have security related results in some cases like email servers doing virus scanning. This limit also simplifies the internal implementation in liblzma.</p>
+<p>There may be LZMA1 streams that have lc + lp &gt; 4 (maximum possible lc would be 8). It is not possible to decode such streams with liblzma. </p>
+
+</div>
+</div>
+<a id="a0fe9c54e808fce3090b6994d95fe41fe" name="a0fe9c54e808fce3090b6994d95fe41fe"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0fe9c54e808fce3090b6994d95fe41fe">&#9670;&#160;</a></span>lp</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::lp</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Number of literal position bits. </p>
+<p>lp affects what kind of alignment in the uncompressed data is assumed when encoding literals. A literal is a single 8-bit byte. See pb below for more information about alignment. </p>
+
+</div>
+</div>
+<a id="acae107b3d3e9d0d4fe16103be22f4408" name="acae107b3d3e9d0d4fe16103be22f4408"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#acae107b3d3e9d0d4fe16103be22f4408">&#9670;&#160;</a></span>pb</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::pb</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Number of position bits. </p>
+<p>pb affects what kind of alignment in the uncompressed data is assumed in general. The default means four-byte alignment (2^ pb =2^2=4), which is often a good choice when there's no better guess.</p>
+<p>When the alignment is known, setting pb accordingly may reduce the file size a little. E.g. with text files having one-byte alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can improve compression slightly. For UTF-16 text, pb=1 is a good choice. If the alignment is an odd number like 3 bytes, pb=0 might be the best choice.</p>
+<p>Even though the assumed alignment can be adjusted with pb and lp, 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. </p>
+
+</div>
+</div>
+<a id="a1d711df9bda046fd3899abf21fa250d5" name="a1d711df9bda046fd3899abf21fa250d5"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1d711df9bda046fd3899abf21fa250d5">&#9670;&#160;</a></span>mode</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="lzma12_8h.html#a1032316e3075c2c8086fb17104b91866">lzma_mode</a> lzma_options_lzma::mode</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Compression mode </p>
+
+</div>
+</div>
+<a id="a0352ea7f8b6a43b745a44f6cb4e2d263" name="a0352ea7f8b6a43b745a44f6cb4e2d263"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a0352ea7f8b6a43b745a44f6cb4e2d263">&#9670;&#160;</a></span>nice_len</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::nice_len</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Nice length of a match. </p>
+<p>This determines how many bytes the encoder compares from the match candidates when looking for the best match. Once a match of at least nice_len bytes long is found, the encoder stops looking for better candidates and encodes the match. (Naturally, if the found match is actually longer than nice_len, the actual length is encoded; it's not truncated to nice_len.)</p>
+<p>Bigger values usually increase the compression ratio and compression time. For most files, 32 to 128 is a good value, which gives very good compression ratio at good speed.</p>
+<p>The exact minimum value depends on the match finder. The maximum is 273, which is the maximum length of a match that LZMA1 and LZMA2 can encode. </p>
+
+</div>
+</div>
+<a id="aa99612cd52259093007f33513882dcd0" name="aa99612cd52259093007f33513882dcd0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aa99612cd52259093007f33513882dcd0">&#9670;&#160;</a></span>mf</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="lzma12_8h.html#acf740075f86fa61dc408d6d0dbf8fa80">lzma_match_finder</a> lzma_options_lzma::mf</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Match finder ID </p>
+
+</div>
+</div>
+<a id="a4226f686e8c9f6288595fe23d0e15713" name="a4226f686e8c9f6288595fe23d0e15713"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4226f686e8c9f6288595fe23d0e15713">&#9670;&#160;</a></span>depth</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::depth</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Maximum search depth in the match finder. </p>
+<p>For every input byte, match finder searches through the hash chain or binary tree in a loop, each iteration going one step deeper in the chain or tree. The searching stops if</p><ul>
+<li>a match of at least nice_len bytes long is found;</li>
+<li>all match candidates from the hash chain or binary tree have been checked; or</li>
+<li>maximum search depth is reached.</li>
+</ul>
+<p>Maximum search depth is needed to prevent the match finder from wasting too much time in case there are lots of short match candidates. On the other hand, stopping the search before all candidates have been checked can reduce compression ratio.</p>
+<p>Setting depth to zero tells liblzma to use an automatic default value, that depends on the selected match finder and nice_len. The default is in the range [4, 200] or so (it may vary between liblzma versions).</p>
+<p>Using a bigger depth value than the default can increase compression ratio in some cases. There is no strict maximum value, but high values (thousands or millions) should be used with care: the encoder could remain fast enough with typical input, but malicious input could cause the match finder to slow down dramatically, possibly creating a denial of service attack. </p>
+
+</div>
+</div>
+<a id="ade251d13ef46bcacb4e052b83693878c" name="ade251d13ef46bcacb4e052b83693878c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ade251d13ef46bcacb4e052b83693878c">&#9670;&#160;</a></span>ext_flags</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::ext_flags</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>For LZMA_FILTER_LZMA1EXT: Extended flags. </p>
+<p>This is used only with LZMA_FILTER_LZMA1EXT.</p>
+<p>Currently only one flag is supported, LZMA_LZMA1EXT_ALLOW_EOPM:</p>
+<ul>
+<li>Encoder: If the flag is set, then end marker is written just like it is with LZMA_FILTER_LZMA1. Without this flag the end marker isn't written and the application has to store the uncompressed size somewhere outside the compressed stream. To decompress streams without the end marker, the application has to set the correct uncompressed size in ext_size_low and ext_size_high.</li>
+<li><p class="startli">Decoder: If the uncompressed size in ext_size_low and ext_size_high is set to the special value UINT64_MAX (indicating unknown uncompressed size) then this flag is ignored and the end marker must always be present, that is, the behavior is identical to LZMA_FILTER_LZMA1.</p>
+<p class="startli">Otherwise, if this flag isn't set, then the input stream must not have the end marker; if the end marker is detected then it will result in LZMA_DATA_ERROR. This is useful when it is known that the stream must not have the end marker and strict validation is wanted.</p>
+<p class="startli">If this flag is set, then it is autodetected if the end marker is present after the specified number of uncompressed bytes has been decompressed (ext_size_low and ext_size_high). The end marker isn't allowed in any other position. This behavior is useful when uncompressed size is known but the end marker may or may not be present. This is the case, for example, in .7z files (valid .7z files that have the end marker in LZMA1 streams are rare but they do exist). </p>
+</li>
+</ul>
+
+</div>
+</div>
+<a id="a971da8385dcebd01e60235afb3b717f9" name="a971da8385dcebd01e60235afb3b717f9"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a971da8385dcebd01e60235afb3b717f9">&#9670;&#160;</a></span>ext_size_low</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::ext_size_low</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>For LZMA_FILTER_LZMA1EXT: Uncompressed size (low bits) </p>
+<p>The 64-bit uncompressed size is needed for decompression with LZMA_FILTER_LZMA1EXT. The size is ignored by the encoder.</p>
+<p>The special value UINT64_MAX indicates that the uncompressed size is unknown and that the end of payload marker (also known as end of stream marker) must be present to indicate the end of the LZMA1 stream. Any other value indicates the expected uncompressed size of the LZMA1 stream. (If LZMA1 was used together with filters that change the size of the data then the uncompressed size of the LZMA1 stream could be different than the final uncompressed size of the filtered stream.)</p>
+<p>ext_size_low holds the least significant 32 bits of the uncompressed size. The most significant 32 bits must be set in ext_size_high. The macro lzma_ext_size_set(opt_lzma, u64size) can be used to set these members.</p>
+<p>The 64-bit uncompressed size is split into two uint32_t variables because there were no reserved uint64_t members and using the same options structure for LZMA_FILTER_LZMA1, LZMA_FILTER_LZMA1EXT, and LZMA_FILTER_LZMA2 was otherwise more convenient than having a new options structure for LZMA_FILTER_LZMA1EXT. (Replacing two uint32_t members with one uint64_t changes the ABI on some systems as the alignment of this struct can increase from 4 bytes to 8.) </p>
+
+</div>
+</div>
+<a id="ae5b3c2375c43ddfacf093980385fb9e3" name="ae5b3c2375c43ddfacf093980385fb9e3"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae5b3c2375c43ddfacf093980385fb9e3">&#9670;&#160;</a></span>ext_size_high</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_options_lzma::ext_size_high</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>For LZMA_FILTER_LZMA1EXT: Uncompressed size (high bits) </p>
+<p>This holds the most significant 32 bits of the uncompressed size. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="lzma12_8h.html">lzma12.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__stream.html b/doc/api/structlzma__stream.html
new file mode 100644
index 0000000..5a0c784
--- /dev/null
+++ b/doc/api/structlzma__stream.html
@@ -0,0 +1,251 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_stream Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_stream Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Passing data to and from liblzma.
+ <a href="structlzma__stream.html#details">More...</a></p>
+
+<p><code>#include &lt;base.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:a72fdc738c793f07a5c29715aa57802cf"><td class="memItemLeft" align="right" valign="top">const uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#a72fdc738c793f07a5c29715aa57802cf">next_in</a></td></tr>
+<tr class="separator:a72fdc738c793f07a5c29715aa57802cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:abb680ecea31910cbda1d7a6ad4f191c0"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#abb680ecea31910cbda1d7a6ad4f191c0">avail_in</a></td></tr>
+<tr class="separator:abb680ecea31910cbda1d7a6ad4f191c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a1a411e1755d6185756caefabc3932c7b"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#a1a411e1755d6185756caefabc3932c7b">total_in</a></td></tr>
+<tr class="separator:a1a411e1755d6185756caefabc3932c7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a14ee64ed636ddcb775edf87e2b9f42ec"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#a14ee64ed636ddcb775edf87e2b9f42ec">next_out</a></td></tr>
+<tr class="separator:a14ee64ed636ddcb775edf87e2b9f42ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5ff28ea4e39148723c19f59811627904"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#a5ff28ea4e39148723c19f59811627904">avail_out</a></td></tr>
+<tr class="separator:a5ff28ea4e39148723c19f59811627904"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a80d703ffdfd7661e344fe7b61ff737fa"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#a80d703ffdfd7661e344fe7b61ff737fa">total_out</a></td></tr>
+<tr class="separator:a80d703ffdfd7661e344fe7b61ff737fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4eb2f3e87e32cc4bea613898b0bd353f"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#a4eb2f3e87e32cc4bea613898b0bd353f">allocator</a></td></tr>
+<tr class="memdesc:a4eb2f3e87e32cc4bea613898b0bd353f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Custom memory allocation functions. <br /></td></tr>
+<tr class="separator:a4eb2f3e87e32cc4bea613898b0bd353f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a209da54c2fb5dea40ad011c8408300d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#ab1a60127c640135687a5bcc232cec906">lzma_internal</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#a209da54c2fb5dea40ad011c8408300d0">internal</a></td></tr>
+<tr class="separator:a209da54c2fb5dea40ad011c8408300d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af7c43a61f3dfeb0b9c8487b7f275054e"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream.html#af7c43a61f3dfeb0b9c8487b7f275054e">seek_pos</a></td></tr>
+<tr class="memdesc:af7c43a61f3dfeb0b9c8487b7f275054e"><td class="mdescLeft">&#160;</td><td class="mdescRight">New seek input position for LZMA_SEEK_NEEDED. <br /></td></tr>
+<tr class="separator:af7c43a61f3dfeb0b9c8487b7f275054e"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Passing data to and from liblzma. </p>
+<p>The <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> structure is used for</p><ul>
+<li>passing pointers to input and output buffers to liblzma;</li>
+<li>defining custom memory handler functions; and</li>
+<li>holding a pointer to coder-specific internal data structures.</li>
+</ul>
+<p>Typical usage:</p>
+<ul>
+<li>After allocating <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> (on stack or with malloc()), it must be initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).</li>
+<li>Initialize a coder to the <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a>, for example by using <a class="el" href="container_8h.html#acbdad999c544872f0f5d242f0d1a4ed4" title="Initialize .xz Stream encoder using a preset number.">lzma_easy_encoder()</a> or <a class="el" href="container_8h.html#a21cbebf2771617bb1e956385cfb353e3" title="Decode .xz, .lzma, and .lz (lzip) files with autodetection.">lzma_auto_decoder()</a>. Some notes:<ul>
+<li>In contrast to zlib, strm-&gt;next_in and strm-&gt;next_out are ignored by all initialization functions, thus it is safe to not initialize them yet.</li>
+<li>The initialization functions always set strm-&gt;total_in and strm-&gt;total_out to zero.</li>
+<li>If the initialization function fails, no memory is left allocated that would require freeing with <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a> even if some memory was associated with the <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> structure when the initialization function was called.</li>
+</ul>
+</li>
+<li>Use <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> to do the actual work.</li>
+<li>Once the coding has been finished, the existing <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> can be reused. It is OK to reuse <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> with different initialization function without calling <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a> first. Old allocations are automatically freed.</li>
+<li>Finally, use <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a> to free the allocated memory. <a class="el" href="base_8h.html#a854ff37464ae1225febf14db1af43308" title="Free memory allocated for the coder data structures.">lzma_end()</a> never frees the <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> structure itself.</li>
+</ul>
+<p>Application may modify the values of total_in and total_out as it wants. They are updated by liblzma to match the amount of data read and written but aren't used for anything else except as a possible return values from <a class="el" href="base_8h.html#ab6447cd68eeecbd6b88f21daeb8ce751" title="Get progress information.">lzma_get_progress()</a>. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="a72fdc738c793f07a5c29715aa57802cf" name="a72fdc738c793f07a5c29715aa57802cf"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a72fdc738c793f07a5c29715aa57802cf">&#9670;&#160;</a></span>next_in</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const uint8_t* lzma_stream::next_in</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Pointer to the next input byte. </p>
+
+</div>
+</div>
+<a id="abb680ecea31910cbda1d7a6ad4f191c0" name="abb680ecea31910cbda1d7a6ad4f191c0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#abb680ecea31910cbda1d7a6ad4f191c0">&#9670;&#160;</a></span>avail_in</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t lzma_stream::avail_in</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Number of available input bytes in next_in. </p>
+
+</div>
+</div>
+<a id="a1a411e1755d6185756caefabc3932c7b" name="a1a411e1755d6185756caefabc3932c7b"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1a411e1755d6185756caefabc3932c7b">&#9670;&#160;</a></span>total_in</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_stream::total_in</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Total number of bytes read by liblzma. </p>
+
+</div>
+</div>
+<a id="a14ee64ed636ddcb775edf87e2b9f42ec" name="a14ee64ed636ddcb775edf87e2b9f42ec"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a14ee64ed636ddcb775edf87e2b9f42ec">&#9670;&#160;</a></span>next_out</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint8_t* lzma_stream::next_out</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Pointer to the next output position. </p>
+
+</div>
+</div>
+<a id="a5ff28ea4e39148723c19f59811627904" name="a5ff28ea4e39148723c19f59811627904"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a5ff28ea4e39148723c19f59811627904">&#9670;&#160;</a></span>avail_out</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">size_t lzma_stream::avail_out</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Amount of free space in next_out. </p>
+
+</div>
+</div>
+<a id="a80d703ffdfd7661e344fe7b61ff737fa" name="a80d703ffdfd7661e344fe7b61ff737fa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a80d703ffdfd7661e344fe7b61ff737fa">&#9670;&#160;</a></span>total_out</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_stream::total_out</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Total number of bytes written by liblzma. </p>
+
+</div>
+</div>
+<a id="a4eb2f3e87e32cc4bea613898b0bd353f" name="a4eb2f3e87e32cc4bea613898b0bd353f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4eb2f3e87e32cc4bea613898b0bd353f">&#9670;&#160;</a></span>allocator</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const <a class="el" href="structlzma__allocator.html">lzma_allocator</a>* lzma_stream::allocator</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Custom memory allocation functions. </p>
+<p>In most cases this is NULL which makes liblzma use the standard malloc() and free().</p>
+<dl class="section note"><dt>Note</dt><dd>In 5.0.x this is not a const pointer. </dd></dl>
+
+</div>
+</div>
+<a id="a209da54c2fb5dea40ad011c8408300d0" name="a209da54c2fb5dea40ad011c8408300d0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a209da54c2fb5dea40ad011c8408300d0">&#9670;&#160;</a></span>internal</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#ab1a60127c640135687a5bcc232cec906">lzma_internal</a>* lzma_stream::internal</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<p>Internal state is not visible to applications. </p>
+
+</div>
+</div>
+<a id="af7c43a61f3dfeb0b9c8487b7f275054e" name="af7c43a61f3dfeb0b9c8487b7f275054e"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#af7c43a61f3dfeb0b9c8487b7f275054e">&#9670;&#160;</a></span>seek_pos</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint64_t lzma_stream::seek_pos</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>New seek input position for LZMA_SEEK_NEEDED. </p>
+<p>When <a class="el" href="base_8h.html#a28cc09bc422d5ba1e0187c9f2af5d957" title="Encode or decode data.">lzma_code()</a> returns LZMA_SEEK_NEEDED, the new input position needed by liblzma will be available seek_pos. The value is guaranteed to not exceed the file size that was specified when this <a class="el" href="structlzma__stream.html" title="Passing data to and from liblzma.">lzma_stream</a> was initialized.</p>
+<p>In all other situations the value of this variable is undefined. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="base_8h.html">base.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/structlzma__stream__flags.html b/doc/api/structlzma__stream__flags.html
new file mode 100644
index 0000000..9098ff3
--- /dev/null
+++ b/doc/api/structlzma__stream__flags.html
@@ -0,0 +1,134 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma_stream_flags Struct Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
+ </ul>
+ </div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#pub-attribs">Data Fields</a> </div>
+ <div class="headertitle"><div class="title">lzma_stream_flags Struct Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Options for encoding/decoding Stream Header and Stream Footer.
+ <a href="structlzma__stream__flags.html#details">More...</a></p>
+
+<p><code>#include &lt;stream_flags.h&gt;</code></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-attribs" name="pub-attribs"></a>
+Data Fields</h2></td></tr>
+<tr class="memitem:a61e9151869d5b77c868aaa4958e74d10"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream__flags.html#a61e9151869d5b77c868aaa4958e74d10">version</a></td></tr>
+<tr class="memdesc:a61e9151869d5b77c868aaa4958e74d10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stream Flags format version. <br /></td></tr>
+<tr class="separator:a61e9151869d5b77c868aaa4958e74d10"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:aaa65ed7a55a098f829f04dba25d0f212"><td class="memItemLeft" align="right" valign="top"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream__flags.html#aaa65ed7a55a098f829f04dba25d0f212">backward_size</a></td></tr>
+<tr class="memdesc:aaa65ed7a55a098f829f04dba25d0f212"><td class="mdescLeft">&#160;</td><td class="mdescRight">Backward Size. <br /></td></tr>
+<tr class="separator:aaa65ed7a55a098f829f04dba25d0f212"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ab1052ea7047c8d67f127f33278166647"><td class="memItemLeft" align="right" valign="top"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlzma__stream__flags.html#ab1052ea7047c8d67f127f33278166647">check</a></td></tr>
+<tr class="memdesc:ab1052ea7047c8d67f127f33278166647"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check ID. <br /></td></tr>
+<tr class="separator:ab1052ea7047c8d67f127f33278166647"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Options for encoding/decoding Stream Header and Stream Footer. </p>
+</div><h2 class="groupheader">Field Documentation</h2>
+<a id="a61e9151869d5b77c868aaa4958e74d10" name="a61e9151869d5b77c868aaa4958e74d10"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a61e9151869d5b77c868aaa4958e74d10">&#9670;&#160;</a></span>version</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_stream_flags::version</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Stream Flags format version. </p>
+<p>To prevent API and ABI breakages if new features are needed in Stream Header or Stream Footer, a version number is used to indicate which members in this structure are in use. For now, version must always be zero. With non-zero version, the <a class="el" href="stream__flags_8h.html#a2ebb8d6dff23daeb3de398913b845eff" title="Encode Stream Header.">lzma_stream_header_encode()</a> and <a class="el" href="stream__flags_8h.html#a438249a75ea8da952a7474b92bfe7b7a" title="Encode Stream Footer.">lzma_stream_footer_encode()</a> will return LZMA_OPTIONS_ERROR.</p>
+<p><a class="el" href="stream__flags_8h.html#ae03198e464f0d296e601ff841e100805" title="Decode Stream Header.">lzma_stream_header_decode()</a> and <a class="el" href="stream__flags_8h.html#aa92a383f85753bb79ee23227fa68186c" title="Decode Stream Footer.">lzma_stream_footer_decode()</a> will always set this to the lowest value that supports all the features indicated by the Stream Flags field. The application must check that the version number set by the decoding functions is supported by the application. Otherwise it is possible that the application will decode the Stream incorrectly. </p>
+
+</div>
+</div>
+<a id="aaa65ed7a55a098f829f04dba25d0f212" name="aaa65ed7a55a098f829f04dba25d0f212"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#aaa65ed7a55a098f829f04dba25d0f212">&#9670;&#160;</a></span>backward_size</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> lzma_stream_flags::backward_size</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Backward Size. </p>
+<p>Backward Size must be a multiple of four bytes. In this Stream format version, Backward Size is the size of the Index field.</p>
+<p>Backward Size isn't actually part of the Stream Flags field, but it is convenient to include in this structure anyway. Backward Size is present only in the Stream Footer. There is no need to initialize backward_size when encoding Stream Header.</p>
+<p><a class="el" href="stream__flags_8h.html#ae03198e464f0d296e601ff841e100805" title="Decode Stream Header.">lzma_stream_header_decode()</a> always sets backward_size to LZMA_VLI_UNKNOWN so that it is convenient to use <a class="el" href="stream__flags_8h.html#a3e25ca4205021302882a696283d45263" title="Compare two lzma_stream_flags structures.">lzma_stream_flags_compare()</a> when both Stream Header and Stream Footer have been decoded. </p>
+
+</div>
+</div>
+<a id="ab1052ea7047c8d67f127f33278166647" name="ab1052ea7047c8d67f127f33278166647"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ab1052ea7047c8d67f127f33278166647">&#9670;&#160;</a></span>check</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="check_8h.html#a0a6100c719ac9aa49be3fdf7519e8c3f">lzma_check</a> lzma_stream_flags::check</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Check ID. </p>
+<p>This indicates the type of the integrity check calculated from uncompressed data. </p>
+
+</div>
+</div>
+<hr/>The documentation for this struct was generated from the following file:<ul>
+<li>lzma/<a class="el" href="stream__flags_8h.html">stream_flags.h</a></li>
+</ul>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/sync_off.png b/doc/api/sync_off.png
new file mode 100644
index 0000000..9b04abe
--- /dev/null
+++ b/doc/api/sync_off.png
Binary files differ
diff --git a/doc/api/sync_on.png b/doc/api/sync_on.png
new file mode 100644
index 0000000..34a5b8b
--- /dev/null
+++ b/doc/api/sync_on.png
Binary files differ
diff --git a/doc/api/tab_a.png b/doc/api/tab_a.png
new file mode 100644
index 0000000..3181cdf
--- /dev/null
+++ b/doc/api/tab_a.png
Binary files differ
diff --git a/doc/api/tab_ad.png b/doc/api/tab_ad.png
new file mode 100644
index 0000000..3615386
--- /dev/null
+++ b/doc/api/tab_ad.png
Binary files differ
diff --git a/doc/api/tab_b.png b/doc/api/tab_b.png
new file mode 100644
index 0000000..3feec4f
--- /dev/null
+++ b/doc/api/tab_b.png
Binary files differ
diff --git a/doc/api/tab_bd.png b/doc/api/tab_bd.png
new file mode 100644
index 0000000..9fd6635
--- /dev/null
+++ b/doc/api/tab_bd.png
Binary files differ
diff --git a/doc/api/tab_h.png b/doc/api/tab_h.png
new file mode 100644
index 0000000..abb3d3d
--- /dev/null
+++ b/doc/api/tab_h.png
Binary files differ
diff --git a/doc/api/tab_hd.png b/doc/api/tab_hd.png
new file mode 100644
index 0000000..c59e413
--- /dev/null
+++ b/doc/api/tab_hd.png
Binary files differ
diff --git a/doc/api/tab_s.png b/doc/api/tab_s.png
new file mode 100644
index 0000000..a3f26f5
--- /dev/null
+++ b/doc/api/tab_s.png
Binary files differ
diff --git a/doc/api/tab_sd.png b/doc/api/tab_sd.png
new file mode 100644
index 0000000..5d4917a
--- /dev/null
+++ b/doc/api/tab_sd.png
Binary files differ
diff --git a/doc/api/tabs.css b/doc/api/tabs.css
new file mode 100644
index 0000000..b56f46e
--- /dev/null
+++ b/doc/api/tabs.css
@@ -0,0 +1,62 @@
+.tabs, .tabs2, .tabs3 {
+ background-image: var(--nav-gradient-image);
+ width: 100%;
+ z-index: 101;
+ font-size: var(--nav-font-size-level1);
+ font-family: var(--font-family-nav);
+ display: table;
+}
+
+.tabs2 {
+ font-size: var(--nav-font-size-level2);
+}
+.tabs3 {
+ font-size: var(--nav-font-size-level3);
+}
+
+.tablist {
+ margin: 0;
+ padding: 0;
+ display: block;
+}
+
+.tablist li {
+ float: left;
+ display: table-cell;
+ background-image: var(--nav-gradient-image);
+ line-height: 36px;
+ list-style: none;
+}
+
+.tablist a {
+ display: block;
+ padding: 0 20px;
+ font-weight: bold;
+ background-image:var(--nav-separator-image);
+ background-repeat:no-repeat;
+ background-position:right;
+ color: var(--nav-text-normal-color);
+ text-shadow: var(--nav-text-normal-shadow);
+ text-decoration: none;
+ outline: none;
+}
+
+.tabs3 .tablist a {
+ padding: 0 10px;
+}
+
+.tablist a:hover {
+ background-image: var(--nav-gradient-hover-image);
+ background-repeat:repeat-x;
+ color: var(--nav-text-hover-color);
+ text-shadow: var(--nav-text-hover-shadow);
+ text-decoration: none;
+}
+
+.tablist li.current a {
+ background-image: var(--nav-gradient-active-image);
+ background-repeat:repeat-x;
+ color: var(--nav-text-active-color);
+ text-shadow: var(--nav-text-active-shadow);
+}
+
diff --git a/doc/api/version_8h.html b/doc/api/version_8h.html
new file mode 100644
index 0000000..fd27466
--- /dev/null
+++ b/doc/api/version_8h.html
@@ -0,0 +1,239 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/version.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#define-members">Macros</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">version.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Version number.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:aa0f450c9d3b0ff5f88b55888ed55701f"><td class="memItemLeft" align="right" valign="top"><a id="aa0f450c9d3b0ff5f88b55888ed55701f" name="aa0f450c9d3b0ff5f88b55888ed55701f"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_MAJOR</b>&#160;&#160;&#160;5</td></tr>
+<tr class="memdesc:aa0f450c9d3b0ff5f88b55888ed55701f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Major version number of the liblzma release. <br /></td></tr>
+<tr class="separator:aa0f450c9d3b0ff5f88b55888ed55701f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:af8fd295cf8aa349b0731423ad7a56134"><td class="memItemLeft" align="right" valign="top"><a id="af8fd295cf8aa349b0731423ad7a56134" name="af8fd295cf8aa349b0731423ad7a56134"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_MINOR</b>&#160;&#160;&#160;4</td></tr>
+<tr class="memdesc:af8fd295cf8aa349b0731423ad7a56134"><td class="mdescLeft">&#160;</td><td class="mdescRight">Minor version number of the liblzma release. <br /></td></tr>
+<tr class="separator:af8fd295cf8aa349b0731423ad7a56134"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8b550373cbff381f15d4308b852a3c2a"><td class="memItemLeft" align="right" valign="top"><a id="a8b550373cbff381f15d4308b852a3c2a" name="a8b550373cbff381f15d4308b852a3c2a"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_PATCH</b>&#160;&#160;&#160;5</td></tr>
+<tr class="memdesc:a8b550373cbff381f15d4308b852a3c2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Patch version number of the liblzma release. <br /></td></tr>
+<tr class="separator:a8b550373cbff381f15d4308b852a3c2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ae289abe5dcc203c7cda9f6a9a2f36b3a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="version_8h.html#ae289abe5dcc203c7cda9f6a9a2f36b3a">LZMA_VERSION_STABILITY</a>&#160;&#160;&#160;LZMA_VERSION_STABILITY_STABLE</td></tr>
+<tr class="memdesc:ae289abe5dcc203c7cda9f6a9a2f36b3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Version stability marker. <br /></td></tr>
+<tr class="separator:ae289abe5dcc203c7cda9f6a9a2f36b3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7fd6169ff15ac7f01f94970359a331ea"><td class="memItemLeft" align="right" valign="top"><a id="a7fd6169ff15ac7f01f94970359a331ea" name="a7fd6169ff15ac7f01f94970359a331ea"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_COMMIT</b>&#160;&#160;&#160;&quot;&quot;</td></tr>
+<tr class="memdesc:a7fd6169ff15ac7f01f94970359a331ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Commit version number of the liblzma release. <br /></td></tr>
+<tr class="separator:a7fd6169ff15ac7f01f94970359a331ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5bc145ed7d9149eadb77e547ae8f1c5f"><td class="memItemLeft" align="right" valign="top"><a id="a5bc145ed7d9149eadb77e547ae8f1c5f" name="a5bc145ed7d9149eadb77e547ae8f1c5f"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_STABILITY_ALPHA</b>&#160;&#160;&#160;0</td></tr>
+<tr class="separator:a5bc145ed7d9149eadb77e547ae8f1c5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad53a96c53713062b4380f01fb115cd48"><td class="memItemLeft" align="right" valign="top"><a id="ad53a96c53713062b4380f01fb115cd48" name="ad53a96c53713062b4380f01fb115cd48"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_STABILITY_BETA</b>&#160;&#160;&#160;1</td></tr>
+<tr class="separator:ad53a96c53713062b4380f01fb115cd48"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a97f7ed9e90264388614837baf97a4d3b"><td class="memItemLeft" align="right" valign="top"><a id="a97f7ed9e90264388614837baf97a4d3b" name="a97f7ed9e90264388614837baf97a4d3b"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_STABILITY_STABLE</b>&#160;&#160;&#160;2</td></tr>
+<tr class="separator:a97f7ed9e90264388614837baf97a4d3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a156c47ff34aa0c2b726d0daf799f10a0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="version_8h.html#a156c47ff34aa0c2b726d0daf799f10a0">LZMA_VERSION</a></td></tr>
+<tr class="memdesc:a156c47ff34aa0c2b726d0daf799f10a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compile-time version number. <br /></td></tr>
+<tr class="separator:a156c47ff34aa0c2b726d0daf799f10a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a55a97e55fedce2c148796047ddc88c96"><td class="memItemLeft" align="right" valign="top"><a id="a55a97e55fedce2c148796047ddc88c96" name="a55a97e55fedce2c148796047ddc88c96"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_STABILITY_STRING</b>&#160;&#160;&#160;&quot;alpha&quot;</td></tr>
+<tr class="separator:a55a97e55fedce2c148796047ddc88c96"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a0b89024f7a04da9b754abee2afe6df23"><td class="memItemLeft" align="right" valign="top"><a id="a0b89024f7a04da9b754abee2afe6df23" name="a0b89024f7a04da9b754abee2afe6df23"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_STRING_C_</b>(major, minor, patch, stability, commit)&#160;&#160;&#160; #major &quot;.&quot; #minor &quot;.&quot; #patch stability commit</td></tr>
+<tr class="separator:a0b89024f7a04da9b754abee2afe6df23"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:ad5614eaf4c2e9408a99bc2137c65ed17"><td class="memItemLeft" align="right" valign="top"><a id="ad5614eaf4c2e9408a99bc2137c65ed17" name="ad5614eaf4c2e9408a99bc2137c65ed17"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VERSION_STRING_C</b>(major, minor, patch, stability, commit)&#160;&#160;&#160; LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)</td></tr>
+<tr class="separator:ad5614eaf4c2e9408a99bc2137c65ed17"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a57bb143c993c305a53e9aade831a546c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="version_8h.html#a57bb143c993c305a53e9aade831a546c">LZMA_VERSION_STRING</a></td></tr>
+<tr class="memdesc:a57bb143c993c305a53e9aade831a546c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compile-time version as a string. <br /></td></tr>
+<tr class="separator:a57bb143c993c305a53e9aade831a546c"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a72f929c9b9e8e730b790b3f8c80c3c80"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="version_8h.html#a72f929c9b9e8e730b790b3f8c80c3c80">lzma_version_number</a> (void) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:a72f929c9b9e8e730b790b3f8c80c3c80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run-time version number as an integer. <br /></td></tr>
+<tr class="separator:a72f929c9b9e8e730b790b3f8c80c3c80"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8998c1d8b4b5c2c1218bdfd58fdb1baa"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="version_8h.html#a8998c1d8b4b5c2c1218bdfd58fdb1baa">lzma_version_string</a> (void) lzma_nothrow lzma_attr_const</td></tr>
+<tr class="memdesc:a8998c1d8b4b5c2c1218bdfd58fdb1baa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run-time version as a string. <br /></td></tr>
+<tr class="separator:a8998c1d8b4b5c2c1218bdfd58fdb1baa"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Version number. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead. </dd></dl>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="ae289abe5dcc203c7cda9f6a9a2f36b3a" name="ae289abe5dcc203c7cda9f6a9a2f36b3a"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#ae289abe5dcc203c7cda9f6a9a2f36b3a">&#9670;&#160;</a></span>LZMA_VERSION_STABILITY</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_VERSION_STABILITY&#160;&#160;&#160;LZMA_VERSION_STABILITY_STABLE</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Version stability marker. </p>
+<p>This will always be one of three values:</p><ul>
+<li>LZMA_VERSION_STABILITY_ALPHA</li>
+<li>LZMA_VERSION_STABILITY_BETA</li>
+<li>LZMA_VERSION_STABILITY_STABLE </li>
+</ul>
+
+</div>
+</div>
+<a id="a156c47ff34aa0c2b726d0daf799f10a0" name="a156c47ff34aa0c2b726d0daf799f10a0"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a156c47ff34aa0c2b726d0daf799f10a0">&#9670;&#160;</a></span>LZMA_VERSION</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_VERSION</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line"> (<a class="code hl_define" href="version_8h.html#aa0f450c9d3b0ff5f88b55888ed55701f" title="Major version number of the liblzma release.">LZMA_VERSION_MAJOR</a> * UINT32_C(10000000) \</div>
+<div class="line"> + <a class="code hl_define" href="version_8h.html#af8fd295cf8aa349b0731423ad7a56134" title="Minor version number of the liblzma release.">LZMA_VERSION_MINOR</a> * UINT32_C(10000) \</div>
+<div class="line"> + <a class="code hl_define" href="version_8h.html#a8b550373cbff381f15d4308b852a3c2a" title="Patch version number of the liblzma release.">LZMA_VERSION_PATCH</a> * UINT32_C(10) \</div>
+<div class="line"> + <a class="code hl_define" href="version_8h.html#ae289abe5dcc203c7cda9f6a9a2f36b3a" title="Version stability marker.">LZMA_VERSION_STABILITY</a>)</div>
+</div><!-- fragment -->
+<p>Compile-time version number. </p>
+<p>The version number is of format xyyyzzzs where</p><ul>
+<li>x = major</li>
+<li>yyy = minor</li>
+<li>zzz = revision</li>
+<li>s indicates stability: 0 = alpha, 1 = beta, 2 = stable</li>
+</ul>
+<p>The same xyyyzzz triplet is never reused with different stability levels. For example, if 5.1.0alpha has been released, there will never be 5.1.0beta or 5.1.0 stable.</p>
+<dl class="section note"><dt>Note</dt><dd>The version number of liblzma has nothing to with the version number of Igor Pavlov's LZMA SDK. </dd></dl>
+
+</div>
+</div>
+<a id="a57bb143c993c305a53e9aade831a546c" name="a57bb143c993c305a53e9aade831a546c"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a57bb143c993c305a53e9aade831a546c">&#9670;&#160;</a></span>LZMA_VERSION_STRING</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define LZMA_VERSION_STRING</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+<b>Value:</b><div class="fragment"><div class="line"> LZMA_VERSION_STRING_C( \</div>
+<div class="line"> <a class="code hl_define" href="version_8h.html#aa0f450c9d3b0ff5f88b55888ed55701f" title="Major version number of the liblzma release.">LZMA_VERSION_MAJOR</a>, <a class="code hl_define" href="version_8h.html#af8fd295cf8aa349b0731423ad7a56134" title="Minor version number of the liblzma release.">LZMA_VERSION_MINOR</a>, \</div>
+<div class="line"> <a class="code hl_define" href="version_8h.html#a8b550373cbff381f15d4308b852a3c2a" title="Patch version number of the liblzma release.">LZMA_VERSION_PATCH</a>, LZMA_VERSION_STABILITY_STRING, \</div>
+<div class="line"> <a class="code hl_define" href="version_8h.html#a7fd6169ff15ac7f01f94970359a331ea" title="Commit version number of the liblzma release.">LZMA_VERSION_COMMIT</a>)</div>
+</div><!-- fragment -->
+<p>Compile-time version as a string. </p>
+<p>This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable versions don't have any "stable" suffix). In future, a snapshot built from source code repository may include an additional suffix, for example "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form in LZMA_VERSION macro. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a72f929c9b9e8e730b790b3f8c80c3c80" name="a72f929c9b9e8e730b790b3f8c80c3c80"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a72f929c9b9e8e730b790b3f8c80c3c80">&#9670;&#160;</a></span>lzma_version_number()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_version_number </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Run-time version number as an integer. </p>
+<p>This allows an application to compare if it was built against the same, older, or newer version of liblzma that is currently running.</p>
+<dl class="section return"><dt>Returns</dt><dd>The value of LZMA_VERSION macro at the compile time of liblzma </dd></dl>
+
+</div>
+</div>
+<a id="a8998c1d8b4b5c2c1218bdfd58fdb1baa" name="a8998c1d8b4b5c2c1218bdfd58fdb1baa"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8998c1d8b4b5c2c1218bdfd58fdb1baa">&#9670;&#160;</a></span>lzma_version_string()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">const char * lzma_version_string </td>
+ <td>(</td>
+ <td class="paramtype">void&#160;</td>
+ <td class="paramname"></td><td>)</td>
+ <td> const</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Run-time version as a string. </p>
+<p>This function may be useful to display which version of liblzma an application is currently using.</p>
+<dl class="section return"><dt>Returns</dt><dd>Run-time version of liblzma </dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/api/vli_8h.html b/doc/api/vli_8h.html
new file mode 100644
index 0000000..4e3da1f
--- /dev/null
+++ b/doc/api/vli_8h.html
@@ -0,0 +1,323 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=11"/>
+<meta name="generator" content="Doxygen 1.9.7"/>
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>liblzma (XZ Utils): lzma/vli.h File Reference</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+
+
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr id="projectrow">
+ <td id="projectalign">
+ <div id="projectname">liblzma (XZ Utils)<span id="projectnumber">&#160;5.4.5</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.9.7 -->
+ <div id="navrow1" class="tabs">
+ <ul class="tablist">
+ <li><a href="index.html"><span>Main&#160;Page</span></a></li>
+ <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ </ul>
+ </div>
+ <div id="navrow2" class="tabs2">
+ <ul class="tablist">
+ <li><a href="files.html"><span>File&#160;List</span></a></li>
+ <li><a href="globals.html"><span>Globals</span></a></li>
+ </ul>
+ </div>
+<div id="nav-path" class="navpath">
+ <ul>
+<li class="navelem"><a class="el" href="dir_b17a1d403082bd69a703ed987cf158fb.html">lzma</a></li> </ul>
+</div>
+</div><!-- top -->
+<div class="header">
+ <div class="summary">
+<a href="#define-members">Macros</a> &#124;
+<a href="#typedef-members">Typedefs</a> &#124;
+<a href="#func-members">Functions</a> </div>
+ <div class="headertitle"><div class="title">vli.h File Reference</div></div>
+</div><!--header-->
+<div class="contents">
+
+<p>Variable-length integer handling.
+<a href="#details">More...</a></p>
+<table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
+Macros</h2></td></tr>
+<tr class="memitem:a7b782528bd1934db7c020adbedb20ec9"><td class="memItemLeft" align="right" valign="top"><a id="a7b782528bd1934db7c020adbedb20ec9" name="a7b782528bd1934db7c020adbedb20ec9"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_MAX</b>&#160;&#160;&#160;(UINT64_MAX / 2)</td></tr>
+<tr class="memdesc:a7b782528bd1934db7c020adbedb20ec9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum supported value of a variable-length integer. <br /></td></tr>
+<tr class="separator:a7b782528bd1934db7c020adbedb20ec9"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a5a4b28254a30c859018b896ed371d69a"><td class="memItemLeft" align="right" valign="top"><a id="a5a4b28254a30c859018b896ed371d69a" name="a5a4b28254a30c859018b896ed371d69a"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_UNKNOWN</b>&#160;&#160;&#160;UINT64_MAX</td></tr>
+<tr class="memdesc:a5a4b28254a30c859018b896ed371d69a"><td class="mdescLeft">&#160;</td><td class="mdescRight">VLI value to denote that the value is unknown. <br /></td></tr>
+<tr class="separator:a5a4b28254a30c859018b896ed371d69a"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a063ecff4133aa2f8899b9fa3fdefd310"><td class="memItemLeft" align="right" valign="top"><a id="a063ecff4133aa2f8899b9fa3fdefd310" name="a063ecff4133aa2f8899b9fa3fdefd310"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_BYTES_MAX</b>&#160;&#160;&#160;9</td></tr>
+<tr class="memdesc:a063ecff4133aa2f8899b9fa3fdefd310"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum supported encoded length of variable length integers. <br /></td></tr>
+<tr class="separator:a063ecff4133aa2f8899b9fa3fdefd310"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a2d8bf5322898bfa11945848420585881"><td class="memItemLeft" align="right" valign="top"><a id="a2d8bf5322898bfa11945848420585881" name="a2d8bf5322898bfa11945848420585881"></a>
+#define&#160;</td><td class="memItemRight" valign="bottom"><b>LZMA_VLI_C</b>(n)&#160;&#160;&#160;UINT64_C(n)</td></tr>
+<tr class="memdesc:a2d8bf5322898bfa11945848420585881"><td class="mdescLeft">&#160;</td><td class="mdescRight">VLI constant suffix. <br /></td></tr>
+<tr class="separator:a2d8bf5322898bfa11945848420585881"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a4f67ed698215d865a2b87a95ab1320dd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a4f67ed698215d865a2b87a95ab1320dd">lzma_vli_is_valid</a>(vli)&#160;&#160;&#160; ((vli) &lt;= <a class="el" href="vli_8h.html#a7b782528bd1934db7c020adbedb20ec9">LZMA_VLI_MAX</a> || (vli) == <a class="el" href="vli_8h.html#a5a4b28254a30c859018b896ed371d69a">LZMA_VLI_UNKNOWN</a>)</td></tr>
+<tr class="memdesc:a4f67ed698215d865a2b87a95ab1320dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate a variable-length integer. <br /></td></tr>
+<tr class="separator:a4f67ed698215d865a2b87a95ab1320dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
+Typedefs</h2></td></tr>
+<tr class="memitem:a1dbc0ffc3e72748f64df8f7f71898272"><td class="memItemLeft" align="right" valign="top">typedef uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a></td></tr>
+<tr class="memdesc:a1dbc0ffc3e72748f64df8f7f71898272"><td class="mdescLeft">&#160;</td><td class="mdescRight">Variable-length integer type. <br /></td></tr>
+<tr class="separator:a1dbc0ffc3e72748f64df8f7f71898272"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table><table class="memberdecls">
+<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
+Functions</h2></td></tr>
+<tr class="memitem:a50bbb77e9ec3b72c25586aa700c20970"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a50bbb77e9ec3b72c25586aa700c20970">lzma_vli_encode</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> vli, size_t *vli_pos, uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a50bbb77e9ec3b72c25586aa700c20970"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode a variable-length integer. <br /></td></tr>
+<tr class="separator:a50bbb77e9ec3b72c25586aa700c20970"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a7b7d50e1074e0e2bcd81c29a5f7461c7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a7b7d50e1074e0e2bcd81c29a5f7461c7">lzma_vli_decode</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> *vli, size_t *vli_pos, const uint8_t *in, size_t *in_pos, size_t in_size) lzma_nothrow</td></tr>
+<tr class="memdesc:a7b7d50e1074e0e2bcd81c29a5f7461c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decode a variable-length integer. <br /></td></tr>
+<tr class="separator:a7b7d50e1074e0e2bcd81c29a5f7461c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
+<tr class="memitem:a8d53e0b69934b43da8721fa6f1e8cc4f"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="vli_8h.html#a8d53e0b69934b43da8721fa6f1e8cc4f">lzma_vli_size</a> (<a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> vli) lzma_nothrow lzma_attr_pure</td></tr>
+<tr class="memdesc:a8d53e0b69934b43da8721fa6f1e8cc4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of bytes required to encode a VLI. <br /></td></tr>
+<tr class="separator:a8d53e0b69934b43da8721fa6f1e8cc4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
+</table>
+<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
+<div class="textblock"><p>Variable-length integer handling. </p>
+<dl class="section note"><dt>Note</dt><dd>Never include this file directly. Use &lt;<a class="el" href="lzma_8h.html" title="The public API of liblzma data compression library.">lzma.h</a>&gt; instead.</dd></dl>
+<p>In the .xz format, most integers are encoded in a variable-length representation, which is sometimes called little endian base-128 encoding. This saves space when smaller values are more likely than bigger values.</p>
+<p>The encoding scheme encodes seven bits to every byte, using minimum number of bytes required to represent the given value. Encodings that use non-minimum number of bytes are invalid, thus every integer has exactly one encoded representation. The maximum number of bits in a VLI is 63, thus the vli argument must be less than or equal to UINT64_MAX / 2. You should use LZMA_VLI_MAX for clarity. </p>
+</div><h2 class="groupheader">Macro Definition Documentation</h2>
+<a id="a4f67ed698215d865a2b87a95ab1320dd" name="a4f67ed698215d865a2b87a95ab1320dd"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a4f67ed698215d865a2b87a95ab1320dd">&#9670;&#160;</a></span>lzma_vli_is_valid</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">#define lzma_vli_is_valid</td>
+ <td>(</td>
+ <td class="paramtype">&#160;</td>
+ <td class="paramname">vli</td><td>)</td>
+ <td>&#160;&#160;&#160; ((vli) &lt;= <a class="el" href="vli_8h.html#a7b782528bd1934db7c020adbedb20ec9">LZMA_VLI_MAX</a> || (vli) == <a class="el" href="vli_8h.html#a5a4b28254a30c859018b896ed371d69a">LZMA_VLI_UNKNOWN</a>)</td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Validate a variable-length integer. </p>
+<p>This is useful to test that application has given acceptable values for example in the uncompressed_size and compressed_size variables.</p>
+<dl class="section return"><dt>Returns</dt><dd>True if the integer is representable as VLI or if it indicates unknown value. False if the integer cannot be represented as VLI. </dd></dl>
+
+</div>
+</div>
+<h2 class="groupheader">Typedef Documentation</h2>
+<a id="a1dbc0ffc3e72748f64df8f7f71898272" name="a1dbc0ffc3e72748f64df8f7f71898272"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a1dbc0ffc3e72748f64df8f7f71898272">&#9670;&#160;</a></span>lzma_vli</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">typedef uint64_t <a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Variable-length integer type. </p>
+<p>Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the underlying integer type.</p>
+<p>lzma_vli will be uint64_t for the foreseeable future. If a bigger size is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will not overflow lzma_vli. This simplifies integer overflow detection. </p>
+
+</div>
+</div>
+<h2 class="groupheader">Function Documentation</h2>
+<a id="a50bbb77e9ec3b72c25586aa700c20970" name="a50bbb77e9ec3b72c25586aa700c20970"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a50bbb77e9ec3b72c25586aa700c20970">&#9670;&#160;</a></span>lzma_vli_encode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_vli_encode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>vli</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>vli_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">uint8_t *&#160;</td>
+ <td class="paramname"><em>out</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>out_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>out_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Encode a variable-length integer. </p>
+<p>This function has two modes: single-call and multi-call. Single-call mode encodes the whole integer at once; it is an error if the output buffer is too small. Multi-call mode saves the position in *vli_pos, and thus it is possible to continue encoding if the buffer becomes full before the whole integer has been encoded.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir"></td><td class="paramname">vli</td><td>Integer to be encoded </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">vli_pos</td><td>How many VLI-encoded bytes have already been written out. When starting to encode a new integer in multi-call mode, *vli_pos must be set to zero. To use single-call encoding, set vli_pos to NULL. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>Beginning of the output buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">out_pos</td><td>The next byte will be written to out[*out_pos]. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">out_size</td><td>Size of the out buffer; the first byte into which no data is written to is out[out_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Slightly different return values are used in multi-call and single-call modes.</dd></dl>
+<p>Single-call (vli_pos == NULL):</p><ul>
+<li>LZMA_OK: Integer successfully encoded.</li>
+<li>LZMA_PROG_ERROR: Arguments are not sane. This can be due to too little output space; single-call mode doesn't use LZMA_BUF_ERROR, since the application should have checked the encoded size with <a class="el" href="vli_8h.html#a8d53e0b69934b43da8721fa6f1e8cc4f" title="Get the number of bytes required to encode a VLI.">lzma_vli_size()</a>.</li>
+</ul>
+<p>Multi-call (vli_pos != NULL):</p><ul>
+<li>LZMA_OK: So far all OK, but the integer is not completely written out yet.</li>
+<li>LZMA_STREAM_END: Integer successfully encoded.</li>
+<li>LZMA_BUF_ERROR: No output space was provided.</li>
+<li>LZMA_PROG_ERROR: Arguments are not sane. </li>
+</ul>
+
+</div>
+</div>
+<a id="a7b7d50e1074e0e2bcd81c29a5f7461c7" name="a7b7d50e1074e0e2bcd81c29a5f7461c7"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a7b7d50e1074e0e2bcd81c29a5f7461c7">&#9670;&#160;</a></span>lzma_vli_decode()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname"><a class="el" href="base_8h.html#a8494e0457e1463d6d2b6836018d87b6e">lzma_ret</a> lzma_vli_decode </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a> *&#160;</td>
+ <td class="paramname"><em>vli</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>vli_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">const uint8_t *&#160;</td>
+ <td class="paramname"><em>in</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t *&#160;</td>
+ <td class="paramname"><em>in_pos</em>, </td>
+ </tr>
+ <tr>
+ <td class="paramkey"></td>
+ <td></td>
+ <td class="paramtype">size_t&#160;</td>
+ <td class="paramname"><em>in_size</em>&#160;</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>)</td>
+ <td></td><td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Decode a variable-length integer. </p>
+<p>Like <a class="el" href="vli_8h.html#a50bbb77e9ec3b72c25586aa700c20970" title="Encode a variable-length integer.">lzma_vli_encode()</a>, this function has single-call and multi-call modes.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramdir">[out]</td><td class="paramname">vli</td><td>Pointer to decoded integer. The decoder will initialize it to zero when *vli_pos == 0, so application isn't required to initialize *vli. </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">vli_pos</td><td>How many bytes have already been decoded. When starting to decode a new integer in multi-call mode, *vli_pos must be initialized to zero. To use single-call decoding, set vli_pos to NULL. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in</td><td>Beginning of the input buffer </td></tr>
+ <tr><td class="paramdir">[out]</td><td class="paramname">in_pos</td><td>The next byte will be read from in[*in_pos]. </td></tr>
+ <tr><td class="paramdir"></td><td class="paramname">in_size</td><td>Size of the input buffer; the first byte that won't be read is in[in_size].</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Slightly different return values are used in multi-call and single-call modes.</dd></dl>
+<p>Single-call (vli_pos == NULL):</p><ul>
+<li>LZMA_OK: Integer successfully decoded.</li>
+<li>LZMA_DATA_ERROR: Integer is corrupt. This includes hitting the end of the input buffer before the whole integer was decoded; providing no input at all will use LZMA_DATA_ERROR.</li>
+<li>LZMA_PROG_ERROR: Arguments are not sane.</li>
+</ul>
+<p>Multi-call (vli_pos != NULL):</p><ul>
+<li>LZMA_OK: So far all OK, but the integer is not completely decoded yet.</li>
+<li>LZMA_STREAM_END: Integer successfully decoded.</li>
+<li>LZMA_DATA_ERROR: Integer is corrupt.</li>
+<li>LZMA_BUF_ERROR: No input was provided.</li>
+<li>LZMA_PROG_ERROR: Arguments are not sane. </li>
+</ul>
+
+</div>
+</div>
+<a id="a8d53e0b69934b43da8721fa6f1e8cc4f" name="a8d53e0b69934b43da8721fa6f1e8cc4f"></a>
+<h2 class="memtitle"><span class="permalink"><a href="#a8d53e0b69934b43da8721fa6f1e8cc4f">&#9670;&#160;</a></span>lzma_vli_size()</h2>
+
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">uint32_t lzma_vli_size </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="vli_8h.html#a1dbc0ffc3e72748f64df8f7f71898272">lzma_vli</a>&#160;</td>
+ <td class="paramname"><em>vli</em></td><td>)</td>
+ <td></td>
+ </tr>
+ </table>
+</div><div class="memdoc">
+
+<p>Get the number of bytes required to encode a VLI. </p>
+<dl class="params"><dt>Parameters</dt><dd>
+ <table class="params">
+ <tr><td class="paramname">vli</td><td>Integer whose encoded size is to be determined</td></tr>
+ </table>
+ </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Number of bytes on success (1-9). If vli isn't valid, zero is returned. </dd></dl>
+
+</div>
+</div>
+</div><!-- contents -->
+<!-- start footer part -->
+<hr class="footer"/><address class="footer"><small>
+Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.7
+</small></address>
+</body>
+</html>
diff --git a/doc/examples/00_README.txt b/doc/examples/00_README.txt
new file mode 100644
index 0000000..120e1eb
--- /dev/null
+++ b/doc/examples/00_README.txt
@@ -0,0 +1,31 @@
+
+liblzma example programs
+========================
+
+Introduction
+
+ The examples are written so that the same comments aren't
+ repeated (much) in later files.
+
+ On POSIX systems, the examples should build by just typing "make".
+
+ The examples that use stdin or stdout don't set stdin and stdout
+ to binary mode. On systems where it matters (e.g. Windows) it is
+ possible that the examples won't work without modification.
+
+
+List of examples
+
+ 01_compress_easy.c Multi-call compression using
+ a compression preset
+
+ 02_decompress.c Multi-call decompression
+
+ 03_compress_custom.c Like 01_compress_easy.c but using
+ a custom filter chain
+ (x86 BCJ + LZMA2)
+
+ 04_compress_easy_mt.c Multi-threaded multi-call
+ compression using a compression
+ preset
+
diff --git a/doc/examples/01_compress_easy.c b/doc/examples/01_compress_easy.c
new file mode 100644
index 0000000..ec32a37
--- /dev/null
+++ b/doc/examples/01_compress_easy.c
@@ -0,0 +1,297 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file 01_compress_easy.c
+/// \brief Compress from stdin to stdout in multi-call mode
+///
+/// Usage: ./01_compress_easy PRESET < INFILE > OUTFILE
+///
+/// Example: ./01_compress_easy 6 < foo > foo.xz
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <lzma.h>
+
+
+static void
+show_usage_and_exit(const char *argv0)
+{
+ fprintf(stderr, "Usage: %s PRESET < INFILE > OUTFILE\n"
+ "PRESET is a number 0-9 and can optionally be "
+ "followed by `e' to indicate extreme preset\n",
+ argv0);
+ exit(EXIT_FAILURE);
+}
+
+
+static uint32_t
+get_preset(int argc, char **argv)
+{
+ // One argument whose first char must be 0-9.
+ if (argc != 2 || argv[1][0] < '0' || argv[1][0] > '9')
+ show_usage_and_exit(argv[0]);
+
+ // Calculate the preste level 0-9.
+ uint32_t preset = argv[1][0] - '0';
+
+ // If there is a second char, it must be 'e'. It will set
+ // the LZMA_PRESET_EXTREME flag.
+ if (argv[1][1] != '\0') {
+ if (argv[1][1] != 'e' || argv[1][2] != '\0')
+ show_usage_and_exit(argv[0]);
+
+ preset |= LZMA_PRESET_EXTREME;
+ }
+
+ return preset;
+}
+
+
+static bool
+init_encoder(lzma_stream *strm, uint32_t preset)
+{
+ // Initialize the encoder using a preset. Set the integrity to check
+ // to CRC64, which is the default in the xz command line tool. If
+ // the .xz file needs to be decompressed with XZ Embedded, use
+ // LZMA_CHECK_CRC32 instead.
+ lzma_ret ret = lzma_easy_encoder(strm, preset, LZMA_CHECK_CRC64);
+
+ // Return successfully if the initialization went fine.
+ if (ret == LZMA_OK)
+ return true;
+
+ // Something went wrong. The possible errors are documented in
+ // lzma/container.h (src/liblzma/api/lzma/container.h in the source
+ // package or e.g. /usr/include/lzma/container.h depending on the
+ // install prefix).
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ msg = "Specified preset is not supported";
+ break;
+
+ case LZMA_UNSUPPORTED_CHECK:
+ msg = "Specified integrity check is not supported";
+ break;
+
+ default:
+ // This is most likely LZMA_PROG_ERROR indicating a bug in
+ // this program or in liblzma. It is inconvenient to have a
+ // separate error message for errors that should be impossible
+ // to occur, but knowing the error code is important for
+ // debugging. That's why it is good to print the error code
+ // at least when there is no good error message to show.
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Error initializing the encoder: %s (error code %u)\n",
+ msg, ret);
+ return false;
+}
+
+
+static bool
+compress(lzma_stream *strm, FILE *infile, FILE *outfile)
+{
+ // This will be LZMA_RUN until the end of the input file is reached.
+ // This tells lzma_code() when there will be no more input.
+ lzma_action action = LZMA_RUN;
+
+ // Buffers to temporarily hold uncompressed input
+ // and compressed output.
+ uint8_t inbuf[BUFSIZ];
+ uint8_t outbuf[BUFSIZ];
+
+ // Initialize the input and output pointers. Initializing next_in
+ // and avail_in isn't really necessary when we are going to encode
+ // just one file since LZMA_STREAM_INIT takes care of initializing
+ // those already. But it doesn't hurt much and it will be needed
+ // if encoding more than one file like we will in 02_decompress.c.
+ //
+ // While we don't care about strm->total_in or strm->total_out in this
+ // example, it is worth noting that initializing the encoder will
+ // always reset total_in and total_out to zero. But the encoder
+ // initialization doesn't touch next_in, avail_in, next_out, or
+ // avail_out.
+ strm->next_in = NULL;
+ strm->avail_in = 0;
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+
+ // Loop until the file has been successfully compressed or until
+ // an error occurs.
+ while (true) {
+ // Fill the input buffer if it is empty.
+ if (strm->avail_in == 0 && !feof(infile)) {
+ strm->next_in = inbuf;
+ strm->avail_in = fread(inbuf, 1, sizeof(inbuf),
+ infile);
+
+ if (ferror(infile)) {
+ fprintf(stderr, "Read error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ // Once the end of the input file has been reached,
+ // we need to tell lzma_code() that no more input
+ // will be coming and that it should finish the
+ // encoding.
+ if (feof(infile))
+ action = LZMA_FINISH;
+ }
+
+ // Tell liblzma do the actual encoding.
+ //
+ // This reads up to strm->avail_in bytes of input starting
+ // from strm->next_in. avail_in will be decremented and
+ // next_in incremented by an equal amount to match the
+ // number of input bytes consumed.
+ //
+ // Up to strm->avail_out bytes of compressed output will be
+ // written starting from strm->next_out. avail_out and next_out
+ // will be incremented by an equal amount to match the number
+ // of output bytes written.
+ //
+ // The encoder has to do internal buffering, which means that
+ // it may take quite a bit of input before the same data is
+ // available in compressed form in the output buffer.
+ lzma_ret ret = lzma_code(strm, action);
+
+ // If the output buffer is full or if the compression finished
+ // successfully, write the data from the output buffer to
+ // the output file.
+ if (strm->avail_out == 0 || ret == LZMA_STREAM_END) {
+ // When lzma_code() has returned LZMA_STREAM_END,
+ // the output buffer is likely to be only partially
+ // full. Calculate how much new data there is to
+ // be written to the output file.
+ size_t write_size = sizeof(outbuf) - strm->avail_out;
+
+ if (fwrite(outbuf, 1, write_size, outfile)
+ != write_size) {
+ fprintf(stderr, "Write error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ // Reset next_out and avail_out.
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+ }
+
+ // Normally the return value of lzma_code() will be LZMA_OK
+ // until everything has been encoded.
+ if (ret != LZMA_OK) {
+ // Once everything has been encoded successfully, the
+ // return value of lzma_code() will be LZMA_STREAM_END.
+ //
+ // It is important to check for LZMA_STREAM_END. Do not
+ // assume that getting ret != LZMA_OK would mean that
+ // everything has gone well.
+ if (ret == LZMA_STREAM_END)
+ return true;
+
+ // It's not LZMA_OK nor LZMA_STREAM_END,
+ // so it must be an error code. See lzma/base.h
+ // (src/liblzma/api/lzma/base.h in the source package
+ // or e.g. /usr/include/lzma/base.h depending on the
+ // install prefix) for the list and documentation of
+ // possible values. Most values listen in lzma_ret
+ // enumeration aren't possible in this example.
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_DATA_ERROR:
+ // This error is returned if the compressed
+ // or uncompressed size get near 8 EiB
+ // (2^63 bytes) because that's where the .xz
+ // file format size limits currently are.
+ // That is, the possibility of this error
+ // is mostly theoretical unless you are doing
+ // something very unusual.
+ //
+ // Note that strm->total_in and strm->total_out
+ // have nothing to do with this error. Changing
+ // those variables won't increase or decrease
+ // the chance of getting this error.
+ msg = "File size limits exceeded";
+ break;
+
+ default:
+ // This is most likely LZMA_PROG_ERROR, but
+ // if this program is buggy (or liblzma has
+ // a bug), it may be e.g. LZMA_BUF_ERROR or
+ // LZMA_OPTIONS_ERROR too.
+ //
+ // It is inconvenient to have a separate
+ // error message for errors that should be
+ // impossible to occur, but knowing the error
+ // code is important for debugging. That's why
+ // it is good to print the error code at least
+ // when there is no good error message to show.
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Encoder error: %s (error code %u)\n",
+ msg, ret);
+ return false;
+ }
+ }
+}
+
+
+extern int
+main(int argc, char **argv)
+{
+ // Get the preset number from the command line.
+ uint32_t preset = get_preset(argc, argv);
+
+ // Initialize a lzma_stream structure. When it is allocated on stack,
+ // it is simplest to use LZMA_STREAM_INIT macro like below. When it
+ // is allocated on heap, using memset(strmptr, 0, sizeof(*strmptr))
+ // works (as long as NULL pointers are represented with zero bits
+ // as they are on practically all computers today).
+ lzma_stream strm = LZMA_STREAM_INIT;
+
+ // Initialize the encoder. If it succeeds, compress from
+ // stdin to stdout.
+ bool success = init_encoder(&strm, preset);
+ if (success)
+ success = compress(&strm, stdin, stdout);
+
+ // Free the memory allocated for the encoder. If we were encoding
+ // multiple files, this would only need to be done after the last
+ // file. See 02_decompress.c for handling of multiple files.
+ //
+ // It is OK to call lzma_end() multiple times or when it hasn't been
+ // actually used except initialized with LZMA_STREAM_INIT.
+ lzma_end(&strm);
+
+ // Close stdout to catch possible write errors that can occur
+ // when pending data is flushed from the stdio buffers.
+ if (fclose(stdout)) {
+ fprintf(stderr, "Write error: %s\n", strerror(errno));
+ success = false;
+ }
+
+ return success ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/doc/examples/02_decompress.c b/doc/examples/02_decompress.c
new file mode 100644
index 0000000..98339be
--- /dev/null
+++ b/doc/examples/02_decompress.c
@@ -0,0 +1,287 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file 02_decompress.c
+/// \brief Decompress .xz files to stdout
+///
+/// Usage: ./02_decompress INPUT_FILES... > OUTFILE
+///
+/// Example: ./02_decompress foo.xz bar.xz > foobar
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <lzma.h>
+
+
+static bool
+init_decoder(lzma_stream *strm)
+{
+ // Initialize a .xz decoder. The decoder supports a memory usage limit
+ // and a set of flags.
+ //
+ // The memory usage of the decompressor depends on the settings used
+ // to compress a .xz file. It can vary from less than a megabyte to
+ // a few gigabytes, but in practice (at least for now) it rarely
+ // exceeds 65 MiB because that's how much memory is required to
+ // decompress files created with "xz -9". Settings requiring more
+ // memory take extra effort to use and don't (at least for now)
+ // provide significantly better compression in most cases.
+ //
+ // Memory usage limit is useful if it is important that the
+ // decompressor won't consume gigabytes of memory. The need
+ // for limiting depends on the application. In this example,
+ // no memory usage limiting is used. This is done by setting
+ // the limit to UINT64_MAX.
+ //
+ // The .xz format allows concatenating compressed files as is:
+ //
+ // echo foo | xz > foobar.xz
+ // echo bar | xz >> foobar.xz
+ //
+ // When decompressing normal standalone .xz files, LZMA_CONCATENATED
+ // should always be used to support decompression of concatenated
+ // .xz files. If LZMA_CONCATENATED isn't used, the decoder will stop
+ // after the first .xz stream. This can be useful when .xz data has
+ // been embedded inside another file format.
+ //
+ // Flags other than LZMA_CONCATENATED are supported too, and can
+ // be combined with bitwise-or. See lzma/container.h
+ // (src/liblzma/api/lzma/container.h in the source package or e.g.
+ // /usr/include/lzma/container.h depending on the install prefix)
+ // for details.
+ lzma_ret ret = lzma_stream_decoder(
+ strm, UINT64_MAX, LZMA_CONCATENATED);
+
+ // Return successfully if the initialization went fine.
+ if (ret == LZMA_OK)
+ return true;
+
+ // Something went wrong. The possible errors are documented in
+ // lzma/container.h (src/liblzma/api/lzma/container.h in the source
+ // package or e.g. /usr/include/lzma/container.h depending on the
+ // install prefix).
+ //
+ // Note that LZMA_MEMLIMIT_ERROR is never possible here. If you
+ // specify a very tiny limit, the error will be delayed until
+ // the first headers have been parsed by a call to lzma_code().
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ msg = "Unsupported decompressor flags";
+ break;
+
+ default:
+ // This is most likely LZMA_PROG_ERROR indicating a bug in
+ // this program or in liblzma. It is inconvenient to have a
+ // separate error message for errors that should be impossible
+ // to occur, but knowing the error code is important for
+ // debugging. That's why it is good to print the error code
+ // at least when there is no good error message to show.
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Error initializing the decoder: %s (error code %u)\n",
+ msg, ret);
+ return false;
+}
+
+
+static bool
+decompress(lzma_stream *strm, const char *inname, FILE *infile, FILE *outfile)
+{
+ // When LZMA_CONCATENATED flag was used when initializing the decoder,
+ // we need to tell lzma_code() when there will be no more input.
+ // This is done by setting action to LZMA_FINISH instead of LZMA_RUN
+ // in the same way as it is done when encoding.
+ //
+ // When LZMA_CONCATENATED isn't used, there is no need to use
+ // LZMA_FINISH to tell when all the input has been read, but it
+ // is still OK to use it if you want. When LZMA_CONCATENATED isn't
+ // used, the decoder will stop after the first .xz stream. In that
+ // case some unused data may be left in strm->next_in.
+ lzma_action action = LZMA_RUN;
+
+ uint8_t inbuf[BUFSIZ];
+ uint8_t outbuf[BUFSIZ];
+
+ strm->next_in = NULL;
+ strm->avail_in = 0;
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+
+ while (true) {
+ if (strm->avail_in == 0 && !feof(infile)) {
+ strm->next_in = inbuf;
+ strm->avail_in = fread(inbuf, 1, sizeof(inbuf),
+ infile);
+
+ if (ferror(infile)) {
+ fprintf(stderr, "%s: Read error: %s\n",
+ inname, strerror(errno));
+ return false;
+ }
+
+ // Once the end of the input file has been reached,
+ // we need to tell lzma_code() that no more input
+ // will be coming. As said before, this isn't required
+ // if the LZMA_CONCATENATED flag isn't used when
+ // initializing the decoder.
+ if (feof(infile))
+ action = LZMA_FINISH;
+ }
+
+ lzma_ret ret = lzma_code(strm, action);
+
+ if (strm->avail_out == 0 || ret == LZMA_STREAM_END) {
+ size_t write_size = sizeof(outbuf) - strm->avail_out;
+
+ if (fwrite(outbuf, 1, write_size, outfile)
+ != write_size) {
+ fprintf(stderr, "Write error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+ }
+
+ if (ret != LZMA_OK) {
+ // Once everything has been decoded successfully, the
+ // return value of lzma_code() will be LZMA_STREAM_END.
+ //
+ // It is important to check for LZMA_STREAM_END. Do not
+ // assume that getting ret != LZMA_OK would mean that
+ // everything has gone well or that when you aren't
+ // getting more output it must have successfully
+ // decoded everything.
+ if (ret == LZMA_STREAM_END)
+ return true;
+
+ // It's not LZMA_OK nor LZMA_STREAM_END,
+ // so it must be an error code. See lzma/base.h
+ // (src/liblzma/api/lzma/base.h in the source package
+ // or e.g. /usr/include/lzma/base.h depending on the
+ // install prefix) for the list and documentation of
+ // possible values. Many values listen in lzma_ret
+ // enumeration aren't possible in this example, but
+ // can be made possible by enabling memory usage limit
+ // or adding flags to the decoder initialization.
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_FORMAT_ERROR:
+ // .xz magic bytes weren't found.
+ msg = "The input is not in the .xz format";
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ // For example, the headers specify a filter
+ // that isn't supported by this liblzma
+ // version (or it hasn't been enabled when
+ // building liblzma, but no-one sane does
+ // that unless building liblzma for an
+ // embedded system). Upgrading to a newer
+ // liblzma might help.
+ //
+ // Note that it is unlikely that the file has
+ // accidentally became corrupt if you get this
+ // error. The integrity of the .xz headers is
+ // always verified with a CRC32, so
+ // unintentionally corrupt files can be
+ // distinguished from unsupported files.
+ msg = "Unsupported compression options";
+ break;
+
+ case LZMA_DATA_ERROR:
+ msg = "Compressed file is corrupt";
+ break;
+
+ case LZMA_BUF_ERROR:
+ // Typically this error means that a valid
+ // file has got truncated, but it might also
+ // be a damaged part in the file that makes
+ // the decoder think the file is truncated.
+ // If you prefer, you can use the same error
+ // message for this as for LZMA_DATA_ERROR.
+ msg = "Compressed file is truncated or "
+ "otherwise corrupt";
+ break;
+
+ default:
+ // This is most likely LZMA_PROG_ERROR.
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "%s: Decoder error: "
+ "%s (error code %u)\n",
+ inname, msg, ret);
+ return false;
+ }
+ }
+}
+
+
+extern int
+main(int argc, char **argv)
+{
+ if (argc <= 1) {
+ fprintf(stderr, "Usage: %s FILES...\n", argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ lzma_stream strm = LZMA_STREAM_INIT;
+
+ bool success = true;
+
+ // Try to decompress all files.
+ for (int i = 1; i < argc; ++i) {
+ if (!init_decoder(&strm)) {
+ // Decoder initialization failed. There's no point
+ // to retry it so we need to exit.
+ success = false;
+ break;
+ }
+
+ FILE *infile = fopen(argv[i], "rb");
+
+ if (infile == NULL) {
+ fprintf(stderr, "%s: Error opening the "
+ "input file: %s\n",
+ argv[i], strerror(errno));
+ success = false;
+ } else {
+ success &= decompress(&strm, argv[i], infile, stdout);
+ fclose(infile);
+ }
+ }
+
+ // Free the memory allocated for the decoder. This only needs to be
+ // done after the last file.
+ lzma_end(&strm);
+
+ if (fclose(stdout)) {
+ fprintf(stderr, "Write error: %s\n", strerror(errno));
+ success = false;
+ }
+
+ return success ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/doc/examples/03_compress_custom.c b/doc/examples/03_compress_custom.c
new file mode 100644
index 0000000..40c85e3
--- /dev/null
+++ b/doc/examples/03_compress_custom.c
@@ -0,0 +1,193 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file 03_compress_custom.c
+/// \brief Compress in multi-call mode using x86 BCJ and LZMA2
+///
+/// Usage: ./03_compress_custom < INFILE > OUTFILE
+///
+/// Example: ./03_compress_custom < foo > foo.xz
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <lzma.h>
+
+
+static bool
+init_encoder(lzma_stream *strm)
+{
+ // Use the default preset (6) for LZMA2.
+ //
+ // The lzma_options_lzma structure and the lzma_lzma_preset() function
+ // are declared in lzma/lzma12.h (src/liblzma/api/lzma/lzma12.h in the
+ // source package or e.g. /usr/include/lzma/lzma12.h depending on
+ // the install prefix).
+ lzma_options_lzma opt_lzma2;
+ if (lzma_lzma_preset(&opt_lzma2, LZMA_PRESET_DEFAULT)) {
+ // It should never fail because the default preset
+ // (and presets 0-9 optionally with LZMA_PRESET_EXTREME)
+ // are supported by all stable liblzma versions.
+ //
+ // (The encoder initialization later in this function may
+ // still fail due to unsupported preset *if* the features
+ // required by the preset have been disabled at build time,
+ // but no-one does such things except on embedded systems.)
+ fprintf(stderr, "Unsupported preset, possibly a bug\n");
+ return false;
+ }
+
+ // Now we could customize the LZMA2 options if we wanted. For example,
+ // we could set the the dictionary size (opt_lzma2.dict_size) to
+ // something else than the default (8 MiB) of the default preset.
+ // See lzma/lzma12.h for details of all LZMA2 options.
+ //
+ // The x86 BCJ filter will try to modify the x86 instruction stream so
+ // that LZMA2 can compress it better. The x86 BCJ filter doesn't need
+ // any options so it will be set to NULL below.
+ //
+ // Construct the filter chain. The uncompressed data goes first to
+ // the first filter in the array, in this case the x86 BCJ filter.
+ // The array is always terminated by setting .id = LZMA_VLI_UNKNOWN.
+ //
+ // See lzma/filter.h for more information about the lzma_filter
+ // structure.
+ lzma_filter filters[] = {
+ { .id = LZMA_FILTER_X86, .options = NULL },
+ { .id = LZMA_FILTER_LZMA2, .options = &opt_lzma2 },
+ { .id = LZMA_VLI_UNKNOWN, .options = NULL },
+ };
+
+ // Initialize the encoder using the custom filter chain.
+ lzma_ret ret = lzma_stream_encoder(strm, filters, LZMA_CHECK_CRC64);
+
+ if (ret == LZMA_OK)
+ return true;
+
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ // We are no longer using a plain preset so this error
+ // message has been edited accordingly compared to
+ // 01_compress_easy.c.
+ msg = "Specified filter chain is not supported";
+ break;
+
+ case LZMA_UNSUPPORTED_CHECK:
+ msg = "Specified integrity check is not supported";
+ break;
+
+ default:
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Error initializing the encoder: %s (error code %u)\n",
+ msg, ret);
+ return false;
+}
+
+
+// This function is identical to the one in 01_compress_easy.c.
+static bool
+compress(lzma_stream *strm, FILE *infile, FILE *outfile)
+{
+ lzma_action action = LZMA_RUN;
+
+ uint8_t inbuf[BUFSIZ];
+ uint8_t outbuf[BUFSIZ];
+
+ strm->next_in = NULL;
+ strm->avail_in = 0;
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+
+ while (true) {
+ if (strm->avail_in == 0 && !feof(infile)) {
+ strm->next_in = inbuf;
+ strm->avail_in = fread(inbuf, 1, sizeof(inbuf),
+ infile);
+
+ if (ferror(infile)) {
+ fprintf(stderr, "Read error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ if (feof(infile))
+ action = LZMA_FINISH;
+ }
+
+ lzma_ret ret = lzma_code(strm, action);
+
+ if (strm->avail_out == 0 || ret == LZMA_STREAM_END) {
+ size_t write_size = sizeof(outbuf) - strm->avail_out;
+
+ if (fwrite(outbuf, 1, write_size, outfile)
+ != write_size) {
+ fprintf(stderr, "Write error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+ }
+
+ if (ret != LZMA_OK) {
+ if (ret == LZMA_STREAM_END)
+ return true;
+
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_DATA_ERROR:
+ msg = "File size limits exceeded";
+ break;
+
+ default:
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Encoder error: %s (error code %u)\n",
+ msg, ret);
+ return false;
+ }
+ }
+}
+
+
+extern int
+main(void)
+{
+ lzma_stream strm = LZMA_STREAM_INIT;
+
+ bool success = init_encoder(&strm);
+ if (success)
+ success = compress(&strm, stdin, stdout);
+
+ lzma_end(&strm);
+
+ if (fclose(stdout)) {
+ fprintf(stderr, "Write error: %s\n", strerror(errno));
+ success = false;
+ }
+
+ return success ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/doc/examples/04_compress_easy_mt.c b/doc/examples/04_compress_easy_mt.c
new file mode 100644
index 0000000..efe5697
--- /dev/null
+++ b/doc/examples/04_compress_easy_mt.c
@@ -0,0 +1,206 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file 04_compress_easy_mt.c
+/// \brief Compress in multi-call mode using LZMA2 in multi-threaded mode
+///
+/// Usage: ./04_compress_easy_mt < INFILE > OUTFILE
+///
+/// Example: ./04_compress_easy_mt < foo > foo.xz
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <lzma.h>
+
+
+static bool
+init_encoder(lzma_stream *strm)
+{
+ // The threaded encoder takes the options as pointer to
+ // a lzma_mt structure.
+ lzma_mt mt = {
+ // No flags are needed.
+ .flags = 0,
+
+ // Let liblzma determine a sane block size.
+ .block_size = 0,
+
+ // Use no timeout for lzma_code() calls by setting timeout
+ // to zero. That is, sometimes lzma_code() might block for
+ // a long time (from several seconds to even minutes).
+ // If this is not OK, for example due to progress indicator
+ // needing updates, specify a timeout in milliseconds here.
+ // See the documentation of lzma_mt in lzma/container.h for
+ // information how to choose a reasonable timeout.
+ .timeout = 0,
+
+ // Use the default preset (6) for LZMA2.
+ // To use a preset, filters must be set to NULL.
+ .preset = LZMA_PRESET_DEFAULT,
+ .filters = NULL,
+
+ // Use CRC64 for integrity checking. See also
+ // 01_compress_easy.c about choosing the integrity check.
+ .check = LZMA_CHECK_CRC64,
+ };
+
+ // Detect how many threads the CPU supports.
+ mt.threads = lzma_cputhreads();
+
+ // If the number of CPU cores/threads cannot be detected,
+ // use one thread. Note that this isn't the same as the normal
+ // single-threaded mode as this will still split the data into
+ // blocks and use more RAM than the normal single-threaded mode.
+ // You may want to consider using lzma_easy_encoder() or
+ // lzma_stream_encoder() instead of lzma_stream_encoder_mt() if
+ // lzma_cputhreads() returns 0 or 1.
+ if (mt.threads == 0)
+ mt.threads = 1;
+
+ // If the number of CPU cores/threads exceeds threads_max,
+ // limit the number of threads to keep memory usage lower.
+ // The number 8 is arbitrarily chosen and may be too low or
+ // high depending on the compression preset and the computer
+ // being used.
+ //
+ // FIXME: A better way could be to check the amount of RAM
+ // (or available RAM) and use lzma_stream_encoder_mt_memusage()
+ // to determine if the number of threads should be reduced.
+ const uint32_t threads_max = 8;
+ if (mt.threads > threads_max)
+ mt.threads = threads_max;
+
+ // Initialize the threaded encoder.
+ lzma_ret ret = lzma_stream_encoder_mt(strm, &mt);
+
+ if (ret == LZMA_OK)
+ return true;
+
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ // We are no longer using a plain preset so this error
+ // message has been edited accordingly compared to
+ // 01_compress_easy.c.
+ msg = "Specified filter chain is not supported";
+ break;
+
+ case LZMA_UNSUPPORTED_CHECK:
+ msg = "Specified integrity check is not supported";
+ break;
+
+ default:
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Error initializing the encoder: %s (error code %u)\n",
+ msg, ret);
+ return false;
+}
+
+
+// This function is identical to the one in 01_compress_easy.c.
+static bool
+compress(lzma_stream *strm, FILE *infile, FILE *outfile)
+{
+ lzma_action action = LZMA_RUN;
+
+ uint8_t inbuf[BUFSIZ];
+ uint8_t outbuf[BUFSIZ];
+
+ strm->next_in = NULL;
+ strm->avail_in = 0;
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+
+ while (true) {
+ if (strm->avail_in == 0 && !feof(infile)) {
+ strm->next_in = inbuf;
+ strm->avail_in = fread(inbuf, 1, sizeof(inbuf),
+ infile);
+
+ if (ferror(infile)) {
+ fprintf(stderr, "Read error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ if (feof(infile))
+ action = LZMA_FINISH;
+ }
+
+ lzma_ret ret = lzma_code(strm, action);
+
+ if (strm->avail_out == 0 || ret == LZMA_STREAM_END) {
+ size_t write_size = sizeof(outbuf) - strm->avail_out;
+
+ if (fwrite(outbuf, 1, write_size, outfile)
+ != write_size) {
+ fprintf(stderr, "Write error: %s\n",
+ strerror(errno));
+ return false;
+ }
+
+ strm->next_out = outbuf;
+ strm->avail_out = sizeof(outbuf);
+ }
+
+ if (ret != LZMA_OK) {
+ if (ret == LZMA_STREAM_END)
+ return true;
+
+ const char *msg;
+ switch (ret) {
+ case LZMA_MEM_ERROR:
+ msg = "Memory allocation failed";
+ break;
+
+ case LZMA_DATA_ERROR:
+ msg = "File size limits exceeded";
+ break;
+
+ default:
+ msg = "Unknown error, possibly a bug";
+ break;
+ }
+
+ fprintf(stderr, "Encoder error: %s (error code %u)\n",
+ msg, ret);
+ return false;
+ }
+ }
+}
+
+
+extern int
+main(void)
+{
+ lzma_stream strm = LZMA_STREAM_INIT;
+
+ bool success = init_encoder(&strm);
+ if (success)
+ success = compress(&strm, stdin, stdout);
+
+ lzma_end(&strm);
+
+ if (fclose(stdout)) {
+ fprintf(stderr, "Write error: %s\n", strerror(errno));
+ success = false;
+ }
+
+ return success ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/doc/examples/Makefile b/doc/examples/Makefile
new file mode 100644
index 0000000..e8839d8
--- /dev/null
+++ b/doc/examples/Makefile
@@ -0,0 +1,25 @@
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+CC = c99
+CFLAGS = -g
+LDFLAGS = -llzma
+
+PROGS = \
+ 01_compress_easy \
+ 02_decompress \
+ 03_compress_custom \
+ 04_compress_easy_mt \
+ 11_file_info
+
+all: $(PROGS)
+
+.c:
+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
+
+clean:
+ -rm -f $(PROGS)
diff --git a/doc/examples_old/xz_pipe_comp.c b/doc/examples_old/xz_pipe_comp.c
new file mode 100644
index 0000000..9f9224b
--- /dev/null
+++ b/doc/examples_old/xz_pipe_comp.c
@@ -0,0 +1,127 @@
+/*
+ * xz_pipe_comp.c
+ * A simple example of pipe-only xz compressor implementation.
+ * version: 2010-07-12 - by Daniel Mealha Cabrita
+ * Not copyrighted -- provided to the public domain.
+ *
+ * Compiling:
+ * Link with liblzma. GCC example:
+ * $ gcc -llzma xz_pipe_comp.c -o xz_pipe_comp
+ *
+ * Usage example:
+ * $ cat some_file | ./xz_pipe_comp > some_file.xz
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <lzma.h>
+
+
+/* COMPRESSION SETTINGS */
+
+/* analogous to xz CLI options: -0 to -9 */
+#define COMPRESSION_LEVEL 6
+
+/* boolean setting, analogous to xz CLI option: -e */
+#define COMPRESSION_EXTREME true
+
+/* see: /usr/include/lzma/check.h LZMA_CHECK_* */
+#define INTEGRITY_CHECK LZMA_CHECK_CRC64
+
+
+/* read/write buffer sizes */
+#define IN_BUF_MAX 4096
+#define OUT_BUF_MAX 4096
+
+/* error codes */
+#define RET_OK 0
+#define RET_ERROR_INIT 1
+#define RET_ERROR_INPUT 2
+#define RET_ERROR_OUTPUT 3
+#define RET_ERROR_COMPRESSION 4
+
+
+/* note: in_file and out_file must be open already */
+int xz_compress (FILE *in_file, FILE *out_file)
+{
+ uint32_t preset = COMPRESSION_LEVEL | (COMPRESSION_EXTREME ? LZMA_PRESET_EXTREME : 0);
+ lzma_check check = INTEGRITY_CHECK;
+ lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */
+ uint8_t in_buf [IN_BUF_MAX];
+ uint8_t out_buf [OUT_BUF_MAX];
+ size_t in_len; /* length of useful data in in_buf */
+ size_t out_len; /* length of useful data in out_buf */
+ bool in_finished = false;
+ bool out_finished = false;
+ lzma_action action;
+ lzma_ret ret_xz;
+ int ret;
+
+ ret = RET_OK;
+
+ /* initialize xz encoder */
+ ret_xz = lzma_easy_encoder (&strm, preset, check);
+ if (ret_xz != LZMA_OK) {
+ fprintf (stderr, "lzma_easy_encoder error: %d\n", (int) ret_xz);
+ return RET_ERROR_INIT;
+ }
+
+ while ((! in_finished) && (! out_finished)) {
+ /* read incoming data */
+ in_len = fread (in_buf, 1, IN_BUF_MAX, in_file);
+
+ if (feof (in_file)) {
+ in_finished = true;
+ }
+ if (ferror (in_file)) {
+ in_finished = true;
+ ret = RET_ERROR_INPUT;
+ }
+
+ strm.next_in = in_buf;
+ strm.avail_in = in_len;
+
+ /* if no more data from in_buf, flushes the
+ internal xz buffers and closes the xz data
+ with LZMA_FINISH */
+ action = in_finished ? LZMA_FINISH : LZMA_RUN;
+
+ /* loop until there's no pending compressed output */
+ do {
+ /* out_buf is clean at this point */
+ strm.next_out = out_buf;
+ strm.avail_out = OUT_BUF_MAX;
+
+ /* compress data */
+ ret_xz = lzma_code (&strm, action);
+
+ if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) {
+ fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz);
+ out_finished = true;
+ ret = RET_ERROR_COMPRESSION;
+ } else {
+ /* write compressed data */
+ out_len = OUT_BUF_MAX - strm.avail_out;
+ fwrite (out_buf, 1, out_len, out_file);
+ if (ferror (out_file)) {
+ out_finished = true;
+ ret = RET_ERROR_OUTPUT;
+ }
+ }
+ } while (strm.avail_out == 0);
+ }
+
+ lzma_end (&strm);
+ return ret;
+}
+
+int main ()
+{
+ int ret;
+
+ ret = xz_compress (stdin, stdout);
+ return ret;
+}
+
diff --git a/doc/examples_old/xz_pipe_decomp.c b/doc/examples_old/xz_pipe_decomp.c
new file mode 100644
index 0000000..fb5ad89
--- /dev/null
+++ b/doc/examples_old/xz_pipe_decomp.c
@@ -0,0 +1,123 @@
+/*
+ * xz_pipe_decomp.c
+ * A simple example of pipe-only xz decompressor implementation.
+ * version: 2012-06-14 - by Daniel Mealha Cabrita
+ * Not copyrighted -- provided to the public domain.
+ *
+ * Compiling:
+ * Link with liblzma. GCC example:
+ * $ gcc -llzma xz_pipe_decomp.c -o xz_pipe_decomp
+ *
+ * Usage example:
+ * $ cat some_file.xz | ./xz_pipe_decomp > some_file
+ */
+
+#include <stdio.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <lzma.h>
+
+
+/* read/write buffer sizes */
+#define IN_BUF_MAX 4096
+#define OUT_BUF_MAX 4096
+
+/* error codes */
+#define RET_OK 0
+#define RET_ERROR_INIT 1
+#define RET_ERROR_INPUT 2
+#define RET_ERROR_OUTPUT 3
+#define RET_ERROR_DECOMPRESSION 4
+
+
+/* note: in_file and out_file must be open already */
+int xz_decompress (FILE *in_file, FILE *out_file)
+{
+ lzma_stream strm = LZMA_STREAM_INIT; /* alloc and init lzma_stream struct */
+ const uint32_t flags = LZMA_TELL_UNSUPPORTED_CHECK | LZMA_CONCATENATED;
+ const uint64_t memory_limit = UINT64_MAX; /* no memory limit */
+ uint8_t in_buf [IN_BUF_MAX];
+ uint8_t out_buf [OUT_BUF_MAX];
+ size_t in_len; /* length of useful data in in_buf */
+ size_t out_len; /* length of useful data in out_buf */
+ bool in_finished = false;
+ bool out_finished = false;
+ lzma_action action;
+ lzma_ret ret_xz;
+ int ret;
+
+ ret = RET_OK;
+
+ /* initialize xz decoder */
+ ret_xz = lzma_stream_decoder (&strm, memory_limit, flags);
+ if (ret_xz != LZMA_OK) {
+ fprintf (stderr, "lzma_stream_decoder error: %d\n", (int) ret_xz);
+ return RET_ERROR_INIT;
+ }
+
+ while ((! in_finished) && (! out_finished)) {
+ /* read incoming data */
+ in_len = fread (in_buf, 1, IN_BUF_MAX, in_file);
+
+ if (feof (in_file)) {
+ in_finished = true;
+ }
+ if (ferror (in_file)) {
+ in_finished = true;
+ ret = RET_ERROR_INPUT;
+ }
+
+ strm.next_in = in_buf;
+ strm.avail_in = in_len;
+
+ /* if no more data from in_buf, flushes the
+ internal xz buffers and closes the decompressed data
+ with LZMA_FINISH */
+ action = in_finished ? LZMA_FINISH : LZMA_RUN;
+
+ /* loop until there's no pending decompressed output */
+ do {
+ /* out_buf is clean at this point */
+ strm.next_out = out_buf;
+ strm.avail_out = OUT_BUF_MAX;
+
+ /* decompress data */
+ ret_xz = lzma_code (&strm, action);
+
+ if ((ret_xz != LZMA_OK) && (ret_xz != LZMA_STREAM_END)) {
+ fprintf (stderr, "lzma_code error: %d\n", (int) ret_xz);
+ out_finished = true;
+ ret = RET_ERROR_DECOMPRESSION;
+ } else {
+ /* write decompressed data */
+ out_len = OUT_BUF_MAX - strm.avail_out;
+ fwrite (out_buf, 1, out_len, out_file);
+ if (ferror (out_file)) {
+ out_finished = true;
+ ret = RET_ERROR_OUTPUT;
+ }
+ }
+ } while (strm.avail_out == 0);
+ }
+
+ /* Bug fix (2012-06-14): If no errors were detected, check
+ that the last lzma_code() call returned LZMA_STREAM_END.
+ If not, the file is probably truncated. */
+ if ((ret == RET_OK) && (ret_xz != LZMA_STREAM_END)) {
+ fprintf (stderr, "Input truncated or corrupt\n");
+ ret = RET_ERROR_DECOMPRESSION;
+ }
+
+ lzma_end (&strm);
+ return ret;
+}
+
+int main ()
+{
+ int ret;
+
+ ret = xz_decompress (stdin, stdout);
+ return ret;
+}
+
diff --git a/doc/faq.txt b/doc/faq.txt
new file mode 100644
index 0000000..3f9068b
--- /dev/null
+++ b/doc/faq.txt
@@ -0,0 +1,244 @@
+
+XZ Utils FAQ
+============
+
+Q: What do the letters XZ mean?
+
+A: Nothing. They are just two letters, which come from the file format
+ suffix .xz. The .xz suffix was selected, because it seemed to be
+ pretty much unused. It has no deeper meaning.
+
+
+Q: What are LZMA and LZMA2?
+
+A: LZMA stands for Lempel-Ziv-Markov chain-Algorithm. It is the name
+ of the compression algorithm designed by Igor Pavlov for 7-Zip.
+ LZMA is based on LZ77 and range encoding.
+
+ LZMA2 is an updated version of the original LZMA to fix a couple of
+ practical issues. In context of XZ Utils, LZMA is called LZMA1 to
+ emphasize that LZMA is not the same thing as LZMA2. LZMA2 is the
+ primary compression algorithm in the .xz file format.
+
+
+Q: There are many LZMA related projects. How does XZ Utils relate to them?
+
+A: 7-Zip and LZMA SDK are the original projects. LZMA SDK is roughly
+ a subset of the 7-Zip source tree.
+
+ p7zip is 7-Zip's command-line tools ported to POSIX-like systems.
+
+ LZMA Utils provide a gzip-like lzma tool for POSIX-like systems.
+ LZMA Utils are based on LZMA SDK. XZ Utils are the successor to
+ LZMA Utils.
+
+ There are several other projects using LZMA. Most are more or less
+ based on LZMA SDK. See <https://7-zip.org/links.html>.
+
+
+Q: Why is liblzma named liblzma if its primary file format is .xz?
+ Shouldn't it be e.g. libxz?
+
+A: When the designing of the .xz format began, the idea was to replace
+ the .lzma format and use the same .lzma suffix. It would have been
+ quite OK to reuse the suffix when there were very few .lzma files
+ around. However, the old .lzma format became popular before the
+ new format was finished. The new format was renamed to .xz but the
+ name of liblzma wasn't changed.
+
+
+Q: Do XZ Utils support the .7z format?
+
+A: No. Use 7-Zip (Windows) or p7zip (POSIX-like systems) to handle .7z
+ files.
+
+
+Q: I have many .tar.7z files. Can I convert them to .tar.xz without
+ spending hours recompressing the data?
+
+A: In the "extra" directory, there is a script named 7z2lzma.bash which
+ is able to convert some .7z files to the .lzma format (not .xz). It
+ needs the 7za (or 7z) command from p7zip. The script may silently
+ produce corrupt output if certain assumptions are not met, so
+ decompress the resulting .lzma file and compare it against the
+ original before deleting the original file!
+
+
+Q: I have many .lzma files. Can I quickly convert them to the .xz format?
+
+A: For now, no. Since XZ Utils supports the .lzma format, it's usually
+ not too bad to keep the old files in the old format. If you want to
+ do the conversion anyway, you need to decompress the .lzma files and
+ then recompress to the .xz format.
+
+ Technically, there is a way to make the conversion relatively fast
+ (roughly twice the time that normal decompression takes). Writing
+ such a tool would take quite a bit of time though, and would probably
+ be useful to only a few people. If you really want such a conversion
+ tool, contact Lasse Collin and offer some money.
+
+
+Q: I have installed xz, but my tar doesn't recognize .tar.xz files.
+ How can I extract .tar.xz files?
+
+A: xz -dc foo.tar.xz | tar xf -
+
+
+Q: Can I recover parts of a broken .xz file (e.g. a corrupted CD-R)?
+
+A: It may be possible if the file consists of multiple blocks, which
+ typically is not the case if the file was created in single-threaded
+ mode. There is no recovery program yet.
+
+
+Q: Is (some part of) XZ Utils patented?
+
+A: Lasse Collin is not aware of any patents that could affect XZ Utils.
+ However, due to the nature of software patents, it's not possible to
+ guarantee that XZ Utils isn't affected by any third party patent(s).
+
+
+Q: Where can I find documentation about the file format and algorithms?
+
+A: The .xz format is documented in xz-file-format.txt. It is a container
+ format only, and doesn't include descriptions of any non-trivial
+ filters.
+
+ Documenting LZMA and LZMA2 is planned, but for now, there is no other
+ documentation than the source code. Before you begin, you should know
+ the basics of LZ77 and range-coding algorithms. LZMA is based on LZ77,
+ but LZMA is a lot more complex. Range coding is used to compress
+ the final bitstream like Huffman coding is used in Deflate.
+
+
+Q: I cannot find BCJ and BCJ2 filters. Don't they exist in liblzma?
+
+A: BCJ filter is called "x86" in liblzma. BCJ2 is not included,
+ because it requires using more than one encoded output stream.
+
+
+Q: I need to use a script that runs "xz -9". On a system with 256 MiB
+ of RAM, xz says that it cannot allocate memory. Can I make the
+ script work without modifying it?
+
+A: Set a default memory usage limit for compression. You can do it e.g.
+ in a shell initialization script such as ~/.bashrc or /etc/profile:
+
+ XZ_DEFAULTS=--memlimit-compress=150MiB
+ export XZ_DEFAULTS
+
+ xz will then scale the compression settings down so that the given
+ memory usage limit is not reached. This way xz shouldn't run out
+ of memory.
+
+ Check also that memory-related resource limits are high enough.
+ On most systems, "ulimit -a" will show the current resource limits.
+
+
+Q: How do I create files that can be decompressed with XZ Embedded?
+
+A: See the documentation in XZ Embedded. In short, something like
+ this is a good start:
+
+ xz --check=crc32 --lzma2=preset=6e,dict=64KiB
+
+ Or if a BCJ filter is needed too, e.g. if compressing
+ a kernel image for PowerPC:
+
+ xz --check=crc32 --powerpc --lzma2=preset=6e,dict=64KiB
+
+ Adjust the dictionary size to get a good compromise between
+ compression ratio and decompressor memory usage. Note that
+ in single-call decompression mode of XZ Embedded, a big
+ dictionary doesn't increase memory usage.
+
+
+Q: How is multi-threaded compression implemented in XZ Utils?
+
+A: The simplest method is splitting the uncompressed data into blocks
+ and compressing them in parallel independent from each other.
+ This is currently the only threading method supported in XZ Utils.
+ Since the blocks are compressed independently, they can also be
+ decompressed independently. Together with the index feature in .xz,
+ this allows using threads to create .xz files for random-access
+ reading. This also makes threaded decompression possible.
+
+ The independent blocks method has a couple of disadvantages too. It
+ will compress worse than a single-block method. Often the difference
+ is not too big (maybe 1-2 %) but sometimes it can be too big. Also,
+ the memory usage of the compressor increases linearly when adding
+ threads.
+
+ At least two other threading methods are possible but these haven't
+ been implemented in XZ Utils:
+
+ Match finder parallelization has been in 7-Zip for ages. It doesn't
+ affect compression ratio or memory usage significantly. Among the
+ three threading methods, only this is useful when compressing small
+ files (files that are not significantly bigger than the dictionary).
+ Unfortunately this method scales only to about two CPU cores.
+
+ The third method is pigz-style threading (I use that name, because
+ pigz <https://www.zlib.net/pigz/> uses that method). It doesn't
+ affect compression ratio significantly and scales to many cores.
+ The memory usage scales linearly when threads are added. This isn't
+ significant with pigz, because Deflate uses only a 32 KiB dictionary,
+ but with LZMA2 the memory usage will increase dramatically just like
+ with the independent-blocks method. There is also a constant
+ computational overhead, which may make pigz-method a bit dull on
+ dual-core compared to the parallel match finder method, but with more
+ cores the overhead is not a big deal anymore.
+
+ Combining the threading methods will be possible and also useful.
+ For example, combining match finder parallelization with pigz-style
+ threading or independent-blocks-threading can cut the memory usage
+ by 50 %.
+
+
+Q: I told xz to use many threads but it is using only one or two
+ processor cores. What is wrong?
+
+A: Since multi-threaded compression is done by splitting the data into
+ blocks that are compressed individually, if the input file is too
+ small for the block size, then many threads cannot be used. The
+ default block size increases when the compression level is
+ increased. For example, xz -6 uses 8 MiB LZMA2 dictionary and
+ 24 MiB blocks, and xz -9 uses 64 MiB LZMA dictionary and 192 MiB
+ blocks. If the input file is 100 MiB, xz -6 can use five threads
+ of which one will finish quickly as it has only 4 MiB to compress.
+ However, for the same file, xz -9 can only use one thread.
+
+ One can adjust block size with --block-size=SIZE but making the
+ block size smaller than LZMA2 dictionary is waste of RAM: using
+ xz -9 with 6 MiB blocks isn't any better than using xz -6 with
+ 6 MiB blocks. The default settings use a block size bigger than
+ the LZMA2 dictionary size because this was seen as a reasonable
+ compromise between RAM usage and compression ratio.
+
+ When decompressing, the ability to use threads depends on how the
+ file was created. If it was created in multi-threaded mode then
+ it can be decompressed in multi-threaded mode too if there are
+ multiple blocks in the file.
+
+
+Q: How do I build a program that needs liblzmadec (lzmadec.h)?
+
+A: liblzmadec is part of LZMA Utils. XZ Utils has liblzma, but no
+ liblzmadec. The code using liblzmadec should be ported to use
+ liblzma instead. If you cannot or don't want to do that, download
+ LZMA Utils from <https://tukaani.org/lzma/>.
+
+
+Q: The default build of liblzma is too big. How can I make it smaller?
+
+A: Give --enable-small to the configure script. Use also appropriate
+ --enable or --disable options to include only those filter encoders
+ and decoders and integrity checks that you actually need. Use
+ CFLAGS=-Os (with GCC) or equivalent to tell your compiler to optimize
+ for size. See INSTALL for information about configure options.
+
+ If the result is still too big, take a look at XZ Embedded. It is
+ a separate project, which provides a limited but significantly
+ smaller XZ decoder implementation than XZ Utils. You can find it
+ at <https://tukaani.org/xz/embedded.html>.
+
diff --git a/doc/history.txt b/doc/history.txt
new file mode 100644
index 0000000..8545e23
--- /dev/null
+++ b/doc/history.txt
@@ -0,0 +1,150 @@
+
+History of LZMA Utils and XZ Utils
+==================================
+
+Tukaani distribution
+
+ In 2005, there was a small group working on the Tukaani distribution,
+ which was a Slackware fork. One of the project's goals was to fit the
+ distro on a single 700 MiB ISO-9660 image. Using LZMA instead of gzip
+ helped a lot. Roughly speaking, one could fit data that took 1000 MiB
+ in gzipped form into 700 MiB with LZMA. Naturally, the compression
+ ratio varied across packages, but this was what we got on average.
+
+ Slackware packages have traditionally had .tgz as the filename suffix,
+ which is an abbreviation of .tar.gz. A logical naming for LZMA
+ compressed packages was .tlz, being an abbreviation of .tar.lzma.
+
+ At the end of the year 2007, there was no distribution under the
+ Tukaani project anymore, but development of LZMA Utils was kept going.
+ Still, there were .tlz packages around, because at least Vector Linux
+ (a Slackware based distribution) used LZMA for its packages.
+
+ First versions of the modified pkgtools used the LZMA_Alone tool from
+ Igor Pavlov's LZMA SDK as is. It was fine, because users wouldn't need
+ to interact with LZMA_Alone directly. But people soon wanted to use
+ LZMA for other files too, and the interface of LZMA_Alone wasn't
+ comfortable for those used to gzip and bzip2.
+
+
+First steps of LZMA Utils
+
+ The first version of LZMA Utils (4.22.0) included a shell script called
+ lzmash. It was a wrapper that had a gzip-like command-line interface. It
+ used the LZMA_Alone tool from LZMA SDK to do all the real work. zgrep,
+ zdiff, and related scripts from gzip were adapted to work with LZMA and
+ were part of the first LZMA Utils release too.
+
+ LZMA Utils 4.22.0 included also lzmadec, which was a small (less than
+ 10 KiB) decoder-only command-line tool. It was written on top of the
+ decoder-only C code found from the LZMA SDK. lzmadec was convenient in
+ situations where LZMA_Alone (a few hundred KiB) would be too big.
+
+ lzmash and lzmadec were written by Lasse Collin.
+
+
+Second generation
+
+ The lzmash script was an ugly and not very secure hack. The last
+ version of LZMA Utils to use lzmash was 4.27.1.
+
+ LZMA Utils 4.32.0beta1 introduced a new lzma command-line tool written
+ by Ville Koskinen. It was written in C++, and used the encoder and
+ decoder from C++ LZMA SDK with some little modifications. This tool
+ replaced both the lzmash script and the LZMA_Alone command-line tool
+ in LZMA Utils.
+
+ Introducing this new tool caused some temporary incompatibilities,
+ because the LZMA_Alone executable was simply named lzma like the new
+ command-line tool, but they had a completely different command-line
+ interface. The file format was still the same.
+
+ Lasse wrote liblzmadec, which was a small decoder-only library based
+ on the C code found from LZMA SDK. liblzmadec had an API similar to
+ zlib, although there were some significant differences, which made it
+ non-trivial to use it in some applications designed for zlib and
+ libbzip2.
+
+ The lzmadec command-line tool was converted to use liblzmadec.
+
+ Alexandre Sauvé helped converting the build system to use GNU
+ Autotools. This made it easier to test for certain less portable
+ features needed by the new command-line tool.
+
+ Since the new command-line tool never got completely finished (for
+ example, it didn't support the LZMA_OPT environment variable), the
+ intent was to not call 4.32.x stable. Similarly, liblzmadec wasn't
+ polished, but appeared to work well enough, so some people started
+ using it too.
+
+ Because the development of the third generation of LZMA Utils was
+ delayed considerably (3-4 years), the 4.32.x branch had to be kept
+ maintained. It got some bug fixes now and then, and finally it was
+ decided to call it stable, although most of the missing features were
+ never added.
+
+
+File format problems
+
+ The file format used by LZMA_Alone was primitive. It was designed with
+ embedded systems in mind, and thus provided only a minimal set of
+ features. The two biggest problems for non-embedded use were the lack
+ of magic bytes and an integrity check.
+
+ Igor and Lasse started developing a new file format with some help
+ from Ville Koskinen. Also Mark Adler, Mikko Pouru, H. Peter Anvin,
+ and Lars Wirzenius helped with some minor things at some point of the
+ development. Designing the new format took quite a long time (actually,
+ too long a time would be a more appropriate expression). It was mostly
+ because Lasse was quite slow at getting things done due to personal
+ reasons.
+
+ Originally the new format was supposed to use the same .lzma suffix
+ that was already used by the old file format. Switching to the new
+ format wouldn't have caused much trouble when the old format wasn't
+ used by many people. But since the development of the new format took
+ such a long time, the old format got quite popular, and it was decided
+ that the new file format must use a different suffix.
+
+ It was decided to use .xz as the suffix of the new file format. The
+ first stable .xz file format specification was finally released in
+ December 2008. In addition to fixing the most obvious problems of
+ the old .lzma format, the .xz format added some new features like
+ support for multiple filters (compression algorithms), filter chaining
+ (like piping on the command line), and limited random-access reading.
+
+ Currently the primary compression algorithm used in .xz is LZMA2.
+ It is an extension on top of the original LZMA to fix some practical
+ problems: LZMA2 adds support for flushing the encoder, uncompressed
+ chunks, eases stateful decoder implementations, and improves support
+ for multithreading. Since LZMA2 is better than the original LZMA, the
+ original LZMA is not supported in .xz.
+
+
+Transition to XZ Utils
+
+ The early versions of XZ Utils were called LZMA Utils. The first
+ releases were 4.42.0alphas. They dropped the rest of the C++ LZMA SDK.
+ The code was still directly based on LZMA SDK but ported to C and
+ converted from a callback API to a stateful API. Later, Igor Pavlov
+ made a C version of the LZMA encoder too; these ports from C++ to C
+ were independent in LZMA SDK and LZMA Utils.
+
+ The core of the new LZMA Utils was liblzma, a compression library with
+ a zlib-like API. liblzma supported both the old and new file format.
+ The gzip-like lzma command-line tool was rewritten to use liblzma.
+
+ The new LZMA Utils code base was renamed to XZ Utils when the name
+ of the new file format had been decided. The liblzma compression
+ library retained its name though, because changing it would have
+ caused unnecessary breakage in applications already using the early
+ liblzma snapshots.
+
+ The xz command-line tool can emulate the gzip-like lzma tool by
+ creating appropriate symlinks (e.g. lzma -> xz). Thus, practically
+ all scripts using the lzma tool from LZMA Utils will work as is with
+ XZ Utils (and will keep using the old .lzma format). Still, the .lzma
+ format is more or less deprecated. XZ Utils will keep supporting it,
+ but new applications should use the .xz format, and migrating old
+ applications to .xz is often a good idea too.
+
diff --git a/doc/lzma-file-format.txt b/doc/lzma-file-format.txt
new file mode 100644
index 0000000..4865def
--- /dev/null
+++ b/doc/lzma-file-format.txt
@@ -0,0 +1,173 @@
+
+The .lzma File Format
+=====================
+
+ 0. Preface
+ 0.1. Notices and Acknowledgements
+ 0.2. Changes
+ 1. File Format
+ 1.1. Header
+ 1.1.1. Properties
+ 1.1.2. Dictionary Size
+ 1.1.3. Uncompressed Size
+ 1.2. LZMA Compressed Data
+ 2. References
+
+
+0. Preface
+
+ This document describes the .lzma file format, which is
+ sometimes also called LZMA_Alone format. It is a legacy file
+ format, which is being or has been replaced by the .xz format.
+ The MIME type of the .lzma format is `application/x-lzma'.
+
+ The most commonly used software to handle .lzma files are
+ LZMA SDK, LZMA Utils, 7-Zip, and XZ Utils. This document
+ describes some of the differences between these implementations
+ and gives hints what subset of the .lzma format is the most
+ portable.
+
+
+0.1. Notices and Acknowledgements
+
+ This file format was designed by Igor Pavlov for use in
+ LZMA SDK. This document was written by Lasse Collin
+ <lasse.collin@tukaani.org> using the documentation found
+ from the LZMA SDK.
+
+ This document has been put into the public domain.
+
+
+0.2. Changes
+
+ Last modified: 2022-07-13 21:00+0300
+
+ Compared to the previous version (2011-04-12 11:55+0300)
+ the section 1.1.3 was modified to allow End of Payload Marker
+ with a known Uncompressed Size.
+
+
+1. File Format
+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+==========================+
+ | Header | LZMA Compressed Data |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+==========================+
+
+ The .lzma format file consist of 13-byte Header followed by
+ the LZMA Compressed Data.
+
+ Unlike the .gz, .bz2, and .xz formats, it is not possible to
+ concatenate multiple .lzma files as is and expect the
+ decompression tool to decode the resulting file as if it were
+ a single .lzma file.
+
+ For example, the command line tools from LZMA Utils and
+ LZMA SDK silently ignore all the data after the first .lzma
+ stream. In contrast, the command line tool from XZ Utils
+ considers the .lzma file to be corrupt if there is data after
+ the first .lzma stream.
+
+
+1.1. Header
+
+ +------------+----+----+----+----+--+--+--+--+--+--+--+--+
+ | Properties | Dictionary Size | Uncompressed Size |
+ +------------+----+----+----+----+--+--+--+--+--+--+--+--+
+
+
+1.1.1. Properties
+
+ The Properties field contains three properties. An abbreviation
+ is given in parentheses, followed by the value range of the
+ property. The field consists of
+
+ 1) the number of literal context bits (lc, [0, 8]);
+ 2) the number of literal position bits (lp, [0, 4]); and
+ 3) the number of position bits (pb, [0, 4]).
+
+ The properties are encoded using the following formula:
+
+ Properties = (pb * 5 + lp) * 9 + lc
+
+ The following C code illustrates a straightforward way to
+ decode the Properties field:
+
+ uint8_t lc, lp, pb;
+ uint8_t prop = get_lzma_properties();
+ if (prop > (4 * 5 + 4) * 9 + 8)
+ return LZMA_PROPERTIES_ERROR;
+
+ pb = prop / (9 * 5);
+ prop -= pb * 9 * 5;
+ lp = prop / 9;
+ lc = prop - lp * 9;
+
+ XZ Utils has an additional requirement: lc + lp <= 4. Files
+ which don't follow this requirement cannot be decompressed
+ with XZ Utils. Usually this isn't a problem since the most
+ common lc/lp/pb values are 3/0/2. It is the only lc/lp/pb
+ combination that the files created by LZMA Utils can have,
+ but LZMA Utils can decompress files with any lc/lp/pb.
+
+
+1.1.2. Dictionary Size
+
+ Dictionary Size is stored as an unsigned 32-bit little endian
+ integer. Any 32-bit value is possible, but for maximum
+ portability, only sizes of 2^n and 2^n + 2^(n-1) should be
+ used.
+
+ LZMA Utils creates only files with dictionary size 2^n,
+ 16 <= n <= 25. LZMA Utils can decompress files with any
+ dictionary size.
+
+ XZ Utils creates and decompresses .lzma files only with
+ dictionary sizes 2^n and 2^n + 2^(n-1). If some other
+ dictionary size is specified when compressing, the value
+ stored in the Dictionary Size field is a rounded up, but the
+ specified value is still used in the actual compression code.
+
+
+1.1.3. Uncompressed Size
+
+ Uncompressed Size is stored as unsigned 64-bit little endian
+ integer. A special value of 0xFFFF_FFFF_FFFF_FFFF indicates
+ that Uncompressed Size is unknown. End of Payload Marker (*)
+ is used if Uncompressed Size is unknown. End of Payload Marker
+ is allowed but rarely used if Uncompressed Size is known.
+ XZ Utils 5.2.5 and older don't support .lzma files that have
+ End of Payload Marker together with a known Uncompressed Size.
+
+ XZ Utils rejects files whose Uncompressed Size field specifies
+ a known size that is 256 GiB or more. This is to reject false
+ positives when trying to guess if the input file is in the
+ .lzma format. When Uncompressed Size is unknown, there is no
+ limit for the uncompressed size of the file.
+
+ (*) Some tools use the term End of Stream (EOS) marker
+ instead of End of Payload Marker.
+
+
+1.2. LZMA Compressed Data
+
+ Detailed description of the format of this field is out of
+ scope of this document.
+
+
+2. References
+
+ LZMA SDK - The original LZMA implementation
+ http://7-zip.org/sdk.html
+
+ 7-Zip
+ http://7-zip.org/
+
+ LZMA Utils - LZMA adapted to POSIX-like systems
+ http://tukaani.org/lzma/
+
+ XZ Utils - The next generation of LZMA Utils
+ http://tukaani.org/xz/
+
+ The .xz file format - The successor of the .lzma format
+ http://tukaani.org/xz/xz-file-format.txt
+
diff --git a/doc/man/pdf-a4/lzmainfo-a4.pdf b/doc/man/pdf-a4/lzmainfo-a4.pdf
new file mode 100644
index 0000000..0ee526f
--- /dev/null
+++ b/doc/man/pdf-a4/lzmainfo-a4.pdf
Binary files differ
diff --git a/doc/man/pdf-a4/xz-a4.pdf b/doc/man/pdf-a4/xz-a4.pdf
new file mode 100644
index 0000000..5f1a30c
--- /dev/null
+++ b/doc/man/pdf-a4/xz-a4.pdf
Binary files differ
diff --git a/doc/man/pdf-a4/xzdec-a4.pdf b/doc/man/pdf-a4/xzdec-a4.pdf
new file mode 100644
index 0000000..35f2059
--- /dev/null
+++ b/doc/man/pdf-a4/xzdec-a4.pdf
Binary files differ
diff --git a/doc/man/pdf-a4/xzdiff-a4.pdf b/doc/man/pdf-a4/xzdiff-a4.pdf
new file mode 100644
index 0000000..1189d84
--- /dev/null
+++ b/doc/man/pdf-a4/xzdiff-a4.pdf
Binary files differ
diff --git a/doc/man/pdf-a4/xzgrep-a4.pdf b/doc/man/pdf-a4/xzgrep-a4.pdf
new file mode 100644
index 0000000..2cb3528
--- /dev/null
+++ b/doc/man/pdf-a4/xzgrep-a4.pdf
Binary files differ
diff --git a/doc/man/pdf-a4/xzless-a4.pdf b/doc/man/pdf-a4/xzless-a4.pdf
new file mode 100644
index 0000000..4a8e8e6
--- /dev/null
+++ b/doc/man/pdf-a4/xzless-a4.pdf
Binary files differ
diff --git a/doc/man/pdf-a4/xzmore-a4.pdf b/doc/man/pdf-a4/xzmore-a4.pdf
new file mode 100644
index 0000000..687074b
--- /dev/null
+++ b/doc/man/pdf-a4/xzmore-a4.pdf
Binary files differ
diff --git a/doc/man/pdf-letter/lzmainfo-letter.pdf b/doc/man/pdf-letter/lzmainfo-letter.pdf
new file mode 100644
index 0000000..d953045
--- /dev/null
+++ b/doc/man/pdf-letter/lzmainfo-letter.pdf
Binary files differ
diff --git a/doc/man/pdf-letter/xz-letter.pdf b/doc/man/pdf-letter/xz-letter.pdf
new file mode 100644
index 0000000..440f294
--- /dev/null
+++ b/doc/man/pdf-letter/xz-letter.pdf
Binary files differ
diff --git a/doc/man/pdf-letter/xzdec-letter.pdf b/doc/man/pdf-letter/xzdec-letter.pdf
new file mode 100644
index 0000000..83c6bb2
--- /dev/null
+++ b/doc/man/pdf-letter/xzdec-letter.pdf
Binary files differ
diff --git a/doc/man/pdf-letter/xzdiff-letter.pdf b/doc/man/pdf-letter/xzdiff-letter.pdf
new file mode 100644
index 0000000..9c7ab61
--- /dev/null
+++ b/doc/man/pdf-letter/xzdiff-letter.pdf
Binary files differ
diff --git a/doc/man/pdf-letter/xzgrep-letter.pdf b/doc/man/pdf-letter/xzgrep-letter.pdf
new file mode 100644
index 0000000..8303764
--- /dev/null
+++ b/doc/man/pdf-letter/xzgrep-letter.pdf
Binary files differ
diff --git a/doc/man/pdf-letter/xzless-letter.pdf b/doc/man/pdf-letter/xzless-letter.pdf
new file mode 100644
index 0000000..9a8e231
--- /dev/null
+++ b/doc/man/pdf-letter/xzless-letter.pdf
Binary files differ
diff --git a/doc/man/pdf-letter/xzmore-letter.pdf b/doc/man/pdf-letter/xzmore-letter.pdf
new file mode 100644
index 0000000..ef60bbc
--- /dev/null
+++ b/doc/man/pdf-letter/xzmore-letter.pdf
Binary files differ
diff --git a/doc/man/txt/lzmainfo.txt b/doc/man/txt/lzmainfo.txt
new file mode 100644
index 0000000..fa4e51c
--- /dev/null
+++ b/doc/man/txt/lzmainfo.txt
@@ -0,0 +1,40 @@
+LZMAINFO(1) XZ Utils LZMAINFO(1)
+
+
+
+NAME
+ lzmainfo - show information stored in the .lzma file header
+
+SYNOPSIS
+ lzmainfo [--help] [--version] [file...]
+
+DESCRIPTION
+ lzmainfo shows information stored in the .lzma file header. It reads
+ the first 13 bytes from the specified file, decodes the header, and
+ prints it to standard output in human readable format. If no files are
+ given or file is -, standard input is read.
+
+ Usually the most interesting information is the uncompressed size and
+ the dictionary size. Uncompressed size can be shown only if the file
+ is in the non-streamed .lzma format variant. The amount of memory re-
+ quired to decompress the file is a few dozen kilobytes plus the dictio-
+ nary size.
+
+ lzmainfo is included in XZ Utils primarily for backward compatibility
+ with LZMA Utils.
+
+EXIT STATUS
+ 0 All is good.
+
+ 1 An error occurred.
+
+BUGS
+ lzmainfo uses MB while the correct suffix would be MiB (2^20 bytes).
+ This is to keep the output compatible with LZMA Utils.
+
+SEE ALSO
+ xz(1)
+
+
+
+Tukaani 2013-06-30 LZMAINFO(1)
diff --git a/doc/man/txt/xz.txt b/doc/man/txt/xz.txt
new file mode 100644
index 0000000..4fec85b
--- /dev/null
+++ b/doc/man/txt/xz.txt
@@ -0,0 +1,1586 @@
+XZ(1) XZ Utils XZ(1)
+
+
+
+NAME
+ xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and
+ .lzma files
+
+SYNOPSIS
+ xz [option...] [file...]
+
+COMMAND ALIASES
+ unxz is equivalent to xz --decompress.
+ xzcat is equivalent to xz --decompress --stdout.
+ lzma is equivalent to xz --format=lzma.
+ unlzma is equivalent to xz --format=lzma --decompress.
+ lzcat is equivalent to xz --format=lzma --decompress --stdout.
+
+ When writing scripts that need to decompress files, it is recommended
+ to always use the name xz with appropriate arguments (xz -d or xz -dc)
+ instead of the names unxz and xzcat.
+
+DESCRIPTION
+ xz is a general-purpose data compression tool with command line syntax
+ similar to gzip(1) and bzip2(1). The native file format is the .xz
+ format, but the legacy .lzma format used by LZMA Utils and raw com-
+ pressed streams with no container format headers are also supported.
+ In addition, decompression of the .lz format used by lzip is supported.
+
+ xz compresses or decompresses each file according to the selected oper-
+ ation mode. If no files are given or file is -, xz reads from standard
+ input and writes the processed data to standard output. xz will refuse
+ (display an error and skip the file) to write compressed data to stan-
+ dard output if it is a terminal. Similarly, xz will refuse to read
+ compressed data from standard input if it is a terminal.
+
+ Unless --stdout is specified, files other than - are written to a new
+ file whose name is derived from the source file name:
+
+ o When compressing, the suffix of the target file format (.xz or
+ .lzma) is appended to the source filename to get the target file-
+ name.
+
+ o When decompressing, the .xz, .lzma, or .lz suffix is removed from
+ the filename to get the target filename. xz also recognizes the
+ suffixes .txz and .tlz, and replaces them with the .tar suffix.
+
+ If the target file already exists, an error is displayed and the file
+ is skipped.
+
+ Unless writing to standard output, xz will display a warning and skip
+ the file if any of the following applies:
+
+ o File is not a regular file. Symbolic links are not followed, and
+ thus they are not considered to be regular files.
+
+ o File has more than one hard link.
+
+ o File has setuid, setgid, or sticky bit set.
+
+ o The operation mode is set to compress and the file already has a
+ suffix of the target file format (.xz or .txz when compressing to
+ the .xz format, and .lzma or .tlz when compressing to the .lzma for-
+ mat).
+
+ o The operation mode is set to decompress and the file doesn't have a
+ suffix of any of the supported file formats (.xz, .txz, .lzma, .tlz,
+ or .lz).
+
+ After successfully compressing or decompressing the file, xz copies the
+ owner, group, permissions, access time, and modification time from the
+ source file to the target file. If copying the group fails, the per-
+ missions are modified so that the target file doesn't become accessible
+ to users who didn't have permission to access the source file. xz
+ doesn't support copying other metadata like access control lists or ex-
+ tended attributes yet.
+
+ Once the target file has been successfully closed, the source file is
+ removed unless --keep was specified. The source file is never removed
+ if the output is written to standard output or if an error occurs.
+
+ Sending SIGINFO or SIGUSR1 to the xz process makes it print progress
+ information to standard error. This has only limited use since when
+ standard error is a terminal, using --verbose will display an automati-
+ cally updating progress indicator.
+
+ Memory usage
+ The memory usage of xz 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 decom-
+ pressor. 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 xz -9 currently requires 65 MiB of
+ memory. Still, it is possible to have .xz files that require several
+ gigabytes of memory to decompress.
+
+ Especially users of older systems may find the possibility of very
+ large memory usage annoying. To prevent uncomfortable surprises, xz
+ 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 exam-
+ ple, using ulimit(1) to limit virtual memory tends to cripple mmap(2)).
+
+ The memory usage limiter can be enabled with the command line option
+ --memlimit=limit. Often it is more convenient to enable the limiter by
+ default by setting the environment variable XZ_DEFAULTS, for example,
+ XZ_DEFAULTS=--memlimit=150MiB. It is possible to set the limits sepa-
+ rately for compression and decompression by using --memlimit-com-
+ press=limit and --memlimit-decompress=limit. Using these two options
+ outside XZ_DEFAULTS is rarely useful because a single run of xz cannot
+ do both compression and decompression and --memlimit=limit (or -M
+ limit) is shorter to type on the command line.
+
+ If the specified memory usage limit is exceeded when decompressing, xz
+ will display an error and decompressing the file will fail. If the
+ limit is exceeded when compressing, xz will try to scale the settings
+ down so that the limit is no longer exceeded (except when using --for-
+ mat=raw or --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 xz -9, the settings
+ will be scaled down only a little, not all the way down to xz -8.
+
+ Concatenation and padding with .xz files
+ It is possible to concatenate .xz files as is. xz will decompress such
+ files as if they were a single .xz file.
+
+ It is possible to insert padding between the concatenated parts or af-
+ ter 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 .xz file is stored on a medium that measures file
+ sizes in 512-byte blocks.
+
+ Concatenation and padding are not allowed with .lzma files or raw
+ streams.
+
+OPTIONS
+ Integer suffixes and special values
+ In most places where an integer argument is expected, an optional suf-
+ fix is supported to easily indicate large integers. There must be no
+ space between the integer and the suffix.
+
+ KiB Multiply the integer by 1,024 (2^10). Ki, k, kB, K, and KB are
+ accepted as synonyms for KiB.
+
+ MiB Multiply the integer by 1,048,576 (2^20). Mi, m, M, and MB are
+ accepted as synonyms for MiB.
+
+ GiB Multiply the integer by 1,073,741,824 (2^30). Gi, g, G, and GB
+ are accepted as synonyms for GiB.
+
+ The special value max can be used to indicate the maximum integer value
+ supported by the option.
+
+ Operation mode
+ If multiple operation mode options are given, the last one takes ef-
+ fect.
+
+ -z, --compress
+ 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, unxz implies --decompress).
+
+ -d, --decompress, --uncompress
+ Decompress.
+
+ -t, --test
+ Test the integrity of compressed files. This option is equiva-
+ lent to --decompress --stdout except that the decompressed data
+ is discarded instead of being written to standard output. No
+ files are created or removed.
+
+ -l, --list
+ Print information about compressed files. No uncompressed out-
+ put 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.
+
+ The default listing shows basic information about files, one
+ file per line. To get more detailed information, use also the
+ --verbose option. For even more information, use --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 exam-
+ ple, less -S may be convenient if the terminal isn't wide
+ enough.
+
+ The exact output may vary between xz versions and different lo-
+ cales. For machine-readable output, --robot --list should be
+ used.
+
+ Operation modifiers
+ -k, --keep
+ Don't delete the input files.
+
+ Since xz 5.2.6, this option also makes xz 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
+ --force.
+
+ -f, --force
+ This option has several effects:
+
+ o If the target file already exists, delete it before compress-
+ ing or decompressing.
+
+ o 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.
+
+ o When used with --decompress --stdout and xz cannot recognize
+ the type of the source file, copy the source file as is to
+ standard output. This allows xzcat --force to be used like
+ cat(1) for files that have not been compressed with xz. Note
+ that in future, xz might support new compressed file formats,
+ which may make xz decompress more types of files instead of
+ copying them as is to standard output. --format=format can
+ be used to restrict xz to decompress only a single file for-
+ mat.
+
+ -c, --stdout, --to-stdout
+ Write the compressed or decompressed data to standard output in-
+ stead of a file. This implies --keep.
+
+ --single-stream
+ Decompress only the first .xz stream, and silently ignore possi-
+ ble remaining input data following the stream. Normally such
+ trailing garbage makes xz display an error.
+
+ xz never decompresses more than one stream from .lzma files or
+ raw streams, but this option still makes xz ignore the possible
+ trailing data after the .lzma file or raw stream.
+
+ This option has no effect if the operation mode is not --decom-
+ press or --test.
+
+ --no-sparse
+ Disable creation of sparse files. By default, if decompressing
+ into a regular file, xz tries to make the file sparse if the de-
+ compressed 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.
+
+ -S .suf, --suffix=.suf
+ When compressing, use .suf as the suffix for the target file in-
+ stead of .xz or .lzma. If not writing to standard output and
+ the source file already has the suffix .suf, a warning is dis-
+ played and the file is skipped.
+
+ When decompressing, recognize files with the suffix .suf in ad-
+ dition to files with the .xz, .txz, .lzma, .tlz, or .lz suffix.
+ If the source file has the suffix .suf, the suffix is removed to
+ get the target filename.
+
+ When compressing or decompressing raw streams (--format=raw),
+ the suffix must always be specified unless writing to standard
+ output, because there is no default suffix for raw streams.
+
+ --files[=file]
+ Read the filenames to process from file; if file is omitted,
+ filenames are read from standard input. Filenames must be ter-
+ minated with the newline character. A dash (-) is taken as a
+ regular filename; it doesn't mean standard input. If filenames
+ are given also as command line arguments, they are processed be-
+ fore the filenames read from file.
+
+ --files0[=file]
+ This is identical to --files[=file] except that each filename
+ must be terminated with the null character.
+
+ Basic file format and compression options
+ -F format, --format=format
+ Specify the file format to compress or decompress:
+
+ auto This is the default. When compressing, auto is equiva-
+ lent to xz. When decompressing, the format of the input
+ file is automatically detected. Note that raw streams
+ (created with --format=raw) cannot be auto-detected.
+
+ xz Compress to the .xz file format, or accept only .xz files
+ when decompressing.
+
+ lzma, alone
+ Compress to the legacy .lzma file format, or accept only
+ .lzma files when decompressing. The alternative name
+ alone is provided for backwards compatibility with LZMA
+ Utils.
+
+ lzip Accept only .lz files when decompressing. Compression is
+ not supported.
+
+ The .lz format version 0 and the unextended version 1 are
+ supported. Version 0 files were produced by lzip 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 lzip 1.18.
+
+ lzip 1.4 and later create files in the format version 1.
+ The sync flush marker extension to the format version 1
+ was added in lzip 1.6. This extension is rarely used and
+ isn't supported by xz (diagnosed as corrupt input).
+
+ raw Compress or uncompress a raw stream (no headers). This
+ is meant for advanced users only. To decode raw streams,
+ you need use --format=raw and explicitly specify the fil-
+ ter chain, which normally would have been stored in the
+ container headers.
+
+ -C check, --check=check
+ Specify the type of the integrity check. The check is calcu-
+ lated from the uncompressed data and stored in the .xz file.
+ This option has an effect only when compressing into the .xz
+ format; the .lzma format doesn't support integrity checks. The
+ integrity check (if any) is verified when the .xz file is decom-
+ pressed.
+
+ Supported check types:
+
+ none Don't calculate an integrity check at all. This is usu-
+ ally a bad idea. This can be useful when integrity of
+ the data is verified by other means anyway.
+
+ crc32 Calculate CRC32 using the polynomial from IEEE-802.3
+ (Ethernet).
+
+ crc64 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 neg-
+ ligible.
+
+ sha256 Calculate SHA-256. This is somewhat slower than CRC32
+ and CRC64.
+
+ Integrity of the .xz headers is always verified with CRC32. It
+ is not possible to change or disable it.
+
+ --ignore-check
+ Don't verify the integrity check of the compressed data when de-
+ compressing. The CRC32 values in the .xz headers will still be
+ verified normally.
+
+ Do not use this option unless you know what you are doing. Pos-
+ sible reasons to use this option:
+
+ o Trying to recover data from a corrupt .xz file.
+
+ o Speeding up decompression. This matters mostly with SHA-256
+ or with files that have compressed extremely well. It's rec-
+ ommended to not use this option for this purpose unless the
+ file integrity is verified externally in some other way.
+
+ -0 ... -9
+ Select a compression preset level. The default is -6. If mul-
+ tiple preset levels are specified, the last one takes effect.
+ If a custom filter chain was already specified, setting a com-
+ pression preset level clears the custom filter chain.
+
+ The differences between the presets are more significant than
+ with gzip(1) and bzip2(1). The selected compression settings
+ determine the memory requirements of the decompressor, thus us-
+ ing a too high preset level might make it painful to decompress
+ the file on an old system with little RAM. Specifically, it's
+ not a good idea to blindly use -9 for everything like it often
+ is with gzip(1) and bzip2(1).
+
+ -0 ... -3
+ These are somewhat fast presets. -0 is sometimes faster
+ than gzip -9 while compressing much better. The higher
+ ones often have speed comparable to bzip2(1) with compa-
+ rable or better compression ratio, although the results
+ depend a lot on the type of data being compressed.
+
+ -4 ... -6
+ Good to very good compression while keeping decompressor
+ memory usage reasonable even for old systems. -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. (-5e or -6e may be worth considering
+ too. See --extreme.)
+
+ -7 ... -9
+ These are like -6 but with higher compressor and decom-
+ pressor memory requirements. These are useful only when
+ compressing files bigger than 8 MiB, 16 MiB, and 32 MiB,
+ respectively.
+
+ 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 decom-
+ pression will usually be. This also means that the amount of
+ uncompressed output produced per second can vary a lot.
+
+ The following table summarises the features of the presets:
+
+ 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
+
+ Column descriptions:
+
+ o 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 -7
+ ... -9 when there's no real need for them. At -6 and lower,
+ the amount of memory wasted is usually low enough to not mat-
+ ter.
+
+ o 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 -6 ... -9,
+ higher levels still tend to be a little slower. To get even
+ slower and thus possibly better compression, see --extreme.
+
+ o CompMem contains the compressor memory requirements in the
+ single-threaded mode. It may vary slightly between xz ver-
+ sions. Memory requirements of some of the future multi-
+ threaded modes may be dramatically higher than that of the
+ single-threaded mode.
+
+ o DecMem contains the decompressor memory requirements. That
+ is, the compression settings determine the memory require-
+ ments of the decompressor. The exact decompressor memory us-
+ age is slightly more than the LZMA2 dictionary size, but the
+ values in the table have been rounded up to the next full
+ MiB.
+
+ -e, --extreme
+ Use a slower variant of the selected compression preset level
+ (-0 ... -9) to hopefully get a little bit better compression ra-
+ tio, but with bad luck this can also make it worse. Decompres-
+ sor memory usage is not affected, but compressor memory usage
+ increases a little at preset levels -0 ... -3.
+
+ Since there are two presets with dictionary sizes 4 MiB and
+ 8 MiB, the presets -3e and -5e use slightly faster settings
+ (lower CompCPU) than -4e and -6e, respectively. That way no two
+ presets are identical.
+
+ 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
+
+ For example, there are a total of four presets that use 8 MiB
+ dictionary, whose order from the fastest to the slowest is -5,
+ -6, -5e, and -6e.
+
+ --fast
+ --best These are somewhat misleading aliases for -0 and -9, respec-
+ tively. These are provided only for backwards compatibility
+ with LZMA Utils. Avoid using these options.
+
+ --block-size=size
+ When compressing to the .xz format, split the input data into
+ blocks of size bytes. The blocks are compressed independently
+ from each other, which helps with multi-threading and makes lim-
+ ited random-access decompression possible. This option is typi-
+ cally used to override the default block size in multi-threaded
+ mode, but this option can be used in single-threaded mode too.
+
+ In multi-threaded mode about three times size bytes will be al-
+ located in each thread for buffering input and output. The de-
+ fault size is three times the LZMA2 dictionary size or 1 MiB,
+ whichever is more. Typically a good value is 2-4 times the size
+ of the LZMA2 dictionary or at least 1 MiB. Using size less than
+ the LZMA2 dictionary size is waste of RAM because then the LZMA2
+ dictionary buffer will never get fully used. The sizes of the
+ blocks are stored in the block headers, which a future version
+ of xz will use for multi-threaded decompression.
+
+ In single-threaded mode no block splitting is done by default.
+ Setting this option doesn't affect memory usage. No size infor-
+ mation 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 a
+ future version of xz won't be able decompress the files in
+ multi-threaded mode.
+
+ --block-list=sizes
+ When compressing to the .xz format, start a new block after the
+ given intervals of uncompressed data.
+
+ The uncompressed sizes of the blocks are specified as a comma-
+ separated list. Omitting a size (two or more consecutive com-
+ mas) is a shorthand to use the size of the previous block.
+
+ If the input file is bigger than the sum of sizes, the last
+ value in sizes is repeated until the end of the file. A special
+ value of 0 may be used as the last value to indicate that the
+ rest of the file should be encoded as a single block.
+
+ If one specifies sizes that exceed the encoder's block size (ei-
+ ther the default value in threaded mode or the value specified
+ with --block-size=size), the encoder will create additional
+ blocks while keeping the boundaries specified in sizes. For ex-
+ ample, if one specifies --block-size=10MiB
+ --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.
+
+ 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.
+
+ --flush-timeout=timeout
+ When compressing, if more than timeout 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 xz is used to compress data that is streamed over a
+ network. Small timeout values make the data available at the
+ receiving end with a small delay, but large timeout values give
+ better compression ratio.
+
+ This feature is disabled by default. If this option is speci-
+ fied more than once, the last one takes effect. The special
+ timeout value of 0 can be used to explicitly disable this fea-
+ ture.
+
+ This feature is not available on non-POSIX systems.
+
+ This feature is still experimental. Currently xz is unsuitable
+ for decompressing the stream in real time due to how xz does
+ buffering.
+
+ --memlimit-compress=limit
+ Set a memory usage limit for compression. If this option is
+ specified multiple times, the last one takes effect.
+
+ If the compression settings exceed the limit, xz will attempt to
+ adjust the settings downwards so that the limit is no longer ex-
+ ceeded 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 limit, and finally reducing the
+ LZMA2 dictionary size.
+
+ When compressing with --format=raw or if --no-adjust has been
+ specified, only the number of threads may be reduced since it
+ can be done without affecting the compressed output.
+
+ If the limit cannot be met even with the adjustments described
+ above, an error is displayed and xz will exit with exit status
+ 1.
+
+ The limit can be specified in multiple ways:
+
+ o The limit can be an absolute value in bytes. Using an inte-
+ ger suffix like MiB can be useful. Example: --memlimit-com-
+ press=80MiB
+
+ o The limit can be specified as a percentage of total physical
+ memory (RAM). This can be useful especially when setting the
+ XZ_DEFAULTS environment variable in a shell initialization
+ script that is shared between different computers. That way
+ the limit is automatically bigger on systems with more mem-
+ ory. Example: --memlimit-compress=70%
+
+ o The limit can be reset back to its default value by setting
+ it to 0. This is currently equivalent to setting the limit
+ to max (no memory usage limit).
+
+ For 32-bit xz there is a special case: if the limit would be
+ over 4020 MiB, the limit is set to 4020 MiB. On MIPS32 2000 MiB
+ is used instead. (The values 0 and max 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.
+
+ See also the section Memory usage.
+
+ --memlimit-decompress=limit
+ Set a memory usage limit for decompression. This also affects
+ the --list mode. If the operation is not possible without ex-
+ ceeding the limit, xz will display an error and decompressing
+ the file will fail. See --memlimit-compress=limit for possible
+ ways to specify the limit.
+
+ --memlimit-mt-decompress=limit
+ Set a memory usage limit for multi-threaded decompression. This
+ can only affect the number of threads; this will never make xz
+ refuse to decompress a file. If limit is too low to allow any
+ multi-threading, the limit is ignored and xz will continue in
+ single-threaded mode. Note that if also --memlimit-decompress
+ is used, it will always apply to both single-threaded and multi-
+ threaded modes, and so the effective limit for multi-threading
+ will never be higher than the limit set with --memlimit-decom-
+ press.
+
+ In contrast to the other memory usage limit options, --mem-
+ limit-mt-decompress=limit has a system-specific default limit.
+ xz --info-memory can be used to see the current value.
+
+ This option and its default value exist because without any
+ limit the threaded decompressor could end up allocating an in-
+ sane amount of memory with some input files. If the default
+ limit is too low on your system, feel free to increase the limit
+ but never set it to a value larger than the amount of usable RAM
+ as with appropriate input files xz 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 perfor-
+ mance.
+
+ See --memlimit-compress=limit for possible ways to specify the
+ limit. Setting limit to 0 resets the limit to the default sys-
+ tem-specific value.
+
+ -M limit, --memlimit=limit, --memory=limit
+ This is equivalent to specifying --memlimit-compress=limit
+ --memlimit-decompress=limit --memlimit-mt-decompress=limit.
+
+ --no-adjust
+ Display an error and exit if the memory usage limit cannot be
+ met without adjusting settings that affect the compressed out-
+ put. That is, this prevents xz 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.
+
+ Automatic adjusting is always disabled when creating raw streams
+ (--format=raw).
+
+ -T threads, --threads=threads
+ Specify the number of worker threads to use. Setting threads to
+ a special value 0 makes xz use up to as many threads as the pro-
+ cessor(s) on the system support. The actual number of threads
+ can be fewer than threads 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.
+
+ The single-threaded and multi-threaded compressors produce dif-
+ ferent output. Single-threaded compressor will give the small-
+ est file size but only the output from the multi-threaded com-
+ pressor can be decompressed using multiple threads. Setting
+ threads to 1 will use the single-threaded mode. Setting threads
+ to any other value, including 0, will use the multi-threaded
+ compressor even if the system supports only one hardware thread.
+ (xz 5.2.x used single-threaded mode in this situation.)
+
+ To use multi-threaded mode with only one thread, set threads to
+ +1. The + prefix has no effect with values other than 1. A
+ memory usage limit can still make xz switch to single-threaded
+ mode unless --no-adjust is used. Support for the + prefix was
+ added in xz 5.4.0.
+
+ If an automatic number of threads has been requested and no mem-
+ ory usage limit has been specified, then a system-specific de-
+ fault 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
+ xz from compressing or decompressing. This default soft limit
+ will not make xz switch from multi-threaded mode to single-
+ threaded mode. The active limits can be seen with xz
+ --info-memory.
+
+ Currently the only threading method is to split the input into
+ blocks and compress them independently from each other. The de-
+ fault block size depends on the compression level and can be
+ overridden with the --block-size=size option.
+
+ 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
+ --block-size=size has been used.
+
+ Custom compressor filter chains
+ A custom filter chain allows specifying the compression settings in de-
+ tail instead of relying on the settings associated to the presets.
+ When a custom filter chain is specified, preset options (-0 ... -9 and
+ --extreme) earlier on the command line are forgotten. If a preset op-
+ tion 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.
+
+ A filter chain is comparable to piping on the command line. When com-
+ pressing, 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 fil-
+ ters.
+
+ 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. De-
+ pending on the filter, this limitation is either inherent to the filter
+ design or exists to prevent security issues.
+
+ A custom filter chain is specified by using one or more filter options
+ in the order they are wanted in the filter chain. That is, the order
+ of filter options is significant! When decoding raw streams (--for-
+ mat=raw), the filter chain is specified in the same order as it was
+ specified when compressing.
+
+ Filters take filter-specific options as a comma-separated list. Extra
+ commas in options are ignored. Every option has a default value, so
+ you need to specify only those you want to change.
+
+ To see the whole filter chain and options, use xz -vv (that is, use
+ --verbose twice). This works also for viewing the filter chain options
+ used by presets.
+
+ --lzma1[=options]
+ --lzma2[=options]
+ Add LZMA1 or LZMA2 filter to the filter chain. These filters
+ can be used only as the last filter in the chain.
+
+ LZMA1 is a legacy filter, which is supported almost solely due
+ to the legacy .lzma file format, which supports only LZMA1.
+ LZMA2 is an updated version of LZMA1 to fix some practical is-
+ sues of LZMA1. The .xz format uses LZMA2 and doesn't support
+ LZMA1 at all. Compression speed and ratios of LZMA1 and LZMA2
+ are practically the same.
+
+ LZMA1 and LZMA2 share the same set of options:
+
+ preset=preset
+ Reset all LZMA1 or LZMA2 options to preset. Preset con-
+ sist of an integer, which may be followed by single-let-
+ ter preset modifiers. The integer can be from 0 to 9,
+ matching the command line options -0 ... -9. The only
+ supported modifier is currently e, which matches --ex-
+ treme. If no preset is specified, the default values of
+ LZMA1 or LZMA2 options are taken from the preset 6.
+
+ dict=size
+ Dictionary (history buffer) size indicates how many bytes
+ of the recently processed uncompressed data is kept in
+ memory. The algorithm tries to find repeating byte se-
+ quences (matches) in the uncompressed data, and replace
+ them with references to the data currently in the dictio-
+ nary. The bigger the dictionary, the higher is the
+ chance to find a match. Thus, increasing dictionary size
+ usually improves compression ratio, but a dictionary big-
+ ger than the uncompressed file is waste of memory.
+
+ Typical dictionary size is from 64 KiB to 64 MiB. The
+ minimum is 4 KiB. The maximum for compression is cur-
+ rently 1.5 GiB (1536 MiB). The decompressor already sup-
+ ports dictionaries up to one byte less than 4 GiB, which
+ is the maximum for the LZMA1 and LZMA2 stream formats.
+
+ Dictionary size and match finder (mf) together determine
+ the memory usage of the LZMA1 or LZMA2 encoder. The same
+ (or bigger) dictionary size 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 .xz headers store the dictionary
+ size either as 2^n or 2^n + 2^(n-1), so these sizes are
+ somewhat preferred for compression. Other sizes will get
+ rounded up when stored in the .xz headers.
+
+ lc=lc Specify the number of literal context bits. The minimum
+ is 0 and the maximum is 4; the default is 3. In addi-
+ tion, the sum of lc and lp must not exceed 4.
+
+ 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.
+
+ The literal coding makes an assumption that the highest
+ lc 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 let-
+ ter, and a lower-case letter is usually followed by an-
+ other 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 lc is at least 3, the
+ literal coding can take advantage of this property in the
+ uncompressed data.
+
+ The default value (3) is usually good. If you want maxi-
+ mum compression, test lc=4. Sometimes it helps a little,
+ and sometimes it makes compression worse. If it makes it
+ worse, test lc=2 too.
+
+ lp=lp Specify the number of literal position bits. The minimum
+ is 0 and the maximum is 4; the default is 0.
+
+ Lp affects what kind of alignment in the uncompressed
+ data is assumed when encoding literals. See pb below for
+ more information about alignment.
+
+ pb=pb Specify the number of position bits. The minimum is 0
+ and the maximum is 4; the default is 2.
+
+ Pb affects what kind of alignment in the uncompressed
+ data is assumed in general. The default means four-byte
+ alignment (2^pb=2^2=4), which is often a good choice when
+ there's no better guess.
+
+ When the alignment is known, setting pb accordingly may
+ reduce the file size a little. For example, with text
+ files having one-byte alignment (US-ASCII, ISO-8859-*,
+ UTF-8), setting pb=0 can improve compression slightly.
+ For UTF-16 text, pb=1 is a good choice. If the alignment
+ is an odd number like 3 bytes, pb=0 might be the best
+ choice.
+
+ Even though the assumed alignment can be adjusted with pb
+ and lp, 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 com-
+ pressed with LZMA1 or LZMA2.
+
+ mf=mf 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 preset: 0 uses hc3, 1-3 use hc4,
+ and the rest use bt4.
+
+ The following match finders are supported. The memory
+ usage formulas below are rough approximations, which are
+ closest to the reality when dict is a power of two.
+
+ hc3 Hash Chain with 2- and 3-byte hashing
+ Minimum value for nice: 3
+ Memory usage:
+ dict * 7.5 (if dict <= 16 MiB);
+ dict * 5.5 + 64 MiB (if dict > 16 MiB)
+
+ hc4 Hash Chain with 2-, 3-, and 4-byte hashing
+ Minimum value for nice: 4
+ Memory usage:
+ dict * 7.5 (if dict <= 32 MiB);
+ dict * 6.5 (if dict > 32 MiB)
+
+ bt2 Binary Tree with 2-byte hashing
+ Minimum value for nice: 2
+ Memory usage: dict * 9.5
+
+ bt3 Binary Tree with 2- and 3-byte hashing
+ Minimum value for nice: 3
+ Memory usage:
+ dict * 11.5 (if dict <= 16 MiB);
+ dict * 9.5 + 64 MiB (if dict > 16 MiB)
+
+ bt4 Binary Tree with 2-, 3-, and 4-byte hashing
+ Minimum value for nice: 4
+ Memory usage:
+ dict * 11.5 (if dict <= 32 MiB);
+ dict * 10.5 (if dict > 32 MiB)
+
+ mode=mode
+ Compression mode specifies the method to analyze the data
+ produced by the match finder. Supported modes are fast
+ and normal. The default is fast for presets 0-3 and nor-
+ mal for presets 4-9.
+
+ Usually fast is used with Hash Chain match finders and
+ normal with Binary Tree match finders. This is also what
+ the presets do.
+
+ nice=nice
+ Specify what is considered to be a nice length for a
+ match. Once a match of at least nice bytes is found, the
+ algorithm stops looking for possibly better matches.
+
+ Nice can be 2-273 bytes. Higher values tend to give bet-
+ ter compression ratio at the expense of speed. The de-
+ fault depends on the preset.
+
+ depth=depth
+ Specify the maximum search depth in the match finder.
+ The default is the special value of 0, which makes the
+ compressor determine a reasonable depth from mf and nice.
+
+ Reasonable depth for Hash Chains is 4-100 and 16-1000 for
+ Binary Trees. Using very high values for depth can make
+ the encoder extremely slow with some files. Avoid set-
+ ting the depth over 1000 unless you are prepared to in-
+ terrupt the compression in case it is taking far too
+ long.
+
+ When decoding raw streams (--format=raw), LZMA2 needs only the
+ dictionary size. LZMA1 needs also lc, lp, and pb.
+
+ --x86[=options]
+ --arm[=options]
+ --armthumb[=options]
+ --arm64[=options]
+ --powerpc[=options]
+ --ia64[=options]
+ --sparc[=options]
+ 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.
+
+ 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-15 % smaller .xz file. The BCJ filters are always re-
+ versible, 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 in-
+ significant amount of memory.
+
+ These BCJ filters have known problems related to the compression
+ ratio:
+
+ o 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 conver-
+ sion, which will make the compression worse with these files.
+
+ o 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.
+
+ Different instruction sets have different alignment: the exe-
+ cutable file must be aligned to a multiple of this value in the
+ input data to make the filter work.
+
+ Filter Alignment Notes
+ x86 1 32-bit or 64-bit x86
+ ARM 4
+ ARM-Thumb 2
+ ARM64 4 4096-byte alignment is best
+ PowerPC 4 Big endian only
+ IA-64 16 Itanium
+ SPARC 4
+
+ Since the BCJ-filtered data is usually compressed with LZMA2,
+ the compression ratio may be improved slightly if the LZMA2 op-
+ tions are set to match the alignment of the selected BCJ filter.
+ For example, with the IA-64 filter, it's good to set pb=4 or
+ even pb=4,lp=4,lc=0 with LZMA2 (2^4=16). The x86 filter is an
+ exception; it's usually good to stick to LZMA2's default four-
+ byte alignment when compressing x86 executables.
+
+ All BCJ filters support the same options:
+
+ start=offset
+ Specify the start offset that is used when converting be-
+ tween relative and absolute addresses. The offset must
+ be a multiple of the alignment of the filter (see the ta-
+ ble above). The default is zero. In practice, the de-
+ fault is good; specifying a custom offset is almost never
+ useful.
+
+ --delta[=options]
+ Add the Delta filter to the filter chain. The Delta filter can
+ be only used as a non-last filter in the filter chain.
+
+ 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 pur-
+ pose algorithms may give significantly better results than Delta
+ + LZMA2. This is true especially with audio, which compresses
+ faster and better, for example, with flac(1).
+
+ Supported options:
+
+ dist=distance
+ Specify the distance of the delta calculation in bytes.
+ distance must be 1-256. The default is 1.
+
+ For example, with dist=2 and eight-byte input A1 B1 A2 B3
+ A3 B5 A4 B7, the output will be A1 B1 01 02 01 02 01 02.
+
+ Other options
+ -q, --quiet
+ 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 indi-
+ cate a warning is still used.
+
+ -v, --verbose
+ Be verbose. If standard error is connected to a terminal, xz
+ will display a progress indicator. Specifying --verbose twice
+ will give even more verbose output.
+
+ The progress indicator shows the following information:
+
+ o Completion percentage is shown if the size of the input file
+ is known. That is, the percentage cannot be shown in pipes.
+
+ o Amount of compressed data produced (compressing) or consumed
+ (decompressing).
+
+ o Amount of uncompressed data consumed (compressing) or pro-
+ duced (decompressing).
+
+ o Compression ratio, which is calculated by dividing the amount
+ of compressed data processed so far by the amount of uncom-
+ pressed data processed so far.
+
+ o Compression or decompression speed. This is measured as the
+ amount of uncompressed data consumed (compression) or pro-
+ duced (decompression) per second. It is shown after a few
+ seconds have passed since xz started processing the file.
+
+ o Elapsed time in the format M:SS or H:MM:SS.
+
+ o Estimated remaining time is shown only when the size of the
+ input file is known and a couple of seconds have already
+ passed since xz started processing the file. The time is
+ shown in a less precise format which never has any colons,
+ for example, 2 min 30 s.
+
+ When standard error is not a terminal, --verbose will make xz
+ print the filename, compressed size, uncompressed size, compres-
+ sion 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 comple-
+ tion percentage is printed if the size of the input file is
+ known.
+
+ -Q, --no-warn
+ Don't set the exit status to 2 even if a condition worth a warn-
+ ing was detected. This option doesn't affect the verbosity
+ level, thus both --quiet and --no-warn have to be used to not
+ display warnings and to not alter the exit status.
+
+ --robot
+ Print messages in a machine-parsable format. This is intended
+ to ease writing frontends that want to use xz instead of li-
+ blzma, which may be the case with various scripts. The output
+ with this option enabled is meant to be stable across xz re-
+ leases. See the section ROBOT MODE for details.
+
+ --info-memory
+ Display, in human-readable format, how much physical memory
+ (RAM) and how many processor threads xz thinks the system has
+ and the memory usage limits for compression and decompression,
+ and exit successfully.
+
+ -h, --help
+ Display a help message describing the most commonly used op-
+ tions, and exit successfully.
+
+ -H, --long-help
+ Display a help message describing all features of xz, and exit
+ successfully
+
+ -V, --version
+ Display the version number of xz and liblzma in human readable
+ format. To get machine-parsable output, specify --robot before
+ --version.
+
+ROBOT MODE
+ The robot mode is activated with the --robot option. It makes the out-
+ put of xz easier to parse by other programs. Currently --robot is sup-
+ ported only together with --version, --info-memory, and --list. It
+ will be supported for compression and decompression in the future.
+
+ Version
+ xz --robot --version prints the version number of xz and liblzma in the
+ following format:
+
+ XZ_VERSION=XYYYZZZS
+ LIBLZMA_VERSION=XYYYZZZS
+
+ X Major version.
+
+ YYY Minor version. Even numbers are stable. Odd numbers are alpha
+ or beta versions.
+
+ ZZZ Patch level for stable releases or just a counter for develop-
+ ment releases.
+
+ S Stability. 0 is alpha, 1 is beta, and 2 is stable. S should be
+ always 2 when YYY is even.
+
+ XYYYZZZS are the same on both lines if xz and liblzma are from the same
+ XZ Utils release.
+
+ Examples: 4.999.9beta is 49990091 and 5.0.0 is 50000002.
+
+ Memory limit information
+ xz --robot --info-memory prints a single line with multiple tab-sepa-
+ rated columns:
+
+ 1. Total amount of physical memory (RAM) in bytes.
+
+ 2. Memory usage limit for compression in bytes (--memlimit-compress).
+ A special value of 0 indicates the default setting which for sin-
+ gle-threaded mode is the same as no limit.
+
+ 3. Memory usage limit for decompression in bytes (--memlimit-decom-
+ press). A special value of 0 indicates the default setting which
+ for single-threaded mode is the same as no limit.
+
+ 4. Since xz 5.3.4alpha: Memory usage for multi-threaded decompression
+ in bytes (--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 --memlimit-mt-decompress.
+
+ 5. Since 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 (--threads=0) and no memory usage
+ limit has been specified (--memlimit-compress). This is also used
+ as the default value for --memlimit-mt-decompress.
+
+ 6. Since xz 5.3.4alpha: Number of available processor threads.
+
+ In the future, the output of xz --robot --info-memory may have more
+ columns, but never more than a single line.
+
+ List mode
+ xz --robot --list uses tab-separated output. The first column of every
+ line has a string that indicates the type of the information found on
+ that line:
+
+ name This is always the first line when starting to list a file. The
+ second column on the line is the filename.
+
+ file This line contains overall information about the .xz file. This
+ line is always printed after the name line.
+
+ stream This line type is used only when --verbose was specified. There
+ are as many stream lines as there are streams in the .xz file.
+
+ block This line type is used only when --verbose was specified. There
+ are as many block lines as there are blocks in the .xz file.
+ The block lines are shown after all the stream lines; different
+ line types are not interleaved.
+
+ summary
+ This line type is used only when --verbose was specified twice.
+ This line is printed after all block lines. Like the file line,
+ the summary line contains overall information about the .xz
+ file.
+
+ totals This line is always the very last line of the list output. It
+ shows the total counts and sizes.
+
+ The columns of the file lines:
+ 2. Number of streams in the file
+ 3. Total number of blocks in the stream(s)
+ 4. Compressed size of the file
+ 5. Uncompressed size of the file
+ 6. Compression ratio, for example, 0.123. If ratio is over
+ 9.999, three dashes (---) are displayed instead of the ra-
+ tio.
+ 7. Comma-separated list of integrity check names. The follow-
+ ing strings are used for the known check types: None, CRC32,
+ CRC64, and SHA-256. For unknown check types, Unknown-N is
+ used, where N is the Check ID as a decimal number (one or
+ two digits).
+ 8. Total size of stream padding in the file
+
+ The columns of the stream lines:
+ 2. Stream number (the first stream is 1)
+ 3. Number of blocks in the stream
+ 4. Compressed start offset
+ 5. Uncompressed start offset
+ 6. Compressed size (does not include stream padding)
+ 7. Uncompressed size
+ 8. Compression ratio
+ 9. Name of the integrity check
+ 10. Size of stream padding
+
+ The columns of the block lines:
+ 2. Number of the stream containing this block
+ 3. Block number relative to the beginning of the stream (the
+ first block is 1)
+ 4. Block number relative to the beginning of the file
+ 5. Compressed start offset relative to the beginning of the
+ file
+ 6. Uncompressed start offset relative to the beginning of the
+ file
+ 7. Total compressed size of the block (includes headers)
+ 8. Uncompressed size
+ 9. Compression ratio
+ 10. Name of the integrity check
+
+ If --verbose was specified twice, additional columns are included on
+ the block lines. These are not displayed with a single --verbose, be-
+ cause getting this information requires many seeks and can thus be
+ slow:
+ 11. Value of the integrity check in hexadecimal
+ 12. Block header size
+ 13. Block flags: c indicates that compressed size is present,
+ and u indicates that uncompressed size is present. If the
+ flag is not set, a dash (-) is shown instead to keep the
+ string length fixed. New flags may be added to the end of
+ the string in the future.
+ 14. Size of the actual compressed data in the block (this ex-
+ cludes the block header, block padding, and check fields)
+ 15. Amount of memory (in bytes) required to decompress this
+ block with this xz version
+ 16. Filter chain. Note that most of the options used at com-
+ pression time cannot be known, because only the options that
+ are needed for decompression are stored in the .xz headers.
+
+ The columns of the summary lines:
+ 2. Amount of memory (in bytes) required to decompress this file
+ with this xz version
+ 3. yes or no indicating if all block headers have both com-
+ pressed size and uncompressed size stored in them
+ Since xz 5.1.2alpha:
+ 4. Minimum xz version required to decompress the file
+
+ The columns of the totals line:
+ 2. Number of streams
+ 3. Number of blocks
+ 4. Compressed size
+ 5. Uncompressed size
+ 6. Average compression ratio
+ 7. Comma-separated list of integrity check names that were
+ present in the files
+ 8. Stream padding size
+ 9. Number of files. This is here to keep the order of the ear-
+ lier columns the same as on file lines.
+
+ If --verbose was specified twice, additional columns are included on
+ the totals line:
+ 10. Maximum amount of memory (in bytes) required to decompress
+ the files with this xz version
+ 11. yes or no indicating if all block headers have both com-
+ pressed size and uncompressed size stored in them
+ Since xz 5.1.2alpha:
+ 12. Minimum xz version required to decompress the file
+
+ 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.
+
+EXIT STATUS
+ 0 All is good.
+
+ 1 An error occurred.
+
+ 2 Something worth a warning occurred, but no actual errors oc-
+ curred.
+
+ Notices (not warnings or errors) printed on standard error don't affect
+ the exit status.
+
+ENVIRONMENT
+ xz parses space-separated lists of options from the environment vari-
+ ables XZ_DEFAULTS and XZ_OPT, in this order, before parsing the options
+ from the command line. Note that only options are parsed from the en-
+ vironment variables; all non-options are silently ignored. Parsing is
+ done with getopt_long(3) which is used also for the command line argu-
+ ments.
+
+ XZ_DEFAULTS
+ User-specific or system-wide default options. Typically this is
+ set in a shell initialization script to enable xz's memory usage
+ limiter by default. Excluding shell initialization scripts and
+ similar special cases, scripts must never set or unset XZ_DE-
+ FAULTS.
+
+ XZ_OPT This is for passing options to xz when it is not possible to set
+ the options directly on the xz command line. This is the case
+ when xz is run by a script or tool, for example, GNU tar(1):
+
+ XZ_OPT=-2v tar caf foo.tar.xz foo
+
+ Scripts may use XZ_OPT, for example, to set script-specific de-
+ fault compression options. It is still recommended to allow
+ users to override XZ_OPT if that is reasonable. For example, in
+ sh(1) scripts one may use something like this:
+
+ XZ_OPT=${XZ_OPT-"-7e"}
+ export XZ_OPT
+
+LZMA UTILS COMPATIBILITY
+ The command line syntax of xz is practically a superset of lzma, un-
+ lzma, and 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.
+
+ Compression preset levels
+ The numbering of the compression level presets is not identical in 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.
+
+ 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
+
+ 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:
+
+ 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
+
+ The default preset level in LZMA Utils is -7 while in XZ Utils it is
+ -6, so both use an 8 MiB dictionary by default.
+
+ Streamed vs. non-streamed .lzma files
+ The uncompressed size of the file can be stored in the .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.
+
+ xz supports decompressing .lzma files with or without end-of-payload
+ marker, but all .lzma files created by xz will use end-of-payload
+ marker and have uncompressed size marked as unknown in the .lzma
+ header. This may be a problem in some uncommon situations. For exam-
+ ple, a .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 .lzma files with known un-
+ compressed size.
+
+ Unsupported .lzma files
+ The .lzma format allows lc values up to 8, and lp values up to 4. LZMA
+ Utils can decompress files with any lc and lp, but always creates files
+ with lc=3 and lp=0. Creating files with other lc and lp is possible
+ with xz and with LZMA SDK.
+
+ The implementation of the LZMA1 filter in liblzma requires that the sum
+ of lc and lp must not exceed 4. Thus, .lzma files, which exceed this
+ limitation, cannot be decompressed with xz.
+
+ LZMA Utils creates only .lzma files which have a dictionary size of 2^n
+ (a power of 2) but accepts files with any dictionary size. liblzma ac-
+ cepts only .lzma files which have a dictionary size of 2^n or 2^n +
+ 2^(n-1). This is to decrease false positives when detecting .lzma
+ files.
+
+ These limitations shouldn't be a problem in practice, since practically
+ all .lzma files have been compressed with settings that liblzma will
+ accept.
+
+ Trailing garbage
+ When decompressing, LZMA Utils silently ignore everything after the
+ first .lzma stream. In most situations, this is a bug. This also
+ means that LZMA Utils don't support decompressing concatenated .lzma
+ files.
+
+ If there is data left after the first .lzma stream, xz considers the
+ file to be corrupt unless --single-stream was used. This may break ob-
+ scure scripts which have assumed that trailing garbage is ignored.
+
+NOTES
+ 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 bet-
+ ter 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.
+
+ The above means that once --rsyncable has been implemented, the result-
+ ing 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 rsynca-
+ ble output stable across xz versions.
+
+ Embedded .xz decompressors
+ Embedded .xz decompressor implementations like XZ Embedded don't neces-
+ sarily support files created with integrity check types other than none
+ and crc32. Since the default is --check=crc64, you must use
+ --check=none or --check=crc32 when creating files for embedded systems.
+
+ Outside embedded systems, all .xz format decompressors support all the
+ check types, or at least are able to decompress the file without veri-
+ fying the integrity check if the particular check is not supported.
+
+ XZ Embedded supports BCJ filters, but only with the default start off-
+ set.
+
+EXAMPLES
+ Basics
+ Compress the file foo into foo.xz using the default compression level
+ (-6), and remove foo if compression is successful:
+
+ xz foo
+
+ Decompress bar.xz into bar and don't remove bar.xz even if decompres-
+ sion is successful:
+
+ xz -dk bar.xz
+
+ Create baz.tar.xz with the preset -4e (-4 --extreme), which is slower
+ than the default -6, but needs less memory for compression and decom-
+ pression (48 MiB and 5 MiB, respectively):
+
+ tar cf - baz | xz -4e > baz.tar.xz
+
+ A mix of compressed and uncompressed files can be decompressed to stan-
+ dard output with a single command:
+
+ xz -dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt
+
+ Parallel compression of many files
+ On GNU and *BSD, find(1) and xargs(1) can be used to parallelize com-
+ pression of many files:
+
+ find . -type f \! -name '*.xz' -print0 \
+ | xargs -0r -P4 -n16 xz -T1
+
+ The -P option to xargs(1) sets the number of parallel xz processes.
+ The best value for the -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 xz processes that xargs(1) will
+ eventually create.
+
+ The option -T1 for xz is there to force it to single-threaded mode, be-
+ cause xargs(1) is used to control the amount of parallelization.
+
+ Robot mode
+ Calculate how many bytes have been saved in total after compressing
+ multiple files:
+
+ xz --robot --list *.xz | awk '/^totals/{print $5-$4}'
+
+ A script may want to know that it is using new enough xz. The follow-
+ ing sh(1) script checks that the version number of the xz tool is at
+ least 5.0.0. This method is compatible with old beta versions, which
+ didn't support the --robot option:
+
+ 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
+
+ Set a memory usage limit for decompression using XZ_OPT, but if a limit
+ has already been set, don't increase it:
+
+ 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
+
+ Custom compressor filter chains
+ The simplest use for custom filter chains is customizing a LZMA2 pre-
+ set. This can be useful, because the presets cover only a subset of
+ the potentially useful combinations of compression settings.
+
+ The CompCPU columns of the tables from the descriptions of the options
+ -0 ... -9 and --extreme are useful when customizing LZMA2 presets.
+ Here are the relevant parts collected from those two tables:
+
+ Preset CompCPU
+ -0 0
+ -1 1
+ -2 2
+ -3 3
+ -4 4
+ -5 5
+ -6 6
+ -5e 7
+ -6e 8
+
+ 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 xz
+ -8 would do, a preset with a low CompCPU value (for example, 1) can be
+ modified to use a bigger dictionary:
+
+ xz --lzma2=preset=1,dict=32MiB foo.tar
+
+ With certain files, the above command may be faster than 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.
+
+ 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 xz -9
+ would use:
+
+ xz -vv --lzma2=dict=192MiB big_foo.tar
+
+ Using -vv (--verbose --verbose) like in the above example can be useful
+ to see the memory requirements of the compressor and decompressor. Re-
+ member 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.
+
+ 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
+ -6e (-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 --check=crc32) using about 100 KiB of memory.
+
+ xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo
+
+ If you want to squeeze out as many bytes as possible, adjusting the
+ number of literal context bits (lc) and number of position bits (pb)
+ can sometimes help. Adjusting the number of literal position bits (lp)
+ might help too, but usually lc and 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 xz -6e
+ (try also without lc=4):
+
+ xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar
+
+ 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:
+
+ xz --x86 --lzma2 libfoo.so
+
+ Note that the order of the filter options is significant. If --x86 is
+ specified after --lzma2, 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.
+
+ The Delta filter together with LZMA2 can give good results with bitmap
+ images. It should usually beat PNG, which has a few more advanced fil-
+ ters than simple delta but uses Deflate for the actual compression.
+
+ The image has to be saved in uncompressed format, for example, as un-
+ compressed 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 dist=3, and it is also good to pass pb=0 to LZMA2 to
+ accommodate the three-byte alignment:
+
+ xz --delta=dist=3 --lzma2=pb=0 foo.tiff
+
+ If multiple images have been put into a single archive (for example,
+ .tar), the Delta filter will work on that too as long as all images
+ have the same number of bytes per pixel.
+
+SEE ALSO
+ xzdec(1), xzdiff(1), xzgrep(1), xzless(1), xzmore(1), gzip(1),
+ bzip2(1), 7z(1)
+
+ XZ Utils: <https://tukaani.org/xz/>
+ XZ Embedded: <https://tukaani.org/xz/embedded.html>
+ LZMA SDK: <https://7-zip.org/sdk.html>
+
+
+
+Tukaani 2023-07-17 XZ(1)
diff --git a/doc/man/txt/xzdec.txt b/doc/man/txt/xzdec.txt
new file mode 100644
index 0000000..a914e20
--- /dev/null
+++ b/doc/man/txt/xzdec.txt
@@ -0,0 +1,80 @@
+XZDEC(1) XZ Utils XZDEC(1)
+
+
+
+NAME
+ xzdec, lzmadec - Small .xz and .lzma decompressors
+
+SYNOPSIS
+ xzdec [option...] [file...]
+ lzmadec [option...] [file...]
+
+DESCRIPTION
+ xzdec is a liblzma-based decompression-only tool for .xz (and only .xz)
+ files. xzdec is intended to work as a drop-in replacement for xz(1) in
+ the most common situations where a script has been written to use xz
+ --decompress --stdout (and possibly a few other commonly used options)
+ to decompress .xz files. lzmadec is identical to xzdec except that lz-
+ madec supports .lzma files instead of .xz files.
+
+ To reduce the size of the executable, xzdec doesn't support multi-
+ threading or localization, and doesn't read options from XZ_DEFAULTS
+ and XZ_OPT environment variables. xzdec doesn't support displaying in-
+ termediate progress information: sending SIGINFO to xzdec does nothing,
+ but sending SIGUSR1 terminates the process instead of displaying
+ progress information.
+
+OPTIONS
+ -d, --decompress, --uncompress
+ Ignored for xz(1) compatibility. xzdec supports only decompres-
+ sion.
+
+ -k, --keep
+ Ignored for xz(1) compatibility. xzdec never creates or removes
+ any files.
+
+ -c, --stdout, --to-stdout
+ Ignored for xz(1) compatibility. xzdec always writes the decom-
+ pressed data to standard output.
+
+ -q, --quiet
+ Specifying this once does nothing since xzdec never displays any
+ warnings or notices. Specify this twice to suppress errors.
+
+ -Q, --no-warn
+ Ignored for xz(1) compatibility. xzdec never uses the exit sta-
+ tus 2.
+
+ -h, --help
+ Display a help message and exit successfully.
+
+ -V, --version
+ Display the version number of xzdec and liblzma.
+
+EXIT STATUS
+ 0 All was good.
+
+ 1 An error occurred.
+
+ xzdec doesn't have any warning messages like xz(1) has, thus the exit
+ status 2 is not used by xzdec.
+
+NOTES
+ Use xz(1) instead of xzdec or lzmadec for normal everyday use. xzdec
+ or lzmadec are meant only for situations where it is important to have
+ a smaller decompressor than the full-featured xz(1).
+
+ xzdec and 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 .xz
+ decompressor, consider using XZ Embedded.
+
+SEE ALSO
+ xz(1)
+
+ XZ Embedded: <https://tukaani.org/xz/embedded.html>
+
+
+
+Tukaani 2017-04-19 XZDEC(1)
diff --git a/doc/man/txt/xzdiff.txt b/doc/man/txt/xzdiff.txt
new file mode 100644
index 0000000..681b00c
--- /dev/null
+++ b/doc/man/txt/xzdiff.txt
@@ -0,0 +1,37 @@
+XZDIFF(1) XZ Utils XZDIFF(1)
+
+
+
+NAME
+ xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files
+
+SYNOPSIS
+ xzcmp [cmp_options] file1 [file2]
+ xzdiff [diff_options] file1 [file2]
+ lzcmp [cmp_options] file1 [file2]
+ lzdiff [diff_options] file1 [file2]
+
+DESCRIPTION
+ xzcmp and xzdiff invoke cmp(1) or diff(1) on files compressed with
+ xz(1), lzma(1), gzip(1), bzip2(1), lzop(1), or zstd(1). All options
+ specified are passed directly to cmp(1) or diff(1). If only one file
+ is specified, then the files compared are file1 (which must have a suf-
+ fix of a supported compression format) and file1 from which the com-
+ pression format suffix has been stripped. If two files are specified,
+ then they are uncompressed if necessary and fed to cmp(1) or diff(1).
+ The exit status from cmp(1) or diff(1) is preserved unless a decompres-
+ sion error occurs; then exit status is 2.
+
+ The names lzcmp and lzdiff are provided for backward compatibility with
+ LZMA Utils.
+
+SEE ALSO
+ cmp(1), diff(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), zdiff(1)
+
+BUGS
+ Messages from the cmp(1) or diff(1) programs refer to temporary file-
+ names instead of those specified.
+
+
+
+Tukaani 2021-06-04 XZDIFF(1)
diff --git a/doc/man/txt/xzgrep.txt b/doc/man/txt/xzgrep.txt
new file mode 100644
index 0000000..596520c
--- /dev/null
+++ b/doc/man/txt/xzgrep.txt
@@ -0,0 +1,49 @@
+XZGREP(1) XZ Utils XZGREP(1)
+
+
+
+NAME
+ xzgrep - search compressed files for a regular expression
+
+SYNOPSIS
+ xzgrep [grep_options] [-e] pattern [file...]
+ xzegrep ...
+ xzfgrep ...
+ lzgrep ...
+ lzegrep ...
+ lzfgrep ...
+
+DESCRIPTION
+ xzgrep invokes grep(1) on files which may be either uncompressed or
+ compressed with xz(1), lzma(1), gzip(1), bzip2(1), lzop(1), or zstd(1).
+ All options specified are passed directly to grep(1).
+
+ If no file is specified, then standard input is decompressed if neces-
+ sary and fed to grep(1). When reading from standard input, gzip(1),
+ bzip2(1), lzop(1), and zstd(1) compressed files are not supported.
+
+ If xzgrep is invoked as xzegrep or xzfgrep then grep -E or grep -F is
+ used instead of grep(1). The same applies to names lzgrep, lzegrep,
+ and lzfgrep, which are provided for backward compatibility with LZMA
+ Utils.
+
+EXIT STATUS
+ 0 At least one match was found from at least one of the input
+ files. No errors occurred.
+
+ 1 No matches were found from any of the input files. No errors
+ occurred.
+
+ >1 One or more errors occurred. It is unknown if matches were
+ found.
+
+ENVIRONMENT
+ GREP If the GREP environment variable is set, xzgrep uses it instead
+ of grep(1), grep -E, or grep -F.
+
+SEE ALSO
+ grep(1), xz(1), gzip(1), bzip2(1), lzop(1), zstd(1), zgrep(1)
+
+
+
+Tukaani 2022-07-19 XZGREP(1)
diff --git a/doc/man/txt/xzless.txt b/doc/man/txt/xzless.txt
new file mode 100644
index 0000000..5c14c80
--- /dev/null
+++ b/doc/man/txt/xzless.txt
@@ -0,0 +1,39 @@
+XZLESS(1) XZ Utils XZLESS(1)
+
+
+
+NAME
+ xzless, lzless - view xz or lzma compressed (text) files
+
+SYNOPSIS
+ xzless [file...]
+ lzless [file...]
+
+DESCRIPTION
+ xzless is a filter that displays text from compressed files to a termi-
+ nal. It works on files compressed with xz(1) or lzma(1). If no files
+ are given, xzless reads from standard input.
+
+ xzless uses less(1) to present its output. Unlike xzmore, its choice
+ of pager cannot be altered by setting an environment variable. Com-
+ mands are based on both more(1) and vi(1) and allow back and forth
+ movement and searching. See the less(1) manual for more information.
+
+ The command named lzless is provided for backward compatibility with
+ LZMA Utils.
+
+ENVIRONMENT
+ LESSMETACHARS
+ A list of characters special to the shell. Set by xzless unless
+ it is already set in the environment.
+
+ LESSOPEN
+ Set to a command line to invoke the xz(1) decompressor for pre-
+ processing the input files to less(1).
+
+SEE ALSO
+ less(1), xz(1), xzmore(1), zless(1)
+
+
+
+Tukaani 2010-09-27 XZLESS(1)
diff --git a/doc/man/txt/xzmore.txt b/doc/man/txt/xzmore.txt
new file mode 100644
index 0000000..5a9d86c
--- /dev/null
+++ b/doc/man/txt/xzmore.txt
@@ -0,0 +1,34 @@
+XZMORE(1) XZ Utils XZMORE(1)
+
+
+
+NAME
+ xzmore, lzmore - view xz or lzma compressed (text) files
+
+SYNOPSIS
+ xzmore [file...]
+ lzmore [file...]
+
+DESCRIPTION
+ xzmore is a filter which allows examination of xz(1) or lzma(1) com-
+ pressed text files one screenful at a time on a soft-copy terminal.
+
+ To use a pager other than the default more, set environment variable
+ PAGER to the name of the desired program. The name lzmore is provided
+ for backward compatibility with LZMA Utils.
+
+ e or q When the prompt --More--(Next file: file) is printed, this com-
+ mand causes xzmore to exit.
+
+ s When the prompt --More--(Next file: file) is printed, this com-
+ mand causes xzmore to skip the next file and continue.
+
+ For list of keyboard commands supported while actually viewing the con-
+ tent of a file, refer to manual of the pager you use, usually more(1).
+
+SEE ALSO
+ more(1), xz(1), xzless(1), zmore(1)
+
+
+
+Tukaani 2013-06-30 XZMORE(1)
diff --git a/doc/xz-file-format.txt b/doc/xz-file-format.txt
new file mode 100644
index 0000000..09c83e0
--- /dev/null
+++ b/doc/xz-file-format.txt
@@ -0,0 +1,1165 @@
+
+The .xz File Format
+===================
+
+Version 1.1.0 (2022-12-11)
+
+
+ 0. Preface
+ 0.1. Notices and Acknowledgements
+ 0.2. Getting the Latest Version
+ 0.3. Version History
+ 1. Conventions
+ 1.1. Byte and Its Representation
+ 1.2. Multibyte Integers
+ 2. Overall Structure of .xz File
+ 2.1. Stream
+ 2.1.1. Stream Header
+ 2.1.1.1. Header Magic Bytes
+ 2.1.1.2. Stream Flags
+ 2.1.1.3. CRC32
+ 2.1.2. Stream Footer
+ 2.1.2.1. CRC32
+ 2.1.2.2. Backward Size
+ 2.1.2.3. Stream Flags
+ 2.1.2.4. Footer Magic Bytes
+ 2.2. Stream Padding
+ 3. Block
+ 3.1. Block Header
+ 3.1.1. Block Header Size
+ 3.1.2. Block Flags
+ 3.1.3. Compressed Size
+ 3.1.4. Uncompressed Size
+ 3.1.5. List of Filter Flags
+ 3.1.6. Header Padding
+ 3.1.7. CRC32
+ 3.2. Compressed Data
+ 3.3. Block Padding
+ 3.4. Check
+ 4. Index
+ 4.1. Index Indicator
+ 4.2. Number of Records
+ 4.3. List of Records
+ 4.3.1. Unpadded Size
+ 4.3.2. Uncompressed Size
+ 4.4. Index Padding
+ 4.5. CRC32
+ 5. Filter Chains
+ 5.1. Alignment
+ 5.2. Security
+ 5.3. Filters
+ 5.3.1. LZMA2
+ 5.3.2. Branch/Call/Jump Filters for Executables
+ 5.3.3. Delta
+ 5.3.3.1. Format of the Encoded Output
+ 5.4. Custom Filter IDs
+ 5.4.1. Reserved Custom Filter ID Ranges
+ 6. Cyclic Redundancy Checks
+ 7. References
+
+
+0. Preface
+
+ This document describes the .xz file format (filename suffix
+ ".xz", MIME type "application/x-xz"). It is intended that this
+ this format replace the old .lzma format used by LZMA SDK and
+ LZMA Utils.
+
+
+0.1. Notices and Acknowledgements
+
+ This file format was designed by Lasse Collin
+ <lasse.collin@tukaani.org> and Igor Pavlov.
+
+ Special thanks for helping with this document goes to
+ Ville Koskinen. Thanks for helping with this document goes to
+ Mark Adler, H. Peter Anvin, Mikko Pouru, and Lars Wirzenius.
+
+ This document has been put into the public domain.
+
+
+0.2. Getting the Latest Version
+
+ The latest official version of this document can be downloaded
+ from <http://tukaani.org/xz/xz-file-format.txt>.
+
+ Specific versions of this document have a filename
+ xz-file-format-X.Y.Z.txt where X.Y.Z is the version number.
+ For example, the version 1.0.0 of this document is available
+ at <http://tukaani.org/xz/xz-file-format-1.0.0.txt>.
+
+
+0.3. Version History
+
+ Version Date Description
+
+ 1.1.0 2022-12-11 Added ARM64 filter and clarified 32-bit
+ ARM endianness in Section 5.3.2,
+ language improvements in Section 5.4
+
+ 1.0.4 2009-08-27 Language improvements in Sections 1.2,
+ 2.1.1.2, 3.1.1, 3.1.2, and 5.3.1
+
+ 1.0.3 2009-06-05 Spelling fixes in Sections 5.1 and 5.4
+
+ 1.0.2 2009-06-04 Typo fixes in Sections 4 and 5.3.1
+
+ 1.0.1 2009-06-01 Typo fix in Section 0.3 and minor
+ clarifications to Sections 2, 2.2,
+ 3.3, 4.4, and 5.3.2
+
+ 1.0.0 2009-01-14 The first official version
+
+
+1. Conventions
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD",
+ "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+ document are to be interpreted as described in [RFC-2119].
+
+ Indicating a warning means displaying a message, returning
+ appropriate exit status, or doing something else to let the
+ user know that something worth warning occurred. The operation
+ SHOULD still finish if a warning is indicated.
+
+ Indicating an error means displaying a message, returning
+ appropriate exit status, or doing something else to let the
+ user know that something prevented successfully finishing the
+ operation. The operation MUST be aborted once an error has
+ been indicated.
+
+
+1.1. Byte and Its Representation
+
+ In this document, byte is always 8 bits.
+
+ A "null byte" has all bits unset. That is, the value of a null
+ byte is 0x00.
+
+ To represent byte blocks, this document uses notation that
+ is similar to the notation used in [RFC-1952]:
+
+ +-------+
+ | Foo | One byte.
+ +-------+
+
+ +---+---+
+ | Foo | Two bytes; that is, some of the vertical bars
+ +---+---+ can be missing.
+
+ +=======+
+ | Foo | Zero or more bytes.
+ +=======+
+
+ In this document, a boxed byte or a byte sequence declared
+ using this notation is called "a field". The example field
+ above would be called "the Foo field" or plain "Foo".
+
+ If there are many fields, they may be split to multiple lines.
+ This is indicated with an arrow ("--->"):
+
+ +=====+
+ | 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 <stddef.h>
+ #include <inttypes.h>
+
+ 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]
+
+ [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 <stddef.h>
+ #include <inttypes.h>
+ #include <stdio.h>
+
+ 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
+ http://7-zip.org/sdk.html
+
+ LZMA Utils - LZMA adapted to POSIX-like systems
+ http://tukaani.org/lzma/
+
+ XZ Utils - The next generation of LZMA Utils
+ http://tukaani.org/xz/
+
+ [RFC-1952]
+ GZIP file format specification version 4.3
+ http://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
+ http://www.ietf.org/rfc/rfc2119.txt
+
+ [GNU-tar]
+ GNU tar 1.21 manual
+ http://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.21. For the exact version of the manual, download GNU
+ tar 1.21: ftp://ftp.gnu.org/pub/gnu/tar/tar-1.21.tar.gz
+
diff --git a/dos/INSTALL.txt b/dos/INSTALL.txt
new file mode 100644
index 0000000..e5ba85b
--- /dev/null
+++ b/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 <https://www.delorie.com/djgpp/zip-picker.html> 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
+ <https://www.delorie.com/djgpp/getting.html> 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/dos/Makefile b/dos/Makefile
new file mode 100644
index 0000000..793adc1
--- /dev/null
+++ b/dos/Makefile
@@ -0,0 +1,149 @@
+###############################################################################
+#
+# Makefile to build XZ Utils using DJGPP
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+# 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_width.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_table.c \
+ ../src/liblzma/check/crc64_table.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/dos/README.txt b/dos/README.txt
new file mode 100644
index 0000000..0e8f6c0
--- /dev/null
+++ b/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/dos/config.h b/dos/config.h
new file mode 100644
index 0000000..67b72f8
--- /dev/null
+++ b/dos/config.h
@@ -0,0 +1,153 @@
+/* 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 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 <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_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 <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_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/doxygen/Doxyfile b/doxygen/Doxyfile
new file mode 100644
index 0000000..14350cf
--- /dev/null
+++ b/doxygen/Doxyfile
@@ -0,0 +1,2687 @@
+# Doxyfile 1.9.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+#
+# Note:
+#
+# Use doxygen to compare the used configuration file with the template
+# configuration file:
+# doxygen -x [configFile]
+# Use doxygen to compare the used configuration file with the template
+# configuration file without replacing the environment variables or CMake type
+# replacement variables:
+# doxygen -x_noenv [configFile]
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "liblzma (XZ Utils)"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = ../doc
+
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
+# sub-directories (in 2 levels) under the output directory of each output format
+# and will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system. Adapt CREATE_SUBDIRS_LEVEL to
+# control the number of sub-directories.
+# The default value is: NO.
+
+CREATE_SUBDIRS = NO
+
+# Controls the number of sub-directories that will be created when
+# CREATE_SUBDIRS tag is set to YES. Level 0 represents 16 directories, and every
+# level increment doubles the number of directories, resulting in 4096
+# directories at level 8 which is the default and also the maximum value. The
+# sub-directories are organized in 2 levels, the first level always has a fixed
+# number of 16 directories.
+# Minimum value: 0, maximum value: 8, default value: 8.
+# This tag requires that the tag CREATE_SUBDIRS is set to YES.
+
+CREATE_SUBDIRS_LEVEL = 8
+
+# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
+# characters to appear in the names of generated files. If set to NO, non-ASCII
+# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode
+# U+3044.
+# The default value is: NO.
+
+ALLOW_UNICODE_NAMES = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Bulgarian,
+# Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, English
+# (United States), Esperanto, Farsi (Persian), Finnish, French, German, Greek,
+# Hindi, Hungarian, Indonesian, Italian, Japanese, Japanese-en (Japanese with
+# English messages), Korean, Korean-en (Korean with English messages), Latvian,
+# Lithuanian, Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese,
+# Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish,
+# Swedish, Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH = ../src/liblzma/api
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# By default Python docstrings are displayed as preformatted text and doxygen's
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
+# doxygen's special commands can be used and the contents of the docstring
+# documentation blocks is shown as doxygen documentation.
+# The default value is: YES.
+
+PYTHON_DOCSTRING = YES
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:^^"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". Note that you cannot put \n's in the value part of an alias
+# to insert newlines (in the resulting output). You can put ^^ in the value part
+# of an alias to insert a newline as if a physical newline was in the original
+# file. When you need a literal { or } or , in the value part of an alias you
+# have to escape them by means of a backslash (\), this can lead to conflicts
+# with the commands \{ and \} for these it is advised to use the version @{ and
+# @} or use a double escape (\\{ and \\})
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, Lex, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files). For instance to make doxygen treat .inc files
+# as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C.
+#
+# Note: For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen. When specifying no_extension you should add
+# * to the FILE_PATTERNS.
+#
+# Note see also the list of default file extension mappings.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = NO
+
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 5
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+# The NUM_PROC_THREADS specifies the number of threads doxygen is allowed to use
+# during processing. When set to 0 doxygen will based this on the number of
+# cores available in the system. You can set it explicitly to a value larger
+# than 0 to get more control over the balance between CPU load and processing
+# speed. At this moment only the input processing can be done using multiple
+# threads. Since this is still an experimental feature the default is set to 1,
+# which effectively disables parallel processing. Please report any issues you
+# encounter. Generating dot graphs in parallel is controlled by the
+# DOT_NUM_THREADS setting.
+# Minimum value: 0, maximum value: 32, default value: 1.
+
+NUM_PROC_THREADS = 1
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = NO
+
+# This flag is only useful for Objective-C code. If set to YES, local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If this flag is set to YES, the name of an unnamed parameter in a declaration
+# will be determined by the corresponding definition. By default unnamed
+# parameters remain unnamed in the output.
+# The default value is: YES.
+
+RESOLVE_UNNAMED_PARAMS = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO, these classes will be included in the various overviews. This option
+# will also hide undocumented C++ concepts if enabled. This option has no effect
+# if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO, these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
+# able to match the capabilities of the underlying filesystem. In case the
+# filesystem is case sensitive (i.e. it supports files in the same directory
+# whose names only differ in casing), the option must be set to YES to properly
+# deal with such files in case they appear in the input. For filesystems that
+# are not case sensitive the option should be set to NO to properly deal with
+# output files written for symbols that only differ in casing, such as for two
+# classes, one named CLASS and the other named Class, and to also support
+# references to files without having to specify the exact matching casing. On
+# Windows (including Cygwin) and MacOS, users should typically set this option
+# to NO, whereas on Linux or other Unix flavors it should typically be set to
+# YES.
+# Possible values are: SYSTEM, NO and YES.
+# The default value is: SYSTEM.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES, the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
+# If the SHOW_HEADERFILE tag is set to YES then the documentation for a class
+# will show which file needs to be included to use the class.
+# The default value is: YES.
+
+SHOW_HEADERFILE = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = NO
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO, the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file. See also section "Changing the
+# layout of pages" for information.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. See also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as documenting some parameters in
+# a documented function twice, or documenting parameters that don't exist or
+# using markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# If WARN_IF_INCOMPLETE_DOC is set to YES, doxygen will warn about incomplete
+# function parameter documentation. If set to NO, doxygen will accept that some
+# parameters have no documentation without warning.
+# The default value is: YES.
+
+WARN_IF_INCOMPLETE_DOC = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO, doxygen will only warn about wrong parameter
+# documentation, but not about the absence of documentation. If EXTRACT_ALL is
+# set to YES then this flag will automatically be disabled. See also
+# WARN_IF_INCOMPLETE_DOC
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
+# undocumented enumeration values. If set to NO, doxygen will accept
+# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: NO.
+
+WARN_IF_UNDOC_ENUM_VAL = NO
+
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
+# at the end of the doxygen process doxygen will return with a non-zero status.
+# Possible values are: NO, YES and FAIL_ON_WARNINGS.
+# The default value is: NO.
+
+WARN_AS_ERROR = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# See also: WARN_LINE_FORMAT
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# In the $text part of the WARN_FORMAT command it is possible that a reference
+# to a more specific place is given. To make it easier to jump to this place
+# (outside of doxygen) the user can define a custom "cut" / "paste" string.
+# Example:
+# WARN_LINE_FORMAT = "'vi $file +$line'"
+# See also: WARN_FORMAT
+# The default value is: at line $line of file $file.
+
+WARN_LINE_FORMAT = "at line $line of file $file"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr). In case the file specified cannot be opened for writing the
+# warning and error messages are written to standard error. When as file - is
+# specified the warning and error messages are written to standard output
+# (stdout).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = ../src/liblzma/api
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see:
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
+# See also: INPUT_FILE_ENCODING
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
+# character encoding on a per file pattern basis. Doxygen will compare the file
+# name with each pattern and apply the encoding instead of the default
+# INPUT_ENCODING) if there is a match. The character encodings are a list of the
+# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
+# "INPUT_ENCODING" for further information on supported encodings.
+
+INPUT_FILE_ENCODING =
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# Note the list of default checked file patterns might differ from the list of
+# default file extension mappings.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml,
+# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C
+# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
+# *.vhdl, *.ucf, *.qsf and *.ice.
+
+FILE_PATTERNS = *.c \
+ *.h
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = YES
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# ANamespace::AClass, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+#
+# Note that doxygen will use the data processed and written to standard output
+# for further processing, therefore nothing else, like debug statements or used
+# commands (so in case of a Windows batch file always use @echo OFF), should be
+# written to standard output.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+# The Fortran standard specifies that for fixed formatted Fortran code all
+# characters from position 72 are to be considered as comment. A common
+# extension is to allow longer lines before the automatic comment starts. The
+# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
+# be processed before the automatic comment starts.
+# Minimum value: 7, maximum value: 10000, default value: 72.
+
+FORTRAN_COMMENT_AFTER = 72
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# entity all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = NO
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see https://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = NO
+
+# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes)
+# that should be ignored while generating the index headers. The IGNORE_PREFIX
+# tag works for classes, function and member names. The entity will be placed in
+# the alphabetical list under the first letter of the entity name that remains
+# after removing the prefix.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT = api
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# cascading style sheets that are included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefore more robust against future updates.
+# Doxygen will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# Note: Since the styling of scrollbars can currently not be overruled in
+# Webkit/Chromium, the styling will be left out of the default doxygen.css if
+# one or more extra stylesheets have been specified. So if scrollbar
+# customization is desired it has to be added explicitly. For an example see the
+# documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
+# should be rendered with a dark or light theme.
+# Possible values are: LIGHT always generate light mode output, DARK always
+# generate dark mode output, AUTO_LIGHT automatically set the mode according to
+# the user preference, use light mode if no preference is set (the default),
+# AUTO_DARK automatically set the mode according to the user preference, use
+# dark mode if no preference is set and TOGGLE allow to user to switch between
+# light and dark mode via a button.
+# The default value is: AUTO_LIGHT.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE = AUTO_LIGHT
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the style sheet and background images according to
+# this color. Hue is specified as an angle on a color-wheel, see
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 210
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use gray-scales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 180
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 110
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = NO
+
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see:
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
+# create a documentation set, doxygen will generate a Makefile in the HTML
+# output directory. Running make will produce the docset in that directory and
+# running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag determines the URL of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDURL =
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# on Windows. In the beginning of 2021 Microsoft took the original page, with
+# a.o. the download links, offline the HTML help workshop was already many years
+# in maintenance mode). You can download the HTML help workshop from the web
+# archives at Installation executable (see:
+# http://web.archive.org/web/20160201063255/http://download.microsoft.com/downlo
+# ad/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe).
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the main .chm file (NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
+# enables the Previous and Next buttons.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location (absolute path
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
+# run qhelpgenerator on the generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine tune the look of the index (see "Fine-tuning the output"). As an
+# example, the default style sheet generated by doxygen has an example that
+# shows how to put an image at the root of the tree instead of the PROJECT_NAME.
+# Since the tree basically has the same information as the tab index, you could
+# consider setting DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW = NO
+
+# When both GENERATE_TREEVIEW and DISABLE_INDEX are set to YES, then the
+# FULL_SIDEBAR option determines if the side bar is limited to only the treeview
+# area (value NO) or if it should extend to the full height of the window (value
+# YES). Setting this to YES gives a layout similar to
+# https://docs.readthedocs.io with more room for contents, but less room for the
+# project logo, title, and description. If either GENERATE_TREEVIEW or
+# DISABLE_INDEX is set to NO, this option has no effect.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FULL_SIDEBAR = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH = 250
+
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW = NO
+
+# If the OBFUSCATE_EMAILS tag is set to YES, doxygen will obfuscate email
+# addresses.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+OBFUSCATE_EMAILS = YES
+
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
+# the HTML output. These images will generally look nicer at scaled resolutions.
+# Possible values are: png (the default) and svg (looks nicer but requires the
+# pdf2svg or inkscape tool).
+# The default value is: png.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FORMULA_FORMAT = png
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE = 10
+
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE =
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX = NO
+
+# With MATHJAX_VERSION it is possible to specify the MathJax version to be used.
+# Note that the different versions of MathJax have different requirements with
+# regards to the different settings, so it is possible that also other MathJax
+# settings have to be changed when switching between the different MathJax
+# versions.
+# Possible values are: MathJax_2 and MathJax_3.
+# The default value is: MathJax_2.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_VERSION = MathJax_2
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. For more details about the output format see MathJax
+# version 2 (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) and MathJax version 3
+# (see:
+# http://docs.mathjax.org/en/latest/web/components/output.html).
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility. This is the name for Mathjax version 2, for MathJax version 3
+# this will be translated into chtml), NativeMML (i.e. MathML. Only supported
+# for NathJax 2. For MathJax version 3 chtml will be used instead.), chtml (This
+# is the name for Mathjax version 3, for MathJax version 2 this will be
+# translated into HTML-CSS) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from https://www.mathjax.org before deployment. The default value is:
+# - in case of MathJax version 2: https://cdn.jsdelivr.net/npm/mathjax@2
+# - in case of MathJax version 3: https://cdn.jsdelivr.net/npm/mathjax@3
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# for MathJax version 2 (see
+# https://docs.mathjax.org/en/v2.7-latest/tex.html#tex-and-latex-extensions):
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# For example for MathJax version 3 (see
+# http://docs.mathjax.org/en/latest/input/tex/extensions/index.html):
+# MATHJAX_EXTENSIONS = ams
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using JavaScript. There
+# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
+# setting. When disabled, doxygen will generate a PHP script for searching and
+# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
+# and searching needs to be provided by external tools. See the section
+# "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer (doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see:
+# https://xapian.org/). See the section "External Indexing and Searching" for
+# details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a user-defined LaTeX header for
+# the generated LaTeX document. The header should contain everything until the
+# first chapter. If it is left blank doxygen will generate a standard header. It
+# is highly recommended to start with a default header using
+# doxygen -w latex new_header.tex new_footer.tex new_stylesheet.sty
+# and then modify the file new_header.tex. See also section "Doxygen usage" for
+# information on how to generate the default header that doxygen normally uses.
+#
+# Note: Only use a user-defined header if you know what you are doing!
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. The following
+# commands have a special meaning inside the header (and footer): For a
+# description of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER =
+
+# The LATEX_FOOTER tag can be used to specify a user-defined LaTeX footer for
+# the generated LaTeX document. The footer should contain everything after the
+# last chapter. If it is left blank doxygen will generate a standard footer. See
+# LATEX_HEADER for more information on how to generate a default footer and what
+# special commands can be used inside the footer. See also section "Doxygen
+# usage" for information on how to generate the default footer that doxygen
+# normally uses. Note: Only use a user-defined footer if you know what you are
+# doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER =
+
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
+# files. Set this option to YES, to get a higher quality PDF documentation.
+#
+# See also section LATEX_CMD_NAME for selecting the engine.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE = plain
+
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP = NO
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION = .3
+
+# The MAN_SUBDIR tag determines the name of the directory created within
+# MAN_OUTPUT in which the man pages are placed. If defaults to man followed by
+# MAN_EXTENSION with the initial . removed.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_SUBDIR =
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT = xml
+
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING = NO
+
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO, the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF = YES
+
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor. Note that the INCLUDE_PATH is not recursive, so the setting of
+# RECURSIVE has no effect here.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED = LZMA_API(type)=type \
+ LZMA_API_IMPORT= \
+ LZMA_API_CALL= \
+ tuklib_attr_noreturn= \
+ lzma_attribute(attr)= \
+ lzma_attr_alloc_size(size)=
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all references to function-like macros that are alone on a line, have
+# an all uppercase name, and do not end with a semicolon. Such function macros
+# are typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have a unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
+# The default value is: NO.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS = YES
+
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH =
+
+# If set to YES the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS = 0
+
+# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
+# subgraphs. When you want a differently looking font in the dot files that
+# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
+# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,
+# Edge and Graph Attributes specification</a> You need to make sure dot is able
+# to find the font, which can be done by putting it in a standard location or by
+# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font. Default graphviz fontsize is 14.
+# The default value is: fontname=Helvetica,fontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
+
+# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
+# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a
+# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about
+# arrows shapes.</a>
+# The default value is: labelfontname=Helvetica,labelfontsize=10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
+
+# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
+# around nodes set 'shape=plain' or 'shape=plaintext' <a
+# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>
+# The default value is: shape=box,height=0.2,width=0.4.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
+
+# You can set the path where dot can find font specified with fontname in
+# DOT_COMMON_ATTR and others dot attributes.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a
+# graph for each documented class showing the direct and indirect inheritance
+# relations. In case HAVE_DOT is set as well dot will be used to draw the graph,
+# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set
+# to TEXT the direct and indirect inheritance relations will be shown as texts /
+# links.
+# Possible values are: NO, YES, TEXT and GRAPH.
+# The default value is: YES.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies. See also the chapter Grouping
+# in the manual.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
+# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
+# tag is set to YES, doxygen will add type and arguments for attributes and
+# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
+# will not generate fields with class member information in the UML graphs. The
+# class diagrams will look similar to the default class diagrams but using UML
+# notation for the relationships.
+# Possible values are: NO, YES and NONE.
+# The default value is: NO.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+DOT_UML_DETAILS = NO
+
+# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
+# to display on a single line. If the actual line length exceeds this threshold
+# significantly it will wrapped across multiple lines. Some heuristics are apply
+# to avoid ugly line breaks.
+# Minimum value: 0, maximum value: 1000, default value: 17.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_WRAP_THRESHOLD = 17
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH = YES
+
+# The DIR_GRAPH_MAX_DEPTH tag can be used to limit the maximum number of levels
+# of child directories generated in directory dependency graphs by dot.
+# Minimum value: 1, maximum value: 25, default value: 1.
+# This tag requires that the tag DIRECTORY_GRAPH is set to YES.
+
+DIR_GRAPH_MAX_DEPTH = 1
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS =
+
+# When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the
+# path where java can find the plantuml.jar file or to the filename of jar file
+# to be used. If left blank, it is assumed PlantUML is not used or called during
+# a preprocessing step. Doxygen will generate a warning when it encounters a
+# \startuml command in this case and will not generate output for the diagram.
+
+PLANTUML_JAR_PATH =
+
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# Note: This tag requires that UML_LOOK isn't set, i.e. the doxygen internal
+# graphical representation for inheritance and collaboration diagrams is used.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
+# files that are used to generate the various graphs.
+#
+# Note: This setting is not only used for dot files but also for msc temporary
+# files.
+# The default value is: YES.
+
+DOT_CLEANUP = YES
diff --git a/doxygen/update-doxygen b/doxygen/update-doxygen
new file mode 100755
index 0000000..a510319
--- /dev/null
+++ b/doxygen/update-doxygen
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+#############################################################################
+#
+# Updates the Doxygen generated documentation files in the source tree.
+# If the doxygen command is not installed, it will exit with an error.
+# This script can generate Doxygen documentation for all source files or for
+# just liblzma API header files.
+#
+# It is recommended to use this script to update the Doxygen-generated HTML
+# files since this will include the package version in the output and,
+# in case of liblzma API docs, strip JavaScript files from the output.
+#
+#############################################################################
+#
+# Authors: Jia Tan
+# Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+#############################################################################
+
+set -e
+
+if type doxygen > /dev/null 2>&1; then
+ :
+else
+ echo "doxygen/update-doxygen: 'doxygen' command not found." >&2
+ echo "doxygen/update-doxygen: Skipping Doxygen docs generation." >&2
+ exit 1
+fi
+
+if test ! -f Doxyfile; then
+ cd `dirname "$0"` || exit 1
+ if test ! -f Doxyfile; then
+ echo "doxygen/update-doxygen: Cannot find Doxyfile" >&2
+ exit 1
+ fi
+fi
+
+# Get the package version so that it can be included in the generated docs.
+PACKAGE_VERSION=`cd .. && sh build-aux/version.sh` || exit 1
+
+# If no arguments are specified, default to generating liblzma API header
+# documentation only.
+case $1 in
+ '' | api)
+ # Remove old documentation before re-generating the new.
+ rm -rf ../doc/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.
+ (
+ cat Doxyfile
+ echo "PROJECT_NUMBER = $PACKAGE_VERSION"
+ ) | doxygen -
+
+ # As of Doxygen 1.8.0 - 1.9.6 and the Doxyfile options we use,
+ # the output is good without any JavaScript. Unfortunately
+ # Doxygen doesn't have an option to disable JavaScript usage
+ # completely so we strip it away with the hack below.
+ #
+ # Omitting the JavaScript code avoids some license hassle
+ # as jquery.js is fairly big, it contains more than jQuery
+ # itself, and doesn't include the actual license text (it
+ # only refers to the MIT license by name).
+ echo "Stripping JavaScript from Doxygen output..."
+ for F in ../doc/api/*.html
+ do
+ sed 's/<script [^>]*><\/script>//g
+ s/onclick="[^"]*"//g' \
+ "$F" > ../doc/api/tmp
+ mv -f ../doc/api/tmp "$F"
+ done
+ rm -f ../doc/api/*.js
+ ;;
+
+ internal)
+ # The docs from internal aren't for distribution so
+ # the JavaScript files aren't an issue here.
+ rm -rf ../doc/internal
+ (
+ cat Doxyfile
+ echo "PROJECT_NUMBER = $PACKAGE_VERSION"
+ echo 'PROJECT_NAME = "XZ Utils"'
+ echo 'STRIP_FROM_PATH = ../src'
+ echo 'INPUT = ../src'
+ echo 'HTML_OUTPUT = internal'
+ echo 'EXTRACT_PRIVATE = YES'
+ echo 'EXTRACT_STATIC = YES'
+ echo 'EXTRACT_LOCAL_CLASSES = YES'
+ echo 'SEARCHENGINE = YES'
+ ) | doxygen -
+ ;;
+
+ *)
+ echo "doxygen/update-doxygen: Error: mode argument '$1'" \
+ "is not supported." >&2
+ echo "doxygen/update-doxygen: Supported modes:" >&2
+ echo "doxygen/update-doxygen: - 'api' (default):" \
+ "liblzma API docs into doc/api" >&2
+ echo "doxygen/update-doxygen: - 'internal':"\
+ "internal docs into doc/internal" >&2
+ exit 1
+ ;;
+esac
diff --git a/extra/7z2lzma/7z2lzma.bash b/extra/7z2lzma/7z2lzma.bash
new file mode 100755
index 0000000..1777c78
--- /dev/null
+++ b/extra/7z2lzma/7z2lzma.bash
@@ -0,0 +1,115 @@
+#!/bin/bash
+#
+#############################################################################
+#
+# 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 <lasse.collin@tukaani.org>
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+#############################################################################
+
+# You can use 7z or 7za, both will work.
+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/extra/scanlzma/scanlzma.c b/extra/scanlzma/scanlzma.c
new file mode 100644
index 0000000..110f822
--- /dev/null
+++ b/extra/scanlzma/scanlzma.c
@@ -0,0 +1,88 @@
+/*
+ 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#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<BUFSIZE-23; i++) {
+ if (find_lzma_header(buf+i) && numlzma-- <= 0) {
+ fwrite(buf+i, (BUFSIZE-i), 1, stdout);
+ for (;;) {
+ int ch;
+ ch = getchar();
+ if (ch == EOF)
+ exit(0);
+ putchar(ch);
+ }
+ }
+ }
+ blocks++;
+ }
+ return 1;
+}
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 0000000..0dbd9c4
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,32 @@
+##
+## Copyright (C) 2004-2007 Free Software Foundation, Inc.
+##
+## 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.
+##
+
+## Not using gnulib-tool, at least for now. It is likely that we won't
+## need anything else from Gnulib than getopt_long().
+
+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
+BUILT_SOURCES = $(GETOPT_H)
+MOSTLYCLEANFILES = getopt.h getopt.h-t
+
+getopt.h: getopt.in.h
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/getopt.in.h; \
+ } > $@-t
+ mv -f $@-t $@
diff --git a/lib/Makefile.in b/lib/Makefile.in
new file mode 100644
index 0000000..3ad8d14
--- /dev/null
+++ b/lib/Makefile.in
@@ -0,0 +1,600 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 = cru
+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)
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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
+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:
+ -test -z "$(noinst_LIBRARIES)" || 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)$(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)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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."
+ -test -z "$(BUILT_SOURCES)" || 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:
diff --git a/lib/getopt.c b/lib/getopt.c
new file mode 100644
index 0000000..1d14b24
--- /dev/null
+++ b/lib/getopt.c
@@ -0,0 +1,1197 @@
+/* Getopt for GNU.
+ NOTE: getopt is now part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to drepper@gnu.org
+ before changing it!
+ Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program 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, 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 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, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include "getopt.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef __VMS
+# include <unixlib.h>
+#endif
+
+/* 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. */
+/*
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+*/
+#define _(msgid) (msgid)
+
+#if defined _LIBC && defined USE_IN_LIBIO
+# include <wchar.h>
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+/* Unlike standard Unix `getopt', functions like `getopt_long'
+ let the user intersperse the options with the other arguments.
+
+ As `getopt_long' works, it permutes the elements of ARGV so that,
+ when it is done, all the options precede everything else. Thus
+ all application programs are extended to handle flexible argument order.
+
+ Using `getopt' or setting the environment variable POSIXLY_CORRECT
+ disables permutation.
+ Then the application's behavior is completely standard.
+
+ GNU application programs can use a third alternative mode in which
+ they can distinguish the relative order of options and other arguments. */
+
+#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;
+
+
+#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
+extern char *getenv ();
+#endif
+
+#ifdef _LIBC
+/* Stored original parameters.
+ XXX This is no good solution. We should rather copy the args so
+ that we can compare them later. But we must not use malloc(3). */
+extern int __libc_argc;
+extern char **__libc_argv;
+
+/* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
+# ifdef USE_NONOPTION_FLAGS
+/* Defined in getopt_init.c */
+extern char *__getopt_nonoption_flags;
+# endif
+
+# ifdef USE_NONOPTION_FLAGS
+# define SWAP_FLAGS(ch1, ch2) \
+ if (d->__nonoption_flags_len > 0) \
+ { \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
+ }
+# else
+# define SWAP_FLAGS(ch1, ch2)
+# endif
+#else /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif /* _LIBC */
+
+/* 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. */
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
+ {
+ /* We must extend the array. The user plays games with us and
+ presents new arguments. */
+ char *new_str = malloc (top + 1);
+ if (new_str == NULL)
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
+ else
+ {
+ memset (__mempcpy (new_str, __getopt_nonoption_flags,
+ d->__nonoption_flags_max_len),
+ '\0', top + 1 - d->__nonoption_flags_max_len);
+ d->__nonoption_flags_max_len = top + 1;
+ __getopt_nonoption_flags = new_str;
+ }
+ }
+#endif
+
+ while (top > middle && middle > bottom)
+ {
+ if (top - middle > middle - bottom)
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ register 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;
+ SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
+ else
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ register 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;
+ SWAP_FLAGS (bottom + i, middle + i);
+ }
+ /* 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;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+static const char *
+_getopt_initialize (int argc, char **argv, const char *optstring,
+ int posixly_correct, struct _getopt_data *d)
+{
+ /* 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. */
+
+ d->__first_nonopt = d->__last_nonopt = d->optind;
+
+ d->__nextchar = NULL;
+
+ d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
+
+ /* 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 (d->__posixly_correct)
+ d->__ordering = REQUIRE_ORDER;
+ else
+ d->__ordering = PERMUTE;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ if (!d->__posixly_correct
+ && argc == __libc_argc && argv == __libc_argv)
+ {
+ if (d->__nonoption_flags_max_len == 0)
+ {
+ if (__getopt_nonoption_flags == NULL
+ || __getopt_nonoption_flags[0] == '\0')
+ d->__nonoption_flags_max_len = -1;
+ else
+ {
+ const char *orig_str = __getopt_nonoption_flags;
+ int len = d->__nonoption_flags_max_len = strlen (orig_str);
+ if (d->__nonoption_flags_max_len < argc)
+ d->__nonoption_flags_max_len = argc;
+ __getopt_nonoption_flags =
+ (char *) malloc (d->__nonoption_flags_max_len);
+ if (__getopt_nonoption_flags == NULL)
+ d->__nonoption_flags_max_len = -1;
+ else
+ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ '\0', d->__nonoption_flags_max_len - len);
+ }
+ }
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len;
+ }
+ else
+ d->__nonoption_flags_len = 0;
+#endif
+
+ 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.
+
+ 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.
+
+ If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT
+ environment variable were set. */
+
+int
+_getopt_internal_r (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind,
+ int long_only, int posixly_correct, struct _getopt_data *d)
+{
+ int print_errors = d->opterr;
+ if (optstring[0] == ':')
+ print_errors = 0;
+
+ if (argc < 1)
+ return -1;
+
+ d->optarg = NULL;
+
+ if (d->optind == 0 || !d->__initialized)
+ {
+ if (d->optind == 0)
+ d->optind = 1; /* Don't scan ARGV[0], the program name. */
+ optstring = _getopt_initialize (argc, argv, optstring,
+ posixly_correct, d);
+ d->__initialized = 1;
+ }
+
+ /* Test whether ARGV[optind] points to a non-option argument.
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
+ || (d->optind < d->__nonoption_flags_len \
+ && __getopt_nonoption_flags[d->optind] == '1'))
+#else
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
+#endif
+
+ 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 ((char **) 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 ((char **) 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.
+ Skip the initial punctuation. */
+
+ d->__nextchar = (argv[d->optind] + 1
+ + (longopts != NULL && argv[d->optind][1] == '-'));
+ }
+
+ /* Decode the current option-ARGV-element. */
+
+ /* Check whether the ARGV-element is a long option.
+
+ 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 (longopts != NULL
+ && (argv[d->optind][1] == '-'
+ || (long_only && (argv[d->optind][2]
+ || !strchr (optstring, argv[d->optind][1])))))
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = -1;
+ int option_index;
+
+ for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+ {
+ if ((unsigned int) (nameend - d->__nextchar)
+ == (unsigned int) strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else 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. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[d->optind]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ d->optind++;
+ 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)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind - 1][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+
+ d->__nextchar += strlen (d->__nextchar);
+
+ d->optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+
+ /* 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.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[d->optind][1] == '-'
+ || strchr (optstring, *d->__nextchar) == NULL)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
+ argv[0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+ argv[0], d->__nextchar);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+ d->__nextchar = (char *) "";
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *d->__nextchar++;
+ 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 == ':')
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (d->__posixly_correct)
+ {
+ /* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
+ argv[0], c);
+#else
+ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
+#endif
+ }
+ else
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
+ argv[0], c);
+#else
+ fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+ d->optopt = c;
+ return '?';
+ }
+ /* Convenience. Treat POSIX -W foo same as long option --foo */
+ if (temp[0] == 'W' && temp[1] == ';')
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = 0;
+ int option_index;
+
+ /* 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)
+ {
+ /* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+#endif
+ }
+ d->optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `d->optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ d->optarg = argv[d->optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
+ nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+ {
+ if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[d->optind]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ return '?';
+ }
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ 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)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+
+ d->__nextchar += strlen (d->__nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ d->__nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
+ }
+ 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)
+ {
+ /* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option requires an argument -- %c\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+#endif
+ }
+ 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, posixly_correct, &getopt_data);
+
+ optind = getopt_data.optind;
+ optarg = getopt_data.optarg;
+ optopt = getopt_data.optopt;
+
+ return result;
+}
+
+/* glibc gets a LSB-compliant getopt.
+ Standalone applications get a POSIX-compliant getopt. */
+#if _LIBC
+enum { POSIXLY_CORRECT = 0 };
+#else
+enum { POSIXLY_CORRECT = 1 };
+#endif
+
+int
+getopt (int argc, char *const *argv, const char *optstring)
+{
+ return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0,
+ POSIXLY_CORRECT);
+}
+
+
+#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/lib/getopt.in.h b/lib/getopt.in.h
new file mode 100644
index 0000000..ea77e3d
--- /dev/null
+++ b/lib/getopt.in.h
@@ -0,0 +1,226 @@
+/* Declarations for getopt.
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program 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, 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 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, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GETOPT_H
+
+#ifndef __need_getopt
+# define _GETOPT_H 1
+#endif
+
+/* 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 && !defined __need_getopt
+# include <stdlib.h>
+# include <stdio.h>
+# include <unistd.h>
+# undef __need_getopt
+# undef getopt
+# undef getopt_long
+# undef getopt_long_only
+# undef optarg
+# undef opterr
+# undef optind
+# undef optopt
+# 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)
+# define getopt __GETOPT_ID (getopt)
+# define getopt_long __GETOPT_ID (getopt_long)
+# define getopt_long_only __GETOPT_ID (getopt_long_only)
+# define optarg __GETOPT_ID (optarg)
+# define opterr __GETOPT_ID (opterr)
+# define optind __GETOPT_ID (optind)
+# define optopt __GETOPT_ID (optopt)
+#endif
+
+/* Standalone applications get correct prototypes for getopt_long and
+ getopt_long_only; they declare "char **argv". libc uses prototypes
+ with "char *const *argv" that are incorrect because getopt_long and
+ getopt_long_only can permute argv; this is required for backward
+ compatibility (e.g., for LSB 2.0.1).
+
+ This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+ but it caused redefinition warnings if both unistd.h and getopt.h were
+ included, since unistd.h includes getopt.h having previously defined
+ __need_getopt.
+
+ The only place where __getopt_argv_const is used is in definitions
+ of getopt_long and getopt_long_only below, but these are visible
+ only if __need_getopt is not defined, so it is quite safe to rewrite
+ the conditional as follows:
+*/
+#if !defined __need_getopt
+# if defined __GETOPT_PREFIX
+# define __getopt_argv_const /* empty */
+# else
+# define __getopt_argv_const const
+# endif
+#endif
+
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+ standalone, or this is the first header included in the source file.
+ If we are being used with glibc, we need to include <features.h>, but
+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+ not defined, include <ctype.h>, which will pull in <features.h> for us
+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+ doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
+
+#ifndef __THROW
+# ifndef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) (0)
+# endif
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# else
+# define __THROW
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* 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;
+
+#ifndef __need_getopt
+/* 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
+#endif /* need getopt */
+
+
+/* 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. */
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __THROW;
+
+#ifndef __need_getopt
+extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW;
+extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW;
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* getopt.h */
diff --git a/lib/getopt1.c b/lib/getopt1.c
new file mode 100644
index 0000000..da5d533
--- /dev/null
+++ b/lib/getopt1.c
@@ -0,0 +1,171 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program 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, 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 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, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifdef _LIBC
+# include <getopt.h>
+#else
+# include <config.h>
+# include "getopt.h"
+#endif
+#include "getopt_int.h"
+
+#include <stdio.h>
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+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, 0, d);
+}
+
+/* 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, 0, d);
+}
+
+
+#ifdef TEST
+
+#include <stdio.h>
+
+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 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/lib/getopt_int.h b/lib/getopt_int.h
new file mode 100644
index 0000000..401579f
--- /dev/null
+++ b/lib/getopt_int.h
@@ -0,0 +1,131 @@
+/* Internal declarations for getopt.
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ 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, 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. */
+
+#ifndef _GETOPT_INT_H
+#define _GETOPT_INT_H 1
+
+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. */
+
+/* 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;
+
+ /* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters, or by calling getopt.
+
+ PERMUTE is the default. We 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. Using `-' as the first character of the
+ list of option characters selects this mode of operation.
+
+ 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
+ {
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+ } __ordering;
+
+ /* If the POSIXLY_CORRECT environment variable is set
+ or getopt was called. */
+ int __posixly_correct;
+
+
+ /* 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;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ int __nonoption_flags_max_len;
+ int __nonoption_flags_len;
+# endif
+};
+
+/* 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, int __posixly_correct,
+ struct _getopt_data *__data);
+
+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/m4/ax_check_capsicum.m4 b/m4/ax_check_capsicum.m4
new file mode 100644
index 0000000..f79dc5c
--- /dev/null
+++ b/m4/ax_check_capsicum.m4
@@ -0,0 +1,85 @@
+# -*- Autoconf -*-
+
+# SYNOPSIS
+#
+# AX_CHECK_CAPSICUM([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro searches for an installed Capsicum header and library,
+# and if found:
+# - AC_DEFINE([HAVE_CAPSICUM]) is called.
+# - AC_DEFINE([HAVE_SYS_CAPSICUM_H]) is called if <sys/capsicum.h>
+# is present (otherwise <sys/capability.h> must be used).
+# - CAPSICUM_LIB is set to the -l option needed to link Capsicum support,
+# and AC_SUBST([CAPSICUM_LIB]) is called.
+# - The shell commands in ACTION-IF-FOUND are run. The default
+# ACTION-IF-FOUND prepends ${CAPSICUM_LIB} into LIBS. If you don't
+# want to modify LIBS and don't need to run any other commands either,
+# use a colon as ACTION-IF-FOUND.
+#
+# If Capsicum support isn't found:
+# - The shell commands in ACTION-IF-NOT-FOUND are run. The default
+# ACTION-IF-NOT-FOUND calls AC_MSG_WARN to print a warning that
+# Capsicum support wasn't found.
+#
+# You should use autoheader to include a definition for the symbols above
+# in a config.h file.
+#
+# Sample usage in a C/C++ source is as follows:
+#
+# #ifdef HAVE_CAPSICUM
+# # ifdef HAVE_SYS_CAPSICUM_H
+# # include <sys/capsicum.h>
+# # else
+# # include <sys/capability.h>
+# # endif
+# #endif /* HAVE_CAPSICUM */
+#
+# LICENSE
+#
+# Copyright (c) 2014 Google Inc.
+# Copyright (c) 2015 Lasse Collin <lasse.collin@tukaani.org>
+#
+# 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.
+
+#serial 2
+
+AC_DEFUN([AX_CHECK_CAPSICUM], [
+# On FreeBSD >= 11.x and Linux, Capsicum is uses <sys/capsicum.h>.
+# If this header is found, it is assumed to be the right one.
+capsicum_header_found=no
+AC_CHECK_HEADERS([sys/capsicum.h], [capsicum_header_found=yes])
+if test "$capsicum_header_found" = no ; then
+ # On FreeBSD 10.x Capsicum uses <sys/capability.h>. Such a header exists
+ # on Linux too but it describes POSIX.1e capabilities. Look for the
+ # declaration of cap_rights_limit to check if <sys/capability.h> is
+ # a Capsicum header.
+ AC_CHECK_DECL([cap_rights_limit], [capsicum_header_found=yes], [],
+ [#include <sys/capability.h>])
+fi
+
+capsicum_lib_found=no
+CAPSICUM_LIB=
+if test "$capsicum_header_found" = yes ; then
+ AC_LANG_PUSH([C])
+ # FreeBSD >= 10.x has Capsicum functions in libc.
+ AC_LINK_IFELSE([AC_LANG_CALL([], [cap_rights_limit])],
+ [capsicum_lib_found=yes], [])
+ # Linux has Capsicum functions in libcaprights.
+ AC_CHECK_LIB([caprights], [cap_rights_limit],
+ [CAPSICUM_LIB=-lcaprights
+ capsicum_lib_found=yes], [])
+ AC_LANG_POP([C])
+fi
+AC_SUBST([CAPSICUM_LIB])
+
+if test "$capsicum_lib_found" = yes ; then
+ AC_DEFINE([HAVE_CAPSICUM], [1], [Define to 1 if Capsicum is available.])
+ m4_default([$1], [LIBS="${CAPSICUM_LIB} $LIBS"])
+else
+ m4_default([$2], [AC_MSG_WARN([Capsicum support not found])])
+fi])
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
new file mode 100644
index 0000000..9f35d13
--- /dev/null
+++ b/m4/ax_pthread.m4
@@ -0,0 +1,522 @@
+# ===========================================================================
+# 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 <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
+#
+# 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 <https://www.gnu.org/licenses/>.
+#
+# 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 <pthread.h>
+# 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 <pthread.h>],
+ [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 <pthread.h>]],
+ [[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/m4/getopt.m4 b/m4/getopt.m4
new file mode 100644
index 0000000..cfbe40f
--- /dev/null
+++ b/m4/getopt.m4
@@ -0,0 +1,71 @@
+# getopt.m4 serial 14 (modified version)
+dnl Copyright (C) 2002-2006, 2008 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.
+
+# The getopt module assume you want GNU getopt, with getopt_long etc,
+# rather than vanilla POSIX getopt. This means your code should
+# always include <getopt.h> for the getopt prototypes.
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE],
+[
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_GETOPT_SUBSTITUTE_HEADER
+])
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
+[
+ GETOPT_H=getopt.h
+ AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
+ [Define to rpl_ if the getopt replacement functions and variables
+ should be used.])
+ AC_SUBST([GETOPT_H])
+])
+
+AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
+[
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
+ fi
+
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_FUNCS([getopt_long], [], [GETOPT_H=getopt.h])
+ 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.
+ dnl
+ dnl With getopt_long(), some BSD versions have a bug in handling optional
+ dnl arguments. This bug appears only if the environment variable
+ dnl POSIXLY_CORRECT has been set, so it shouldn't be too bad in most
+ dnl cases; probably most don't have that variable set. But if we actually
+ dnl hit this bug, it is a real problem due to our heavy use of optional
+ dnl arguments.
+ dnl
+ dnl According to CVS logs, the bug was introduced in OpenBSD in 2003-09-22
+ dnl and copied to FreeBSD in 2004-02-24. It was fixed in both in 2006-09-22,
+ dnl so the affected versions shouldn't be popular anymore anyway. NetBSD
+ dnl never had this bug. TODO: What about Darwin and others?
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_DECL([optreset],
+ [AC_DEFINE([HAVE_OPTRESET], 1,
+ [Define to 1 if getopt.h declares extern int optreset.])],
+ [], [#include <getopt.h>])
+ fi
+
+ dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+ dnl option string (as of 2005-05-05). We don't use that feature, so this
+ dnl is not a problem for us. Thus, the respective test was removed here.
+])
+
+AC_DEFUN([gl_GETOPT_IFELSE],
+[
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+ AS_IF([test -n "$GETOPT_H"], [$1], [$2])
+])
+
+AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644
index 0000000..f449240
--- /dev/null
+++ b/m4/gettext.m4
@@ -0,0 +1,386 @@
+# gettext.m4 serial 72 (gettext-0.21.1)
+dnl Copyright (C) 1995-2014, 2016, 2018-2020 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 <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
+
+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'.
+dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and
+dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/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 <inttypes.h> 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], ,
+ [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_included_intl],
+ m4_if([$1], [external], [no], [yes]))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ m4_if(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])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.in 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_included_intl, 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_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ 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_included_intl, 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 <libintl.h>
+#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_included_intl, 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_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#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.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#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"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_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; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ m4_if(gt_included_intl, 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.
+ BUILD_INCLUDED_LIBINTL=yes
+ 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_included_intl, yes, [
+ dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes'
+ dnl because some of the testsuite requires it.
+ BUILD_INCLUDED_LIBINTL=yes
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
+ ])
+
+ 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 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/m4/host-cpu-c-abi.m4 b/m4/host-cpu-c-abi.m4
new file mode 100644
index 0000000..b922324
--- /dev/null
+++ b/m4/host-cpu-c-abi.m4
@@ -0,0 +1,678 @@
+# host-cpu-c-abi.m4 serial 15
+dnl Copyright (C) 2002-2022 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 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 <https://en.wikipedia.org/wiki/X86_instruction_listings>.
+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 <sgidefs.h>), and _MIPS_SIM == _ABIN32.
+ # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
+ # may later get defined by <sgidefs.h>), 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 <<EOF
+#ifndef __${HOST_CPU}__
+#define __${HOST_CPU}__ 1
+#endif
+#ifndef __${HOST_CPU_C_ABI}__
+#define __${HOST_CPU_C_ABI}__ 1
+#endif
+EOF
+ AH_TOP([/* CPU and C ABI indicator */
+#ifndef __i386__
+#undef __i386__
+#endif
+#ifndef __x86_64_x32__
+#undef __x86_64_x32__
+#endif
+#ifndef __x86_64__
+#undef __x86_64__
+#endif
+#ifndef __alpha__
+#undef __alpha__
+#endif
+#ifndef __arm__
+#undef __arm__
+#endif
+#ifndef __armhf__
+#undef __armhf__
+#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
+#ifndef __arm64__
+#undef __arm64__
+#endif
+#ifndef __hppa__
+#undef __hppa__
+#endif
+#ifndef __hppa64__
+#undef __hppa64__
+#endif
+#ifndef __ia64_ilp32__
+#undef __ia64_ilp32__
+#endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
+#ifndef __loongarch64__
+#undef __loongarch64__
+#endif
+#ifndef __m68k__
+#undef __m68k__
+#endif
+#ifndef __mips__
+#undef __mips__
+#endif
+#ifndef __mipsn32__
+#undef __mipsn32__
+#endif
+#ifndef __mips64__
+#undef __mips64__
+#endif
+#ifndef __powerpc__
+#undef __powerpc__
+#endif
+#ifndef __powerpc64__
+#undef __powerpc64__
+#endif
+#ifndef __powerpc64_elfv2__
+#undef __powerpc64_elfv2__
+#endif
+#ifndef __riscv32__
+#undef __riscv32__
+#endif
+#ifndef __riscv64__
+#undef __riscv64__
+#endif
+#ifndef __riscv32_ilp32__
+#undef __riscv32_ilp32__
+#endif
+#ifndef __riscv32_ilp32f__
+#undef __riscv32_ilp32f__
+#endif
+#ifndef __riscv32_ilp32d__
+#undef __riscv32_ilp32d__
+#endif
+#ifndef __riscv64_ilp32__
+#undef __riscv64_ilp32__
+#endif
+#ifndef __riscv64_ilp32f__
+#undef __riscv64_ilp32f__
+#endif
+#ifndef __riscv64_ilp32d__
+#undef __riscv64_ilp32d__
+#endif
+#ifndef __riscv64_lp64__
+#undef __riscv64_lp64__
+#endif
+#ifndef __riscv64_lp64f__
+#undef __riscv64_lp64f__
+#endif
+#ifndef __riscv64_lp64d__
+#undef __riscv64_lp64d__
+#endif
+#ifndef __s390__
+#undef __s390__
+#endif
+#ifndef __s390x__
+#undef __s390x__
+#endif
+#ifndef __sh__
+#undef __sh__
+#endif
+#ifndef __sparc__
+#undef __sparc__
+#endif
+#ifndef __sparc64__
+#undef __sparc64__
+#endif
+])
+
+])
+
+
+dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
+dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
+dnl one, or to 'unknown' if unknown.
+dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
+AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
+ [if test -n "$gl_cv_host_cpu_c_abi"; then
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
+ esac
+ else
+ case "$host_cpu" in
+
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh[1234] | sh[1234]e[lb] \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ # CPUs that only support a 64-bit ABI.
+changequote(,)dnl
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+
+changequote(,)dnl
+ i[34567]86 )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ 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) \
+ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ 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(
+ [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ 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_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ 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_32bit=yes],
+ [gl_cv_host_cpu_c_abi_32bit=no])
+ ;;
+
+ 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_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ 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
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ riscv32 | riscv64 )
+ # 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
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ 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_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ 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_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown
+ ;;
+ esac
+ fi
+ ])
+
+ HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 0000000..0005795
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,283 @@
+# iconv.m4 serial 24
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 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 From Bruno Haible.
+
+AC_PREREQ([2.64])
+
+dnl Note: AM_ICONV is documented in the GNU gettext manual
+dnl <https://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html>.
+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.
+ am_save_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 <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[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
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[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="$am_save_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.
+ am_save_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 <iconv.h>
+#include <string.h>
+
+#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
+ <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
+ {
+ 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 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 |= 2;
+ 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 |= 4;
+ 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 |= 8;
+ 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 |= 16;
+ 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="$am_save_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="$am_save_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".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+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 <stdlib.h>
+#include <iconv.h>
+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 <iconv.h>.
+ m4_ifdef([gl_ICONV_H_DEFAULTS],
+ [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test $gl_cv_iconv_nonconst != yes; then
+ ICONV_CONST="const"
+ fi
+ ])
+])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
new file mode 100644
index 0000000..ecc88d6
--- /dev/null
+++ b/m4/intlmacosx.m4
@@ -0,0 +1,65 @@
+# intlmacosx.m4 serial 8 (gettext-0.20.2)
+dnl Copyright (C) 2004-2014, 2016, 2019-2022 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 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_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFPreferences.h>]],
+ [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_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_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFLocale.h>]],
+ [[CFLocaleCopyPreferredLanguages();]])],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=no])
+ LIBS="$gt_save_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
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
new file mode 100644
index 0000000..934207a
--- /dev/null
+++ b/m4/lib-ld.m4
@@ -0,0 +1,168 @@
+# lib-ld.m4 serial 10
+dnl Copyright (C) 1996-2003, 2009-2022 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 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` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes
+ ;;
+*)
+ acl_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-2.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld [default=no]])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+# 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
+
+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*)
+ # 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_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$acl_save_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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+ fi
+ case $host in
+ *-*-aix*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [# The compiler produces 64-bit code. Add option '-b64' so that the
+ # linker groks 64-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -b64 "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+ esac
+ ], [])
+ ;;
+ sparc64-*-netbsd*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [],
+ [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
+ # so that the linker groks 32-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -m elf32_sparc "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+ esac
+ ])
+ ;;
+ esac
+ ])
+ LD="$acl_cv_path_LD"
+fi
+if test -n "$LD"; then
+ AC_MSG_RESULT([$LD])
+else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([no acceptable ld found in \$PATH])
+fi
+AC_LIB_PROG_LD_GNU
+])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
new file mode 100644
index 0000000..3b75bcd
--- /dev/null
+++ b/m4/lib-link.m4
@@ -0,0 +1,813 @@
+# lib-link.m4 serial 33
+dnl Copyright (C) 2001-2022 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.
+
+AC_PREREQ([2.61])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+ dnl because these -l options might require -L options that are present in
+ dnl LIBS. -l options benefit only from the -L options listed before it.
+ dnl Otherwise, add it to the front of LIBS, because it may be a static
+ dnl library that depends on another static library that is present in LIBS.
+ dnl Static libraries benefit only from the static libraries listed after
+ dnl it.
+ case " $LIB[]NAME" in
+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+ *) LIBS="$LIB[]NAME $LIBS" ;;
+ esac
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[$3]], [[$4]])],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_libname_spec,
+dnl acl_library_names_spec,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Complain if config.rpath is missing.
+ AC_REQUIRE_AUX_FILE([config.rpath])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > 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. Using breadth-first-seach.
+ 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.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_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 <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00052.html>.
+ 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_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_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_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
new file mode 100644
index 0000000..999f712
--- /dev/null
+++ b/m4/lib-prefix.m4
@@ -0,0 +1,323 @@
+# lib-prefix.m4 serial 20
+dnl Copyright (C) 2001-2005, 2008-2022 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 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_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_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_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_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__)
+ 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 <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
+ 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 <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
+ 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
+ ;;
+ *)
+ 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_save_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_save_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/m4/libtool.m4 b/m4/libtool.m4
new file mode 100644
index 0000000..717e769
--- /dev/null
+++ b/m4/libtool.m4
@@ -0,0 +1,8399 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996-2001, 2003-2019, 2021-2022 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) 2014 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 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 <http://www.gnu.org/licenses/>.
+])
+
+# serial 59 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.62])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:
+#
+# <var>='`$ECHO "$<var>" | $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_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), incase 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 <bug-libtool@gnu.org>."
+
+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) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision 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)],
+ [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_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([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])
+
+ 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() { 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' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ 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_cv_apple_cc_single_mod"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -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 -nostdlib -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
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ 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*)
+ # 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*)
+ 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*)
+ 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 thats 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], [0], [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_CHECK_TOOL(RANLIB, 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
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp 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.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp 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*)
+ # Under GNU Hurd, 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* | 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;
+ ;;
+
+ bitrig* | 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 <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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 () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ 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* | 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.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp 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* | 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* | 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 --with-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<name>.so
+ # instead of lib<name>.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* | 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
+ 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'
+ 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* | 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*)
+ # Native MSVC or ICC
+ 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*)
+ 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
+ shlibpath_var=LD_LIBRARY_PATH
+ 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_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+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
+ ;;
+
+# 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'
+ 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'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$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* directores 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'
+ ;;
+
+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
+ ;;
+
+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* | bitrig*)
+ 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
+ ;;
+
+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
+ ;;
+
+*)
+ 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*)
+ # 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 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi])
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_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` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >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 <conftest2.i >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 <conftest2.i >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.
+# 'test_compile' -- check by making test program.
+# '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* | 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)'
+ 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
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ 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* | bitrig*)
+ 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
+ ;;
+
+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* | 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*) 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* | 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_mainfest_tool],
+ [lt_cv_path_mainfest_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_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test yes != "$lt_cv_path_mainfest_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* | *-*-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* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+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 .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"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 .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/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* .* \(.*\)$/ {\"\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.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ 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 ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {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(){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
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && 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* | 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.exp'
+ 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* | 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
+ ;;
+ 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* )
+ # 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*)
+ ;;
+ *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*)
+ ;;
+ 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* | 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.exp'
+ 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* | 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'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ 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'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _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'
+ ;;
+
+ 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* | cegcc*)
+ case $cc_basename in
+ cl* | icl*)
+ _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* | 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
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ 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 <jrb3@best.com> 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* | 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']
+
+ 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)=yes
+ ;;
+
+ 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'
+ ;;
+
+ 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*) # 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(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*)
+ 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* | 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*)
+ # Native MSVC or ICC
+ _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.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $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.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ 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 -o $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
+ ;;
+
+ 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'
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ 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* | bitrig*)
+ 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.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # 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)=:
+ ;;
+
+ 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.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ 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.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ 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.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ 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(){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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $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 eval "`$CC -print-prog-name=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 -nostdlib $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 "\-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 <jrb3@best.com> 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* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl* | ,icl* | no,icl*)
+ # Native MSVC or ICC
+ # 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.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $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.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ 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
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $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 -nostdlib $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)=yes
+ ;;
+
+ 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 -nostdlib $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 -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $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 -nostdlib $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 -nostdlib $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 -nostdlib $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
+ ;;
+
+ 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* )
+ # 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
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd* | bitrig*)
+ 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.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
+ _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 -nostdlib $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 -nostdlib $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 "\-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
+ ;;
+
+ 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.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # 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 "\-L"'
+ else
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # 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 "\-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
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+ test x-R = "$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_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_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_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_TOOL([FILECMD], [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
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f "$lt_ac_sed" && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test 10 -lt "$lt_ac_count" && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test "$lt_ac_count" -gt "$lt_ac_max"; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_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* ) # 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* ) # 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* )
+ case $build in
+ *-*-mingw* ) # 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
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
new file mode 100644
index 0000000..b0b5e9c
--- /dev/null
+++ b/m4/ltoptions.m4
@@ -0,0 +1,437 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 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 8 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], [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* | *-*-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 --with-aix-soname flag, 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_WITH([aix-soname],
+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+ [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)
+ with_aix_soname=$lt_cv_with_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
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+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 --with-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_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [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], [])
+
+## ----------------- ##
+## 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/m4/ltsugar.m4 b/m4/ltsugar.m4
new file mode 100644
index 0000000..902508b
--- /dev/null
+++ b/m4/ltsugar.m4
@@ -0,0 +1,124 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 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/m4/ltversion.m4 b/m4/ltversion.m4
new file mode 100644
index 0000000..0026c21
--- /dev/null
+++ b/m4/ltversion.m4
@@ -0,0 +1,24 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2011-2019, 2021-2022 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 4249 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.7.4-1ec8f-dirty])
+m4_define([LT_PACKAGE_REVISION], [2.4.7.4])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.7.4-1ec8f-dirty'
+macro_revision='2.4.7.4'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
new file mode 100644
index 0000000..0f7a875
--- /dev/null
+++ b/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-2022 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/m4/nls.m4 b/m4/nls.m4
new file mode 100644
index 0000000..7c11c90
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,32 @@
+# nls.m4 serial 6 (gettext-0.20.2)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2022 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 <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 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/m4/po.m4 b/m4/po.m4
new file mode 100644
index 0000000..2f14f8e
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,454 @@
+# po.m4 serial 32 (gettext-0.21.1)
+dnl Copyright (C) 1995-2014, 2016, 2018-2022 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 <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+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.20])
+
+ 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 <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ tab=`printf '\t'`
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
+ # Seen the first line of the variable definition.
+ s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ 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
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ 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)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ 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"
+ PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ 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/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ 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=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ 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/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$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" <<EOF
+$frobbedlang.msg: $lang.po
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$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/_/-/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" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/m4/posix-shell.m4 b/m4/posix-shell.m4
new file mode 100644
index 0000000..4c56193
--- /dev/null
+++ b/m4/posix-shell.m4
@@ -0,0 +1,63 @@
+# Find a POSIX-conforming shell.
+
+# Copyright (C) 2007-2008 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.
+
+# Written by Paul Eggert.
+
+# If a POSIX-conforming shell can be found, set POSIX_SHELL and
+# PREFERABLY_POSIX_SHELL to it. If not, set POSIX_SHELL to the
+# empty string and PREFERABLY_POSIX_SHELL to '/bin/sh'.
+
+AC_DEFUN([gl_POSIX_SHELL],
+[
+ AC_CACHE_CHECK([for a shell that conforms to POSIX], [gl_cv_posix_shell],
+ [gl_test_posix_shell_script='
+ func_return () {
+ (exit [$]1)
+ }
+ func_success () {
+ func_return 0
+ }
+ func_failure () {
+ func_return 1
+ }
+ func_ret_success () {
+ return 0
+ }
+ func_ret_failure () {
+ return 1
+ }
+ subshell_umask_sanity () {
+ (umask 22; (umask 0); test $(umask) -eq 22)
+ }
+ test "[$](echo foo)" = foo &&
+ func_success &&
+ ! func_failure &&
+ func_ret_success &&
+ ! func_ret_failure &&
+ (set x && func_ret_success y && test x = "[$]1") &&
+ subshell_umask_sanity
+ '
+ for gl_cv_posix_shell in \
+ "$CONFIG_SHELL" "$SHELL" /bin/sh /bin/bash /bin/ksh /bin/sh5 no; do
+ case $gl_cv_posix_shell in
+ /*)
+ "$gl_cv_posix_shell" -c "$gl_test_posix_shell_script" 2>/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/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644
index 0000000..4a5b0b4
--- /dev/null
+++ b/m4/progtest.m4
@@ -0,0 +1,91 @@
+# progtest.m4 serial 9 (gettext-0.21.1)
+dnl Copyright (C) 1996-2003, 2005, 2008-2022 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 <drepper@cygnus.com>, 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.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in m4_if([$5], , $PATH, [$5]); do
+ IFS="$ac_save_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="$ac_save_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/m4/tuklib_common.m4 b/m4/tuklib_common.m4
new file mode 100644
index 0000000..d942a25
--- /dev/null
+++ b/m4/tuklib_common.m4
@@ -0,0 +1,22 @@
+#
+# SYNOPSIS
+#
+# TUKLIB_COMMON
+#
+# DESCRIPTION
+#
+# Common checks for tuklib.
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+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/m4/tuklib_cpucores.m4 b/m4/tuklib_cpucores.m4
new file mode 100644
index 0000000..873812d
--- /dev/null
+++ b/m4/tuklib_cpucores.m4
@@ -0,0 +1,180 @@
+#
+# 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
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+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 <sched.h>
+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_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/param.h>
+#include <sys/cpuset.h>
+
+int
+main(void)
+{
+ cpuset_t set;
+ cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
+ sizeof(set), &set);
+ return 0;
+}
+]])], [tuklib_cv_cpucores_method=cpuset], [
+
+# On OS/2, both sysconf() and sysctl() pass the tests in this file,
+# but only sysctl() works. On QNX it's the opposite: only sysconf() works
+# (although it assumes that _POSIX_SOURCE, _XOPEN_SOURCE, and _POSIX_C_SOURCE
+# are undefined or alternatively _QNX_SOURCE is defined).
+#
+# We test sysctl() first and intentionally break the sysctl() test on QNX
+# so that sysctl() is never used on QNX.
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#ifdef __QNX__
+compile error
+#endif
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/sysctl.h>
+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_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+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_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/param.h>
+#include <sys/pstat.h>
+
+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/m4/tuklib_integer.m4 b/m4/tuklib_integer.m4
new file mode 100644
index 0000000..ab9a405
--- /dev/null
+++ b/m4/tuklib_integer.m4
@@ -0,0 +1,131 @@
+#
+# 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
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+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 <byteswap.h>
+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
+])
+
+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 only on x86, x86_64, big endian PowerPC,
+ and some ARM systems.]),
+ [], [enable_unaligned_access=auto])
+if test "x$enable_unaligned_access" = xauto ; then
+ # TODO: There may be other architectures, on which unaligned access
+ # is OK.
+ case $host_cpu in
+ i?86|x86_64|powerpc|powerpc64)
+ enable_unaligned_access=yes
+ ;;
+ arm*|aarch64*)
+ # On 32-bit and 64-bit ARM, GCC and Clang
+ # #define __ARM_FEATURE_UNALIGNED if
+ # unaligned access is supported.
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#ifndef __ARM_FEATURE_UNALIGNED
+compile error
+#endif
+int main(void) { return 0; }
+])], [enable_unaligned_access=yes], [enable_unaligned_access=no])
+ ;;
+ *)
+ 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/m4/tuklib_mbstr.m4 b/m4/tuklib_mbstr.m4
new file mode 100644
index 0000000..991be9b
--- /dev/null
+++ b/m4/tuklib_mbstr.m4
@@ -0,0 +1,30 @@
+#
+# 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.
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+AC_DEFUN_ONCE([TUKLIB_MBSTR], [
+AC_REQUIRE([TUKLIB_COMMON])
+AC_FUNC_MBRTOWC
+AC_CHECK_FUNCS([wcwidth])
+])dnl
diff --git a/m4/tuklib_physmem.m4 b/m4/tuklib_physmem.m4
new file mode 100644
index 0000000..5931785
--- /dev/null
+++ b/m4/tuklib_physmem.m4
@@ -0,0 +1,211 @@
+#
+# 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().
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+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).
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/systemcfg.h>
+
+int
+main(void)
+{
+ (void)_system_configuration.physmem;
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=aix], [
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+int
+main(void)
+{
+ long i;
+ i = sysconf(_SC_PAGESIZE);
+ i = sysconf(_SC_PHYS_PAGES);
+ return 0;
+}
+]])], [tuklib_cv_physmem_method=sysconf], [
+
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+#include <sys/sysctl.h>
+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_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/sysinfo.h>
+#include <machine/hal_sysinfo.h>
+
+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_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/param.h>
+#include <sys/pstat.h>
+
+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_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <invent.h>
+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_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#include <sys/sysinfo.h>
+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/m4/tuklib_progname.m4 b/m4/tuklib_progname.m4
new file mode 100644
index 0000000..7685d06
--- /dev/null
+++ b/m4/tuklib_progname.m4
@@ -0,0 +1,28 @@
+#
+# 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.
+#
+# COPYING
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+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 <errno.h>.])],
+ [], [#include <errno.h>])
+])dnl
diff --git a/m4/visibility.m4 b/m4/visibility.m4
new file mode 100644
index 0000000..f0468e8
--- /dev/null
+++ b/m4/visibility.m4
@@ -0,0 +1,82 @@
+# visibility.m4 serial 8
+dnl Copyright (C) 2005, 2008, 2010-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.
+
+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_save_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_save_CFLAGS"
+ ])
+ dnl Now check whether visibility declarations are supported.
+ AC_CACHE_CHECK([for simple visibility declarations],
+ [gl_cv_cc_visibility],
+ [gl_save_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_save_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/macosx/build.sh b/macosx/build.sh
new file mode 100755
index 0000000..fd089f3
--- /dev/null
+++ b/macosx/build.sh
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+###############################################################################
+# Author: Anders F Björklund <afb@users.sourceforge.net>
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+###############################################################################
+
+mkdir -p Root
+mkdir -p Resources
+
+# Abort immediately if something goes wrong.
+set -e
+
+GCC="gcc-4.2"
+SDK="/Developer/SDKs/MacOSX10.5.sdk"
+MDT="10.5"
+GTT=i686-apple-darwin9
+
+ARCHES1="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
+ARCHES2="-arch ppc -arch i386"
+PKGFORMAT="10.5" # xar
+
+# avoid "unknown required load command: 0x80000022" from linking on Snow Leopard
+uname -r | grep ^1 >/dev/null && LDFLAGS="$LDFLAGS -Wl,-no_compact_linkedit"
+
+# Clean up if it was already configured.
+[ -f Makefile ] && make distclean
+
+# Build the regular fat program
+
+CC="$GCC" \
+CFLAGS="-O2 -g $ARCHES1 -isysroot $SDK -mmacosx-version-min=$MDT" \
+../configure --disable-dependency-tracking --disable-xzdec --disable-lzmadec $GTT
+
+make
+
+make check
+
+make DESTDIR=`pwd`/Root install
+
+make distclean
+
+# Build the size-optimized program
+
+CC="$GCC" \
+CFLAGS="-Os -g $ARCHES2 -isysroot $SDK -mmacosx-version-min=$MDT" \
+../configure --disable-dependency-tracking --disable-shared --disable-nls --disable-encoders --enable-small --disable-threads $GTT
+
+make -C src/liblzma
+make -C src/xzdec
+make -C src/xzdec DESTDIR=`pwd`/Root install
+
+cp -a ../extra Root/usr/local/share/doc/xz
+
+make distclean
+
+# Move development files to different package
+
+test -d liblzma && rm -r liblzma
+mkdir -p liblzma/usr/local
+
+mv Root/usr/local/include liblzma/usr/local
+mv Root/usr/local/lib liblzma/usr/local
+
+mkdir -p Root/usr/local/lib
+cp -p liblzma/usr/local/lib/liblzma.5.dylib Root/usr/local/lib
+mkdir -p liblzma/usr/local/share/doc/xz
+mv Root/usr/local/share/doc/xz/examples* liblzma/usr/local/share/doc/xz
+
+# Strip debugging symbols and make relocatable
+
+for bin in xz lzmainfo xzdec lzmadec; do
+ strip -S Root/usr/local/bin/$bin
+ install_name_tool -change /usr/local/lib/liblzma.5.dylib @executable_path/../lib/liblzma.5.dylib Root/usr/local/bin/$bin
+done
+
+for lib in liblzma.5.dylib; do
+ strip -S Root/usr/local/lib/$lib
+ install_name_tool -id @executable_path/../lib/liblzma.5.dylib Root/usr/local/lib/$lib
+done
+
+# Create tarball, but without the HFS+ attrib
+
+rmdir debug lib po src/liblzma/api src/liblzma src/lzmainfo src/scripts src/xz src/xzdec src tests
+
+( cd Root/usr/local; COPY_EXTENDED_ATTRIBUTES_DISABLE=true COPYFILE_DISABLE=true tar cvjf ../../../XZ.tbz * )
+( cd liblzma; COPY_EXTENDED_ATTRIBUTES_DISABLE=true COPYFILE_DISABLE=true tar cvjf ../liblzma.tbz ./usr/local )
+
+# Include documentation files for package
+
+cp -p ../README Resources/ReadMe.txt
+cp -p ../COPYING Resources/License.txt
+
+# Make an Installer.app package
+
+ID="org.tukaani.xz"
+VERSION=`cd ..; sh build-aux/version.sh`
+PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
+$PACKAGEMAKER -r Root/usr/local -l /usr/local -e Resources -i $ID -n $VERSION -t XZ -o XZ.pkg -g $PKGFORMAT --verbose
+$PACKAGEMAKER -r liblzma -w -k -i $ID.liblzma -n $VERSION -o liblzma.pkg -g $PKGFORMAT --verbose
+
+# Put the package in a disk image
+
+if [ "$PKGFORMAT" != "10.5" ]; then
+hdiutil create -fs HFS+ -format UDZO -quiet -srcfolder XZ.pkg -ov XZ.dmg
+hdiutil internet-enable -yes -quiet XZ.dmg
+fi
+
+echo
+echo "Build completed successfully."
+echo
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..7a76c70
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,23 @@
+ca
+cs
+da
+de
+eo
+es
+fi
+fr
+hr
+hu
+it
+ko
+pl
+pt
+pt_BR
+ro
+sr
+sv
+tr
+uk
+vi
+zh_CN
+zh_TW
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..6b25f0d
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,510 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2000-2020 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.21
+GETTEXT_MACRO_VERSION = 0.20
+
+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.sin \
+$(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 .sin .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
+# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
+# "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,.*/,,'`; \
+ 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
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+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 remove-potcdate.sed
+ 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 remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f 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 \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(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.1[0-5] | 0.1[0-5].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+ 0.1[6-7] | 0.1[6-7].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE_UPDATE) $(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 remove-potcdate.sed
+ 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) $(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.1[0-5] | 0.1[0-5].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ 0.1[6-7] | 0.1[6-7].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE) $(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:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..dc19bc9
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,46 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# 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 = --keyword=_ --keyword=N_
+
+# 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 =
+
+# 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 =
+
+# Although you may need slightly wider terminal than 80 chars, it is
+# much nicer to edit the output of --help when this is set.
+XGETTEXT_OPTIONS += --no-wrap
+MSGMERGE += --no-wrap
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..e1438e0
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,13 @@
+# 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/options.c
+src/xz/signals.c
+src/xz/suffix.c
+src/xz/util.c
+src/common/tuklib_exit.c
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 0000000..18c024b
--- /dev/null
+++ b/po/Rules-quot
@@ -0,0 +1,62 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+#
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# This file, Rules-quot, and its auxiliary files (listed under
+# DISTFILES.common.extra1) are free software; the Free Software Foundation
+# gives unlimited permission to use, copy, distribute, and modify them.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin 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 | $(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.sin
+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+ rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,0 +1,10 @@
+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/po/ca.gmo b/po/ca.gmo
new file mode 100644
index 0000000..b3dc849
--- /dev/null
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
new file mode 100644
index 0000000..748c14f
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,1044 @@
+# XZ Utils Catalan Translation
+# This file is put in the public domain.
+# Jordi Mas i Hernàndez <jmas@softcatala.org>, 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.0-pre2\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2022-12-12 18:19+0300\n"
+"Last-Translator: Jordi Mas i Hernàndez <jmas@softcatala.org>\n"
+"Language-Team: Catalan <ca@dodds.net>\n"
+"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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: argument no vàlid per a --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: massa arguments per a --block-list"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0 només es pot utilitzar com a últim element a --block-list"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: tipus de format de fitxer desconegut"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: tipus de comprovació d'integritat no suportat"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "La variable d'entorn %s conté massa arguments"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "El suport de compressió s'ha desactivat en temps de construcció"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "El suport de descompressió s'ha desactivat en temps de construcció"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "No s'admet la compressió de fitxers lzip (.lz)"
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: amb --format=raw, --suffix=.SUF és necessari si no s'escriu a la sortida estàndard"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "El nombre màxim de filtres és de quatre"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Es desaconsella l'ús d'un predefinit en mode RAW."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "El format .lzma només admet el filtre LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "No es pot usar LZMA1 amb el format .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "La cadena de filtratge és incompatible amb --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "S'utilitzen fins a %<PRIu32> fils."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Cadena de filtre no suportada o opcions de filtre"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "La descompressió necessitarà %s MiB de memòria."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, 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:252
+msgid "Failed to enable the sandbox"
+msgstr "No s'ha pogut habilitar l'espai aïllat"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: no es pot eliminar: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, 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:426
+#, 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:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: és un enllaç simbòlic, s'omet"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: és un directori, s'omet"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: no és un fitxer normal, s'omet"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Nom de fitxer buit, s'omet"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: ha fallat el tancament del fitxer: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: error de lectura: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: error en cercar el fitxer: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: fi inesperat del fitxer"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: error d'escriptura: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Desactivat"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Quantitat de memòria física (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Nombre de fils del processador:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Compressió:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Descompressió:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Descompressió multifil:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Predeterminat per a -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Informació del maquinari:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Límits d'ús de la memòria"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Fluxos:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Blocs:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Mida comprimida:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Mida no comprimida:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Relació:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Comprovació:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Farciment del flux:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Memòria necessària:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Mides a les capçaleres:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Nombre de fitxers:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Flux"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Bloc"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Blocs"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "CompOffset"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "UncompOffset"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "CompSize"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "UncompSize"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "TotalSize"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Relació"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Comprovació"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "CheckVal"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Separació"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Capçalera"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Senyals"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "MemUsage"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "NoConeix2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "NoConeix3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "NoConeix5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "NoConeix6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "NoConeix7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "NoConeix8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "NoConeix9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "NoConeix11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "NoConeix12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "NoConeix13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "NoConeix14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "NoConeix15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: El fitxer està buit"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Strms Blocs Comprimit NoComprimit Ràtio Check Nom de fitxer"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Sí"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "No"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Totals:"
+
+#: src/xz/list.c:1270
+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:1276
+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:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Error en llegir els noms de fitxer: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, 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 lloc de «--files»?"
+
+#: src/xz/main.c:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Error intern (error)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "No es poden establir els gestors de senyals"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Sense comprovació d'integritat; no es verifica la integritat del fitxer"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Tipus no admès de comprovació d'integritat; no es verifica la integritat del fitxer"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "S'ha arribat al límit d'ús de la memòria"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "No s'ha reconegut el format del fitxer"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Opcions no suportades"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Les dades comprimides estan malmeses"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Final inesperat de l'entrada"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "Es requereixen %s MiB de memòria. El limitador està desactivat."
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "Es requereixen %s MiB de memòria. El límit és %s."
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Cadena de filtratge: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Proveu «%s --help» per a més informació."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Ús: %s [OPCIÓ]... [FITXER]...\n"
+"Comprimeix o descomprimeix FITXERS en format .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Els arguments obligatoris per a opcions llargues també són obligatoris\n"
+"per a opcions curtes.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Mode d'operació:\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modificadors de l'operació:\n"
+
+#: src/xz/message.c:984
+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"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream descomprimeix només el primer flux, i silenciosament\n"
+" ignora les possibles dades d'entrada restants"
+
+#: src/xz/message.c:996
+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"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Opcions bàsiques de format i compressió de fitxers:\n"
+
+#: src/xz/message.c:1007
+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»"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check no verifiquis la comprovació d'integritat en descomprimir"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" 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!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" 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"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NUM usa com a màxim NUM fils; el valor predeterminat és 1;\n"
+" estableix a 0 per a utilitzar tants fils com nuclis té\n"
+" el processador"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=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:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=MIDES\n"
+" inicia un bloc nou .xz després dels intervals de dades\n"
+" sense comprimir donats amb separació per comes"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=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:1043
+#, 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"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" 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ó"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Cadena de filtre personalitzada per a la compressió (alternativa per a l'ús\n"
+" de predefinits):"
+
+#: src/xz/message.c:1067
+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)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+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"
+" OPTS vàlids per a tots els filtres BCJ:\n"
+" start=Núm. decalatge d'inici per a les conversions\n"
+" (per defecte=0)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Altres opcions:\n"
+
+#: src/xz/message.c:1106
+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"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn fes que els avisos no afectin l'estat de sortida"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot usa missatges analitzables per la màquina\n"
+" (útil per a scripts)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" 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"
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version mostra el número de versió i surt"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Informa d'errors a <%s> (en anglès o finès).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Pàgina inicial de %s: <%s>\n"
+
+#: src/xz/message.c:1142
+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Ó."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: les opcions han de ser parelles «name=value» separades amb comes"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: nom d'opció no vàlid"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: el valor de l'opció no és vàlid"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "No s'admet el LZMA1/LZMA2 predefinit: %s"
+
+#: src/xz/options.c:356
+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:160
+#, 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:181
+#, 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:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: El sufix del nom de fitxer no és vàlid"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: El valor no és un enter decimal no negatiu"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: el sufix multiplicador no és vàlid"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "El valor de l'opció «%s» ha d'estar a l'interval [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+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:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Les dades comprimides no es poden escriure en un terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Ha fallat l'escriptura a la sortida estàndard"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Error desconegut"
diff --git a/po/cs.gmo b/po/cs.gmo
new file mode 100644
index 0000000..165e974
--- /dev/null
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 0000000..a5eedf4
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,1150 @@
+# XZ Utils Czech translation
+# This file is put in the public domain.
+# Marek Černocký <marek@manet.cz>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-utils\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2010-12-03 11:32+0100\n"
+"Last-Translator: Marek Černocký <marek@manet.cz>\n"
+"Language-Team: Czech <diskuze@lists.l10n.cz>\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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr ""
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr ""
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr ""
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Neznámý typ formátu souboru"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Neznámý typ kontroly integrity"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr ""
+
+#: src/xz/args.c:589
+#, 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:691
+msgid "Compression support was disabled at build time"
+msgstr ""
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr ""
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr ""
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: 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:115
+msgid "Maximum number of filters is four"
+msgstr "Maximální počet filtrů je čtyři"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Použití přednastavení v režimu raw je nevhodné."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Formát .lzma podporuje pouze filtr LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 nelze použít s formátem .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr ""
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr ""
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr ""
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Nepodporovaný omezující filtr nebo volby filtru"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Dekomprimace bude vyžadovat %s MiB paměti."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr ""
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr ""
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Nelze odstranit: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Nelze nastavit vlastníka souboru: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Nelze nastavit skupinu souboru: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Nelze nastavit oprávnění souboru: %s"
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr ""
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Jedná se o symbolický odkaz, vynechává se"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Jedná se o složku, vynechává se"
+
+#: src/xz/file_io.c:707
+#, 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:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Prázdný název souboru, vynechává se"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr ""
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr ""
+
+#: src/xz/file_io.c:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Selhalo zavření souboru: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Chyba čtení: %s"
+
+#: src/xz/file_io.c:1259
+#, 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:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Neočekávaný konec souboru"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Chyba zápisu: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Vypnuto"
+
+#: src/xz/hardware.c:269
+#, 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:270
+msgid "Number of processor threads:"
+msgstr ""
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr ""
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr ""
+
+#: src/xz/hardware.c:273
+#, fuzzy
+#| msgid "Memory usage limit for decompression: "
+msgid "Multi-threaded decompression:"
+msgstr "Omezení použitelné paměti pro dekomprimaci:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr ""
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr ""
+
+#: src/xz/hardware.c:299
+#, fuzzy
+#| msgid "Memory usage limit reached"
+msgid "Memory usage limits:"
+msgstr "Dosaženo omezení použitelné paměti"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr ""
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr ""
+
+#: src/xz/list.c:70
+#, fuzzy
+#| msgid " Compressed size: %s\n"
+msgid "Compressed size:"
+msgstr " Komprimovaná velikost: %s\n"
+
+#: src/xz/list.c:71
+#, fuzzy
+#| msgid " Uncompressed size: %s\n"
+msgid "Uncompressed size:"
+msgstr " Nekomprimovaná velikost: %s\n"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr ""
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr ""
+
+#: src/xz/list.c:74
+#, fuzzy
+#| msgid " Stream padding: %s\n"
+msgid "Stream Padding:"
+msgstr " Zarovnání proudu: %s\n"
+
+#: src/xz/list.c:75
+#, fuzzy
+#| msgid " Memory needed: %s MiB\n"
+msgid "Memory needed:"
+msgstr " Potřebná paměť: %s MiB\n"
+
+#: src/xz/list.c:76
+#, fuzzy
+#| msgid " Sizes in headers: %s\n"
+msgid "Sizes in headers:"
+msgstr " Velikosti v hlavičkách: %s\n"
+
+#: src/xz/list.c:79
+#, fuzzy
+#| msgid " Number of files: %s\n"
+msgid "Number of files:"
+msgstr " Počet souborů: %s\n"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr ""
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr ""
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr ""
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr ""
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr ""
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr ""
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr ""
+
+#: src/xz/list.c:129
+#, fuzzy
+#| msgid "Totals:"
+msgid "TotalSize"
+msgstr "Celkem:"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr ""
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr ""
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr ""
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr ""
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr ""
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr ""
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr ""
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "neznámá-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "neznámá-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "neznámá-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "neznámá-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "neznámá-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "neznámá-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "neznámá-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "neznámá-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "neznámá-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "neznámá-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "neznámá-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "neznámá-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Soubor je prázdný"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Proud Bloky Komprim Nekomprim Poměr Kontrl Název souboru"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Ano"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Ne"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Celkem:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list nepodporuje čtení ze standardního vstupu"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Chyba při čtení názvů souborů: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, c-format
+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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr ""
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Interní chyba"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Nelze ustanovit ovladač signálu"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Žádná kontrola integrity; integrita souboru se nebude ověřovat"
+
+#: src/xz/message.c:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Dosaženo omezení použitelné paměti"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Formát souboru nebyl rozpoznán"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Nepodporovaná volba"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Komprimovaná data jsou poškozená"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Neočekávaný konec vstupu"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr ""
+
+#: src/xz/message.c:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Omezující filtr: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Zkuste „%s --help“ pro více informací"
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Použití: %s [PŘEPÍNAČ]... [SOUBOR]...\n"
+"Komprimuje nebo dekomprimuje SOUBORy ve formátu xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Povinné argumenty pro dlouhé přepínače jsou povinné rovněž pro krátké přepínače.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr "Operační režim:\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+"Modifikátory operací:\n"
+
+#: src/xz/message.c:984
+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"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+
+#: src/xz/message.c:996
+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"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+"Základní přepínače pro formát souboru a komprimaci:\n"
+
+#: src/xz/message.c:1007
+#, fuzzy
+#| msgid ""
+#| " -F, --format=FMT file format to encode or decode; possible values are\n"
+#| " `auto' (default), `xz', `lzma', and `raw'\n"
+#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+#| " `crc32', `crc64' (default), or `sha256'"
+msgid ""
+" -F, --format=FMT file format to encode or decode; possible values are\n"
+" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
+" -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“"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr ""
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" 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"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" 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"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+
+#: src/xz/message.c:1043
+#, fuzzy, no-c-format
+#| msgid ""
+#| " --memlimit-compress=LIMIT\n"
+#| " --memlimit-decompress=LIMIT\n"
+#| " -M, --memlimit=LIMIT\n"
+#| " set memory usage limit for compression, decompression,\n"
+#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
+msgid ""
+" --memlimit-compress=LIMIT\n"
+" --memlimit-decompress=LIMIT\n"
+" --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í"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" 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í"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+"Vlastní omezující filtr pro komprimaci (alternativa k použití přednastavených):"
+
+#: src/xz/message.c:1067
+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í)"
+
+#: src/xz/message.c:1082
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
+#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
+#| " --sparc[=OPTS] SPARC BCJ filter\n"
+#| " Valid OPTS for all BCJ filters:\n"
+#| " start=NUM start offset for conversions (default=0)"
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+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)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Ostatní přepínače:\n"
+
+#: src/xz/message.c:1106
+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ší"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn způsobí, že varování neovlivní stav ukončení"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot použít strojově analyzovatelné zprávy (užitečné pro\n"
+" skripty)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" 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"
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version zobrazit číslo verze a skončit"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Chyby hlaste na <%s> (v angličtině nebo finštině).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Domovská stránka %s: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr ""
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Volby musí být páry „název=hodnota“ oddělené čárkami"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Neplatný název volby"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Neplatná hodnota volby"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Nepodporované přednastavení LZMA1/LZMA2: %s"
+
+#: src/xz/options.c:356
+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:160
+#, 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:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Soubor již má příponu „%s“, vynechává se"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Neplatná přípona názvu souboru"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Hodnota není nezáporné desítkové číslo"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Neplatná jednotka s předponou"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Hodnota volby „%s“ musí být v rozsahu [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Z terminálu nelze číst komprimovaná data"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Do terminálu nelze zapisovat komprimovaná data"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Zápis do standardního výstupu selhal"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Neznámá chyba"
+
+#~ 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=%<PRIu32>"
+#~ msgstr "Vybraný vyhledávač shod vyžaduje minimálně nice=%<PRIu32>"
+
+#~ 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/po/da.gmo b/po/da.gmo
new file mode 100644
index 0000000..d0359d4
--- /dev/null
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
new file mode 100644
index 0000000..000510f
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,1021 @@
+# Danish translation xz.
+# This file is put in the public domain.
+# Joe Hansen <joedalton2@yahoo.dk>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.2.4\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2019-03-04 23:08+0100\n"
+"Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n"
+"Language-Team: Danish <dansk@dansk-gruppen.dk>\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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Ugyldigt parameter til --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: For mange argumenter til --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Ukendt filformattype"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Typen for integritetkontrol er ikke understøttet"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "Miljøvariablen %s indeholder for mange argumenter"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Komprimeringsunderstøttelse blev deaktiveret på byggetidspunktet"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Dekomprimeringsunderstøttelse blev deaktiveret på byggetidspunktet"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr ""
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: med --format=raw, --suffix=.SUF er krævet med mindre der skrives til standardud"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Maksimalt antal filtre er fire"
+
+#: src/xz/coder.c:135
+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:170
+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:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Formatet .lzma understøtter kun LZMA1-filteret"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 kan ikke bruges med .xz-formatet"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Filterkæden er ikke kompatibel med --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Bruger op til %<PRIu32> tråde."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Filterkæde eller filterindstillinger er ikke understøttet"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Dekomprimering vil kræve %s MiB hukommelse."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Det opstod en fejl under oprettelse af en datakanal: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Kunne ikke aktivere sandkassen"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Kan ikke fjerne: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Kan ikke angive filejeren: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Kan ikke angive filgruppen: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Kan ikke angive filtilladelser: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Er en symbolsk henvisning, udelader"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Er en mappe, udelader"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Er ikke en normal fil, udelader"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Fil har klæbende bitsæt, udelader"
+
+#: src/xz/file_io.c:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Tomt filnavn, udelader"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Lukning af filen fejlede: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Læsefejl: %s"
+
+#: src/xz/file_io.c:1259
+#, 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:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Uventet filafslutning"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Skrivefejl: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Deaktiveret"
+
+#: src/xz/hardware.c:269
+#, 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:270
+msgid "Number of processor threads:"
+msgstr ""
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr ""
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr ""
+
+#: src/xz/hardware.c:273
+#, fuzzy
+#| msgid "Memory usage limit for decompression: "
+msgid "Multi-threaded decompression:"
+msgstr "Grænse for hukommelsesforbug til dekomprimering: "
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr ""
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr ""
+
+#: src/xz/hardware.c:299
+#, fuzzy
+#| msgid "Memory usage limit reached"
+msgid "Memory usage limits:"
+msgstr "Begrænsning på brug af hukommelse er nået"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr ""
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr ""
+
+#: src/xz/list.c:70
+#, fuzzy
+#| msgid " Compressed size: %s\n"
+msgid "Compressed size:"
+msgstr " Komprimeret str.: %s\n"
+
+#: src/xz/list.c:71
+#, fuzzy
+#| msgid " Uncompressed size: %s\n"
+msgid "Uncompressed size:"
+msgstr " Ukomprimeret str.: %s\n"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr ""
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr ""
+
+#: src/xz/list.c:74
+#, fuzzy
+#| msgid " Stream padding: %s\n"
+msgid "Stream Padding:"
+msgstr " Strømfyld: %s\n"
+
+#: src/xz/list.c:75
+#, fuzzy
+#| msgid " Memory needed: %s MiB\n"
+msgid "Memory needed:"
+msgstr " Hukommelse krævet: %s MiB\n"
+
+#: src/xz/list.c:76
+#, fuzzy
+#| msgid " Sizes in headers: %s\n"
+msgid "Sizes in headers:"
+msgstr " Størrelser i teksthoveder: %s\n"
+
+#: src/xz/list.c:79
+#, fuzzy
+#| msgid " Number of files: %s\n"
+msgid "Number of files:"
+msgstr " Antal filer: %s\n"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr ""
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr ""
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr ""
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr ""
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr ""
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr ""
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr ""
+
+#: src/xz/list.c:129
+#, fuzzy
+#| msgid "Totals:"
+msgid "TotalSize"
+msgstr "I alt:"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr ""
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr ""
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr ""
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr ""
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr ""
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr ""
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr ""
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Ukendt-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Ukendt-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Ukendt-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Ukendt-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Ukendt-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Ukendt-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Ukendt-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Ukendt-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Ukendt-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Ukendt-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Ukendt-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Ukendt-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Filen er tom"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr ""
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Ja"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Nej"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "I alt:"
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr ""
+
+#: src/xz/list.c:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list understøtter ikke læsning fra standardind"
+
+#: src/xz/main.c:89
+#, 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:96
+#, 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:120
+#, c-format
+msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
+msgstr ""
+
+#: src/xz/main.c:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Intern fejl (fejl)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Kan ikke etbalere signalhåndteringer"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Ingen integritetkontrol; verificerer ikke filintegritet"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr ""
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Begrænsning på brug af hukommelse er nået"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Filformatet blev ikke genkendt"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Tilvalg er ikke understøttede"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Komprimerede data er ødelagte"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Uventet afslutning på inddata"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Filterkæde: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Prøv »%s --help« for yderligere information."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Obligatoriske argumenter til lange tilvalg er også obligatoriske for korte\n"
+"tilvalg.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Operationstilstand:\n"
+
+#: src/xz/message.c:975
+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 ""
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+"Operationsændrere:\n"
+
+#: src/xz/message.c:984
+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 ""
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+
+#: src/xz/message.c:996
+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 ""
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+
+#: src/xz/message.c:1007
+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 ""
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr ""
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+
+#: src/xz/message.c:1043
+#, 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 ""
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+
+#: src/xz/message.c:1067
+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 ""
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+
+#: src/xz/message.c:1095
+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 ""
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+"Andre tilvalg:\n"
+
+#: src/xz/message.c:1106
+msgid ""
+" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
+" -v, --verbose be verbose; specify twice for even more verbose"
+msgstr ""
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr ""
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot brug beskeder der kan fortolkes maskinelt (nyttigt\n"
+" for skripter)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version vis versionsnummer og afslut"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Rapporter fejl til <%s> (på engelsk eller finsk).\n"
+"Rapporter oversættelsesfejl til <dansk@dansk-gruppen.dk>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s hjemmeside: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "DETTE ER EN UDVIKLINGSVERSION - BRUG IKKE I PRODUKTION."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: 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:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Ugyldigt tilvalgsnavn"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Ugyldigt tilvalgsværdi"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "LZMA1/LZMA2-forhåndskonfiguration er ikke understøttet: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Filnavn har ukendt endelse, udelader"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Filen har allrede endelsen »%s«, udelader."
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Ugyldig filnavnendelse"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Værdi er ikke et positivt decimalheltal"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Ugyldig multiplikatorendelse"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Værdien for tilvalget »%s« skal være i intervallet [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Komprimerede data kan ikke læses fra en terminal"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Komprimerede data kan ikke skrives til en terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Skrivning til standardud mislykkedes"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Ukendt fejl"
+
+#~ 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 "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=%<PRIu32>"
+#~ msgstr "Den valgte matchfinder kræver mindst nice=%<PRIu32>"
diff --git a/po/de.gmo b/po/de.gmo
new file mode 100644
index 0000000..f0f5464
--- /dev/null
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..477905e
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,1065 @@
+# XZ Utils German translation
+# This file is put in the public domain.
+#
+# André Noll <maan@tuebingen.mpg.de>, 2010.
+# Anna Henningsen <sqrt@entless.org>, 2015.
+# Mario Blättermann <mario.blaettermann@gmail.com>, 2019, 2022-2023.
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-19 20:44+0200\n"
+"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
+"Language-Team: German <translation-team-de@lists.sourceforge.net>\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 23.04.3\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Ungültiges Argument für --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Zu viele Argumente für --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Unbekanntes Dateiformat"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Integritätsprüfungstyp nicht unterstützt"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "Die Umgebungsvariable %s enthält zu viele Argumente"
+
+#: src/xz/args.c:691
+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:698
+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:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Kompression von lzip-Dateien (.lz) wird nicht unterstützt"
+
+#: src/xz/args.c:735
+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:115
+msgid "Maximum number of filters is four"
+msgstr "Maximal vier Filter möglich"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Verwendung einer Voreinstellung im Roh-Modus wird nicht empfohlen."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Das .lzma-Format unterstützt nur den LZMA1-Filter"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 kann nicht mit dem .xz-Format verwendet werden"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Diese Filterkette ist inkompatibel zu --flush-timeout"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "Wegen --flush-timeout wird auf den Einzelthread-Modus umgeschaltet"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Bis zu %<PRIu32> Threads werden benutzt."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Filterkette oder Filteroptionen werden nicht unterstützt"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Dekompression wird %s MiB Speicher brauchen."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Fehler beim Erzeugen der Pipeline: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Sandbox konnte nicht aktiviert werden"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Löschen nicht möglich: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Dateieigentümer kann nicht gesetzt werden: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Dateigruppe kann nicht gesetzt werden: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Zugriffsrechte können nicht gesetzt werden: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Ist ein symbolischer Link, wird übersprungen"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Ist ein Verzeichnis, wird übersprungen"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Keine reguläre Datei, wird übersprungen"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Datei hat sticky-Bit gesetzt, wird übersprungen"
+
+#: src/xz/file_io.c:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Leerer Dateiname, wird übersprungen"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Fehler beim Schließen der Datei: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Lesefehler: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Fehler beim Durchsuchen der Datei: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Unerwartetes Ende der Datei"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Schreibfehler: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Deaktiviert"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Gesamtmenge physischer Speicher (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Anzahl der Prozessor-Threads:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Kompression:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Dekompression:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Multithread-Dekompression:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Vorgabe für -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Hardware-Information:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Speicherbedarfsbegrenzung:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Datenströme:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Blöcke:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Größe komprimiert:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Größe unkomprimiert:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Verhältnis:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Prüfung:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Datenstromauffüllung:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Benötigter Speicher:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Größe in Köpfen:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Anzahl Dateien:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Datenstrom"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Block"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Blöcke"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "KompVers"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "UnkompVers"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "KompGröße"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "UnkompGröße"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "Gesamt"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Verhältnis"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Prüfung"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "Prüfwert"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Auffüllung"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Kopf"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Flags"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "SpeichVerb"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Unbek.2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Unbek.3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Unbek.5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Unbek.6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Unbek.7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Unbek.8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Unbek.9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Unbek.11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Unbek.12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Unbek.13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Unbek.14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Unbek.15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Datei ist leer"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr " Str. Blöcke Kompr. Unkompr. Verh. Check Dateiname"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Ja"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Nein"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Minimal erforderliche 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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Gesamt:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list unterstützt kein Lesen aus der Standardeingabe"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Fehler beim Lesen der Dateinamen: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Interner Fehler (Bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Signalroutine kann nicht gesetzt werden"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Speicherbedarfsbegrenzung erreicht"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Dateiformat nicht erkannt"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Optionen nicht unterstützt"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Komprimierte Daten sind beschädigt"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Unerwartetes Ende der Eingabe"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Filterkette: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Versuchen Sie »%s --help« für mehr Informationen."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Aufruf: %s [OPTION]… [DATEI]…\n"
+"Komprimiert oder dekomprimiert .xz-DATEI(EN).\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Obligatorische Argumente für lange Optionen sind auch für kurze Optionen\n"
+"zwingend.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Aktionsmodus:\n"
+
+#: src/xz/message.c:975
+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 Kompression erzwingen\n"
+" -d, --decompress Dekompression erzwingen\n"
+" -t, --test Dateiintegrität überprüfen\n"
+" -l, --list Dateiinformationen anzeigen"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Aktionsmodifikatoren:\n"
+
+#: src/xz/message.c:984
+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 Eingabedateien beibehalten (nicht löschen)\n"
+" -f, --force Überschreiben der Ausgabedatei erzwingen\n"
+" und Links (de)komprimieren\n"
+" -c, --stdout In die Standardausgabe schreiben und die\n"
+" Eingabedateien nicht löschen"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream Nur den ersten Datenstrom dekomprimieren und\n"
+" stillschweigend mögliche weitere Eingabedaten\n"
+" ignorieren"
+
+#: src/xz/message.c:996
+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 Beim Dekomprimieren keine Sparse-Dateien\n"
+" erzeugen\n"
+" -S, --suffix=.END ».END« als Endung für komprimierte Dateien\n"
+" benutzen\n"
+" --files=[DATEI] Zu verarbeitende Dateinamen aus DATEI lesen;\n"
+" falls keine DATEI angegeben wurde, werden \n"
+" Dateinamen aus der Standardeingabe gelesen.\n"
+" Dateinamen müssen durch einen Zeilenumbruch\n"
+" voneinander getrennt werden\n"
+" --files0=[DATEI] Wie --files, aber das Null-Zeichen wird als\n"
+" Trenner benutzt"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Grundlegende Optionen für Dateiformat und Kompression:\n"
+
+#: src/xz/message.c:1007
+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 Dateiformat zur Kodierung oder Dekodierung; mögliche\n"
+" Werte sind »auto« (Voreinstellung), »xz«, »lzma«,\n"
+" »lzip« und »raw«\n"
+" -C, --check=PRÜFUNG Typ der Integritätsprüfung: »none« (Vorsicht),\n"
+" »crc32«, »crc64« (Voreinstellung) oder »sha256«"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr ""
+" --ignore-check Integritätsprüfung beim Dekomprimieren\n"
+" nicht ausführen"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 .. -9 Kompressionseinstellung; Voreinstellung ist 6.\n"
+" Beachten Sie den Speicherbedarf des Kompressors\n"
+" *und* des Dekompressors, wenn Sie 7-9 benutzen!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme Versuchen, durch stärkere CPU-Auslastung das\n"
+" Kompressionsverhältnis zu verbessern. Dies beeinflusst\n"
+" den Speicherbedarf des Dekompressors nicht."
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=ANZAHL Höchstens die angegebene ANZAHL Threads erzeugen;\n"
+" die Voreinstellung ist 1. Wenn der Wert 0 angegeben\n"
+" wird, dann werden so viele Threads erzeugt, wie\n"
+" Prozessorkerne vorhanden sind"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=GRÖẞE\n"
+" Einen neuen .xz-Block nach der angegebenen GRÖẞE\n"
+" der Eingabe in Bytes beginnen; benutzen Sie diese\n"
+" Option, um die Blockgröße für die Kompression mit\n"
+" mehreren Threads zu setzen"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=GRÖẞEN\n"
+" Einen neuen .xz-Block gemäß der angegebenen, durch\n"
+" Kommata getrennten Intervalle an unkomprimierten\n"
+" Daten beginnen"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=ZEIT\n"
+" Wenn beim Komprimieren mehr als die angegebene ZEIT\n"
+" in Millisekunden seit der letzten Leerungsaktion\n"
+" vergangen ist und das Lesen von zusätzlichen\n"
+" Eingabedaten den Prozess blockieren würde, dann werden\n"
+" alle noch ausstehenden Daten geschrieben"
+
+#: src/xz/message.c:1043
+#, 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=BEGRENZUNG\n"
+" --memlimit-decompress=BEGRENZUNG\n"
+" --memlimit-mt-decompress=BEGRENZUNG\n"
+" -M, --memlimit=BEGRENZUNG\n"
+" Speicherbedarfsbegrenzung für Kompression,\n"
+" Dekompression oder beides setzen; die BEGRENZUNG\n"
+" wird in Bytes oder als Prozentsatz RAM angegeben.\n"
+" Geben Sie 0 an, um die Grundeinstellungen zu\n"
+" verwenden."
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust Wenn die Kompressionseinstellungen die\n"
+" Speicherbedarfsbegrenzung übersteigen, wird ein\n"
+" Fehler ausgegeben, statt die Einstellungen\n"
+" nach unten anzupassen."
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Benutzerdefinierte Filterkette für Kompression (alternativ zu Voreinstellung):"
+
+#: src/xz/message.c:1067
+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[=OPTIONEN] LZMA1 oder LZMA2; OPTIONEN ist eine durch Kommata\n"
+" --lzma2[=OPTIONEN] getrennte Liste bestehend aus den folgenden Optionen\n"
+" (zulässige Werte; Voreinstellung):\n"
+" preset=ZAHL Optionen auf Voreinstellungsstufe\n"
+" zurücksetzen (0-9[e])\n"
+" dict=ZAHL Wörterbuchgröße (4 KiB - 1536 MiB; 8 MiB)\n"
+" lc=ZAHL Anzahl der Literal-Kontext-Bits (0-4; 3)\n"
+" lp=ZAHL Anzahl der Literal-Positions-Bits (0-4; 0)\n"
+" pb=ZAHL Anzahl der Positions-Bits (0-4; 2)\n"
+" mode=MODUS Kompressionsmodus (fast, normal; normal)\n"
+" nice=ZAHL Nice-Länge eines Treffers (2-273; 64)\n"
+" mf=NAME Algorithmus zum Auffinden von\n"
+" Übereinstimmungen (hc3, hc4, bt2, bt3, bt4;\n"
+" bt4)\n"
+" depth=ZAHL Maximale Suchtiefe; 0=automatisch\n"
+" (Voreinstellung)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPTIONEN] x86 BCJ-Filter (32-bit und 64-bit)\n"
+" --arm[=OPTIONEN] ARM-BCJ-Filter\n"
+" --armthumb[=OPTIONEN] ARM-Thumb-BCJ-Filter\n"
+" --arm64[=OPTIONEN] ARM64-BCJ-Filter\n"
+" --powerpc[=OPTIONEN] PowerPC-BCJ-Filter (nur Big Endian)\n"
+" --ia64[=OPTIONEN] IA64-(Itanium-)BCJ-Filter\n"
+" --sparc[=OPTIONEN] SPARC-BCJ-Filter\n"
+" Zulässige Optionen für alle BCJ-Filter:\n"
+" start=ZAHL Startversatz für Konversion\n"
+" (Voreinstellung=0)"
+
+#: src/xz/message.c:1095
+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[=OPTIONEN] Delta-Filter; zulässige Optionen (gültige Werte;\n"
+" Voreinstellung):\n"
+" dist=NUM Abstand zwischen den Bytes, die voneinander\n"
+" subtrahiert werden (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Andere Optionen:\n"
+
+#: src/xz/message.c:1106
+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 Warnungen unterdrücken; wird diese Option zweimal\n"
+" angegeben, werden auch Fehlermeldungen unterdrückt\n"
+" -v, --verbose Ausführlicher Modus; wird diese Option zweimal\n"
+" angegeben, erfolgen noch ausführlichere Ausgaben"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn Warnungen verändern nicht den Exit-Status"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot Maschinenlesbare Meldungen ausgeben (nützlich für\n"
+" Skripte)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory Gesamtspeicher (RAM) sowie die gegenwärtig aktive\n"
+" Speicherbedarfsbegrenzung anzeigen\n"
+" und das Programm beenden"
+
+#: src/xz/message.c:1119
+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 Kurze Hilfe anzeigen (zeigt nur die grundlegenden\n"
+" Optionen)\n"
+" -H, --long-help Diese lange Hilfe anzeigen und das Programm beenden"
+
+#: src/xz/message.c:1123
+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 Diese kurze Hilfe anzeigen und das Programm beenden\n"
+" -H, --long-help Die lange Hilfe (und damit auch fortgeschrittene\n"
+" Optionen) anzeigen"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version Versionsnummer anzeigen und beenden"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Wenn DATEI nicht angegeben wurde oder DATEI gleich - ist, dann wird aus\n"
+"der Standardeingabe gelesen.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Melden Sie Fehler an <%s> (auf Englisch oder Finnisch).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s-Homepage: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "DIES IST EINE NICHT FÜR DEN PRODUKTIVBETRIEB GEEIGNETE ENTWICKLERVERSION."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Optionen müssen in der Form »Name=Wert« gegeben werden, getrennt durch Kommata"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Ungültiger Optionsname"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Ungültiger Optionswert"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "LZMA1/LZMA2-Voreinstellung wird nicht unterstützt: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Dateiname hat unbekanntes Suffix, wird übersprungen"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Datei hat bereits das Suffix »%s«, wird übersprungen"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Ungültige Dateiendung"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Wert ist keine nicht-negative dezimale Ganzzahl"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Ungültige Einheit"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Wert der Option »%s« muss im Bereich [%<PRIu64>, %<PRIu64>] sein"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Komprimierte Daten können nicht vom Terminal gelesen werden"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Komprimierte Daten können nicht auf das Terminal geschrieben werden"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Schreiben in die Standardausgabe fehlgeschlagen"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Unbekannter Fehler"
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644
index 0000000..506ca9e
--- /dev/null
+++ b/po/en@boldquot.header
@@ -0,0 +1,25 @@
+# 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/po/en@quot.header b/po/en@quot.header
new file mode 100644
index 0000000..6522f0c
--- /dev/null
+++ b/po/en@quot.header
@@ -0,0 +1,22 @@
+# 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/po/eo.gmo b/po/eo.gmo
new file mode 100644
index 0000000..2948f08
--- /dev/null
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
new file mode 100644
index 0000000..23a1b01
--- /dev/null
+++ b/po/eo.po
@@ -0,0 +1,1038 @@
+# Esperanto translations for xz package.
+# This file is put in the public domain.
+# Keith Bowes <zooplah@gmail.com>, 2019, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-08-26 11:30-0400\n"
+"Last-Translator: Keith Bowes <zooplah@gmail.com>\n"
+"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Nevalida parametro por --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Tro da argumentoj por --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Nekonata dosierformata tipo"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Nekomprenata tipo de integra kontrolo"
+
+#: src/xz/args.c:518
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "Nur oni 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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "La medivariablo %s enhavas troajn argumentojn"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Rego de kunpremado estas malaktivigita dum muntotempo"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Rego de malkunpremado estas malaktivigita dum muntotempo"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Ne povas kunpremi lzip-dosierojn (.lz)"
+
+#: src/xz/args.c:735
+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:115
+msgid "Maximum number of filters is four"
+msgstr "Maksimuma nombra da filtriloj estas kvar"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Uzi aprioraĵon en kruda reĝimo estas malkonsilinda."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "La .lzma-formato komprenas sole la filtrilon LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA ne estas uzebla por la .xz-formato"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "La filtrila ĉeno estas nekongrua kun --flush-timeout"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "Ŝanĝas al unufadena reĝimo pro --flush-timeout"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Uzas ĝis %<PRIu32> fadenoj"
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Nekomprenata filtrila ĉeno aŭ filtrilaj elektoj"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Malkunpremado postulos %s megabajtojn da memoro."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Eraro dum krei dukton: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Malsukcesis aktivigi la sablujon"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Ne eblas forigi: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Ne eblas agordi la dosieran estron: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Ne eblas agordi la dosieran grupon: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Ne eblas agordi la dosierajn atingopermesojn: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Estas simbola ligilo, preterpasas"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Estas dosierujo, preterpasas"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Ne regula dosiero, preterpasas"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Dosiero havas glueman biton, preterpasas"
+
+#: src/xz/file_io.c:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Malplena dosiero, preterpasas"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Fermo de la dosiero malsukcesis: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Legeraro: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Eraro dum serĉi la dosieron: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Neatendita dosierfino"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Skriberaro: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Malaktiva"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Kiomo da efektiva memoro (ĉefmemoro)"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Nombro da procesoraj fadenoj:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Kunpremo:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Malkunmpreno:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Plurfadena malkunpremado:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Aprioraĵo por -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Aparataro-informoj:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Memoruzada limigoj:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Fluoj:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Blokoj:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Kunpremita grando:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Nekunpremita grando:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Proporcio:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Kontrolo:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Fluo-remburo:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Memoro postulata:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Grandoj en ĉapoj:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Nombro da dosieroj:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Fluo"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Bloko"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Blokoj"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "KunpMsam"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "MKunMSam"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "Kunpgrando"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "Mkunpgrando"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "KiomGrando"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Proporcio"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Kontrolo"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "KontVal"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Remburo"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Ĉapo"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Flago"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "Memuzado"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Nekonata-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Nekonata-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Nekonata-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Nekonata-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Nekonata-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Nekonata-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Nekonata-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Nekonata-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Nekonata-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Nekonata-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Nekonata-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Nekonata-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Dosiero malplenas"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Fluoj Blokoj Kunpremita Nekunpremita Propor Kontrol Dosiernomo"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Jes"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Ne"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Sumoj:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list ne regas legadon el la ĉefenigujo"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Eraro dum legi dosiernomojn: %s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s: Neatendita fino de enigo dum legi dosiernomojn"
+
+#: src/xz/main.c:120
+#, 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:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "Kunpremo kaj malkunmpremo per --robot ankoraŭ ne estas regataj."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Interna programeraro"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Ne eblas establi signalajn traktilojn"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Neniu integra kontrolo; ne certigos dosieran integron"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Nekomprenata tipo de integra kontrolo; ne certigos dosieran integron"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Memoruzada limigo atingita"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Dosierformato ne rekonata"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Nekomprenataj elektoj"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Kunpremitaj datumoj estas koruptaj"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Neatendita fino de enigo"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Filtrila ĉeno: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "`%s --help' provindas por pliaj informaj."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Uzado: %s [ELEKTO].. [DOSIERO]...\n"
+"Kunpremi aŭ malkunpremi DOSIEROjN laŭ la .xz-formato.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Devigitaj parametroj por longaj elektoj estas ankaŭ devigitaj por\n"
+"mallongaj elektoj.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Operacia reĝimo:\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Operacia modifiloj:\n"
+
+#: src/xz/message.c:984
+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"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream\n"
+" malkunpremi nur la unuan fluon kaj silente\n"
+" ignori eventualajn ceterajn enigajn datumojn"
+
+#: src/xz/message.c:996
+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\n"
+" -S, --suffix=.SUF uzi la sufikson `.SUF' ĉe kunpremataj dosieroj\n"
+" --files[=DOSIERO]\n"
+" legi dosiernomojn traktotajn de DOSIERO; se DOSIERO estas\n"
+" forlasita, dosieroj estas legotaj el la ĉefenigujo;\n"
+" dosiernomojn devas finigi novlinio signo\n"
+" --files0[=DOSIERO]\n"
+" kiel --files sed uzi la nulan signon por finigi"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Bazaj dosierformataj kaj kunpremaj elektoj:\n"
+
+#: src/xz/message.c:1007
+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 dosierformato kodota aŭ malkodato; 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'"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check ne certigi la integran kontrolon dum malkunpremo"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" 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!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" 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"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NOMBRO\n"
+" uzi maksimume NOMBRO da fadenoj; apriore 1; 0 por\n"
+" uzi fadenojn samnombrajn kiel procesoraj kernoj"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=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:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=GRANDOJ\n"
+" komenci novan .xz-blokon post la donitajn intertempojn de\n"
+" nekunpremitaj datumoj, apartigataj de komoj"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=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:1043
+#, 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"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" 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"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Propra filtrila ĉeno por kunpremo (alternativaj por uzi antaŭagordaĵon):"
+
+#: src/xz/message.c:1067
+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)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=ELEKTOJ] x86-BCJ-filtrilo (32-bita and 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"
+" Validaj ELEKTOJ por ĉiuj BCJ-filters:\n"
+" start=NOMBRO komenca deŝovo por konvertoj (apriore 0)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Aliaj elektoj:\n"
+
+#: src/xz/message.c:1106
+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"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn avertoj ne influu la eliran staton"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot uzi mesaĝojn facile analizeblaj per skriptoj"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" 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"
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version montri la eldonan numeron kaj finiĝi"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Raporti programerarojn al <%s> (en la angla aŭ la suoma).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s ĉefpaĝo: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "ĈI TIU ESTAS DISVOLVA REDAKCIO, NE CELATA POR ĈIUTAGA UZADO."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: 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:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Nevalida elekto-nomo"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Nevalida elekto-valoro"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Nevalida LZMA1/LZMA2 antaŭagordaĵo: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Dosiernomo havas nekonatan sufikson, preterpasas"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Dosiero jam havas la sufikson `%s', preterpasas"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Nevalida dosiernoma sufikso"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Valoro ne estas nenegativa dekuma entjero"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Nevalida multiplika sufikso"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Valoro de la elekto `%s' devas esti inkluzive inter %<PRIu64> kaj %<PRIu64>"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Kunpremitaj datumoj ne povas esti ligataj de terminalo"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Kunpmremitaj datumoj ne povas esti skribataj al terminalo"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Skribi al la ĉefeligujo malsukcesis"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Nekonata eraro"
diff --git a/po/es.gmo b/po/es.gmo
new file mode 100644
index 0000000..e8eeddb
--- /dev/null
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..41d2c09
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,1082 @@
+# Spanish translation for xz-5.4.4-pre1.
+# This file is put in the public domain.
+# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2022, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-19 11:31-0600\n"
+"Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n"
+"Language-Team: Spanish <es@tp.org.es>\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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Argumento inválido para --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Demasiados argumentos para --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Tipo de formato de fichero desconocido"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: No se admite el tipo de verificación de integridad"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "La variable de ambiente %s contiene demasiados argumentos"
+
+#: src/xz/args.c:691
+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:698
+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:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "No se admite la compresión de ficheros lzip (.lz)"
+
+#: src/xz/args.c:735
+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:115
+msgid "Maximum number of filters is four"
+msgstr "El número máximo de filtros es cuatro"
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "El límite de uso de memoria es muy bajo para la configuración de filtro dada."
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "No se recomienda un modo predeterminado en modo crudo."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "El formato .lzma solamente admite el filtro LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "No se puede usar LZMA1 con el formato .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "La cadena de filtros es incompatible con --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Se usan hasta %<PRIu32> hilos."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "No se admite las opciones de cadena de filtros o de filtro"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "La descompresión necesitará %s MiB de memoria."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Error al crear una tubería: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Falló al activar el arenero"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: No se puede borrar: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, 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:426
+#, 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:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Es un enlace simbólico, se salta"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Es un directorio, se salta"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: No es un fichero regular, se salta"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Nombre de fichero vacío, se salta"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Falló al cerrar el fichero: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Error de lectura: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Error al buscar en el fichero: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Fin de fichero inesperado"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Error de escritura: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Desactivado"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Cantidad total de memoria física (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Número de hilos de procesador:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Compresión"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Descompresión:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Descompresión multihilos:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Por omisión para -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Información de hardware:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Límites de uso de memoria:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Flujos:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Bloques:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Tamaño comprimido:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Tamaño sin comprimir:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Tasa:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Verificación:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Relleno de flujo:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Memoria requerida:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Tamaños en cabeceras:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Número de ficheros:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Flujo"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Bloque"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Bloques"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "DesplComp"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "DesplDescomp"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "TamComp"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "TamDescomp"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "TamTotal"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Tasa"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Verif"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "ValVerif"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Relleno"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Cabecera"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Opciones"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "UsoMem"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Descon-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Descon-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Descon-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Descon-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Descon-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Descon-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Descon-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Descon-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Descon-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Descon-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Descon-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Descon-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: El fichero está vacío"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Flujos Bloques Comprimido Sin-Comprimir Relac Verif Nombre-Fichero"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Sí"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "No"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Versión de herramientas XZ mínima: %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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Totales:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list no admite leer de la entrada estándar"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Error al leer nombres de fichero: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Error interno (bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "No se pueden establecer los manejadores de señales"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Se alcanzó el límite de uso de memoria"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "No se reconoce el formato del fichero"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Opciones sin soporte"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Los datos comprimidos están corruptos"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Fin de entrada inesperado"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Cadena de filtro: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Intente `%s --help' para obtener más información."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Modo de empleo: %s [OPCIÓN]... [FICHERO]...\n"
+"Comprime o descomprime FICHEROs en el formato .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Los argumentos obligatorios para las opciones largas también son\n"
+"obligatorios para las opciones cortas.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Modo de operación:\n"
+
+#: src/xz/message.c:975
+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 fuerza la compresión\n"
+" -d, --decompress fuerza la descompresión\n"
+" -t, --test prueba la integridad del fichero comprimido\n"
+" -l, --list lista la información sobre los ficheros .xz"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modificadores de operación:\n"
+
+#: src/xz/message.c:984
+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 conserva (no borra) los ficheros de entrada\n"
+" -f, --force fuerza la sobreescritura del fichero de salida y\n"
+" (des)comprime enlaces\n"
+" -c, --stdout escribe a la entrada estándar y no borra los ficheros\n"
+" de entrada"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream solo descomprime el primer flujo, y descarta\n"
+" silenciosamente los posibles datos de entrada restantes"
+
+#: src/xz/message.c:996
+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 crea archivos dispersos durante la descompresión\n"
+" -S, --suffix=.SUF usa el sufijo `.SUF' en los ficheros comprimidos\n"
+" --files[=FICH] lee los nombres de ficheros a procesar de FICHero;\n"
+" si se omite el FICHero, los nombres de fichero se leen\n"
+" de la entrada estándar; los nombres de fichero deben\n"
+" terminar con el carácter de línea nueva\n"
+" --files0[=FICH] como --files pero usa el carácter nulo como terminador"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Opciones básicas de compresión y formato de fichero:\n"
+
+#: src/xz/message.c:1007
+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 fichero para codificar o decodificar; los\n"
+" valores posibles son\n"
+" `auto' (por defecto), `xz', `lzma', `lzip', y `raw'\n"
+" -C, --check=VERIF tipo de verificación de integridad:\n"
+" `none' (usar con precaución),\n"
+" `crc32', `crc64' (por defecto), o `sha256'"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check no hace la verificación de integridad al descomprimir"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 valor predefinido de compresión; por defecto es 6.\n"
+" ¡Considere el uso de memoria del compresor *y*\n"
+" del descompresor antes de usar 7-9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme trata de mejorar la razón de compresión usando más\n"
+" tiempo de procesamiento; no afecta los requisitos\n"
+" de memoria del descompresor"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NÚM usa como máximo NÚM hilos; por defecto es 1;\n"
+" establezca a 0 para usar tantos hilos como hayan\n"
+" núcleos de procesador"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=TAMAÑO\n"
+" inicia un nuevo bloque .xz después de cada TAMAÑO bytes\n"
+" de entrada; use esta opción para establecer el tamaño\n"
+" de bloque para la compresión con hilos"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=TAMAÑOS\n"
+" inicia un nuevo bloque .xz después de cada intervalo\n"
+" dado, separado por comas, de datos sin comprimir"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=TIEMPO\n"
+" al comprimir, si pasaron más de TIEMPO milisegundos\n"
+" desde el último descarte y la lectura de más entrada\n"
+" produciría un bloqueo, todos los datos pendientes son\n"
+" descartados"
+
+#: src/xz/message.c:1043
+#, 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ÍMITE\n"
+" --memlimit-decompress=LÍMITE\n"
+" --memlimit-mt-decompress=LÍMITE\n"
+" -M, --memlimit=LÍMITE\n"
+" define el límite de uso de memoria para compresión,\n"
+" descompresión, descompresión con hilos, o todos los\n"
+" anteriores; el LÍMITE está en bytes, % de RAM,\n"
+" o 0 para valores por defecto"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust si la configuración de compresión excede el límite de\n"
+" uso de memoria, muestra un error en lugar de ajustar\n"
+" los valores hacia abajo"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Cadena de filtros para compresión (alternativa a valores predefinidos):"
+
+#: src/xz/message.c:1067
+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[=OPCIONES] LZMA1 o LZMA2; OPCIONES es una lista separada por comas\n"
+" --lzma2[=OPCIONES] de cero o más opciones (valores válidos; por defecto)\n"
+" preset=PRE inicia opciones con un valor predefinido\n"
+" (0-9[e])\n"
+" dict=NÚM tamaño de diccionario (4KiB - 1536MiB; 8MiB)\n"
+" lc=NÚM número de bits de contexto literal (0-4; 3)\n"
+" lp=NÚM número de bits de posición literal (0-4; 0)\n"
+" pb=NÚM número de bits de posición (0-4; 2)\n"
+" mode=MODO modo de compresión (fast, normal; normal)\n"
+" nice=NÚM longitud para una coincidencia (2-273; 64)\n"
+" mf=NOMBRE buscador de coincidencias\n"
+" (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+" depth=NÚM profundidad máxima de búsqueda;\n"
+" 0=automática (por defecto)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPCIONES] filtro BCJ para x86 (32-bit y 64-bit)\n"
+" --arm[=OPCIONES] filtro BCJ para ARM\n"
+" --armthumb[=OPCIONES] filtro BCJ para ARM-Thumb\n"
+" --arm64[=OPCIONES] filtro BCJ para ARM64\n"
+" --powerpc[=OPCIONES] filtro BCJ para PowerPC (solo big endian)\n"
+" --ia64[=OPCIONES] filtro BCJ para IA-64 (Itanium)\n"
+" --sparc[=OPCIONES] filtro BCJ para SPARC\n"
+" OPCIONES válidas para todos los filtros BCJ:\n"
+" start=NÚM inicio de desplazamiento para\n"
+" conversiones (por defecto=0)"
+
+#: src/xz/message.c:1095
+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[=OPCIONES] Filtro delta; OPCIONES (valores válidos; por defecto):\n"
+" dist=NÚM distancia entre bytes que se restan\n"
+" uno del otro (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Otras opciones:\n"
+
+#: src/xz/message.c:1106
+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 dos veces para suprimir errores\n"
+" -v, --verbose detallado; use dos veces para obtener aún más detalle"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn los avisos no afectan el estado de la salida"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot usa mensajes analizables por máquina (útil para scripts)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory muestra la cantidad total de RAM y los límites de uso\n"
+" de memoria activos, y termina"
+
+#: src/xz/message.c:1119
+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 muestra la ayuda corta (solo muestra las opciones básicas)\n"
+" -H, --long-help muestra esta ayuda detallada y termina"
+
+#: src/xz/message.c:1123
+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 muestra esta ayuda corta y termina\n"
+" -H, --long-help muestra la ayuda larga (además muestra opciones avanzadas)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version muestra el número de versión y termina"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Sin FICHEROs, o cuando el FICHERO es -, lee la entrada estándar.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Reporte errores a <%s> (en inglés o finlandés).\n"
+"Reporte errores de traducción al español a <es@tp.org.es>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Sitio web de %s: <%s>\n"
+
+#: src/xz/message.c:1142
+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."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Las opciones deben ser pares `nombre=valor' separadas por comas"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Nombre de opción inválido"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Valor de opción inválido"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "No se admite el valor predefinido LZMA1/LZMA2: %s"
+
+#: src/xz/options.c:356
+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:160
+#, 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:181
+#, 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:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Sufijo de nombre de fichero inválido"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: El valor no es un entero decimal no-negativo"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Sufijo multiplicador inválido"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "El valor de la opción `%s' debe estar en el rango [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "No se pueden leer datos comprimidos de una terminal"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "No se pueden escribir datos comprimidos a una terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Falló la escritura a la salida estándar"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Error desconocido"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "El buscador de coincidencias seleccionado requiere por lo menos nice=%<PRIu32>"
+
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Límite de uso de memoria para compresión: "
+
+#~ msgid " Streams: %s\n"
+#~ msgstr " Flujos: %s\n"
+
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Bloques: %s\n"
+
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Relación: %s\n"
+
+#~ msgid " Check: %s\n"
+#~ msgstr " Verificación: %s\n"
+
+#~ msgid ""
+#~ " Streams:\n"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+#~ msgstr ""
+#~ " Flujos:\n"
+#~ " Flujo Bloques DesplComp DesplUncomp TamComp TamDescomp Razon Verif Relleno"
+
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Bloques:\n"
+#~ " Flujo Bloque DesplComp DesplUncomp TamTotal TamDescomp Razon Verif"
+
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " VerifVal %*s Cabece Opciones TamComp UsoMem Filtros"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Se desactiva el arenero debido a argumentos incompatibles en la línea de órdenes"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Se activó el arenero con éxito"
diff --git a/po/fi.gmo b/po/fi.gmo
new file mode 100644
index 0000000..a0f43b7
--- /dev/null
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 0000000..789f7a0
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,1072 @@
+# Finnish translations for xz package
+# Suomenkielinen käännös xz-paketille.
+# This file is put in the public domain.
+# Lauri Nurmi <lanurmi@iki.fi>, 2019, 2020, 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.0-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2022-11-10 16:17+0200\n"
+"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
+"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
+"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.2\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Virheellinen argumentti valitsimelle --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Liian monta argumenttia valitsimelle --block-list"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0:aa voi käyttää vain viimeisenä alkiona valitsimen --block-list kanssa"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Tuntematon tiedostomuototyyppi"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Eheystarkistuksen tyyppiä ei tueta"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "Ympäristömuuttuja %s sisältää liian monta argumenttia"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Tiivistämistuki on poistettu käytöstä käännösaikana"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Purkutuki on poistettu käytöstä käännösaikana"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Lzip-tiedostojen (.lz) pakkaamista ei tueta"
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: --format=raw vaatii, että --suffix=.PÄÄTE on annettu, ellei kirjoiteta vakiotulosteeseen"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Suodattimien enimmäismäärä on neljä"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Esiasetusten käyttö raw-tilassa ei ole suositeltavaa."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr ".lzma-muoto tukee vain LZMA1-suodinta"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1:tä ei voi käyttää .xz-muodon kanssa"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Suodinketju on yhteensopimaton valitsimen --flush-timeout kanssa"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "Vaihdetaan yksisäikeiseen tilaan valitsimen --flush-timeout vuoksi"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Käytetään enintään %<PRIu32> säiettä."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Ei-tuettu suodinketju tai suotimen asetukset"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Purkaminen vaatii %s MiB muistia."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Virhe putkea luodessa: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Hiekkalaatikon ottaminen käyttöön epäonnistui"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Ei voi poistaa: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Tiedoston omistajaa ei voi asettaa: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Tiedoston ryhmää ei voi asettaa: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Tiedoston oikeuksia ei voi asettaa: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: On symbolinen linkki, ohitetaan"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: On hakemisto, ohitetaan"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Ei ole tavallinen tiedosto, ohitetaan"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Tiedostolla on sticky-bitti, ohitetaan"
+
+#: src/xz/file_io.c:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Tyhjä tiedostonimi, ohitetaan"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "Virhe tilalippujen palauttamisessa vakiosyötteelle: %s"
+
+#: src/xz/file_io.c:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Tiedoston sulkeminen epäonnistui: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Lukuvirhe: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Virhe tiedostossa siirtymisessä: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Odottamaton tiedoston loppu"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Kirjoitusvirhe: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Pois käytöstä"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Fyysisen muistin kokonaismäärä (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Suoritinsäikeiden määrä:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Tiivistys:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Purku:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Monisäikeinen purku:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "-T0:n oletusarvo:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Laitteiston tiedot:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Muistinkäytön rajat:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Virrat:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Lohkot:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Tiivistetty koko:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Tiivistämätön koko:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Suhde:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Tarkistus:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Virran tasaus:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Tarvittava muisti:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Koot otsakkeissa:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Tiedostojen määrä:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Virta"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Lohko"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Lohkot"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "TiivSiirr."
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "Tv:tönSiirr."
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "TiivKoko"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "Tv:tönKoko"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "Yht.Koko"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Suhde"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Tark."
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "Tark.arvo"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Tasaus"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Otsake"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Liput"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "Muist.käyt."
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Tuntematon-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Tuntematon-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Tuntematon-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Tuntematon-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Tuntematon-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Tuntematon-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Tuntematon-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Tuntematon-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Tuntematon-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Tuntematon-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Tuntematon-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Tuntematon-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Tiedosto on tyhjä"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Virrat Lohkot Tiivist. Tiivistämätön Suhde Tark. Tiedostonimi"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Kyllä"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Ei"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " XZ Utilsin vähimmäisversio: %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Yhteensä:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list ei tue lukemista vakiosyötteestä"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Virhe luettaessa tiedostonimiä: %s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s: Odottamaton syötteen loppu tiedostonimiä luettaessa"
+
+#: src/xz/main.c:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Sisäinen virhe (ohjelmistovika)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Signaalinkäsittelimiä ei voi muodostaa"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Ei eheystarkastusta; ei varmenneta tiedoston eheyttä"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Ei-tuettu eheystarkastuksen tyyppi; ei varmenneta tiedoston eheyttä"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Muistinkäytön raja saavutettu"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Tiedostomuotoa ei tunnistettu"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Ei-tuetut valitsimet"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Tiivistetty data on turmeltunut"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Odottamaton syötteen loppu"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB muistia vaaditaan. Rajoitin on poistettu käytöstä."
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "%s MiB muistia vaaditaan. Raja on %s."
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Suodinketju: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Komento ”%s --help” antaa lisää tietoa."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Käyttö: %s [VALITSIN]... [TIEDOSTO]...\n"
+"Tiivistä tai pura .xz-muotoisia TIEDOSTOja.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Pitkien valitsinten pakolliset argumentit ovat pakollisia myös lyhyille.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Toimintatila:\n"
+
+#: src/xz/message.c:975
+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 pakota tiivistys\n"
+" -d, --decompress pakota purku\n"
+" -t, --test testaa tiivistetyn tiedoston eheys\n"
+" -l, --list näytä tietoja .xz-tiedostoista"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Toimintomääreet:\n"
+
+#: src/xz/message.c:984
+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 säilytä (poistamatta) syötetiedostot\n"
+" -f, --force pakota tulostiedostojen ylikirjoitus ja pura/tiivistä\n"
+" linkit\n"
+" -c, --stdout kirjoita vakiotulosteeseen äläkä poista syötetiedostoja"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream pura vain ensimmäinen virta, ja ohita\n"
+" hiljaisesti mahdollinen jäljellä oleva syötedata"
+
+#: src/xz/message.c:996
+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 älä luo hajanaisia tiedostoja purettaessa\n"
+" -S, --suffix=.PÄÄTE käytä ”.PÄÄTE”-päätettä tiivistetyille tiedostoille\n"
+" --files[=TIED] lue käsiteltävät tiedostonimet TIEDostosta; jos TIED\n"
+" jätetään antamatta, tiedostonimet luetaan vakiosyötteestä;\n"
+" tiedostonimet on päätettävä rivinvaihtomerkillä\n"
+" --files0[=TIED] kuten --files mutta käytä päättämiseen nul-merkkiä"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Tiedostomuodon ja tiivistyksen perusvalitsimet:\n"
+
+#: src/xz/message.c:1007
+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=MUOTO tuotettava tai luettava tiedostomuoto; vaihtoehdot\n"
+" ovat ”auto” (oletus), ”xz”, ”lzma”, ”lzip” ja ”raw”\n"
+" -C, --check=CHECK eheystarkastuksen tyyppi: ”none” (käytä varoen),\n"
+" ”crc32”, ”crc64” (oletus) tai ”sha256”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check älä suorita eheystarkastusta purettaessa"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 tiivistyksen esiasetus; oletus on 6; ota tiivistyksen\n"
+" *ja* purun muistinkäyttö huomioon ennen kuin käytät\n"
+" arvoja 7–9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme yritä parantaa tiivistyssuhdetta käyttämällä enemmän\n"
+" suoritinaikaa; ei vaikuta purkimen muistivaatimuksiin"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=MÄÄRÄ käytä enintää MÄÄRÄä säiettä; oletus on 1; asettamalla\n"
+" 0:ksi käytetään suoritinytimien määrän verran säikeitä"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=KOKO\n"
+" aloita uusi .xz-lohko aina KOKO syötetavun jälkeen; käytä\n"
+" tätä säikeistetyn tiivistyksen lohkokoon asettamiseen"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=KOOT\n"
+" aloita uusi .xz-lohko kun tiivistämätöntä dataa on\n"
+" käsitelty pilkuilla erotellut tavumäärät"
+
+# FIXME: tarvitaan kiva suomenkielinen termi block-verbille tässä merkityksessä
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=AIKAKATKAISU\n"
+" jos tiivistettäessä on kulunut yli AIKAKATKAISU ms\n"
+" edellisestä huuhtomisesta ja syötteen lukemisen\n"
+" jatkaminen pysähtyisi, kaikki odottava data huuhdellaan"
+
+#: src/xz/message.c:1043
+#, 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=RAJA\n"
+" --memlimit-decompress=RAJA\n"
+" -M, --memlimit=RAJA\n"
+" aseta muistinkäytön raja tiivistykselle, purkamiselle,\n"
+" säikeistetylle purkamisella tai näille kaikille; RAJA\n"
+" on tavuja, %-osuus RAMista tai 0 oletusarvoille"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust jos tiivistysasetukset ylittävät muistinkäytön rajan,\n"
+" anna virhe äläkä pudota asetuksia alaspäin"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Mukautettu suodinketju tiivistykselle (vaihtoehto esiasetuksille):"
+
+#: src/xz/message.c:1067
+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[=ASET] LZMA1 tai LZMA2; ASETukset ovat yksi tai useampi\n"
+" --lzma2[=ASET] seuraavista asetuksista pilkuilla eroteltuina\n"
+" (kelvolliset arvot; oletus):\n"
+" preset=ESI palauta asetukset esiasetukseen (0-9[e])\n"
+" dict=LUKU sanaston koko (4KiB – 1536MiB; 8MiB)\n"
+" lc=LUKU literal context -bittien määrä (0-4; 3)\n"
+" lp=LUKU literal position -bittien määrä (0-4; 0)\n"
+" pb=LUKU position -bittien määrä (0-4; 2)\n"
+" mode=TILA tiivistystila (fast, normal; normal)\n"
+" nice=LUKU täsmäävyyden nice-pituus (2–273; 64)\n"
+" mf=NIMI täsmäävyydenetsin (hc3, hc4, bt2, bt3,\n"
+" bt4; bt4)\n"
+" depth=LUKU enimmäishakusyvyys; 0=automaattinen (oletus)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=ASET] x86:n BCJ-suodin (32- ja 64-bittiset)\n"
+" --arm[=ASET] ARMin BCJ-suodin\n"
+" --armthumb[=ASET] ARM-Thumbin BCJ-suodin\n"
+" --arm64[=ASET] ARM64:n BCJ-suodin\n"
+" --powerpc[=ASET] PowerPC:n BCJ-suodin (vain big endian)\n"
+" --ia64[=ASET] IA-64:n (Itanium) BCJ-suodin\n"
+" --sparc[=ASET] SPARCin BCJ-suodin\n"
+" Kelvolliset ASETukset kaikille BCJ-suotimille:\n"
+" start=LUKU muunnoksien aloitussiirtymä (oletus=0)"
+
+#: src/xz/message.c:1095
+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[=ASET] Muutossuodin; kelvolliset ASETukset (kelv. arvot; oletus):\n"
+" dist=LUKU toisistaan vähennettävien tavujen\n"
+" välinen etäisyys (1–256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Muut valitsimet:\n"
+
+#: src/xz/message.c:1106
+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 vaienna varoitukset; kahdesti antamalla myös virheet\n"
+" -v, --verbose ole lavea; kahdesti antamalla vieläkin laveampi"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn älkööt varoitukset vaikuttako paluuarvoon"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot käytä koneluettavia viestejä (sopii skripteihin)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory näytä RAM-muistin kokonaismäärä ja parhaillaan\n"
+" vallitsevat muistinkäytön rajat, ja poistu"
+
+#: src/xz/message.c:1119
+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äytä lyhyt ohje (kertoo vain perusvalitsimet)\n"
+" -H, --long-help näytä tämä pitkä ohje ja poistu"
+
+#: src/xz/message.c:1123
+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äytä tämä lyhyt ohje ja poistu\n"
+" -H, --long-help näytä pitkä ohje (kertoo myös lisävalitsimet)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version näytä versionumero ja poistu"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Jos TIEDOSTOa ei ole annettu, tai se on ”-”, luetaan vakiosyötettä.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Ilmoita ohjelmistovioista (suomeksi) osoitteeseen <%s>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s -kotisivu: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "TÄMÄ ON KEHITYSVERSIO, JOTA EI OLE TARKOITETTU TUOTANTOKÄYTTÖÖN."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Asetusten on oltava pilkuilla eroteltuja ”nimi=arvo” -pareja"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Virheellinen asetuksen nimi"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Virheellinen asetuksen arvo"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Ei-tuettu LZMA1/LZMA2-esiasetus: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Tiedostonimen pääte on tuntematon, ohitetaan"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Tiedostolla on jo ”%s”-pääte, ohitetaan"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Virheellinen tiedostonimen pääte"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Arvo ei ole ei ole epänegatiivinen kymmenkantainen kokonaisluku"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Tuntematon kerroin"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Valitsimen ”%s” arvon on oltava välillä [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Tiivistettyä dataa ei voi lukea päätteestä"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Tiivistettyä dataa ei voi kirjoittaa päätteeseen"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Vakiotulosteeseen kirjoitus epäonnistui"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Tuntematon virhe"
+
+#, c-format
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "Valittu täsmäävyydenetsin vaatii vähintään nice-arvon=%<PRIu32>"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Hiekkalaatikko on poistettu käytöstä yhteensopimattomien komentoriviargumenttien vuoksi"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Hiekkalaatikko otettiin onnistuneesti käyttöön"
+
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Muistinkäytön raja tiivistykselle: "
+
+#~ msgid " Streams: %s\n"
+#~ msgstr " Virrat: %s\n"
+
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Lohkot: %s\n"
+
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Suhde: %s\n"
+
+#~ msgid " Check: %s\n"
+#~ msgstr " Tarkistus: %s\n"
+
+#~ msgid ""
+#~ " Streams:\n"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+#~ msgstr ""
+#~ " Virrat:\n"
+#~ " Virta Lohkot TiivSiirr. Tv:tönSiirr. TiivKoko Tv:tönKoko Suhde Tark. Tasaus"
+
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Lohkot:\n"
+#~ " Virta Lohko TiivSiirr. Tv:tönSiirr. Yht.Koko Tv:tönKoko Suhde Tark."
+
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " Tark.arvo%*s Otsake Liput TiivKoko Muist.käyt. Suotimet"
diff --git a/po/fr.gmo b/po/fr.gmo
new file mode 100644
index 0000000..0ee4955
--- /dev/null
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..acc3aac
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,1148 @@
+# XZ Utils French Translation
+# This file is put in the public domain.
+# Adrien Nader <adrien@notk.org>, 2011-2014.
+# Stéphane Aulery <lkppo@free.fr>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-5.2.4\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2019-05-12 05:46+0200\n"
+"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
+"Language-Team: French <traduc@traduc.org>\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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s : argument de l'option --block-list invalide"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s : trop d'arguments pour l'option --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s : Format de fichier inconnu"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s : Type de vérification d'intégrité inconnu"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s : "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "La variable d'environnement %s contient trop d'arguments"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Le support de la compression à était désactivé lors de la compilaton"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Le support de la décompression a été désactivé lors de la compilation"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr ""
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s : Avec --format=raw, --suffix=.SUF est nécessaire sauf lors de l'écriture vers stdout"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Le nombre maximal de filtres est quatre"
+
+#: src/xz/coder.c:135
+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:170
+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:172
+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:195
+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:203
+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:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "La Chaine de filtre est incompatible avec --flush-timeout"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "Bascule en mode mono-processus à cause de --flush-timeout"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Jusqu'à %<PRIu32> threads seront utilisés."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Enchaînement ou options de filtres non pris en charge"
+
+#: src/xz/coder.c:278
+#, 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:310
+#, fuzzy, c-format
+#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
+msgid "Reduced the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
+msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
+
+#: src/xz/coder.c:330
+#, 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:357
+#, fuzzy, c-format
+#| msgid "Adjusted the number of threads from %s to %s to not exceed the memory usage limit of %s MiB"
+msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
+msgstr "Nombre de threads réduit de %s à %s pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
+
+#: src/xz/coder.c:412
+#, c-format
+msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
+msgstr "Taille du dictionnaire LZMA%c réduite de %s MiB à %s MiB pour ne pas dépasser la limite d'utilisation mémoire de %s MiB"
+
+#: src/xz/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Impossible de créer un tube anonyme (pipe) : %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Echec de l'activation de la sandboxe"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s : Le fichier a apparemment été déplacé, suppression annulée"
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s : Impossible de supprimer : %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s : Impossible de modifier le propriétaire du fichier : %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s : Impossible de modifier le groupe propriétaire du fichier : %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s : Impossible de modifier les permissions du fichier : %s"
+
+# Note from translator on "file status flags".
+# The following entry is kept un-translated on purpose. It is difficult to
+# translate and should only happen in exceptional circumstances which means
+# that translating would:
+# - lose some of the meaning
+# - make it more difficult to look up in search engines; it might happen one in
+# a million times, if we dilute the error message in 20 languages, it will be
+# almost impossible to find an explanation and support for the error.
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr "Echec de la lecture du drapeau d'état du fichier depuis la sortie standard : %s"
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s est un lien symbolique : ignoré"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s est un répertoire : ignoré"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s n'est pas un fichier régulier : ignoré"
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s : Le fichier possède les bits `setuid' ou `setgid' : ignoré"
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s : Le fichier possède le bit `sticky' : ignoré"
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s : Le fichier d'entrée a plus d'un lien matériel : ignoré"
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr "Nom de fichier vide, ignoré"
+
+# See note from translator above titled "file status flags".
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "Erreur de restauration du drapeau d'état de l'entrée standard : %s"
+
+# See note from translator above titled "file status flags".
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr "Erreur de lecture du drapeau d'état du fichier depuis la sortie standard : %s"
+
+#: src/xz/file_io.c:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s : Impossible de fermer le fichier : %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s : Erreur d'écriture : %s"
+
+#: src/xz/file_io.c:1259
+#, 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:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s : Fin de fichier inattendue"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s : Erreur d'écriture : %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Désactivé"
+
+#: src/xz/hardware.c:269
+#, fuzzy
+#| msgid "Total amount of physical memory (RAM): "
+msgid "Amount of physical memory (RAM):"
+msgstr "Quantité totale de mémoire physique (RAM) : "
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr ""
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr ""
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr ""
+
+#: src/xz/hardware.c:273
+#, fuzzy
+#| msgid "Memory usage limit for decompression: "
+msgid "Multi-threaded decompression:"
+msgstr "Limite d'utilisation pour la décompression : "
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr ""
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr ""
+
+#: src/xz/hardware.c:299
+#, fuzzy
+#| msgid "Memory usage limit reached"
+msgid "Memory usage limits:"
+msgstr "Limite d'utilisation mémoire atteinte"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr ""
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr ""
+
+#: src/xz/list.c:70
+#, fuzzy
+#| msgid " Compressed size: %s\n"
+msgid "Compressed size:"
+msgstr " Taille données avec compression : %s\n"
+
+#: src/xz/list.c:71
+#, fuzzy
+#| msgid " Uncompressed size: %s\n"
+msgid "Uncompressed size:"
+msgstr " Taille données sans compression : %s\n"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr ""
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr ""
+
+#: src/xz/list.c:74
+#, fuzzy
+#| msgid " Stream padding: %s\n"
+msgid "Stream Padding:"
+msgstr " Octets de rembourrage du flux : %s\n"
+
+#: src/xz/list.c:75
+#, fuzzy
+#| msgid " Memory needed: %s MiB\n"
+msgid "Memory needed:"
+msgstr " Mémoire nécessaire : %s MiB\n"
+
+#: src/xz/list.c:76
+#, fuzzy
+#| msgid " Sizes in headers: %s\n"
+msgid "Sizes in headers:"
+msgstr " Tailles stockées dans l'en-tête : %s\n"
+
+#: src/xz/list.c:79
+#, fuzzy
+#| msgid " Number of files: %s\n"
+msgid "Number of files:"
+msgstr " Nombre de fichiers : %s\n"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr ""
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr ""
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr ""
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr ""
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr ""
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr ""
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr ""
+
+#: src/xz/list.c:129
+#, fuzzy
+#| msgid "Totals:"
+msgid "TotalSize"
+msgstr "Totaux :"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr ""
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr ""
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr ""
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr ""
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr ""
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr ""
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr ""
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Inconnue-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Inconnue-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Inconnue-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Inconnue-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Inconnue-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Inconnue-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Inconnue-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Inconnue-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Inconnue-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Inconnue-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Inconnue-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Inconnue-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s : Le fichier est vide"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Flux Blocs Compressé Décompressé Ratio Vérif. Nom de fichier"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Oui"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Non"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Version minimale de XZ Utils : %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, c-format
+msgid "%s file\n"
+msgid_plural "%s files\n"
+msgstr[0] "%s fichier\n"
+msgstr[1] "%s fichiers\n"
+
+#: src/xz/list.c:1192
+msgid "Totals:"
+msgstr "Totaux :"
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr "--list ne marche que sur les fichiers .xz (--format=xz ou --format=auto)"
+
+#: src/xz/list.c:1276
+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:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s : Erreur lors de la lecture des noms de fichiers : %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, c-format
+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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s : "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Erreur interne (bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Impossible d'installer le gestionnaire de signaux"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Limite d'utilisation mémoire atteinte"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Format de fichier inconnu"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Options non prises en charge"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Les données compressées sont corrompues"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Fin des données inattendue "
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s : Enchaînement de filtres : %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Éxécutez `%s --help' pour obtenir davantage d'informations."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Utilisation : %s [OPTION]... [FICHIER]...\n"
+"Compresse ou decompresse FICHIER(s) au format .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Les arguments obligatoires pour les options longues le sont aussi pour les\n"
+"options courtes.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Mode d'opération :\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modificateurs :\n"
+
+#: src/xz/message.c:984
+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"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream décompresser uniquement le premier flux et ignorer\n"
+" silencieusement les données éventuellement restantes"
+
+#: src/xz/message.c:996
+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"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Options basiques de format de fichier et de compression :\n"
+
+#: src/xz/message.c:1007
+#, fuzzy
+#| msgid ""
+#| " -F, --format=FMT file format to encode or decode; possible values are\n"
+#| " `auto' (default), `xz', `lzma', and `raw'\n"
+#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+#| " `crc32', `crc64' (default), or `sha256'"
+msgid ""
+" -F, --format=FMT file format to encode or decode; possible values are\n"
+" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
+" -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'"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr ""
+" --ignore-check ne pas vérifier l'intégrité des données lors de\n"
+" la décompression"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" 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 !"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" 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"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NB créer au plus NB fils de compression (1 par défault) ; la\n"
+" valeur 0 est spéciale et équivaut au nombre de processeurs\n"
+" de la machine"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=TAILLE\n"
+" débuter un bloc XZ après chaque TAILLE octets de données\n"
+" d'entrée ; ce réglage sert pour la compression paralléle"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=TAILLES\n"
+" débuter des blocs XZ après les TAILLES octets de données\n"
+" spécifiées avec des virgules pour séparateur"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=TIMEOUT\n"
+" pendant la compression, si plus de TIMEOUT ms ont passées\n"
+" depuis le dernier flush et que la lecture est bloquée,\n"
+" toutes les données en attente snt écrites"
+
+#: src/xz/message.c:1043
+#, fuzzy, no-c-format
+#| msgid ""
+#| " --memlimit-compress=LIMIT\n"
+#| " --memlimit-decompress=LIMIT\n"
+#| " -M, --memlimit=LIMIT\n"
+#| " set memory usage limit for compression, decompression,\n"
+#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
+msgid ""
+" --memlimit-compress=LIMIT\n"
+" --memlimit-decompress=LIMIT\n"
+" --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"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" 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"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Chaîne de filtres de compression personnalisée (en lieu des préréglages) :"
+
+#: src/xz/message.c:1067
+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)"
+
+#: src/xz/message.c:1082
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
+#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
+#| " --sparc[=OPTS] SPARC BCJ filter\n"
+#| " Valid OPTS for all BCJ filters:\n"
+#| " start=NUM start offset for conversions (default=0)"
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+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)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Autres options :\n"
+
+#: src/xz/message.c:1106
+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"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn les avertissements ne modifient pas le code de sortie"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot utiliser des messages lisibles par un programme\n"
+" (utile pour les scripts)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" 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"
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version afficher le numéro de version puis quitter"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Signaler les bogues à <%s> (en anglais ou en finnois).\n"
+"Signaler les bogues de traduction à <lkppo@free.fr>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Page du projet %s : <%s>\n"
+
+#: src/xz/message.c:1142
+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."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: 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:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s : Nom d'option invalide"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s : Valeur d'option invalide"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Préréglage LZMA1/LZMA2 non reconnu : %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s : Le fichier a un suffixe inconnu, ignoré"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s : Le fichier a déjà le suffixe '%s', ignoré"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Suffixe de nom de fichier invalide"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: 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:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s : Suffixe multiplicateur invalide"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "La valeur de l'option '%s' doit être inclue entre %<PRIu64> et %<PRIu64>"
+
+#: src/xz/util.c:270
+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:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Les données compressées ne peuvent pas être écrites dans un terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Impossible d'écrire vers la sortie standard"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Erreur inconnue"
+
+#~ 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 : "
+
+#, c-format
+#~ msgid " Streams: %s\n"
+#~ msgstr " Flux : %s\n"
+
+#, c-format
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Blocs : %s\n"
+
+#, c-format
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Ratio : %s\n"
+
+#, c-format
+#~ msgid " Check: %s\n"
+#~ msgstr " Vérification : %s\n"
+
+#~ 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"
+
+#, c-format
+#~ 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."
+
+#, c-format
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " ValVérif %*sEn-tête Drapeaux TailleComp UtilMém Filtres"
+
+#, c-format
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "Le `match finder' choisi nécessite au moins nice=%<PRIu32>"
+
+#~ msgid "Error setting O_NONBLOCK on standard input: %s"
+#~ msgstr "Impossible d'établir le drapeau O_NONBLOCK sur la sortie standard : %s"
+
+#~ 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/po/hr.gmo b/po/hr.gmo
new file mode 100644
index 0000000..9561735
--- /dev/null
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
new file mode 100644
index 0000000..3db349a
--- /dev/null
+++ b/po/hr.po
@@ -0,0 +1,1079 @@
+# Croatian translation of xz.
+# This file is put in the public domain.
+#
+# Božidar Putanec <bozidarp@yahoo.com>, 2020, 2022, 2023.
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-20 09:23+0200\n"
+"Last-Translator: Božidar Putanec <bozidarp@yahoo.com>\n"
+"Language-Team: Croatian <lokalizacija@linux.hr>\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: Poedit 3.3.2\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: nevaljani argument za --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Previše argumenata za --block-list"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0 se može koristiti samo kao zadnji element za --block-list"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Nepoznati tip formata datoteke"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Nepodržani tip provjere integriteta"
+
+#: src/xz/args.c:518
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "Samo jednu datoteku smijete navesti uz opcije „--files” ili „--files0”."
+
+#. TRANSLATORS: This is a translatable
+#. string because French needs a space
+#. before the colon ("%s : %s").
+#: src/xz/args.c:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "Varijabla okoline %s sadrži previše argumenata"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Tijekom izrade programa onemogućena je podrška za kompresiju"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Tijekom izrade programa onemogućena je podrška za dekompresiju"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Kompresija lzip datoteka (.lz) nije podržana"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "Uz opciju --format=raw i ako ne piše na standardni izlaz, --suffix=.SUF je nužan"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Moguće je najviše do četiri filtara"
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "Ograničenje upotrebe memorije premalo je za danu postavku filtra."
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Nije preporučeno koristiti pretpostavke u sirovom načinu rada."
+
+#: src/xz/coder.c:172
+msgid "The exact options of the presets may vary between software versions."
+msgstr "Točne opcije pretpostavki mogu ovisiti o verziji softvera."
+
+#: src/xz/coder.c:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Samo LZMA1 filtar podržava .lzma format"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 se ne može koristi za .xz format"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Lanac filtara nije kompatibilan s --flush-timeout"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "Prebacivanje u jednodretveni rad zbog --flush-timeout"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Koristimo do %<PRIu32> dretvi."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Lanac filtara ili opcije filtara nisu podržane"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Za dekompresiju će trebati %s MiB memorije."
+
+#: src/xz/coder.c:310
+#, 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 se ne prekorači ograničenje upotrebe memorije od %s MiB"
+
+#: src/xz/coder.c:330
+#, 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 dretvi od %s na jednu. Ograničenje automatske upotrebe memorije od %s MiB još uvijek je prekoračeno. Potrebno je %s MiB memorije. Ipak nastavljamo dalje."
+
+#: src/xz/coder.c:357
+#, c-format
+msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
+msgstr "Prebacivanje na rad s jednom dretvom da se ne prekorači ograničenje upotrebe memorije od %s MiB"
+
+#: src/xz/coder.c:412
+#, 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 "Prilagođena je veličina LZMA%c rječnika od %s na %s da se ne premaši ograničenje upotrebe memorije od %s MiB"
+
+#: src/xz/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Greška pri stvaranju cijevi: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Nije uspjelo omogućiti sandbox"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s: Izgleda da je datoteka pomaknuta -- ne briše se"
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Brisanje nije moguće: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Promijeniti vlasnika datoteke nije moguće: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Promijeniti grupu datoteke nije moguće: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Nije moguće postaviti prava dostupa: %s"
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr "Greška pri dobavljanju statusnih flagova datoteke iz standardnog ulaza: %s"
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: To je simbolička poveznica, preskačemo"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: To je direktorij, preskačemo"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: To nije regularna datoteka, preskačemo"
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s: Datoteka ima postavljen setuid ili setgid bit, preskačemo"
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Datoteka ima postavljen sticky bit, preskačemo"
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s: Ulazna datoteka ima više od jedne tvrde poveznice, preskačemo"
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr "Prazna datoteka, preskačemo"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "Greška pri vraćanju statusnih flagova na standardni ulaz: %s"
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr "Greška pri dobavljanju statusnih flagova datoteke iz standardnog izlazu: %s"
+
+#: src/xz/file_io.c:1081
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr "Greška pri vraćanju O_APPEND flagova na standardni izlaz: %s"
+
+#: src/xz/file_io.c:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Nije uspjelo zatvoriti datoteku: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr "%s: Poziciona greška pri pokušaju stvaranja raštrkane datoteke: %s"
+
+#: src/xz/file_io.c:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Greška pri čitanju: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Greška pozicioniranja u datoteci: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Neočekivani kraj datoteke"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Greška pri pisanju: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Onemogućeno"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Količina fizičke memorije (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Broj dretvi procesora:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Kompresija:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Dekompresija:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Više dretvama dekompresija:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Zadano za -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Informacije o hardveru:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Ograničenje za korištenje memorije:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Tokovi:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Blokovi:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Komprimirana veličina:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Dekomprimirana veličina:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Omjer:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Kontrola:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Ispuna za tok:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Potrebna memorija:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Veličine u zaglavljima:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Broj datoteka:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Tok"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Blok"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Blokovi"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "KomprOffset"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "DekomprOffset"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "KomprVeličina"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "DekomprVeličina"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "TotalVeličina"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Omjer"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Kontrola"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "KontrolVrijednost"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Ispuna"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Zaglavlje"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Flagi"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "MemUpotreba"
+
+#: src/xz/list.c:137
+msgid "Filters"
+msgstr "Filteri"
+
+#. 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:169
+msgid "None"
+msgstr "Nema"
+
+#. 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:175
+msgid "Unknown-2"
+msgstr "Nepoznat-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Nepoznat-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Nepoznat-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Nepoznat-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Nepoznat-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Nepoznat-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Nepoznat-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Nepoznat-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Nepoznat-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Nepoznat-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Nepoznat-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Nepoznat-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Datoteka je prazna"
+
+#: src/xz/list.c:356
+#, c-format
+msgid "%s: Too small to be a valid .xz file"
+msgstr "%s: Premala, a da bi bila 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr " Tok Blok Komprimirano Dekomprimir Omjer Kontr Datoteka"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Da"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Ne"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Potrebna je inačica XY Utils: %s ili viša\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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Ukupno:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list ne podržava čitanje iz standardnog izlaza"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Greška pri čitanju datoteka: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, c-format
+msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
+msgstr "%s: Prazni (null) znak pronađen pri čitanju imena datoteka; možda ste mislili koristiti „--files0” umjesto „--files”?"
+
+#: src/xz/main.c:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "Komprimiranje i dekomprimiranje s --robot još nije podržano."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Interna greška (bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Nije moguće uspostaviti rukovatelje signala"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Nema provjere integriteta -- ne provjeravamo integritet datoteke"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Nepodržani tip provjere integriteta -- ne provjeravamo integritet datoteke"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Dostignuto je ograničenje za korištenje memorije"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Format datoteke nije prepoznat"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Nepodržane opcije"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Komprimirani podaci su oštećeni"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Neočekivani kraj ulaznih podataka"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB memorije je potrebno. Ograničenje je onemogućeno."
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "%s MiB memorije je potrebno. Ograničenje je %s."
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Lanac filtara: %s\n"
+
+#: src/xz/message.c:935
+#, 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:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Uporaba: %s [OPCIJA]... [FILE]...\n"
+"Komprimira ili dekomprimira DATOTEKE u .xz formatu.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Obvezni argumenti za duge opcije, obvezni su i za kratke opcije.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Način rada:\n"
+
+#: src/xz/message.c:975
+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 komprimira (prisilna kompresija)\n"
+" -d, --decompress dekomprimira (prisilna dekompresija)\n"
+" -t, --test testira integritet komprimirane datoteke\n"
+" -l, --list ispiše podatke o .xz datotekama"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modifikatori načina rada:\n"
+
+#: src/xz/message.c:984
+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 zadrži (ne briše) navedene ulazne datoteke\n"
+" -f, --force piše preko izlaznih datoteka i\n"
+" preko (de)komprimiranih poveznica\n"
+" -c, --stdout piše na standardni izlaz i ne briše\n"
+" ulazne datoteke"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream dekomprimira samo prvi tok i nijemo\n"
+" zanemari moguće preostale ulazne podatke"
+
+#: src/xz/message.c:996
+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 stvara raštrkane datoteke pri dekompresiji\n"
+" -S, --suffix=.SUF rabi sufiks „.SUF” za komprimirane datoteke umjesto .xz\n"
+" --files[=DATOTEKA] čita imena datoteka za obradu iz DATOTEKE; ako\n"
+" DATOTEKA nije dana, imena datoteka čita iz\n"
+" standardnog ulaza; ime datoteke mora završiti\n"
+" sa znakom novog reda\n"
+" --files0[=DATOTEKA] kao --files, ali popis datoteka završi s NULL znakom"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Osnovne opcije za format datoteka i kompresiju:\n"
+
+#: src/xz/message.c:1007
+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 datoteke za kodiranje ili dekodiranje; mogućnosti:\n"
+" „auto” (zadano), „xz”, „lzma”, „lzip“ i „raw”\n"
+" -C, --check=KONTROLA tip provjere integriteta: „none” (koristite s oprezom),\n"
+" „crc32”, „crc64” (zadano), ili „sha256”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check ne verificira provjeru integriteta pri dekompresiji"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 pretpostavke za kompresiju; zadano je 6; uzmite u obzir\n"
+" upotrebu memorije za (de)kompresor prije upotrebe 7-9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme pokuša poboljšati omjer kompresije koristeći više CPU\n"
+" vremena; ne utječe na potrebnu memoriju za dekompresiju"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=BROJ rabi ne više od BROJ dretvi; zadano je 1; postavkom 0\n"
+" za BROJ koristi se toliko dretvi koliko CPU ima jezgri"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=VELIČINA započne novi.xz blok nakon svakih VELIČINA bajtova\n"
+" ulaznih podataka; ovo rabite za postavljanje\n"
+" veličine bloka za kompresiju s dretvama"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=VELIČINE započne novi .xz blok nakon svake navedene\n"
+" VELIČINE nekomprimiranih ulaznih podataka;\n"
+" VELIČINE su zarezom odvojene"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=VRIJEME pri komprimiranju, ako je prošlo više od VRIJEME\n"
+" milisekundi od prethodnog pražnjenja, a daljne\n"
+" čitanje bi blokiralo ulaz, svi podaci na\n"
+" čekanju se isprazne iz kodera na izlaz"
+
+#: src/xz/message.c:1043
+#, 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=GRANICA\n"
+" --memlimit-decompress=GRANICA\n"
+" -M, --memlimit=GRANICA\n"
+" ograničenje korištenja memorije za kompresiju,\n"
+" dekompresiju, dretvama dekompresiju, ili sve ovo;\n"
+" GRANICA je u bajtima, % RAM, ili 0 za zadano"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust ako dane postavke kompresije prekorače ograničenje\n"
+" upotrebe memorije, završi s greškom umjesto da\n"
+" prilagodi postavke shodno ograničenju memorije"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Prilagođeni lanac filtara za kompresiju (alternativa korištenju pretpostavki):"
+
+#: src/xz/message.c:1067
+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[=OPCIJE] LZMA1 ili LZMA2; OPCIJE je popis\n"
+" --lzma2[=OPCIJE] nula ili više od sljedećih opcija zarezom odijeljenih;\n"
+" (valjane vrijednosti; zadano):\n"
+" preset=PRE vrati opcije na pretpostavke (0-9[e])\n"
+" dict=BROJ veličina rječnika (4KiB - 1536MiB; 8MiB)\n"
+" lc=BROJ broj bitova doslovnog konteksta (0-4; 3)\n"
+" lp=BROJ broj bitova doslovne pozicije (0-4; 0)\n"
+" pb=BROJ broj pozicionih bitova (0-4; 2)\n"
+" mode=NAČIN način kompresije (fast, normal; normal)\n"
+" nice=BROJ nice-dužina za podudaranje (2-273; 64)\n"
+" mf=IME podudarač (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+" depth=BROJ max. dubina traženja; 0=automatski (default)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPCIJE] x86 BCJ filtar (32-bit i 64-bit)\n"
+" --arm[=OPCIJE] ARM BCJ filtar\n"
+" --armthumb[=OPCIJE] ARM-Thumb BCJ filtar\n"
+" --arm64[=OPCIJE] ARM64 BCJ filtar\n"
+" --powerpc[=OPCIJE] PowerPC BCJ filtar (samo veliki endian)\n"
+" --ia64[=OPCIJE] IA-64 (Itanium) BCJ filtar\n"
+" --sparc[=OPCIJE] SPARC BCJ filtar\n"
+" Valjane OPCIJE za BCJ filtre:\n"
+" start=BROJ početni offset za konverzije (zadano=0)"
+
+#: src/xz/message.c:1095
+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[=OPCIJE] Delta filtar; valjane OPCIJE\n"
+" (valjane vrijednosti; zadano):\n"
+" dist=BROJ razmak između bajtova koji se oduzimaju\n"
+" jedan od drugog (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Ostale opcije:\n"
+
+#: src/xz/message.c:1106
+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 izostavi upozorenja; „-qq” izostavi i greške\n"
+" -v, --verbose opširnije informira; „=vv” još više informira"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn upozorenja nemaju utjecaja na status završetka (izlaza)"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot poruke u strojnom formatu (korisno za skripte)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory pokaže ukupnu količinu RAM-a i trenutno\n"
+" aktivna ograničenja korištenja memorije, pa iziđe"
+
+#: src/xz/message.c:1119
+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 prikaže kratku pomoć (izlista samo osnovne opcije)\n"
+" -H, --long-help prikaže ovu dugačku pomoć i iziđe"
+
+#: src/xz/message.c:1123
+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 prikaže ovu kratku pomoć i iziđe\n"
+" -H, --long-help prikaže dugačku pomoć (izlista i napredne opcije)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version prikaže informacije o inačici i iziđe"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Ako DATOTEKA nije navedena ili je „-“, čita standardni ulaz.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Greške prijavite na <%s> (na engleskom ili finskom).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+"%s matična mrežna stranica: <%s>\n"
+"Pogreške u prijevodu i vaše prijedloge javite na <lokalizacija@linux.hr>.\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "OVO JE RAZVOJNA INAČICA I NIJE NAMIJENJENA ZA PROIZVODNJU."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Opcije moraju biti parovi „name=value” odvojeni zarezima"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Nevaljano ime opcije"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Nevaljana vrijednost opcije"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Nepodržana LZMA1/LZMA2 pretpostavka: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Ime datoteke nema poznati sufiks, preskačemo"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Datoteka već ima „%s” sufiks, preskačemo"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Nevaljani sufiks imena datoteke"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Vrijednost nije nula ili pozitivni decimalni cijeli broj"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Nevaljana mjerna jedinica (sufiks)"
+
+#: src/xz/util.c:151
+msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
+msgstr "Valjani sufiksi (mjerne jedinice) su „KiB” (2^10), „MiB” (2^20), i „GiB” (2^30)."
+
+#: src/xz/util.c:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Vrijednost opcije „%s” mora biti u rasponu [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Nije moguće čitati komprimirane podatke iz terminala"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Nije moguće pisati komprimirane podatke na terminala"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Pisanje na standardni izlaz nije uspjelo"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Nepoznata greška"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr ""
+#~ "Odabrani podudarač (algoritam za pronalaženje podudaranja)\n"
+#~ "zahtijeva barem nice=%<PRIu32>"
+
+#~ msgid "Nepoznat-6"
+#~ msgstr "Nepoznat-6"
+
+#~ msgid "Nepoznat-7"
+#~ msgstr "Nepoznat-7"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Sandbox je onemogućen zbog nekompatibilnih argumenata naredbenog retka"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Sandbox je uspješno omogućen"
+
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr " Ograničenje memorije za kompresiju: "
+
+#~ msgid " Streams: %s\n"
+#~ msgstr " Tok(a/ova): %s\n"
+
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Blok(a/ova): %s\n"
+
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Omjer: %s\n"
+
+#~ msgid " Check: %s\n"
+#~ msgstr " Kontrola: %s\n"
+
+#~ msgid ""
+#~ " Streams:\n"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+#~ msgstr ""
+#~ " Tokovi:\n"
+#~ " Tok Blokovi KompOffset DekompOffset KompVeličina DekompOffset Omjer Kontrola Ispuna"
+
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Blokovi:\n"
+#~ " Tok Blok KompOffset DekompOffset KompVeličina DekompOffset Omjer Kontrola"
+
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " KonSvota %*s Zaglav Flags KompVel Memorija Filtri"
diff --git a/po/hu.gmo b/po/hu.gmo
new file mode 100644
index 0000000..0a82679
--- /dev/null
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
new file mode 100644
index 0000000..169cad5
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,1086 @@
+# Hungarian translation for xz.
+# This file is put in the public domain.
+#
+# Meskó Balázs <mesko.balazs@fsf.hu>, 2019, 2022.
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.0-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2022-11-10 12:13+0100\n"
+"Last-Translator: Meskó Balázs <mesko.balazs@fsf.hu>\n"
+"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\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"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Poedit 3.1.1\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Érvénytelen argumentum a --block-list kapcsolóhoz"
+
+#: src/xz/args.c:87
+#, 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:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Ismeretlen fájlformátumtípus"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Nem támogatott integritás-ellenőrzési típus"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "A(z) %s környezeti változó túl sok argumentumot tartalmaz"
+
+#: src/xz/args.c:691
+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:698
+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:704
+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:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: --format=raw esetén, --suffix=.SUF szükséges, hacsak nem a szabványosra kimenetre ír"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "A szűrők legnagyobb száma négy"
+
+#: src/xz/coder.c:135
+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:170
+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:172
+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:195
+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:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "Az LZMA1 nem használható az .xz formátummal"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "A szűrőlánc nem kompatibilis a --flush-timeout kapcsolóval"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Legfeljebb %<PRIu32> szál használata."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Nem támogatott szűrőlánc vagy szűrőkapcsolók"
+
+#: src/xz/coder.c:278
+#, 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:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Hiba a csővezeték létrehozásakor: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "A homokozó engedélyezése sikertelen"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Nem távolítható el: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, 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:426
+#, 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:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Szimbolikus link, kihagyás"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Könyvtár, kihagyás"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Nem szabályos fájl, kihagyás"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Üres fájlnév, kihagyás"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: A fájl lezárása sikertelen: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Olvasási hiba: %s"
+
+#: src/xz/file_io.c:1259
+#, 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:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Váratlan fájlvég"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Írási hiba: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Letiltva"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Fizikai memória (RAM) mennyisége:"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Processzorszálak száma:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Tömörítés:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Kibontás:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Többszálás kibontás:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "A -T0 alapértelmezése:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Hardverjellemzők:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Memóriahasználat korlátja:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Adatfolyamok:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Blokkok:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Tömörített méret:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Kibontott méret:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Arány:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Ellenőrzés:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Adatfolyam kerete:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Szükséges memória:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Méretek a fejlécekben:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Fájlok száma:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Adatfolyam"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Blokk"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Blokkok"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "Tömörített eltolás"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "Kibontott eltolás"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "Tömörített méret"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "Kibontott méret"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "Teljes méret"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Arány"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Ellenőrzés"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "Ellenőrzőérték"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Keret"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Fejléc"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Jelzők"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "Memóriahasználat"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Névtelen-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Névtelen-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Névtelen-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Névtelen-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Névtelen-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Névtelen-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Névtelen-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Névtelen-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Névtelen-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Névtelen-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Névtelen-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Névtelen-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: A fájl üres"
+
+#: src/xz/list.c:356
+#, 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:731
+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:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Igen"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Nem"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Összesen:"
+
+#: src/xz/list.c:1270
+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:1276
+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:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Hiba a fájlnevek olvasásakor: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Belső hiba (bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "A szignálkezelők nem hozhatók létre"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Memóriahasználat korlátja elérve"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "A fájlformátum nem felismert"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Nem támogatott kapcsolók"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "A tömörített adatok megsérültek"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "A bemenet váratlanul véget ért"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Szűrőlánc: %s\n"
+
+#: src/xz/message.c:935
+#, 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:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Használat: %s [KAPCSOLÓ]... [FÁJL]...\n"
+".xz formátumú FÁJLok tömörítése vagy kibontása.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "A hosszú kapcsolók kötelező argumentumai a rövid kapcsolók esetén is kötelezők.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Működési mód:\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Műveleti módosítók:\n"
+
+#: src/xz/message.c:984
+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"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" 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"
+
+#: src/xz/message.c:996
+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"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Alapvető fájlformátum és tömörítési beállítások:\n"
+
+#: src/xz/message.c:1007
+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”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check kibontáskor ne ellenőrizze az épséget"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" 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!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" 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"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=SZÁM legfeljebb ennyi szál használata; alapértelmezett az 1;\n"
+" állítsa 0-ra, hogy annyi szálat használjon, amennyi\n"
+" processzormag áll rendelkezésre"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=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:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=MÉRETEK\n"
+" új .xz blokk indítása a vesszőkkel felsorolva megadott\n"
+" méretű tömörítetlen adatszakaszok után"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=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:1043
+#, 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"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" 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"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for 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:1067
+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)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+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"
+" É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)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Egyéb kapcsolók:\n"
+
+#: src/xz/message.c:1106
+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"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn 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"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot géppel értelmezhető üzenetek használata\n"
+" (parancsfájlok esetén hasznos)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" 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"
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version a verziószám kiírása és kilépés"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Ide jelentse a hibákat: <%s> (angolul vagy finnül).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s honlap: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "EZ EGY FEJLESZTŐI VÁLTOZAT, NEM ÉLES HASZNÁLATRA SZÁNT."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: 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:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Érvénytelen kapcsolónév"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Érvénytelen kapcsolóérték"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Nem támogatott LZMA1/LZMA2 előbeállítás: %s"
+
+#: src/xz/options.c:356
+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:160
+#, 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:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: A(z) „%s” fájlnak már van utótagja, kihagyás"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Érvénytelen fájlnév utótag"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: 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:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Érvénytelen szorzó utótag"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "A(z) „%s” kapcsoló értékének a(z) [%<PRIu64>, %<PRIu64>] tartományban kell lennie"
+
+#: src/xz/util.c:270
+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:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "A tömörített adatokat nem lehet kiírni a terminálba"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "A szabványos kimenetre írás sikertelen"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Ismeretlen hiba"
+
+#, c-format
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "A kiválasztott egyezéskeresőhöz legalább nice=%<PRIu32> 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/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 0000000..ceeebb9
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,28 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# Copyright (C) 2001 Free Software Foundation, Inc.
+# Written by Bruno Haible <bruno@clisp.org>, 2001.
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to use, copy, distribute, and modify it.
+#
+# 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/po/it.gmo b/po/it.gmo
new file mode 100644
index 0000000..73a6ede
--- /dev/null
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..96f519b
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,1138 @@
+# Italian translation for xz
+# This file is put in the public domain.
+# Gruppo traduzione italiano di Ubuntu-it <gruppo-traduzione@ubuntu-it.org>, 2009, 2010
+# Lorenzo De Liso <blackz@ubuntu.com>, 2010.
+# Milo Casagrande <milo@milo.name>, 2009, 2010, 2011, 2014, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.2.4\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2019-03-04 14:21+0100\n"
+"Last-Translator: Milo Casagrande <milo@milo.name>\n"
+"Language-Team: Italian <tp@lists.linux.it>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: argomento non valido per --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: troppi argomenti per --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: tipo di formato del file sconosciuto"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: tipo di controllo integrità non supportato"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "La variabile d'ambiente %s contiene troppi argomenti"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Il supporto alla compressione è stato disabilitato in fase di compilazione"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Il supporto alla decompressione è stato disabilitato in fase di compilazione"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr ""
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: con --format=raw, --suffix=.SUF è richiesto a meno che non si scriva sullo stdout"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Il numero massimo di filtri è quattro"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Non è consigliato usare un preset nella modalità raw."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Il formato .lzma supporta solo il filtro LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 non può essere usato con il formato .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "La catena di filtri non è compatibile con --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Vengono usati circa %<PRIu32> thread."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Catena di filtri od opzioni del filtro non supportata"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "L'estrazione necessita di %s MiB di memoria."
+
+#: src/xz/coder.c:310
+#, 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 "Regolato il numero di thread da %s a %s per non eccedere il limite di utilizzo della memoria di %s MiB"
+
+#: src/xz/coder.c:330
+#, 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:357
+#, 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 "Regolato il numero di thread da %s a %s per non eccedere il limite di utilizzo della memoria di %s MiB"
+
+#: src/xz/coder.c:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Errore nel creare una pipe: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Abilitazione modalità sandbox non riuscita"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: impossibile rimuovere: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: impossibile impostare il proprietario del file: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: impossibile impostare il gruppo del file: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: impossibile impostare i permessi del file: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: è un collegamento simbolico, viene saltato"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: è una directory, viene saltata"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: non è un file regolare, viene saltato"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Nome file vuoto, viene saltato"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: chiusura del file non riuscita: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: errore di lettura: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: errore nel cercare il file: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: fine del file inaspettata"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: errore di scrittura: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Disabilitato"
+
+#: src/xz/hardware.c:269
+#, fuzzy
+#| msgid "Total amount of physical memory (RAM): "
+msgid "Amount of physical memory (RAM):"
+msgstr "Quantità totale di memoria fisica (RAM): "
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr ""
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr ""
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr ""
+
+#: src/xz/hardware.c:273
+#, fuzzy
+#| msgid "Memory usage limit for decompression: "
+msgid "Multi-threaded decompression:"
+msgstr "Limite utilizzo memoria per l'estrazione: "
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr ""
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr ""
+
+#: src/xz/hardware.c:299
+#, fuzzy
+#| msgid "Memory usage limit reached"
+msgid "Memory usage limits:"
+msgstr "Limite di utilizzo della memoria raggiunto"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr ""
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr ""
+
+#: src/xz/list.c:70
+#, fuzzy
+#| msgid " Compressed size: %s\n"
+msgid "Compressed size:"
+msgstr " Dim. compresso: %s\n"
+
+#: src/xz/list.c:71
+#, fuzzy
+#| msgid " Uncompressed size: %s\n"
+msgid "Uncompressed size:"
+msgstr " Dim. estratto: %s\n"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr ""
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr ""
+
+#: src/xz/list.c:74
+#, fuzzy
+#| msgid " Stream padding: %s\n"
+msgid "Stream Padding:"
+msgstr " Padding dello stream: %s\n"
+
+#: src/xz/list.c:75
+#, fuzzy
+#| msgid " Memory needed: %s MiB\n"
+msgid "Memory needed:"
+msgstr " Memoria necessaria: %s MiB\n"
+
+#: src/xz/list.c:76
+#, fuzzy
+#| msgid " Sizes in headers: %s\n"
+msgid "Sizes in headers:"
+msgstr " Dim. negli header: %s\n"
+
+#: src/xz/list.c:79
+#, fuzzy
+#| msgid " Number of files: %s\n"
+msgid "Number of files:"
+msgstr " Numero di file: %s\n"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr ""
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr ""
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr ""
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr ""
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr ""
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr ""
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr ""
+
+#: src/xz/list.c:129
+#, fuzzy
+#| msgid "Totals:"
+msgid "TotalSize"
+msgstr "Totali:"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr ""
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr ""
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr ""
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr ""
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr ""
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr ""
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr ""
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Sconosc2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Sconosc3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Sconosc5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Sconosc6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Sconosc7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Sconosc8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Sconosc9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Sconosc11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Sconosc12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Sconosc13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Sconosc14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Sconosc15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: il file è vuoto"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr " Strm Blocc. Compresso Estratto Rapp. Contr Nome file"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Sì"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "No"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Versione \"XZ Utils\" minima: %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Totali:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list non è in grado di leggere dallo standard input"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: errore nel leggere i nomi dei file: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, c-format
+msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
+msgstr "%s: nessun carattere trovato durante la lettura dei nomi dei file; forse si intendeva usare \"--files0\" invece di \"--files\"?"
+
+#: src/xz/main.c:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "La compressione e l'estrazione con --robot non sono ancora supportate."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Errore interno (bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Impossibile stabilire i gestori dei segnali"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Nessun controllo d'integrità; l'integrità del file non viene verificata"
+
+#: src/xz/message.c:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Limite di utilizzo della memoria raggiunto"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Formato di file non riconosciuto"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Opzioni non supportate"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "I dati compressi sono danneggiati"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Fine dell'input non attesa"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: catena di filtri: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Provare \"%s --help\" per maggiori informazioni."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Uso: %s [OPZIONI]... [FILE]...\n"
+"Comprime o estrae i FILE nel formato .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Gli argomenti obbligatori per le opzioni lunghe lo sono anche per quelle brevi.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Modalità di operazione:\n"
+
+#: src/xz/message.c:975
+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 Forza la compressione\n"
+" -d, --decompress Forza l'estrazione\n"
+" -t, --test Verifica l'integrità dei file compressi\n"
+" -l, --list Elenca informazioni sui file .xz"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modificatori di operazioni:\n"
+
+#: src/xz/message.c:984
+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 Mantiene (non elimina) i file di input\n"
+" -f, --force Forza la sovrascrittura dell'output e comprime/estrae i\n"
+" collegamenti\n"
+" -c, --stdout Scrive sullo standard output e non elimina i file di input"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream Decomprime solamente il primo stream e ignora\n"
+" silenziosamente i restanti dati di input"
+
+#: src/xz/message.c:996
+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 Non crea file sparsi durante l'estrazione\n"
+" -S, --suffix=.SUF Usa il suffisso \".SUF\" sui file compressi\n"
+" --files=[FILE] Legge i nomi dei file da elaborare da FILE; se FILE è\n"
+" omesso, i nomi dei file sono letti dallo standard input;\n"
+" i nomi dei file devono essere terminati con un carattere\n"
+" di newline\n"
+" --files0=[FILE] Come --files ma usa il carattere null come terminatore"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Formato file di base e opzioni di compressione:\n"
+
+#: src/xz/message.c:1007
+#, fuzzy
+#| msgid ""
+#| " -F, --format=FMT file format to encode or decode; possible values are\n"
+#| " `auto' (default), `xz', `lzma', and `raw'\n"
+#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+#| " `crc32', `crc64' (default), or `sha256'"
+msgid ""
+" -F, --format=FMT file format to encode or decode; possible values are\n"
+" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
+" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+" `crc32', `crc64' (default), or `sha256'"
+msgstr ""
+" -F, --format=FMT Formato file per codificare o decodificare; i possibili\n"
+" valori sono \"auto\" (predefinito) \"xz\", \"lzma\" e \"raw\"\n"
+" -C, --check=CHECK Tipo di verifica integrità: \"none\" (usare con attenzione),\n"
+" \"crc32\", \"crc64\" (predefinito) o \"sha256\""
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check Non verifica il codice di integrità quando decomprime"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 Preset di compressione; predefinito è 6; tenere a mente\n"
+" l'utilizzo di memoria per comprimere ed estrarre prima\n"
+" di usare 7-9"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme Tenta di migliorare il rapporto di compressione\n"
+" utilizzando più tempo di CPU; non cambia i requisiti di\n"
+" memoria in fase di estrazione"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NUM Usa al massimo NUM thread: il valore predefinito è 1,\n"
+" impostare a 0 per usare tanti thread quanti core la CPU\n"
+" ha a disposizione"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=DIM\n"
+" Avvia un nuovo blocco .xz dopo ogni DIM byte di input:\n"
+" usare per impostare la dimensione del blocco durante la\n"
+" compressione con thread"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=DIM\n"
+" Avvia un nuovo blocco .xz dopo gli intervalli, sperati\n"
+" da virgole, di dati non compressi"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=TIMEOUT\n"
+" Durante la compressione, se sono passati più di TIMEOUT\n"
+" millisecondi dal flush precedente e la lettura di\n"
+" ulteriore input risulterebbe bloccata, viene eseguito il\n"
+" flush di tutti i dati pendenti"
+
+#: src/xz/message.c:1043
+#, fuzzy, no-c-format
+#| msgid ""
+#| " --memlimit-compress=LIMIT\n"
+#| " --memlimit-decompress=LIMIT\n"
+#| " -M, --memlimit=LIMIT\n"
+#| " set memory usage limit for compression, decompression,\n"
+#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
+msgid ""
+" --memlimit-compress=LIMIT\n"
+" --memlimit-decompress=LIMIT\n"
+" --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"
+" Imposta il limite di utilizzo della memoria per la\n"
+" compressione, l'estrazione o entrambe; LIMIT è in byte,\n"
+" % della memoria RAM oppure 0 per il valore predefinito"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust Se le impostazioni di compressione eccedono il limite di\n"
+" utilizzo della memoria, lancia un errore invece di\n"
+" utilizzare valori più piccoli"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Catena di filtri personalizzati per la compressione (alternative per\n"
+" l'utilizzo di preset):"
+
+#: src/xz/message.c:1067
+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[=OPZ] LZMA1 o LZMA2; OPZ è un elenco separato da virgole di zero\n"
+" --lzma2[=OPZ] o più delle seguenti opzioni (valori validi; predefinito):\n"
+" preset=NUM Reimposta le opzioni al preset NUM (0-9[e])\n"
+" dict=NUM Dimensione del dizionario\n"
+" (4KiB - 1536MiB; 8MiB)\n"
+" lc=NUM Numero di bit letterali di contesto (0-4; 3)\n"
+" lp=NUM Numero di bit letterali di posizione (0-4; 0)\n"
+" pb=NUM Numero di bit di posizione (0-4; 2)\n"
+" mode=MODE Modalità di compressione\n"
+" (fast, normal; normal)\n"
+" nice=NUM Lunghezza valida per una corrispondenza\n"
+" (2-273; 64)\n"
+" mf=NAME Strumento per cercare corrispondenze\n"
+" (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+" depth=NUM Profondità massima di ricerca; 0=automatica\n"
+" (predefinito)"
+
+#: src/xz/message.c:1082
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
+#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
+#| " --sparc[=OPTS] SPARC BCJ filter\n"
+#| " Valid OPTS for all BCJ filters:\n"
+#| " start=NUM start offset for conversions (default=0)"
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPZ] Filtro BCJ x86 (32 e 64 bit)\n"
+" --powerpc[=OPZ] Filtro BCJ PowerPC (solo big endian)\n"
+" --ia64[=OPZ] Filtro BCJ IA-64 (Itanium)\n"
+" --arm[=OPZ] Filtro BCJ ARM (solo little endian)\n"
+" --armthumb[=OPZ] Filtro BCJ ARM-Thumb (solo little endian)\n"
+" --sparc[=OPZ] Filtro BCJ SPARC\n"
+" OPZ valide per tutti i filtri BCJ:\n"
+" start=NUM Offset iniziale per le conversioni\n"
+" (predefinito=0)"
+
+#: src/xz/message.c:1095
+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[=OPZ] Filtro Delta; OPZ valide (valori validi; predefinito):\n"
+" dist=NUM Distanza tra byte sottratti\n"
+" gli uni dagli altri (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Altre opzioni:\n"
+
+#: src/xz/message.c:1106
+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 Sopprime gli avvisi; specificare due volte per sopprimere\n"
+" anche gli errori\n"
+" -v, --verbose Output prolisso; specificare due volte per output ancora\n"
+" più prolisso"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn Gli avvisi non influenzano lo stato d'uscita"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot Usa messaggi analizzabili (utile per gli script)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory Visualizza la quantità totale di RAM, il limite attuale\n"
+" attivo di utilizzo della memore ed esce"
+
+#: src/xz/message.c:1119
+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 Stampa l'aiuto breve (elenca solo le opzioni di base)\n"
+" -H, --long-help Stampa questo lungo aiuto ed esce"
+
+#: src/xz/message.c:1123
+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 Stampa questo breve aiuto ed esce\n"
+" -H, --long-help Stampa l'aiuto lungo (elenca anche le opzioni avanzate)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version Stampa il numero della versione ed esce"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Senza FILE, o quando FILE è -, legge lo standard input.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Segnalare i bug a <%s> (in inglese o finlandese).\n"
+"Segnalare i bug di traduzione a <tp@lists.linux.it>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Sito web di %s: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "Questa è una versione di sviluppo non adatta per utilizzi in produzione."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: le opzioni devono essere coppie \"nome=valore\" separate da virgole"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: nome opzione non valido"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: valore dell'opzione non valido"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Preset LZMA/LZMA2 non supportato: %s"
+
+#: src/xz/options.c:356
+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:160
+#, 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:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: il file ha già il suffisso \"%s\", viene saltato"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: suffisso del nome del file non valido"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: il valore non è un numero intero decimale non-negativo"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: suffisso del moltiplicatore non valido"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Il valore dell'opzione \"%s\" deve essere nell'intervallo [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "I dati compressi non possono essere letti da un terminale"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "I dati compressi non possono essere scritti ad un terminale"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Scrittura sullo standard ouput non riuscita"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Errore sconosciuto"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "La modalità sandbox è disabilitata a causa di argomenti a riga di comando non compatibili"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Sandbox abilitata con successo"
+
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Limite utilizzo memoria per la compressione: "
+
+#, c-format
+#~ msgid " Streams: %s\n"
+#~ msgstr " Stream: %s\n"
+
+#, c-format
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Blocchi: %s\n"
+
+#, c-format
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Rapporto: %s\n"
+
+#, c-format
+#~ msgid " Check: %s\n"
+#~ msgstr " Controllo: %s\n"
+
+#~ msgid ""
+#~ " Streams:\n"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+#~ msgstr ""
+#~ "Stream:\n"
+#~ " Stream Blocc. Offset comp. Offset estr. Dim. comp. Dim. estratto Rapp. Contr Padding"
+
+#, c-format
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Blocchi:\n"
+#~ " Stream Blocc. Offset comp. Offset estratto Dim. tot. Dim. estratto Rapp. Contr"
+
+#, c-format
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " Val.cont %*s Header Flag Dim.compr. Uso mem. Filtri"
+
+#, c-format
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "Lo strumento per cercare corrispondenze selezionato richiede almeno nice=%<PRIu32>"
diff --git a/po/ko.gmo b/po/ko.gmo
new file mode 100644
index 0000000..cea6626
--- /dev/null
+++ b/po/ko.gmo
Binary files differ
diff --git a/po/ko.po b/po/ko.po
new file mode 100644
index 0000000..88b6c89
--- /dev/null
+++ b/po/ko.po
@@ -0,0 +1,1070 @@
+# Korean translation for the xz.
+# This file is put in the public domain.
+# Seong-ho Cho <darkcircle.0426@gmail.com>, 2019, 2022, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-20 10:59+0900\n"
+"Last-Translator: Seong-ho Cho <darkcircle.0426@gmail.com>\n"
+"Language-Team: Korean <translation-team-ko@googlegroups.com>\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.0.1\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: --block-list의 인자값이 잘못됨"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: --block-list 인자 갯수가 너무 많음"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0 값은 --block-list의 마지막 원소로만 사용할 수 있습니다"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: 알 수 없는 파일 형식"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: 지원하지 않는 무결성 검사 형식"
+
+#: src/xz/args.c:518
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "`--files' 또는 `--files0' 옵션으로 하나의 파일만 지정할 수 있습니다."
+
+#. TRANSLATORS: This is a translatable
+#. string because French needs a space
+#. before the colon ("%s : %s").
+#: src/xz/args.c:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "%s 환경 변수에 너무 많은 인자 값이 들어있습니다"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "빌드 시점에 압축 기능을 비활성했습니다"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "빌드 시점에 압축 해제 기능을 비활성했습니다"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "lzip 파일(.lz) 압축은 지원하지 않습니다"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "표준 출력으로 기록하지 않는 한 --format=raw, --suffix=.SUF 옵션이 필요합니다"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "최대 필터 갯수는 4 입니다"
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "주어진 필터 설정으로는 메모리 사용 제한 값이 너무 적습니다."
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "RAW 모드에서의 프리셋 사용은 권장하지 않습니다."
+
+#: src/xz/coder.c:172
+msgid "The exact options of the presets may vary between software versions."
+msgstr "프리셋의 정확한 옵션 값은 프로그램 버전에 따라 다릅니다."
+
+#: src/xz/coder.c:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr ".lzma 형식은 LZMA1 필터만 지원합니다"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr ".xz 형식에는 LZMA1 필터를 사용할 수 없습니다"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "--flush-timeout 옵션에는 필터 체인이 맞지 않습니다"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "--flush-timeout 옵션을 지정하였으므로 단일 스레드 모드로 전환합니다"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "최대 %<PRIu32> 스레드를 사용합니다."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "지원하지 않는 필터 체인 또는 필터 옵션"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "압축 해제시 %s MiB 메모리 용량이 필요합니다."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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 제한을 넘지 않으려 %2$s MiB에서 %3$s MiB로 LZMA%1$c 딕셔너리 크기를 조정했습니다"
+
+#: src/xz/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "파이프 생성 오류: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "샌드 박스 활성화 실패"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s: 파일을 이동한 것 같음, 제거 안함"
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: 제거할 수 없음: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: 파일 소유자를 설정할 수 없음: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: 파일 소유 그룹을 설정할 수 없음: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: 파일 권한을 설정할 수 없음: %s"
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr "표준 입력에서 파일 상태 플래그 가져오기 오류: %s"
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: 심볼릭 링크, 건너뜀"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: 디렉터리입니다, 건너뜀"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: 일반 파일 아님, 건너뜀"
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s: setuid 또는 setgid 비트 설정 있음, 건너뜀"
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: 끈적이 비트 설정이 있는 파일, 건너뜀"
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s: 입력 파일에 하나 이상의 하드링크가 있습니다, 건너뜀"
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr "파일 이름 없음, 건너뜀"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "표준 입력으로의 상태 플래그 복원 오류: %s"
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr "표준 출력에서 파일 상태 플래그 가져오기 오류: %s"
+
+#: src/xz/file_io.c:1081
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr "표준 출력으로의 O_APPEND 플래그 복원 오류: %s"
+
+#: src/xz/file_io.c:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: 파일 닫기 실패: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr "%s: 분할 파일 생성 시도시 탐색 실패: %s"
+
+#: src/xz/file_io.c:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: 읽기 오류: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: 파일 탐색 오류: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: 예상치 못한 파일의 끝"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: 쓰기 오류: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "사용 안함"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "물리 메모리 양(RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "프로세서 스레드 수:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "압축:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "압축해제:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "멀티 스레드 압축 해제:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "-T0 기본값:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "하드웨어 정보:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "메모리 사용량 제한:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "스트림:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "블록 수:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "압축 용량:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "압축해제 용량:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "압축율:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "검사:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "스트림 패딩:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "요구 메모리:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "헤더 길이:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "파일 갯수:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "스트림"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "블록"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "블록"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "압축오프셋"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "압축해제오프셋"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "압축크기"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "압축해제크기"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "총크기"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "압축율"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "검사"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "검사값"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "패딩"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "헤더"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "플래그"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "메모리사용"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "알 수 없음-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "알 수 없음-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "알 수 없음-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "알 수 없음-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "알 수 없음-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "알 수 없음-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "알 수 없음-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "알 수 없음-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "알 수 없음-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "알 수 없음-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "알 수 없음-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "알 수 없음-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: 파일 내용 없음"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "스트림 블록 압축 압축해제 압축율 검사 파일 이름"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "예"
+
+# 주: 아니오가 아니라 아니요가 맞는 표현
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "아니요"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " 최소 XZ Utils 버전: %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, c-format
+msgid "%s file\n"
+msgid_plural "%s files\n"
+msgstr[0] "파일 %s개\n"
+
+#: src/xz/list.c:1192
+msgid "Totals:"
+msgstr "총:"
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr "--list 옵션은 .xz 파일에만 동작합니다(--format=xz 또는 --format=auto)"
+
+#: src/xz/list.c:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list 옵션은 표준 입력 읽기를 지원하지 않습니다"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: 파일 이름 읽기 오류: %s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s: 파일 이름 읽는 중 예상치 못한 입력 끝"
+
+#: src/xz/main.c:120
+#, 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:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "아직 압축 동작과 압축 해제 동작에 --robot 옵션을 지원하지 않습니다."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "내부 오류(버그)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "시그널 처리자를 준비할 수 없습니다"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "무결성 검사 안함. 파일 무결성을 검증하지 않습니다"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "지원하지 않는 무결성 검사 형식. 파일 무결성을 검증하지 않습니다"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "메모리 사용량 한계에 도달했습니다"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "파일 형식을 인식할 수 없음"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "지원하지 않는 옵션"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "압축 데이터 깨짐"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "예상치 못한 입력 끝"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB 메모리 용량이 필요합니다. 제한을 비활성합니다."
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "%s MiB 메모리 용량이 필요합니다. 제한 값은 %s 입니다."
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: 필터 체인: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "자세한 사용법은 `%s --help'를 입력하십시오."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"사용법: %s [<옵션>]... [<파일>]...\n"
+".xz 형식으로 <파일> 다수를 압축(해제)합니다.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "긴 옵션 버전의 필수 인자는 짧은 옵션 버전에도 해당합니다.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " 동작 방식:\n"
+
+#: src/xz/message.c:975
+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 파일 정보 출력"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" 동작 지정:\n"
+
+#: src/xz/message.c:984
+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 표준 출력으로 기록하고 입력 파일을 삭제하지 않습니다"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream 첫번째 스트림만 압축해제하며, 나머지 입력 데이터는\n"
+" 조용히 무시합니다"
+
+#: src/xz/message.c:996
+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=.<확장자>\n"
+" 압축 파일 확장자에 `.<확장자>'를 사용합니다\n"
+" --files[=<파일>]\n"
+" <파일> 에서 처리할 파일 이름을 읽습니다. <파일>을\n"
+" 생략하면 표준 입력에서 파일 이름을 읽습니다.\n"
+" 파일 이름은 개행 문자로 끝나야합니다\n"
+" --files0[=<파일>]\n"
+" --files 옵션과 비슷하지만 NULL 문자로 끝납니다"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" 기본 파일 형식 및 압축 옵션:\n"
+
+#: src/xz/message.c:1007
+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', `lzip', `raw'\n"
+" -C, --check=<검사> 무결성 검사 형식: `none'(위험),\n"
+" `crc32', `crc64'(기본), `sha256'"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check 압축 해제시 무결성 검사를 수행하지 않습니다"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 압축 프리셋. 기본값은 6 입니다. 7-9를 사용하려면 입축\n"
+" 메모리 사용량*과* 압축 해제 메모리 사용량을 지정하십시오!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme CPU 점유시간을 더 확보하여 압축률을 개선합니다.\n"
+" 압축 해제시 메모리 요구 용량에는 영향을 주지 않습니다"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=<개수>\n"
+" 최대 스레드 <개수>를 사용합니다. 기본값은 1 입니다\n"
+" 실제 프로세서 코어만큼의 스레드를 사용하려면 0 값으로\n"
+" 지정합니다"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=<크기>\n"
+" 모든 <크기>의 입력 다음 새 .xz 블록을 시작합니다.\n"
+" 스레드 압축에 블록 크기를 지정할 때 사용합니다"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=<크기>\n"
+" 콤마로 구분한 연속 지정값 만큼 압축해제한 데이터 용량을\n"
+" 넘긴 후 새 .xz 블록을 시작합니다"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=<제한시간>\n"
+" 앞서 플러싱한 후 더 많은 블록 입력을 읽어들일 때 밀리초\n"
+" 단위 <제한시간>을 넘기면 모든 대기 데이터를\n"
+" 플러싱아웃합니다"
+
+#: src/xz/message.c:1043
+#, 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 입니다"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust 압축 설정이 메모리 사용량 제한을 넘어서면\n"
+" 설정 값을 줄이는 대신 오류 정보를 나타냅니다"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" 압축용 개별 필터 체인 설정(사전 설정 사용을 대신함):"
+
+#: src/xz/message.c:1067
+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"
+" (유효값, 기본값):\n"
+" preset=<프리셋> 옵션을 <프리셋>값으로 초기화(0-9[e])\n"
+" dict=<숫자> 딕셔너리 크기(4KiB - 1536MiB, 8MiB)\n"
+" lc=<숫자> 리터럴 컨텍스트 비트 수(0-4, 3)\n"
+" lp=<숫자> 리터럴 위치 비트 수(0-4, 0)\n"
+" pb=<숫자> 위치 비트 갯수(0-4, 2)\n"
+" mode=<모드> 압축 모드 fast 또는 normal, normal)\n"
+" nice=<숫자> nice 일치 길이 값(2-273, 64)\n"
+" mf=<이름> 일치 탐색기(hc3, hc4, bt2, bt3, bt4\n"
+" 중 하나. bt4)\n"
+" depth=<숫자> 최대 검색 깊이. 0=자동(기본값)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=<옵션>] x86 BCJ 필터(32-bit, 64-bit)\n"
+" --arm[=<옵션>] ARM BCJ 필터\n"
+" --armthumb[=<옵션>] ARM-Thumb BCJ 필터\n"
+" --arm64[=<옵션>] ARM64 BCJ 필터\n"
+" --powerpc[=<옵션>] PowerPC BCJ 필터 (빅 엔디언 전용)\n"
+" --ia64[=<옵션>] IA-64 (아이태니엄) BCJ 필터\n"
+" --sparc[=<옵션>] SPARC BCJ 필터\n"
+" 모든 BCJ 필터의 유효한 <옵션>:\n"
+" start=<숫자> 변환 시작 오프셋(기본값=0)"
+
+#: src/xz/message.c:1095
+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=<숫자> 각 바이트 값의 차이 값\n"
+" (1-256, 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+"기타 옵션:\n"
+
+#: src/xz/message.c:1106
+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 자세히 표시. 더 자세히 표시하려면 두번 지정합니다"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn 경고가 종료 상태에 영향을 주지 않게합니다"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot 기계 해석용 메시지를 사용합니다(스크립트에 적합)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory 총 사용 메모리양과 현재 활성 메모리 사용 제한 값을\n"
+" 표시하고 빠져나갑니다"
+
+#: src/xz/message.c:1119
+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 긴 도움말을 표시하고 빠져나갑니다"
+
+#: src/xz/message.c:1123
+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 긴 도움말을 표시합니다(고급 옵션도 나열)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version 버전 번호를 표시하고 빠져나갑니다"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"<파일> 값이 없거나, <파일> 값이 - 문자이면, 표준 입력을 읽습니다.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "<%s> (영문 또는 핀란드어)에 버그를 보고하십시오.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 홈페이지: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "!! 주의 !! 개발 버전이며 실제 사용 용도가 아닙니다."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: 옵션은 쉼표로 구분한 `이름=값' 쌍이어야합니다"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: 잘못된 옵션 이름"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: 잘못된 옵션 값"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "지원하지 않는 LZMA1/LZMA2 프리셋: %s"
+
+#: src/xz/options.c:356
+msgid "The sum of lc and lp must not exceed 4"
+msgstr "lc값과 lp값의 합이 4를 초과하면 안됩니다"
+
+#: src/xz/suffix.c:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: 파일 이름에 알 수 없는 확장자 붙음, 건너뜀"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: 파일에 이미 `%s' 확장자가 붙음, 건너뜀"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: 잘못된 파일 이름 확장자"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: 값은 10진 양수입니다"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: 잘못된 승수 후위 단위"
+
+#: src/xz/util.c:151
+msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
+msgstr "유효한 후위 단위는 `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30) 입니다."
+
+#: src/xz/util.c:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "`%s' 옵션 값은 범위[%<PRIu64>, %<PRIu64>] 안에 있어야 합니다"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "압축 데이터를 터미널에서 읽을 수 없습니다"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "압축 데이터를 터미널에 기록할 수 없습니다"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "표준 출력 기록 실패"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "알 수 없는 오류"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "선택한 일치 탐색기는 최소한 nice=%<PRIu32> 상태여야합니다"
+
+#~ 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 Header 플래그 압축용량 메모리사용량 필터"
diff --git a/po/pl.gmo b/po/pl.gmo
new file mode 100644
index 0000000..a40ccd7
--- /dev/null
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..1ce4e0c
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,1033 @@
+# Polish translation for xz.
+# This file is put in the public domain.
+# Jakub Bogusz <qboosh@pld-linux.org>, 2011-2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-19 21:30+0200\n"
+"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
+"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Błędny argument dla --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Zbyt dużo argumentów dla --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Nieznany typ formatu pliku"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Nieobsługiwany typ kontroli spójności"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, 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:691
+msgid "Compression support was disabled at build time"
+msgstr "Obsługa kompresji została wyłączona na etapie budowania"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Obsługa dekompresji została wyłączona na etapie budowania"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Kompresja plików lzip (.lz) nie jest osbługiwana"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "Przy --format=raw i zapisie do pliku wymagana jest opcja --suffix=.ROZ"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Maksymalna liczba filtrów to cztery"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Użycie ustawień predefiniowanych w trybie surowym jest odradzane."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Format .lzma obsługuje tylko filtr LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 nie może być używany z formatem .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Łańcuch filtrów jest niezgodny z --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Maksymalna liczba używanych wątków: %<PRIu32>."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Nieobsługiwany łańcuch filtrów lub opcje filtra"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Dekompresja będzie wymagała %s MiB pamięci."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, c-format
+msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
+msgstr "Skorygowano rozmiar słownika LZMA%c z %s MiB do %s MiB aby nie przekroczyć limitu użycia pamięci %s MiB"
+
+#: src/xz/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Błąd tworzenia potoku: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Nie udało się włączyć piaskownicy"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Nie można usunąć: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Nie można ustawić grupy pliku: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Nie można ustawić uprawnień pliku: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Jest dowiązaniem symbolicznym, pominięto"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Jest katalogiem, pominięto"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Nie jest zwykłym plikiem, pominięto"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Plik ma ustawiony bit sticky, pominięto"
+
+#: src/xz/file_io.c:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Pusta nazwa pliku, pominięto"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Zamknięcie pliku nie powiodło się: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Błąd odczytu: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Błąd podczas zmiany pozycji w pliku: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Nieoczekiwany koniec pliku"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Błąd zapisu: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Wyłączony"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Rozmiar pamięci fizycznej (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Liczba wątków procesora:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Kompresja:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Dekompresja:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Dekompresja wielowątkowa:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Domyślnie dla -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Informacje o sprzęcie:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Limity użycia pamięci"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Strumienie:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Bloki:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Rozmiar spakowany:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Rozmiar rozpakowany:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Współczynnik:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Kontrola spójności:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Wyrównanie strumienia:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Wymagana pamięć:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Rozmiar w nagłówkach:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Liczba plików:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Strumień"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Blok"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Bloki"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "Offset spak."
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "Offset rozp."
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "Rozm.spak."
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "Rozm.rozp."
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "Rozm.całk."
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Wsp."
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Kontrola"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "S.kontr."
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Wyrównanie"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Nagłówek"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Flagi"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "Uż.pamięci"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Nieznany-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Nieznany-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Nieznany-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Nieznany-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Nieznany-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Nieznany-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Nieznany-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Nieznany11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Nieznany12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Nieznany13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Nieznany14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Nieznany15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Plik jest pusty"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Strum. Bloki Spakowany Rozpakowany Wsp. Kontrola Nazwa pliku"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Tak"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Nie"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Minimalna wersja XZ Utils: %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Sumarycznie:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list nie obsługuje odczytu ze standardowego wejścia"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Błąd odczytu nazw plików: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Błąd wewnętrzny"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Nie można ustawić obsługi sygnałów"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Osiągnięto limit użycia pamięci"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Nie rozpoznany format pliku"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Nieobsługiwane opcje"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Dane skompresowane są uszkodzone"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Nieoczekiwany koniec wejścia"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Łańcuch filtrów: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Polecenie `%s --help' pokaże więcej informacji."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Składnia: %s [OPCJA]... [PLIK]...\n"
+"Kompresja lub dekompresja PLIKÓW w formacie .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Argumenty obowiązkowe dla opcji długich są obowiązkowe również dla opcji\n"
+"krótkich.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Tryb pracy:\n"
+
+#: src/xz/message.c:975
+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 wymuszenie kompresji\n"
+" -d, --decompress wymuszenie dekompresji\n"
+" -t, --test sprawdzenie spójności plików skompresowanych\n"
+" -l, --list wypisanie informacji o plikach .xz"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modyfikatory operacji:\n"
+
+#: src/xz/message.c:984
+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 zachowanie (nieusuwanie) plików wejściowych\n"
+" -f, --force nadpisywanie plików wyjściowych i (de)kompresja dowiązań\n"
+" -c, --stdout zapis na standardowe wyjście, nieusuwanie plików wej."
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream dekompresja tylko pierwszego strumienia, ciche\n"
+" zignorowanie pozostałych danych wejściowych"
+
+#: src/xz/message.c:996
+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 nietworzenie plików rzadkich podczas dekompresji\n"
+" -S, --suffix=.ROZ użycie rozszerzenia `.ROZ' dla plików skompresowanych\n"
+" --files[=PLIK] odczyt nazw plików do przetworzenia z PLIKU; jeśli PLIK\n"
+" nie został podany, nazwy są czytane ze standardowego\n"
+" wejścia; muszą być zakończone znakiem nowej linii\n"
+" --files0[=PLIK] podobnie do --files, ale znakiem kończącym musi być NUL"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Podstawowe opcje formatu pliku i kompresji:\n"
+
+#: src/xz/message.c:1007
+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 format pliki do kodowania lub dekodowania; możliwe to\n"
+" `auto' (domyślny), `xz', 'lzma', `lzip' i `raw'\n"
+" -C, --check=TEST typ kontroli spójności: `none' (ostrożnie!),\n"
+" `crc32', `crc64' (domyślny) lub `sha256'"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check bez kontroli sprawdzania integralności przy dekompresji"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 predefiniowane opcje kompresji; domyślna to 6; przed\n"
+" użyciem wartości 7-9 należy wziąć pod uwagę wykorzystanie\n"
+" pamięci przy kompresji *oraz* dekompresji!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme próba poprawy współczynnika kompresji z użyciem większej\n"
+" ilości czasu procesora; nie wpływa na wymagania\n"
+" pamięciowe dekompresora"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=ILE użycie maksymalnie ILU wątków; domyślnie 1; 0 oznacza\n"
+" tyle, ile jest rdzeni procesorów"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=ROZMIAR\n"
+" rozpoczęcie nowego bloku .xz co ROZMIAR bajtów wejścia;\n"
+" opcja służy do ustawienia rozmiaru bloku dla kompresji\n"
+" wielowątkowej"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=ROZMIARY\n"
+" rozpoczęcie nowego bloku .xz po rozdzielonych przecinkiem\n"
+" przedziałach danych nieskompresowanych"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=CZAS\n"
+" przy kompresji, jeśli minęło więcej niż CZAS milisekund\n"
+" ostatniegu zapisu bloku, a odczyt kolejnych danych byłby\n"
+" blokujący, wszystkie gotowe dane są zapisywane"
+
+#: src/xz/message.c:1043
+#, 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"
+" --memlimit-mt-decompress=LIMIT\n"
+" -M, --memlimit=LIMIT\n"
+" ustawienie limitu użycia pamięci dla kompresji,\n"
+" dekompresji, dekompresji wielowątkowej lub wszystkich;\n"
+" LIMIT jest w bajtach, % RAM lub 0 dla limitów domyślnych"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust jeśli ustawienia kompresji przekraczają limit użycia\n"
+" pamięci, zostanie zgłoszony błąd zamiast zmniejszania\n"
+" ustawień"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Łańcuch własnych filtrów do kompresji (alternatywa do używania -0 .. -9):"
+
+#: src/xz/message.c:1067
+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[=OPCJE] LZMA1 lub LZMA2; OPCJE to oddzielona przecinkami lista\n"
+" --lzma2[=OPCJE] zera lub więcej następujących opcji (w nawiasach wartości\n"
+" poprawne; domyślne):\n"
+" preset=PRE ustawienie opcji na predefiniowane (0-9[e])\n"
+" dict=ILE rozmiar słownika (4KiB - 1536MiB; 8MiB)\n"
+" lc=ILE liczba bitów kontekstu literału (0-4; 3)\n"
+" lp=ILE liczba bitów pozycji literału (0-4; 0)\n"
+" pp=ILE liczba bitów pozycji (0-4; 2)\n"
+" mode=TRYB tryb kompresji (fast, normal; normal)\n"
+" nice=ILE długość dopasowania (2-273; 64)\n"
+" mf=NAZWA dopasowywacz (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+" depth=ILE maks. głębokość szukania; 0=auto (domyślne)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPCJE] Filtr BCJ x86 (32-bitowy lub 64-bitowy)\n"
+" --arm[=OPCJE] Filtr BCJ ARM\n"
+" --armthumb[=OPCJE] Filtr BCJ ARM-Thumb\n"
+" --arm64[=OPCJE] Filtr BCJ ARM64\n"
+" --powerpc[=OPCJE] Filtr BCJ PowerPC (tylko big-endian)\n"
+" --ia64[=OPCJE] Filtr BCJ IA-64 (Itanium)\n"
+" --sparc[=OPCJE] Filtr BCJ SPARC\n"
+" Poprawne OPCJE dla wszystkich filtrów BCJ:\n"
+" start=ILE offset początku konwersji (domyślnie=0)"
+
+#: src/xz/message.c:1095
+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[=OPCJE] Filtr delta; poprawne OPCJE (poprawne wart.; domyślne):\n"
+" dist=ILE odległość między bajtami odejmowanymi od\n"
+" siebie (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Inne opcje:\n"
+
+#: src/xz/message.c:1106
+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 pominięcie ostrzeżeń; dwukrotne podanie pomija też błędy\n"
+" -v, --verbose więcej informacji; dwukrotne podanie to jeszcze więcej"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn ostrzeżenia nie mają wpływu na status zakończenia"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot komunikaty w formacie dla maszyny (do skryptów)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory wyświetlenie całkowitej ilości pamięci RAM oraz aktualnie\n"
+" aktywnych limitów pamięci i zakończenie pracy"
+
+#: src/xz/message.c:1119
+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 wyświetlenie krótkiego opisu (tylko podstawowe opcje)\n"
+" -H, --long-help wyświetlenie tego długiego opisu i zakończenie"
+
+#: src/xz/message.c:1123
+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 wyświetlenie tego krótkiego opisu i zakończenie\n"
+" -H, --long-help wyświetlenie długiego opisu (także opcje zaawansowane)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version wyświetlenie informacji o wersji i zakończenie"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Jeśli nie podano PLIKU lub PLIK to -, czytane jest standardowe wejście.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Błędy prosimy zgłaszać na adres <%s>\n"
+"(w języku angielskim lub fińskim).\n"
+"Błędy w tłumaczeniu prosimy zgłaszać na adres\n"
+"<translation-team-pl@lists.sourceforge.net>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Strona domowa %s: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "TA WERSJA JEST ROZWOJOWA, NIE PRZEZNACZONA DO UŻYTKU PRODUKCYJNEGO."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Opcje muszą być parami `nazwa=wartość' rozdzielonymi przecinkami"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Błędna nazwa opcji"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Błędna wartość opcji"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Nieobsługiwane ustawienie predefiniowane LZMA1/LZMA2: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Nazwa pliku ma nieznane rozszerzenie, pominięto"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Plik już ma rozszerzenie `%s', pominięto"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Błędne rozszerzenie nazwy pliku"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Wartość nie jest nieujemną liczbą całkowitą"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Błędny przyrostek mnożnika"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Wartość opcji `%s' musi być w przedziale [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Dane skompresowane nie mogą być czytane z terminala"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Dane skompresowane nie mogą być zapisywane na terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Zapis na standardowe wyjście nie powiódł się"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Nieznany błąd"
diff --git a/po/pt.gmo b/po/pt.gmo
new file mode 100644
index 0000000..cde956d
--- /dev/null
+++ b/po/pt.gmo
Binary files differ
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 0000000..fe8892d
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,1151 @@
+# Portuguese (Portugal) Translation for the xz Package
+# This file is put in the public domain.
+# .
+# Pedro Albuquerque <palbuquerque73@gmail.com>, 2019.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.2.4\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2019-09-27 08:08+0100\n"
+"Last-Translator: Pedro Albuquerque <palbuquerque73@gmail.com>\n"
+"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
+"Language: pt\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 2.91.7\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: argumento inválido para --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: demasiados argumentos para --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: tipo de formato de ficheiro desconhecido"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: tipo de verificação de integridade não suportado"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "A variável de ambiente %s contém demasiados argumentos"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "O suporte a compressão foi desactivado ao compilar"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "O suporte a descompressão foi desactivado ao compilar"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr ""
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: com --format=raw, --suffix=.SUF é requerido, a menos que seja escrito em stdout"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "O número máximo de filtros é quatro"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "O uso de uma predefinição em modo bruto é desencorajado."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "O formato .lzma tem só suporta o filtro LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "Impossível utilizar LZMA1 com o formato .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "A cadeia de filtros é incompatível com --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "A usar até %<PRIu32> linhas."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Opções de filtro ou cadeia de filtros não suportadas"
+
+#: src/xz/coder.c:278
+#, 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:310
+#, 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 "Ajustado o número de linhas de %s de %s para não exceder o limite de uso de memória de %s MiB"
+
+#: src/xz/coder.c:330
+#, 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:357
+#, 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 "Ajustado o número de linhas de %s de %s para não exceder o limite de uso de memória de %s MiB"
+
+#: src/xz/coder.c:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Erro ao criar um túnel: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Falha ao activar a Sandbox"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: impossível remover: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, 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:426
+#, 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:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: é uma ligação simbólica, a ignorar"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: é uma pasta, a ignorar"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: não é um ficheiro normal, a ignorar"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Nome de ficheiro vazio, a ignorar"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: falha ao fechar o ficheiro: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: erro de leitura: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: erro ao procurar o ficheiro: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: fim de ficheiro inesperado"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: erro de escrita: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Desactivado"
+
+# Espaços adicionados para manter alinhamento com mensagens adjacentes -- Rafael
+#: src/xz/hardware.c:269
+#, fuzzy
+#| msgid "Total amount of physical memory (RAM): "
+msgid "Amount of physical memory (RAM):"
+msgstr "Quantidade total de memória física (RAM): "
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr ""
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr ""
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr ""
+
+# Espaços reduzidos para manter alinhamento com mensagens adjacentes -- Rafael
+#: src/xz/hardware.c:273
+#, fuzzy
+#| msgid "Memory usage limit for decompression: "
+msgid "Multi-threaded decompression:"
+msgstr "Limite de uso de memória para descompressão: "
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr ""
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr ""
+
+#: src/xz/hardware.c:299
+#, fuzzy
+#| msgid "Memory usage limit reached"
+msgid "Memory usage limits:"
+msgstr "Limite de uso de memória alcançado"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr ""
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr ""
+
+#: src/xz/list.c:70
+#, fuzzy
+#| msgid " Compressed size: %s\n"
+msgid "Compressed size:"
+msgstr " Tam. comprimido: %s\n"
+
+#: src/xz/list.c:71
+#, fuzzy
+#| msgid " Uncompressed size: %s\n"
+msgid "Uncompressed size:"
+msgstr " Tam. descomprimido: %s\n"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr ""
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr ""
+
+#: src/xz/list.c:74
+#, fuzzy
+#| msgid " Stream padding: %s\n"
+msgid "Stream Padding:"
+msgstr " Espaço do fluxo: %s\n"
+
+#: src/xz/list.c:75
+#, fuzzy
+#| msgid " Memory needed: %s MiB\n"
+msgid "Memory needed:"
+msgstr " Memória requerida: %s MiB\n"
+
+# Espaço adicionado para promover alinhamento, vide "xz -lvv foo.xz"
+#: src/xz/list.c:76
+#, fuzzy
+#| msgid " Sizes in headers: %s\n"
+msgid "Sizes in headers:"
+msgstr " Tam. em cabeçalhos: %s\n"
+
+#: src/xz/list.c:79
+#, fuzzy
+#| msgid " Number of files: %s\n"
+msgid "Number of files:"
+msgstr " Nº. de ficheiros: %s\n"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr ""
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr ""
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr ""
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr ""
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr ""
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr ""
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr ""
+
+#: src/xz/list.c:129
+#, fuzzy
+#| msgid "Totals:"
+msgid "TotalSize"
+msgstr "Totais:"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr ""
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr ""
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr ""
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr ""
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr ""
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr ""
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr ""
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "SemNome-2"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "SemNome-3"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "SemNome-5"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "SemNome-6"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "SemNome-7"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "SemNome-8"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "SemNome-9"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "SemNome-11"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "SemNome-12"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "SemNome-13"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "SemNome-14"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "SemNome-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: o ficheiro está vazio"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Fluxos Blocos Comprimido Descomprimido Rácio Verif. Nome de ficheiro"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Sim"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Não"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Totais:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list não suporta a leitura da entrada padrão"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: erro ao ler nomes de ficheiro: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Erro interno (erro)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Impossível estabelecer gestores de sinais"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Limite de uso de memória alcançado"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Formato de ficheiro não reconhecido"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Opções não suportadas"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Os dados comprimidos estão corrompidos"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Fim de entrada inesperado"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: cadeia de filtros: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Tente \"%s --help\" para mais informações."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Uso: %s [OPÇÕES]... [FICHEIRO]...\n"
+"Comprime ou descomprime FICHEIROs no formato .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Argumentos obrigatórios para opções longas são também obrigatórios para\n"
+"opções curtas.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Modo de operação:\n"
+
+#: src/xz/message.c:975
+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 ficheiro comprimido\n"
+" -l, --list lista informações sobre ficheiros .xz"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modificadores de operações:\n"
+
+#: src/xz/message.c:984
+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 elimina) os ficheiros de entrada\n"
+" -f, --force força a sobreposição do ficheiro de saída e a \n"
+" (des)compressão de ligações\n"
+" -c, --stdout escreve na saída padrão e não elimina os ficheiros de\n"
+" entrada"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream descomprime só o primeiro fluxo e ignora silenciosamente\n"
+" possíveis dados de entrada restantes"
+
+#: src/xz/message.c:996
+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 ficheiros escassos ao descomprimir\n"
+" -S, --suffix=.SUF usa o sufixo \".SUF\" em ficheiros comprimidos\n"
+" --files[=FICH] lê nomes de ficheiros para processar de FICH;\n"
+" se FICH for omitido, os nomes de ficheiros são\n"
+" lidos da entrada padrão; os nomes de ficheiros\n"
+" devem ser terminados com o carácter de nova linha\n"
+" --files0[=FICH] igual a --files, mas usa o carácter nulo como terminador"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Opções básicas de formato e compressão de ficheiro:\n"
+
+#: src/xz/message.c:1007
+#, fuzzy
+#| msgid ""
+#| " -F, --format=FMT file format to encode or decode; possible values are\n"
+#| " `auto' (default), `xz', `lzma', and `raw'\n"
+#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+#| " `crc32', `crc64' (default), or `sha256'"
+msgid ""
+" -F, --format=FMT file format to encode or decode; possible values are\n"
+" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
+" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+" `crc32', `crc64' (default), or `sha256'"
+msgstr ""
+" -F, --format=FMT formato de ficheiro a codificar ou descodificar; os\n"
+" valores possíveis são \"auto\" (predefinição), \"xz\",\n"
+" \"lzma\" e \"raw\"\n"
+" -C, --check=TESTE tipo de teste de integridade: \"none\" (cuidado!),\n"
+" \"crc32\", \"crc64\" (predefinição) ou \"sha256\""
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check não verifica a integridade ao descomprimir"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 predefinição de compressão; a predefinição é 6; tenha em\n"
+" conta o uso de memória do compressor *e* descompressor\n"
+" antes de usar 7-9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme tenta melhorar o rácio de compressão usando mais tempo de\n"
+" CPU; não afecta os requisitos de memória do descompressor"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NÚM usa no máximo NÚM linhas; a predefinição é 1; defina para\n"
+" 0 para usar tantas linhas como núcleos de processadores\n"
+" haja"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=TAM\n"
+" inicia novo bloco .xz após cada TAM bytes de entrada;\n"
+" use para definir o tamanho de bloco para compressão com\n"
+" linhas"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=TAM\n"
+" inicia um novo bloco .xz após os intervalos dados,\n"
+" separados por vírgulas, de dados descomprimidos"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=EXPIRA\n"
+" ao comprimir, se mais de EXPIRA milissegundos tiverem\n"
+" passado desde o despejo anterior e ler mais dados da\n"
+" entrada bloquearia, todos os dados pendentes serão\n"
+" despejados"
+
+#: src/xz/message.c:1043
+#, fuzzy, no-c-format
+#| msgid ""
+#| " --memlimit-compress=LIMIT\n"
+#| " --memlimit-decompress=LIMIT\n"
+#| " -M, --memlimit=LIMIT\n"
+#| " set memory usage limit for compression, decompression,\n"
+#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
+msgid ""
+" --memlimit-compress=LIMIT\n"
+" --memlimit-decompress=LIMIT\n"
+" --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"
+" -M, --memlimit=LIMITE\n"
+" define o limite de uso de memória para compressão,\n"
+" descompressão ou ambos; LIMITE é em bytes, % de RAM ou 0\n"
+" para predefinições"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust se as configurações de compressão excederem o limite de\n"
+" uso de memória, devolve um erro em vez de reduzir as\n"
+" configurações"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Cadeia de filtros personalizada para compressão (alternativa às predefinições):"
+
+#: src/xz/message.c:1067
+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 ou LZMA2; OPÇÕES é uma lista separada por vírgulas\n"
+" de zero ou mais das opções abaixo (valores válidos,\n"
+" --lzma2[=OPÇÕES] predefinição):\n"
+" preset=PRE repõe as opções para predefinição (0-9[e])\n"
+" dict=NÚM tamanho do dicionário (4KiB - 1536MiB; 8MiB)\n"
+" lc=NÚM número de bits de contexto literal (0-4; 3)\n"
+" lp=NÚM número de bits de posição literal (0-4; 0)\n"
+" pb=NÚM número de bits de posição (0-4; 2)\n"
+" mode=MODO modo de compressão (fast, normal; normal)\n"
+" nice=NÚM tamanho agradável de correspondência (2-273;\n"
+" 64)\n"
+" mf=NOME localizador de correspondência (hc3, hc4,\n"
+" bt2, bt3, bt4; bt4)\n"
+" depth=NUM máximo de profundidade de pesquisa;\n"
+" 0=automatic (predefinição)"
+
+#: src/xz/message.c:1082
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
+#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
+#| " --sparc[=OPTS] SPARC BCJ filter\n"
+#| " Valid OPTS for all BCJ filters:\n"
+#| " start=NUM start offset for conversions (default=0)"
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPÇÕES] filtro BCJ x86 (32 bits e 64 bits)\n"
+" --powerpc[=OPÇÕES] filtro BCJ PowerPC (só big endian)\n"
+" --ia64[=OPÇÕES] filtro BCJ IA-64 (Itanium)\n"
+" --arm[=OPÇÕES] filtro BCJ ARM (só little endian)\n"
+" --armthumb[=OPÇÕES] filtro BCJ ARM-Thumb (só little endian)\n"
+" --sparc[=OPÇÕES] filtro BCJ SPARC\n"
+" OPÇÕES válidas para todos os filtros BCJ:\n"
+" start=NUM desvio inicial para conversões\n"
+" (predefinição=0)"
+
+#: src/xz/message.c:1095
+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,\n"
+" predefinição):\n"
+" dist=NÚM distância entre bytes a serem subtraídos\n"
+" de cada um (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Outras opções:\n"
+
+#: src/xz/message.c:1106
+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 também erros\n"
+" -v, --verbose é verboso; use duas vezes para ainda mais verbosidade"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn fazer avisos não afecta o estado da saída"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot usa mensagens analisáveis por máquina (útil para scripts)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory mostra a quantidade total de RAM e os limites de uso\n"
+" de memória actualmente activos e sai"
+
+#: src/xz/message.c:1119
+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 a ajuda curta (lista só as opções básicas)\n"
+" -H, --long-help mostra esta mensagem de ajuda e sai"
+
+#: src/xz/message.c:1123
+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 esta mensagem de ajuda e sai\n"
+" -H, --long-help mostra a ajuda longa (lista também as opções avançadas)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version mostra o número da versão e sai"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Sem FICH, ou quando FICH é -, lê da entrada padrão.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Reporte erros em <%s> (em inglês ou finlandês).\n"
+"Relate erros de tradução em <translation-team-pt@lists.sourceforge.net>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Página inicial %s: <%s>\n"
+
+#: src/xz/message.c:1142
+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."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: 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:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: nome de opção inválido"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: valor de opção inválido"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Predefinição LZMA1/LZMA2 não suportada: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: nome de ficheiro com sufixo desconhecido, a ignorar"
+
+#: src/xz/suffix.c:181
+#, 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:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: sufixo de nome de ficheiro inválido"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: o valor não é um inteiro decimal não-negativo"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: sufixo multiplicador inválido"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "O valor da opção \"%s\" deve estar no intervalo [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Dados comprimidos não podem ser lidos de um terminal"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Dados comprimidos não podem ser escritos num terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "A escrita para a saída padrão falhou"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Erro desconhecido"
+
+# Espaços adicionados para manter alinhamento com mensagens adjacentes -- Rafael
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Limite de uso de memória para compressão: "
+
+#, c-format
+#~ msgid " Streams: %s\n"
+#~ msgstr " Fluxos: %s\n"
+
+#, c-format
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Blocos: %s\n"
+
+#, c-format
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Rácio: %s\n"
+
+#, c-format
+#~ 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 DesvioComp DesvioDescomp Tam.Comp TamDescomp Rácio Verif Espaço"
+
+#, c-format
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Blocos:\n"
+#~ " Fluxo Bloco DesvioComp DesvioDescomp Tam.Total TamDescomp Rácio Verif"
+
+#, c-format
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " ValVerif %*s Cabeç. Band. Tam.Comp UsoMem. Filtros"
+
+#, c-format
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "O localizador de correspondência seleccionado requer pelo menos nice=%<PRIu32>"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "A Sandbox está desactivada devido a argumentos de linha de comandos incompatíveis"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "A Sandbox foi activada com sucesso"
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
new file mode 100644
index 0000000..2a77d33
--- /dev/null
+++ b/po/pt_BR.gmo
Binary files differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 0000000..766f917
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,1097 @@
+# Brazilian Portuguese translations for xz package
+# Traduções em português brasileiro para o pacote xz.
+# This file is put in the public domain.
+# Rafael Fontenelle <rafaelff@gnome.org>, 2019-2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.0-pre2\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-01-12 14:40-0300\n"
+"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
+"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge.net>\n"
+"Language: pt_BR\n"
+"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"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Argumento inválido para --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Argumentos demais para --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Tipo de formato de arquivo desconhecido"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Tipo de verificação de integridade sem suporte"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "A variável de ambiente %s contém argumentos demais"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Suporte a compressão foi desabilitado em tempo de compilação"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Suporte a descompressão foi desabilitado em tempo de compilação"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "A compactação de arquivos lzip (.lz) não é suportada"
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: Com --format=raw, --suffix=.SUF é exigido, a menos que esteja escrevendo para stdout"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "O número máximo de filtros é quatro"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "O uso de uma predefinição em modo bruto é desencorajado."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "O formato .lzma possui suporte apenas ao filtro LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 não pode ser usado com o formato .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "A cadeia de filtros é incompatível com --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Usando até %<PRIu32> threads."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Opções de filtro ou cadeia de filtros sem suporte"
+
+#: src/xz/coder.c:278
+#, 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:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Erro ao criar um pipe: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Falha ao habilitar o sandbox"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Não foi possível remover: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, 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:426
+#, 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:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: É um link simbólico, ignorando"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: É um diretório, ignorando"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Não é um arquivo comum, ignorando"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Nome de arquivo vazio, ignorando"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Fechamento do arquivo falhou: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Erro de leitura: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Erro ao buscar o arquivo: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Fim de arquivo inesperado"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Erro de escrita: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Desabilitado"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Quantidade total de memória física (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Número de threads de processador:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Compactação:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Descompactação:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Descompactação com várias threads:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Padrão para -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Informações de hardware:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Memory usage limits:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Fluxos:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Blocos:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Tamanho compactado:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Tamanho não compactado:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Proporção:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Verificação:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Ajuste do fluxo:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Memória exigida:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Tamanhos nos cabeçalhos:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Número de arquivos:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Fluxo"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Bloco"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Blocos"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "DeslocComp"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "DeslocDescomp"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "TamComp"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "TamDescomp"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "TamTotal"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Proporção"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Verificação"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "ValorVerific."
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Preench."
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Cabeçalho"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Sinalizadores"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "UsoMem"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Incógnito2"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Incógnito3"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Incógnito5"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Incógnito6"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Incógnito7"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Incógnito8"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Incógnito9"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Incógnito11"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Incógnito12"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Incógnito13"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Incógnito14"
+
+# Não exceder 10 caracteres e espaços não são permitidos -- Rafael
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Incógnito15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: O arquivo está vazio"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Fluxos Blocos Comprimido Descomprimid Propo Verif Nome de Arquivo"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Sim"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Não"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Totais:"
+
+#: src/xz/list.c:1270
+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:1276
+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:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Erro ao ler nomes de arquivo: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Erro interno (bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Não foi possível estabelecer manipuladores de sinais"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Limite de uso de memória alcançado"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Formato de arquivo não reconhecido"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Opções sem suporte"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Os dados comprimidos estão corrompidos"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Fim da entrada inesperado"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Cadeia de filtros: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Tente \"%s --help\" para mais informações."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Uso: %s [OPÇÕES]... [ARQUIVO]...\n"
+"Comprime e descomprime ARQUIVOs no formato .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Argumentos obrigatórios para opções longas também o são para opções curtas.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Modo de operação:\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modificadores de opções:\n"
+
+#: src/xz/message.c:984
+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"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" 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"
+
+#: src/xz/message.c:996
+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"
+" ser terminados com o caractere de nova linha\n"
+" --files0[=ARQUIVO]\n"
+" similar a --files, mas usa o caractere nulo como\n"
+" terminador"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Opções básicas de formato de arquivo e compressão:\n"
+
+#: src/xz/message.c:1007
+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\""
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check não faz a verificação de integridade ao descomprimir"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" 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!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" 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"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NÚM usa no máximo NÚM threads; o padrão é 1; defina para\n"
+" 0 para usar o máximo de threads que há de núcleos de\n"
+" processador"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=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:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=TAM\n"
+" inicia um novo bloco .xz após os intervalos dados,\n"
+" separados por vírgula, de dados descomprimidos"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=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:1043
+#, 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"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" 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"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Cadeia de filtros personalizada para compressão (alternativa à predefinição):"
+
+#: src/xz/message.c:1067
+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)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+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"
+" OPÇÕES válidas para todos os filtros BCJ:\n"
+" start=NUM deslocamento inicial para conversões\n"
+" (padrão=0)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Outras opções:\n"
+
+#: src/xz/message.c:1106
+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"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn faz os avisos não afetarem o status de saída"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot usa mensagens analisáveis por máquina (útil p/ scripts)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" 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"
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version exibe o número de versão e sai"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Relate erros para <%s> (em inglês ou finlandês).\n"
+"Relate erros de tradução para <https://translationproject.org/team/pt_BR.html>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Site do %s: <%s>\n"
+
+#: src/xz/message.c:1142
+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."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: 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:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Nome de opção inválido"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Valor de opção inválido"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Predefinição LZMA1/LZMA2 sem suporte: %s"
+
+#: src/xz/options.c:356
+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:160
+#, 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:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: O arquivo já tem o sufixo \"%s\", ignorando"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Sufixo de nome de arquivo inválido"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: O valor não é um inteiro integral decimal"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Sufixo multiplicador inválido"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "O valor da opção \"%s\" deve estar no intervalo [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Dados comprimidos não podem ser lidos de um terminal"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Dados comprimidos não podem ser escrito para um terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "A escrita para a saída padrão falhou"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Erro desconhecido"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Sandbox está desabilitado em razão de argumentos de linha de comando incompatíveis"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Sandbox foi habilitado com sucesso"
+
+# Espaços adicionados para manter alinhamento com mensagens adjacentes -- Rafael
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Limite de uso de memória para compressão: "
+
+#~ 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=%<PRIu32>"
+#~ msgstr "O localizador de correspondência selecionado requer pelo menos nice=%<PRIu32>"
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 0000000..8c70dfb
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -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/po/ro.gmo b/po/ro.gmo
new file mode 100644
index 0000000..5a6638e
--- /dev/null
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
new file mode 100644
index 0000000..1b406de
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,1138 @@
+# Romanian translation for xz.
+# Mesajele în limba română pentru pachetul xz.
+# This file is put in the public domain.
+#
+# Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 2022 = 2023.
+#
+# 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 Y, făcută de X, Z(luna-anul).
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-19 19:34+0200\n"
+"Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
+"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\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.2.2\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Argument nevalid pentru opțiunea „--block-list”"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Prea multe argumente pentru opțiunea „--block-list”"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Tip de format de fișier necunoscut"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Tip de verificare a integrității neacceptat"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, 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:691
+msgid "Compression support was disabled at build time"
+msgstr "Suportul de comprimare a fost dezactivat în timpul construirii"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Suportul de decomprimare a fost dezactivat în timpul construirii"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Comprimarea fișierelor lzip (.lz) nu este acceptată"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "Cu --format=raw, este necesar --suffix=.SUF, cu excepția cazului în care se scrie la ieșirea standard(stdout)"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Numărul maxim de filtre este patru"
+
+#: src/xz/coder.c:135
+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."
+
+# 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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Utilizarea unei presetări în modul brut este descurajată."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Formatul .lzma acceptă numai filtrul LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 nu poate fi utilizat cu formatul .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Lanțul de filtre este incompatibil cu opțiunea „--flush-timeout”"
+
+#: src/xz/coder.c:226
+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”"
+
+# 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 %<PRIu32> 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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Se utilizează până la %<PRIu32> fire de execuție."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Lanț de filtre sau opțiuni de filtrare neacceptate"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Decomprimarea va avea nevoie de %sMio de memorie."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Eroare la crearea unei conducte(pipe): %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Nu s-a reușit activarea cutiei de probă(sandbox)"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Nu se poate elimina: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, 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:426
+#, 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:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Este o legătură simbolică, se omite"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Este un director, se omite"
+
+#: src/xz/file_io.c:707
+#, 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:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Numele fișierului este gol, se omite"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Închiderea fișierului a eșuat: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Eroare de citire: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Eroare la căutarea fișierului: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Sfârșit neașteptat al fișierului"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Eroare de scriere: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Dezactivat"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Cantitatea totală de memorie fizică (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Numărul de fire de execuție ale procesorului:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Comprimare:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Decomprimare:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Decomprimare 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:274
+msgid "Default for -T0:"
+msgstr "Implicit pentru -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Informații despre componentele mașinii:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Limitele de utilizare a memoriei:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Fluxuri:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Blocuri:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Dimensiune comprimată:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Dimensiune decomprimată:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Raport:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Verificare:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Completare flux:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Memorie necesară:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Dim. în antete:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Numărul de fișiere:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Flux"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Bloc"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Blocuri"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "PozițieComprim"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "PozițieDecomprim"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "DimComp"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "DimDecomp"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "DimTotală"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Raport"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Verificare"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "ValVerificare"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Completare"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Antet"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Indicatori"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "UtilizareMem"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Necunos-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Necunos-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Necunos-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Necunos-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Necunos-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Necunos-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Necunos-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Necunos-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Necunos-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Necunos-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Necunos-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Necunos-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Fișierul este gol"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Fluxuri Blocuri Comprimare Decomprimare Raport Verificare Nume fișier"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Da"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Nu"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Versiunea minimă 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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Totaluri:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list nu acceptă citirea de la intrarea standard"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Eroare la citirea numelor de fișiere: %s"
+
+#: src/xz/main.c:96
+#, 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
+# traducere 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:120
+#, 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:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "Comprimarea și decomprimarea cu „--robot” nu sunt încă acceptate."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Eroare internă (bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Nu se pot stabili operatorii de semnal"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Limita de utilizare a memoriei a fost atinsă"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Formatul fișierului nu este recunoscut"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Opțiuni neacceptate"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Datele comprimate sunt corupte"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Sfârșit neașteptat al intrării"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "Se necesită %s Mio de memorie. Limitarea este dezactivată."
+
+#: src/xz/message.c:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Lanț de filtre: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Încercați «%s --help» pentru mai multe informații."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Utilizare: %s [OPȚIUNE]... [FIȘIER]...\n"
+"Comprimă sau decomprimă FIȘIER(e) în formatul .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Argumentele obligatorii pentru opțiunile lungi sunt obligatorii și\n"
+"pentru opțiunile scurte.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Mod de operare:\n"
+
+#: src/xz/message.c:975
+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țează comprimarea\n"
+" -d, --decompress forțează decomprimarea\n"
+" -t, --test testează integritatea fișierului comprimat\n"
+" -l, --list listează informații despre fișierele .xz"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Modificatori de operare:\n"
+
+#: src/xz/message.c:984
+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 păstrează (nu șterge) fișierele de intrare\n"
+" -f, --force forțează suprascrierea fișierului de ieșire și\n"
+" (de)comprimă legăturile\n"
+" -c, --stdout scrie la ieșirea standard și nu șterge fișierele de\n"
+" intrare"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream decomprimă doar primul flux și ignoră în tăcere\n"
+" posibilele date de intrare rămase"
+
+#: src/xz/message.c:996
+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 nu creează fișiere disperse când decomprimă\n"
+" -S, --suffix=.SUF utilizează sufixul „.SUF” pentru fișierele comprimate\n"
+" --files[=FIȘIER]\n"
+" citește numele fișierelor de procesat din FIȘIER;\n"
+" dacă FIȘIER este omis, numele de fișiere sunt citite\n"
+" de la intrarea standard; numele de fișiere trebuie să\n"
+" fie terminate cu caracterul de linie nouă\n"
+" --files0[=FIȘIER]\n"
+" ca --files, dar folosește caracterul nul(null) ca\n"
+" terminator"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Formatul de bază al fișierului și opțiunile de comprimare:\n"
+
+#: src/xz/message.c:1007
+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=FORMAT\n"
+" formatul de fișier pentru codificare sau decodificare;\n"
+" valorile posibile sunt „auto” (implicit), „xz”,\n"
+" „lzma”, „lzip” și „raw”\n"
+" -C, --check=VERIFICARE\n"
+" tip de verificare a integrității: „none” (utilizați\n"
+" cu precauție), „crc32”, „crc64” (implicit) sau\n"
+" „sha256”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check nu se efectuează verificarea integrității la decomprimare"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 presetare comprimare; valoarea implicită este 6;\n"
+" luați în considerare memoria utilizată de instrumentul de\n"
+" comprimare *și* de instrumentul de decomprimare, înainte\n"
+" de a utiliza presetările 7-9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme încearcă să îmbunătățească raportul de comprimare\n"
+" folosind mai mult timp CPU-ul; nu afectează cerințele\n"
+" de memorie ale instrumentului de decomprimare"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NUMĂR\n"
+" utilizați cel mult NUMĂR fire de execuție; implicit\n"
+" este 1; specificați valoarea 0 pentru a utiliza atâtea\n"
+" fire de execuție câte nuclee de procesor există"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=DIM\n"
+" începe un nou bloc .xz după fiecare DIM octeți de intrare\n"
+" utilizați acest lucru pentru a stabili dimensiunea\n"
+" blocului pentru comprimarea cu fire de execuție"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=DM\n"
+" începe un nou bloc .xz după intervalele date separate\n"
+" prin virgulă, de date necomprimate"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=TIMP_LIMITĂ\n"
+" la comprimare, dacă au trecut mai mult de TIMP_LIMITĂ\n"
+" milisecunde de la curățarea anterioară și citirea mai\n"
+" multor intrări s-ar bloca, toate datele în așteptare\n"
+" sunt eliminate"
+
+#: src/xz/message.c:1043
+#, 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=LIMITA\n"
+" --memlimit-decompress=LIMITA\n"
+" --memlimit-mt-decompress=LIMITA\n"
+" -M, --memlimit=LIMITA\n"
+" stabilește limita de utilizare a memoriei pentru\n"
+" comprimare, decomprimare, decomprimare cu fire de\n"
+" execuție sau toate acestea; LIMITA este exprimată în\n"
+" octeți, % din RAM sau 0 pt. a activa valoarea implicită"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust dacă setările de comprimare depășesc limita de utilizare\n"
+" a memoriei, dă o eroare în loc să reducă val. stabilite"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Lanț de filtrare personalizat pentru comprimare (alternativă la utilizarea\n"
+" presetărilor):"
+
+#: src/xz/message.c:1067
+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ȚIUNI] LZMA1 sau LZMA2; OPȚIUNI este o listă separată prin\n"
+" --lzma2[=OPȚIUNI] virgulă, de niciuna sau de mai multe dintre următoarele\n"
+" opțiuni (între paranteze: valorile valide, și cele\n"
+" implicite):\n"
+" preset=PRE resetează opțiunile la o presetare (0-9[e])\n"
+" dict=NUM dimensiunea dicționarului (4Ko - 1536Mo;\n"
+" 8Mo)\n"
+" lc=NUM numărul de biți de context literal (0-4; 3)\n"
+" lp=NUM numărul de biți de poziție literală (0-4; 0)\n"
+" pb=NUM numărul de biți de poziție (0-4; 2)\n"
+" mode=MOD modul de comprimare (fast, normal; normal)\n"
+" nice=NUM lungimea „drăguță” a unei potriviri (2-273;\n"
+" 64)\n"
+" mf=NUME găsitor de potriviri (hc3, hc4, bt2, bt3,\n"
+" bt4; bt4)\n"
+" depth=NUM adâncimea maximă de căutare; 0=automată\n"
+" (valoarea implicită)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPȚIUNI] filtru BCJ x86 (32-biți și 64-biți)\n"
+" --arm[=OPȚIUNI] filtru BCJ ARM\n"
+" --armthumb[=OPȚ] filtru BCJ ARM-Thumb\n"
+" --arm64[=OPȚIUNI] filtru ARM64 BCJ\n"
+" --powerpc[=OPȚIUNI] filtru BCJ PowerPC (numai big endian)\n"
+" --ia64[=OPȚIUNI] filtru BCJ IA-64 (Itanium)\n"
+" --sparc[=OPȚIUNI] filtru BCJ SPARC\n"
+" OPȚIUNI valide pentru toate filtrele BCJ:\n"
+" start=NUM poziția de pornire a conversiilor (implicit=0)"
+
+#: src/xz/message.c:1095
+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ȚIUNI] OPȚIUNI valide (valori valide; valoarea implicită):\n"
+" dist=NUM distanța dintre octeți fiind dedusă\n"
+" scăzând un octet din celălalt (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Alte opțiuni:\n"
+
+#: src/xz/message.c:1106
+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 suprimă avertismentele; specificați de două ori pentru\n"
+" a suprima și erorile\n"
+" -v, --verbose descriere detaliată; specificați de două ori pentru și\n"
+" mai multe detalii"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn face ca avertismentele să nu afecteze starea de ieșire"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot utilizează mesaje analizabile de mașină (utile pentru\n"
+" scripturi)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory afișează cantitatea totală de memorie RAM și limitele de\n"
+" utilizare a memoriei active în prezent, și iese"
+
+#: src/xz/message.c:1119
+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 afișează ajutorul scurt (enumeră doar opțiunile de bază)\n"
+" -H, --long-help afișează acest ajutor lung(detaliat) și iese"
+
+#: src/xz/message.c:1123
+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 afișează acest scurt mesaj de ajutor, și iese\n"
+" -H, --long-help afișează mesajul detaliat de ajutor (afișează și opțiunile\n"
+" avansate)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version afișează numărul versiunii, și iese"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Fără FIȘIER, sau când FIȘIER este -, citește intrarea standard.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Raportați erorile la <%s> (în engleză sau finlandeză).\n"
+"Raportați erorile de traducere la <translation-team-ro@lists.sourceforge.net>\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Pagina principală a %s: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "ACEASTA ESTE O VERSIUNE DE DEZVOLTARE, NEDESTINATĂ UTILIZĂRII ÎN PRODUCȚIE."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Opțiunile trebuie să fie perechi „nume=valoare” separate prin virgule"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Nume de opțiune nevalid"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Valoare nevalidă a opțiunii"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Presetare LZMA1/LZMA2 neacceptată: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Numele fișierului are un sufix necunoscut, care se omite"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Fișierul are deja sufixul „%s”, se omite"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Sufixul numelui de fișier nu este valid"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Valoarea nu este un număr întreg zecimal nenegativ"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Sufix multiplicator nevalid"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Valoarea opțiunii „%s” trebuie să fie în intervalul [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Datele comprimate nu pot fi citite de pe un terminal"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Datele comprimate nu pot fi scrise pe un terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Scrierea la ieșirea standard a eșuat"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Eroare necunoscută"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "Găsitorul de potriviri selectat necesită cel puțin nice=%<PRIu32>"
+
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Limita de utilizare a memoriei pentru comprimare: "
+
+#~ msgid " Streams: %s\n"
+#~ msgstr " Fluxuri: %s\n"
+
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Blocuri: %s\n"
+
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Raport: %s\n"
+
+#~ msgid " Check: %s\n"
+#~ msgstr " Verificare: %s\n"
+
+#~ msgid ""
+#~ " Streams:\n"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+#~ msgstr ""
+#~ " Fluxuri:\n"
+#~ " Flux Blocuri DecalajComp. DecalajDecomp. Dim.Comp. Dim.Decomp. Raport Verif. Compl.Flux"
+
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Blocuri:\n"
+#~ " Flux Bloc DecalajComp. DecalajDecomp. Dim.Totală Dim.Decomp. Raport Verif."
+
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " Val.Verif. %*sAntet Indicat. Dim.Comp. UzMem. Filtre"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Cutia de probă(sandbox) este dezactivată din cauza argumentelor incompatibile din linia de comandă"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Cutia de probă(sandbox) a fost activată cu succes"
diff --git a/po/sr.gmo b/po/sr.gmo
new file mode 100644
index 0000000..e6fb61b
--- /dev/null
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
new file mode 100644
index 0000000..524460c
--- /dev/null
+++ b/po/sr.po
@@ -0,0 +1,1137 @@
+# Serbian translation of xz.
+# This file is put in the public domain.
+# Мирослав Николић <miroslavnikolic@rocketmail.com>, 2020.
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.2.4\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2022-06-24 22:07+0800\n"
+"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\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"
+"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"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Неисправан аргумент за „--block-list“"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Превише аргумената за „--block-list“"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0 се може користити само као последњи елемент у „--block-list“-у"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Непозната врста формата датотеке"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Неподржана врста провере целовитости"
+
+#: src/xz/args.c:518
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "Само једну датотеку можете навести са „--files“ или „--files0“."
+
+#. TRANSLATORS: This is a translatable
+#. string because French needs a space
+#. before the colon ("%s : %s").
+#: src/xz/args.c:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "Променљива окружења „%s“ садржи превише аргумената"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Подршка запакивања је искључена у време изградње"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Подршка распакивања је искључена у време изградње"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr ""
+
+#: src/xz/args.c:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: Са „--format=raw“, „--suffix=.SUF“ је потребно осим ако пише на стандардни излаз"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Највећи број филтера је четири"
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "Ограничење коришћења меморије је премало за дато подешавање филтера."
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Коришћење претподешавања у сировом режиму је обесхрабрујуће."
+
+#: src/xz/coder.c:172
+msgid "The exact options of the presets may vary between software versions."
+msgstr "Тачне опције претподешавања се могу разликовати од издања до издања софтвера."
+
+#: src/xz/coder.c:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Формат „.lzma“ подржава само „LZMA1“ филтер"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "Не можете користити „LZMA1“ са „.xz“ форматом"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Ланац филтера није сагласан са „--flush-timeout“"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "Пребацујем се на режим једне нити због „--flush-timeout“"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Користим до %<PRIu32> нити."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Неподржан ланац филтера или опције филтера"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "За распакивање ће бити потребно %s MiB меморије."
+
+#: src/xz/coder.c:310
+#, 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 "Број нити је промењен са %s на %s да се неби прекорачило ограничење коришћења меморије од %s MiB"
+
+#: src/xz/coder.c:330
+#, 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:357
+#, 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 "Број нити је промењен са %s на %s да се неби прекорачило ограничење коришћења меморије од %s MiB"
+
+#: src/xz/coder.c:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Грешка стварања спојке: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Нисам успео да укључим безбедно окружење"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s: Изгледа да је датотека премештена, не уклањам"
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Не могу да уклоним: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Не могу да поставим власника датотеке: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Не могу да поставим групу датотеке: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Не могу да поставим овлашћења датотеке: %s"
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr "Грешка добављања заставица стања датотеке са стандардног улаза: %s"
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Јесте симболичка веза прескачем"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Јесте директоријум, прескачем"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Није обична датотека, прескачем"
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s: Датотека има постављен „setuid“ или „setgid“ бит, прескачем"
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Датотека има постављен лепљиви бит, прескачем"
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s: Улазна датотека има више од једне чврсте везе, прескачем"
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr "Празан назив датотеке, прескачем"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "Грешка повраћаја заставица стања на стандардни улаз: %s"
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr "Грешка добављања заставица стања датотеке са стандардног излаза: %s"
+
+#: src/xz/file_io.c:1081
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr "Грешка повраћаја заставице „O_APPEND“ на стандардни излаз: %s"
+
+#: src/xz/file_io.c:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Затварање датотеке није успело: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr "%s: Премотавање није успело приликом покушаја прављења оскудне датотеке: %s"
+
+#: src/xz/file_io.c:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Грешка читања: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Грешка приликом претраге датотеке: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Неочекиван крај датотеке"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Грешка писања: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Искључено"
+
+#: src/xz/hardware.c:269
+#, fuzzy
+#| msgid "Total amount of physical memory (RAM): "
+msgid "Amount of physical memory (RAM):"
+msgstr "Укупна количина физичке меморије (RAM): "
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr ""
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr ""
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr ""
+
+#: src/xz/hardware.c:273
+#, fuzzy
+#| msgid "Memory usage limit for decompression: "
+msgid "Multi-threaded decompression:"
+msgstr "Ограничење коришћења меморије за распакивање: "
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr ""
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr ""
+
+#: src/xz/hardware.c:299
+#, fuzzy
+#| msgid "Memory usage limit reached"
+msgid "Memory usage limits:"
+msgstr "Ограничење коришћења меморије је достигнуто"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr ""
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr ""
+
+#: src/xz/list.c:70
+#, fuzzy
+#| msgid " Compressed size: %s\n"
+msgid "Compressed size:"
+msgstr " Величина сажетог: %s\n"
+
+#: src/xz/list.c:71
+#, fuzzy
+#| msgid " Uncompressed size: %s\n"
+msgid "Uncompressed size:"
+msgstr " Величина несажетог: %s\n"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr ""
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr ""
+
+#: src/xz/list.c:74
+#, fuzzy
+#| msgid " Stream padding: %s\n"
+msgid "Stream Padding:"
+msgstr " Попуна тока: %s\n"
+
+#: src/xz/list.c:75
+#, fuzzy
+#| msgid " Memory needed: %s MiB\n"
+msgid "Memory needed:"
+msgstr " Потребна меморија: %s MiB\n"
+
+#: src/xz/list.c:76
+#, fuzzy
+#| msgid " Sizes in headers: %s\n"
+msgid "Sizes in headers:"
+msgstr " Величине у заглављима: %s\n"
+
+#: src/xz/list.c:79
+#, fuzzy
+#| msgid " Number of files: %s\n"
+msgid "Number of files:"
+msgstr " Број датотека: %s\n"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr ""
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr ""
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr ""
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr ""
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr ""
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr ""
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr ""
+
+#: src/xz/list.c:129
+#, fuzzy
+#| msgid "Totals:"
+msgid "TotalSize"
+msgstr "Укупно:"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr ""
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr ""
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr ""
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr ""
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr ""
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr ""
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr ""
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Незнано-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Незнано-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Незнано-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Незнано-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Незнано-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Незнано-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Незнано-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Незнано-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Незнано-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Незнано-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Незнано-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Незнано-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Датотека је празна"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Токови Блокови Запаковано Распаковано Однос Провера Датотека"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Да"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Не"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Најмање издање XZ помагала: %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Укупно:"
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr "„--list“ ради само над „.xz“ датотекама (--format=xz или --format=auto)"
+
+#: src/xz/list.c:1276
+msgid "--list does not support reading from standard input"
+msgstr "„--list“ не подржава читање са стандардног улаза"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Грешка читања назива датотека: %s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s: Неочекивани крај улаза приликом читања назива датотека"
+
+#: src/xz/main.c:120
+#, 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:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "Запакивање и распакивање са „--robot“ није још подржано."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Унутрашња грешка (бубица)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Не могу да успоставим руковаоце сигналом"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Нема провере целовитости; не проверавам целовитост датотеке"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Неподржана врста провере целовитости; не проверавам целовитост датотеке"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Ограничење коришћења меморије је достигнуто"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Није препознат формат датотеке"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Неподржане опције"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Запаковани подаци су оштећени"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Неочекиван крај улаза"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB меморије је потребно. Ограничавач је онемогућен."
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "%s MiB меморије је потребно. Ограничење је %s."
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Ланац филтера: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Пробајте „%s --help“ за више података."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Коришћење: %s [ОПЦИЈА]... [ДАТОТЕКА]...\n"
+"Пакује или распакује ДАТОТЕКЕ у „.xz“ формату.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Обавезни аргументи за дуге опције су такође обавезни и за кратке опције.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Режим рада:\n"
+
+#: src/xz/message.c:975
+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“ датотекама"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Измењивачи рада:\n"
+
+#: src/xz/message.c:984
+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"
+" (рас)запакивања\n"
+" -c, --stdout пише на стандардни излаз и не брише улазне датотеке"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream распакује само први ток, и тихо\n"
+" занемарује могуће преостале улазне податке"
+
+#: src/xz/message.c:996
+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=.СУФ користи суфикс „.СУФ“ на запакованим датотекама\n"
+" --files[=ДТТКА] чита називе датотека за обраду из ДАТОТЕКЕ; ако је\n"
+" ДАТОТЕКА изостављено, називи датотека се читају са\n"
+" стандардног улаза називи датотека се морају\n"
+" завршавати знаком новог реда\n"
+" --files0[=ДТТКА] као „--files“ али користи празан знак као завршни"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Основне опције формата датотеке и запакивања:\n"
+
+#: src/xz/message.c:1007
+#, fuzzy
+#| msgid ""
+#| " -F, --format=FMT file format to encode or decode; possible values are\n"
+#| " `auto' (default), `xz', `lzma', and `raw'\n"
+#| " -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+#| " `crc32', `crc64' (default), or `sha256'"
+msgid ""
+" -F, --format=FMT file format to encode or decode; possible values are\n"
+" `auto' (default), `xz', `lzma', `lzip', and `raw'\n"
+" -C, --check=CHECK integrity check type: `none' (use with caution),\n"
+" `crc32', `crc64' (default), or `sha256'"
+msgstr ""
+" -F, --format=ФМТ формат датотеке за кодирање и декодирање; могуће\n"
+" вредности су „auto“ (основно), „xz“, „lzma“,\n"
+" и „raw“\n"
+" -C, --check=ПРОВЕРА врста провере целовитости: „none“ (користите уз\n"
+" опрез), „crc32“, „crc64“ (основно), или „sha256“"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr ""
+" --ignore-check не потврђује проверу целовитости приликом\n"
+" распакивања"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 претподешавање запакивања; основно је 6; узмите у\n"
+" обзир коришћење меморије запакивања *и* распакивања\n"
+" пре него ли употребите 7-9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme покушава да побољша однос запакивања користећи више\n"
+" времена процесора; не утиче на потребе меморије\n"
+" распакивача"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=БР користи највише БР нити; основно је 1; поставите\n"
+" на 0 за коришћење онолико нити колико има\n"
+" процесорских језгара"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=ВЕЛИЧИНА\n"
+" започиње нови „.xz“ блок након свака ВЕЛИЧИНА\n"
+" бајта улаза; користите ово да поставите величину\n"
+" блока за нитирано запакивање"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=ВЕЛИЧИНА\n"
+" започиње нови „.xz“ блок након датих зарезом\n"
+" раздвојених периода незапакованих података"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=ВРЕМЕ_ИСТЕКА\n"
+" приликом запакивања, ако је прошло више од\n"
+" ВРЕМЕ_ИСТЕКА милисекунди до претходног убацивања и\n"
+" читања још улаза блокираће, сви подаци на чекању се\n"
+" истискују ван"
+
+#: src/xz/message.c:1043
+#, fuzzy, no-c-format
+#| msgid ""
+#| " --memlimit-compress=LIMIT\n"
+#| " --memlimit-decompress=LIMIT\n"
+#| " -M, --memlimit=LIMIT\n"
+#| " set memory usage limit for compression, decompression,\n"
+#| " or both; LIMIT is in bytes, % of RAM, or 0 for defaults"
+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"
+" -M, --memlimit=ОГРАНИЧЕЊЕ\n"
+" поставља ограничење коришћења меморије за\n"
+" запакивање, распакивање, или оба; ОГРАНИЧЕЊЕ је у\n"
+" бајтовима, % o РАМ, или 0 за основно"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust ако подешавања запакивања пређу ограничење\n"
+" коришћења меморије, даје грешку уместо дотеривања\n"
+" подешавања"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Произвољни ланац филтера за запакивање (алтернатива за коришћење\n"
+" претподешавања):"
+
+#: src/xz/message.c:1067
+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"
+" вредности; основно):\n"
+" preset=ПРЕ враћа опције на претподешавање (0-9[e])\n"
+" dict=БРОЈ величина речника (4KiB – 1536MiB; 8MiB)\n"
+" lc=БРОЈ број битова дословног контекста (0-4; 3)\n"
+" lp=БРОЈ број битова дословног положаја (0-4; 0)\n"
+" pb=БРОЈ број битова положаја (0-4; 2)\n"
+" mode=РЕЖИМ режим запакивања (брзо, обично; обично)\n"
+" nice=БРОЈ фина дужина поклапања (2-273; 64)\n"
+" mf=НАЗИВ налазач поклапања (hc3, hc4, bt2, bt3,\n"
+" bt4; bt4)\n"
+" depth=БРОЈ највећа дубина тражења; 0=самостално\n"
+" (основно)"
+
+#: src/xz/message.c:1082
+#, fuzzy
+#| msgid ""
+#| "\n"
+#| " --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+#| " --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+#| " --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+#| " --arm[=OPTS] ARM BCJ filter (little endian only)\n"
+#| " --armthumb[=OPTS] ARM-Thumb BCJ filter (little endian only)\n"
+#| " --sparc[=OPTS] SPARC BCJ filter\n"
+#| " Valid OPTS for all BCJ filters:\n"
+#| " start=NUM start offset for conversions (default=0)"
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=ОПЦИЈЕ] „x86 BCJ“ филтер (32-бита и 64-бита)\n"
+" --powerpc[=ОПЦИЈЕ] „PowerPC BCJ“ филтер (само велика крајњост)\n"
+" --ia64[=ОПЦИЈЕ] „IA-64 (Itanium) BCJ“ филтер\n"
+" --arm[=ОПЦИЈЕ] „ARM BCJ“ филтер (само мала крајњост)\n"
+" --armthumb[=ОПЦИЈЕ] „ARM-Thumb BCJ“ филтер (само мала крајњост)\n"
+" --sparc[=ОПЦИЈЕ] „SPARC BCJ“ филтер\n"
+" Исправне ОПЦИЈЕ за све „BCJ“ филтере:\n"
+" start=БРОЈ померај почетка за претварања\n"
+" (основно=0)"
+
+#: src/xz/message.c:1095
+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"
+" основно):\n"
+" dist=БРОЈ растојање између бајтова који су\n"
+" одузети из свих других (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Остале опције:\n"
+
+#: src/xz/message.c:1106
+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"
+" грешке такође\n"
+" -v, --verbose бива опширан; наведите два пута за још опширније"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn чини да упозорења не делују на стање излаза"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot користи поруке обрадиве рачунаром\n"
+" (корисно за скрипте)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory приказује укупан износ РАМ-а и тренутно активна\n"
+" ограничења коришћења меморије, и излази"
+
+#: src/xz/message.c:1119
+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"
+" опције)\n"
+" -H, --long-help приказује ову дугу помоћ и излази"
+
+#: src/xz/message.c:1123
+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 приказује дугу помоћ (исписује такође и напредне\n"
+" опције)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version приказује број издања и излази"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Без ДАТОТЕКЕ, или када је ДАТОТЕКА -, чита стандардни улаз.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Грешке пријавите на <%s> (на енглеском или финском).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "„%s“ матична страница: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "ОВО ЈЕ РАЗВОЈНО ИЗДАЊЕ И НИЈЕ НАМЕЊЕНО ЗА ПРОФЕСИОНАЛНУ УПОТРЕБУ."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Опције морају бити парови „name=value“ раздвојени зарезима"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Неисправан назив опције"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Неисправна вредност опције"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Неподржано претподешавање „LZMA1/LZMA2“: %s"
+
+#: src/xz/options.c:356
+msgid "The sum of lc and lp must not exceed 4"
+msgstr "Збир „lc“ и „lp“ не сме премашити 4"
+
+#: src/xz/suffix.c:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Назив датотеке има непознат суфикс, прескачем"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Датотека већ има суфикс „%s“, прескачем"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Неисправан суфикс назива датотеке"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Вредност није не-негативан децимални цео број"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Неисправан суфикс умножавача"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Вредност опције „%s“ мора бити у опсегу [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Запаковани подаци се не могу читати из терминала"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Запаковани подаци се не могу писати на терминал"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Писање на стандардни излаз није успело"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Непозната грешка"
+
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Ограничење коришћења меморије за запакивање: "
+
+#, c-format
+#~ msgid " Streams: %s\n"
+#~ msgstr " Токова: %s\n"
+
+#, c-format
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Блокова: %s\n"
+
+#, c-format
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Однос: %s\n"
+
+#, c-format
+#~ msgid " Check: %s\n"
+#~ msgstr " Провера: %s\n"
+
+#~ msgid ""
+#~ " Streams:\n"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+#~ msgstr ""
+#~ " Токови:\n"
+#~ " Ток Блокови Помезапак Поменезапак Велзапак Велнезапак Однос Провера Попуна"
+
+#, c-format
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Блокови:\n"
+#~ " Ток Блок Помезапак Поменезапак Велукупн Велнезапак Однос Провера"
+
+#, c-format
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " ВреднПров %*s Заглав Заставице Велзапак Коришмемор Филтери"
+
+#, c-format
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "Изабрани налазач поклапања захтева барем „nice=%<PRIu32>“"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Безбедно окружење је искључено услед несагласних аргумената линије наредби"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Безбедно окружење је успешно укључено"
diff --git a/po/stamp-po b/po/stamp-po
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/po/stamp-po
@@ -0,0 +1 @@
+timestamp
diff --git a/po/sv.gmo b/po/sv.gmo
new file mode 100644
index 0000000..f1b1302
--- /dev/null
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..58105e0
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,1084 @@
+# Swedish messages for xz.
+# This file is put in the public domain.
+# Sebastian Rasmussen <sebras@gmail.com>, 2019.
+# Luna Jernberg <droidbittin@gmail.com>, 2022, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-19 20:25+0200\n"
+"Last-Translator: Luna Jernberg <droidbittin@gmail.com>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\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.3.2\n"
+"X-Poedit-Bookmarks: -1,10,-1,-1,-1,-1,-1,-1,-1,-1\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: Ogiltigt argument till --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: För många argument till --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Okänd filformatstyp"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Integritetskontrolltyp stöds inte"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, 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:691
+msgid "Compression support was disabled at build time"
+msgstr "Komprimeringsstöd inaktiverades vid byggtid"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Dekomprimeringsstöd inaktiverades vid byggtid"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Komprimering av lzip-filer (.lz) stöds inte"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "Med --format=raw, --suffix=.SUF krävs om data inte skrivs till standard ut"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Maximalt antal filter är fyra"
+
+#: src/xz/coder.c:135
+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:170
+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:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "Formatet .lzma har endast stöd för LZMA1-filtret"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 kan inte användas tillsammans med .xz-formatet"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Filterkedjan är inkompatibel med --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Använder upp till %<PRIu32> trådar."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Filterkedja eller filterflaggor stöds inte"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Dekomprimering kommer att kräva %s MiB minne."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Fel vid skapande av rörledning: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Misslyckades med att aktivera sandlådan"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Kan inte ta bort: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Kan inte sätta filägaren: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Kan inte sätta filgruppen: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Kan inte sätta filrättigheterna: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Är en symbolisk länk, hoppar över"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Är en katalog, hoppar över"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Är inte en vanlig fil, hoppar över"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: Filen har stickybiten satt, hoppar över"
+
+#: src/xz/file_io.c:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Tomt filnamn, hoppar över"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Stängning av filen misslyckades: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Läsfel: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Fel vid sökning i fil: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Oväntat filslut"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Skrivfel: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Inaktiverad"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Totalt mängd fysiskt minne (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Antal processortrådar:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Komprimering:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Dekomprimering:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Flertrådad dekomprimering:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Standard för -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Hårdvaruinformation:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Minnesanvändningsgränser:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Strömmar:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Block:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Komprimerad storlek:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Okomprimerad storlek:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Förhållande:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Kontroll:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Strömfyllnad:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Minne som behövs:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Storlek i huvuden:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Antal filer:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Ström"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Block"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Block"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "Komprimerad position"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "Okomprimerad position"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "Komprimerad storlek"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "Okomprimerad storlek"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "Total storlek"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Förhållande"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Kontroll"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "Kontrollvärde"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Fyllnad"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Huvud"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Flaggor"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "Minnesanvändning"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Okänd-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Okänd-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Okänd-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Okänd-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Okänd-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Okänd-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Okänd-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Okänd-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Okänd-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Okänd-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Okänd-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Okänd-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Fil är tom"
+
+#: src/xz/list.c:356
+#, c-format
+msgid "%s: Too small to be a valid .xz file"
+msgstr "%s: För lite 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Strmr Block Komprimerd Okomprimerd Förh. Kntrll Filnamn"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Ja"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Nej"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Minsta 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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Total:"
+
+#: src/xz/list.c:1270
+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:1276
+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:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Fel vid läsning av filnamn: %s"
+
+#: src/xz/main.c:96
+#, 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:120
+#, c-format
+msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
+msgstr "%s: Null-tecken hittat vid läsning av filnamn; kanske menade du att använda ”--files0” istället för ”--files”?"
+
+#: src/xz/main.c:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "Komprimering och dekomprimering med --robot stöds inte än."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Internt fel"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Kan inte etablera signalhanterare"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Ingen integritetskontroll; kan inte verifiera filintegritet"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Typ av integritetskontroll stöds inte; verifierar inte filintegritet"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Begränsning av minnesanvändning uppnådd"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Filformat okänt"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Flaggor stöds inte"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Komprimerad data är korrupt"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Oväntat avslut av indata"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Filterkedja: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Prova ”%s --help” för vidare information."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Användning: %s [FLAGGA]… [FIL]…\n"
+"Komprimera eller dekomprimera FILer i .xz-formatet.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Nödvändiga argument till långa flaggor är också nödvändiga för korta flaggor.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Operationsläge:\n"
+
+#: src/xz/message.c:975
+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 tvinga komprimering\n"
+" -d, --decompress tvinga dekomprimering\n"
+" -t, --test testa integritet för komprimerad fil\n"
+" -l, --list lista information om .xz-filer"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Operationsmodifierare:\n"
+
+#: src/xz/message.c:984
+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 behåll (ta inte bort) indatafiler\n"
+" -f, --force tvinga överskrivning av utdatafil och (de)komprimera\n"
+" länkar\n"
+" -c, --stdout skriv till standard ut och ta inte bort indatafiler"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream dekomprimera endast den första strömmen och hoppa\n"
+" tyst över eventuellt återstående indata"
+
+#: src/xz/message.c:996
+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 skapa inte glesa filer vid dekomprimering\n"
+" -S, --suffix=.SUF använd ändelse ”.SUF” för komprimerade filer\n"
+" --files[=FIL] läs filnamn från FIL; om FIL utelämnas\n"
+" kommer filnamn att läsas från standard in;\n"
+" filnamn måste avslutas med nyradstecken\n"
+" --files0[=FIL] som --files men null-tecknet måste användas"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Grundläggande filformat och komprimeringsflaggor:\n"
+
+#: src/xz/message.c:1007
+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 filformat att koda eller avkoda; möjliga värden är\n"
+" ”auto” (standard), ”xz”, ”lzma”, ”lzip” och ”raw”\n"
+" -C, --check=CHECK typ av integritetskontroll: ”none” (använd med\n"
+" försiktighet), ”crc32”, ”crc64” (standard), eller ”sha256”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check verifiera inte integritet vid dekomprimering"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 kompressionsförinställning; standard är 6; ta\n"
+" minnesanvändning för komprimerare *och* dekomprimerare\n"
+" i beaktande innan du använder 7-9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme försök att förbättra komprimeringsförhållande genom att\n"
+" använda mer CPU-tid; påverkar inte minnesanvändning för\n"
+" dekomprimerare"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NUM använd som mest NUM trådar; standard är 1; sätt till 0\n"
+" för att använda så många trådar som det finns\n"
+" processorkärnor"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=STORLEK\n"
+" påbörja ett nytt .xz-block efter STORLEK byte indata;\n"
+" använd detta för att sätta blockstorleken för trådad\n"
+" komprimering"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=STORLEKAR\n"
+" påbörja ett nytt .xz-block efter de angivna\n"
+" komma-separerade intervallen av okomprimerad data"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=TIDSGRÄNS\n"
+" vid komprimering, om mer än TIDSGRÄNS millisekunder har\n"
+" passerat sedan den föregående spolningen och läsning av\n"
+" mer indata skulle blockera, så kommer all väntande data\n"
+" att spolas ut"
+
+#: src/xz/message.c:1043
+#, 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=BEGR\n"
+" --memlimit-decompress=BEGR\n"
+" --memlimit-mt-decompress=BEGR\n"
+" -M, --memlimit=BEGR\n"
+" sätt begränsning av minnesanvändning för komprimering,\n"
+" dekomprimering, trådad dekomprimering, eller alla av\n"
+" dessa; BEGR är i byte, % RAM, eller 0 för standardvärden"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust om komprimeringsinställningar överstiger begränsningen av\n"
+" minnesanvändning, ge ett fel istället för att justera ner\n"
+" inställningarna"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Anpassad filterkedja för komprimering (alternativ till att använda\n"
+" förinställningar):"
+
+#: src/xz/message.c:1067
+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[=FLAGGOR] LZMA1 eller LZMA2; FLAGGOR är en kommaseparerad lista av\n"
+" noll eller\n"
+" --lzma2[=FLAGGOR] fler av följande flaggor (giltiga värden; standard):\n"
+" preset=FÖR återställ flaggor till en förinställning\n"
+" (0-9[e])\n"
+" dict=NUM lexikonstorlek (4KiB - 1536MiB; 8MiB)\n"
+" lc=NUM antal bitar för bokstavligkontext (0-4; 3)\n"
+" lp=NUM antal bitar för bokstavligposition (0-4; 0)\n"
+" pb=NUM antal bitar för position (0-4; 2)\n"
+" mode=LÄGE komprimeringsläge (fast, normal; normal)\n"
+" nice=NUM bra längd för en matchning (2-273; 64)\n"
+" mf=NAMN matchningshittare (hc3, hc4, bt2, bt3, bt4;\n"
+" bt4)\n"
+" depth=NUM maximalt sökdjup; 0=automatisk (standard)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=FLAGGOR] x86 BCJ-filter (32- och 64-bitar)\n"
+" --arm[=FLAGGOR] ARM BCJ-filter\n"
+" --armthumb[=FLAGGOR] ARM-Thumb BCJ-filter\n"
+" --arm64[=FLAGGOR] ARM64 BCJ-filter\n"
+" --powerpc[=FLAGGOR] PowerPC BCJ-filter (endast rak byteordning)\n"
+" --ia64[=FLAGGOR] IA-64 (Itanium) BCJ-filter\n"
+" --sparc[=FLAGGOR] SPARC BCJ-filter\n"
+" Giltiga FLAGGOR för alla BCJ-filter:\n"
+" start=NUM startposition för konverteringar\n"
+" (standard=0)"
+
+#: src/xz/message.c:1095
+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[=FLAGGOR] Deltafilter; giltiga FLAGGOR (giltiga värden; standard):\n"
+" dist=NUM avstånd mellan byte som subtraheras\n"
+" från varandra (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Andra flaggor:\n"
+
+#: src/xz/message.c:1106
+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 undertryck varningar; ange två gånger för att också\n"
+" undertrycka fel\n"
+" -v, --verbose var utförlig; ange två gånger för än mer utförlig"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn låt inte varningar påverka avslutningsstatus"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot använd maskintolkningsbara meddelanden\n"
+" (användbara för skript)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory visa den totala mängden RAM och den för närvarande aktiva\n"
+" begränsningen av minnesanvändning och avsluta"
+
+#: src/xz/message.c:1119
+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 visa den korta hjälpen (listar endast de grundläggande\n"
+" flaggorna)\n"
+" -H, --long-help visar denna långa hjälp av avsluta"
+
+#: src/xz/message.c:1123
+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 visa denna korta hjälp och avsluta\n"
+" -H, --long-help visa den långa hjälpen (listar också de avancerade\n"
+" flaggorna)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version visa versionsnumret och avsluta"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Med FIL, eller när FIL är -, läs standard in.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Rapportera buggar till <%s> (på engelska eller finska).\n"
+"Rapportera översättningsfel till tp-sv@listor.tp-sv.se\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s webbsida: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "DETTA ÄR EN UTVECKLINGSVERSION SOM INTE ÄR AVSEDD FÖR PRODUKTIONSANVÄNDNING."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Flaggor måste vara ”namn=värde”-par separerade med kommatecken"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Ogiltigt flaggnamn"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Ogiltigt flaggvärde"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "LZMA1/LZMA2-förinställning stöds inte: %s"
+
+#: src/xz/options.c:356
+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:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Filnamn har okänd filändelse, hoppar över"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Fil har redan ”%s”-ändelse, hoppar över"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Ogiltig filnamnsändelse"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Värdet är inte ett icke-negativt, decimalt heltal"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Ogiltig multipeländelse"
+
+#: src/xz/util.c:151
+msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
+msgstr "Giltiga ändelser är ”KiB” (2^10), ”MiB” (2^20) och ”GiB” (2^30)."
+
+#: src/xz/util.c:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Värdet för flaggan ”%s” måste vara inom intervallet [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Komprimerad data kan inte läsas från en terminal"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Komprimerad data kan inte skrivas till en terminal"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Skrivning till standard ut misslyckades"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Okänt fel"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "Den valda matchningshittaren kräver åtminstone nice=%<PRIu32>"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Sandlåda inaktiverad på grund av inkompatibla kommandoradsargument"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Sandlåda aktiverades framgångsrikt"
+
+#~ msgid "Memory usage limit for compression: "
+#~ msgstr "Begränsning av minnesanvändning för komprimering: "
+
+#~ msgid " Streams: %s\n"
+#~ msgstr " Strömmar: %s\n"
+
+#~ msgid " Blocks: %s\n"
+#~ msgstr " Block: %s\n"
+
+#~ msgid " Ratio: %s\n"
+#~ msgstr " Förhållande: %s\n"
+
+#~ msgid " Check: %s\n"
+#~ msgstr " Kontroll: %s\n"
+
+#~ msgid ""
+#~ " Streams:\n"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+#~ msgstr ""
+#~ " Strömmar:\n"
+#~ " Ström Block KompPos OkompPos KompStrl OkompStrl Förh. Kontroll Fyllnad"
+
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " Block:\n"
+#~ " Ström Block KompPos OkompPos TotalStrl OkompStrl Förh. Kontroll"
+
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " KntrlVär %*s Huvud Flaggor KompStrl Minne Filter"
diff --git a/po/tr.gmo b/po/tr.gmo
new file mode 100644
index 0000000..0a89955
--- /dev/null
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..902a695
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,1037 @@
+# Turkish translation for xz.
+# This file is distributed under the same license as the xz package.
+# This file is put in the public domain.
+#
+# Emir SARI <emir_sari@icloud.com>, 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.0-pre2\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2022-12-05 19:00+0300\n"
+"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
+"Language-Team: Turkish <gnome-turk@gnome.org>\n"
+"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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: --block-list için geçersiz argüman"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: --block-list için çok fazla argüman"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0, yalnızca --block-list içindeki son öge olarak kullanılabilir"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: Bilinmeyen dosya biçimi türü"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: Desteklenmeyen bütünlük denetimi türü"
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s: "
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "Çevre değişkeni %s, pek fazla argüman içeriyor"
+
+#: src/xz/args.c:691
+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:698
+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:704
+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:735
+#, fuzzy
+#| msgid "%s: With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "%s: --format-raw ile, stdout'a yazılmıyorsa --suffix=.SUF gereklidir"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Olabilecek en çok süzgeç sayısı dörttür"
+
+#: src/xz/coder.c:135
+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:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Ham kipte bir önayar kullanımı önerilmez."
+
+#: src/xz/coder.c:172
+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:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr ".lzma biçimi, yalnızca LZMA1 süzgecini destekler"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1, .xz biçimi ile birlikte kullanılamaz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Süzgeç zinciri, --flush-timeout ile uyumsuz"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "En çok %<PRIu32> iş parçacığı kullanılıyor."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Desteklenmeyen süzgeç zinciri veya süzgeç seçenekleri"
+
+#: src/xz/coder.c:278
+#, 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:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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'tan %3$s MiB'a ayarlandı"
+
+#: src/xz/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Veriyolu oluştururken hata: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Kum havuzu etkinleştirilemedi"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Kaldırılamıyor: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: Dosya sahibi ayarlanamıyor: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: Dosya grubu ayarlanamıyor: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: Dosya izinleri ayarlanamıyor: %s"
+
+#: src/xz/file_io.c:552
+#, 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:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: Bir sembolik bağ, atlanıyor"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: Bir dizin, atlanıyor"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: Olağan bir dosya değil, atlanıyor"
+
+#: src/xz/file_io.c:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Boş dosya adı, atlanıyor"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: Dosyayı kapatma başarısız: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Okuma hatası: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: Dosyayı ararken hata: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: Dosyanın beklenmedik sonu"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Yazma hatası: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Devre dışı"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Fiziksel bellek miktarı (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "İşlemci iş parçacığı sayısı:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Sıkıştırma:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Sıkıştırma açma:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Çok iş parçacıklı sıkıştırma açma:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "-T0 için öntanımlı:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Donanım bilgisi:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Bellek kullanım sınırları:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Akışlar:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Bloklar:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Sıkıştırılmış boyut:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Sıkıştırılmamış boyut:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Oran:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Denetim:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Akış dolgusu:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Gereken bellek:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Üstbilgideki boyut:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Dosya sayısı:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Akış"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Blok"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Bloklar"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "SkştrOfseti"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "SkştrmmşOfset"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "SkştrBoyut"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "SkştrmmşBoyut"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "ToplamBoyut"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Oran"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Denetim"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "DğrDentm"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Dolgu"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Üstveri"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Bayrak"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "BelKullnm"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "?-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "?-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "?-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "?-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "?-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "?-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "?-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "?-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "?-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "?-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "?-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "?-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Dosya boş"
+
+#: src/xz/list.c:356
+#, 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:731
+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:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Evet"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Hayır"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " En düşük XZ Utils sürümü: %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:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Toplamlar:"
+
+#: src/xz/list.c:1270
+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:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list, standart girdi'den okumayı desteklemez"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: Dosya adları okunurken hata: %s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s: Dosya adları okunurken beklenmedik girdi sonu"
+
+#: src/xz/main.c:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "İç hata (yazılım hatası)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Sinyal işleyicileri tesis edilemiyor"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Bütünlülük denetimi yok; dosya bütünlüğü doğrulanmıyor"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Desteklenmeyen bütünlülük denetimi türü; dosya bütünlüğü doğrulanmıyor"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Bellek kullanım sınırına erişildi"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Dosya biçimi tanımlanamıyor"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Desteklenmeyen seçenekler"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Sıkıştırılmış veri hasarlı"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Beklenmedik girdi sonu"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "%s MiB bellek gerekiyor. Sınırlandırıcı devre dışı bırakıldı."
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "%s MiB bellek gerekiyor. Sınır, %s."
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Süzgeç zinciri: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Daha fazla bilgi için '%s --help' deneyin."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Kullanım: %s [SEÇENEK]... [DOSYA]...\n"
+".xz biçimindeki dosyaları sıkıştırın veya sıkıştırmasını açın.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "Uzun seçenekler için zorunlu olan argümanlar kısa seçenekler için de geçerlidir.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " İşlem kipi:\n"
+
+#: src/xz/message.c:975
+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 sıkıştırmayı zorla\n"
+" -d, --decompress sıkıştırma açmayı zorla\n"
+" -t, --test sıkıştırılmış dosya bütünlüğünü sına\n"
+" -l, --list .xz dosyaları hakkında bilgi listele"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" İşlem değiştiricileri:\n"
+
+#: src/xz/message.c:984
+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 girdi dosyalarını tut (silme)\n"
+" -f, --force çıktı dosyası üzerine yazmayı zorla ve bağlantıları\n"
+" sıkıştır/sıkıştırmayı aç\n"
+" -c, --stdout standart çıktıya yaz ve girdi dosyalarını silme"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream yalnızca ilk akışın sıkıştırmasını aç ve sessizce\n"
+" kalan girdi verisini yok say"
+
+#: src/xz/message.c:996
+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 sıkıştırma açarken aralıklı dosyalar oluşturma\n"
+" -S, --suffix=.SUF sıkıştırılmış dosyalarda `.SUF' sonekini kullan\n"
+" --files[=DOSYA] DOSYA'dan işlemek için dosya adlarını oku; DOSYA\n"
+" atlanırsa dosya adları standart girdi'den okunur;\n"
+" dosya adları, yenisatır karakteri ile sonlanmalıdır\n"
+" --files0[=DSYA] --files gibi; ancak sonlandırıcı olarak null karakteri\n"
+" kullan"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Temel dosya biçimi ve sıkıştırma seçenekleri:\n"
+
+#: src/xz/message.c:1007
+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=BÇM kodlanacak veya kodu çözülecek dosya biçimi; olası\n"
+" değerler: `auto' (öntanımlı), `xz', `lzma', 'lzip'\n"
+" ve `raw'\n"
+" -C, --check=DNTLE bütünlük denetimi türü: `none' (dikkatli kullanın),\n"
+" `crc32', `crc64' (öntanımlı) veya `sha256'"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check sıkıştırma açarken bütünlük denetimini doğrulama"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 sıkıştırma önayarı; öntanımlı 6; 7-9 kullanmadan önce\n"
+" sıkıştırma açıcı bellek kullanımını hesaba katın!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme daha çok CPU zamanı kullanarak sıkıştırma oranını\n"
+" iyileştirmeye çalış; sıkıştırma açıcı bellek\n"
+" gereksinimlerini etkilemez"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=SAYI en çok SAYI iş parçacığı kullan; öntanımlı 1; var olan\n"
+" işlemci çekirdeği kadar iş parçacığı kullanmak için\n"
+" 0'a ayarlayın"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=BOYUT\n"
+" her BOYUT bayt girdiden sonra yeni bir .xz bloku başlat;\n"
+" iş parçacığı kullanan sıkıştırma için blok boyutunu\n"
+" ayarlamak için bunu kullanın"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=BOYUTLAR\n"
+" sıkıştırılmamış verinin virgülle ayrılmış verilen\n"
+" aralıklarından sonra yeni bir .xz bloku başlat"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=ZAMANAŞIMI\n"
+" sıkıştırırken, bir önceki floştan bu yana ZAMANAŞIMI\n"
+" milisaniye geçmişse ve daha çok girdi okuma bloklarsa\n"
+" tüm bekleyen veri floşlanır"
+
+#: src/xz/message.c:1043
+#, 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İMİT\n"
+" --memlimit-decompress=LİMİT\n"
+" --memlimit-mt-decompress=LİMİT\n"
+" -M, --memlimit=LİMİT\n"
+" sıkıştırma, sıkıştırma açma, iş parçacıklı sıkıştırma\n"
+" açma veya tümü için bellek kullanımı sınırını ayarla;\n"
+" LİMİT, bayt, RAM % veya öntanımlılar için 0'dır"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust sıkıştırma ayarları bellek kullanımı sınırını aşarsa\n"
+" ayarı aşağı doğru düzeltmek yerine bir hata ver"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Sıkıştırma için özel süzgeç zinciri (önayar kullanımı alternatifi):"
+
+#: src/xz/message.c:1067
+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[=SÇNKLR] LZMA1 veya LZMA2; OPTS, sıfır veya aşağıdaki\n"
+" --lzma2[=SÇNKLR] seçeneklerin virgülle ayrılmış değerleridir (geçerli\n"
+" değerler; öntanımlı):\n"
+" preset=ÖNA seçenekleri bir önayara sıfırla (0-9[e])\n"
+" dict=NUM sözlük boyutu (4KiB - 1536MiB; 8MiB)\n"
+" lc=NUM düz bağlam bitlerinin sayısı (0-4; 3)\n"
+" lp=NUM düz konum bitlerinin sayısı (0-4; 0)\n"
+" pb=NUM konum bitlerinin sayısı (0-4; 2)\n"
+" mode=KİP sıkıştırma kipi (fast, normal; normal)\n"
+" nice=NUM bir eşleşmenin öncelik uzunluğu (2-273; 64)\n"
+" mf=AD eşleşme bul (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+" depth=NUM en büyük arama derinliği; 0=oto (öntanımlı)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=SÇNKLR] x86 BCJ süzgeci (32 bit ve 64 bit)\n"
+" --arm[=SÇNKLR] ARM BCJ süzgeci\n"
+" --armthumb[=SÇNKLR] ARM-Thumb BCJ süzgeci\n"
+" --arm64[=SÇNKLR] ARM64 BCJ süzgeci\n"
+" --powerpc[=SÇNKLR] PowerPC BCJ süzgeci (yalnızca yüksek son basamaklı)\n"
+" --ia64[=SÇNKLR] IA-64 (Itanium) BCJ süzgeci\n"
+" --sparc[=SÇNKLR] SPARC BCJ süzgeci\n"
+" Tüm BCJ süzgeçleri için geçerli SÇNKLR:\n"
+" start=NUM dönüşümler başlangıç ofseti (öntanımlı=0)"
+
+#: src/xz/message.c:1095
+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[=SÇNKLR] Delta süzgeci; geçerli SÇNKLR (geçerli değerler;\n"
+" öntanımlı):\n"
+" dist=NUM birbirinden çırakılar baytlar arasındaki\n"
+" uzaklık (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Diğer seçenekler:\n"
+
+#: src/xz/message.c:1106
+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 uyarıları sustur; hataları da susturmak için iki kez\n"
+" belirt\n"
+" -v, --verbose ayrıntılı ol; daha da çok ayrıntı için iki kez belirt"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn uyarıların çıkış durumunu etkilemesine izin verme"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot makine-ayrıştırılabilir iletiler kullan (betikler için\n"
+" yararlı)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory toplam RAM miktarını ve şu anki bellek kullanımı\n"
+" sınırlarını görüntüle ve çık"
+
+#: src/xz/message.c:1119
+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 kısa yardımı görüntüle (temel seçenekleri listeler)\n"
+" -H, --long-help bu uzun yardımı görüntüle ve çık"
+
+#: src/xz/message.c:1123
+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 bu kısa yardımı görüntüle ve çık\n"
+" -H, --long-help uzun yardımı görüntüle (gelişmiş seçenekleri listeler)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version sürüm numarasını görüntüle ve çık"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"DSYA olmadan veya DSYA - iken standart girdi'yi oku.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "Hataları <%s> adresine bildirin (İngilizce veya Fince).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s ana sayfası: <%s>\n"
+
+#: src/xz/message.c:1142
+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."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Seçenekler, virgülle ayrılmış 'ad=değer' çiftleri olmalıdır"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Geçersiz seçenek adı"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Geçersiz seçenek değeri"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Desteklenmeyen LZMA1/LZMA2 önayarı: %s"
+
+#: src/xz/options.c:356
+msgid "The sum of lc and lp must not exceed 4"
+msgstr "lc ve lp'nin toplamı 4'ü geçmemelidir"
+
+#: src/xz/suffix.c:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: Dosya adında bilinmeyen sonek var, atlanıyor"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: Dosyada '%s' soneki halihazırda var, atlanıyor"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: Geçersiz dosya adı soneki"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: Değer, bir negatif olmayan ondalık tamsayı"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Geçersiz çoklayıcı soneki"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "'%s' seçeneği değeri erimde olmalıdır [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Bir uçbirimden sıkıştırılmış veri okunamaz"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Bir uçbirime sıkıştırılmış veri yazılamaz"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Standart çıktı'ya yazma başarısız"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Bilinmeyen hata"
diff --git a/po/uk.gmo b/po/uk.gmo
new file mode 100644
index 0000000..054d8cf
--- /dev/null
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
new file mode 100644
index 0000000..3ca235e
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,1094 @@
+# Ukrainian translation for xz.
+# This file is put in the public domain.
+#
+# Yuri Chornoivan <yurchor@ukr.net>, 2019, 2022, 2023.
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-19 20:53+0300\n"
+"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
+"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\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 20.12.0\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s: некоректний аргумент --block-list"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: забагато аргументів --block-list"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0 можна використовувати лише як останній елемент у --block-list"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s: невідомий тип формату файлів"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s: непідтримуваний тип перевірки цілісності"
+
+#: src/xz/args.c:518
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "Разом із параметрами --files або --files0 можна вказувати лише один файл."
+
+#. TRANSLATORS: This is a translatable
+#. string because French needs a space
+#. before the colon ("%s : %s").
+#: src/xz/args.c:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "У змінній середовища %s міститься надто багато аргументів"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "Підтримку стискання було вимкнено під час збирання програми"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "Підтримку розпаковування було вимкнено під час збирання програми"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "Підтримки стискання файлів lzip (.lz) не передбачено"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr ""
+"Якщо вказано --format=raw, слід вказати і --suffix=.SUF, якщо дані\n"
+"виводяться не до стандартного виведення"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "Максимальна кількість фільтрів — чотири"
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "Обмеження на використання пам'яті є надто жорстким для вказаного налаштування фільтрів."
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "Не варто користуватися визначенням рівня у режимі без обробки."
+
+#: src/xz/coder.c:172
+msgid "The exact options of the presets may vary between software versions."
+msgstr "Точний перелік параметрів рівнів може залежати від версій програмного забезпечення."
+
+#: src/xz/coder.c:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr "У форматі .lzma передбачено підтримку лише фільтра LZMA1"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 не можна використовувати разом із визначенням формату .xz"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Ланцюжок фільтрування є несумісним із параметром --flush-timeout"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "Перемикаємося на однопотоковий режим через використання --flush-timeout"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Використовуємо до %<PRIu32> потоків обробки."
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "Непідтримуваний ланцюжок фільтрування або непідтримувані параметри фільтрування"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "Для розпаковування знадобляться %s МіБ пам'яті."
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, c-format
+msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
+msgstr "Перемикаємося на однопотоковий режим, щоб не перевищувати обмеження щодо використання пам'яті у %s МіБ"
+
+#: src/xz/coder.c:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "Помилка під час створення каналу: %s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "Не вдалося увімкнути пісочницю"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s: здається, файл пересунуто; не вилучаємо"
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: не вдалося вилучити: %s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s: не вдалося встановити власника файла: %s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s: не вдалося встановити групу власника файла: %s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s: не вдалося встановити права доступу до файла: %s"
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr "Помилка під час спроби отримання прапорців стану файла зі стандартного джерела вхідних даних: %s"
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s: є символічним посиланням; пропускаємо"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s: є каталогом; пропускаємо"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s: не є звичайним файлом; пропускаємо"
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s: для файла встановлено біт setuid або setgid; пропускаємо"
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s: для файла встановлено липкий біт; пропускаємо"
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s: виявлено декілька жорстких посилань на файл із вхідними даними; пропускаємо"
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr "Порожня назва файла; пропускаємо"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "Помилка під час спроби відновлення прапорців стану для стандартного джерела вхідних даних: %s"
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr "Помилка під час спроби отримання прапорців стану файла зі стандартного виведення: %s"
+
+#: src/xz/file_io.c:1081
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr "Помилка під час спроби відновлення прапорця O_APPEND для стандартного виведення: %s"
+
+#: src/xz/file_io.c:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s: не вдалося закрити файл: %s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr "%s: помилка позиціювання під час спроби створити розріджений файл: %s"
+
+#: src/xz/file_io.c:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: помилка читання: %s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s: помилка позиціювання у файлі: %s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s: неочікуваний кінець файла"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: помилка під час спроби запису: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Вимкнено"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Обсяг фізичної пам'яті (RAM): "
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Кількість потоків обробки процесором:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Стискання:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Розпакування:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Багатопотокове розпаковування:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Типове для -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Дані щодо обладнання:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Обмеження на використання пам'яті:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Потоки:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Блоки:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Стиснутий розмір:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Нестиснутий розмір:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Пропорція:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Перевірка:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Доповнення потоку:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Потрібний об'єм пам'яті:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Розмір у заголовках:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Кількість файлів:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Потік"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Блок"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Блоки"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "СтисЗсув"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "НестисЗсув"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "СтисРозмір"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "НестисРозмір"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "Загальний розмір"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Пропорція"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Перевірка"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "ЗначПерев"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Заповн"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Заголов"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Прапор"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "ВикПам"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Невідомо-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Невідомо-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Невідомо-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Невідомо-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Невідомо-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Невідомо-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Невідомо-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "Невідом-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "Невідом-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "Невідом-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "Невідом-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "Невідом-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: файл порожній"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr "Потоки Блоки Стиснуті Нестиснуті Коеф. Перев. Назва файла"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Так"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Ні"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " Мінімальна версія програм XZ: %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, 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:1192
+msgid "Totals:"
+msgstr "Загалом:"
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr "--list працює лише для файлів .xz (--format=xz або --format=auto)"
+
+#: src/xz/list.c:1276
+msgid "--list does not support reading from standard input"
+msgstr "Використання --list скасовує підтримку читання зі стандартного джерела вхідних даних"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s: помилка під час читання назв файлів: %s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s: неочікуваний кінець вхідних даних під час читання назв файлів"
+
+#: src/xz/main.c:120
+#, 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:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "У поточній версії ще не передбачено підтримки стискання або розпаковування з параметром --robot."
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Внутрішня помилка (вада)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Не вдалося встановити обробники сигналів"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "Немає перевірки цілісності; цілісність файлів перевірено не буде"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "Непідтримуваний тип перевірки цілісності; перевірки цілісності виконано не буде"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "Перевищено обмеження на використання пам'яті"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Формат файла не розпізнано"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Непідтримувані параметри"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Стиснені дані пошкоджено"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Несподіваний кінець вхідних даних"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "Потрібно %s МіБ пам'яті. Обмеження вимкнено."
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "Потрібно %s МіБ пам'яті. Маємо обмеження у %s."
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: ланцюжок фільтрування: %s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "Спробуйте «%s --help» для отримання докладнішого опису."
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"Користування: %s [ПАРАМЕТР]... [ФАЙЛ]...\n"
+"Стиснути або розпакувати файли у форматі .xz.\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+"Обов’язкові аргументи для довгих форм запису параметрів є обов’язковими і для\n"
+"скорочених форм.\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Режим роботи:\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Модифікатори дій:\n"
+
+#: src/xz/message.c:984
+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"
+" посилання\n"
+" -c, --stdout записувати дані до стандартного виведення і не вилучати\n"
+" вхідні файли"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream розпакувати лише перший потік і без запитань\n"
+" ігнорувати решту вхідних даних"
+
+#: src/xz/message.c:996
+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"
+" стандартного джерела введення; список назв файлів має\n"
+" бути завершено символом нового рядка\n"
+" --files0[=ФАЙЛ] подібний до --files, але список файлів завершується\n"
+" нуль-символом"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Базові параметри формату файлів і стискання:\n"
+
+#: src/xz/message.c:1007
+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, lzip та raw\n"
+" -C, --check=ТИП тип перевірки цілісності: none («немає», будьте обережні),\n"
+" crc32, crc64 (типовий) або sha256"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check не виконувати перевірку цілісності при розпаковуванні"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 рівень стискання; типовим є 6; візьміть до уваги\n"
+" параметри використання пам'яті для пакування і\n"
+" розпакування, перш ніж використовувати рівні 7-9!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme спробувати поліпшити рівень стискання ширшим використанням\n"
+" процесора; не впливає на вимоги щодо пам'яті для\n"
+" розпаковування"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=N використовувати не більше N потоків; типовим є\n"
+" значення 1; встановіть значення 0, щоб програма\n"
+" використовувала стільки потоків, скільки є ядер\n"
+" у процесора"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=РОЗМІР\n"
+" розпочинати новий файл .xz кожні РОЗМІР байтів вхідних\n"
+" даних; цим параметром слід користуватися для\n"
+" встановлення розміру блоку для пакування у декілька\n"
+" потоків"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=РОЗМІРИ\n"
+" розпочинати нові блоки .xz після вказаних інтервалів\n"
+" нестиснених даних; записи відокремлюються комами"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=ЧАС_ОЧІКУВАННЯ\n"
+" під час стискання, якщо з часу попереднього спорожнення\n"
+" буфера і читання додаткового блоку вхідних даних\n"
+" минуло більше за ЧАС_ОЧІКУВАННЯ мілісекунд, витерти\n"
+" усі дані у черзі"
+
+#: src/xz/message.c:1043
+#, 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"
+" -M, --memlimit=ОБМЕЖЕННЯ\n"
+" встановити обмеження на використання пам'яті для\n"
+" стискання, розпаковування, потокового розпаковування\n"
+" або усіх режимів; ОБМЕЖЕННЯ слід вказувати у байтах,\n"
+" % RAM або вказати 0 (типове значення)"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust якщо параметри стискання призводять до перевищення\n"
+" обмежень на пам'ять, вивести помилку і не коригувати\n"
+" параметри"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" Нетиповий ланцюжок фільтрування для стискання (альтернатива використання\n"
+" рівнів):"
+
+#: src/xz/message.c:1067
+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"
+" типове):\n"
+" preset=РІВ скинути параметри до рівня (0-9[e])\n"
+" dict=N розмір словника (4KiB - 1536MiB; 8MiB)\n"
+" lc=N кількість буквальних контекстних бітів\n"
+" (0-4; 3)\n"
+" lp=N кількість буквальних бітів позицій (0-4; 0)\n"
+" pb=N кількість бітів позицій (0-4; 2)\n"
+" mode=РЕЖИМ режим стискання (fast, normal; normal)\n"
+" nice=N довжина відповідності nice (2-273; 64)\n"
+" mf=НАЗВА пошук відповідності (hc3, hc4, bt2, bt3,\n"
+" bt4; bt4)\n"
+" depth=N макс. глибина пошуку; 0=авто (типова)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=ПАРАМ] фільтр BCJ x86 (32-бітовий і 64-бітовий)\n"
+" --arm[=ПАРАМ] фільтр BCJ ARM\n"
+" --armthumb[=ПАРАМ] фільтр BCJ ARM-Thumb\n"
+" --arm64[=ПАРАМ] фільтр BCJ ARM64\n"
+" --powerpc[=ПАРАМ] фільтр BCJ PowerPC (лише зворотний порядок байтів)\n"
+" --ia64[=ПАРАМ] фільтр BCJ IA-64 (Itanium)\n"
+" --sparc[=ПАРАМ] фільтр BCJ SPARC\n"
+" Коректні значення ПАРАМЕТРИ для усіх фільтрів BCJ:\n"
+" start=N початковий зсув для перетворень (типовий=0)"
+
+#: src/xz/message.c:1095
+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=N відстань між байтами, які віднімаються\n"
+" один від одного (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Інші параметри:\n"
+
+#: src/xz/message.c:1106
+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"
+" помилки\n"
+" -v, --verbose режим докладних повідомлень; вкажіть двічі, щоб підвищити\n"
+" докладність"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn попередження не впливають на стан виходу"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot використовувати повідомлення для обробки комп'ютером\n"
+" (корисно для створення сценаріїв)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+" --info-memory вивести загальні дані щодо оперативної пам'яті і поточних\n"
+" обмежень щодо її використання, потім завершити роботу"
+
+#: src/xz/message.c:1119
+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"
+" параметри)\n"
+" -H, --long-help вивести це розширене довідкове повідомлення і завершити\n"
+" роботу"
+
+#: src/xz/message.c:1123
+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 показати розгорнуту довідку (із усіма додатковими\n"
+" параметрами)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version вивести дані щодо версії програми і завершити роботу"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"Якщо вхідний файл не вказаний, або якщо вказано символ -,\n"
+"використовується стандартний ввід.\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"Сповіщайте розробників про вади за адресою <%s>\n"
+"(англійською і фінською).\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Домашня сторінка %s: <%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "ЦЕ ТЕСТОВА ВЕРСІЯ, ЯКУ НЕ ПРИЗНАЧЕНО ДЛЯ ПРОМИСЛОВОГО ВИКОРИСТАННЯ."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: параметри -- пари «назва=значення», відокремлені комами"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: некоректна назва параметра"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: некоректне значення параметра"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Непідтримуваний рівень стискання LZMA1/LZMA2: %s"
+
+#: src/xz/options.c:356
+msgid "The sum of lc and lp must not exceed 4"
+msgstr "Сума lc і lp не повинна перевищувати 4"
+
+#: src/xz/suffix.c:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s: назва файла має невідомий суфікс; пропускаємо"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s: файл вже має суфікс назви %s; пропускаємо"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s: некоректний суфікс назви файла"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s: значення не є невід'ємним десятковим цілим"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: некоректний суфікс множника"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Значення параметра «%s» має належати до діапазону [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "Стиснені дані неможливо прочитати з термінала"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "Стиснені дані неможливо записати до термінала"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "Не вдалося записати дані до стандартного виведення"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "Невідома помилка"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "Вибраний засіб пошуку відповідності потребує принаймні nice=%<PRIu32>"
+
+#~ 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 " ЗначПер %*s Загол. Прапорці РозмСтисн ВикПам Фільтри"
+
+#~ msgid "Sandbox is disabled due to incompatible command line arguments"
+#~ msgstr "Пісочницю вимкнено через несумісні параметри у рядку команди"
+
+#~ msgid "Sandbox was successfully enabled"
+#~ msgstr "Пісочницю успішно увімкнено"
diff --git a/po/vi.gmo b/po/vi.gmo
new file mode 100644
index 0000000..9f2543c
--- /dev/null
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 0000000..5f0ee03
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,1079 @@
+# Vietnamese translations for xz package
+# Bản dịch tiếng Việt cho gói xz.
+# This file is put in the public domain.
+# Trần Ngọc Quân <vnwildman@gmail.com>, 2014, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-22 10:00+0700\n"
+"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
+"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\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"
+
+#: src/xz/args.c:77
+#, 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:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s: Quá nhiều đối số cho --block-list"
+
+#: src/xz/args.c:116
+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:451
+#, 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:474 src/xz/args.c:482
+#, 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:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s: %s"
+
+#: src/xz/args.c:589
+#, 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:691
+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:698
+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:704
+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:735
+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:115
+msgid "Maximum number of filters is four"
+msgstr "Số lượng bộ lọc tối đa là bốn"
+
+#: src/xz/coder.c:135
+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:170
+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:172
+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:195
+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:203
+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:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "Móc xích lọc là không tương thích với --flush-timeout"
+
+#: src/xz/coder.c:226
+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:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "Dùng đến %<PRIu32> tuyến trình."
+
+#: src/xz/coder.c:266
+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:278
+#, 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:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, 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:252
+msgid "Failed to enable the sandbox"
+msgstr "Không bật được sandbox"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, 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:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s: Không thể gỡ bỏ: %s"
+
+#: src/xz/file_io.c:394
+#, 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:407
+#, 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:426
+#, 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:552
+#, 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:610 src/xz/file_io.c:672
+#, 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:701
+#, 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:707
+#, 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:724
+#, 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:731
+#, 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:738
+#, 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:780
+msgid "Empty filename, skipping"
+msgstr "Tên tập tin trống rỗng nên bỏ qua"
+
+#: src/xz/file_io.c:834
+#, 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:882
+#, 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:1081
+#, 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:1093
+#, 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:1129 src/xz/file_io.c:1391
+#, 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:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s: Lỗi đọc: %s"
+
+#: src/xz/file_io.c:1259
+#, 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:1283
+#, 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:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s: Lỗi ghi: %s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "Bị tắt"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "Tổng dung lượng bộ nhớ vật lý (RAM):"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "Số luồng bộ xử lý:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "Nén:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "Giải nén:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "Giải nén đa luồng:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "Mặc định cho -T0:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "Thông tin phần cứng:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "Đã chạm mốc giới hạn sử dụng bộ nhớ:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "Các luồng dữ liệu:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "Khối:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "Kích cỡ đã nén:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "Kích cỡ đã giải nén:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "Tỉ lệ:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "Kiểm tra:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "Đệm luồng dữ liệu:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "Bộ nhớ cần:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "Kích cỡ phần đầu:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "Số lượng tập tin:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "Luồng dữ liệu"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "Khối"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "Khối"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "BùNén"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "BùGiảiNén"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "CỡNén"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "CỡGiảiNén"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "CỡTổng"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "Tỷ lệ"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "Kiểm tra"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "Gtr.Kiểm"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "Đệm"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "Phần đầu"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "Cờ"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "DùngBộNhớ"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "Chưa_biết2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "Chưa_biết3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "Chưa_biết5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "Chưa_biết6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "Chưa_biết7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "Chưa_biết8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "Chưa_biết9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "ChưaBiết11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "ChưaBiết12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "ChưaBiết13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "ChưaBiết14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "ChưaBiết15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s: Tập tin trống rỗng"
+
+#: src/xz/list.c:356
+#, 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:731
+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:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "Có"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "Không"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, c-format
+msgid "%s file\n"
+msgid_plural "%s files\n"
+msgstr[0] "%s tập tin\n"
+
+#: src/xz/list.c:1192
+msgid "Totals:"
+msgstr "Tổng cộng:"
+
+#: src/xz/list.c:1270
+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:1276
+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:89
+#, 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:96
+#, 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:120
+#, 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:188
+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:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s: "
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "Lỗi nội bộ (lỗi)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "Không thể thiết lập bộ xử lý tín hiệu"
+
+#: src/xz/message.c:813
+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:816
+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:823
+msgid "Memory usage limit reached"
+msgstr "Đã chạm mốc giới hạn sử dụng bộ nhớ"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "Không nhận ra định dạng tập tin"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "Tùy chọn không được hỗ trợ"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "Dữ liệu đã nén bị hỏng"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "Gặp kết thúc đầu vào bất ngờ"
+
+#: src/xz/message.c:877
+#, 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:905
+#, 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:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s: Móc xích lọc: %s\n"
+
+#: src/xz/message.c:935
+#, 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:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+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"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+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"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " Chế độ thao tác:\n"
+
+#: src/xz/message.c:975
+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"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" Bộ chỉnh sửa thao tác:\n"
+
+#: src/xz/message.c:984
+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"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" 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ể"
+
+#: src/xz/message.c:996
+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"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" Các tùy chọn về định dạng và nén cơ bản:\n"
+
+#: src/xz/message.c:1007
+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”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check 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"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" 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!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" 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"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=SỐ dùng tối đa là SỐ tuyến trình; mặc định là 1; đặt\n"
+" thành 0 để dùng số lượng bằng số lõi vi xử lý"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=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:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+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"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=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:1043
+#, 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"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" 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"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for 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:1067
+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)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+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"
+" 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)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" Tùy chọn khác:\n"
+
+#: src/xz/message.c:1106
+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"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn 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 trạng thái thoát"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+" --robot dùng các thông điệp máy có thể phân tích\n"
+" (hữu dụng với scripts)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" 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"
+
+#: src/xz/message.c:1119
+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"
+
+#: src/xz/message.c:1123
+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)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version hiển thị số phiên bản và thoát"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+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
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+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: <http://translationproject.org/team/vi.html>.\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Trang chủ %s: <%s>.\n"
+
+#: src/xz/message.c:1142
+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."
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s: Các tùy chọn phải là các cặp “name=value” ngăn cách nhau bằng dấu phẩy"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s: Tên tùy chọn không hợp lệ"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s: Giá trị của tùy chọn không hợp lệ"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "Hiện nay chưa hỗ trợ LZMA1/LZMA2: %s"
+
+#: src/xz/options.c:356
+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:160
+#, 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:181
+#, 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:388
+#, 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:107
+#, c-format
+msgid "%s: 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:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s: Hậu tố nhân tố không hợp lệ"
+
+#: src/xz/util.c:151
+msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
+msgstr "Các hậu tố hợp lệ là “KiB” (2^10), “MiB” (2^20), và “GiB” (2^30)."
+
+#: src/xz/util.c:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "Giá trị cuả tùy chọn “%s” phải nằm trong vùng [%<PRIu64>, %<PRIu64>]"
+
+#: src/xz/util.c:270
+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:283
+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/common/tuklib_exit.c:40
+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:43
+msgid "Unknown error"
+msgstr "Lỗi chưa biết"
+
+#~ 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=%<PRIu32>"
+#~ msgstr "Bộ tìm khớp đã chọn yêu cầu mức “tốt” ít nhất là nice=%<PRIu32>"
+
+#~ 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/po/xz.pot b/po/xz.pot
new file mode 100644
index 0000000..f9dc5a8
--- /dev/null
+++ b/po/xz.pot
@@ -0,0 +1,930 @@
+# SOME DESCRIPTIVE TITLE.
+# This file is put in the public domain.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.5\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\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:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr ""
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr ""
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr ""
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr ""
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr ""
+
+#: src/xz/args.c:518
+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:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr ""
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr ""
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr ""
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr ""
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr ""
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr ""
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr ""
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr ""
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr ""
+
+#: src/xz/coder.c:172
+msgid "The exact options of the presets may vary between software versions."
+msgstr ""
+
+#: src/xz/coder.c:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr ""
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr ""
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr ""
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr ""
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr ""
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr ""
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr ""
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, c-format
+msgid "Switching to single-threaded mode to not exceed the memory usage limit of %s MiB"
+msgstr ""
+
+#: src/xz/coder.c:412
+#, 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/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr ""
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr ""
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr ""
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr ""
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr ""
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr ""
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr ""
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr ""
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr ""
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr ""
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr ""
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr ""
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr ""
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr ""
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr ""
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr ""
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr ""
+
+#: src/xz/file_io.c:1081
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr ""
+
+#: src/xz/file_io.c:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr ""
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr ""
+
+#: src/xz/file_io.c:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr ""
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr ""
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr ""
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr ""
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr ""
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr ""
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr ""
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr ""
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr ""
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr ""
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr ""
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr ""
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr ""
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr ""
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr ""
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr ""
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr ""
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr ""
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr ""
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr ""
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr ""
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr ""
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr ""
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr ""
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr ""
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr ""
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr ""
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr ""
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr ""
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr ""
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr ""
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr ""
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr ""
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr ""
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr ""
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr ""
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr ""
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr ""
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr ""
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr ""
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr ""
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr ""
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr ""
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr ""
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr ""
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr ""
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr ""
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr ""
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr ""
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr ""
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr ""
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr ""
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr ""
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr ""
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+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:1179
+#, c-format
+msgid "%s file\n"
+msgid_plural "%s files\n"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/xz/list.c:1192
+msgid "Totals:"
+msgstr ""
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr ""
+
+#: src/xz/list.c:1276
+msgid "--list does not support reading from standard input"
+msgstr ""
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr ""
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr ""
+
+#: src/xz/main.c:120
+#, c-format
+msgid "%s: Null character found when reading filenames; maybe you meant to use `--files0' instead of `--files'?"
+msgstr ""
+
+#: src/xz/main.c:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr ""
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr ""
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr ""
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr ""
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr ""
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr ""
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr ""
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr ""
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr ""
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr ""
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr ""
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr ""
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr ""
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr ""
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr ""
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr ""
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr ""
+
+#: src/xz/message.c:975
+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 ""
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+
+#: src/xz/message.c:984
+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 ""
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+
+#: src/xz/message.c:996
+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 ""
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+
+#: src/xz/message.c:1007
+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 ""
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr ""
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+
+#: src/xz/message.c:1043
+#, 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 ""
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+
+#: src/xz/message.c:1067
+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 ""
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+
+#: src/xz/message.c:1095
+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 ""
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+
+#: src/xz/message.c:1106
+msgid ""
+" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
+" -v, --verbose be verbose; specify twice for even more verbose"
+msgstr ""
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr ""
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr ""
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr ""
+
+#: src/xz/message.c:1119
+msgid ""
+" -h, --help display the short help (lists only the basic options)\n"
+" -H, --long-help display this long help and exit"
+msgstr ""
+
+#: src/xz/message.c:1123
+msgid ""
+" -h, --help display this short help and exit\n"
+" -H, --long-help display the long help (lists also the advanced options)"
+msgstr ""
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr ""
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr ""
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr ""
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr ""
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr ""
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr ""
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr ""
+
+#: src/xz/options.c:356
+msgid "The sum of lc and lp must not exceed 4"
+msgstr ""
+
+#: src/xz/suffix.c:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr ""
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr ""
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr ""
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr ""
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr ""
+
+#: src/xz/util.c:151
+msgid "Valid suffixes are `KiB' (2^10), `MiB' (2^20), and `GiB' (2^30)."
+msgstr ""
+
+#: src/xz/util.c:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr ""
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr ""
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr ""
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr ""
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr ""
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
new file mode 100644
index 0000000..60b4f90
--- /dev/null
+++ b/po/zh_CN.gmo
Binary files differ
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..7b49c02
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,1059 @@
+# Chinese translations for xz package
+# xz 软件包的简体中文翻译。
+# This file is put in the public domain.
+# Boyuan Yang <073plan@gmail.com>, 2019, 2022, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-19 14:24-0400\n"
+"Last-Translator: Boyuan Yang <073plan@gmail.com>\n"
+"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\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.2.2\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s:--block-list 的无效参数"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s:--block-list 得到过多参数"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0 仅可用于 --block-list 的最后一个元素"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s:未知文件格式类型"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s:不支持的完整性检查类型"
+
+#: src/xz/args.c:518
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "仅可使用“--files”或“--files0”指定一个文件。"
+
+#. TRANSLATORS: This is a translatable
+#. string because French needs a space
+#. before the colon ("%s : %s").
+#: src/xz/args.c:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, c-format
+msgid "%s: %s"
+msgstr "%s:%s"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "环境变量 %s 包含过多参数"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "压缩支持已在构建时禁用"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "解压支持已在构建时禁用"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "不支持对 lzip 文件 (.lz) 的压缩"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "启用 --format-raw 选项时,必须指定 --suffix=.SUF 获知写入至标准输出"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "过滤器最多数量为四"
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "内存用量限制对指定过滤器设置过低。"
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "不推荐在 raw 模式使用预设等级。"
+
+#: src/xz/coder.c:172
+msgid "The exact options of the presets may vary between software versions."
+msgstr "各个预设等级所使用的准确选项列表在不同软件版本之间可能不同。"
+
+#: src/xz/coder.c:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr ".lzma 格式只支持 LZMA1 过滤器"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 无法用于 .xz 格式"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "过滤器链和 --flush-timeout 不兼容"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "因 --flush-timeout 而切换至单线程模式"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "使用最多 %<PRIu32> 个线程。"
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "不支持的过滤器链或过滤器选项"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "解压缩需要 %s MiB 的内存。"
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, c-format
+msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
+msgstr "已调整 LZMA%c 字典大小(从 %s MiB 调整为 %s MiB),以不超出 %s MiB 的内存用量限制"
+
+#: src/xz/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "创建管道时出错:%s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "沙盒启用失败"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s:文件似乎已移动,不再进行删除操作"
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s:无法删除:%s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s:无法设置文件所有者:%s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s:无法设置文件所有组:%s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s:无法设置文件权限:%s"
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr "从标准输入获取文件状态标志出错:%s"
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s:是符号链接,跳过"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s:是目录,跳过"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s:不是标准文件,跳过"
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s:文件有设置用户ID或设置组ID标识,跳过"
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s:文件有粘滞位标识,跳过"
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s:输入文件有多于一个硬链接,跳过"
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr "空文件名,跳过"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "回复标准输入的状态标志时出错:%s"
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr "获取标准输出的文件状态标志时出错:%s"
+
+#: src/xz/file_io.c:1081
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr "恢复标准输出的 O_APPEND 标志时出错:%s"
+
+#: src/xz/file_io.c:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s:关闭文件失败:%s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr "%s:尝试创建稀疏文件时 seek 失败:%s"
+
+#: src/xz/file_io.c:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s:读取错误:%s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s:seek 文件时出错:%s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s:未预期的文件结束"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s:写入错误:%s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "已禁用"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "物理内存(RAM)用量:"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "处理器线程数:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "压缩:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "解压缩:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "多线程解压缩:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "-T0 的默认值:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "硬件信息:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "内存使用限制:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "流:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "块:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "压缩后大小:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "解压缩大小:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "比例:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "校验:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "流填充大小:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "所需内存:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "头部存放大小:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "文件数量:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "流"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "块"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "块"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "压缩偏移量"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "解压偏移量"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "压缩后大小"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "解压缩大小"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "总大小"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "比例"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "校验"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "校验值"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "填充"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "头部"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "标志"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "内存用量"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "未知-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "未知-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "未知-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "未知-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "未知-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "未知-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "未知-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "未知-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "未知-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "未知-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "未知-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "未知-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s:文件为空"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr " 流 块 压缩大小 解压大小 比例 校验 文件名"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "是"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "否"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " 最低 XZ Utils 版本:%s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, c-format
+msgid "%s file\n"
+msgid_plural "%s files\n"
+msgstr[0] "%s 文件\n"
+
+#: src/xz/list.c:1192
+msgid "Totals:"
+msgstr "总计:"
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr "--list 仅适用于 .xz 文件(--format=xz 或 --format=auto)"
+
+#: src/xz/list.c:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list 不支持从标准输入读取"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s:读取文件名列表时出错:%s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s:读取文件名列表时遇到未预期的输入结束"
+
+#: src/xz/main.c:120
+#, 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:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "尚不支持带 --robot 的压缩和解压缩。"
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s:"
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "内部错误(bug)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "无法建立信号处理器"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "无完整性检查;将不验证文件完整性"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "不支持的完整性检查类型;将不验证文件完整性"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "达到内存使用限制"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "无法识别文件格式"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "不支持的选项"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "压缩数据已损坏"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "输入意外结束"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "需要 %s MiB 的内存空间。限制已禁用。"
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "需要 %s MiB 的内存空间。限制为 %s。"
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s:过滤器链:%s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "请尝试执行“%s --help”来获取更多信息。"
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"用法:%s [选项]... [文件]...\n"
+"使用 .xz 格式压缩或解压缩文件。\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "必选参数对长短选项同时适用。\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " 操作模式:\n"
+
+#: src/xz/message.c:975
+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 文件的信息"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" 操作修饰符:\n"
+
+#: src/xz/message.c:984
+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 向标准输出写入,同时不要删除输入文件"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr " --single-stream 仅解压缩第一个流,忽略其后可能继续出现的输入数据"
+
+#: src/xz/message.c:996
+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,但使用空字符进行分隔"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" 基本文件格式和压缩选项:\n"
+
+#: src/xz/message.c:1007
+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”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check 解压缩时不要进行完整性检查验证"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 压缩预设等级;默认为 6;使用 7-9 的等级之前,请先考虑\n"
+" 压缩和解压缩所需的内存用量!(会占用大量内存空间)"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme 尝试使用更多 CPU 时间来改进压缩比率;\n"
+" 不会影响解压缩的内存需求量"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=数量 使用最多指定数量的线程;默认值为 1;设置为 0\n"
+" 可以使用与处理器内核数量相同的线程数"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=块大小\n"
+" 输入每读取指定块大小的数据后即开始一个新的 .xz 块;\n"
+" 使用该选项可以设置多线程压缩中的块大小"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=块大小列表\n"
+" 在所给出的未压缩数据间隔大小的数据之后开始一个新的\n"
+" .xz 块(使用逗号分隔)"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=超时时间\n"
+" 进行压缩时,如果从上次刷洗输出之后经过了指定的超时时间\n"
+" 且读取更多数据会被阻塞,则刷洗输出所有缓冲数据"
+
+#: src/xz/message.c:1043
+#, 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 取软件默认值"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr " --no-adjust 如果压缩设置超出内存用量限制,不调整设置而直接报错"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" 用于压缩的自定义过滤器链(不使用预设等级时的备选用法):"
+
+#: src/xz/message.c:1067
+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=自动(默认)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+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"
+" 所有过滤器可用选项:\n"
+" start=数字 转换的起始偏移量(默认=0)"
+
+#: src/xz/message.c:1095
+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)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" 其它选项:\n"
+
+#: src/xz/message.c:1106
+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 输出详细信息;指定两次可以输出更详细的信息"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn 使得警告信息不影响程序退出返回值"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot 使用机器可解析的信息(对于脚本有用)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr " --info-memory 显示 RAM 总量和当前配置的内存用量限制,然后退出"
+
+#: src/xz/message.c:1119
+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 显示本长帮助信息"
+
+#: src/xz/message.c:1123
+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 显示长帮助信息(同时列出高级选项)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version 显示软件版本号并退出"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"如果没有指定文件,或者文件为\"-\",则从标准输入读取。\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr ""
+"请使用英文或芬兰语向 <%s> 报告软件错误。\n"
+"请使用中文向 TP 简体中文翻译团队 <i18n-zh@googlegroups.com>\n"
+"报告软件的简体中文翻译错误。\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 主页:<%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "这是开发版本,不适用于生产环境使用。"
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s:选项必须按照“名称=值”的格式成对出现,使用半角逗号分隔"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s:无效的选项名称"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s:无效的选项值"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "不支持的 LZMA1/LZMA2 预设等级:%s"
+
+#: src/xz/options.c:356
+msgid "The sum of lc and lp must not exceed 4"
+msgstr "lc 和 lp 的和必须不大于 4"
+
+#: src/xz/suffix.c:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s:文件名有未知后缀,跳过"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s:文件已有“%s”后缀名,跳过"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s:无效的文件名后缀"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s:值不是非负十进制整数"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s:无效的乘数后缀"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "选项“%s”的值必须位于 [%<PRIu64>, %<PRIu64>] 范围内"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "压缩数据不能从终端读取"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "压缩数据不能向终端写入"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "写入标准输出失败"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "未知错误"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "所选中的匹配搜索器(match finder)至少需要 nice=%<PRIu32>"
+
+#~ 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/po/zh_TW.gmo b/po/zh_TW.gmo
new file mode 100644
index 0000000..b3d5bd3
--- /dev/null
+++ b/po/zh_TW.gmo
Binary files differ
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
index 0000000..98d969f
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,1063 @@
+# Chinese translations for xz package.
+# This file is put in the public domain.
+#
+# Yi-Jyun Pan <pan93412@gmail.com>, 2019, 2023
+msgid ""
+msgstr ""
+"Project-Id-Version: xz 5.4.3\n"
+"Report-Msgid-Bugs-To: xz@tukaani.org\n"
+"POT-Creation-Date: 2023-10-31 22:33+0800\n"
+"PO-Revision-Date: 2023-07-08 23:05+0800\n"
+"Last-Translator: Yi-Jyun Pan <pan93412@gmail.com>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@lists.linux.org.tw>\n"
+"Language: zh_TW\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Poedit 3.3.2\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+
+#: src/xz/args.c:77
+#, c-format
+msgid "%s: Invalid argument to --block-list"
+msgstr "%s:傳入 --block-list 的參數無效"
+
+#: src/xz/args.c:87
+#, c-format
+msgid "%s: Too many arguments to --block-list"
+msgstr "%s:傳入 --block-list 的參數過多"
+
+#: src/xz/args.c:116
+msgid "0 can only be used as the last element in --block-list"
+msgstr "0 只能作為 --block-list 的最後一個元素"
+
+#: src/xz/args.c:451
+#, c-format
+msgid "%s: Unknown file format type"
+msgstr "%s:未知檔案格式類型"
+
+#: src/xz/args.c:474 src/xz/args.c:482
+#, c-format
+msgid "%s: Unsupported integrity check type"
+msgstr "%s:不支援的完整性檢查類型"
+
+#: src/xz/args.c:518
+msgid "Only one file can be specified with `--files' or `--files0'."
+msgstr "「--files」或「--files0」只能指定一個檔案。"
+
+#. TRANSLATORS: This is a translatable
+#. string because French needs a space
+#. before the colon ("%s : %s").
+#: src/xz/args.c:533 src/xz/coder.c:692 src/xz/coder.c:708 src/xz/coder.c:968
+#: src/xz/coder.c:971 src/xz/file_io.c:605 src/xz/file_io.c:679
+#: src/xz/file_io.c:769 src/xz/file_io.c:940 src/xz/list.c:369
+#: src/xz/list.c:415 src/xz/list.c:477 src/xz/list.c:581 src/xz/list.c:590
+#, fuzzy, c-format
+#| msgid "%s: "
+msgid "%s: %s"
+msgstr "%s:"
+
+#: src/xz/args.c:589
+#, c-format
+msgid "The environment variable %s contains too many arguments"
+msgstr "%s 環境變數包含過多參數"
+
+#: src/xz/args.c:691
+msgid "Compression support was disabled at build time"
+msgstr "已在編譯時停用壓縮支援"
+
+#: src/xz/args.c:698
+msgid "Decompression support was disabled at build time"
+msgstr "已在編譯時停用解壓縮支援"
+
+#: src/xz/args.c:704
+msgid "Compression of lzip files (.lz) is not supported"
+msgstr "不支援壓縮為 lzip 檔案 (.lz)"
+
+#: src/xz/args.c:735
+msgid "With --format=raw, --suffix=.SUF is required unless writing to stdout"
+msgstr "搭配 --format=raw 時,除非寫入標準輸出,否則需要傳入 --suffix=.SUF"
+
+#: src/xz/coder.c:115
+msgid "Maximum number of filters is four"
+msgstr "最多只能指定 4 個篩選器"
+
+#: src/xz/coder.c:135
+msgid "Memory usage limit is too low for the given filter setup."
+msgstr "記憶體用量限制過低,不足以設定指定的篩選器。"
+
+#: src/xz/coder.c:170
+msgid "Using a preset in raw mode is discouraged."
+msgstr "不建議在 Raw 模式使用設定檔。"
+
+#: src/xz/coder.c:172
+msgid "The exact options of the presets may vary between software versions."
+msgstr "設定檔的選項可能因軟體版本而有異。"
+
+#: src/xz/coder.c:195
+msgid "The .lzma format supports only the LZMA1 filter"
+msgstr ".lzma 格式僅支援 LZMA1 篩選器"
+
+#: src/xz/coder.c:203
+msgid "LZMA1 cannot be used with the .xz format"
+msgstr "LZMA1 不能與 .xz 格式一同使用"
+
+#: src/xz/coder.c:220
+msgid "The filter chain is incompatible with --flush-timeout"
+msgstr "篩選鏈不相容 --flush-timeout"
+
+#: src/xz/coder.c:226
+msgid "Switching to single-threaded mode due to --flush-timeout"
+msgstr "因指定 --flush-timeout,因此切換到單執行緒模式"
+
+#: src/xz/coder.c:250
+#, c-format
+msgid "Using up to %<PRIu32> threads."
+msgstr "使用最多 %<PRIu32> 個執行緒。"
+
+#: src/xz/coder.c:266
+msgid "Unsupported filter chain or filter options"
+msgstr "不支援的篩選鏈或篩選器選項"
+
+#: src/xz/coder.c:278
+#, c-format
+msgid "Decompression will need %s MiB of memory."
+msgstr "解壓縮將需要 %s MiB 的記憶體。"
+
+#: src/xz/coder.c:310
+#, 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:330
+#, 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:357
+#, 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:412
+#, c-format
+msgid "Adjusted LZMA%c dictionary size from %s MiB to %s MiB to not exceed the memory usage limit of %s MiB"
+msgstr "已將 LZMA%c 的字典大小從 %s MiB 調整至 %s MiB,以不超過記憶體用量的 %s MiB 限制"
+
+#: src/xz/file_io.c:110 src/xz/file_io.c:118
+#, c-format
+msgid "Error creating a pipe: %s"
+msgstr "建立管線時發生錯誤:%s"
+
+#: src/xz/file_io.c:252
+msgid "Failed to enable the sandbox"
+msgstr "無法啟用沙盒"
+
+#: src/xz/file_io.c:294
+#, 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:361
+#, c-format
+msgid "%s: File seems to have been moved, not removing"
+msgstr "%s:檔案似乎已經遷移,不移除"
+
+#: src/xz/file_io.c:368 src/xz/file_io.c:924
+#, c-format
+msgid "%s: Cannot remove: %s"
+msgstr "%s:無法移除:%s"
+
+#: src/xz/file_io.c:394
+#, c-format
+msgid "%s: Cannot set the file owner: %s"
+msgstr "%s:無法設定檔案所有者:%s"
+
+#: src/xz/file_io.c:407
+#, c-format
+msgid "%s: Cannot set the file group: %s"
+msgstr "%s:無法設定檔案群組:%s"
+
+#: src/xz/file_io.c:426
+#, c-format
+msgid "%s: Cannot set the file permissions: %s"
+msgstr "%s:無法設定檔案權限:%s"
+
+#: src/xz/file_io.c:552
+#, c-format
+msgid "Error getting the file status flags from standard input: %s"
+msgstr "從標準輸入取得檔案狀態旗標時發生錯誤:%s"
+
+#: src/xz/file_io.c:610 src/xz/file_io.c:672
+#, c-format
+msgid "%s: Is a symbolic link, skipping"
+msgstr "%s:是個符號連結,跳過"
+
+#: src/xz/file_io.c:701
+#, c-format
+msgid "%s: Is a directory, skipping"
+msgstr "%s:是個目錄,跳過"
+
+#: src/xz/file_io.c:707
+#, c-format
+msgid "%s: Not a regular file, skipping"
+msgstr "%s:不是一般檔案,跳過"
+
+#: src/xz/file_io.c:724
+#, c-format
+msgid "%s: File has setuid or setgid bit set, skipping"
+msgstr "%s:檔案已設定 setuid 或 setgid 位元,跳過"
+
+#: src/xz/file_io.c:731
+#, c-format
+msgid "%s: File has sticky bit set, skipping"
+msgstr "%s:檔案已設定黏性位元(sticky bit),跳過"
+
+#: src/xz/file_io.c:738
+#, c-format
+msgid "%s: Input file has more than one hard link, skipping"
+msgstr "%s:輸入檔有超過一個實際連結 (hard link),跳過"
+
+#: src/xz/file_io.c:780
+msgid "Empty filename, skipping"
+msgstr "空檔名,跳過"
+
+#: src/xz/file_io.c:834
+#, c-format
+msgid "Error restoring the status flags to standard input: %s"
+msgstr "將狀態旗標還原到標準輸入時發生錯誤:%s"
+
+#: src/xz/file_io.c:882
+#, c-format
+msgid "Error getting the file status flags from standard output: %s"
+msgstr "從標準輸出取得檔案狀態旗標時發生錯誤:%s"
+
+#: src/xz/file_io.c:1081
+#, c-format
+msgid "Error restoring the O_APPEND flag to standard output: %s"
+msgstr "將 O_APPEND 旗標還原到標準輸出時發生錯誤:%s"
+
+#: src/xz/file_io.c:1093
+#, c-format
+msgid "%s: Closing the file failed: %s"
+msgstr "%s:關閉檔案失敗:%s"
+
+#: src/xz/file_io.c:1129 src/xz/file_io.c:1391
+#, c-format
+msgid "%s: Seeking failed when trying to create a sparse file: %s"
+msgstr "%s:嘗試建立疏鬆檔案時發生搜尋失敗:%s"
+
+#: src/xz/file_io.c:1229
+#, c-format
+msgid "%s: Read error: %s"
+msgstr "%s:讀取時發生錯誤:%s"
+
+#: src/xz/file_io.c:1259
+#, c-format
+msgid "%s: Error seeking the file: %s"
+msgstr "%s:搜尋檔案時發生錯誤:%s"
+
+#: src/xz/file_io.c:1283
+#, c-format
+msgid "%s: Unexpected end of file"
+msgstr "%s:非期望的檔案結尾"
+
+#: src/xz/file_io.c:1342
+#, c-format
+msgid "%s: Write error: %s"
+msgstr "%s:寫入時發生錯誤:%s"
+
+#: src/xz/hardware.c:238
+msgid "Disabled"
+msgstr "已停用"
+
+#: src/xz/hardware.c:269
+msgid "Amount of physical memory (RAM):"
+msgstr "實體記憶體 (RAM) 數量:"
+
+#: src/xz/hardware.c:270
+msgid "Number of processor threads:"
+msgstr "處理器執行緒的數量:"
+
+#: src/xz/hardware.c:271
+msgid "Compression:"
+msgstr "壓縮:"
+
+#: src/xz/hardware.c:272
+msgid "Decompression:"
+msgstr "解壓縮:"
+
+#: src/xz/hardware.c:273
+msgid "Multi-threaded decompression:"
+msgstr "多執行緒解壓縮:"
+
+#: src/xz/hardware.c:274
+msgid "Default for -T0:"
+msgstr "-T0 的預設值:"
+
+#: src/xz/hardware.c:292
+msgid "Hardware information:"
+msgstr "硬體資訊:"
+
+#: src/xz/hardware.c:299
+msgid "Memory usage limits:"
+msgstr "記憶體用量上限:"
+
+#: src/xz/list.c:68
+msgid "Streams:"
+msgstr "串流:"
+
+#: src/xz/list.c:69
+msgid "Blocks:"
+msgstr "區塊:"
+
+#: src/xz/list.c:70
+msgid "Compressed size:"
+msgstr "壓縮後大小:"
+
+#: src/xz/list.c:71
+msgid "Uncompressed size:"
+msgstr "壓縮前大小:"
+
+#: src/xz/list.c:72
+msgid "Ratio:"
+msgstr "壓縮比:"
+
+#: src/xz/list.c:73
+msgid "Check:"
+msgstr "檢查:"
+
+#: src/xz/list.c:74
+msgid "Stream Padding:"
+msgstr "串流填充:"
+
+#: src/xz/list.c:75
+msgid "Memory needed:"
+msgstr "所需記憶體:"
+
+#: src/xz/list.c:76
+msgid "Sizes in headers:"
+msgstr "檔頭中標示大小:"
+
+#: src/xz/list.c:79
+msgid "Number of files:"
+msgstr "檔案數:"
+
+#: src/xz/list.c:122
+msgid "Stream"
+msgstr "串流"
+
+#: src/xz/list.c:123
+msgid "Block"
+msgstr "區塊"
+
+#: src/xz/list.c:124
+msgid "Blocks"
+msgstr "區塊"
+
+#: src/xz/list.c:125
+msgid "CompOffset"
+msgstr "壓縮偏移"
+
+#: src/xz/list.c:126
+msgid "UncompOffset"
+msgstr "未壓縮偏移"
+
+#: src/xz/list.c:127
+msgid "CompSize"
+msgstr "壓縮大小"
+
+#: src/xz/list.c:128
+msgid "UncompSize"
+msgstr "未壓縮大小"
+
+#: src/xz/list.c:129
+msgid "TotalSize"
+msgstr "總計大小"
+
+#: src/xz/list.c:130
+msgid "Ratio"
+msgstr "比率"
+
+#: src/xz/list.c:131
+msgid "Check"
+msgstr "檢查"
+
+#: src/xz/list.c:132
+msgid "CheckVal"
+msgstr "檢查值"
+
+#: src/xz/list.c:133
+msgid "Padding"
+msgstr "填充"
+
+#: src/xz/list.c:134
+msgid "Header"
+msgstr "檔頭"
+
+#: src/xz/list.c:135
+msgid "Flags"
+msgstr "旗標"
+
+#: src/xz/list.c:136
+msgid "MemUsage"
+msgstr "Mem用量"
+
+#: src/xz/list.c:137
+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:169
+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:175
+msgid "Unknown-2"
+msgstr "未知-2"
+
+#: src/xz/list.c:176
+msgid "Unknown-3"
+msgstr "未知-3"
+
+#: src/xz/list.c:178
+msgid "Unknown-5"
+msgstr "未知-5"
+
+#: src/xz/list.c:179
+msgid "Unknown-6"
+msgstr "未知-6"
+
+#: src/xz/list.c:180
+msgid "Unknown-7"
+msgstr "未知-7"
+
+#: src/xz/list.c:181
+msgid "Unknown-8"
+msgstr "未知-8"
+
+#: src/xz/list.c:182
+msgid "Unknown-9"
+msgstr "未知-9"
+
+#: src/xz/list.c:184
+msgid "Unknown-11"
+msgstr "未知-11"
+
+#: src/xz/list.c:185
+msgid "Unknown-12"
+msgstr "未知-12"
+
+#: src/xz/list.c:186
+msgid "Unknown-13"
+msgstr "未知-13"
+
+#: src/xz/list.c:187
+msgid "Unknown-14"
+msgstr "未知-14"
+
+#: src/xz/list.c:188
+msgid "Unknown-15"
+msgstr "未知-15"
+
+#: src/xz/list.c:351
+#, c-format
+msgid "%s: File is empty"
+msgstr "%s:檔案是空的"
+
+#: src/xz/list.c:356
+#, 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:731
+msgid "Strms Blocks Compressed Uncompressed Ratio Check Filename"
+msgstr " 串流 區塊 已壓縮 未壓縮 比例 檢驗碼 檔名"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "Yes"
+msgstr "是"
+
+#: src/xz/list.c:1026 src/xz/list.c:1204
+msgid "No"
+msgstr "否"
+
+#: src/xz/list.c:1028 src/xz/list.c:1206
+#, c-format
+msgid " Minimum XZ Utils version: %s\n"
+msgstr " 最小 XZ 工具程式版本: %s\n"
+
+#. TRANSLATORS: %s is an integer. Only the plural form of this
+#. message is used (e.g. "2 files"). Test with "xz -l foo.xz bar.xz".
+#: src/xz/list.c:1179
+#, c-format
+msgid "%s file\n"
+msgid_plural "%s files\n"
+msgstr[0] "%s 個檔案\n"
+
+#: src/xz/list.c:1192
+msgid "Totals:"
+msgstr "總計:"
+
+#: src/xz/list.c:1270
+msgid "--list works only on .xz files (--format=xz or --format=auto)"
+msgstr "--list 只能在 .xz 檔使用(--format=xz 或 --format=auto)"
+
+#: src/xz/list.c:1276
+msgid "--list does not support reading from standard input"
+msgstr "--list 不支援從標準輸入讀取"
+
+#: src/xz/main.c:89
+#, c-format
+msgid "%s: Error reading filenames: %s"
+msgstr "%s:讀取檔名時發生錯誤:%s"
+
+#: src/xz/main.c:96
+#, c-format
+msgid "%s: Unexpected end of input when reading filenames"
+msgstr "%s:讀取檔名時遇到非預期的輸入結尾"
+
+#: src/xz/main.c:120
+#, 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:188
+msgid "Compression and decompression with --robot are not supported yet."
+msgstr "尚未支援搭配 --robot 壓縮和解壓縮。"
+
+#: src/xz/main.c:266
+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:670 src/xz/message.c:725
+#, c-format
+msgid "%s: "
+msgstr "%s:"
+
+#: src/xz/message.c:797 src/xz/message.c:856
+msgid "Internal error (bug)"
+msgstr "內部錯誤(臭蟲)"
+
+#: src/xz/message.c:804
+msgid "Cannot establish signal handlers"
+msgstr "無法確立信號處理器"
+
+#: src/xz/message.c:813
+msgid "No integrity check; not verifying file integrity"
+msgstr "沒有完整性檢查;不驗證檔案完整性"
+
+#: src/xz/message.c:816
+msgid "Unsupported type of integrity check; not verifying file integrity"
+msgstr "未知完整性檢查類型;不驗證檔案完整性"
+
+#: src/xz/message.c:823
+msgid "Memory usage limit reached"
+msgstr "達到記憶體用量上限"
+
+#: src/xz/message.c:826
+msgid "File format not recognized"
+msgstr "無法識別檔案格式"
+
+#: src/xz/message.c:829
+msgid "Unsupported options"
+msgstr "不支援的選項"
+
+#: src/xz/message.c:832
+msgid "Compressed data is corrupt"
+msgstr "壓縮資料是損壞的"
+
+#: src/xz/message.c:835
+msgid "Unexpected end of input"
+msgstr "遇到非預期輸入結尾"
+
+#: src/xz/message.c:877
+#, c-format
+msgid "%s MiB of memory is required. The limiter is disabled."
+msgstr "需要 %s MiB 的記憶體。已停用記憶體限制器。"
+
+#: src/xz/message.c:905
+#, c-format
+msgid "%s MiB of memory is required. The limit is %s."
+msgstr "需要 %s MiB 的記憶體。記憶體限制為 %s。"
+
+#: src/xz/message.c:924
+#, c-format
+msgid "%s: Filter chain: %s\n"
+msgstr "%s:篩選鏈:%s\n"
+
+#: src/xz/message.c:935
+#, c-format
+msgid "Try `%s --help' for more information."
+msgstr "嘗試「%s --help」取得更多資訊。"
+
+#: src/xz/message.c:961
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... [FILE]...\n"
+"Compress or decompress FILEs in the .xz format.\n"
+"\n"
+msgstr ""
+"用法:%s [選項]... [檔案]...\n"
+"用 .xz 格式壓縮,或解壓縮 .xz 格式中的 <檔案>。\n"
+"\n"
+
+#: src/xz/message.c:968
+msgid "Mandatory arguments to long options are mandatory for short options too.\n"
+msgstr "長選項的必填參數,對短選項也是必填。\n"
+
+#: src/xz/message.c:972
+msgid " Operation mode:\n"
+msgstr " 操作模式:\n"
+
+#: src/xz/message.c:975
+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 檔的資訊"
+
+#: src/xz/message.c:981
+msgid ""
+"\n"
+" Operation modifiers:\n"
+msgstr ""
+"\n"
+" 操作修飾詞:\n"
+
+#: src/xz/message.c:984
+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 寫入標準輸出並不刪除輸入檔"
+
+#: src/xz/message.c:993
+msgid ""
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"
+msgstr ""
+" --single-stream 僅解壓縮第一個串流,再\n"
+" 安靜地忽略可能剩餘的輸入檔"
+
+#: src/xz/message.c:996
+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 但是以 null 空字元作結尾"
+
+#: src/xz/message.c:1005
+msgid ""
+"\n"
+" Basic file format and compression options:\n"
+msgstr ""
+"\n"
+" 基本檔案格式與壓縮選項:\n"
+
+#: src/xz/message.c:1007
+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”、“lzip” 及 “raw”\n"
+" -C, --check=檢查碼 完整性檢查類型:“none”(謹慎使用)、“crc32”、\n"
+" “crc64”(預設值)或“sha256”"
+
+#: src/xz/message.c:1012
+msgid " --ignore-check don't verify the integrity check when decompressing"
+msgstr " --ignore-check 不在解壓縮時驗證完整性"
+
+#: src/xz/message.c:1016
+msgid ""
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"
+msgstr ""
+" -0 ... -9 壓縮設定檔;預設值為 6;使用 7-9 前請考慮\n"
+" 壓縮和解壓縮所使用的記憶體!"
+
+#: src/xz/message.c:1020
+msgid ""
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"
+msgstr ""
+" -e, --extreme 使用更多 CPU 時間以嘗試改善壓縮比;\n"
+" 不影響解壓縮器的記憶體需求"
+
+#: src/xz/message.c:1024
+msgid ""
+" -T, --threads=NUM use at most NUM threads; the default is 1; set to 0\n"
+" to use as many threads as there are processor cores"
+msgstr ""
+" -T, --threads=NUM 使用最多 NUM 個執行緒;預設為 1;設成 0 則使用所有的\n"
+" 處理機核心"
+
+#: src/xz/message.c:1029
+msgid ""
+" --block-size=SIZE\n"
+" start a new .xz block after every SIZE bytes of input;\n"
+" use this to set the block size for threaded compression"
+msgstr ""
+" --block-size=SIZE\n"
+" 輸入每 SIZE 位元組後,開始一個新 .xz 區塊;\n"
+" 使用此功能以設定多執行緒壓縮的區塊大小"
+
+#: src/xz/message.c:1033
+msgid ""
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"
+msgstr ""
+" --block-list=SIZES\n"
+" 在指定以逗號隔開的未壓縮資料間隔之後\n"
+" 開始新的 .xz 區塊"
+
+#: src/xz/message.c:1037
+msgid ""
+" --flush-timeout=TIMEOUT\n"
+" when compressing, if more than TIMEOUT milliseconds has\n"
+" passed since the previous flush and reading more input\n"
+" would block, all pending data is flushed out"
+msgstr ""
+" --flush-timeout=TIMEOUT\n"
+" 壓縮時,倘若繼上次排清 (flush) 已經超過 TIMEOUT 毫秒\n"
+" 而且讀入更多輸入會阻塞,則所有待排清的資料都將排清"
+
+#: src/xz/message.c:1043
+#, 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"
+" --memlimit-mt-decompress=LIMIT\n"
+" -M, --memlimit=LIMIT\n"
+" 限制壓縮、解壓縮、多執行緒解壓縮或以上全部的記憶體\n"
+" 用量上限。LIMIT 得是位元組、記憶體百分比 (%),或 0\n"
+" (預設值)"
+
+#: src/xz/message.c:1052
+msgid ""
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"
+msgstr ""
+" --no-adjust 若壓縮設定超過記憶體用量上限,請給出\n"
+" 錯誤而非下調設定"
+
+#: src/xz/message.c:1058
+msgid ""
+"\n"
+" Custom filter chain for compression (alternative for using presets):"
+msgstr ""
+"\n"
+" 自訂壓縮篩選鏈(使用設定檔時選用):"
+
+#: src/xz/message.c:1067
+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;<操作> 是以下選項中的 0 個或以上選項\n"
+" --lzma2[=操作] (有效值; 預設):\n"
+" preset=PRE 將選項重設至某設定檔的選項 (0-9[e])\n"
+" dict=NUM 字典大小 (4KiB - 1536MiB; 8MiB)\n"
+" lc=NUM 文字內文位元數 (0-4; 3)\n"
+" lp=NUM 文字位置位元數 (0-4; 0)\n"
+" pb=NUM 位置位元數 (0-4; 2)\n"
+" mode=模式 壓縮模式 (fast, normal; normal)\n"
+" nice=NUM 符合項目的 nice 長度 (2-273; 64)\n"
+" mf=名稱 尋找符合搜尋器 (hc3, hc4, bt2, bt3, bt4; bt4)\n"
+" depth=NUM 最大搜尋深度;0=自動(預設)"
+
+#: src/xz/message.c:1082
+msgid ""
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"
+msgstr ""
+"\n"
+" --x86[=OPTS] x86 BCJ 篩選器 (32 位元和 64 位元)\n"
+" --arm[=OPTS] ARM BCJ 篩選器\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ 篩選器\n"
+" --arm64[=OPTS] ARM64 BCJ 篩選器\n"
+" --powerpc[=OPTS] PowerPC BCJ 篩選器(僅大端序)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ 篩選器\n"
+" --sparc[=OPTS] SPARC BCJ 篩選器\n"
+" 所有 BCJ 篩選器可用的 OPTS:\n"
+" start=NUM 轉換起始位移(預設值=0)"
+
+#: src/xz/message.c:1095
+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] 增量篩選器 (有效值; 預設值):\n"
+" dist=NUM 相減的位元組之間的距離\n"
+" (1-256; 1)"
+
+#: src/xz/message.c:1103
+msgid ""
+"\n"
+" Other options:\n"
+msgstr ""
+"\n"
+" 其他選項:\n"
+
+#: src/xz/message.c:1106
+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 輸出較詳細內容;指定兩次更詳細輸出"
+
+#: src/xz/message.c:1111
+msgid " -Q, --no-warn make warnings not affect the exit status"
+msgstr " -Q, --no-warn 即使有警告,退出狀態碼仍不變"
+
+#: src/xz/message.c:1113
+msgid " --robot use machine-parsable messages (useful for scripts)"
+msgstr " --robot 使用機器可解析訊息(適合用於指令稿)"
+
+#: src/xz/message.c:1116
+msgid ""
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"
+msgstr " --info-memory 顯示記憶體總量和使用中的記憶體用量限制後退出"
+
+#: src/xz/message.c:1119
+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 顯示較長說明後退出"
+
+#: src/xz/message.c:1123
+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 顯示較長說明(也列出進階選項)"
+
+#: src/xz/message.c:1128
+msgid " -V, --version display the version number and exit"
+msgstr " -V, --version 顯示版本號碼後退出"
+
+#: src/xz/message.c:1130
+msgid ""
+"\n"
+"With no FILE, or when FILE is -, read standard input.\n"
+msgstr ""
+"\n"
+"如果未指定 <檔案>,或 <檔案> 是 -,則從標準輸入讀取。\n"
+
+#. TRANSLATORS: This message indicates the bug reporting address
+#. for this package. Please add _another line_ saying
+#. "Report translation bugs to <...>\n" with the email or WWW
+#. address for translation bugs. Thanks.
+#: src/xz/message.c:1136
+#, c-format
+msgid "Report bugs to <%s> (in English or Finnish).\n"
+msgstr "請回報臭蟲至 <%s>(使用英文或芬蘭語)。\n"
+
+#: src/xz/message.c:1138
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s 首頁:<%s>\n"
+
+#: src/xz/message.c:1142
+msgid "THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."
+msgstr "此為開發版本,不打算在生產環境使用。"
+
+#: src/xz/options.c:86
+#, c-format
+msgid "%s: Options must be `name=value' pairs separated with commas"
+msgstr "%s:選項形式必須為以逗號分隔的「name=value」值對"
+
+#: src/xz/options.c:93
+#, c-format
+msgid "%s: Invalid option name"
+msgstr "%s:選項名稱無效"
+
+#: src/xz/options.c:113
+#, c-format
+msgid "%s: Invalid option value"
+msgstr "%s:選項值無效"
+
+#: src/xz/options.c:248
+#, c-format
+msgid "Unsupported LZMA1/LZMA2 preset: %s"
+msgstr "不支援的 LZMA1/LZMA2 設定檔:%s"
+
+#: src/xz/options.c:356
+msgid "The sum of lc and lp must not exceed 4"
+msgstr "lc 和 lp 的總和不能超過 4"
+
+#: src/xz/suffix.c:160
+#, c-format
+msgid "%s: Filename has an unknown suffix, skipping"
+msgstr "%s:檔名有未知後綴,跳過"
+
+#: src/xz/suffix.c:181
+#, c-format
+msgid "%s: File already has `%s' suffix, skipping"
+msgstr "%s:檔案已有「%s」後綴,跳過"
+
+#: src/xz/suffix.c:388
+#, c-format
+msgid "%s: Invalid filename suffix"
+msgstr "%s:檔名後綴無效"
+
+#: src/xz/util.c:107
+#, c-format
+msgid "%s: Value is not a non-negative decimal integer"
+msgstr "%s:數值不是非負數十進位整數"
+
+#: src/xz/util.c:149
+#, c-format
+msgid "%s: Invalid multiplier suffix"
+msgstr "%s:乘數後綴無效"
+
+#: src/xz/util.c:151
+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:168
+#, c-format
+msgid "Value of the option `%s' must be in the range [%<PRIu64>, %<PRIu64>]"
+msgstr "選項「%s」的數值必須在 [%<PRIu64>, %<PRIu64>] 範圍內"
+
+#: src/xz/util.c:270
+msgid "Compressed data cannot be read from a terminal"
+msgstr "不能從終端機讀入已壓縮資料"
+
+#: src/xz/util.c:283
+msgid "Compressed data cannot be written to a terminal"
+msgstr "不能將已壓縮資料寫入終端機"
+
+#: src/common/tuklib_exit.c:40
+msgid "Writing to standard output failed"
+msgstr "寫入標準輸出失敗"
+
+#: src/common/tuklib_exit.c:43
+msgid "Unknown error"
+msgstr "未知錯誤"
+
+#~ 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"
+#~ " Stream Blocks CompOffset UncompOffset CompSize UncompSize Ratio Check Padding"
+
+# 下方的文字因排版有一些障礙,因此暫時不理他。
+#~ msgid ""
+#~ " Blocks:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+#~ msgstr ""
+#~ " 區塊:\n"
+#~ " Stream Block CompOffset UncompOffset TotalSize UncompSize Ratio Check"
+
+# 下方的文字因排版有一些障礙,因此暫時不理他。
+#~ msgid " CheckVal %*s Header Flags CompSize MemUsage Filters"
+#~ msgstr " CheckVal %*s Header Flags CompSize MemUsage Filters"
+
+#~ msgid "The selected match finder requires at least nice=%<PRIu32>"
+#~ msgstr "選取的符合搜尋工具需要至少 nice=%<PRIu32>"
diff --git a/po4a/.gitignore b/po4a/.gitignore
new file mode 100644
index 0000000..5bcfa04
--- /dev/null
+++ b/po4a/.gitignore
@@ -0,0 +1,2 @@
+/man
+/xz-man.pot
diff --git a/po4a/de.po b/po4a/de.po
new file mode 100644
index 0000000..b0635d0
--- /dev/null
+++ b/po4a/de.po
@@ -0,0 +1,5850 @@
+# XZ Utils man pages German translation
+# This file is put in the public domain.
+#
+# Mario Blättermann <mario.blaettermann@gmail.com>, 2015, 2019-2020, 2022-2023.
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-man 5.4.4-pre1\n"
+"Report-Msgid-Bugs-To: lasse.collin@tukaani.org\n"
+"POT-Creation-Date: 2023-11-01 20:27+0800\n"
+"PO-Revision-Date: 2023-07-19 20:47+0200\n"
+"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
+"Language-Team: German <translation-team-de@lists.sourceforge.net>\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 23.04.3\n"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "XZ"
+msgstr "XZ"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "2023-07-17"
+msgstr "17. Juli 2023"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "Tukaani"
+msgstr "Tukaani"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZ Utils"
+msgstr "XZ-Dienstprogramme"
+
+#. type: SH
+#: ../src/xz/xz.1:11 ../src/xzdec/xzdec.1:8 ../src/lzmainfo/lzmainfo.1:8
+#: ../src/scripts/xzdiff.1:10 ../src/scripts/xzgrep.1:10
+#: ../src/scripts/xzless.1:11 ../src/scripts/xzmore.1:8
+#, no-wrap
+msgid "NAME"
+msgstr "BEZEICHNUNG"
+
+#. type: Plain text
+#: ../src/xz/xz.1:13
+msgid ""
+"xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma "
+"files"
+msgstr ""
+"xz, unxz, xzcat, lzma, unlzma, lzcat - .xz- und .lzma-Dateien komprimieren "
+"oder dekomprimieren"
+
+#. type: SH
+#: ../src/xz/xz.1:14 ../src/xzdec/xzdec.1:10 ../src/lzmainfo/lzmainfo.1:10
+#: ../src/scripts/xzdiff.1:12 ../src/scripts/xzgrep.1:12
+#: ../src/scripts/xzless.1:13 ../src/scripts/xzmore.1:10
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr "ÜBERSICHT"
+
+#. type: Plain text
+#: ../src/xz/xz.1:18
+msgid "B<xz> [I<option...>] [I<file...>]"
+msgstr "B<xz> [I<Option…>] [I<Datei…>]"
+
+#. type: SH
+#: ../src/xz/xz.1:19
+#, no-wrap
+msgid "COMMAND ALIASES"
+msgstr "BEFEHLSALIASE"
+
+#. type: Plain text
+#: ../src/xz/xz.1:23
+msgid "B<unxz> is equivalent to B<xz --decompress>."
+msgstr "B<unxz> ist gleichbedeutend mit B<xz --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:27
+msgid "B<xzcat> is equivalent to B<xz --decompress --stdout>."
+msgstr "B<xzcat> ist gleichbedeutend mit B<xz --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:31
+msgid "B<lzma> is equivalent to B<xz --format=lzma>."
+msgstr "B<lzma> ist gleichbedeutend mit B<xz --format=lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:35
+msgid "B<unlzma> is equivalent to B<xz --format=lzma --decompress>."
+msgstr "B<unlzma> ist gleichbedeutend mit B<xz --format=lzma --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:39
+msgid "B<lzcat> is equivalent to B<xz --format=lzma --decompress --stdout>."
+msgstr ""
+"B<lzcat> ist gleichbedeutend mit B<xz --format=lzma --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:51
+msgid ""
+"When writing scripts that need to decompress files, it is recommended to "
+"always use the name B<xz> with appropriate arguments (B<xz -d> or B<xz -"
+"dc>) instead of the names B<unxz> and B<xzcat>."
+msgstr ""
+"Wenn Sie Skripte schreiben, die Dateien dekomprimieren, sollten Sie stets "
+"den Namen B<xz> mit den entsprechenden Argumenten (B<xz -d> oder B<xz -dc>) "
+"anstelle der Namen B<unxz> und B<xzcat> verwenden."
+
+#. type: SH
+#: ../src/xz/xz.1:52 ../src/xzdec/xzdec.1:18 ../src/lzmainfo/lzmainfo.1:15
+#: ../src/scripts/xzdiff.1:24 ../src/scripts/xzgrep.1:33
+#: ../src/scripts/xzless.1:19 ../src/scripts/xzmore.1:16
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "BESCHREIBUNG"
+
+#. type: Plain text
+#: ../src/xz/xz.1:71
+msgid ""
+"B<xz> is a general-purpose data compression tool with command line syntax "
+"similar to B<gzip>(1) and B<bzip2>(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<lzip> is supported."
+msgstr ""
+"B<xz> ist ein Allzweckwerkzeug zur Datenkompression, dessen "
+"Befehlszeilensyntax denen von B<gzip>(1) und B<bzip2>(1) ähnelt. Das native "
+"Dateiformat ist das B<.xz>-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 B<lzip> verwendeten B<.lz>-Formats unterstützt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:93
+msgid ""
+"B<xz> compresses or decompresses each I<file> according to the selected "
+"operation mode. If no I<files> are given or I<file> is B<->, B<xz> reads "
+"from standard input and writes the processed data to standard output. B<xz> "
+"will refuse (display an error and skip the I<file>) to write compressed "
+"data to standard output if it is a terminal. Similarly, B<xz> will refuse "
+"to read compressed data from standard input if it is a terminal."
+msgstr ""
+"B<xz> komprimiert oder dekomprimiert jede I<Datei> entsprechend des "
+"gewählten Vorgangsmodus. Falls entweder B<-> oder keine Datei angegeben ist, "
+"liest B<xz> aus der Standardeingabe und leitet die verarbeiteten Dateien in "
+"die Standardausgabe. Wenn die Standardausgabe kein Terminal ist, verweigert "
+"B<xz> das Schreiben komprimierter Daten in die Standardausgabe. Dabei wird "
+"eine Fehlermeldung angezeigt und die I<Datei> übersprungen. Ebenso "
+"verweigert B<xz> das Lesen komprimierter Daten aus der Standardeingabe, wenn "
+"diese ein Terminal ist."
+
+#. type: Plain text
+#: ../src/xz/xz.1:103
+msgid ""
+"Unless B<--stdout> is specified, I<files> other than B<-> are written to a "
+"new file whose name is derived from the source I<file> name:"
+msgstr ""
+"I<Dateien>, die nicht als B<-> angegeben sind, werden in eine neue Datei "
+"geschrieben, deren Name aus dem Namen der Quell-I<Datei> abgeleitet wird "
+"(außer wenn B<--stdout> angegeben ist):"
+
+#. type: IP
+#: ../src/xz/xz.1:103 ../src/xz/xz.1:109 ../src/xz/xz.1:134 ../src/xz/xz.1:139
+#: ../src/xz/xz.1:142 ../src/xz/xz.1:145 ../src/xz/xz.1:161 ../src/xz/xz.1:422
+#: ../src/xz/xz.1:425 ../src/xz/xz.1:432 ../src/xz/xz.1:677 ../src/xz/xz.1:679
+#: ../src/xz/xz.1:778 ../src/xz/xz.1:789 ../src/xz/xz.1:798 ../src/xz/xz.1:806
+#: ../src/xz/xz.1:1034 ../src/xz/xz.1:1043 ../src/xz/xz.1:1055
+#: ../src/xz/xz.1:1729 ../src/xz/xz.1:1735 ../src/xz/xz.1:1853
+#: ../src/xz/xz.1:1857 ../src/xz/xz.1:1860 ../src/xz/xz.1:1863
+#: ../src/xz/xz.1:1867 ../src/xz/xz.1:1874 ../src/xz/xz.1:1876
+#, no-wrap
+msgid "\\(bu"
+msgstr "\\(bu"
+
+#. type: Plain text
+#: ../src/xz/xz.1:109
+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 ""
+"Bei der Kompression wird das Suffix des Formats der Zieldatei (B<.xz> oder "
+"B<.lzma>) an den Namen der Quelldatei angehängt und so der Name der "
+"Zieldatei gebildet."
+
+#. type: Plain text
+#: ../src/xz/xz.1:124
+msgid ""
+"When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from "
+"the filename to get the target filename. B<xz> also recognizes the suffixes "
+"B<.txz> and B<.tlz>, and replaces them with the B<.tar> suffix."
+msgstr ""
+"Bei der Dekompression wird das Suffix B<.xz>, B<.lzma> oder B<.lz> vom "
+"Dateinamen entfernt und so der Name der Zieldatei gebildet. Außerdem erkennt "
+"B<xz> die Suffixe B<.txz> und B<.tlz> und ersetzt diese durch B<.tar>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:128
+msgid ""
+"If the target file already exists, an error is displayed and the I<file> is "
+"skipped."
+msgstr ""
+"Wenn die Zieldatei bereits existiert, wird eine Fehlermeldung angezeigt und "
+"die I<Datei> übersprungen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:134
+msgid ""
+"Unless writing to standard output, B<xz> will display a warning and skip the "
+"I<file> if any of the following applies:"
+msgstr ""
+"Außer beim Schreiben in die Standardausgabe zeigt B<xz> eine Warnung an und "
+"überspringt die I<Datei>, wenn eine der folgenden Bedingungen zutreffend ist:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:139
+msgid ""
+"I<File> is not a regular file. Symbolic links are not followed, and thus "
+"they are not considered to be regular files."
+msgstr ""
+"Die I<Datei> ist keine reguläre Datei. Symbolischen Verknüpfungen wird nicht "
+"gefolgt und diese daher nicht zu den regulären Dateien gezählt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:142
+msgid "I<File> has more than one hard link."
+msgstr "Die I<Datei> hat mehr als eine harte Verknüpfung."
+
+#. type: Plain text
+#: ../src/xz/xz.1:145
+msgid "I<File> has setuid, setgid, or sticky bit set."
+msgstr ""
+"Für die I<Datei> ist das »setuid«-, »setgid«- oder »sticky«-Bit gesetzt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:161
+msgid ""
+"The operation mode is set to compress and the I<file> 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 ""
+"Der Aktionsmodus wird auf Kompression gesetzt und die I<Datei> hat bereits "
+"das Suffix des Zieldateiformats (B<.xz> oder B<.txz> beim Komprimieren in "
+"das B<.xz>-Format und B<.lzma> oder B<.tlz> beim Komprimieren in das B<."
+"lzma>-Format)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:171
+msgid ""
+"The operation mode is set to decompress and the I<file> doesn't have a "
+"suffix of any of the supported file formats (B<.xz>, B<.txz>, B<.lzma>, B<."
+"tlz>, or B<.lz>)."
+msgstr ""
+"Der Aktionsmodus wird auf Dekompression gesetzt und die I<Datei> hat nicht "
+"das Suffix eines der unterstützten Zieldateiformate (B<.xz>, B<.txz>, B<."
+"lzma>, B<.tlz> oder B<.lz>)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:186
+msgid ""
+"After successfully compressing or decompressing the I<file>, B<xz> copies "
+"the owner, group, permissions, access time, and modification time from the "
+"source I<file> 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<file>. B<xz> "
+"doesn't support copying other metadata like access control lists or extended "
+"attributes yet."
+msgstr ""
+"Nach erfolgreicher Kompression oder Dekompression der I<Datei> kopiert B<xz> "
+"Eigentümer, Gruppe, Zugriffsrechte, Zugriffszeit und Änderungszeit aus der "
+"Ursprungs-I<Datei> 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-I<Datei> hatten. Das Kopieren anderer Metadaten wie "
+"Zugriffssteuerlisten oder erweiterter Attribute wird von B<xz> noch nicht "
+"unterstützt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:196
+msgid ""
+"Once the target file has been successfully closed, the source I<file> is "
+"removed unless B<--keep> was specified. The source I<file> is never removed "
+"if the output is written to standard output or if an error occurs."
+msgstr ""
+"Sobald die Zieldatei erfolgreich geschlossen wurde, wird die Ursprungs-"
+"I<Datei> entfernt. Dies wird durch die Option B<--keep> verhindert. Die "
+"Ursprungs-I<Datei> wird niemals entfernt, wenn die Ausgabe in die "
+"Standardausgabe geschrieben wird oder falls ein Fehler auftritt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:208
+msgid ""
+"Sending B<SIGINFO> or B<SIGUSR1> to the B<xz> 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 ""
+"Durch Senden der Signale B<SIGINFO> oder B<SIGUSR1> an den B<xz>-Prozess "
+"werden Fortschrittsinformationen in den Fehlerkanal der Standardausgabe "
+"geleitet. Dies ist nur eingeschränkt hilfreich, wenn die "
+"Standardfehlerausgabe ein Terminal ist. Mittels B<--verbose> wird ein "
+"automatisch aktualisierter Fortschrittsanzeiger angezeigt."
+
+#. type: SS
+#: ../src/xz/xz.1:209
+#, no-wrap
+msgid "Memory usage"
+msgstr "Speicherbedarf"
+
+#. type: Plain text
+#: ../src/xz/xz.1:225
+msgid ""
+"The memory usage of B<xz> 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<xz -9> currently requires 65\\ MiB of "
+"memory. Still, it is possible to have B<.xz> files that require several "
+"gigabytes of memory to decompress."
+msgstr ""
+"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 B<xz -9> komprimiert wurde, gegenwärtig "
+"etwa 65\\ MiB Speicher. Es ist jedoch auch möglich, dass B<.xz>-Dateien "
+"mehrere Gigabyte an Speicher zur Dekompression erfordern."
+
+# cripple → lahmlegen...? War mir hier zu sehr Straßenslang.
+#. type: Plain text
+#: ../src/xz/xz.1:237
+msgid ""
+"Especially users of older systems may find the possibility of very large "
+"memory usage annoying. To prevent uncomfortable surprises, B<xz> 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<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(2))."
+msgstr ""
+"Insbesondere für Benutzer älterer Systeme wird eventuell ein sehr großer "
+"Speicherbedarf ärgerlich sein. Um unangenehme Überraschungen zu vermeiden, "
+"verfügt B<xz> ü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 "
+"B<ulimit>(1) beim Begrenzen des virtuellen Speichers B<mmap>(2) "
+"beeinträchtigen)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:259
+msgid ""
+"The memory usage limiter can be enabled with the command line option B<--"
+"memlimit=>I<limit>. Often it is more convenient to enable the limiter by "
+"default by setting the environment variable B<XZ_DEFAULTS>, for example, "
+"B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+"separately for compression and decompression by using B<--memlimit-"
+"compress=>I<limit> and B<--memlimit-decompress=>I<limit>. Using these two "
+"options outside B<XZ_DEFAULTS> is rarely useful because a single run of "
+"B<xz> cannot do both compression and decompression and B<--"
+"memlimit=>I<limit> (or B<-M> I<limit>) is shorter to type on the command "
+"line."
+msgstr ""
+"Die Begrenzung des Speicherbedarfs kann mit der Befehlszeilenoption B<--"
+"memlimit=>I<Begrenzung> aktiviert werden. Oft ist es jedoch bequemer, die "
+"Begrenzung durch Setzen der Umgebungsvariable B<XZ_DEFAULTS> standardmäßig "
+"zu aktivieren, zum Beispiel B<XZ_DEFAULTS=--memlimit=150MiB>. Die "
+"Begrenzungen können getrennt für Kompression und Dekompression mittels B<--"
+"memlimit-compress=>I<Begrenzung> und B<--memlimit-decompress=>I<Begrenzung> "
+"festgelegt werden. Die Verwendung einer solchen Option außerhalb der "
+"Variable B<XZ_DEFAULTS> ist kaum sinnvoll, da B<xz> in einer einzelnen "
+"Aktion nicht gleichzeitig Kompression und Dekompression ausführen kann und "
+"B<--memlimit=>I<Begrenzung> (oder B<-M> I<Begrenzung>) lässt sich einfacher "
+"in der Befehlszeile eingeben."
+
+#. type: Plain text
+#: ../src/xz/xz.1:278
+msgid ""
+"If the specified memory usage limit is exceeded when decompressing, B<xz> "
+"will display an error and decompressing the file will fail. If the limit is "
+"exceeded when compressing, B<xz> 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<xz -9>, the settings will be scaled down only "
+"a little, not all the way down to B<xz -8>."
+msgstr ""
+"Wenn die angegebene Speicherbegrenzung bei der Dekompression überschritten "
+"wird, schlägt der Vorgang fehl und B<xz> zeigt eine Fehlermeldung an. Wird "
+"die Begrenzung bei der Kompression überschritten, dann versucht B<xz> die "
+"Einstellungen entsprechend anzupassen, außer wenn B<--format=raw> oder B<--"
+"no-adjust> 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 B<xz -9> liegt, werden auch die Einstellungen nur wenig angepasst und "
+"nicht vollständig herunter zu den Werten für B<xz -8>"
+
+#. type: SS
+#: ../src/xz/xz.1:279
+#, no-wrap
+msgid "Concatenation and padding with .xz files"
+msgstr "Verkettung und Auffüllung von .xz-Dateien"
+
+#. type: Plain text
+#: ../src/xz/xz.1:287
+msgid ""
+"It is possible to concatenate B<.xz> files as is. B<xz> will decompress "
+"such files as if they were a single B<.xz> file."
+msgstr ""
+"Es ist möglich, B<.xz>-Dateien direkt zu verketten. Solche Dateien werden "
+"von B<xz> genauso dekomprimiert wie eine einzelne B<.xz>-Datei."
+
+#. type: Plain text
+#: ../src/xz/xz.1:296
+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 ""
+"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 B<.xz>-Datei auf einem "
+"Datenträger gespeichert wird, dessen Dateisystem die Dateigrößen in 512-Byte-"
+"Blöcken speichert."
+
+#. type: Plain text
+#: ../src/xz/xz.1:300
+msgid ""
+"Concatenation and padding are not allowed with B<.lzma> files or raw streams."
+msgstr ""
+"Verkettung und Auffüllung sind für B<.lzma>-Dateien oder Rohdatenströme "
+"nicht erlaubt."
+
+#. type: SH
+#: ../src/xz/xz.1:301 ../src/xzdec/xzdec.1:61
+#, no-wrap
+msgid "OPTIONS"
+msgstr "OPTIONEN"
+
+#. type: SS
+#: ../src/xz/xz.1:303
+#, no-wrap
+msgid "Integer suffixes and special values"
+msgstr "Ganzzahlige Suffixe und spezielle Werte"
+
+#. type: Plain text
+#: ../src/xz/xz.1:307
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:307
+#, no-wrap
+msgid "B<KiB>"
+msgstr "B<KiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:318
+msgid ""
+"Multiply the integer by 1,024 (2^10). B<Ki>, B<k>, B<kB>, B<K>, and B<KB> "
+"are accepted as synonyms for B<KiB>."
+msgstr ""
+"multipliziert die Ganzzahl mit 1.024 (2^10). B<Ki>, B<k>, B<kB>, B<K> und "
+"B<KB> werden als Synonyme für B<KiB> akzeptiert."
+
+#. type: TP
+#: ../src/xz/xz.1:318
+#, no-wrap
+msgid "B<MiB>"
+msgstr "B<MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:328
+msgid ""
+"Multiply the integer by 1,048,576 (2^20). B<Mi>, B<m>, B<M>, and B<MB> are "
+"accepted as synonyms for B<MiB>."
+msgstr ""
+"multipliziert die Ganzzahl mit 1.048.576 (2^20). B<Mi>, B<m>, B<M> und B<MB> "
+"werden als Synonyme für B<MiB> akzeptiert."
+
+#. type: TP
+#: ../src/xz/xz.1:328
+#, no-wrap
+msgid "B<GiB>"
+msgstr "B<GiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:338
+msgid ""
+"Multiply the integer by 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, and B<GB> "
+"are accepted as synonyms for B<GiB>."
+msgstr ""
+"multipliziert die Ganzzahl mit 1.073.741.824 (2^30). B<Gi>, B<g>, B<G> und "
+"B<GB> werden als Synonyme für B<GiB> akzeptiert."
+
+#. type: Plain text
+#: ../src/xz/xz.1:343
+msgid ""
+"The special value B<max> can be used to indicate the maximum integer value "
+"supported by the option."
+msgstr ""
+"Der spezielle Wert B<max> kann dazu verwendet werden, um den von der "
+"jeweiligen Option akzeptierten maximalen Ganzzahlwert anzugeben."
+
+#. type: SS
+#: ../src/xz/xz.1:344
+#, no-wrap
+msgid "Operation mode"
+msgstr "Aktionsmodus"
+
+#. type: Plain text
+#: ../src/xz/xz.1:347
+msgid ""
+"If multiple operation mode options are given, the last one takes effect."
+msgstr ""
+"Falls mehrere Aktionsmodi angegeben sind, wird der zuletzt angegebene "
+"verwendet."
+
+#. type: TP
+#: ../src/xz/xz.1:347
+#, no-wrap
+msgid "B<-z>, B<--compress>"
+msgstr "B<-z>, B<--compress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:356
+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<unxz> implies B<--decompress>)."
+msgstr ""
+"Kompression. Dies ist der voreingestellte Aktionsmodus, sofern keiner "
+"angegeben ist und auch kein bestimmter Modus aus dem Befehlsnamen abgeleitet "
+"werden kann (der Befehl B<unxz> impliziert zum Beispiel B<--decompress>)."
+
+#. type: TP
+#: ../src/xz/xz.1:356 ../src/xzdec/xzdec.1:62
+#, no-wrap
+msgid "B<-d>, B<--decompress>, B<--uncompress>"
+msgstr "B<-d>, B<--decompress>, B<--uncompress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:359
+msgid "Decompress."
+msgstr "dekomprimpiert."
+
+#. type: TP
+#: ../src/xz/xz.1:359
+#, no-wrap
+msgid "B<-t>, B<--test>"
+msgstr "B<-t>, B<--test>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:368
+msgid ""
+"Test the integrity of compressed I<files>. 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 ""
+"prüft die Integrität der komprimierten I<Dateien>. Diese Option ist "
+"gleichbedeutend mit B<--decompress --stdout>, außer dass die dekomprimierten "
+"Daten verworfen werden, anstatt sie in die Standardausgabe zu leiten. Es "
+"werden keine Dateien erstellt oder entfernt."
+
+#. type: TP
+#: ../src/xz/xz.1:368
+#, no-wrap
+msgid "B<-l>, B<--list>"
+msgstr "B<-l>, B<--list>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:377
+msgid ""
+"Print information about compressed I<files>. 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 ""
+"gibt Informationen zu den komprimierten I<Dateien> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:392
+msgid ""
+"The default listing shows basic information about I<files>, 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<less\\ -S> may be convenient if the terminal isn't wide enough."
+msgstr ""
+"Die Liste zeigt in der Standardeinstellung grundlegende Informationen zu den "
+"I<Dateien> an, zeilenweise pro Datei. Detailliertere Informationen erhalten "
+"Sie mit der Option B<--verbose>. 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\\& B<less\\ -S> sinnvoll sein, falls das Terminal nicht "
+"breit genug ist."
+
+#. type: Plain text
+#: ../src/xz/xz.1:399
+msgid ""
+"The exact output may vary between B<xz> versions and different locales. For "
+"machine-readable output, B<--robot --list> should be used."
+msgstr ""
+"Die exakte Ausgabe kann in verschiedenen B<xz>-Versionen und "
+"Spracheinstellungen unterschiedlich sein. Wenn eine maschinell auswertbare "
+"Ausgabe gewünscht ist, dann sollten Sie B<--robot --list> verwenden."
+
+#. type: SS
+#: ../src/xz/xz.1:400
+#, no-wrap
+msgid "Operation modifiers"
+msgstr "Aktionsattribute"
+
+#. type: TP
+#: ../src/xz/xz.1:401 ../src/xzdec/xzdec.1:69
+#, no-wrap
+msgid "B<-k>, B<--keep>"
+msgstr "B<-k>, B<--keep>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:404
+msgid "Don't delete the input files."
+msgstr "verhindert das Löschen der Eingabedateien."
+
+#. type: Plain text
+#: ../src/xz/xz.1:418
+msgid ""
+"Since B<xz> 5.2.6, this option also makes B<xz> 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 ""
+"Seit der B<xz>-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 B<--force>."
+
+#. type: TP
+#: ../src/xz/xz.1:418
+#, no-wrap
+msgid "B<-f>, B<--force>"
+msgstr "B<-f>, B<--force>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:421
+msgid "This option has several effects:"
+msgstr "Diese Option hat verschiedene Auswirkungen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:425
+msgid ""
+"If the target file already exists, delete it before compressing or "
+"decompressing."
+msgstr ""
+"Wenn die Zieldatei bereits existiert, wird diese vor der Kompression oder "
+"Dekompression gelöscht."
+
+#. type: Plain text
+#: ../src/xz/xz.1:432
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:457
+msgid ""
+"When used with B<--decompress> B<--stdout> and B<xz> cannot recognize the "
+"type of the source file, copy the source file as is to standard output. "
+"This allows B<xzcat> B<--force> to be used like B<cat>(1) for files that "
+"have not been compressed with B<xz>. Note that in future, B<xz> might "
+"support new compressed file formats, which may make B<xz> decompress more "
+"types of files instead of copying them as is to standard output. B<--"
+"format=>I<format> can be used to restrict B<xz> to decompress only a single "
+"file format."
+msgstr ""
+"Wenn es zusammen mit B<--decompress> und B<--stdout> verwendet wird und "
+"B<xz> den Typ der Quelldatei nicht ermitteln kann, wird die Quelldatei "
+"unverändert in die Standardausgabe kopiert. Dadurch kann B<xzcat> B<--force> "
+"für Dateien, die nicht mit B<xz> komprimiert wurden, wie B<cat>(1) verwendet "
+"werden. Zukünftig könnte B<xz> neue Dateikompressionsformate unterstützen, "
+"wodurch B<xz> mehr Dateitypen dekomprimieren kann, anstatt sie unverändert "
+"in die Standardausgabe zu kopieren. Mit der Option B<--format=>I<Format> "
+"können Sie B<xz> anweisen, nur ein einzelnes Dateiformat zu dekomprimieren."
+
+#. type: TP
+#: ../src/xz/xz.1:458 ../src/xzdec/xzdec.1:76
+#, 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:464
+msgid ""
+"Write the compressed or decompressed data to standard output instead of a "
+"file. This implies B<--keep>."
+msgstr ""
+"schreibt die komprimierten oder dekomprimierten Daten in die Standardausgabe "
+"anstatt in eine Datei. Dies impliziert B<--keep>."
+
+#. type: TP
+#: ../src/xz/xz.1:464
+#, no-wrap
+msgid "B<--single-stream>"
+msgstr "B<--single-stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:473
+msgid ""
+"Decompress only the first B<.xz> stream, and silently ignore possible "
+"remaining input data following the stream. Normally such trailing garbage "
+"makes B<xz> display an error."
+msgstr ""
+"dekomprimiert nur den ersten B<.xz>-Datenstrom und ignoriert stillschweigend "
+"weitere Eingabedaten, die möglicherweise dem Datenstrom folgen. "
+"Normalerweise führt solcher anhängender Datenmüll dazu, dass B<xz> eine "
+"Fehlermeldung ausgibt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:482
+msgid ""
+"B<xz> never decompresses more than one stream from B<.lzma> files or raw "
+"streams, but this option still makes B<xz> ignore the possible trailing data "
+"after the B<.lzma> file or raw stream."
+msgstr ""
+"B<xz> dekomprimiert niemals mehr als einen Datenstrom aus B<.lzma>-Dateien "
+"oder Rohdatenströmen, aber dennoch wird durch diese Option möglicherweise "
+"vorhandener Datenmüll nach der B<.lzma>-Datei oder dem Rohdatenstrom "
+"ignoriert."
+
+#. type: Plain text
+#: ../src/xz/xz.1:487
+msgid ""
+"This option has no effect if the operation mode is not B<--decompress> or "
+"B<--test>."
+msgstr ""
+"Diese Option ist wirkungslos, wenn der Aktionsmodus nicht B<--decompress> "
+"oder B<--test> ist."
+
+#. type: TP
+#: ../src/xz/xz.1:487
+#, no-wrap
+msgid "B<--no-sparse>"
+msgstr "B<--no-sparse>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:499
+msgid ""
+"Disable creation of sparse files. By default, if decompressing into a "
+"regular file, B<xz> 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 ""
+"verhindert die Erzeugung von Sparse-Dateien. In der Voreinstellung versucht "
+"B<xz>, 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."
+
+#. type: TP
+#: ../src/xz/xz.1:499
+#, 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:511
+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 ""
+"verwendet I<.suf> bei der Dekompression anstelle von B<.xz> oder B<.lzma> "
+"als Suffix für die Zieldatei. Falls nicht in die Standardausgabe geschrieben "
+"wird und die Quelldatei bereits das Suffix I<.suf> hat, wird eine Warnung "
+"angezeigt und die Datei übersprungen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:525
+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 ""
+"berücksichtigt bei der Dekompression zusätzlich zu Dateien mit den Suffixen "
+"B<.xz>, B<.txz>, B<.lzma>, B<.tlz> oder B<.lz> auch jene mit dem Suffix I<."
+"suf>. Falls die Quelldatei das Suffix I<.suf> hat, wird dieses entfernt und "
+"so der Name der Zieldatei abgeleitet."
+
+#. type: Plain text
+#: ../src/xz/xz.1:531
+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 ""
+"Beim Komprimieren oder Dekomprimieren von Rohdatenströmen mit B<--"
+"format=raw> 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."
+
+#. type: TP
+#: ../src/xz/xz.1:531
+#, no-wrap
+msgid "B<--files>[B<=>I<file>]"
+msgstr "B<--files>[B<=>I<Datei>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:545
+msgid ""
+"Read the filenames to process from I<file>; if I<file> 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<file>."
+msgstr ""
+"liest die zu verarbeitenden Dateinamen aus I<Datei>. Falls keine I<Datei> "
+"angegeben ist, werden die Dateinamen aus der Standardeingabe gelesen. "
+"Dateinamen müssen mit einem Zeilenumbruch beendet werden. Ein Bindestrich "
+"(B<->) 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 I<Datei> verarbeitet."
+
+#. type: TP
+#: ../src/xz/xz.1:545
+#, no-wrap
+msgid "B<--files0>[B<=>I<file>]"
+msgstr "B<--files0>[B<=>I<Datei>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:549
+msgid ""
+"This is identical to B<--files>[B<=>I<file>] except that each filename must "
+"be terminated with the null character."
+msgstr ""
+"Dies ist gleichbedeutend mit B<--files>[B<=>I<Datei>], außer dass jeder "
+"Dateiname mit einem Null-Zeichen abgeschlossen werden muss."
+
+#. type: SS
+#: ../src/xz/xz.1:550
+#, no-wrap
+msgid "Basic file format and compression options"
+msgstr "Grundlegende Dateiformat- und Kompressionsoptionen"
+
+#. type: TP
+#: ../src/xz/xz.1:551
+#, no-wrap
+msgid "B<-F> I<format>, B<--format=>I<format>"
+msgstr "B<-F> I<Format>, B<--format=>I<Format>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:556
+msgid "Specify the file I<format> to compress or decompress:"
+msgstr ""
+"gibt das I<Format> der zu komprimierenden oder dekomprimierenden Datei an:"
+
+#. type: TP
+#: ../src/xz/xz.1:557
+#, no-wrap
+msgid "B<auto>"
+msgstr "B<auto>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:569
+msgid ""
+"This is the default. When compressing, B<auto> is equivalent to B<xz>. "
+"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 ""
+"Dies ist die Voreinstellung. Bei der Kompression ist B<auto> gleichbedeutend "
+"mit B<xz>. Bei der Dekompression wird das Format der Eingabedatei "
+"automatisch erkannt. Beachten Sie, dass Rohdatenströme, wie sie mit B<--"
+"format=raw> erzeugt werden, nicht automatisch erkannt werden können."
+
+#. type: TP
+#: ../src/xz/xz.1:569
+#, no-wrap
+msgid "B<xz>"
+msgstr "B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:576
+msgid ""
+"Compress to the B<.xz> file format, or accept only B<.xz> files when "
+"decompressing."
+msgstr ""
+"Die Kompression erfolgt in das B<.xz>-Dateiformat oder akzeptiert nur B<.xz>-"
+"Dateien bei der Dekompression."
+
+#. type: TP
+#: ../src/xz/xz.1:576
+#, no-wrap
+msgid "B<lzma>, B<alone>"
+msgstr "B<lzma>, B<alone>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:586
+msgid ""
+"Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files "
+"when decompressing. The alternative name B<alone> is provided for backwards "
+"compatibility with LZMA Utils."
+msgstr ""
+"Die Kompression erfolgt in das veraltete B<.lzma>-Dateiformat oder "
+"akzeptiert nur B<.lzma>-Dateien bei der Dekompression. Der alternative Name "
+"B<alone> dient der Abwärtskompatibilität zu den LZMA-Dienstprogrammen."
+
+#. type: TP
+#: ../src/xz/xz.1:586
+#, no-wrap
+msgid "B<lzip>"
+msgstr "B<lzip>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:592
+msgid ""
+"Accept only B<.lz> files when decompressing. Compression is not supported."
+msgstr ""
+"Akzeptiert nur B<.lz>-Dateien bei der Dekompression. Kompression wird nicht "
+"unterstützt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:605
+msgid ""
+"The B<.lz> format version 0 and the unextended version 1 are supported. "
+"Version 0 files were produced by B<lzip> 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<lzip> 1.18."
+msgstr ""
+"Das B<.lz>-Format wird in Version 0 und der unerweiterten Version 1 "
+"unterstützt. Dateien der Version 0 wurden von B<lzip> 1.3 und älter "
+"erstellt. Solche Dateien sind nicht sehr weit verbreitet, können aber in "
+"Dateiarchiven gefunden werden, da einige Quellpakete in diesem Format "
+"veröffentlicht wurden. Es ist auch möglich, dass Benutzer alte persönliche "
+"Dateien in diesem Format haben. Die Dekompressionsunterstützung für das "
+"Format der Version 0 wurde mit der Version 1.18 aus B<lzip> entfernt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:614
+msgid ""
+"B<lzip> 1.4 and later create files in the format version 1. The sync flush "
+"marker extension to the format version 1 was added in B<lzip> 1.6. This "
+"extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt "
+"input)."
+msgstr ""
+"B<lzip>-Versionen ab 1.4 erstellen Dateien im Format der Version 0. Die "
+"Erweiterung »Sync Flush Marker« zur Formatversion 1 wurde in B<lzip> 1.6 "
+"hinzugefügt. Diese Erweiterung wird sehr selten verwendet und wird von B<xz> "
+"nicht unterstützt (die Eingabe wird als beschädigt erkannt)."
+
+#. type: TP
+#: ../src/xz/xz.1:614
+#, no-wrap
+msgid "B<raw>"
+msgstr "B<raw>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:622
+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 ""
+"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 B<--format=raw> verwenden und die "
+"Filterkette ausdrücklich angeben, die normalerweise in den (hier fehlenden) "
+"Container-Headern gespeichert worden wäre."
+
+#. type: TP
+#: ../src/xz/xz.1:623
+#, no-wrap
+msgid "B<-C> I<check>, B<--check=>I<check>"
+msgstr "B<-C> I<Prüfung>, B<--check=>I<Prüfung>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:638
+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 ""
+"gibt den Typ der Integritätsprüfung an. Die Prüfsumme wird aus den "
+"unkomprimierten Daten berechnet und in der B<.xz>-Datei gespeichert. Diese "
+"Option wird nur bei der Kompression in das B<.xz>-Format angewendet, da das "
+"B<.lzma>-Format keine Integritätsprüfungen unterstützt. Die eigentliche "
+"Integritätsprüfung erfolgt (falls möglich), wenn die B<.xz>-Datei "
+"dekomprimiert wird."
+
+#. type: Plain text
+#: ../src/xz/xz.1:642
+msgid "Supported I<check> types:"
+msgstr "Folgende Typen von I<Prüfungen> werden unterstützt:"
+
+#. type: TP
+#: ../src/xz/xz.1:643
+#, no-wrap
+msgid "B<none>"
+msgstr "B<none>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:649
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:649
+#, no-wrap
+msgid "B<crc32>"
+msgstr "B<crc32>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:652
+msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)."
+msgstr ""
+"berechnet die CRC32-Prüfsumme anhand des Polynoms aus IEEE-802.3 (Ethernet)."
+
+#. type: TP
+#: ../src/xz/xz.1:652
+#, no-wrap
+msgid "B<crc64>"
+msgstr "B<crc64>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:657
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:657
+#, no-wrap
+msgid "B<sha256>"
+msgstr "B<sha256>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:661
+msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64."
+msgstr ""
+"berechnet die SHA-256-Prüfsumme. Dies ist etwas langsamer als CRC32 und "
+"CRC64."
+
+#. type: Plain text
+#: ../src/xz/xz.1:667
+msgid ""
+"Integrity of the B<.xz> headers is always verified with CRC32. It is not "
+"possible to change or disable it."
+msgstr ""
+"Die Integrität der B<.xz>-Header wird immer mit CRC32 geprüft. Es ist nicht "
+"möglich, dies zu ändern oder zu deaktivieren."
+
+#. type: TP
+#: ../src/xz/xz.1:667
+#, no-wrap
+msgid "B<--ignore-check>"
+msgstr "B<--ignore-check>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:673
+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 ""
+"verifiziert die Integritätsprüfsumme der komprimierten Daten bei der "
+"Dekompression nicht. Die CRC32-Werte in den B<.xz>-Headern werden weiterhin "
+"normal verifiziert."
+
+#. type: Plain text
+#: ../src/xz/xz.1:676
+msgid ""
+"B<Do not use this option unless you know what you are doing.> Possible "
+"reasons to use this option:"
+msgstr ""
+"B<Verwenden Sie diese Option nicht, außer Sie wissen, was Sie tun.> Mögliche "
+"Gründe, diese Option zu verwenden:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:679
+msgid "Trying to recover data from a corrupt .xz file."
+msgstr "Versuchen, Daten aus einer beschädigten .xz-Datei wiederherzustellen."
+
+# Irgendwie ist mir »extrem gut komprimiert« hier zu diffus. Was soll »gut« hier bedeuten? Besonders stark, besonders clever, was auch immer...
+#. type: Plain text
+#: ../src/xz/xz.1:685
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:686
+#, no-wrap
+msgid "B<-0> ... B<-9>"
+msgstr "B<-0> … B<-9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:695
+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 ""
+"wählt eine der voreingestellten Kompressionsstufen, standardmäßig B<-6>. "
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:710
+msgid ""
+"The differences between the presets are more significant than with "
+"B<gzip>(1) and B<bzip2>(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<it's not a good idea to blindly use -9 for "
+"everything> like it often is with B<gzip>(1) and B<bzip2>(1)."
+msgstr ""
+"Die Unterschiede zwischen den Voreinstellungsstufen sind deutlicher als bei "
+"B<gzip>(1) und B<bzip2>(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 B<ist es keine gute Idee, "
+"blindlings -9 für alles> zu verwenden, wie dies häufig mit B<gzip>(1) und "
+"B<bzip2>(1) gehandhabt wird."
+
+#. type: TP
+#: ../src/xz/xz.1:711
+#, no-wrap
+msgid "B<-0> ... B<-3>"
+msgstr "B<-0> … B<-3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:723
+msgid ""
+"These are somewhat fast presets. B<-0> is sometimes faster than B<gzip -9> "
+"while compressing much better. The higher ones often have speed comparable "
+"to B<bzip2>(1) with comparable or better compression ratio, although the "
+"results depend a lot on the type of data being compressed."
+msgstr ""
+"Diese Voreinstellungen sind recht schnell. B<-0> ist manchmal schneller als "
+"B<gzip -9>, wobei aber die Kompression wesentlich besser ist. Die "
+"schnelleren Voreinstellungen sind im Hinblick auf die Geschwindigkeit mit "
+"B<bzip2>(1) vergleichbar , mit einem ähnlichen oder besseren "
+"Kompressionsverhältnis, wobei das Ergebnis aber stark vom Typ der zu "
+"komprimierenden Daten abhängig ist."
+
+#. type: TP
+#: ../src/xz/xz.1:723
+#, no-wrap
+msgid "B<-4> ... B<-6>"
+msgstr "B<-4> … B<-6>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:737
+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 ""
+"Gute bis sehr gute Kompression, wobei der Speicherbedarf für die "
+"Dekompression selbst auf alten Systemen akzeptabel ist. B<-6> 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 (B<-5e> oder B<-6e> sind ebenfalls eine "
+"Überlegung wert. Siehe B<--extreme>)."
+
+#. type: TP
+#: ../src/xz/xz.1:737
+#, no-wrap
+msgid "B<-7 ... -9>"
+msgstr "B<-7 … -9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:744
+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 ""
+"Ähnlich wie B<-6>, 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:752
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:754
+msgid "The following table summarises the features of the presets:"
+msgstr ""
+"Die folgende Tabelle fasst die Eigenschaften der Voreinstellungen zusammen:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "Preset"
+msgstr "Voreinst."
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DictSize"
+msgstr "Wörtb.Gr"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "CompCPU"
+msgstr "KomprCPU"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "CompMem"
+msgstr "KompSpeich"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DecMem"
+msgstr "DekompSpeich"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#: ../src/xz/xz.1:2840
+#, no-wrap
+msgid "-0"
+msgstr "-0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:843 ../src/xz/xz.1:2450
+#, no-wrap
+msgid "256 KiB"
+msgstr "256 KiB"
+
+#. type: TP
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2840 ../src/scripts/xzgrep.1:82
+#, no-wrap
+msgid "0"
+msgstr "0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:764 ../src/xz/xz.1:845 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "3 MiB"
+msgstr "3 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:763 ../src/xz/xz.1:843 ../src/xz/xz.1:844
+#: ../src/xz/xz.1:2451 ../src/xz/xz.1:2452 ../src/xz/xz.1:2454
+#, no-wrap
+msgid "1 MiB"
+msgstr "1 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:2451 ../src/xz/xz.1:2476
+#: ../src/xz/xz.1:2841
+#, no-wrap
+msgid "-1"
+msgstr "-1"
+
+#. type: TP
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:1758 ../src/xz/xz.1:2841
+#: ../src/scripts/xzgrep.1:86
+#, no-wrap
+msgid "1"
+msgstr "1"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "9 MiB"
+msgstr "9 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:764 ../src/xz/xz.1:844 ../src/xz/xz.1:845
+#: ../src/xz/xz.1:2452 ../src/xz/xz.1:2455 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "2 MiB"
+msgstr "2 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:2452 ../src/xz/xz.1:2477
+#: ../src/xz/xz.1:2842
+#, no-wrap
+msgid "-2"
+msgstr "-2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:1760 ../src/xz/xz.1:2842
+#, no-wrap
+msgid "2"
+msgstr "2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2477
+#, no-wrap
+msgid "17 MiB"
+msgstr "17 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2453 ../src/xz/xz.1:2478
+#: ../src/xz/xz.1:2843
+#, no-wrap
+msgid "-3"
+msgstr "-3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:843 ../src/xz/xz.1:846
+#: ../src/xz/xz.1:847 ../src/xz/xz.1:2453 ../src/xz/xz.1:2454
+#: ../src/xz/xz.1:2456
+#, no-wrap
+msgid "4 MiB"
+msgstr "4 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2843
+#, no-wrap
+msgid "3"
+msgstr "3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2458
+#: ../src/xz/xz.1:2459 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "32 MiB"
+msgstr "32 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847
+#, no-wrap
+msgid "5 MiB"
+msgstr "5 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:2454 ../src/xz/xz.1:2479
+#: ../src/xz/xz.1:2844
+#, no-wrap
+msgid "-4"
+msgstr "-4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:1759 ../src/xz/xz.1:1761
+#: ../src/xz/xz.1:1762 ../src/xz/xz.1:1764 ../src/xz/xz.1:2844
+#, no-wrap
+msgid "4"
+msgstr "4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "48 MiB"
+msgstr "48 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2455 ../src/xz/xz.1:2480
+#: ../src/xz/xz.1:2845
+#, no-wrap
+msgid "-5"
+msgstr "-5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2455 ../src/xz/xz.1:2456 ../src/xz/xz.1:2457
+#, no-wrap
+msgid "8 MiB"
+msgstr "8 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2845
+#, no-wrap
+msgid "5"
+msgstr "5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2480 ../src/xz/xz.1:2481
+#, no-wrap
+msgid "94 MiB"
+msgstr "94 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:2456 ../src/xz/xz.1:2481
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "-6"
+msgstr "-6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:769 ../src/xz/xz.1:770 ../src/xz/xz.1:771
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "6"
+msgstr "6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:2457 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "-7"
+msgstr "-7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2457
+#: ../src/xz/xz.1:2458 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "16 MiB"
+msgstr "16 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "186 MiB"
+msgstr "186 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:2458 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "-8"
+msgstr "-8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "370 MiB"
+msgstr "370 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851
+#, no-wrap
+msgid "33 MiB"
+msgstr "33 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:2459 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "-9"
+msgstr "-9"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2459
+#, no-wrap
+msgid "64 MiB"
+msgstr "64 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "674 MiB"
+msgstr "674 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852
+#, no-wrap
+msgid "65 MiB"
+msgstr "65 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:777
+msgid "Column descriptions:"
+msgstr "Spaltenbeschreibungen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:789
+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 ""
+"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 B<-7> … "
+"B<-9> zu vermeiden, falls es keinen wirklichen Bedarf dafür gibt. Mit B<-6> "
+"und weniger wird üblicherweise so wenig Speicher verschwendet, dass dies "
+"nicht ins Gewicht fällt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:798
+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 ""
+"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 B<-6> bis B<-9> gleich ist, tendieren höhere Stufen dazu, etwas "
+"langsamer zu sein. Um eine noch langsamere, aber möglicherweise bessere "
+"Kompression zu erhalten, siehe B<--extreme>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:806
+msgid ""
+"CompMem contains the compressor memory requirements in the single-threaded "
+"mode. It may vary slightly between B<xz> versions. Memory requirements of "
+"some of the future multithreaded modes may be dramatically higher than that "
+"of the single-threaded mode."
+msgstr ""
+"KompSpeich enthält den Speicherbedarf des Kompressors im Einzel-Thread-"
+"Modus. Dieser kann zwischen den B<xz>-Versionen leicht variieren. Der "
+"Speicherbedarf einiger der zukünftigen Multithread-Modi kann dramatisch "
+"höher sein als im Einzel-Thread-Modus."
+
+#. type: Plain text
+#: ../src/xz/xz.1:813
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:814
+#, no-wrap
+msgid "B<-e>, B<--extreme>"
+msgstr "B<-e>, B<--extreme>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:823
+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 ""
+"verwendet eine langsamere Variante der gewählten Kompressions-"
+"Voreinstellungsstufe (B<-0> … B<-9>), 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 B<-0> bis B<-3> geringfügig an."
+
+#. type: Plain text
+#: ../src/xz/xz.1:835
+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 ""
+"Da es zwei Voreinstellungen mit den Wörterbuchgrößen 4\\ MiB und 8\\ MiB "
+"gibt, verwenden die Voreinstellungsstufen B<-3e> und B<-5e> etwas schnellere "
+"Einstellungen (niedrigere KompCPU) als B<-4e> beziehungsweise B<-6e>. Auf "
+"diese Weise sind zwei Voreinstellungen nie identisch."
+
+#. type: tbl table
+#: ../src/xz/xz.1:843
+#, no-wrap
+msgid "-0e"
+msgstr "-0e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:843 ../src/xz/xz.1:844 ../src/xz/xz.1:845 ../src/xz/xz.1:847
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:850 ../src/xz/xz.1:851 ../src/xz/xz.1:852
+#: ../src/xz/xz.1:2848
+#, no-wrap
+msgid "8"
+msgstr "8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "-1e"
+msgstr "-1e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "13 MiB"
+msgstr "13 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "-2e"
+msgstr "-2e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "25 MiB"
+msgstr "25 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846
+#, no-wrap
+msgid "-3e"
+msgstr "-3e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846 ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "7"
+msgstr "7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:847
+#, no-wrap
+msgid "-4e"
+msgstr "-4e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "-5e"
+msgstr "-5e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2848
+#, no-wrap
+msgid "-6e"
+msgstr "-6e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:850
+#, no-wrap
+msgid "-7e"
+msgstr "-7e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:851
+#, no-wrap
+msgid "-8e"
+msgstr "-8e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:852
+#, no-wrap
+msgid "-9e"
+msgstr "-9e"
+
+#. type: Plain text
+#: ../src/xz/xz.1:864
+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 ""
+"Zum Beispiel gibt es insgesamt vier Voreinstellungen, die ein 8\\ MiB großes "
+"Wörterbuch verwenden, deren Reihenfolge von der schnellsten zur langsamsten "
+"B<-5>, B<-6>, B<-5e> und B<-6e> ist."
+
+#. type: TP
+#: ../src/xz/xz.1:864
+#, no-wrap
+msgid "B<--fast>"
+msgstr "B<--fast>"
+
+#. type: TP
+#: ../src/xz/xz.1:867
+#, no-wrap
+msgid "B<--best>"
+msgstr "B<--best>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:878
+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 ""
+"sind etwas irreführende Aliase für B<-0> beziehungsweise B<-9>. Sie werden "
+"nur zwecks Abwärtskompatibilität zu den LZMA-Dienstprogrammen "
+"bereitgestellt. Sie sollten diese Optionen besser nicht verwenden."
+
+#. type: TP
+#: ../src/xz/xz.1:878
+#, no-wrap
+msgid "B<--block-size=>I<size>"
+msgstr "B<--block-size=>I<Größe>"
+
+# CHECK multi-threading and makes limited random-access
+#. type: Plain text
+#: ../src/xz/xz.1:891
+msgid ""
+"When compressing to the B<.xz> format, split the input data into blocks of "
+"I<size> 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 ""
+"teilt beim Komprimieren in das B<.xz>-Format die Eingabedaten in Blöcke der "
+"angegebenen I<Größe> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:909
+msgid ""
+"In multi-threaded mode about three times I<size> bytes will be allocated in "
+"each thread for buffering input and output. The default I<size> 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<size> less than the LZMA2 dictionary size is waste of RAM "
+"because then the LZMA2 dictionary buffer will never get fully used. The "
+"sizes of the blocks are stored in the block headers, which a future version "
+"of B<xz> will use for multi-threaded decompression."
+msgstr ""
+"Im Multi-Thread-Modus wird etwa die dreifache I<Größe> in jedem Thread zur "
+"Pufferung der Ein- und Ausgabe belegt. Die vorgegebene I<Größe> 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 I<Größe>, die geringer "
+"ist als die des LZMA2-Wörterbuchs, ist Speicherverschwendung, weil dann der "
+"LZMA2-Wörterbuchpuffer niemals vollständig genutzt werden würde. Die Größe "
+"der Blöcke wird in den Block-Headern gespeichert, die von einer zukünftigen "
+"Version von B<xz> für eine Multi-Thread-Dekompression genutzt wird."
+
+#. type: Plain text
+#: ../src/xz/xz.1:918
+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 a future version of B<xz> won't be able decompress the files in "
+"multi-threaded mode."
+msgstr ""
+"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 eine zukünftige Version von B<xz> nicht in der Lage sein wird, "
+"die Dateien im Multi-Thread-Modus zu dekomprimieren."
+
+#. type: TP
+#: ../src/xz/xz.1:918
+#, no-wrap
+msgid "B<--block-list=>I<sizes>"
+msgstr "B<--block-list=>I<Größen>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:924
+msgid ""
+"When compressing to the B<.xz> format, start a new block after the given "
+"intervals of uncompressed data."
+msgstr ""
+"beginnt bei der Kompression in das B<.xz>-Format nach den angegebenen "
+"Intervallen unkomprimierter Daten einen neuen Block."
+
+#. type: Plain text
+#: ../src/xz/xz.1:930
+msgid ""
+"The uncompressed I<sizes> of the blocks are specified as a comma-separated "
+"list. Omitting a size (two or more consecutive commas) is a shorthand to "
+"use the size of the previous block."
+msgstr ""
+"Die unkomprimierte I<Größe> der Blöcke wird in einer durch Kommata "
+"getrennten Liste angegeben. Auslassen einer Größe (zwei oder mehr "
+"aufeinander folgende Kommata) ist ein Kürzel dafür, die Größe des vorherigen "
+"Blocks zu verwenden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:940
+msgid ""
+"If the input file is bigger than the sum of I<sizes>, the last value in "
+"I<sizes> is repeated until the end of the file. A special value of B<0> may "
+"be used as the last value to indicate that the rest of the file should be "
+"encoded as a single block."
+msgstr ""
+"Falls die Eingabedatei größer ist als die Summe der I<Größen>, dann wird der "
+"letzte in I<Größe> angegebene Wert bis zum Ende der Datei wiederholt. Mit "
+"dem speziellen Wert B<0> können Sie angeben, dass der Rest der Datei als "
+"einzelner Block kodiert werden soll."
+
+# FIXME encoder → compressor
+#. type: Plain text
+#: ../src/xz/xz.1:955
+msgid ""
+"If one specifies I<sizes> that exceed the encoder's block size (either the "
+"default value in threaded mode or the value specified with B<--block-"
+"size=>I<size>), the encoder will create additional blocks while keeping the "
+"boundaries specified in I<sizes>. 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 ""
+"Falls Sie I<Größen> angeben, welche die Blockgröße des Encoders übersteigen "
+"(entweder den Vorgabewert im Thread-Modus oder den mit B<--block-"
+"size=>I<Größe> angegebenen Wert), wird der Encoder zusätzliche Blöcke "
+"erzeugen, wobei die in den I<Größen> angegebenen Grenzen eingehalten werden. "
+"Wenn Sie zum Beispiel B<--block-size=10MiB> B<--block-"
+"list=5MiB,10MiB,8MiB,12MiB,24MiB> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:961
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:961
+#, no-wrap
+msgid "B<--flush-timeout=>I<timeout>"
+msgstr "B<--flush-timeout=>I<Zeit>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:978
+msgid ""
+"When compressing, if more than I<timeout> 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<xz> is used to compress data that is "
+"streamed over a network. Small I<timeout> values make the data available at "
+"the receiving end with a small delay, but large I<timeout> values give "
+"better compression ratio."
+msgstr ""
+"löscht bei der Kompression die ausstehenden Daten aus dem Encoder und macht "
+"sie im Ausgabedatenstrom verfügbar, wenn mehr als die angegebene I<Zeit> 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 B<xz> zum Komprimieren von über das Netzwerk eingehenden Daten "
+"verwendet wird. Kleine I<Zeit>-Werte machen die Daten unmittelbar nach dem "
+"Empfang nach einer kurzen Verzögerung verfügbar, während große I<Zeit>-Werte "
+"ein besseres Kompressionsverhältnis bewirken."
+
+#. type: Plain text
+#: ../src/xz/xz.1:986
+msgid ""
+"This feature is disabled by default. If this option is specified more than "
+"once, the last one takes effect. The special I<timeout> value of B<0> can "
+"be used to explicitly disable this feature."
+msgstr ""
+"Dieses Funktionsmerkmal ist standardmäßig deaktiviert. Wenn diese Option "
+"mehrfach angegeben wird, ist die zuletzt angegebene wirksam. Für die Angabe "
+"der I<Zeit> kann der spezielle Wert B<0> verwendet werden, um dieses "
+"Funktionsmerkmal explizit zu deaktivieren."
+
+#. type: Plain text
+#: ../src/xz/xz.1:988
+msgid "This feature is not available on non-POSIX systems."
+msgstr ""
+"Dieses Funktionsmerkmal ist außerhalb von POSIX-Systemen nicht verfügbar."
+
+#. FIXME
+#. type: Plain text
+#: ../src/xz/xz.1:996
+msgid ""
+"B<This feature is still experimental.> Currently B<xz> is unsuitable for "
+"decompressing the stream in real time due to how B<xz> does buffering."
+msgstr ""
+"B<Dieses Funktionsmerkmal ist noch experimentell.> Gegenwärtig ist B<xz> "
+"aufgrund der Art und Weise, wie B<xz> puffert, für Dekompression in Echtzeit "
+"ungeeignet."
+
+#. type: TP
+#: ../src/xz/xz.1:996
+#, no-wrap
+msgid "B<--memlimit-compress=>I<limit>"
+msgstr "B<--memlimit-compress=>I<Grenze>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1001
+msgid ""
+"Set a memory usage limit for compression. If this option is specified "
+"multiple times, the last one takes effect."
+msgstr ""
+"legt eine Grenze für die Speichernutzung bei der Kompression fest. Wenn "
+"diese Option mehrmals angegeben wird, ist die zuletzt angegebene wirksam."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1014
+msgid ""
+"If the compression settings exceed the I<limit>, B<xz> 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<limit>, and finally reducing the LZMA2 dictionary size."
+msgstr ""
+"Falls die Kompressionseinstellungen die I<Grenze> überschreiten, versucht "
+"B<xz>, 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 I<Grenze> "
+"überschreitet, und schlussendlich die Reduzierung der Größe des LZMA2-"
+"Wörterbuchs."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1022
+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 ""
+"Beim Komprimieren mit B<--format=raw> oder falls B<--no-adjust> angegeben "
+"wurde, wird nur die Anzahl der Threads reduziert, da nur so die komprimierte "
+"Ausgabe nicht beeinflusst wird."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1029
+msgid ""
+"If the I<limit> cannot be met even with the adjustments described above, an "
+"error is displayed and B<xz> will exit with exit status 1."
+msgstr ""
+"Falls die I<Grenze> nicht anhand der vorstehend beschriebenen Anpassungen "
+"gesetzt werden kann, wird ein Fehler angezeigt und B<xz> wird mit dem Exit-"
+"Status 1 beendet."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1033
+msgid "The I<limit> can be specified in multiple ways:"
+msgstr "Die I<Grenze> kann auf verschiedene Arten angegeben werden:"
+
+# FIXME integer suffix
+#. type: Plain text
+#: ../src/xz/xz.1:1043
+msgid ""
+"The I<limit> can be an absolute value in bytes. Using an integer suffix "
+"like B<MiB> can be useful. Example: B<--memlimit-compress=80MiB>"
+msgstr ""
+"Die I<Grenze> kann ein absoluter Wert in Byte sein. Ein Suffix wie B<MiB> "
+"kann dabei hilfreich sein. Beispiel: B<--memlimit-compress=80MiB>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1055
+msgid ""
+"The I<limit> can be specified as a percentage of total physical memory "
+"(RAM). This can be useful especially when setting the B<XZ_DEFAULTS> "
+"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 ""
+"Die I<Grenze> 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 B<XZ_DEFAULTS> gesetzt ist. Auf diese Weise "
+"ist die Grenze auf Systemen mit mehr Speicher höher. Beispiel: B<--memlimit-"
+"compress=70%>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1065
+msgid ""
+"The I<limit> can be reset back to its default value by setting it to B<0>. "
+"This is currently equivalent to setting the I<limit> to B<max> (no memory "
+"usage limit)."
+msgstr ""
+"Mit B<0> kann die I<Grenze> auf den Standardwert zurückgesetzt werden. Dies "
+"ist gegenwärtig gleichbedeutend mit dem Setzen der I<Grenze> auf B<max> "
+"(keine Speicherbegrenzung)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1089
+msgid ""
+"For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+"B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. On MIPS32 B<2000\\ "
+"MiB> is used instead. (The values B<0> and B<max> 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 ""
+"Für die 32-Bit-Version von B<xz> gibt es einen Spezialfall: Falls die Grenze "
+"über B<4020\\ MiB> liegt, wird die I<Grenze> auf B<4020\\ MiB> gesetzt. Auf "
+"MIPS32 wird stattdessen B<2000\\ MB> verwendet (die Werte B<0> und B<max> "
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1092
+msgid "See also the section B<Memory usage>."
+msgstr "Siehe auch den Abschnitt B<Speicherbedarf>."
+
+#. type: TP
+#: ../src/xz/xz.1:1092
+#, no-wrap
+msgid "B<--memlimit-decompress=>I<limit>"
+msgstr "B<--memlimit-decompress=>I<Grenze>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1106
+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<limit>, "
+"B<xz> will display an error and decompressing the file will fail. See B<--"
+"memlimit-compress=>I<limit> for possible ways to specify the I<limit>."
+msgstr ""
+"legt eine Begrenzung des Speicherverbrauchs für die Dekompression fest. Dies "
+"beeinflusst auch den Modus B<--list>. Falls die Aktion nicht ausführbar ist, "
+"ohne die I<Grenze> zu überschreiten, gibt B<xz> eine Fehlermeldung aus und "
+"die Dekompression wird fehlschlagen. Siehe B<--memlimit-compress=>I<Grenze> "
+"zu möglichen Wegen, die I<Grenze> anzugeben."
+
+#. type: TP
+#: ../src/xz/xz.1:1106
+#, no-wrap
+msgid "B<--memlimit-mt-decompress=>I<limit>"
+msgstr "B<--memlimit-mt-decompress=>I<Grenze>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1128
+msgid ""
+"Set a memory usage limit for multi-threaded decompression. This can only "
+"affect the number of threads; this will never make B<xz> refuse to "
+"decompress a file. If I<limit> is too low to allow any multi-threading, the "
+"I<limit> is ignored and B<xz> 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<limit> for "
+"multi-threading will never be higher than the limit set with B<--memlimit-"
+"decompress>."
+msgstr ""
+"legt eine Begrenzung des Speicherverbrauchs für Multithread-Dekompression "
+"fest. Dies beeinflusst lediglich die Anzahl der Threads; B<xz> wird dadurch "
+"niemals die Dekompression einer Datei verweigern. Falls die I<Grenze> für "
+"jegliches Multithreading zu niedrig ist, wird sie ignoriert und B<xz> setzt "
+"im Einzelthread-modus fort. Beachten Sie auch, dass bei der Verwendung von "
+"B<--memlimit-decompress> dies stets sowohl auf den Einzelthread-als auch auf "
+"den Multithread-Modus angewendet wird und so die effektive I<Grenze> für den "
+"Multithread-Modus niemals höher sein wird als die mit B<--memlimit-"
+"decompress> gesetzte Grenze."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1135
+msgid ""
+"In contrast to the other memory usage limit options, B<--memlimit-mt-"
+"decompress=>I<limit> has a system-specific default I<limit>. B<xz --info-"
+"memory> can be used to see the current value."
+msgstr ""
+"Im Gegensatz zu anderen Optionen zur Begrenzung des Speicherverbrauchs hat "
+"B<--memlimit-mt-decompress=>I<Grenze> eine systemspezifisch vorgegebene "
+"I<Grenze>. Mit B<xz --info-memory> können Sie deren aktuellen Wert anzeigen "
+"lassen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1151
+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<limit> is too low on your system, "
+"feel free to increase the I<limit> but never set it to a value larger than "
+"the amount of usable RAM as with appropriate input files B<xz> 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 ""
+"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 I<Grenze> auf "
+"Ihrem System zu niedrig ist, können Sie die I<Grenze> durchaus erhöhen, aber "
+"setzen Sie sie niemals auf einen Wert größer als die Menge des nutzbaren "
+"Speichers, da B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1163
+msgid ""
+"See B<--memlimit-compress=>I<limit> for possible ways to specify the "
+"I<limit>. Setting I<limit> to B<0> resets the I<limit> to the default "
+"system-specific value."
+msgstr ""
+"Siehe B<--memlimit-compress=>I<Grenze> für mögliche Wege zur Angabe der "
+"I<Grenze>. Sezen der I<Grenze> auf B<0> setzt die I<Grenze> auf den "
+"vorgegebenen systemspezifischen Wert zurück."
+
+#. type: TP
+#: ../src/xz/xz.1:1163
+#, no-wrap
+msgid "B<-M> I<limit>, B<--memlimit=>I<limit>, B<--memory=>I<limit>"
+msgstr "B<-M> I<Grenze>, B<--memlimit=>I<Grenze>, B<--memory=>I<Grenze>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1169
+msgid ""
+"This is equivalent to specifying B<--memlimit-compress=>I<limit> B<--"
+"memlimit-decompress=>I<limit> B<--memlimit-mt-decompress=>I<limit>."
+msgstr ""
+"Dies ist gleichbedeutend mit B<--memlimit-compress=>I<Grenze> B<--memlimit-"
+"decompress=>I<Grenze> B<--memlimit-mt-decompress=>I<Grenze>."
+
+#. type: TP
+#: ../src/xz/xz.1:1169
+#, no-wrap
+msgid "B<--no-adjust>"
+msgstr "B<--no-adjust>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1179
+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<xz> 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 ""
+"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 B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1182
+msgid ""
+"Automatic adjusting is always disabled when creating raw streams (B<--"
+"format=raw>)."
+msgstr ""
+"Die automatische Anpassung ist beim Erzeugen von Rohdatenströmen (B<--"
+"format=raw>) immer deaktiviert."
+
+#. type: TP
+#: ../src/xz/xz.1:1182
+#, no-wrap
+msgid "B<-T> I<threads>, B<--threads=>I<threads>"
+msgstr "B<-T> I<Threads>, B<--threads=>I<Threads>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1197
+msgid ""
+"Specify the number of worker threads to use. Setting I<threads> to a "
+"special value B<0> makes B<xz> use up to as many threads as the processor(s) "
+"on the system support. The actual number of threads can be fewer than "
+"I<threads> 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 ""
+"gibt die Anzahl der zu verwendenden Arbeits-Threads an. Wenn Sie I<Threads> "
+"auf einen speziellen Wert B<0> setzen, verwendet B<xz> maximal so viele "
+"Threads, wie der/die Prozessor(en) im System untestützen. Die tatsächliche "
+"Anzahl kann geringer sein als die angegebenen I<Threads>, wenn die "
+"Eingabedatei nicht groß genug für Threading mit den gegebenen Einstellungen "
+"ist oder wenn mehr Threads die Speicherbegrenzung übersteigen würden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1216
+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<threads> to B<1> will use the single-threaded "
+"mode. Setting I<threads> to any other value, including B<0>, will use the "
+"multi-threaded compressor even if the system supports only one hardware "
+"thread. (B<xz> 5.2.x used single-threaded mode in this situation.)"
+msgstr ""
+"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 I<Threads> auf B<1> wird den "
+"Einzelthread-Modus verwenden. Das Setzen der Anzahl der I<Threads> auf "
+"einen anderen Wert einschließlich B<0> verwendet den Multithread-Kompressor, "
+"und zwar sogar dann, wenn das System nur einen einzigen Hardware-Thread "
+"unterstützt (B<xz> 5.2.x verwendete in diesem Fall noch den Einzelthread-"
+"Modus)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1235
+msgid ""
+"To use multi-threaded mode with only one thread, set I<threads> to B<+1>. "
+"The B<+> prefix has no effect with values other than B<1>. A memory usage "
+"limit can still make B<xz> switch to single-threaded mode unless B<--no-"
+"adjust> is used. Support for the B<+> prefix was added in B<xz> 5.4.0."
+msgstr ""
+"Um den Multithread-Modus mit nur einem einzigen Thread zu verwenden, setzen "
+"Sie die Anzahl der I<Threads> auf B<+1>. Das Präfix B<+> hat mit Werten "
+"verschieden von B<1> keinen Effekt. Eine Begrenzung des Speicherverbrauchs "
+"kann B<xz> dennoch veranlassen, den Einzelthread-Modus zu verwenden, außer "
+"wenn B<--no-adjust> verwendet wird. Die Unterstützung für das Präfix B<+> "
+"wurde in B<xz> 5.4.0 hinzugefügt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1250
+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<xz> from compressing or decompressing. This default soft "
+"limit will not make B<xz> switch from multi-threaded mode to single-threaded "
+"mode. The active limits can be seen with B<xz --info-memory>."
+msgstr ""
+"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 "
+"B<xz> niemals an der Kompression oder Dekompression hindern. Diese "
+"vorgegebene weiche Grenze veranlasst B<xz> nicht, vom Multithread-Modus in "
+"den Einzelthread-Modus zu wechseln. Die aktiven Grenzen können Sie mit dem "
+"Befehl B<xz --info-memory> anzeigen lassen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1257
+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<size> option."
+msgstr ""
+"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 B<--block-"
+"size=>I<Größe> außer Kraft gesetzt werden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1265
+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<size> has been used."
+msgstr ""
+"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 B<--block-size=>I<Größe> verwendet wurde."
+
+#. type: SS
+#: ../src/xz/xz.1:1266 ../src/xz/xz.1:2819
+#, no-wrap
+msgid "Custom compressor filter chains"
+msgstr "Benutzerdefinierte Filterketten für die Kompression"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1282
+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 ""
+"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 (B<-0> … B<-9> und B<--"
+"extreme>) 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1289
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1297
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1305
+msgid ""
+"A custom filter chain is specified by using one or more filter options in "
+"the order they are wanted in the filter chain. That is, the order of filter "
+"options is significant! When decoding raw streams (B<--format=raw>), the "
+"filter chain is specified in the same order as it was specified when "
+"compressing."
+msgstr ""
+"Eine benutzerdefinierte Filterkette wird durch eine oder mehrere "
+"Filteroptionen in der Reihenfolge angegeben, in der sie in der Filterkette "
+"wirksam werden sollen. Daher ist die Reihenfolge der Filteroptionen von "
+"signifikanter Bedeutung! Beim Dekodieren von Rohdatenströmen (B<--"
+"format=raw>) wird die Filterkette in der gleichen Reihenfolge angegeben wie "
+"bei der Kompression."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1314
+msgid ""
+"Filters take filter-specific I<options> as a comma-separated list. Extra "
+"commas in I<options> are ignored. Every option has a default value, so you "
+"need to specify only those you want to change."
+msgstr ""
+"Filter akzeptieren filterspezifische I<Optionen> in einer durch Kommata "
+"getrennten Liste. Zusätzliche Kommata in den I<Optionen> werden ignoriert. "
+"Jede Option hat einen Standardwert, daher brauchen Sie nur jene anzugeben, "
+"die Sie ändern wollen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1323
+msgid ""
+"To see the whole filter chain and I<options>, use B<xz -vv> (that is, use "
+"B<--verbose> twice). This works also for viewing the filter chain options "
+"used by presets."
+msgstr ""
+"Um die gesamte Filterkette und die I<Optionen> anzuzeigen, rufen Sie B<xz -"
+"vv> auf (was gleichbedeutend mit der zweimaligen Angabe von B<--verbose> "
+"ist). Dies funktioniert auch zum Betrachten der von den Voreinstellungen "
+"verwendeten Filterkettenoptionen."
+
+#. type: TP
+#: ../src/xz/xz.1:1323
+#, no-wrap
+msgid "B<--lzma1>[B<=>I<options>]"
+msgstr "B<--lzma1>[B<=>I<Optionen>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1326
+#, no-wrap
+msgid "B<--lzma2>[B<=>I<options>]"
+msgstr "B<--lzma2>[B<=>I<Optionen>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1331
+msgid ""
+"Add LZMA1 or LZMA2 filter to the filter chain. These filters can be used "
+"only as the last filter in the chain."
+msgstr ""
+"fügt LZMA1- oder LZMA2-Filter zur Filterkette hinzu. Diese Filter können nur "
+"als letzte Filter in der Kette verwendet werden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1343
+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 ist ein veralteter Filter, welcher nur wegen des veralteten B<.lzma>-"
+"Dateiformats unterstützt wird, welches nur LZMA1 unterstützt. LZMA2 ist eine "
+"aktualisierte Version von LZMA1, welche einige praktische Probleme von LZMA1 "
+"behebt. Das B<.xz>-Format verwendet LZMA2 und unterstützt LZMA1 gar nicht. "
+"Kompressionsgeschwindigkeit und -verhältnis sind bei LZMA1 und LZMA2 "
+"praktisch gleich."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1346
+msgid "LZMA1 and LZMA2 share the same set of I<options>:"
+msgstr "LZMA1 und LZMA2 haben die gleichen I<Optionen>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1347
+#, no-wrap
+msgid "B<preset=>I<preset>"
+msgstr "B<preset=>I<Voreinstellung>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1374
+msgid ""
+"Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+"matches B<--extreme>. If no B<preset> is specified, the default values of "
+"LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgstr ""
+"setzt alle LZMA1- oder LZMA2-I<Optionen> auf die I<Voreinstellung> zurück. "
+"Diese I<Voreinstellung> wird in Form einer Ganzzahl angegeben, der ein aus "
+"einem einzelnen Buchstaben bestehender Voreinstellungsmodifikator folgen "
+"kann. Die Ganzzahl kann B<0> bis B<9> sein, entsprechend den "
+"Befehlszeilenoptionen B<-0> … B<-9>. Gegenwärtig ist B<e> der einzige "
+"unterstützte Modifikator, was B<--extreme> entspricht. Wenn keine "
+"B<Voreinstellung> angegeben ist, werden die Standardwerte der LZMA1- oder "
+"LZMA2-I<Optionen> der Voreinstellung B<6> entnommen."
+
+#. type: TP
+#: ../src/xz/xz.1:1374
+#, no-wrap
+msgid "B<dict=>I<size>"
+msgstr "B<dict=>I<Größe>"
+
+# FIXME Dezimaltrenner in 1.5 GB
+#. type: Plain text
+#: ../src/xz/xz.1:1389
+msgid ""
+"Dictionary (history buffer) I<size> 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<size> usually improves compression ratio, but a "
+"dictionary bigger than the uncompressed file is waste of memory."
+msgstr ""
+"Die I<Größe> 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 I<Größe> des "
+"Wörterbuchs üblicherweise ein besseres Kompressionsverhältnis, aber ein "
+"Wörterbuch, das größer ist als die unkomprimierte Datei, wäre "
+"Speicherverschwendung."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1398
+msgid ""
+"Typical dictionary I<size> 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 ""
+"Typische Wörterbuch-I<Größen> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1425
+msgid ""
+"Dictionary I<size> and match finder (I<mf>) together determine the memory "
+"usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary "
+"I<size> 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<size> either as "
+"2^I<n> or 2^I<n> + 2^(I<n>-1), so these I<sizes> are somewhat preferred for "
+"compression. Other I<sizes> will get rounded up when stored in the B<.xz> "
+"headers."
+msgstr ""
+"Die I<Größe> des Wörterbuchs und der Übereinstimmungsfinder (I<Üf>) "
+"bestimmen zusammen den Speicherverbrauch des LZMA1- oder LZMA2-Kodierers. "
+"Bei der Dekompression ist ein Wörterbuch der gleichen I<Größe> (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 B<.xz>-Header speichern die I<Größe> "
+"des Wörterbuchs entweder als 2^I<n> oder 2^I<n> + 2^(I<n>-1), so dass diese "
+"I<Größen> für die Kompression etwas bevorzugt werden. Andere I<Größen> "
+"werden beim Speichern in den B<.xz>-Headern aufgerundet."
+
+#. type: TP
+#: ../src/xz/xz.1:1425
+#, no-wrap
+msgid "B<lc=>I<lc>"
+msgstr "B<lc=>I<lc>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1434
+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<lc> and I<lp> "
+"must not exceed 4."
+msgstr ""
+"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 I<lc> und "
+"I<lp> nicht größer als 4 sein."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1439
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1453
+msgid ""
+"The literal coding makes an assumption that the highest I<lc> 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<lc> is at least "
+"3, the literal coding can take advantage of this property in the "
+"uncompressed data."
+msgstr ""
+"Bei der Literalkodierung wird angenommen, dass die höchsten I<lc>-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 "
+"I<lc> mindestens 3 ist, kann die literale Kodierung diese Eigenschaft der "
+"unkomprimierten Daten ausnutzen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1462
+msgid ""
+"The default value (3) is usually good. If you want maximum compression, "
+"test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+"compression worse. If it makes it worse, test B<lc=2> too."
+msgstr ""
+"Der Vorgabewert (3) ist üblicherweise gut. Wenn Sie die maximale Kompression "
+"erreichen wollen, versuchen Sie B<lc=4>. Manchmal hilft es ein wenig, doch "
+"manchmal verschlechtert es die Kompression. Im letzteren Fall versuchen Sie "
+"zum Beispiel auch\\& B<lc=2>."
+
+#. type: TP
+#: ../src/xz/xz.1:1462
+#, no-wrap
+msgid "B<lp=>I<lp>"
+msgstr "B<lp=>I<lp>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1466
+msgid ""
+"Specify the number of literal position bits. The minimum is 0 and the "
+"maximum is 4; the default is 0."
+msgstr ""
+"gibt die Anzahl der literalen Positionsbits an. Das Minimum ist 0 und das "
+"Maximum 4; die Vorgabe ist 0."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1473
+msgid ""
+"I<Lp> affects what kind of alignment in the uncompressed data is assumed "
+"when encoding literals. See I<pb> below for more information about "
+"alignment."
+msgstr ""
+"I<Lp> beeinflusst, welche Art der Ausrichtung der unkomprimierten Daten beim "
+"Kodieren von Literalen angenommen wird. Siehe I<pb> weiter unten für weitere "
+"Informationen zur Ausrichtung."
+
+#. type: TP
+#: ../src/xz/xz.1:1473
+#, no-wrap
+msgid "B<pb=>I<pb>"
+msgstr "B<pb=>I<Anzahl>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1477
+msgid ""
+"Specify the number of position bits. The minimum is 0 and the maximum is 4; "
+"the default is 2."
+msgstr ""
+"legt die Anzahl der Positions-Bits fest. Das Minimum ist 0 und das Maximum "
+"4; Standard ist 2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1484
+msgid ""
+"I<Pb> affects what kind of alignment in the uncompressed data is assumed in "
+"general. The default means four-byte alignment (2^I<pb>=2^2=4), which is "
+"often a good choice when there's no better guess."
+msgstr ""
+"I<Pb> beeinflusst, welche Art der Ausrichtung der unkomprimierten Daten "
+"generell angenommen wird. Standardmäßig wird eine Vier-Byte-Ausrichtung "
+"angenommen (2^I<pb>=2^2=4), was oft eine gute Wahl ist, wenn es keine "
+"bessere Schätzung gibt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1498
+msgid ""
+"When the alignment is known, setting I<pb> 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<pb=0> can improve compression "
+"slightly. For UTF-16 text, B<pb=1> is a good choice. If the alignment is "
+"an odd number like 3 bytes, B<pb=0> might be the best choice."
+msgstr ""
+"Wenn die Ausrichtung bekannt ist, kann das entsprechende Setzen von I<pb> "
+"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 "
+"B<pb=0> die Kompression etwas verbessern. Für UTF-16-Text ist B<pb=1> eine "
+"gute Wahl. Wenn die Ausrichtung eine ungerade Zahl wie beispielsweise 3 Byte "
+"ist, könnte B<pb=0> die beste Wahl sein."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1506
+msgid ""
+"Even though the assumed alignment can be adjusted with I<pb> and I<lp>, "
+"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 ""
+"Obwohl die angenommene Ausrichtung mit I<pb> und I<lp> 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."
+
+#. type: TP
+#: ../src/xz/xz.1:1506
+#, no-wrap
+msgid "B<mf=>I<mf>"
+msgstr "B<mf=>I<Üf>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1521
+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<preset>: 0 uses B<hc3>, "
+"1\\(en3 use B<hc4>, and the rest use B<bt4>."
+msgstr ""
+"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 "
+"I<Voreinstellungsstufe> ab: 0 verwendet B<hc3>, 1-3 verwenden B<hc4> und der "
+"Rest verwendet B<bt4>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1527
+msgid ""
+"The following match finders are supported. The memory usage formulas below "
+"are rough approximations, which are closest to the reality when I<dict> is a "
+"power of two."
+msgstr ""
+"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 I<Wörterbuch> eine Zweierpotenz ist."
+
+#. type: TP
+#: ../src/xz/xz.1:1528
+#, no-wrap
+msgid "B<hc3>"
+msgstr "B<hc3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1531
+msgid "Hash Chain with 2- and 3-byte hashing"
+msgstr "Hash-Kette mit 2- und 3-Byte-Hashing"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1535 ../src/xz/xz.1:1584
+msgid "Minimum value for I<nice>: 3"
+msgstr "Minimalwert für I<nice>: 3"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1537 ../src/xz/xz.1:1556 ../src/xz/xz.1:1586
+#: ../src/xz/xz.1:1605
+msgid "Memory usage:"
+msgstr "Speicherbedarf:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1542
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 7,5 (falls I<dict> E<lt>= 16 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1547
+msgid "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 5,5 + 64 MiB (falls I<dict> E<gt> 16 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1547
+#, no-wrap
+msgid "B<hc4>"
+msgstr "B<hc4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1550
+msgid "Hash Chain with 2-, 3-, and 4-byte hashing"
+msgstr "Hash-Kette mit 2-, 3- und 4-Byte-Hashing"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1554 ../src/xz/xz.1:1603
+msgid "Minimum value for I<nice>: 4"
+msgstr "Minimaler Wert für I<nice>: 4"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1561
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 7,5 (falls I<dict> E<lt>= 32 MiB ist);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1566
+msgid "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 6,5 (falls I<dict> E<gt> 32 MiB ist)"
+
+#. type: TP
+#: ../src/xz/xz.1:1566
+#, no-wrap
+msgid "B<bt2>"
+msgstr "B<bt2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1569
+msgid "Binary Tree with 2-byte hashing"
+msgstr "Binärbaum mit 2-Byte-Hashing"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1573
+msgid "Minimum value for I<nice>: 2"
+msgstr "Minimaler Wert für I<nice>: 2"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1577
+msgid "Memory usage: I<dict> * 9.5"
+msgstr "Speicherverbrauch: I<dict> * 9.5"
+
+#. type: TP
+#: ../src/xz/xz.1:1577
+#, no-wrap
+msgid "B<bt3>"
+msgstr "B<bt3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1580
+msgid "Binary Tree with 2- and 3-byte hashing"
+msgstr "Binärbaum mit 2- und 3-Byte-Hashing"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1591
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 11,5 (falls I<dict> E<lt>= 16 MiB ist);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1596
+msgid "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 9,5 + 64 MiB (falls I<dict> E<gt> 16 MiB ist)"
+
+#. type: TP
+#: ../src/xz/xz.1:1596
+#, no-wrap
+msgid "B<bt4>"
+msgstr "B<bt4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1599
+msgid "Binary Tree with 2-, 3-, and 4-byte hashing"
+msgstr "Binärbaum mit 2-, 3- und 4-Byte-Hashing"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1610
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 11,5 (falls I<dict> E<lt>= 32 MiB ist);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1615
+msgid "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 10,5 (falls I<dict> E<gt> 32 MiB ist)"
+
+#. type: TP
+#: ../src/xz/xz.1:1616
+#, no-wrap
+msgid "B<mode=>I<mode>"
+msgstr "B<mode=>I<Modus>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1637
+msgid ""
+"Compression I<mode> specifies the method to analyze the data produced by the "
+"match finder. Supported I<modes> are B<fast> and B<normal>. The default is "
+"B<fast> for I<presets> 0\\(en3 and B<normal> for I<presets> 4\\(en9."
+msgstr ""
+"gibt die Methode zum Analysieren der vom Übereinstimmungsfinder gelieferten "
+"Daten an. Als I<Modi> werden B<fast> und B<normal> unterstützt. Die Vorgabe "
+"ist B<fast> für die I<Voreinstellungsstufen> 0-3 und B<normal> für die "
+"I<Voreinstellungsstufen> 4-9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1646
+msgid ""
+"Usually B<fast> is used with Hash Chain match finders and B<normal> with "
+"Binary Tree match finders. This is also what the I<presets> do."
+msgstr ""
+"Üblicherweise wird B<fast> mit Hashketten-basierten Übereinstimmungsfindern "
+"und B<normal> mit Binärbaum-basierten Übereinstimmungsfindern verwendet. So "
+"machen es auch die I<Voreinstellungsstufen>."
+
+#. type: TP
+#: ../src/xz/xz.1:1646
+#, no-wrap
+msgid "B<nice=>I<nice>"
+msgstr "B<nice=>I<nice>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1653
+msgid ""
+"Specify what is considered to be a nice length for a match. Once a match of "
+"at least I<nice> bytes is found, the algorithm stops looking for possibly "
+"better matches."
+msgstr ""
+"gibt an, was als annehmbarer Wert für eine Übereinstimmung angesehen werden "
+"kann. Wenn eine Übereinstimmung gefunden wird, die mindestens diesen I<nice>-"
+"Wert hat, sucht der Algorithmus nicht weiter nach besseren Übereinstimmungen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1660
+msgid ""
+"I<Nice> can be 2\\(en273 bytes. Higher values tend to give better "
+"compression ratio at the expense of speed. The default depends on the "
+"I<preset>."
+msgstr ""
+"Der I<nice>-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 I<Voreinstellungsstufe> ab."
+
+#. type: TP
+#: ../src/xz/xz.1:1660
+#, no-wrap
+msgid "B<depth=>I<depth>"
+msgstr "B<depth=>I<Tiefe>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1670
+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<depth> from I<mf> and I<nice>."
+msgstr ""
+"legt die maximale Suchtiefe im Übereinstimmungsfinder fest. Vorgegeben ist "
+"der spezielle Wert 0, der den Kompressor veranlasst, einen annehmbaren Wert "
+"für I<Tiefe> aus I<Üf> und I<nice>-Wert zu bestimmen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1681
+msgid ""
+"Reasonable I<depth> for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary "
+"Trees. Using very high values for I<depth> can make the encoder extremely "
+"slow with some files. Avoid setting the I<depth> over 1000 unless you are "
+"prepared to interrupt the compression in case it is taking far too long."
+msgstr ""
+"Die angemessene I<Tiefe> für Hash-Ketten ist 4-100 und 16-1000 für "
+"Binärbäume. Hohe Werte für die I<Tiefe> können den Kodierer bei einigen "
+"Dateien extrem verlangsamen. Vermeiden Sie es, die I<Tiefe> über einen Wert "
+"von 100 zu setzen, oder stellen Sie sich darauf ein, die Kompression "
+"abzubrechen, wenn sie zu lange dauert."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1692
+msgid ""
+"When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary "
+"I<size>. LZMA1 needs also I<lc>, I<lp>, and I<pb>."
+msgstr ""
+"Beim Dekodieren von Rohdatenströmen (B<--format=raw>) benötigt LZMA2 nur die "
+"Wörterbuch-I<Größe>. LZMA1 benötigt außerdem I<lc>, I<lp> und I<pb>."
+
+#. type: TP
+#: ../src/xz/xz.1:1692
+#, no-wrap
+msgid "B<--x86>[B<=>I<options>]"
+msgstr "B<--x86>[B<=>I<Optionen>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1695
+#, no-wrap
+msgid "B<--arm>[B<=>I<options>]"
+msgstr "B<--arm>[B<=>I<Optionen>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1697
+#, no-wrap
+msgid "B<--armthumb>[B<=>I<options>]"
+msgstr "B<--armthumb>[B<=>I<Optionen>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1699
+#, no-wrap
+msgid "B<--arm64>[B<=>I<options>]"
+msgstr "B<--arm64>[B<=>I<Optionen>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1701
+#, no-wrap
+msgid "B<--powerpc>[B<=>I<options>]"
+msgstr "B<--powerpc>[B<=>I<Optionen>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1703
+#, no-wrap
+msgid "B<--ia64>[B<=>I<options>]"
+msgstr "B<--ia64>[B<=>I<Optionen>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1705
+#, no-wrap
+msgid "B<--sparc>[B<=>I<options>]"
+msgstr "B<--sparc>[B<=>I<Optionen>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1711
+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 ""
+"fügt ein »Branch/Call/Jump«-(BCJ-)Filter zur Filterkette hinzu. Diese Filter "
+"können nicht als letzter Filter in der Filterkette verwendet werden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1725
+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 ""
+"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 "
+"B<.xz>-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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1728
+msgid "These BCJ filters have known problems related to the compression ratio:"
+msgstr ""
+"Diese BCJ-Filter haben bekannte Probleme mit dem Kompressionsverhältnis:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1735
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1745
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1750
+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 ""
+"Verschiedene Befehlssätze haben unterschiedliche Ausrichtungen: Die "
+"ausführbare Datei muss in den Eingabedateien einem Vielfachen dieses Wertes "
+"entsprechen, damit dieser Filter funktioniert."
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Filter"
+msgstr "Filter"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Alignment"
+msgstr "Ausrichtung"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Notes"
+msgstr "Hinweise"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "x86"
+msgstr "x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "32-bit or 64-bit x86"
+msgstr "32-Bit oder 64-Bit x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1759
+#, no-wrap
+msgid "ARM"
+msgstr "ARM"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1760
+#, no-wrap
+msgid "ARM-Thumb"
+msgstr "ARM-Thumb"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "ARM64"
+msgstr "ARM64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "4096-byte alignment is best"
+msgstr "4096-Byte-Ausrichtung ist optimal"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "PowerPC"
+msgstr "PowerPC"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "Big endian only"
+msgstr "Nur Big Endian"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "IA-64"
+msgstr "IA-64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "16"
+msgstr "16"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "Itanium"
+msgstr "Itanium"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1764
+#, no-wrap
+msgid "SPARC"
+msgstr "SPARC"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1781
+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. For example, with the IA-64 "
+"filter, it's good to set B<pb=4> or even B<pb=4,lp=4,lc=0> with LZMA2 "
+"(2^4=16). The x86 filter is an exception; it's usually good to stick to "
+"LZMA2's default four-byte alignment when compressing x86 executables."
+msgstr ""
+"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. Zum Beispiel ist es beim IA-64-Filter eine gute Wahl, "
+"B<pb=4> oder sogar B<pb=4,lp=4,lc=0> mit LZMA2 zu setzen (2^4=16). Der x86-"
+"Filter bildet dabei eine Ausnahme; Sie sollten bei der für LZMA2 "
+"voreingestellten 4-Byte-Ausrichtung bleiben, wenn Sie x86-Binärdateien "
+"komprimieren."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1784
+msgid "All BCJ filters support the same I<options>:"
+msgstr "Alle BCJ-Filter unterstützen die gleichen I<Optionen>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1785
+#, no-wrap
+msgid "B<start=>I<offset>"
+msgstr "B<start=>I<Versatz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1799
+msgid ""
+"Specify the start I<offset> that is used when converting between relative "
+"and absolute addresses. The I<offset> 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<offset> is almost never useful."
+msgstr ""
+"gibt den Start-I<Versatz> an, der bei der Umwandlung zwischen relativen und "
+"absoluten Adressen verwendet wird. Der I<Versatz> 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 "
+"I<Versatzes> ist fast immer unnütz."
+
+#. type: TP
+#: ../src/xz/xz.1:1800
+#, no-wrap
+msgid "B<--delta>[B<=>I<options>]"
+msgstr "B<--delta>[B<=>I<Optionen>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1805
+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 ""
+"fügt den Delta-Filter zur Filterkette hinzu. Der Delta-Filter kann nicht als "
+"letzter Filter in der Filterkette verwendet werden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1814
+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<flac>(1)."
+msgstr ""
+"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 B<flac>(1) schneller und besser "
+"komprimieren lassen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1817
+msgid "Supported I<options>:"
+msgstr "Unterstützte I<Optionen>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1818
+#, no-wrap
+msgid "B<dist=>I<distance>"
+msgstr "B<dist=>I<Abstand>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1826
+msgid ""
+"Specify the I<distance> of the delta calculation in bytes. I<distance> must "
+"be 1\\(en256. The default is 1."
+msgstr ""
+"gibt den I<Abstand> der Delta-Berechnung in Byte an. Zulässige Werte für den "
+"I<Abstand> sind 1 bis 256. Der Vorgabewert ist 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1831
+msgid ""
+"For example, with B<dist=2> 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 ""
+"Zum Beispiel wird mit B<dist=2> und der 8-Byte-Eingabe A1 B1 A2 B3 A3 B5 A4 "
+"B7 die Ausgabe A1 B1 01 02 01 02 01 02 sein."
+
+#. type: SS
+#: ../src/xz/xz.1:1833
+#, no-wrap
+msgid "Other options"
+msgstr "Andere Optionen"
+
+#. type: TP
+#: ../src/xz/xz.1:1834 ../src/xzdec/xzdec.1:83
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr "B<-q>, B<--quiet>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1841
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:1841
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr "B<-v>, B<--verbose>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1850
+msgid ""
+"Be verbose. If standard error is connected to a terminal, B<xz> will "
+"display a progress indicator. Specifying B<--verbose> twice will give even "
+"more verbose output."
+msgstr ""
+"bewirkt ausführliche Ausgaben. Wenn die Standardfehlerausgabe mit einem "
+"Terminal verbunden ist, zeigt B<xz> den Fortschritt an. Durch zweimalige "
+"Angabe von B<--verbose> wird die Ausgabe noch ausführlicher."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1852
+msgid "The progress indicator shows the following information:"
+msgstr "Der Fortschrittsanzeiger stellt die folgenden Informationen dar:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1857
+msgid ""
+"Completion percentage is shown if the size of the input file is known. That "
+"is, the percentage cannot be shown in pipes."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1860
+msgid ""
+"Amount of compressed data produced (compressing) or consumed "
+"(decompressing)."
+msgstr ""
+"Menge der erzeugten komprimierten Daten (bei der Kompression) oder der "
+"verarbeiteten Daten (bei der Dekompression)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1863
+msgid ""
+"Amount of uncompressed data consumed (compressing) or produced "
+"(decompressing)."
+msgstr ""
+"Menge der verarbeiteten unkomprimierten Daten (bei der Kompression) oder der "
+"erzeugten Daten (bei der Dekompression)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1867
+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 ""
+"Kompressionsverhältnis, das mittels Dividieren der Menge der bisher "
+"komprimierten Daten durch die Menge der bisher verarbeiteten unkomprimierten "
+"Daten ermittelt wird."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1874
+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<xz> started "
+"processing the file."
+msgstr ""
+"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 B<xz> mit der Verarbeitung der Datei "
+"begonnen hat."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1876
+msgid "Elapsed time in the format M:SS or H:MM:SS."
+msgstr "Die vergangene Zeit im Format M:SS oder H:MM:SS."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1884
+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<xz> 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 ""
+"Die geschätzte verbleibende Zeit wird nur angezeigt, wenn die Größe der "
+"Eingabedatei bekannt ist und bereits einige Sekunden vergangen sind, nachdem "
+"B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1899
+msgid ""
+"When standard error is not a terminal, B<--verbose> will make B<xz> 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 ""
+"Wenn die Standardfehlerausgabe kein Terminal ist, schreibt B<xz> mit B<--"
+"verbose> 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."
+
+#. type: TP
+#: ../src/xz/xz.1:1899 ../src/xzdec/xzdec.1:89
+#, no-wrap
+msgid "B<-Q>, B<--no-warn>"
+msgstr "B<-Q>, B<--no-warn>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1909
+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 ""
+"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 B<--quiet> als auch B<--no-"
+"warn> angegeben werden, um einerseits keine Warnungen anzuzeigen und "
+"andererseits auch den Exit-Status nicht zu ändern."
+
+#. type: TP
+#: ../src/xz/xz.1:1909
+#, no-wrap
+msgid "B<--robot>"
+msgstr "B<--robot>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1921
+msgid ""
+"Print messages in a machine-parsable format. This is intended to ease "
+"writing frontends that want to use B<xz> instead of liblzma, which may be "
+"the case with various scripts. The output with this option enabled is meant "
+"to be stable across B<xz> releases. See the section B<ROBOT MODE> for "
+"details."
+msgstr ""
+"gibt Meldungen in einem maschinenlesbaren Format aus. Dadurch soll das "
+"Schreiben von Frontends erleichtert werden, die B<xz> anstelle von Liblzma "
+"verwenden wollen, was in verschiedenen Skripten der Fall sein kann. Die "
+"Ausgabe mit dieser aktivierten Option sollte über mehrere B<xz>-"
+"Veröffentlichungen stabil sein. Details hierzu finden Sie im Abschnitt "
+"B<ROBOTER-MODUS>."
+
+#. type: TP
+#: ../src/xz/xz.1:1921
+#, no-wrap
+msgid "B<--info-memory>"
+msgstr "B<--info-memory>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1928
+msgid ""
+"Display, in human-readable format, how much physical memory (RAM) and how "
+"many processor threads B<xz> thinks the system has and the memory usage "
+"limits for compression and decompression, and exit successfully."
+msgstr ""
+"zeigt in einem menschenlesbaren Format an, wieviel physischen Speicher (RAM) "
+"und wie viele Prozessor-Threads das System nach Annahme von B<xz> hat, sowie "
+"die Speicherbedarfsbegrenzung für Kompression und Dekompression, und beendet "
+"das Programm erfolgreich."
+
+#. type: TP
+#: ../src/xz/xz.1:1928 ../src/xzdec/xzdec.1:96
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr "B<-h>, B<--help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1932
+msgid ""
+"Display a help message describing the most commonly used options, and exit "
+"successfully."
+msgstr ""
+"zeigt eine Hilfemeldung mit den am häufigsten genutzten Optionen an und "
+"beendet das Programm erfolgreich."
+
+#. type: TP
+#: ../src/xz/xz.1:1932
+#, no-wrap
+msgid "B<-H>, B<--long-help>"
+msgstr "B<-H>, B<--long-help>"
+
+# FIXME Satzpunkt fehlt
+#. type: Plain text
+#: ../src/xz/xz.1:1937
+msgid ""
+"Display a help message describing all features of B<xz>, and exit "
+"successfully"
+msgstr ""
+"zeigt eine Hilfemeldung an, die alle Funktionsmerkmale von B<xz> beschreibt "
+"und beendet das Programm erfolgreich."
+
+#. type: TP
+#: ../src/xz/xz.1:1937 ../src/xzdec/xzdec.1:99
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr "B<-V>, B<--version>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1946
+msgid ""
+"Display the version number of B<xz> and liblzma in human readable format. "
+"To get machine-parsable output, specify B<--robot> before B<--version>."
+msgstr ""
+"zeigt die Versionsnummer von B<xz> und Liblzma in einem menschenlesbaren "
+"Format an. Um eine maschinell auswertbare Ausgabe zu erhalten, geben Sie B<--"
+"robot> vor B<--version> an."
+
+#. type: SH
+#: ../src/xz/xz.1:1947
+#, no-wrap
+msgid "ROBOT MODE"
+msgstr "ROBOTER-MODUS"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1963
+msgid ""
+"The robot mode is activated with the B<--robot> option. It makes the output "
+"of B<xz> easier to parse by other programs. Currently B<--robot> is "
+"supported only together with B<--version>, B<--info-memory>, and B<--list>. "
+"It will be supported for compression and decompression in the future."
+msgstr ""
+"Der Roboter-Modus wird mit der Option B<--robot> aktiviert. Er bewirkt, dass "
+"die Ausgabe von B<xz> leichter von anderen Programmen ausgewertet werden "
+"kann. Gegenwärtig wird B<--robot> nur zusammen mit B<--version>, B<--info-"
+"memory> und B<--list> unterstützt. In der Zukunft wird dieser Modus auch für "
+"Kompression und Dekompression unterstützt."
+
+#. type: SS
+#: ../src/xz/xz.1:1964
+#, no-wrap
+msgid "Version"
+msgstr "Version"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1969
+msgid ""
+"B<xz --robot --version> prints the version number of B<xz> and liblzma in "
+"the following format:"
+msgstr ""
+"B<xz --robot --version> gibt die Versionsnummern von B<xz> und Liblzma im "
+"folgenden Format aus:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1971
+msgid "B<XZ_VERSION=>I<XYYYZZZS>"
+msgstr "B<XZ_VERSION=>I<XYYYZZZS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1973
+msgid "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+msgstr "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+
+#. type: TP
+#: ../src/xz/xz.1:1973
+#, no-wrap
+msgid "I<X>"
+msgstr "I<X>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1976
+msgid "Major version."
+msgstr "Hauptversion."
+
+#. type: TP
+#: ../src/xz/xz.1:1976
+#, no-wrap
+msgid "I<YYY>"
+msgstr "I<YYY>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1981
+msgid ""
+"Minor version. Even numbers are stable. Odd numbers are alpha or beta "
+"versions."
+msgstr ""
+"Unterversion. Gerade Zahlen bezeichnen eine stabile Version. Ungerade Zahlen "
+"bezeichnen Alpha- oder Betaversionen."
+
+#. type: TP
+#: ../src/xz/xz.1:1981
+#, no-wrap
+msgid "I<ZZZ>"
+msgstr "I<ZZZ>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1985
+msgid ""
+"Patch level for stable releases or just a counter for development releases."
+msgstr ""
+"Patch-Stufe für stabile Veröffentlichungen oder einfach nur ein Zähler für "
+"Entwicklungsversionen."
+
+#. type: TP
+#: ../src/xz/xz.1:1985
+#, no-wrap
+msgid "I<S>"
+msgstr "I<S>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1993
+msgid ""
+"Stability. 0 is alpha, 1 is beta, and 2 is stable. I<S> should be always 2 "
+"when I<YYY> is even."
+msgstr ""
+"Stabilität. 0 ist Alpha, 1 ist Beta und 2 ist stabil. I<S> sollte immer 2 "
+"sein, wenn I<YYY> eine gerade Zahl ist."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1998
+msgid ""
+"I<XYYYZZZS> are the same on both lines if B<xz> and liblzma are from the "
+"same XZ Utils release."
+msgstr ""
+"I<XYYYZZZS> sind in beiden Zeilen gleich, sofern B<xz> und Liblzma aus der "
+"gleichen Veröffentlichung der XZ-Utils stammen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2004
+msgid "Examples: 4.999.9beta is B<49990091> and 5.0.0 is B<50000002>."
+msgstr "Beispiele: 4.999.9beta ist B<49990091> und 5.0.0 is B<50000002>."
+
+#. type: SS
+#: ../src/xz/xz.1:2005
+#, no-wrap
+msgid "Memory limit information"
+msgstr "Informationen zur Speicherbedarfsbegrenzung"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2008
+msgid ""
+"B<xz --robot --info-memory> prints a single line with multiple tab-separated "
+"columns:"
+msgstr ""
+"B<xz --robot --info-memory> gibt eine einzelne Zeile mit mehreren durch "
+"Tabulatoren getrennten Spalten aus:"
+
+#. type: IP
+#: ../src/xz/xz.1:2008
+#, no-wrap
+msgid "1."
+msgstr "1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2010
+msgid "Total amount of physical memory (RAM) in bytes."
+msgstr "Gesamter physischer Speicher (RAM) in Byte."
+
+#. type: IP
+#: ../src/xz/xz.1:2010 ../src/xz/xz.1:2125 ../src/xz/xz.1:2162
+#: ../src/xz/xz.1:2188 ../src/xz/xz.1:2258 ../src/xz/xz.1:2285
+#, no-wrap
+msgid "2."
+msgstr "2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2017
+msgid ""
+"Memory usage limit for compression in bytes (B<--memlimit-compress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Speicherbedarfsbegrenzung für die Kompression in Byte (B<--memlimit-"
+"compress>). Ein spezieller Wert von B<0> bezeichnet die Standardeinstellung, "
+"die im Einzelthread-Modus bedeutet, dass keine Begrenzung vorhanden ist."
+
+#. type: IP
+#: ../src/xz/xz.1:2017 ../src/xz/xz.1:2127 ../src/xz/xz.1:2164
+#: ../src/xz/xz.1:2190 ../src/xz/xz.1:2263 ../src/xz/xz.1:2287
+#, no-wrap
+msgid "3."
+msgstr "3."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2024
+msgid ""
+"Memory usage limit for decompression in bytes (B<--memlimit-decompress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Speicherbedarfsbegrenzung für die Dekompression in Byte (B<--memlimit-"
+"decompress>). Ein spezieller Wert von B<0> bezeichnet die "
+"Standardeinstellung, die im Einzelthread-Modus bedeutet, dass keine "
+"Begrenzung vorhanden ist."
+
+#. type: IP
+#: ../src/xz/xz.1:2024 ../src/xz/xz.1:2129 ../src/xz/xz.1:2166
+#: ../src/xz/xz.1:2193 ../src/xz/xz.1:2273 ../src/xz/xz.1:2289
+#, no-wrap
+msgid "4."
+msgstr "4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2036
+msgid ""
+"Since B<xz> 5.3.4alpha: Memory usage for multi-threaded decompression in "
+"bytes (B<--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 B<--memlimit-mt-"
+"decompress>."
+msgstr ""
+"Seit B<xz> 5.3.4alpha: Die Speichernutzung für Multithread-Dekompression in "
+"Byte (B<--memlimit-mt-decompress>). Dies ist niemals B<0>, 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 B<--memlimit-mt-decompress> ein "
+"größerer Wert angegeben wurde."
+
+#. type: IP
+#: ../src/xz/xz.1:2036 ../src/xz/xz.1:2131 ../src/xz/xz.1:2168
+#: ../src/xz/xz.1:2195 ../src/xz/xz.1:2291
+#, no-wrap
+msgid "5."
+msgstr "5."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2048
+msgid ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+msgstr ""
+"Seit B<xz> 5.3.4alpha: Eine systemspezifisch vorgegebene Begrenzung des "
+"Speicherverbrauchs, die zur Begrenzung der Anzahl der Threads beim "
+"Komprimieren mit automatischer Anzahl der Threads (B<--threads=0>) und wenn "
+"keine Speicherbedarfsbegrenzung angegeben wurde (B<--memlimit-compress>) "
+"verwendet wird. Dies wird auch als Standardwert für B<--memlimit-mt-"
+"decompress> verwendet."
+
+#. type: IP
+#: ../src/xz/xz.1:2048 ../src/xz/xz.1:2133 ../src/xz/xz.1:2170
+#: ../src/xz/xz.1:2197 ../src/xz/xz.1:2293
+#, no-wrap
+msgid "6."
+msgstr "6."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2053
+msgid "Since B<xz> 5.3.4alpha: Number of available processor threads."
+msgstr "Seit B<xz> 5.3.4alpha: Anzahl der verfügbaren Prozessorthreads."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2057
+msgid ""
+"In the future, the output of B<xz --robot --info-memory> may have more "
+"columns, but never more than a single line."
+msgstr ""
+"In der Zukunft könnte die Ausgabe von B<xz --robot --info-memory> weitere "
+"Spalten enthalten, aber niemals mehr als eine einzelne Zeile."
+
+#. type: SS
+#: ../src/xz/xz.1:2058
+#, no-wrap
+msgid "List mode"
+msgstr "Listenmodus"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2063
+msgid ""
+"B<xz --robot --list> 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<xz --robot --list> 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:"
+
+#. type: TP
+#: ../src/xz/xz.1:2063
+#, no-wrap
+msgid "B<name>"
+msgstr "B<name>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2067
+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:2067
+#, no-wrap
+msgid "B<file>"
+msgstr "B<file>"
+
+# CHECK overall
+#. type: Plain text
+#: ../src/xz/xz.1:2075
+msgid ""
+"This line contains overall information about the B<.xz> file. This line is "
+"always printed after the B<name> line."
+msgstr ""
+"Diese Zeile enthält allgemeine Informationen zur B<.xz>-Datei. Diese Zeile "
+"wird stets nach der B<name>-Zeile ausgegeben."
+
+#. type: TP
+#: ../src/xz/xz.1:2075
+#, no-wrap
+msgid "B<stream>"
+msgstr "B<stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2085
+msgid ""
+"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."
+msgstr ""
+"Dieser Zeilentyp wird nur verwendet, wenn B<--verbose> angegeben wurde. Es "
+"gibt genau so viele B<stream>-Zeilen, wie Datenströme in der B<.xz>-Datei "
+"enthalten sind."
+
+#. type: TP
+#: ../src/xz/xz.1:2085
+#, no-wrap
+msgid "B<block>"
+msgstr "B<block>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2100
+msgid ""
+"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."
+msgstr ""
+"Dieser Zeilentyp wird nur verwendet, wenn B<--verbose> angegeben wurde. Es "
+"gibt so viele B<block>-Zeilen, wie Blöcke in der B<.xz>-Datei. Die B<block>-"
+"Zeilen werden nach allen B<stream>-Zeilen angezeigt; verschiedene "
+"Zeilentypen werden nicht verschachtelt."
+
+#. type: TP
+#: ../src/xz/xz.1:2100
+#, no-wrap
+msgid "B<summary>"
+msgstr "B<summary>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2115
+msgid ""
+"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."
+msgstr ""
+"Dieser Zeilentyp wird nur verwendet, wenn B<--verbose> zwei Mal angegeben "
+"wurde. Diese Zeile wird nach allen B<block>-Zeilen ausgegeben. Wie die "
+"B<file>-Zeile enthält die B<summary>-Zeile allgemeine Informationen zur B<."
+"xz>-Datei."
+
+#. type: TP
+#: ../src/xz/xz.1:2115
+#, no-wrap
+msgid "B<totals>"
+msgstr "B<totals>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2119
+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:2123
+msgid "The columns of the B<file> lines:"
+msgstr "Die Spalten der B<file>-Zeilen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2127
+msgid "Number of streams in the file"
+msgstr "Anzahl der Datenströme in der Datei"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2129
+msgid "Total number of blocks in the stream(s)"
+msgstr "Gesamtanzahl der Blöcke in den Datenströmen"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2131
+msgid "Compressed size of the file"
+msgstr "Komprimierte Größe der Datei"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2133
+msgid "Uncompressed size of the file"
+msgstr "Unkomprimierte Größe der Datei"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2139
+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:2139 ../src/xz/xz.1:2172 ../src/xz/xz.1:2199
+#: ../src/xz/xz.1:2295
+#, no-wrap
+msgid "7."
+msgstr "7."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2152
+msgid ""
+"Comma-separated list of integrity check names. The following strings are "
+"used for the known check types: B<None>, B<CRC32>, B<CRC64>, and "
+"B<SHA-256>. For unknown check types, B<Unknown->I<N> is used, where I<N> 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<None>, B<CRC32>, B<CRC64> und B<SHA-256>. B<Unbek.>I<N> wird verwendet, "
+"wobei I<N> die Kennung der Überprüfung als Dezimalzahl angibt (ein- oder "
+"zweistellig)."
+
+#. type: IP
+#: ../src/xz/xz.1:2152 ../src/xz/xz.1:2174 ../src/xz/xz.1:2201
+#: ../src/xz/xz.1:2298
+#, no-wrap
+msgid "8."
+msgstr "8."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2154
+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:2160
+msgid "The columns of the B<stream> lines:"
+msgstr "Die Spalten der B<stream>-Zeilen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2164
+msgid "Stream number (the first stream is 1)"
+msgstr "Datenstromnummer (der erste Datenstrom ist 1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2166
+msgid "Number of blocks in the stream"
+msgstr "Anzahl der Blöcke im Datenstrom"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2168
+msgid "Compressed start offset"
+msgstr "Komprimierte Startposition"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2170
+msgid "Uncompressed start offset"
+msgstr "Unkomprimierte Startposition"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2172
+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:2174 ../src/xz/xz.1:2203 ../src/xz/xz.1:2293
+msgid "Uncompressed size"
+msgstr "Unkomprimierte Größe"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2205
+msgid "Compression ratio"
+msgstr "Kompressionsverhältnis"
+
+#. type: IP
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2203 ../src/xz/xz.1:2300
+#, no-wrap
+msgid "9."
+msgstr "9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2207
+msgid "Name of the integrity check"
+msgstr "Name der Integritätsprüfung"
+
+#. type: IP
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2205 ../src/xz/xz.1:2316
+#, no-wrap
+msgid "10."
+msgstr "10."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2180
+msgid "Size of stream padding"
+msgstr "Größe der Datenstromauffüllung"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2186
+msgid "The columns of the B<block> lines:"
+msgstr "Die Spalten der B<block>-Zeilen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2190
+msgid "Number of the stream containing this block"
+msgstr "Anzahl der in diesem Block enthaltenen Datenströme"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2193
+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:2195
+msgid "Block number relative to the beginning of the file"
+msgstr "Blocknummer relativ zum Anfang der Datei"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2197
+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:2199
+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:2201
+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:2219
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<block> 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<block>-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:2221 ../src/xz/xz.1:2321
+#, no-wrap
+msgid "11."
+msgstr "11."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2223
+msgid "Value of the integrity check in hexadecimal"
+msgstr "Wert der Integritätsprüfung in hexadezimaler Notation"
+
+#. type: IP
+#: ../src/xz/xz.1:2223 ../src/xz/xz.1:2331
+#, no-wrap
+msgid "12."
+msgstr "12."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2225
+msgid "Block header size"
+msgstr "Block-Header-Größe"
+
+#. type: IP
+#: ../src/xz/xz.1:2225
+#, no-wrap
+msgid "13."
+msgstr "13."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2235
+msgid ""
+"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 "
+"(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<c> gibt an, dass die komprimierte Größe verfügbar ist, und "
+"B<u> 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:2235
+#, no-wrap
+msgid "14."
+msgstr "14."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2238
+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:2238
+#, no-wrap
+msgid "15."
+msgstr "15."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2243
+msgid ""
+"Amount of memory (in bytes) required to decompress this block with this "
+"B<xz> version"
+msgstr ""
+"Größe des Speichers (in Byte), der zum Dekomprimieren dieses Blocks mit "
+"dieser B<xz>-Version benötigt wird."
+
+#. type: IP
+#: ../src/xz/xz.1:2243
+#, no-wrap
+msgid "16."
+msgstr "16."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2250
+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:2256
+msgid "The columns of the B<summary> lines:"
+msgstr "Die Spalten der B<summary>-Zeilen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2263
+msgid ""
+"Amount of memory (in bytes) required to decompress this file with this B<xz> "
+"version"
+msgstr ""
+"Größe des Speichers (in Byte), der zum Dekomprimieren dieser Datei mit "
+"dieser B<xz>-Version benötigt wird."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2269 ../src/xz/xz.1:2327
+msgid ""
+"B<yes> or B<no> indicating if all block headers have both compressed size "
+"and uncompressed size stored in them"
+msgstr ""
+"B<yes> oder B<no> 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:2273 ../src/xz/xz.1:2331
+msgid "I<Since> B<xz> I<5.1.2alpha:>"
+msgstr "I<Seit> B<xz> I<5.1.2alpha:>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2277 ../src/xz/xz.1:2335
+msgid "Minimum B<xz> version required to decompress the file"
+msgstr ""
+"Minimale B<xz>-Version, die zur Dekompression der Datei erforderlich ist"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2283
+msgid "The columns of the B<totals> line:"
+msgstr "Die Spalten der B<totals>-Zeile:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2287
+msgid "Number of streams"
+msgstr "Anzahl der Datenströme"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2289
+msgid "Number of blocks"
+msgstr "Anzahl der Blöcke"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2291
+msgid "Compressed size"
+msgstr "Komprimierte Größe"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2295
+msgid "Average compression ratio"
+msgstr "Durchschnittliches Kompressionsverhältnis"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2298
+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:2300
+msgid "Stream padding size"
+msgstr "Größe der Datenstromauffüllung"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2306
+msgid ""
+"Number of files. This is here to keep the order of the earlier columns the "
+"same as on B<file> lines."
+msgstr ""
+"Anzahl der Dateien. Dies dient dazu, die Reihenfolge der vorigen Spalten an "
+"die in den B<file>-Zeilen anzugleichen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2314
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<totals> line:"
+msgstr ""
+"Wenn B<--verbose> zwei Mal angegeben wird, werden zusätzliche Spalten in die "
+"B<totals>-Zeile eingefügt:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2321
+msgid ""
+"Maximum amount of memory (in bytes) required to decompress the files with "
+"this B<xz> version"
+msgstr ""
+"Maximale Größe des Speichers (in Byte), der zum Dekomprimieren der Dateien "
+"mit dieser B<xz>-Version benötigt wird."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2341
+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: SH
+#: ../src/xz/xz.1:2342 ../src/xzdec/xzdec.1:104 ../src/lzmainfo/lzmainfo.1:44
+#: ../src/scripts/xzgrep.1:81
+#, no-wrap
+msgid "EXIT STATUS"
+msgstr "EXIT-STATUS"
+
+#. type: TP
+#: ../src/xz/xz.1:2343 ../src/xzdec/xzdec.1:105 ../src/lzmainfo/lzmainfo.1:45
+#, no-wrap
+msgid "B<0>"
+msgstr "B<0>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2346 ../src/lzmainfo/lzmainfo.1:48
+msgid "All is good."
+msgstr "Alles ist in Ordnung."
+
+#. type: TP
+#: ../src/xz/xz.1:2346 ../src/xzdec/xzdec.1:108 ../src/lzmainfo/lzmainfo.1:48
+#, no-wrap
+msgid "B<1>"
+msgstr "B<1>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2349 ../src/xzdec/xzdec.1:111 ../src/lzmainfo/lzmainfo.1:51
+msgid "An error occurred."
+msgstr "Ein Fehler ist aufgetreten."
+
+#. type: TP
+#: ../src/xz/xz.1:2349
+#, no-wrap
+msgid "B<2>"
+msgstr "B<2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2353
+msgid "Something worth a warning occurred, but no actual errors occurred."
+msgstr ""
+"Es ist etwas passiert, das eine Warnung rechtfertigt, aber es sind keine "
+"tatsächlichen Fehler aufgetreten."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2356
+msgid ""
+"Notices (not warnings or errors) printed on standard error don't affect the "
+"exit status."
+msgstr ""
+"In die Standardausgabe geschriebene Hinweise (keine Warnungen oder Fehler), "
+"welche den Exit-Status nicht beeinflussen."
+
+#. type: SH
+#: ../src/xz/xz.1:2357 ../src/scripts/xzgrep.1:94 ../src/scripts/xzless.1:52
+#, no-wrap
+msgid "ENVIRONMENT"
+msgstr "UMGEBUNGSVARIABLEN"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2370
+msgid ""
+"B<xz> parses space-separated lists of options from the environment variables "
+"B<XZ_DEFAULTS> and B<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 "
+"B<getopt_long>(3) which is used also for the command line arguments."
+msgstr ""
+"B<xz> wertet eine durch Leerzeichen getrennte Liste von Optionen in den "
+"Umgebungsvariablen B<XZ_DEFAULTS> und B<XZ_OPT> 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 B<getopt_long>(3), welches auch für "
+"die Befehlszeilenargumente verwendet wird."
+
+#. type: TP
+#: ../src/xz/xz.1:2370
+#, no-wrap
+msgid "B<XZ_DEFAULTS>"
+msgstr "B<XZ_DEFAULTS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2379
+msgid ""
+"User-specific or system-wide default options. Typically this is set in a "
+"shell initialization script to enable B<xz>'s memory usage limiter by "
+"default. Excluding shell initialization scripts and similar special cases, "
+"scripts must never set or unset B<XZ_DEFAULTS>."
+msgstr ""
+"Benutzerspezifische oder systemweite Standardoptionen. Typischerweise werden "
+"diese in einem Shell-Initialisierungsskript gesetzt, um die "
+"Speicherbedarfsbegrenzung von B<xz> standardmäßig zu aktivieren. Außer bei "
+"Shell-Initialisierungsskripten und in ähnlichen Spezialfällen darf die "
+"Variable B<XZ_DEFAULTS> in Skripten niemals gesetzt oder außer Kraft gesetzt "
+"werden."
+
+#. type: TP
+#: ../src/xz/xz.1:2379
+#, no-wrap
+msgid "B<XZ_OPT>"
+msgstr "B<XZ_OPT>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2390
+msgid ""
+"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 B<tar>(1):"
+msgstr ""
+"Dies dient der Übergabe von Optionen an B<xz>, wenn es nicht möglich ist, "
+"die Optionen direkt in der Befehlszeile von B<xz> zu übergeben. Dies ist der "
+"Fall, wenn B<xz> von einem Skript oder Dienstprogramm ausgeführt wird, zum "
+"Beispiel GNU B<tar>(1):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2396
+#, no-wrap
+msgid "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+msgstr "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2410
+msgid ""
+"Scripts may use B<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 B<sh>(1) scripts one may "
+"use something like this:"
+msgstr ""
+"Skripte können B<XZ_OPT> zum Beispiel zum Setzen skriptspezifischer Standard-"
+"Kompressionsoptionen verwenden. Es ist weiterhin empfehlenswert, Benutzern "
+"die Außerkraftsetzung von B<XZ_OPT> zu erlauben, falls dies angemessen ist. "
+"Zum Beispiel könnte in B<sh>(1)-Skripten Folgendes stehen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2417
+#, no-wrap
+msgid ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+msgstr ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+
+#. type: SH
+#: ../src/xz/xz.1:2422
+#, no-wrap
+msgid "LZMA UTILS COMPATIBILITY"
+msgstr "KOMPATIBILITÄT ZU DEN LZMA-UTILS"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2435
+msgid ""
+"The command line syntax of B<xz> is practically a superset of B<lzma>, "
+"B<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."
+msgstr ""
+"Die Befehlszeilensyntax von B<xz> ist praktisch eine Obermenge der von "
+"B<lzma>, B<unlzma> und B<lzcat> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:2436
+#, no-wrap
+msgid "Compression preset levels"
+msgstr "Voreinstellungsstufen zur Kompression"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2443
+msgid ""
+"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."
+msgstr ""
+"Die Nummerierung der Voreinstellungsstufen der Kompression ist in B<xz> 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."
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "Level"
+msgstr "Stufe"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "xz"
+msgstr "xz"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449
+#, no-wrap
+msgid "LZMA Utils"
+msgstr "LZMA-Utils"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "N/A"
+msgstr "nicht verfügbar"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2451
+#, no-wrap
+msgid "64 KiB"
+msgstr "64 KiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2453
+#, no-wrap
+msgid "512 KiB"
+msgstr "512 KiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2468
+msgid ""
+"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:"
+msgstr ""
+"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:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2474
+#, no-wrap
+msgid "LZMA Utils 4.32.x"
+msgstr "LZMA-Utils 4.32.x"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2477 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "12 MiB"
+msgstr "12 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2480
+#, no-wrap
+msgid "26 MiB"
+msgstr "26 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2481
+#, no-wrap
+msgid "45 MiB"
+msgstr "45 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2482
+#, no-wrap
+msgid "83 MiB"
+msgstr "83 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2483
+#, no-wrap
+msgid "159 MiB"
+msgstr "159 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2484
+#, no-wrap
+msgid "311 MiB"
+msgstr "311 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2493
+msgid ""
+"The default preset level in LZMA Utils is B<-7> while in XZ Utils it is "
+"B<-6>, so both use an 8 MiB dictionary by default."
+msgstr ""
+"Die standardmäßige Voreinstellungsstufe in den LZMA-Utils ist B<-7>, während "
+"diese in den XZ-Utils B<-6> ist, daher verwenden beide standardmäßig ein 8 "
+"MiB großes Wörterbuch."
+
+#. type: SS
+#: ../src/xz/xz.1:2494
+#, no-wrap
+msgid "Streamed vs. non-streamed .lzma files"
+msgstr "Vor- und Nachteile von .lzma-Dateien als Datenströme"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2504
+msgid ""
+"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."
+msgstr ""
+"Die unkomprimierte Größe der Datei kann in den B<.lzma>-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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2525
+msgid ""
+"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."
+msgstr ""
+"B<xz> unterstützt die Dekompression von B<.lzma>-Dateien mit oder ohne "
+"Nutzdatenende-Markierung, aber alle von B<xz> erstellten B<.lzma>-Dateien "
+"verwenden diesen Nutzdatenende-Markierung, wobei die unkomprimierte Größe in "
+"den B<.lzma>-Headern als unbekannt markiert wird. Das könnte in einigen "
+"unüblichen Situationen ein Problem sein. Zum Beispiel könnte ein B<.lzma>-"
+"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 B<."
+"lzma>-Dateien mit bekannter unkomprimierter Größe zu erzeugen."
+
+#. type: SS
+#: ../src/xz/xz.1:2526
+#, no-wrap
+msgid "Unsupported .lzma files"
+msgstr "Nicht unterstützte .lzma-Dateien"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2549
+msgid ""
+"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 I<lp>, but always creates "
+"files with B<lc=3> and B<lp=0>. Creating files with other I<lc> and I<lp> "
+"is possible with B<xz> and with LZMA SDK."
+msgstr ""
+"Das B<.lzma>-Format erlaubt I<lc>-Werte bis zu 8 und I<lp>-Werte bis zu 4. "
+"Die LZMA-Utils können Dateien mit beliebigem I<lc> und I<lp> dekomprimieren, "
+"aber erzeugen immer Dateien mit B<lc=3> und B<lp=0>. Das Erzeugen von "
+"Dateien mit anderem I<lc> und I<lp> ist mit B<xz> und mit dem LZMA-SDK "
+"möglich."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2560
+msgid ""
+"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 B<xz>."
+msgstr ""
+"Die Implementation des LZMA-Filters in liblzma setzt voraus, dass die Summe "
+"von I<lc> und I<lp> nicht größer als 4 ist. Daher können B<.lzma>-Dateien, "
+"welche diese Begrenzung überschreiten, mit B<xz> nicht dekomprimiert werden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2575
+msgid ""
+"LZMA Utils creates only B<.lzma> files which have a dictionary size of "
+"2^I<n> (a power of 2) but accepts files with any dictionary size. liblzma "
+"accepts only B<.lzma> files which have a dictionary size of 2^I<n> or 2^I<n> "
+"+ 2^(I<n>-1). This is to decrease false positives when detecting B<.lzma> "
+"files."
+msgstr ""
+"Die LZMA-Utils erzeugen nur B<.lzma>-Dateien mit einer Wörterbuchgröße von "
+"2^I<n> (einer Zweierpotenz), aber akzeptieren Dateien mit einer beliebigen "
+"Wörterbuchgröße. Liblzma akzeptiert nur B<.lzma>-Dateien mit einer "
+"Wörterbuchgröße von 2^I<n> oder 2^I<n> + 2^(I<n>-1). Dies dient zum "
+"Verringern von Fehlalarmen beim Erkennen von B<.lzma>-Dateien."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2580
+msgid ""
+"These limitations shouldn't be a problem in practice, since practically all "
+"B<.lzma> files have been compressed with settings that liblzma will accept."
+msgstr ""
+"Diese Einschränkungen sollten in der Praxis kein Problem sein, da praktisch "
+"alle B<.lzma>-Dateien mit Einstellungen komprimiert wurden, die Liblzma "
+"akzeptieren wird."
+
+#. type: SS
+#: ../src/xz/xz.1:2581
+#, no-wrap
+msgid "Trailing garbage"
+msgstr "Angehängter Datenmüll"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2591
+msgid ""
+"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."
+msgstr ""
+"Bei der Dekompression ignorieren die LZMA-Utils stillschweigend alles nach "
+"dem ersten B<.lzma>-Datenstrom. In den meisten Situationen ist das ein "
+"Fehler. Das bedeutet auch, dass die LZMA-Utils die Dekompression verketteter "
+"B<.lzma>-Dateien nicht unterstützen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2601
+msgid ""
+"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."
+msgstr ""
+"Wenn nach dem ersten B<.lzma>-Datenstrom Daten verbleiben, erachtet B<xz> "
+"die Datei als beschädigt, es sei denn, die Option B<--single-stream> wurde "
+"verwendet. Dies könnte die Ausführung von Skripten beeinflussen, die davon "
+"ausgehen, dass angehängter Datenmüll ignoriert wird."
+
+#. type: SH
+#: ../src/xz/xz.1:2602 ../src/xzdec/xzdec.1:117
+#, no-wrap
+msgid "NOTES"
+msgstr "ANMERKUNGEN"
+
+#. type: SS
+#: ../src/xz/xz.1:2604
+#, no-wrap
+msgid "Compressed output may vary"
+msgstr "Die komprimierte Ausgabe kann variieren"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2615
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2625
+msgid ""
+"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."
+msgstr ""
+"Sobald B<--rsyncable> 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 B<xz>-Version "
+"erzeugt wurden. Das Problem kann beseitigt werden, wenn ein Teil der Encoder-"
+"Implementierung eingefroren wird, um die mit Rsync abgleichbare Ausgabe über "
+"B<xz>-Versionsgrenzen hinweg stabil zu halten."
+
+#. type: SS
+#: ../src/xz/xz.1:2626
+#, no-wrap
+msgid "Embedded .xz decompressors"
+msgstr "Eingebettete .xz-Dekompressoren"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2643
+msgid ""
+"Embedded B<.xz> decompressor implementations like XZ Embedded don't "
+"necessarily support files created with integrity I<check> types other than "
+"B<none> and B<crc32>. Since the default is B<--check=crc64>, you must use "
+"B<--check=none> or B<--check=crc32> when creating files for embedded systems."
+msgstr ""
+"Eingebettete B<.xz>-Dekompressor-Implementierungen wie XZ Embedded "
+"unterstützen nicht unbedingt Dateien, die mit anderen Integritätsprüfungen "
+"(I<Prüfung>-Typen) als B<none> und B<crc32> erzeugt wurden. Da B<--"
+"check=crc64> die Voreinstellung ist, müssen Sie B<--check=none> oder B<--"
+"check=crc32> verwenden, wenn Sie Dateien für eingebettete Systeme erstellen."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2653
+msgid ""
+"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."
+msgstr ""
+"Außerhalb eingebetteter Systeme unterstützen die Dekompressoren des B<.xz>-"
+"Formats alle I<Prüfung>-Typen oder sind mindestens in der Lage, die Datei zu "
+"dekomprimieren, ohne deren Integrität zu prüfen, wenn die bestimmte "
+"I<Prüfung> nicht verfügbar ist."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2656
+msgid ""
+"XZ Embedded supports BCJ filters, but only with the default start offset."
+msgstr ""
+"XZ Embedded unterstützt BCJ-Filter, aber nur mit dem vorgegebenen "
+"Startversatz."
+
+#. type: SH
+#: ../src/xz/xz.1:2657
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "BEISPIELE"
+
+#. type: SS
+#: ../src/xz/xz.1:2659
+#, no-wrap
+msgid "Basics"
+msgstr "Grundlagen"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2669
+msgid ""
+"Compress the file I<foo> into I<foo.xz> using the default compression level "
+"(B<-6>), and remove I<foo> if compression is successful:"
+msgstr ""
+"Komprimiert die Datei I<foo> mit der Standard-Kompressionsstufe (B<-6>) zu "
+"I<foo.xz> und entfernt I<foo> nach erfolgreicher Kompression:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2674
+#, no-wrap
+msgid "CW<xz foo>\n"
+msgstr "CW<xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2685
+msgid ""
+"Decompress I<bar.xz> into I<bar> and don't remove I<bar.xz> even if "
+"decompression is successful:"
+msgstr ""
+"I<bar.xz> in I<bar> dekomprimieren und I<bar.xz> selbst dann nicht löschen, "
+"wenn die Dekompression erfolgreich war:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2690
+#, no-wrap
+msgid "CW<xz -dk bar.xz>\n"
+msgstr "CW<xz -dk bar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2703
+msgid ""
+"Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+"slower than the default B<-6>, but needs less memory for compression and "
+"decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgstr ""
+"I<baz.tar.xz> mit der Voreinstellung B<-4e> (B<-4 --extreme>) erzeugen, was "
+"langsamer ist als die Vorgabe B<-6>, aber weniger Speicher für Kompression "
+"und Dekompression benötigt (48\\ MiB beziehungsweise 5\\ MiB):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2708
+#, no-wrap
+msgid "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+msgstr "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2714
+msgid ""
+"A mix of compressed and uncompressed files can be decompressed to standard "
+"output with a single command:"
+msgstr ""
+"Eine Mischung aus komprimierten und unkomprimierten Dateien kann mit einem "
+"einzelnen Befehl dekomprimiert in die Standardausgabe geschrieben werden:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2719
+#, no-wrap
+msgid "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+msgstr "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+
+#. type: SS
+#: ../src/xz/xz.1:2723
+#, no-wrap
+msgid "Parallel compression of many files"
+msgstr "Parallele Kompression von vielen Dateien"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2729
+msgid ""
+"On GNU and *BSD, B<find>(1) and B<xargs>(1) can be used to parallelize "
+"compression of many files:"
+msgstr ""
+"Auf GNU- und *BSD-Systemen können B<find>(1) und B<xargs>(1) zum "
+"Parallelisieren der Kompression vieler Dateien verwendet werden:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2735
+#, no-wrap
+msgid ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+msgstr ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2757
+msgid ""
+"The B<-P> option to B<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 B<xargs>(1) "
+"will eventually create."
+msgstr ""
+"Die Option B<-P> von B<xargs>(1) legt die Anzahl der parallelen B<xz>-"
+"Prozesse fest. Der beste Wert für die Option B<-n> 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 B<xz>-"
+"Prozesse zu beschränken, die B<xargs>(1) schließlich erzeugen wird."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2765
+msgid ""
+"The option B<-T1> for B<xz> is there to force it to single-threaded mode, "
+"because B<xargs>(1) is used to control the amount of parallelization."
+msgstr ""
+"Die Option B<-T1> für B<xz> dient dazu, den Einzelthread-Modus zu erzwingen, "
+"da B<xargs>(1) zur Steuerung des Umfangs der Parallelisierung verwendet wird."
+
+#. type: SS
+#: ../src/xz/xz.1:2766
+#, no-wrap
+msgid "Robot mode"
+msgstr "Roboter-Modus"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2769
+msgid ""
+"Calculate how many bytes have been saved in total after compressing multiple "
+"files:"
+msgstr ""
+"Berechnen, wie viel Byte nach der Kompression mehrerer Dateien insgesamt "
+"eingespart wurden:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2774
+#, no-wrap
+msgid "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+msgstr "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2789
+msgid ""
+"A script may want to know that it is using new enough B<xz>. The following "
+"B<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:"
+msgstr ""
+"Ein Skript könnte abfragen wollen, ob es ein B<xz> verwendet, das aktuell "
+"genug ist. Das folgende B<sh>(1)-Skript prüft, ob die Versionsnummer des "
+"Dienstprogramms B<xz> mindestens 5.0.0 ist. Diese Methode ist zu alten Beta-"
+"Versionen kompatibel, welche die Option B<--robot> nicht unterstützen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2798
+#, no-wrap
+msgid ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+msgstr ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Ihre Version von Xz ist zu alt.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2805
+msgid ""
+"Set a memory usage limit for decompression using B<XZ_OPT>, but if a limit "
+"has already been set, don't increase it:"
+msgstr ""
+"Eine Speicherbedarfsbegrenzung für die Dekompression mit B<XZ_OPT> setzen, "
+"aber eine bereits gesetzte Begrenzung nicht erhöhen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2815
+#, no-wrap
+msgid ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+msgstr ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2825
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2833
+msgid ""
+"The CompCPU columns of the tables from the descriptions of the options "
+"B<-0> ... B<-9> and B<--extreme> are useful when customizing LZMA2 presets. "
+"Here are the relevant parts collected from those two tables:"
+msgstr ""
+"Die KompCPU-Spalten der Tabellen aus den Beschreibungen der Optionen B<-0> … "
+"B<-9> und B<--extreme> sind beim Anpassen der LZMA2-Voreinstellungen "
+"nützlich. Diese sind die relevanten Teile aus diesen zwei Tabellen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2858
+msgid ""
+"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:"
+msgstr ""
+"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 B<xz -8> geschehen würde, kann eine "
+"Voreinstellung mit einem niedrigen KompCPU-Wert (zum Beispiel 1) dahingehend "
+"angepasst werden, ein größeres Wörterbuch zu verwenden:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2863
+#, no-wrap
+msgid "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+msgstr "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2879
+msgid ""
+"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."
+msgstr ""
+"Mit bestimmten Dateien kann der obige Befehl schneller sein als B<xz -6>, "
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2886
+msgid ""
+"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:"
+msgstr ""
+"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 B<xz -9> verwendet werden würden:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2891
+#, no-wrap
+msgid "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+msgstr "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2904
+msgid ""
+"Using B<-vv> (B<--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."
+msgstr ""
+"Die Verwendung von B<-vv> (B<--verbose --verbose>) 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2916
+msgid ""
+"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> (B<-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 B<--"
+"check=crc32>) using about 100\\ KiB of memory."
+msgstr ""
+"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 B<-6e> (B<-6 --extreme>) 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 B<--check=crc32>) mit nur etwa 100\\ KiB Speicher "
+"dekomprimiert werden."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2921
+#, no-wrap
+msgid "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+msgstr "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2944
+msgid ""
+"If you want to squeeze out as many bytes as possible, adjusting the number "
+"of literal context bits (I<lc>) and number of position bits (I<pb>) can "
+"sometimes help. Adjusting the number of literal position bits (I<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 B<lc=4>):"
+msgstr ""
+"Wenn Sie so viele Byte wie möglich herausquetschen wollen, kann die "
+"Anpassung der Anzahl der literalen Kontextbits (I<lc>) und der Anzahl der "
+"Positionsbits (I<pb>) manchmal hilfreich sein. Auch die Anpassung der Anzahl "
+"der literalen Positionsbits (I<lp>) könnte helfen, aber üblicherweise sind "
+"I<lc> und I<pb> 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 B<xz -6e> (versuchen Sie "
+"es auch B<lc=4>):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2949
+#, no-wrap
+msgid "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+msgstr "CW<xz --lzma2=preset=6e,pb=0,lc=4 Quellcode.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2957
+msgid ""
+"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:"
+msgstr ""
+"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:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2962
+#, no-wrap
+msgid "CW<xz --x86 --lzma2 libfoo.so>\n"
+msgstr "CW<xz --x86 --lzma2 libfoo.so>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2976
+msgid ""
+"Note that the order of the filter options is significant. If B<--x86> is "
+"specified after B<--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."
+msgstr ""
+"Beachten Sie, dass die Reihenfolge der Filteroptionen von Bedeutung ist. "
+"Falls B<--x86> nach B<--lzma2> angegeben wird, gibt B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2982
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2992
+msgid ""
+"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 B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to "
+"accommodate the three-byte alignment:"
+msgstr ""
+"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 B<dist=3>, außerdem "
+"ist es gut, B<pb=0> an LZMA2 zu übergeben, um die 3-Byte-Ausrichtung zu "
+"berücksichtigen:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2997
+#, no-wrap
+msgid "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+msgstr "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3005
+msgid ""
+"If multiple images have been put into a single archive (for example, B<."
+"tar>), the Delta filter will work on that too as long as all images have the "
+"same number of bytes per pixel."
+msgstr ""
+"Wenn sich mehrere Bilder in einem einzelnen Archiv befinden (zum Beispiel\\& "
+"B<.tar>), funktioniert der Delta-Filter damit auch, sofern alle Bilder im "
+"Archiv die gleiche Anzahl Bytes pro Pixel haben."
+
+#. type: SH
+#: ../src/xz/xz.1:3006 ../src/xzdec/xzdec.1:143 ../src/lzmainfo/lzmainfo.1:59
+#: ../src/scripts/xzdiff.1:65 ../src/scripts/xzgrep.1:106
+#: ../src/scripts/xzless.1:65 ../src/scripts/xzmore.1:51
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "SIEHE AUCH"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3015
+msgid ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+msgstr ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3017
+msgid "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+msgstr "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3019 ../src/xzdec/xzdec.1:146
+msgid "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+msgstr "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3020
+msgid "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+msgstr "LZMA-SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "XZDEC"
+msgstr "XZDEC"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "2017-04-19"
+msgstr "19. April 2017"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:10
+msgid "xzdec, lzmadec - Small .xz and .lzma decompressors"
+msgstr "xzdec, lzmadec - Kleine Dekompressoren für .xz und .lzma"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:14
+msgid "B<xzdec> [I<option...>] [I<file...>]"
+msgstr "B<xzdec> [I<Option…>] [I<Datei…>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:18
+msgid "B<lzmadec> [I<option...>] [I<file...>]"
+msgstr "B<lzmadec> [I<Option…>] [I<Datei…>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:44
+msgid ""
+"B<xzdec> is a liblzma-based decompression-only tool for B<.xz> (and only B<."
+"xz>) files. B<xzdec> is intended to work as a drop-in replacement for "
+"B<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."
+msgstr ""
+"B<xzdec> ist ein auf Liblzma basierendes Nur-Dekompressionswerkzeug für B<."
+"xz>-Dateien (und B<nur> für B<.xz>-Dateien). B<xzdec> ist als direkter "
+"Ersatz für B<xz>(1) in jenen Situationen konzipiert, wo ein Skript B<xz --"
+"decompress --stdout> (und eventuelle einige andere höufig genutzte Optionen) "
+"zum Dekomprimieren von B<.xz>-Dateien. B<lzmadec> ist weitgehend identisch "
+"zu B<xzdec>, mit der Ausnahme, dass B<lzmadec> B<.lzma>-Dateien anstelle von "
+"B<.xz>-Dateien unterstützt."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:61
+msgid ""
+"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."
+msgstr ""
+"Um die Größe der ausführbaren Datei zu reduzieren, unterstützt B<xzdec> "
+"weder Multithreading noch Lokalisierung. Außerdem liest es keine Optionen "
+"aus den Umgebungsvariablen B<XZ_DEFAULTS> und B<XZ_OPT>. B<xzdec> "
+"unterstützt keine zwischenzeitlichen Fortschrittsinformationen: Das Senden "
+"von B<SIGINFO> an B<xzdec> hat keine Auswirkungen, jedoch beendet B<SIGUSR1> "
+"den Prozess, anstatt Fortschrittsinformationen anzuzeigen."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:69
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> supports only decompression."
+msgstr ""
+"ist zwecks Kompatibilität zu B<xz>(1) vorhanden; wird ignoriert. B<xzdec> "
+"unterstützt nur Dekompression."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:76
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never creates or removes any "
+"files."
+msgstr ""
+"ist zwecks Kompatibilität zu B<xz>(1) vorhanden; wird ignoriert. B<xzdec> "
+"erzeugt oder entfernt niemals Dateien."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:83
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> always writes the "
+"decompressed data to standard output."
+msgstr ""
+"ist zwecks Kompatibilität zu B<xz>(1) vorhanden; wird ignoriert. B<xzdec> "
+"schreibt die dekomprimierten Daten immer in die Standardausgabe."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:89
+msgid ""
+"Specifying this once does nothing since B<xzdec> never displays any warnings "
+"or notices. Specify this twice to suppress errors."
+msgstr ""
+"hat bei einmaliger Angabe keine Wirkung, da B<xzdec> niemals Warnungen oder "
+"sonstige Meldungen anzeigt. Wenn Sie dies zweimal angeben, werden "
+"Fehlermeldungen unterdrückt."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:96
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never uses the exit status 2."
+msgstr ""
+"ist zwecks Kompatibilität zu B<xz>(1) vorhanden; wird ignoriert. B<xzdec> "
+"verwendet niemals den Exit-Status 2."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:99
+msgid "Display a help message and exit successfully."
+msgstr "zeigt eine Hilfemeldung an und beendet das Programm erfolgreich."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:104
+msgid "Display the version number of B<xzdec> and liblzma."
+msgstr "zeigt die Versionsnummer von B<xzdec> und liblzma an."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:108
+msgid "All was good."
+msgstr "Alles ist in Ordnung."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:117
+msgid ""
+"B<xzdec> doesn't have any warning messages like B<xz>(1) has, thus the exit "
+"status 2 is not used by B<xzdec>."
+msgstr ""
+"B<xzdec> gibt keine Warnmeldungen wie B<xz>(1) aus, daher wird der Exit-"
+"Status 2 von B<xzdec> nicht verwendet."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:131
+msgid ""
+"Use B<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 B<xz>(1)."
+msgstr ""
+"Verwenden Sie B<xz>(1) anstelle von B<xzdec> oder B<lzmadec> im normalen "
+"täglichen Gebrauch. B<xzdec> oder B<lzmadec> sind nur für Situationen "
+"gedacht, in denen ein kleinerer Dekompressor statt des voll ausgestatteten "
+"B<xz>(1) wichtig ist."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:143
+msgid ""
+"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."
+msgstr ""
+"B<xzdec> und B<lzmadec> 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 B<.xz>-Dateien brauchen, sollten Sie stattdessen XZ "
+"Embedded in Erwägung ziehen."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:145 ../src/lzmainfo/lzmainfo.1:60
+msgid "B<xz>(1)"
+msgstr "B<xz>(1)"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7
+#, no-wrap
+msgid "LZMAINFO"
+msgstr "LZMAINFO"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "2013-06-30"
+msgstr "30. Juni 2013"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:10
+msgid "lzmainfo - show information stored in the .lzma file header"
+msgstr "lzmainfo - im .lzma-Dateikopf enthaltene Informationen anzeigen"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:15
+msgid "B<lzmainfo> [B<--help>] [B<--version>] [I<file...>]"
+msgstr "B<lzmainfo> [B<--help>] [B<--version>] [I<Datei …>]"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:31
+msgid ""
+"B<lzmainfo> shows information stored in the B<.lzma> file header. It reads "
+"the first 13 bytes from the specified I<file>, decodes the header, and "
+"prints it to standard output in human readable format. If no I<files> are "
+"given or I<file> is B<->, standard input is read."
+msgstr ""
+"B<lzmainfo> zeigt die im B<.lzma>-Dateikopf enthaltenen Informationen an. Es "
+"liest die ersten 13 Bytes aus der angegebenen I<Datei>, dekodiert den "
+"Dateikopf und gibt das Ergebnis in die Standardausgabe in einem "
+"menschenlesbaren Format aus. Falls keine I<Datei>en angegeben werden oder "
+"die I<Datei> als B<-> übergeben wird, dann wird aus der Standardeingabe "
+"gelesen."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:40
+msgid ""
+"Usually the most interesting information is the uncompressed size and the "
+"dictionary size. Uncompressed size can be shown only if the file is in the "
+"non-streamed B<.lzma> format variant. The amount of memory required to "
+"decompress the file is a few dozen kilobytes plus the dictionary size."
+msgstr ""
+"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 B<.lzma>-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."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:44
+msgid ""
+"B<lzmainfo> is included in XZ Utils primarily for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"B<lzmainfo> ist in den XZ-Dienstprogrammen hauptsächlich zur Kompatibilität "
+"zu den LZMA-Dienstprogrammen enthalten."
+
+#. type: SH
+#: ../src/lzmainfo/lzmainfo.1:51 ../src/scripts/xzdiff.1:74
+#, no-wrap
+msgid "BUGS"
+msgstr "FEHLER"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:59
+msgid ""
+"B<lzmainfo> uses B<MB> while the correct suffix would be B<MiB> (2^20 "
+"bytes). This is to keep the output compatible with LZMA Utils."
+msgstr ""
+"B<lzmainfo> verwendet B<MB>, während das korrekte Suffix B<MiB> (2^20 Bytes) "
+"wäre. Damit wird die Kompatibilität zu den LZMA-Dienstprogrammen "
+"gewährleistet."
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "XZDIFF"
+msgstr "XZDIFF"
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "2021-06-04"
+msgstr "4. Juni 2021"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:12
+msgid "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files"
+msgstr "xzcmp, xzdiff, lzcmp, lzdiff - komprimierte Dateien vergleichen"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:15
+msgid "B<xzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<xzcmp> [I<cmp-Optionen>] I<Datei1> [I<Datei2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:18
+msgid "B<xzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<xzdiff> [I<diff-Optionen>] I<Datei1> [I<Datei2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:21
+msgid "B<lzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<lzcmp> [I<cmp-Optionen>] I<Datei1> [I<Datei2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:24
+msgid "B<lzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<lzdiff> [I<diff-Optionen>] I<Datei1> [I<Datei2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:59
+msgid ""
+"B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files compressed "
+"with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), or "
+"B<zstd>(1). All options specified are passed directly to B<cmp>(1) or "
+"B<diff>(1). If only one file is specified, then the files compared are "
+"I<file1> (which must have a suffix of a supported compression format) and "
+"I<file1> from which the compression format suffix has been stripped. If two "
+"files are specified, then they are uncompressed if necessary and fed to "
+"B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or B<diff>(1) is "
+"preserved unless a decompression error occurs; then exit status is 2."
+msgstr ""
+"Die Dienstprogramme B<xzcmp> und B<xzdiff> führen die Programme B<cmp>(1) "
+"beziehungsweise B<diff>(1) mit Dateien aus, die mittels B<xz>(1), "
+"B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1) oder B<zstd> komprimiert "
+"wurden. Alle angegebenen Optionen werden direkt an B<cmp>(1) oder B<diff>(1) "
+"übergeben. Wird nur eine Datei angegeben, wird diese I<Datei1> (die eine "
+"Endung entsprechend eines der unterstützten Kompressionsformate haben muss) "
+"mit der I<Datei1> verglichen, von der die Kompressionsformat-Endung entfernt "
+"wird. Werden zwei Dateien angegeben, dann werden deren Inhalte (falls nötig, "
+"unkomprimiert) an B<cmp>(1) oder B<diff>(1) weitergeleitet. Der Exit-Status "
+"von B<cmp>(1) oder B<diff>(1) wird dabei bewahrt (sofern kein "
+"Dekompressionsfehler auftrat; in diesem Fall ist der Exit-Status 2)."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:65
+msgid ""
+"The names B<lzcmp> and B<lzdiff> are provided for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"Die Namen B<lzcmp> und B<lzdiff> dienen der Abwärtskompatibilität zu den "
+"LZMA-Dienstprogrammen."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:74
+msgid ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+msgstr ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:79
+msgid ""
+"Messages from the B<cmp>(1) or B<diff>(1) programs refer to temporary "
+"filenames instead of those specified."
+msgstr ""
+"Die Meldungen der Programme B<cmp>(1) oder B<diff>(1) können auf temporäre "
+"Dateinamen verweisen anstatt auf die tatsächlich angegebenen Dateinamen."
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "XZGREP"
+msgstr "XZGREP"
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "2022-07-19"
+msgstr "19. Juli 2022"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:12
+msgid "xzgrep - search compressed files for a regular expression"
+msgstr ""
+"xzgrep - komprimierte Dateien nach einem regulären Ausdruck durchsuchen"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:18
+msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> [I<file...>]"
+msgstr "B<xzgrep> [I<grep_Optionen>] [B<-e>] I<Muster> [I<Datei …>]"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:21
+msgid "B<xzegrep> \\&..."
+msgstr "B<xzegrep> …"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:24
+msgid "B<xzfgrep> \\&..."
+msgstr "B<xzfgrep> …"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:27
+msgid "B<lzgrep> \\&..."
+msgstr "B<lzgrep> …"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:30
+msgid "B<lzegrep> \\&..."
+msgstr "B<lzegrep> …"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:33
+msgid "B<lzfgrep> \\&..."
+msgstr "B<lzfgrep> …"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:49
+msgid ""
+"B<xzgrep> invokes B<grep>(1) on I<files> which may be either uncompressed "
+"or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), or B<zstd>(1). All options specified are passed directly to "
+"B<grep>(1)."
+msgstr ""
+"B<xzgrep> wendet B<grep>(1) auf I<Dateien> an, die entweder unkomprimiert "
+"oder mit B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1) oder "
+"B<zstd> komprimiert sein können. Alle angegebenen Optionen werden direkt an "
+"B<grep>(1) übergeben."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:62
+msgid ""
+"If no I<file> is specified, then standard input is decompressed if necessary "
+"and fed to B<grep>(1). When reading from standard input, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), and B<zstd>(1) compressed files are not supported."
+msgstr ""
+"Wenn keine I<Datei> angegeben ist, wird die Standardeingabe dekomprimiert "
+"(falls nötig) und an B<grep> übergeben. Beim Lesen aus der Standardeingabe "
+"keine Dateien unterstützt, die mit B<gzip>(1), B<bzip2>(1), B<lzop>(1) oder "
+"B<zstd> komprimiert sind."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:81
+msgid ""
+"If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<grep -E> or "
+"B<grep -F> is used instead of B<grep>(1). The same applies to names "
+"B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+"compatibility with LZMA Utils."
+msgstr ""
+"Wenn B<xzgrep> als B<xzegrep> oder B<xzfgrep> aufgerufen wird, dann wird "
+"B<grep -E> oder B<grep -F> anstelle von B<grep>(1) verwendet. Genauso "
+"verhalten sich die Befehle B<lzgrep>, B<lzegrep> und B<lzfgrep>, die die "
+"Abwärtskompatibilität zu den LZMA-Dienstprogrammen gewährleisten."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:86
+msgid ""
+"At least one match was found from at least one of the input files. No "
+"errors occurred."
+msgstr ""
+"In mindestens einer der Eingabedateien wurde mindestens ein Treffer "
+"gefunden. Es sind keine Fehler aufgetreten."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:90
+msgid "No matches were found from any of the input files. No errors occurred."
+msgstr ""
+"In keiner der Eingabedateien wurde ein Treffer gefunden. Es sind keine "
+"Fehler aufgetreten."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:90
+#, no-wrap
+msgid "E<gt>1"
+msgstr "E<gt>1"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:94
+msgid "One or more errors occurred. It is unknown if matches were found."
+msgstr ""
+"Ein oder mehrere Fehler sind aufgetreten. Es ist unbekannt, ob Treffer "
+"gefunden wurden."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:95
+#, no-wrap
+msgid "B<GREP>"
+msgstr "B<GREP>"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:106
+msgid ""
+"If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+"B<grep>(1), B<grep -E>, or B<grep -F>."
+msgstr ""
+"Wenn die Umgebungsvariable B<GREP> gesetzt ist, verwendet B<xzgrep> deren "
+"Inhalt anstelle von B<grep>(1), B<grep -E> oder B<grep -F>."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:113
+msgid ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+msgstr ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "XZLESS"
+msgstr "XZLESS"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "2010-09-27"
+msgstr "27. September 2010"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:13
+msgid "xzless, lzless - view xz or lzma compressed (text) files"
+msgstr ""
+"xzless, lzless - mit xz oder lzma komprimierte (Text-)Dateien betrachten"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:16
+msgid "B<xzless> [I<file>...]"
+msgstr "B<xzless> [I<Datei> …]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:19
+msgid "B<lzless> [I<file>...]"
+msgstr "B<lzless> [I<Datei> …]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:31
+msgid ""
+"B<xzless> is a filter that displays text from compressed files to a "
+"terminal. It works on files compressed with B<xz>(1) or B<lzma>(1). If no "
+"I<files> are given, B<xzless> reads from standard input."
+msgstr ""
+"B<xzless> ist ein Filter, der Text aus komprimierten Dateien in einem "
+"Terminal anzeigt. Es funktioniert mit Dateien, die mit B<xz>(1) oder "
+"B<lzma>(1) komprimiert sind. Falls keine I<files> angegeben sind, liest "
+"B<xzless> aus der Standardeingabe."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:48
+msgid ""
+"B<xzless> uses B<less>(1) to present its output. Unlike B<xzmore>, its "
+"choice of pager cannot be altered by setting an environment variable. "
+"Commands are based on both B<more>(1) and B<vi>(1) and allow back and "
+"forth movement and searching. See the B<less>(1) manual for more "
+"information."
+msgstr ""
+"B<xzless> verwendet B<less>(1) zur Darstellung der Ausgabe. Im Gegensatz zu "
+"B<xzmore> können Sie das zu verwendende Textanzeigeprogramm nicht durch "
+"Setzen einer Umgebungsvariable ändern. Die Befehle basieren auf B<more>(1) "
+"und B<vi>(1) und ermöglichen Vorwärts- und Rückwärtssprünge sowie "
+"Suchvorgänge. In der Handbuchseite zu B<less>(1) finden Sie weiter "
+"Information."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:52
+msgid ""
+"The command named B<lzless> is provided for backward compatibility with LZMA "
+"Utils."
+msgstr ""
+"Der Befehl B<lzless> dient der Abwärtskompatibilität zu den LZMA-"
+"Dienstprogrammen."
+
+#. type: TP
+#: ../src/scripts/xzless.1:53
+#, no-wrap
+msgid "B<LESSMETACHARS>"
+msgstr "B<LESSMETACHARS>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:59
+msgid ""
+"A list of characters special to the shell. Set by B<xzless> unless it is "
+"already set in the environment."
+msgstr ""
+"Dies enthält eine Zeichenliste mit Bezug zur Shell. Wenn diese Variable "
+"nicht bereits gesetzt ist, wird sie durch B<xzless> gesetzt."
+
+#. type: TP
+#: ../src/scripts/xzless.1:59
+#, no-wrap
+msgid "B<LESSOPEN>"
+msgstr "B<LESSOPEN>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:65
+msgid ""
+"Set to a command line to invoke the B<xz>(1) decompressor for preprocessing "
+"the input files to B<less>(1)."
+msgstr ""
+"Dies ist auf die Befehlszeile zum Aufruf von B<xz>(1) gesetzt, die zur "
+"Vorverarbeitung der Eingabedateien für B<less>(1) nötig ist."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:69
+msgid "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+msgstr "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+
+#. type: TH
+#: ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZMORE"
+msgstr "XZMORE"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:10
+msgid "xzmore, lzmore - view xz or lzma compressed (text) files"
+msgstr "xzmore, lzmore - mit xz oder lzma komprimierte (Text-)Dateien lesen"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:13
+msgid "B<xzmore> [I<file...>]"
+msgstr "B<xzmore> [I<Datei …>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:16
+msgid "B<lzmore> [I<file...>]"
+msgstr "B<lzmore> [I<Datei …>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:24
+msgid ""
+"B<xzmore> is a filter which allows examination of B<xz>(1) or B<lzma>(1) "
+"compressed text files one screenful at a time on a soft-copy terminal."
+msgstr ""
+"B<xzmore> ist ein Filter zur seitenweisen Anzeige von Textdateien in einem "
+"Terminal, die mit B<xz>(1) oder B<lzma>(1) komprimiert wurden."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:33
+msgid ""
+"To use a pager other than the default B<more,> set environment variable "
+"B<PAGER> to the name of the desired program. The name B<lzmore> is provided "
+"for backward compatibility with LZMA Utils."
+msgstr ""
+"Um ein anderes Textanzeigeprogramm als den voreingestellten B<more> zu "
+"verwenden, setzen Sie die Umgebungsvariable B<PAGER> auf das gewünschte "
+"Programm. Der Name B<lzmore> dient der Abwärtskompatibilität zu den LZMA-"
+"Dienstprogrammen."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:33
+#, no-wrap
+msgid "B<e> or B<q>"
+msgstr "B<e> oder B<q>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:40
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to exit."
+msgstr ""
+"Wenn die Zeile --Mehr--(Nächste Datei: I<Datei>) angezeigt wird, wird "
+"B<xzmore> mit diesem Befehl beendet."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:40
+#, no-wrap
+msgid "B<s>"
+msgstr "B<s>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:47
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to skip the next file and continue."
+msgstr ""
+"Wenn die Zeile --Mehr--(Nächste Datei: I<Datei>) angezeigt wird, springt "
+"B<xzmore> zur nächsten Datei und zeigt diese an."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:51
+msgid ""
+"For list of keyboard commands supported while actually viewing the content "
+"of a file, refer to manual of the pager you use, usually B<more>(1)."
+msgstr ""
+"Eine Liste der bei der Betrachtung von Dateiinhalten verfügbaren "
+"Tastaturbefehle finden Sie in der Handbuchseite des verwendeten "
+"Textanzeigeprogramms, meist B<more>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:55
+msgid "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+msgstr "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+
+#~ msgid "2022-12-01"
+#~ msgstr "1. Dezember 2022"
diff --git a/po4a/fr.po b/po4a/fr.po
new file mode 100644
index 0000000..d235599
--- /dev/null
+++ b/po4a/fr.po
@@ -0,0 +1,6204 @@
+# french translation of XZ Utils man
+# Copyright (C) 2021 Debian French l10n team <debian-l10n-french@lists.debian.org>
+# This file is put in the public domain.
+# This file is distributed under the same license as the XZ Utils package.
+#
+# Translator
+# bubu <bubub@no-log.org>, 2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XZ Utils 5.2.5\n"
+"POT-Creation-Date: 2023-11-01 20:27+0800\n"
+"PO-Revision-Date: 2021-12-01 15:17+0100\n"
+"Last-Translator: bubu <bubub@no-log.org> \n"
+"Language-Team: French <debian-l10n-french@lists.debian.org> \n"
+"Language: fr_FR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 3.0\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "XZ"
+msgstr "XZ"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "2023-07-17"
+msgstr ""
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "Tukaani"
+msgstr "Tukaani"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZ Utils"
+msgstr "Utilitaires XZ"
+
+#. type: SH
+#: ../src/xz/xz.1:11 ../src/xzdec/xzdec.1:8 ../src/lzmainfo/lzmainfo.1:8
+#: ../src/scripts/xzdiff.1:10 ../src/scripts/xzgrep.1:10
+#: ../src/scripts/xzless.1:11 ../src/scripts/xzmore.1:8
+#, no-wrap
+msgid "NAME"
+msgstr "NOM"
+
+#. type: Plain text
+#: ../src/xz/xz.1:13
+msgid ""
+"xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma "
+"files"
+msgstr ""
+"xz, unxz, xzcat, lzma, unlzma, lzcat - Compresser ou décompresser des "
+"fichiers .xz et .lzma"
+
+#. type: SH
+#: ../src/xz/xz.1:14 ../src/xzdec/xzdec.1:10 ../src/lzmainfo/lzmainfo.1:10
+#: ../src/scripts/xzdiff.1:12 ../src/scripts/xzgrep.1:12
+#: ../src/scripts/xzless.1:13 ../src/scripts/xzmore.1:10
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr "SYNOPSIS"
+
+#. type: Plain text
+#: ../src/xz/xz.1:18
+msgid "B<xz> [I<option...>] [I<file...>]"
+msgstr "B<xz> [I<option...>] [I<fichier...>]"
+
+#. type: SH
+#: ../src/xz/xz.1:19
+#, no-wrap
+msgid "COMMAND ALIASES"
+msgstr "ALIAS DES COMMANDES"
+
+#. type: Plain text
+#: ../src/xz/xz.1:23
+msgid "B<unxz> is equivalent to B<xz --decompress>."
+msgstr "B<unxz> est équivalent à B<xz --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:27
+msgid "B<xzcat> is equivalent to B<xz --decompress --stdout>."
+msgstr "B<xzcat> est équivalent à B<xz --decompress --stdout>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:31
+msgid "B<lzma> is equivalent to B<xz --format=lzma>."
+msgstr "B<lzma> est équivalent à B<xz --format=lzma>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:35
+msgid "B<unlzma> is equivalent to B<xz --format=lzma --decompress>."
+msgstr "B<unlzma> est équivalent à B<xz --format=lzma --decompress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:39
+msgid "B<lzcat> is equivalent to B<xz --format=lzma --decompress --stdout>."
+msgstr "B<lzcat> est équivalent à B<xz --format=lzma --decompress -- stdout>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:51
+msgid ""
+"When writing scripts that need to decompress files, it is recommended to "
+"always use the name B<xz> with appropriate arguments (B<xz -d> or B<xz -"
+"dc>) instead of the names B<unxz> and B<xzcat>."
+msgstr ""
+"Lors de l'écriture de scripts qui nécessitent de décompresser des fichiers, "
+"il est recommandé de toujours utiliser la commande B<xz> avec les arguments "
+"appropriés (B<xz -d> ou B<xz -dc>) au lieu des commandes B<unxz> et B<xzcat>."
+
+#. type: SH
+#: ../src/xz/xz.1:52 ../src/xzdec/xzdec.1:18 ../src/lzmainfo/lzmainfo.1:15
+#: ../src/scripts/xzdiff.1:24 ../src/scripts/xzgrep.1:33
+#: ../src/scripts/xzless.1:19 ../src/scripts/xzmore.1:16
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "DESCRIPTION"
+
+#. type: Plain text
+#: ../src/xz/xz.1:71
+#, fuzzy
+#| msgid ""
+#| "B<xz> is a general-purpose data compression tool with command line syntax "
+#| "similar to B<gzip>(1) and B<bzip2>(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."
+msgid ""
+"B<xz> is a general-purpose data compression tool with command line syntax "
+"similar to B<gzip>(1) and B<bzip2>(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<lzip> is supported."
+msgstr ""
+"B<xz> est un outil de compression de données polyvalent avec une syntaxe de "
+"ligne de commandes similaire à B<gzip>(1) et B<bzip2>(1). Le format de "
+"fichier natif est le format B<.xz>, mais le format historique B<.lzma> "
+"utilisé par les outils LZMA et les flux bruts compressés sans conteneur d'en-"
+"têtes de format sont aussi pris en charge. "
+
+#. type: Plain text
+#: ../src/xz/xz.1:93
+msgid ""
+"B<xz> compresses or decompresses each I<file> according to the selected "
+"operation mode. If no I<files> are given or I<file> is B<->, B<xz> reads "
+"from standard input and writes the processed data to standard output. B<xz> "
+"will refuse (display an error and skip the I<file>) to write compressed "
+"data to standard output if it is a terminal. Similarly, B<xz> will refuse "
+"to read compressed data from standard input if it is a terminal."
+msgstr ""
+"B<xz> compresse ou décompresse chaque I<fichier> en fonction du mode "
+"d'opération choisi. Si aucun I<fichier> n'est donné ou I<fichier> est B<->, "
+"B<xz> lit depuis l'entrée standard et écrit les données traitées sur la "
+"sortie standard. B<xz> refusera (affichera une erreur et ignorera le "
+"I<fichier>) d'écrire les données compressées sur la sortie standard si c'est "
+"un terminal. De même, B<xz> refusera de lire des données compressées depuis "
+"l'entrée standard si c'est un terminal."
+
+#. type: Plain text
+#: ../src/xz/xz.1:103
+msgid ""
+"Unless B<--stdout> is specified, I<files> other than B<-> are written to a "
+"new file whose name is derived from the source I<file> name:"
+msgstr ""
+"A moins que B<--sdout> ne soit indiqué, les I<fichiers> autres que B<-> sont "
+"écrits dans un nouveau fichier dont le nom est dérivé du nom de I<fichier> "
+"source :"
+
+#. type: IP
+#: ../src/xz/xz.1:103 ../src/xz/xz.1:109 ../src/xz/xz.1:134 ../src/xz/xz.1:139
+#: ../src/xz/xz.1:142 ../src/xz/xz.1:145 ../src/xz/xz.1:161 ../src/xz/xz.1:422
+#: ../src/xz/xz.1:425 ../src/xz/xz.1:432 ../src/xz/xz.1:677 ../src/xz/xz.1:679
+#: ../src/xz/xz.1:778 ../src/xz/xz.1:789 ../src/xz/xz.1:798 ../src/xz/xz.1:806
+#: ../src/xz/xz.1:1034 ../src/xz/xz.1:1043 ../src/xz/xz.1:1055
+#: ../src/xz/xz.1:1729 ../src/xz/xz.1:1735 ../src/xz/xz.1:1853
+#: ../src/xz/xz.1:1857 ../src/xz/xz.1:1860 ../src/xz/xz.1:1863
+#: ../src/xz/xz.1:1867 ../src/xz/xz.1:1874 ../src/xz/xz.1:1876
+#, no-wrap
+msgid "\\(bu"
+msgstr "\\(bu"
+
+#. type: Plain text
+#: ../src/xz/xz.1:109
+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 ""
+"Lors de la compression, le suffixe du format de fichier cible (B<.xz> ou B<."
+"lzma>) est ajouté au nom de fichier source pour obtenir le nom de fichier "
+"cible."
+
+#. type: Plain text
+#: ../src/xz/xz.1:124
+#, fuzzy
+#| msgid ""
+#| "When decompressing, the B<.xz> or B<.lzma> suffix is removed from the "
+#| "filename to get the target filename. B<xz> also recognizes the suffixes "
+#| "B<.txz> and B<.tlz>, and replaces them with the B<.tar> suffix."
+msgid ""
+"When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from "
+"the filename to get the target filename. B<xz> also recognizes the suffixes "
+"B<.txz> and B<.tlz>, and replaces them with the B<.tar> suffix."
+msgstr ""
+"Lors de la décompression, le suffixe B<.xz> ou B<.lzma> est enlevé du nom de "
+"fichier pour obtenir le nom de fichier cible. B<xz> reconnaît aussi les "
+"suffixes B<.txz> et B<.tlz> et les remplace par le suffixe B<.tar>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:128
+msgid ""
+"If the target file already exists, an error is displayed and the I<file> is "
+"skipped."
+msgstr ""
+"Si le fichier cible existe déjà, une erreur est affichée et le I<fichier> "
+"est ignoré."
+
+#. type: Plain text
+#: ../src/xz/xz.1:134
+msgid ""
+"Unless writing to standard output, B<xz> will display a warning and skip the "
+"I<file> if any of the following applies:"
+msgstr ""
+"Sauf s'il écrit dans la sortie standard, B<xz> affichera un avertissement et "
+"ignorera le I<fichier> dans les cas suivants :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:139
+msgid ""
+"I<File> is not a regular file. Symbolic links are not followed, and thus "
+"they are not considered to be regular files."
+msgstr ""
+"I<fichier> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:142
+msgid "I<File> has more than one hard link."
+msgstr "I<fichier> a plusieurs liens physiques."
+
+#. type: Plain text
+#: ../src/xz/xz.1:145
+msgid "I<File> has setuid, setgid, or sticky bit set."
+msgstr "I<fichier> a un setuid, setgid ou sticky bit positionné."
+
+#. type: Plain text
+#: ../src/xz/xz.1:161
+msgid ""
+"The operation mode is set to compress and the I<file> 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 ""
+"Le mode d'opération est défini pour compresser et le I<fichier> a déjà un "
+"suffixe du format de fichier cible (B<.xz> ou B<.txz> lors d'une compression "
+"en format B<.xz>, et B<.lzma> ou B<.tlz> lors d'une compression en format B<."
+"lzma>)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:171
+#, fuzzy
+#| msgid ""
+#| "The operation mode is set to decompress and the I<file> doesn't have a "
+#| "suffix of any of the supported file formats (B<.xz>, B<.txz>, B<.lzma>, "
+#| "or B<.tlz>)."
+msgid ""
+"The operation mode is set to decompress and the I<file> doesn't have a "
+"suffix of any of the supported file formats (B<.xz>, B<.txz>, B<.lzma>, B<."
+"tlz>, or B<.lz>)."
+msgstr ""
+"Le mode d'opération est défini pour décompresser et le I<fichier> n'a pas de "
+"suffixe correspondant aux formats de fichier pris en charge (B<.xz>, B<."
+"txz>, B<.lzma>, ou B<.tlz>)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:186
+msgid ""
+"After successfully compressing or decompressing the I<file>, B<xz> copies "
+"the owner, group, permissions, access time, and modification time from the "
+"source I<file> 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<file>. B<xz> "
+"doesn't support copying other metadata like access control lists or extended "
+"attributes yet."
+msgstr ""
+"Après la compression ou la décompression réussie du I<fichier>, B<xz> copie "
+"les permissions du propriétaire, du groupe, la date d'accès, et les "
+"modifications d'heure depuis le I<fichier> 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 I<fichier> source. B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:196
+#, fuzzy
+#| msgid ""
+#| "Once the target file has been successfully closed, the source I<file> is "
+#| "removed unless B<--keep> was specified. The source I<file> is never "
+#| "removed if the output is written to standard output."
+msgid ""
+"Once the target file has been successfully closed, the source I<file> is "
+"removed unless B<--keep> was specified. The source I<file> is never removed "
+"if the output is written to standard output or if an error occurs."
+msgstr ""
+"Une fois que le fichier cible a été fermé avec succès, le I<fichier> source "
+"est supprimé à moins que B<--keep> n'ait été spécifié. Le I<fichier> source "
+"n'est jamais supprimé si la sortie est écrite sur la sortie standard."
+
+#. type: Plain text
+#: ../src/xz/xz.1:208
+msgid ""
+"Sending B<SIGINFO> or B<SIGUSR1> to the B<xz> 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 ""
+"Envoyer B<SIGINFO> ou B<SIGURSR1> au processus B<xz>, 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 B<--verbose> "
+"affichera automatiquement un indicateur de progression du processus."
+
+#. type: SS
+#: ../src/xz/xz.1:209
+#, no-wrap
+msgid "Memory usage"
+msgstr "Utilisation de la mémoire"
+
+#. type: Plain text
+#: ../src/xz/xz.1:225
+msgid ""
+"The memory usage of B<xz> 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<xz -9> currently requires 65\\ MiB of "
+"memory. Still, it is possible to have B<.xz> files that require several "
+"gigabytes of memory to decompress."
+msgstr ""
+"L'utilisation de la mémoire par B<xz> 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 "
+"B<xz-9> recquiert habituellement 65\\ Mio de mémoire. Bien qu'il soit "
+"possible d'avoir des fichiers B<.xz> nécessitant plusieurs gigaoctets de "
+"mémoire pour être décompressés."
+
+#. type: Plain text
+#: ../src/xz/xz.1:237
+#, fuzzy
+#| msgid ""
+#| "Especially users of older systems may find the possibility of very large "
+#| "memory usage annoying. To prevent uncomfortable surprises, B<xz> 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 (e.g. using "
+#| "B<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(2))."
+msgid ""
+"Especially users of older systems may find the possibility of very large "
+"memory usage annoying. To prevent uncomfortable surprises, B<xz> 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<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(2))."
+msgstr ""
+"En particulier, les utilisateurs de vieux systèmes peuvent trouver ennuyeux "
+"l'utilisation de beaucoup de mémoire. Pour éviter les mauvaises surprises, "
+"B<xz> a un limiteur d'utilisation mémoire intégré qui est désactivé par "
+"défaut. Bien que quelques systèmes d'exploitation fournissent des moyens "
+"pour limiter l'utilisation de la mémoire par les processus, leur utilisation "
+"s'est avérée insuffisament flexible (par ex. en utilisant B<ulimit>(1) pour "
+"limiter les tendances de la mémoire virtuelle à handicaper B<mmap>(2))."
+
+#. type: Plain text
+#: ../src/xz/xz.1:259
+#, fuzzy
+#| msgid ""
+#| "The memory usage limiter can be enabled with the command line option B<--"
+#| "memlimit=>I<limit>. Often it is more convenient to enable the limiter by "
+#| "default by setting the environment variable B<XZ_DEFAULTS>, e.g.\\& "
+#| "B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+#| "separately for compression and decompression by using B<--memlimit-"
+#| "compress=>I<limit> and B<--memlimit-decompress=>I<limit>. Using these "
+#| "two options outside B<XZ_DEFAULTS> is rarely useful because a single run "
+#| "of B<xz> cannot do both compression and decompression and B<--"
+#| "memlimit=>I<limit> (or B<-M> I<limit>) is shorter to type on the command "
+#| "line."
+msgid ""
+"The memory usage limiter can be enabled with the command line option B<--"
+"memlimit=>I<limit>. Often it is more convenient to enable the limiter by "
+"default by setting the environment variable B<XZ_DEFAULTS>, for example, "
+"B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+"separately for compression and decompression by using B<--memlimit-"
+"compress=>I<limit> and B<--memlimit-decompress=>I<limit>. Using these two "
+"options outside B<XZ_DEFAULTS> is rarely useful because a single run of "
+"B<xz> cannot do both compression and decompression and B<--"
+"memlimit=>I<limit> (or B<-M> I<limit>) is shorter to type on the command "
+"line."
+msgstr ""
+"Le limiteur d'utilisation de la mémoire peut être activé avec l'option B<--"
+"memlimit=>I<limite>. Généralement il est plus pratique d'activer le limiteur "
+"par défaut en réglant la variable d'environnement B<XZ_DEFAULTS>, par "
+"exemple \\&B<XZ_DEFAULTS=--memlimit=150MiB>. Il est possible de régler les "
+"limites indépendamment pour la compression et la décompression en utilisant "
+"B<--memlimit-compress=>I<limite> et B<--memlimit-decompress=>I<limite>. "
+"Utiliser ces deux options hors de B<XZ_DEFAULTS> est rarement utile car une "
+"simple exécution de B<xz> ne peut pas à la fois compresser et décompresser "
+"et B<--memlimit=>I<limite> (ou B<M> I<limite>) est moins long à taper sur la "
+"ligne de commandes."
+
+#. type: Plain text
+#: ../src/xz/xz.1:278
+#, fuzzy
+#| msgid ""
+#| "If the specified memory usage limit is exceeded when decompressing, B<xz> "
+#| "will display an error and decompressing the file will fail. If the limit "
+#| "is exceeded when compressing, B<xz> 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, e.g. if the limit is only "
+#| "slightly less than the amount required for B<xz -9>, the settings will be "
+#| "scaled down only a little, not all the way down to B<xz -8>."
+msgid ""
+"If the specified memory usage limit is exceeded when decompressing, B<xz> "
+"will display an error and decompressing the file will fail. If the limit is "
+"exceeded when compressing, B<xz> 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<xz -9>, the settings will be scaled down only "
+"a little, not all the way down to B<xz -8>."
+msgstr ""
+"Si la limite d'utilisation de la mémoire est dépassée lors de la "
+"décompression, B<xz> affichera une erreur et la décompression échouera. Si "
+"la limite est dépassée lors de la compression, B<xz> essaiera d'adapter les "
+"réglages pour que la limite ne soit plus dépassée (sauf lors de "
+"l'utilisation de B<--format=raw> ou de B<--no-adjust>). De cette façon, "
+"l'opération n'échouera pas sauf si la limite est très petite. L'adaptation "
+"des réglages est faite par paliers et n'aboutira pas forcément aux réglages "
+"prédéfinis du niveau de compression, par ex. si la limite est seulement "
+"légèrement plus petite que la quantité requise par B<xz-9>, les réglages "
+"seront réduits un tout petit peu, mais pas jusqu'à B<xz-8>."
+
+#. type: SS
+#: ../src/xz/xz.1:279
+#, no-wrap
+msgid "Concatenation and padding with .xz files"
+msgstr "Concaténation et remplissage avec des fichiers .xz"
+
+#. type: Plain text
+#: ../src/xz/xz.1:287
+msgid ""
+"It is possible to concatenate B<.xz> files as is. B<xz> will decompress "
+"such files as if they were a single B<.xz> file."
+msgstr ""
+"Il est possible de concaténer les fichiers B<.xz> tels quel. B<xz> "
+"décompressera de tels fichiers comme s'ils étaient un unique fichier B<.xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:296
+#, fuzzy
+#| 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 e.g. if "
+#| "the B<.xz> file is stored on a medium that measures file sizes in 512-"
+#| "byte blocks."
+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 ""
+"Il est possible d'insérer du remplissage entre les parties concaténées ou "
+"après la dernière partie. Le remplissage doit se composer d'octets nuls et "
+"la taille du remplissage doit être un multiple de quatre octets. Cela peut "
+"être utile par exemple si le fichier <.xz> est stocké sur un média qui "
+"mesure la taille des fichiers en blocs de 512 octets."
+
+#. type: Plain text
+#: ../src/xz/xz.1:300
+msgid ""
+"Concatenation and padding are not allowed with B<.lzma> files or raw streams."
+msgstr ""
+"La concaténation et le remplissage ne sont pas autorisés avec les fichiers "
+"B<.lzma> ou les flux bruts."
+
+#. type: SH
+#: ../src/xz/xz.1:301 ../src/xzdec/xzdec.1:61
+#, no-wrap
+msgid "OPTIONS"
+msgstr "OPTIONS"
+
+#. type: SS
+#: ../src/xz/xz.1:303
+#, no-wrap
+msgid "Integer suffixes and special values"
+msgstr "Suffixes entiers et valeurs spéciales."
+
+#. type: Plain text
+#: ../src/xz/xz.1:307
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:307
+#, no-wrap
+msgid "B<KiB>"
+msgstr "B<KiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:318
+msgid ""
+"Multiply the integer by 1,024 (2^10). B<Ki>, B<k>, B<kB>, B<K>, and B<KB> "
+"are accepted as synonyms for B<KiB>."
+msgstr ""
+"Multiplier l'entier par 1024 (2^10). B<Ki>, B<k>, B<kB>, B<K> et B<KB> sont "
+"acceptés comme synonymes de B<KiB>."
+
+#. type: TP
+#: ../src/xz/xz.1:318
+#, no-wrap
+msgid "B<MiB>"
+msgstr "B<MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:328
+msgid ""
+"Multiply the integer by 1,048,576 (2^20). B<Mi>, B<m>, B<M>, and B<MB> are "
+"accepted as synonyms for B<MiB>."
+msgstr ""
+"Multiplier l'entier par 1 048 576 (2^20). B<Mi>, B<m>, B<M> et B<MB> sont "
+"acceptés comme synonymes de B<MiB>."
+
+#. type: TP
+#: ../src/xz/xz.1:328
+#, no-wrap
+msgid "B<GiB>"
+msgstr "B<GiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:338
+msgid ""
+"Multiply the integer by 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, and B<GB> "
+"are accepted as synonyms for B<GiB>."
+msgstr ""
+"Multiplier l'entier par 1 073 741 824 (2^30). B<Gi>, B<g>, B<G> et B<GB> "
+"sont acceptés comme synonymes de B<GiB>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:343
+msgid ""
+"The special value B<max> can be used to indicate the maximum integer value "
+"supported by the option."
+msgstr ""
+"La valeur spéciale B<max> peut être utilisée pour indiquer la valeur "
+"maximale de l'entier prise en charge par l'option."
+
+#. type: SS
+#: ../src/xz/xz.1:344
+#, no-wrap
+msgid "Operation mode"
+msgstr "Mode d'opération"
+
+#. type: Plain text
+#: ../src/xz/xz.1:347
+msgid ""
+"If multiple operation mode options are given, the last one takes effect."
+msgstr ""
+"Si plusieurs options de mode d'opération sont données, la dernière prend "
+"effet."
+
+#. type: TP
+#: ../src/xz/xz.1:347
+#, no-wrap
+msgid "B<-z>, B<--compress>"
+msgstr "B<-z>, B<--compress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:356
+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<unxz> implies B<--decompress>)."
+msgstr ""
+"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 B<unxz> sous-entend B<--"
+"decompress>)."
+
+#. type: TP
+#: ../src/xz/xz.1:356 ../src/xzdec/xzdec.1:62
+#, no-wrap
+msgid "B<-d>, B<--decompress>, B<--uncompress>"
+msgstr "B<-d>, B<--decompress>, B<--uncompress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:359
+msgid "Decompress."
+msgstr "Décompresser."
+
+#. type: TP
+#: ../src/xz/xz.1:359
+#, no-wrap
+msgid "B<-t>, B<--test>"
+msgstr "B<-t>, B<--test>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:368
+msgid ""
+"Test the integrity of compressed I<files>. 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 ""
+"Tester l'intégrité des I<fichiers> compressés. Cette option est équivalente "
+"à B<--decompress --stdout> 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é."
+
+#. type: TP
+#: ../src/xz/xz.1:368
+#, no-wrap
+msgid "B<-l>, B<--list>"
+msgstr "B<-l>, B<--list>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:377
+msgid ""
+"Print information about compressed I<files>. 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 ""
+"Afficher l'information sur les I<fichiers> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:392
+#, fuzzy
+#| msgid ""
+#| "The default listing shows basic information about I<files>, 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 e.g.\\& B<less\\ -S> may be convenient if the terminal isn't "
+#| "wide enough."
+msgid ""
+"The default listing shows basic information about I<files>, 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<less\\ -S> may be convenient if the terminal isn't wide enough."
+msgstr ""
+"Le listing par défaut montre les informations basiques des I<fichiers>, un "
+"fichier par ligne. Pour des informations plus détaillées, utilisez aussi "
+"l'option B<--verbose>. Pour encore plus d'informations, utilisez B<--"
+"verbose> deux fois, mais prenez en compte que cela peut être lent, car "
+"obtenir des informations supplémentaires nécessite de nombreuses recherches. "
+"La largeur de la sortie «bavarde» dépasse 80 caractères, alors canaliser la "
+"sortie (par exemple vers \\&B<less\\-S>) peut être pratique si le terminal "
+"n'est pas assez large."
+
+#. type: Plain text
+#: ../src/xz/xz.1:399
+msgid ""
+"The exact output may vary between B<xz> versions and different locales. For "
+"machine-readable output, B<--robot --list> should be used."
+msgstr ""
+"La sortie exacte peut varier suivant les versions de B<xz> et les différents "
+"paramètres régionaux. Pour une sortie lisible par la machine, utiliser B<--"
+"robot --list>."
+
+#. type: SS
+#: ../src/xz/xz.1:400
+#, no-wrap
+msgid "Operation modifiers"
+msgstr "Modificateurs d'opération"
+
+#. type: TP
+#: ../src/xz/xz.1:401 ../src/xzdec/xzdec.1:69
+#, no-wrap
+msgid "B<-k>, B<--keep>"
+msgstr "B<-k>, B<--keep>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:404
+msgid "Don't delete the input files."
+msgstr "Ne pas effacer les fichiers d'entrée."
+
+#. type: Plain text
+#: ../src/xz/xz.1:418
+#, fuzzy
+#| 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."
+msgid ""
+"Since B<xz> 5.2.6, this option also makes B<xz> 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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:418
+#, no-wrap
+msgid "B<-f>, B<--force>"
+msgstr "B<-f>, B<--force>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:421
+msgid "This option has several effects:"
+msgstr "Cette option a plusieurs effets :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:425
+msgid ""
+"If the target file already exists, delete it before compressing or "
+"decompressing."
+msgstr ""
+"Si le fichier cible existe déjà, l'effacer avant de compresser ou "
+"décompresser."
+
+#. type: Plain text
+#: ../src/xz/xz.1:432
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:457
+msgid ""
+"When used with B<--decompress> B<--stdout> and B<xz> cannot recognize the "
+"type of the source file, copy the source file as is to standard output. "
+"This allows B<xzcat> B<--force> to be used like B<cat>(1) for files that "
+"have not been compressed with B<xz>. Note that in future, B<xz> might "
+"support new compressed file formats, which may make B<xz> decompress more "
+"types of files instead of copying them as is to standard output. B<--"
+"format=>I<format> can be used to restrict B<xz> to decompress only a single "
+"file format."
+msgstr ""
+"Lorsque B<xz> est utilisé avec B<--decompress> B<--stdout> et qu'il ne peut "
+"pas reconnaitre le type du fichier source, copier le fichier source tel quel "
+"dans la sortie standard. Celà permet à B<xzcat> B<--force> d'être utilisé "
+"comme B<cat>(1) pour les fichiers qui n'ont pas été compressé avec B<xz>. "
+"Remarquez que dans le futur, B<xz> devrait prendre en charge de nouveaux "
+"formats de fichiers compressés, ce qui permettra à B<xz> de décompresser "
+"plus de types de fichiers au lieu de les copier tels quels dans la sortie "
+"standard. B<--format=>I<format> peut être utilisé pour contraindre B<xz> à "
+"décompresser seulement un format de fichier."
+
+#. type: TP
+#: ../src/xz/xz.1:458 ../src/xzdec/xzdec.1:76
+#, 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:464
+msgid ""
+"Write the compressed or decompressed data to standard output instead of a "
+"file. This implies B<--keep>."
+msgstr ""
+"Écrire les données compressées ou décompressées sur la sortie standard "
+"plutôt que dans un fichier. Cela necessite B<--keep>."
+
+#. type: TP
+#: ../src/xz/xz.1:464
+#, no-wrap
+msgid "B<--single-stream>"
+msgstr "B<--single-stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:473
+msgid ""
+"Decompress only the first B<.xz> stream, and silently ignore possible "
+"remaining input data following the stream. Normally such trailing garbage "
+"makes B<xz> display an error."
+msgstr ""
+"Décompresser seulement le premier flux B<.xz> 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 B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:482
+msgid ""
+"B<xz> never decompresses more than one stream from B<.lzma> files or raw "
+"streams, but this option still makes B<xz> ignore the possible trailing data "
+"after the B<.lzma> file or raw stream."
+msgstr ""
+"B<xz> ne décompresse jamais plus d'un flux à partir de fichiers B<.lzma> ou "
+"de flux bruts, mais cette option fait aussi que B<xz> ignorera les données "
+"résiduelles après le fichier B<.lzma> ou le flux brut."
+
+#. type: Plain text
+#: ../src/xz/xz.1:487
+msgid ""
+"This option has no effect if the operation mode is not B<--decompress> or "
+"B<--test>."
+msgstr ""
+"Cette option n'a aucun effet si le mode d'opération n'est pas B<--"
+"decompress> ou B<--test>."
+
+#. type: TP
+#: ../src/xz/xz.1:487
+#, no-wrap
+msgid "B<--no-sparse>"
+msgstr "B<--no-sparse>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:499
+msgid ""
+"Disable creation of sparse files. By default, if decompressing into a "
+"regular file, B<xz> 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 ""
+"Désactiver la création de fichiers peu denses. Par défaut, lors de la "
+"décompression en un fichier normal, B<xz> 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."
+
+#. type: TP
+#: ../src/xz/xz.1:499
+#, 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:511
+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 ""
+"Lors de la compression, utiliser B<.suf> comme suffixe du fichier cible au "
+"lieu de B<.xz> ou B<.lzma>. Si B<xz> n'écrit pas sur la sortie standard et "
+"si le fichier source a déja le suffixe B<.suf>, un avertissement est affiché "
+"et le fichier est ignoré."
+
+#. type: Plain text
+#: ../src/xz/xz.1:525
+#, fuzzy
+#| msgid ""
+#| "When decompressing, recognize files with the suffix I<.suf> in addition "
+#| "to files with the B<.xz>, B<.txz>, B<.lzma>, or B<.tlz> suffix. If the "
+#| "source file has the suffix I<.suf>, the suffix is removed to get the "
+#| "target filename."
+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 ""
+"Lors de la décompression, reconnaître les fichiers avec le suffixe B<.suf> "
+"en complément des fichiers avec le suffixe B<.xz>, B<.txz>, B<.lzma> ou B<."
+"tlz>. Si le fichier source a le suffixe B<.suf>, le suffixe est enlevé pour "
+"obtenir le nom de fichier cible."
+
+#. type: Plain text
+#: ../src/xz/xz.1:531
+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 ""
+"Lors de la compression ou décompression de flux bruts (B<--fomat=raw>), 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."
+
+#. type: TP
+#: ../src/xz/xz.1:531
+#, no-wrap
+msgid "B<--files>[B<=>I<file>]"
+msgstr "B<--files>[B<=>I<fichier>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:545
+msgid ""
+"Read the filenames to process from I<file>; if I<file> 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<file>."
+msgstr ""
+"Lire les noms de fichier à traiter depuis I<fichier> ; si I<fichier> 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 "
+"(B<->) 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 "
+"I<fichier>."
+
+#. type: TP
+#: ../src/xz/xz.1:545
+#, no-wrap
+msgid "B<--files0>[B<=>I<file>]"
+msgstr "B<--files0>[B<=>I<fichier>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:549
+msgid ""
+"This is identical to B<--files>[B<=>I<file>] except that each filename must "
+"be terminated with the null character."
+msgstr ""
+"Cela est identique à B<--files>[B<=>I<fichier>] sauf que chaque nom de "
+"fichier doit se terminer par le caractère null."
+
+#. type: SS
+#: ../src/xz/xz.1:550
+#, no-wrap
+msgid "Basic file format and compression options"
+msgstr "Format de fichier basique et options de compression"
+
+#. type: TP
+#: ../src/xz/xz.1:551
+#, no-wrap
+msgid "B<-F> I<format>, B<--format=>I<format>"
+msgstr "B<-F> I<format>, B<--format=>I<format>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:556
+msgid "Specify the file I<format> to compress or decompress:"
+msgstr "Indiquer le I<format> de fichier à compresser ou décompresser :"
+
+#. type: TP
+#: ../src/xz/xz.1:557
+#, no-wrap
+msgid "B<auto>"
+msgstr "B<auto>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:569
+msgid ""
+"This is the default. When compressing, B<auto> is equivalent to B<xz>. "
+"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 ""
+"C'est celui par défaut. Lors de la compression, B<auto> est équivalent à "
+"B<xz>. Lors de la décompression, le format du fichier en entrée est détecté "
+"automatiquement. Notez que les flux bruts (créés avec B<--format=raw>) ne "
+"peuvent pas être détectés automatiquement."
+
+#. type: TP
+#: ../src/xz/xz.1:569
+#, no-wrap
+msgid "B<xz>"
+msgstr "B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:576
+msgid ""
+"Compress to the B<.xz> file format, or accept only B<.xz> files when "
+"decompressing."
+msgstr ""
+"Compresser dans le format de fichier B<.xz> ou n'accepter que les fichiers "
+"B<.xz> à décompresser."
+
+#. type: TP
+#: ../src/xz/xz.1:576
+#, no-wrap
+msgid "B<lzma>, B<alone>"
+msgstr "B<lzma>, B<alone>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:586
+msgid ""
+"Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files "
+"when decompressing. The alternative name B<alone> is provided for backwards "
+"compatibility with LZMA Utils."
+msgstr ""
+"Compresser au format de fichier B<.lzma> historique, ou n'accepter que les "
+"fichiers B<.lzma> lors de la décompression. Le nom alternatif B<alone> est "
+"fourni pour la rétrocompatibilité avec les utilitaires LZMA."
+
+#. type: TP
+#: ../src/xz/xz.1:586
+#, fuzzy, no-wrap
+#| msgid "B<lzgrep> ..."
+msgid "B<lzip>"
+msgstr "B<lzgrep> ..."
+
+#. type: Plain text
+#: ../src/xz/xz.1:592
+msgid ""
+"Accept only B<.lz> files when decompressing. Compression is not supported."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:605
+msgid ""
+"The B<.lz> format version 0 and the unextended version 1 are supported. "
+"Version 0 files were produced by B<lzip> 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<lzip> 1.18."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:614
+msgid ""
+"B<lzip> 1.4 and later create files in the format version 1. The sync flush "
+"marker extension to the format version 1 was added in B<lzip> 1.6. This "
+"extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt "
+"input)."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:614
+#, no-wrap
+msgid "B<raw>"
+msgstr "B<raw>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:622
+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 ""
+"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 B<--format=raw> et spécifier explicitement la chaîne de filtre, qui "
+"normalement aurait du être stockée dans les en-têtes du conteneur."
+
+#. type: TP
+#: ../src/xz/xz.1:623
+#, no-wrap
+msgid "B<-C> I<check>, B<--check=>I<check>"
+msgstr "B<-C> I<vérif.>, B<--check=>I<vérif.>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:638
+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 ""
+"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 B<.xz>. Cette "
+"option n'a effet que si la compression a été faite dans le format B<.xz> ; "
+"le format B<.lzma> 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 B<.xz> est "
+"décompressé."
+
+#. type: Plain text
+#: ../src/xz/xz.1:642
+msgid "Supported I<check> types:"
+msgstr "Types de I<vérification> pris en charge :"
+
+#. type: TP
+#: ../src/xz/xz.1:643
+#, no-wrap
+msgid "B<none>"
+msgstr "B<none>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:649
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:649
+#, no-wrap
+msgid "B<crc32>"
+msgstr "B<crc32>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:652
+msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)."
+msgstr "Calculer CRC32 en utilisant le polynôme de IEEE-802.3 (Ethernet)."
+
+#. type: TP
+#: ../src/xz/xz.1:652
+#, no-wrap
+msgid "B<crc64>"
+msgstr "B<crc64>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:657
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:657
+#, no-wrap
+msgid "B<sha256>"
+msgstr "B<sha256>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:661
+msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64."
+msgstr "Calculer SHA-256. C'est quelque peu plus lent que CRC32 et CRC64."
+
+#. type: Plain text
+#: ../src/xz/xz.1:667
+msgid ""
+"Integrity of the B<.xz> headers is always verified with CRC32. It is not "
+"possible to change or disable it."
+msgstr ""
+"L'intégrité des en-têtes B<.xz> est toujours vérifiée avec CRC32. Il n'est "
+"pas possible de le changer ou de le désactiver."
+
+#. type: TP
+#: ../src/xz/xz.1:667
+#, no-wrap
+msgid "B<--ignore-check>"
+msgstr "B<--ignore-check>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:673
+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 ""
+"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 B<.xz> seront normalement "
+"toujours vérifiées."
+
+#. type: Plain text
+#: ../src/xz/xz.1:676
+msgid ""
+"B<Do not use this option unless you know what you are doing.> Possible "
+"reasons to use this option:"
+msgstr ""
+"B<N'utilisez pas cette option à moins de savoir ce que vous faites.> Les "
+"raisons possibles pour utiliser cette option :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:679
+msgid "Trying to recover data from a corrupt .xz file."
+msgstr "Essayer de récupérer des données d'un fichier .xz corrompu."
+
+#. type: Plain text
+#: ../src/xz/xz.1:685
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:686
+#, no-wrap
+msgid "B<-0> ... B<-9>"
+msgstr "B<-0> ... B<-9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:695
+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 ""
+"Choisir un niveau de compression prédéfini. La valeur par défaut est B<6>. "
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:710
+msgid ""
+"The differences between the presets are more significant than with "
+"B<gzip>(1) and B<bzip2>(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<it's not a good idea to blindly use -9 for "
+"everything> like it often is with B<gzip>(1) and B<bzip2>(1)."
+msgstr ""
+"Les différences entre les préréglages sont plus significatives qu'avec "
+"B<gzip>(1) et B<bzip2>(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, B<ce n'est pas une "
+"bonne idée d'utiliser -9 aveuglément pour tout> comme ça l'est souvent avec "
+"B<gzip>(1) et B<bzip2>(1)."
+
+#. type: TP
+#: ../src/xz/xz.1:711
+#, no-wrap
+msgid "B<-0> ... B<-3>"
+msgstr "B<-0> ... B<-3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:723
+msgid ""
+"These are somewhat fast presets. B<-0> is sometimes faster than B<gzip -9> "
+"while compressing much better. The higher ones often have speed comparable "
+"to B<bzip2>(1) with comparable or better compression ratio, although the "
+"results depend a lot on the type of data being compressed."
+msgstr ""
+"Ce sont des préréglages relativement rapides. B<0> est parfois plus rapide "
+"que B<gzip -9> tout en compressant bien mieux. Les réglages plus élevés ont "
+"souvent une rapidité comparable à celle de B<bzip2>(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."
+
+#. type: TP
+#: ../src/xz/xz.1:723
+#, no-wrap
+msgid "B<-4> ... B<-6>"
+msgstr "B<-4> ... B<-6>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:737
+#, fuzzy
+#| 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 e.g. 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>.)"
+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 ""
+"Bonne à très bonne compression tout en gardant un usage raisonnable de la "
+"mémoire lors de la décompression même pour de vieux systèmes. La valeur par "
+"défaut est B<-6>, ce qui est habituellement un bon choix (par exemple pour "
+"distribuer des fichiers nécessitants d'être décompressibles même sur de "
+"vieux systèmes avec seulement 16\\Mio de RAM). (Il peut aussi être "
+"intéressant d'utiliser B<-5e> ou B<-6e>. Voir B<--extreme>.)"
+
+#. type: TP
+#: ../src/xz/xz.1:737
+#, no-wrap
+msgid "B<-7 ... -9>"
+msgstr "B<-7 ... -9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:744
+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 ""
+"C'est comme B<-6> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:752
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:754
+msgid "The following table summarises the features of the presets:"
+msgstr "Le tableau suivant résume les caractéristiques des préréglages :"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "Preset"
+msgstr "Préréglage"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DictSize"
+msgstr "DictSize"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "CompCPU"
+msgstr "CompCPU"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "CompMem"
+msgstr "CompMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DecMem"
+msgstr "DecMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#: ../src/xz/xz.1:2840
+#, no-wrap
+msgid "-0"
+msgstr "-0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:843 ../src/xz/xz.1:2450
+#, no-wrap
+msgid "256 KiB"
+msgstr "256 KiB"
+
+#. type: TP
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2840 ../src/scripts/xzgrep.1:82
+#, no-wrap
+msgid "0"
+msgstr "0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:764 ../src/xz/xz.1:845 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "3 MiB"
+msgstr "3 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:763 ../src/xz/xz.1:843 ../src/xz/xz.1:844
+#: ../src/xz/xz.1:2451 ../src/xz/xz.1:2452 ../src/xz/xz.1:2454
+#, no-wrap
+msgid "1 MiB"
+msgstr "1 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:2451 ../src/xz/xz.1:2476
+#: ../src/xz/xz.1:2841
+#, no-wrap
+msgid "-1"
+msgstr "-1"
+
+#. type: TP
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:1758 ../src/xz/xz.1:2841
+#: ../src/scripts/xzgrep.1:86
+#, no-wrap
+msgid "1"
+msgstr "1"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "9 MiB"
+msgstr "9 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:764 ../src/xz/xz.1:844 ../src/xz/xz.1:845
+#: ../src/xz/xz.1:2452 ../src/xz/xz.1:2455 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "2 MiB"
+msgstr "2 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:2452 ../src/xz/xz.1:2477
+#: ../src/xz/xz.1:2842
+#, no-wrap
+msgid "-2"
+msgstr "-2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:1760 ../src/xz/xz.1:2842
+#, no-wrap
+msgid "2"
+msgstr "2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2477
+#, no-wrap
+msgid "17 MiB"
+msgstr "17 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2453 ../src/xz/xz.1:2478
+#: ../src/xz/xz.1:2843
+#, no-wrap
+msgid "-3"
+msgstr "-3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:843 ../src/xz/xz.1:846
+#: ../src/xz/xz.1:847 ../src/xz/xz.1:2453 ../src/xz/xz.1:2454
+#: ../src/xz/xz.1:2456
+#, no-wrap
+msgid "4 MiB"
+msgstr "4 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2843
+#, no-wrap
+msgid "3"
+msgstr "3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2458
+#: ../src/xz/xz.1:2459 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "32 MiB"
+msgstr "32 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847
+#, no-wrap
+msgid "5 MiB"
+msgstr "5 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:2454 ../src/xz/xz.1:2479
+#: ../src/xz/xz.1:2844
+#, no-wrap
+msgid "-4"
+msgstr "-4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:1759 ../src/xz/xz.1:1761
+#: ../src/xz/xz.1:1762 ../src/xz/xz.1:1764 ../src/xz/xz.1:2844
+#, no-wrap
+msgid "4"
+msgstr "4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "48 MiB"
+msgstr "48 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2455 ../src/xz/xz.1:2480
+#: ../src/xz/xz.1:2845
+#, no-wrap
+msgid "-5"
+msgstr "-5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2455 ../src/xz/xz.1:2456 ../src/xz/xz.1:2457
+#, no-wrap
+msgid "8 MiB"
+msgstr "8 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2845
+#, no-wrap
+msgid "5"
+msgstr "5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2480 ../src/xz/xz.1:2481
+#, no-wrap
+msgid "94 MiB"
+msgstr "94 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:2456 ../src/xz/xz.1:2481
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "-6"
+msgstr "-6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:769 ../src/xz/xz.1:770 ../src/xz/xz.1:771
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "6"
+msgstr "6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:2457 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "-7"
+msgstr "-7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2457
+#: ../src/xz/xz.1:2458 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "16 MiB"
+msgstr "16 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "186 MiB"
+msgstr "186 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:2458 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "-8"
+msgstr "-8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "370 MiB"
+msgstr "370 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851
+#, no-wrap
+msgid "33 MiB"
+msgstr "33 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:2459 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "-9"
+msgstr "-9"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2459
+#, no-wrap
+msgid "64 MiB"
+msgstr "64 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "674 MiB"
+msgstr "674 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852
+#, no-wrap
+msgid "65 MiB"
+msgstr "65 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:777
+msgid "Column descriptions:"
+msgstr "Descriptions des colonnes :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:789
+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 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 "
+"B<-7> à B<-9> lorsqu'il n'y en a pas vraiment besoin. A B<-6> et plus bas, "
+"la quantité de mémoire gaspillée est généralement assez basse pour ne pas "
+"être un problème."
+
+#. type: Plain text
+#: ../src/xz/xz.1:798
+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 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 B<-6> à B<-9>, 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 B<--"
+"extreme>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:806
+msgid ""
+"CompMem contains the compressor memory requirements in the single-threaded "
+"mode. It may vary slightly between B<xz> versions. Memory requirements of "
+"some of the future multithreaded modes may be dramatically higher than that "
+"of the single-threaded mode."
+msgstr ""
+"CompMem contient les besoins en mémoire du compresseur en mode mono-thread . "
+"Cela devrait à peine varier entre les versions de B<xz>. Les besoins en "
+"mémoire de quelques uns des futurs modes multi-thread devraient sensiblement "
+"augmenter par rapport au mode mono-thread."
+
+#. type: Plain text
+#: ../src/xz/xz.1:813
+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 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."
+
+#. type: TP
+#: ../src/xz/xz.1:814
+#, no-wrap
+msgid "B<-e>, B<--extreme>"
+msgstr "B<-e>, B<--extreme>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:823
+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 ""
+"Utilisez un variant plus lent que les préréglages (B<-0> à B<-9>) 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 B<-0> à B<-3>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:835
+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 ""
+"Depuis qu'il y a deux préréglages avec des tailles de dictionnaire de 4\\ "
+"Mio et 8 \\Mio, les préréglages B<-3e> et B<-5e> utilisent des réglages "
+"légèrement plus rapides que B<-4e> et B<-6e>, respectivement. De cette "
+"manière, il n'y a pas deux préréglages identiques."
+
+#. type: tbl table
+#: ../src/xz/xz.1:843
+#, no-wrap
+msgid "-0e"
+msgstr "-0e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:843 ../src/xz/xz.1:844 ../src/xz/xz.1:845 ../src/xz/xz.1:847
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:850 ../src/xz/xz.1:851 ../src/xz/xz.1:852
+#: ../src/xz/xz.1:2848
+#, no-wrap
+msgid "8"
+msgstr "8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "-1e"
+msgstr "-1e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "13 MiB"
+msgstr "13 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "-2e"
+msgstr "-2e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "25 MiB"
+msgstr "25 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846
+#, no-wrap
+msgid "-3e"
+msgstr "-3e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846 ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "7"
+msgstr "7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:847
+#, no-wrap
+msgid "-4e"
+msgstr "-4e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "-5e"
+msgstr "-5e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2848
+#, no-wrap
+msgid "-6e"
+msgstr "-6e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:850
+#, no-wrap
+msgid "-7e"
+msgstr "-7e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:851
+#, no-wrap
+msgid "-8e"
+msgstr "-8e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:852
+#, no-wrap
+msgid "-9e"
+msgstr "-9e"
+
+#. type: Plain text
+#: ../src/xz/xz.1:864
+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 ""
+"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 : "
+"B<-5>, B<-6>, B<-5e> et B<-6e>."
+
+#. type: TP
+#: ../src/xz/xz.1:864
+#, no-wrap
+msgid "B<--fast>"
+msgstr "B<--fast>"
+
+#. type: TP
+#: ../src/xz/xz.1:867
+#, no-wrap
+msgid "B<--best>"
+msgstr "B<--best>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:878
+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 ""
+"Il y a néanmoins des alias trompeurs pour B<-0> et B<-9>, respectivement. "
+"Ils ne sont fournis que pour des besoins de rétro-compatibilité avec les "
+"utilitaires LZMA. Evitez d'utiliser ces options."
+
+#. type: TP
+#: ../src/xz/xz.1:878
+#, no-wrap
+msgid "B<--block-size=>I<size>"
+msgstr "B<--block-size=>I<taille>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:891
+msgid ""
+"When compressing to the B<.xz> format, split the input data into blocks of "
+"I<size> 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 ""
+"Lors de la compression dans le format B<.xz>, les données de l'entrée sont "
+"réparties en blocs de I<taille> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:909
+#, fuzzy
+#| msgid ""
+#| "In multi-threaded mode about three times I<size> bytes will be allocated "
+#| "in each thread for buffering input and output. The default I<size> is "
+#| "three times the LZMA2 dictionary size or 1 MiB, whichever is more. "
+#| "Typically a good value is 2-4 times the size of the LZMA2 dictionary or "
+#| "at least 1 MiB. Using I<size> less than the LZMA2 dictionary size is "
+#| "waste of RAM because then the LZMA2 dictionary buffer will never get "
+#| "fully used. The sizes of the blocks are stored in the block headers, "
+#| "which a future version of B<xz> will use for multi-threaded decompression."
+msgid ""
+"In multi-threaded mode about three times I<size> bytes will be allocated in "
+"each thread for buffering input and output. The default I<size> 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<size> less than the LZMA2 dictionary size is waste of RAM "
+"because then the LZMA2 dictionary buffer will never get fully used. The "
+"sizes of the blocks are stored in the block headers, which a future version "
+"of B<xz> will use for multi-threaded decompression."
+msgstr ""
+"En mode multithread, environ trois fois la I<taille> octets seront alloués à "
+"chaque thread pour mettre en mémoire tampon les entrées et sorties. Par "
+"défaut, la I<taille> est trois fois la taille du dictionnaire LZMA2 ou 1 "
+"Mio, en fonction de ce qui convient le mieux. Habituellement, une bonne "
+"valeur est deux à quatre fois la taille du dictionnaire LZMA2 ou au moins 1 "
+"Mio. Utiliser une I<taille> moindre que celle du dictionnaire LZMA2 est un "
+"gaspillage de RAM car alors la mémoire tampon du dictionnaire LZMA2 ne sera "
+"jamais entièrement utilisée. Les tailles des blocs sont stockées dans les en-"
+"têtes de blocs, qui seront utilisés dans une future version de B<xz> pour la "
+"décompression multithreadée."
+
+#. type: Plain text
+#: ../src/xz/xz.1:918
+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 a future version of B<xz> won't be able decompress the files in "
+"multi-threaded mode."
+msgstr ""
+"Par défaut, il n'y a pas de répartition de bloc en mode mono-thread. Régler "
+"cette option n'affecte pas l'utilisation de la mémoire. Aucune information "
+"de taille n'est stockée dans l'en-tête de bloc, par conséquent les fichiers "
+"créés en mode single-thread ne seront pas identiques aux fichiers créés en "
+"mode multi-thread. Le manque d'information de taille signifie aussi qu'une "
+"future version de B<xz> ne sera pas capable de décompresser les fichiers en "
+"mode multi-thread."
+
+#. type: TP
+#: ../src/xz/xz.1:918
+#, no-wrap
+msgid "B<--block-list=>I<sizes>"
+msgstr "B<--block-list=>I<tailles>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:924
+msgid ""
+"When compressing to the B<.xz> format, start a new block after the given "
+"intervals of uncompressed data."
+msgstr ""
+"Lors de la compression dans le format B<.xz>, commencer un nouveau bloc "
+"après les intervalles donnés des données non compressées."
+
+#. type: Plain text
+#: ../src/xz/xz.1:930
+msgid ""
+"The uncompressed I<sizes> of the blocks are specified as a comma-separated "
+"list. Omitting a size (two or more consecutive commas) is a shorthand to "
+"use the size of the previous block."
+msgstr ""
+"Les I<tailles> non-compressées des blocs sont spécifiées sous forme de liste "
+"séparée par des virgules. Omettre une taille (deux ou plus virgules "
+"consécutives) est un raccourci pour utiliser la taille du bloc précédent."
+
+#. type: Plain text
+#: ../src/xz/xz.1:940
+msgid ""
+"If the input file is bigger than the sum of I<sizes>, the last value in "
+"I<sizes> is repeated until the end of the file. A special value of B<0> may "
+"be used as the last value to indicate that the rest of the file should be "
+"encoded as a single block."
+msgstr ""
+"Si le fichier en entrée est plus grand que la somme des I<tailles>, la "
+"dernière valeur est répétée jusqu'à la fin du fichier. Une valeur spéciale "
+"de B<0> peut être utilisée comme étant la dernière valeur pour indiquer que "
+"le reste du fichier devrait être encodé comme un simple bloc."
+
+#. type: Plain text
+#: ../src/xz/xz.1:955
+msgid ""
+"If one specifies I<sizes> that exceed the encoder's block size (either the "
+"default value in threaded mode or the value specified with B<--block-"
+"size=>I<size>), the encoder will create additional blocks while keeping the "
+"boundaries specified in I<sizes>. 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 ""
+"Si on spécifie des I<tailles> qui excèdent la taille du bloc de l'encodeur "
+"(soit la valeur en mode threadé, soit la valeur spécifiée avec B<--block-"
+"size=>I<taille>), l'encodeur créera des blocs supplémentaires tout en "
+"gardant les limites indiquées dans I<tailles>. Par exemple, si on indique "
+"B<--block-size=10MiB>B<--block-list=5MiB,10MiB,8MiB,12MiB,24MiB> et que le "
+"fichier fait 80Mio, on aura 11 blocs de 5, 10, 8, 2, 10, 10, 4, 10, 10, et "
+"1 Mio."
+
+#. type: Plain text
+#: ../src/xz/xz.1:961
+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 ""
+"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é."
+
+#. type: TP
+#: ../src/xz/xz.1:961
+#, no-wrap
+msgid "B<--flush-timeout=>I<timeout>"
+msgstr "B<--flush-timeout=>I<temps_d'attente>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:978
+msgid ""
+"When compressing, if more than I<timeout> 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<xz> is used to compress data that is "
+"streamed over a network. Small I<timeout> values make the data available at "
+"the receiving end with a small delay, but large I<timeout> values give "
+"better compression ratio."
+msgstr ""
+"Lors de la compression, si plus que I<temps_d'attente> 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 B<xz> est utilisé pour compresser les données qui sont diffusées "
+"sur un réseau. Des petites valeurs de I<temps_d'attente> rendent les données "
+"disponibles à l'extrémité réceptrice avec un léger retard, mais les grandes "
+"valeurs de I<temps_d'attente> donnent un meilleur taux de compression."
+
+#. type: Plain text
+#: ../src/xz/xz.1:986
+msgid ""
+"This feature is disabled by default. If this option is specified more than "
+"once, the last one takes effect. The special I<timeout> value of B<0> can "
+"be used to explicitly disable this feature."
+msgstr ""
+"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 "
+"I<temps_d'attente> de B<0> peut être utilisée pour explicitement désactiver "
+"cette option."
+
+#. type: Plain text
+#: ../src/xz/xz.1:988
+msgid "This feature is not available on non-POSIX systems."
+msgstr ""
+"Cette option n'est pas disponible sur les systèmes qui ne sont pas POSIX."
+
+#. FIXME
+#. type: Plain text
+#: ../src/xz/xz.1:996
+msgid ""
+"B<This feature is still experimental.> Currently B<xz> is unsuitable for "
+"decompressing the stream in real time due to how B<xz> does buffering."
+msgstr ""
+"B<Cette option est encore expérimentale.> Actuellement, B<xz> ne convient "
+"pas pour décompresser le flux en temps réel en raison de la façon dont B<xz> "
+"effectue la mise en mémoire tampon."
+
+#. type: TP
+#: ../src/xz/xz.1:996
+#, no-wrap
+msgid "B<--memlimit-compress=>I<limit>"
+msgstr "B<--memlimit-compress=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1001
+msgid ""
+"Set a memory usage limit for compression. If this option is specified "
+"multiple times, the last one takes effect."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1014
+#, fuzzy
+#| msgid ""
+#| "If the compression settings exceed the I<limit>, B<xz> will adjust the "
+#| "settings downwards so that the limit is no longer exceeded and display a "
+#| "notice that automatic adjustment was done. Such adjustments are not made "
+#| "when compressing with B<--format=raw> or if B<--no-adjust> has been "
+#| "specified. In those cases, an error is displayed and B<xz> will exit "
+#| "with exit status 1."
+msgid ""
+"If the compression settings exceed the I<limit>, B<xz> 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<limit>, and finally reducing the LZMA2 dictionary size."
+msgstr ""
+"Si les paramètres de compression dépassent la I<limite>, B<xz> ajustera les "
+"paramètres à la baisse pour que la limite ne soit plus dépassée et affichera "
+"un avis indiquant que l'ajustement automatique a été effectué. De tels "
+"ajustements ne sont pas effectués lors de la compression avec B<--"
+"format=raw> ou si B<--no-adjust> a été spécifié. Dans ces cas, une erreur "
+"est affichée et B<xz> se termine avec l'état de sortie B<1>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1022
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1029
+msgid ""
+"If the I<limit> cannot be met even with the adjustments described above, an "
+"error is displayed and B<xz> will exit with exit status 1."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1033
+msgid "The I<limit> can be specified in multiple ways:"
+msgstr "La I<limite> peut être indiquée de plusieurs façons :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1043
+msgid ""
+"The I<limit> can be an absolute value in bytes. Using an integer suffix "
+"like B<MiB> can be useful. Example: B<--memlimit-compress=80MiB>"
+msgstr ""
+"La I<limite> peut être une valeur absolue en octets. Utiliser un suffixe "
+"d'entier comme B<MiB> peut être utile. Exemple : B<--memlimit-compress=80MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1055
+msgid ""
+"The I<limit> can be specified as a percentage of total physical memory "
+"(RAM). This can be useful especially when setting the B<XZ_DEFAULTS> "
+"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 ""
+"La I<limite> 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 B<XZ_DEFAULTS> 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 : B<--memlimit=70%>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1065
+#, fuzzy
+#| msgid ""
+#| "The I<limit> can be reset back to its default value by setting it to "
+#| "B<0>. This is currently equivalent to setting the I<limit> to B<max> (no "
+#| "memory usage limit). Once multithreading support has been implemented, "
+#| "there may be a difference between B<0> and B<max> for the multithreaded "
+#| "case, so it is recommended to use B<0> instead of B<max> until the "
+#| "details have been decided."
+msgid ""
+"The I<limit> can be reset back to its default value by setting it to B<0>. "
+"This is currently equivalent to setting the I<limit> to B<max> (no memory "
+"usage limit)."
+msgstr ""
+"La I<limite> peut être réinitialisée à sa valeur par défaut en la réglant "
+"sur B<0>. Cela équivaut actuellement à régler la I<limite> sur B<max> "
+"(aucune limite d'utilisation de la mémoire). Quand la prise en charge du "
+"mode multi-thread (multi-threading) sera implémentée, il devrait y avoir une "
+"différence entre B<0> et B<max> en mode multithreadé, il est donc recommandé "
+"d'utiliser B<0> au lieu de B<max> tant que les détails n'ont pas été décidés."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1089
+#, fuzzy
+#| msgid ""
+#| "For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+#| "B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. (The values B<0> "
+#| "and B<max> 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 while hopefully doing no harm in other "
+#| "situations."
+msgid ""
+"For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+"B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. On MIPS32 B<2000\\ "
+"MiB> is used instead. (The values B<0> and B<max> 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 ""
+"Pour le B<xz> en 32 bits, il y a un cas particulier : si la I<limite> est "
+"supérieure à B<4020\\Mio>, elle est rabaissée à B<4020\\Mio>. (Les valeurs "
+"B<0> et B<max> ne sont pas affectées par cela. Il n'y a pas d'option "
+"similaire pour la décompression). Celà peut s'avérer utile lorsqu'un "
+"exécutable 32-bits a accès à un espace d'adresse de 4\\ Gio sans s'avérer "
+"néfaste dans les autres situations. "
+
+#. type: Plain text
+#: ../src/xz/xz.1:1092
+msgid "See also the section B<Memory usage>."
+msgstr "Voir aussi la section B<utilisation de la mémoire>."
+
+#. type: TP
+#: ../src/xz/xz.1:1092
+#, no-wrap
+msgid "B<--memlimit-decompress=>I<limit>"
+msgstr "B<--memlimit-decompress=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1106
+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<limit>, "
+"B<xz> will display an error and decompressing the file will fail. See B<--"
+"memlimit-compress=>I<limit> for possible ways to specify the I<limit>."
+msgstr ""
+"Régler une limite d'utilisation de la mémoire pour la décompression. Cela a "
+"un effet sur le mode B<--list>. Si l'opération n'est pas possible sans "
+"dépasser la I<limite>, B<xz> affichera une erreur et la décompression "
+"échouera. Voir B<--memlimit-compress=>I<limite> pour les manières possibles "
+"d'indiquer la I<limite>."
+
+#. type: TP
+#: ../src/xz/xz.1:1106
+#, fuzzy, no-wrap
+#| msgid "B<--memlimit-decompress=>I<limit>"
+msgid "B<--memlimit-mt-decompress=>I<limit>"
+msgstr "B<--memlimit-decompress=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1128
+msgid ""
+"Set a memory usage limit for multi-threaded decompression. This can only "
+"affect the number of threads; this will never make B<xz> refuse to "
+"decompress a file. If I<limit> is too low to allow any multi-threading, the "
+"I<limit> is ignored and B<xz> 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<limit> for "
+"multi-threading will never be higher than the limit set with B<--memlimit-"
+"decompress>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1135
+msgid ""
+"In contrast to the other memory usage limit options, B<--memlimit-mt-"
+"decompress=>I<limit> has a system-specific default I<limit>. B<xz --info-"
+"memory> can be used to see the current value."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1151
+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<limit> is too low on your system, "
+"feel free to increase the I<limit> but never set it to a value larger than "
+"the amount of usable RAM as with appropriate input files B<xz> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1163
+msgid ""
+"See B<--memlimit-compress=>I<limit> for possible ways to specify the "
+"I<limit>. Setting I<limit> to B<0> resets the I<limit> to the default "
+"system-specific value."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1163
+#, no-wrap
+msgid "B<-M> I<limit>, B<--memlimit=>I<limit>, B<--memory=>I<limit>"
+msgstr "B<-M> I<limite>, B<--memlimit=>I<limite>, B<--memory=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1169
+#, fuzzy
+#| msgid ""
+#| "This is equivalent to specifying B<--memlimit-compress=>I<limit >B<--"
+#| "memlimit-decompress=>I<limit>."
+msgid ""
+"This is equivalent to specifying B<--memlimit-compress=>I<limit> B<--"
+"memlimit-decompress=>I<limit> B<--memlimit-mt-decompress=>I<limit>."
+msgstr ""
+"C'est équivalent à indiquer B<--memlimit-compress=>I<limite>B<--memlimit-"
+"decompress=>I<limite>."
+
+#. type: TP
+#: ../src/xz/xz.1:1169
+#, no-wrap
+msgid "B<--no-adjust>"
+msgstr "B<--no-adjust>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1179
+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<xz> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1182
+msgid ""
+"Automatic adjusting is always disabled when creating raw streams (B<--"
+"format=raw>)."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1182
+#, no-wrap
+msgid "B<-T> I<threads>, B<--threads=>I<threads>"
+msgstr "B<-T> I<threads>, B<--threads=>I<threads>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1197
+#, fuzzy
+#| msgid ""
+#| "Specify the number of worker threads to use. Setting I<threads> to a "
+#| "special value B<0> makes B<xz> use as many threads as there are CPU cores "
+#| "on the system. The actual number of threads can be less than I<threads> "
+#| "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."
+msgid ""
+"Specify the number of worker threads to use. Setting I<threads> to a "
+"special value B<0> makes B<xz> use up to as many threads as the processor(s) "
+"on the system support. The actual number of threads can be fewer than "
+"I<threads> 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 ""
+"Indiquer le nombre de threads à utiliser. Régler I<threads> à la valeur "
+"spéciale B<0> fait que B<xz> utilisera autant de threads qu'il y a de cœurs "
+"de CPU sur le système. Le nombre effectif de threads peut être moins que "
+"I<threads> si le fichier en entrée n'est pas assez gros pour la threading "
+"avec les réglages donnés ou si l'utilisation de plusieurs threads "
+"dépasserait la limite d'utilisation mémoire."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1216
+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<threads> to B<1> will use the single-threaded "
+"mode. Setting I<threads> to any other value, including B<0>, will use the "
+"multi-threaded compressor even if the system supports only one hardware "
+"thread. (B<xz> 5.2.x used single-threaded mode in this situation.)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1235
+msgid ""
+"To use multi-threaded mode with only one thread, set I<threads> to B<+1>. "
+"The B<+> prefix has no effect with values other than B<1>. A memory usage "
+"limit can still make B<xz> switch to single-threaded mode unless B<--no-"
+"adjust> is used. Support for the B<+> prefix was added in B<xz> 5.4.0."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1250
+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<xz> from compressing or decompressing. This default soft "
+"limit will not make B<xz> switch from multi-threaded mode to single-threaded "
+"mode. The active limits can be seen with B<xz --info-memory>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1257
+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<size> option."
+msgstr ""
+"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 B<--block-size=>I<taille>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1265
+#, fuzzy
+#| msgid ""
+#| "Threaded decompression hasn't been implemented yet. It will only work on "
+#| "files that contain multiple blocks with size information in block "
+#| "headers. All files compressed in multi-threaded mode meet this "
+#| "condition, but files compressed in single-threaded mode don't even if B<--"
+#| "block-size=>I<size> is used."
+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<size> has been used."
+msgstr ""
+"La décompression threadée n'a pas encore été implémentée. Cela ne "
+"fonctionnera qu'avec des fichiers contenant de multiples blocs avec une "
+"information sur la taille dans les en-têtes de bloc. Tous les fichiers "
+"compressés en mode multithread sattisfont cette condition, mais pas les "
+"fichiers compressés en mode single-thread même si l'option B<--block-"
+"size=>I<taille> est utilisée."
+
+#. type: SS
+#: ../src/xz/xz.1:1266 ../src/xz/xz.1:2819
+#, no-wrap
+msgid "Custom compressor filter chains"
+msgstr "Chaînes de filtres de compresseur personnalisées"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1282
+#, fuzzy
+#| 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."
+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 ""
+"Une chaîne de filtres personnalisée permet d'indiquer les réglages de la "
+"compression en détail au lieu de recourir aux préréglages. Lorsque une "
+"chaîne de filtres personnalisée est indiquée, les options préréglées (B<0> à "
+"B<9> et B<--extreme>) précédement sur la ligne de commande sont oubliées. Si "
+"une option de préréglage est indiquée après une ou plusieurs options de "
+"chaîne de filtre personnalisée, le nouveau préréglage prend effet et les "
+"options de la chaîne de filtres personnalisée précédement indiquée sont "
+"oubliées."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1289
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1297
+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 ""
+"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é. "
+
+#. type: Plain text
+#: ../src/xz/xz.1:1305
+msgid ""
+"A custom filter chain is specified by using one or more filter options in "
+"the order they are wanted in the filter chain. That is, the order of filter "
+"options is significant! When decoding raw streams (B<--format=raw>), the "
+"filter chain is specified in the same order as it was specified when "
+"compressing."
+msgstr ""
+"Une chaîne de filtres personnalisée est indiquée en utilisant une ou "
+"plusieurs options de filtre dans l'ordre où elles sont souhaitées dans la "
+"chaîne de filtres. Cela fait, l'ordre des options de filtre est "
+"significatif! Lors du décodage des flux bruts (B<--format=raw>), le filtre "
+"de chaîne est indiqué dans le même ordre qu'il fût indiqué lors de la "
+"compression."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1314
+msgid ""
+"Filters take filter-specific I<options> as a comma-separated list. Extra "
+"commas in I<options> are ignored. Every option has a default value, so you "
+"need to specify only those you want to change."
+msgstr ""
+"Les filtres prennent des I<options> spécifiques aux filtres sous la forme "
+"d'une liste séparée par des virgules. Les virgules supplémentaires dans les "
+"I<options> sont ignorées. Toutes les options ont une valeur par défaut, donc "
+"vous ne devez indiquer que celles que vous voulez changer."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1323
+msgid ""
+"To see the whole filter chain and I<options>, use B<xz -vv> (that is, use "
+"B<--verbose> twice). This works also for viewing the filter chain options "
+"used by presets."
+msgstr ""
+"Pour voir l'entièreté de la chaîne de filtres et ses I<options>, utilisez "
+"B<xz -vv> (ce qui est comme utiliser B<--verbose> deux fois). Cela "
+"fonctionne aussi pour voir les options de chaîne de filtres utilisées par "
+"les préréglages."
+
+#. type: TP
+#: ../src/xz/xz.1:1323
+#, no-wrap
+msgid "B<--lzma1>[B<=>I<options>]"
+msgstr "B<--lzma1>[B<=>I<options>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1326
+#, no-wrap
+msgid "B<--lzma2>[B<=>I<options>]"
+msgstr "B<--lzma2>[B<=>I<options>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1331
+msgid ""
+"Add LZMA1 or LZMA2 filter to the filter chain. These filters can be used "
+"only as the last filter in the chain."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1343
+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 est un filtre historique, qui n'est pris en charge presque uniquement "
+"à cause de l'ancien format de fichier B<.lzma>, 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 B<xz> utilise LZMA2 et ne prend pas "
+"du tout en charge LZMA1. Les taux et vitesses de compression de LZMA1 et "
+"LZMA2 sont pratiquement identiques."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1346
+msgid "LZMA1 and LZMA2 share the same set of I<options>:"
+msgstr "LZMA1 et LZMA2 partagent le même ensemble d'I<options> :"
+
+#. type: TP
+#: ../src/xz/xz.1:1347
+#, no-wrap
+msgid "B<preset=>I<preset>"
+msgstr "B<preset=>I<préréglage>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1374
+#, fuzzy
+#| msgid ""
+#| "Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+#| "matches B<--extreme>. If no B<preset> is specified, the default values "
+#| "of LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgid ""
+"Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+"matches B<--extreme>. If no B<preset> is specified, the default values of "
+"LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgstr ""
+"Réinitialiser toutes les I<options> de LZMA1 ou de LZMA2 à I<préréglage>. "
+"I<préréglage> consiste en un entier, qui peut être suivi de modificateurs de "
+"préréglage à une lettre. L'entier peut être de B<0> à B<9>, correspondant "
+"aux options B<-0> à B<-9> de la ligne de commandes. Le seul modificateur "
+"pris en charge est actuellement B<e>, qui correspond à B<--extreme>. Si "
+"B<preset> n'est pas indiqué, Les valeurs par défaut des I<options> LZMA1 ou "
+"LZMA2 sont prises du préréglage B<6>."
+
+#. type: TP
+#: ../src/xz/xz.1:1374
+#, no-wrap
+msgid "B<dict=>I<size>"
+msgstr "B<dict=>I<taille>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1389
+msgid ""
+"Dictionary (history buffer) I<size> 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<size> usually improves compression ratio, but a "
+"dictionary bigger than the uncompressed file is waste of memory."
+msgstr ""
+"La I<taille> 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 I<taille> du "
+"dictionnaire augmente habituellement le taux de compression, mais un "
+"dictionnaire plus gros que le fichier non compressé est un gachis de mémoire."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1398
+msgid ""
+"Typical dictionary I<size> 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 ""
+"Généralement la I<taille> du dictionnaire est entre 64\\ Kio et 64\\ Mio. Le "
+"minimum étant 4\\ Kio. La I<taille> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1425
+msgid ""
+"Dictionary I<size> and match finder (I<mf>) together determine the memory "
+"usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary "
+"I<size> 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<size> either as "
+"2^I<n> or 2^I<n> + 2^(I<n>-1), so these I<sizes> are somewhat preferred for "
+"compression. Other I<sizes> will get rounded up when stored in the B<.xz> "
+"headers."
+msgstr ""
+"La I<taille> du dictionnaire et le chercheur de correspondance (match "
+"finder) (I<mf>) déterminent ensemble l'utilisation de la mémoire de "
+"l'encodeur LZMA1 ou LZMA2. La même (ou une plus grosse) I<taille> 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 B<.xz> stockent la I<taille> de dictionnaire sous la forme 2^I<n> ou "
+"2^I<n> + 2^(I<n>-1), de sorte que ces I<tailles> sont quelque peu préférées "
+"pour la compression. Les autres I<tailles> seront arrondies à la hausse "
+"lorsque stockées dans les en-têtes de B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:1425
+#, no-wrap
+msgid "B<lc=>I<lc>"
+msgstr "B<lc=>I<lc>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1434
+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<lc> and I<lp> "
+"must not exceed 4."
+msgstr ""
+"Spécifiez le nombre d'octets de contexte littéraux. Le minimum est B<0> et "
+"le maximum est B<4>. La valeur par défaut est B<3>. En plus, la somme de "
+"I<lc> et I<lp> ne doit pas excéder B<4>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1439
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1453
+#, fuzzy
+#| msgid ""
+#| "The literal coding makes an assumption that the highest I<lc> bits of the "
+#| "previous uncompressed byte correlate with the next byte. E.g. 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<lc> is at "
+#| "least 3, the literal coding can take advantage of this property in the "
+#| "uncompressed data."
+msgid ""
+"The literal coding makes an assumption that the highest I<lc> 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<lc> is at least "
+"3, the literal coding can take advantage of this property in the "
+"uncompressed data."
+msgstr ""
+"Le codage littéral part du principe que les bits I<lc> les plus élevés de "
+"l'octet décompressé précédent sont en corrélation avec l'octet suivant. Par "
+"exemple dans un texte anglais typique, une lettre majuscule est souvent "
+"suivie d'une lettre minuscule, et une lettre minuscule est généralement "
+"suivie d'une autre lettre minuscule. Dans le jeu de caractères US-ASCII, les "
+"trois bits les plus haut sont 010 pour les lettres majuscules et 011 pour "
+"les minuscules. Lorsque I<lc> est au final B<3>, le codage littéral peut "
+"tirer avantage de cette propriété dans les données décompressées."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1462
+#, fuzzy
+#| msgid ""
+#| "The default value (3) is usually good. If you want maximum compression, "
+#| "test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+#| "compression worse. If it makes it worse, test e.g.\\& B<lc=2> too."
+msgid ""
+"The default value (3) is usually good. If you want maximum compression, "
+"test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+"compression worse. If it makes it worse, test B<lc=2> too."
+msgstr ""
+"La valeur par défaut (3) est généralement la bonne. Si vous voulez une "
+"compression maximale, essayez B<lc=4>. Cela aide parfois un petit peu, et "
+"parfois cela empire la compression. Si cela l'empire, essayez par exemple\\& "
+"B<lc=2> aussi."
+
+#. type: TP
+#: ../src/xz/xz.1:1462
+#, no-wrap
+msgid "B<lp=>I<lp>"
+msgstr "B<lp=>I<lp>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1466
+msgid ""
+"Specify the number of literal position bits. The minimum is 0 and the "
+"maximum is 4; the default is 0."
+msgstr ""
+"Indiquer le nombre de bits de position littérale. Le minimum est B<0> et le "
+"maximum B<4>; par défaut c'est B<0>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1473
+msgid ""
+"I<Lp> affects what kind of alignment in the uncompressed data is assumed "
+"when encoding literals. See I<pb> below for more information about "
+"alignment."
+msgstr ""
+"I<Lp> affecte le type d'alignement dans les données décompressées qui est "
+"présumé lors de l'encodage des littéraux. Voir I<pb> ci dessous pour plus "
+"d'information sur l'alignement."
+
+#. type: TP
+#: ../src/xz/xz.1:1473
+#, no-wrap
+msgid "B<pb=>I<pb>"
+msgstr "B<pb=>I<pb>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1477
+msgid ""
+"Specify the number of position bits. The minimum is 0 and the maximum is 4; "
+"the default is 2."
+msgstr ""
+"Indiquer le nombre de bits de position. Le minimum est B<0> et le maximum "
+"B<4>; par défaut B<2>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1484
+msgid ""
+"I<Pb> affects what kind of alignment in the uncompressed data is assumed in "
+"general. The default means four-byte alignment (2^I<pb>=2^2=4), which is "
+"often a good choice when there's no better guess."
+msgstr ""
+"I<Pb> 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^I<pb>=2^2=4), ce qui est généralement un bon choix lorsqu'il n'y a pas de "
+"meilleure estimation."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1498
+#, fuzzy
+#| msgid ""
+#| "When the aligment is known, setting I<pb> accordingly may reduce the file "
+#| "size a little. E.g. with text files having one-byte alignment (US-ASCII, "
+#| "ISO-8859-*, UTF-8), setting B<pb=0> can improve compression slightly. "
+#| "For UTF-16 text, B<pb=1> is a good choice. If the alignment is an odd "
+#| "number like 3 bytes, B<pb=0> might be the best choice."
+msgid ""
+"When the alignment is known, setting I<pb> 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<pb=0> can improve compression "
+"slightly. For UTF-16 text, B<pb=1> is a good choice. If the alignment is "
+"an odd number like 3 bytes, B<pb=0> might be the best choice."
+msgstr ""
+"Quand l'alignement est connu, régler en conséquence I<pb> pourrait réduire "
+"un peu la taille du fichier. Par ex. avec les fichiers texte ayant un "
+"alignement d'un octet (US-ASCII, ISO-8859-*, UTF-8), indiquer B<pb=0> peut "
+"légèrement améliorer la compression. Pour les textes UTF-16, B<pb=1> est un "
+"bon choix. Si l'alignement est un nombre impair comme 3 octets, B<pb=0> "
+"pourrait être le meilleur choix."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1506
+msgid ""
+"Even though the assumed alignment can be adjusted with I<pb> and I<lp>, "
+"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 ""
+"Même si l'alignement présumé peut être ajusté avec I<pb> et I<lp>, 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."
+
+#. type: TP
+#: ../src/xz/xz.1:1506
+#, no-wrap
+msgid "B<mf=>I<mf>"
+msgstr "B<mf=>I<mf>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1521
+#, fuzzy
+#| 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<preset>: 0 uses "
+#| "B<hc3>, 1-3 use B<hc4>, and the rest use B<bt4>."
+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<preset>: 0 uses B<hc3>, "
+"1\\(en3 use B<hc4>, and the rest use B<bt4>."
+msgstr ""
+"La recherche de correspondance a un effet important sur la vitesse de "
+"l'encodeur, l'utilisation de la mémoire et le taux de compression. En "
+"général, les chercheurs de correspondance de chaîne de hachage sont plus "
+"rapides que les chercheurs de correspondance d'un arbre binaire. Par défaut, "
+"cela dépend du I<préréglage> : B<0> utilise B<hc3>, B<1-3> utilise B<hc4>, "
+"et le reste utilise B<bt4>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1527
+msgid ""
+"The following match finders are supported. The memory usage formulas below "
+"are rough approximations, which are closest to the reality when I<dict> is a "
+"power of two."
+msgstr ""
+"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 I<dict> est une puissance de "
+"deux."
+
+#. type: TP
+#: ../src/xz/xz.1:1528
+#, no-wrap
+msgid "B<hc3>"
+msgstr "B<hc3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1531
+msgid "Hash Chain with 2- and 3-byte hashing"
+msgstr "Chaîne de hachage avec hachage de 2 et 3 octets"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1535 ../src/xz/xz.1:1584
+msgid "Minimum value for I<nice>: 3"
+msgstr "Valeur minimale pour I<nice> : B<3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1537 ../src/xz/xz.1:1556 ../src/xz/xz.1:1586
+#: ../src/xz/xz.1:1605
+msgid "Memory usage:"
+msgstr "Utilisation de la mémoire :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1542
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 7.5 (if I<dict> E<lt>= 16 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1547
+msgid "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 5.5 + 64 MiB (si I<dict> E<gt> 16 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1547
+#, no-wrap
+msgid "B<hc4>"
+msgstr "B<hc4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1550
+msgid "Hash Chain with 2-, 3-, and 4-byte hashing"
+msgstr "Chaîne de hachage avec hachage de 2, 3 et 4 octets"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1554 ../src/xz/xz.1:1603
+msgid "Minimum value for I<nice>: 4"
+msgstr "Valeur minimale pour I<nice> : B<4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1561
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 7.5 (si I<dict> E<lt>= 32 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1566
+msgid "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 6.5 (si I<dict> E<gt> 32 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1566
+#, no-wrap
+msgid "B<bt2>"
+msgstr "B<bt2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1569
+msgid "Binary Tree with 2-byte hashing"
+msgstr "Arbre binaire avec hachage de 2 octets"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1573
+msgid "Minimum value for I<nice>: 2"
+msgstr "Valeur minimale pour I<nice> : B<2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1577
+msgid "Memory usage: I<dict> * 9.5"
+msgstr "Utilisation de la mémoire : I<dict> * 9.5"
+
+#. type: TP
+#: ../src/xz/xz.1:1577
+#, no-wrap
+msgid "B<bt3>"
+msgstr "B<bt3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1580
+msgid "Binary Tree with 2- and 3-byte hashing"
+msgstr "Arbre binaire avec hachage de 2 et 3 octets"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1591
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 11.5 (si I<dict> E<lt>= 16 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1596
+msgid "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 9.5 + 64 MiB (si I<dict> E<gt> 16 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1596
+#, no-wrap
+msgid "B<bt4>"
+msgstr "B<bt4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1599
+msgid "Binary Tree with 2-, 3-, and 4-byte hashing"
+msgstr "Arbre binaire avec hachage 2, 3 et 4 octets"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1610
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 11.5 (si I<dict> E<lt>= 32 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1615
+msgid "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 10.5 (si I<dict> E<gt> 32 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1616
+#, no-wrap
+msgid "B<mode=>I<mode>"
+msgstr "B<mode=>I<mode>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1637
+#, fuzzy
+#| msgid ""
+#| "Compression I<mode> specifies the method to analyze the data produced by "
+#| "the match finder. Supported I<modes> are B<fast> and B<normal>. The "
+#| "default is B<fast> for I<presets> 0-3 and B<normal> for I<presets> 4-9."
+msgid ""
+"Compression I<mode> specifies the method to analyze the data produced by the "
+"match finder. Supported I<modes> are B<fast> and B<normal>. The default is "
+"B<fast> for I<presets> 0\\(en3 and B<normal> for I<presets> 4\\(en9."
+msgstr ""
+"Le I<mode> de compression indique la méthode pour analyser les données "
+"produites par le chercheur de correspondance. Les I<modes> pris en charge "
+"sont B<fast> et B<normal>. Par défaut c'est B<fast> pour les I<préréglages> "
+"de B<0> à B<3> et B<normal> pour les préréglages de B<4> à B<9>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1646
+msgid ""
+"Usually B<fast> is used with Hash Chain match finders and B<normal> with "
+"Binary Tree match finders. This is also what the I<presets> do."
+msgstr ""
+"Habituellement, B<fast> est utilisé avec les chercheurs de correspondance de "
+"chaîne de hachage et B<normal> avec les chercheurs de correspondance d'arbre "
+"binaire. C'est aussi ce que font les I<préréglages>."
+
+#. type: TP
+#: ../src/xz/xz.1:1646
+#, no-wrap
+msgid "B<nice=>I<nice>"
+msgstr "B<nice=>I<nice>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1653
+msgid ""
+"Specify what is considered to be a nice length for a match. Once a match of "
+"at least I<nice> bytes is found, the algorithm stops looking for possibly "
+"better matches."
+msgstr ""
+"Spécifier ce qui est considéré comme une bonne longueur pour une "
+"correspondance. Une fois que la correspondance d'au moins I<nice> octets est "
+"trouvée, l'algorithme arrête de chercher de meilleures correspondances "
+"possibles."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1660
+#, fuzzy
+#| msgid ""
+#| "I<Nice> can be 2-273 bytes. Higher values tend to give better "
+#| "compression ratio at the expense of speed. The default depends on the "
+#| "I<preset>."
+msgid ""
+"I<Nice> can be 2\\(en273 bytes. Higher values tend to give better "
+"compression ratio at the expense of speed. The default depends on the "
+"I<preset>."
+msgstr ""
+"I<nice> peut être 2 273 octets. Des valeurs plus élevées ont tendance à "
+"donner un meilleur taux de compression au détriment de la vitesse. La valeur "
+"par défaut dépend du I<préréglage>."
+
+#. type: TP
+#: ../src/xz/xz.1:1660
+#, no-wrap
+msgid "B<depth=>I<depth>"
+msgstr "B<depth=>I<profondeur>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1670
+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<depth> from I<mf> and I<nice>."
+msgstr ""
+"Spécifier la profondeur de recherche maximale dans l'outil de recherche de "
+"correspondances. La valeur par défaut est B<0>, ce qui fait que le "
+"compresseur détermine une I<profondeur> raisonnable en fonction de I<mf> et "
+"I<nice>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1681
+#, fuzzy
+#| msgid ""
+#| "Reasonable I<depth> for Hash Chains is 4-100 and 16-1000 for Binary "
+#| "Trees. Using very high values for I<depth> can make the encoder "
+#| "extremely slow with some files. Avoid setting the I<depth> over 1000 "
+#| "unless you are prepared to interrupt the compression in case it is taking "
+#| "far too long."
+msgid ""
+"Reasonable I<depth> for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary "
+"Trees. Using very high values for I<depth> can make the encoder extremely "
+"slow with some files. Avoid setting the I<depth> over 1000 unless you are "
+"prepared to interrupt the compression in case it is taking far too long."
+msgstr ""
+"Une I<profondeur> raisonnable pour les chaînes de hachage est 4-100 et "
+"16-1000 pour les arbres binaires. Utiliser des valeurs beaucoup plus grandes "
+"pour I<depth> peut rendre l'encodeur extrèmement lent avec quelques "
+"fichiers. Évitez de fixer la I<profondeur> à plus de 1000, sauf si vous êtes "
+"prêt à interrompre la compression au cas où elle prendrait beaucoup trop de "
+"temps."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1692
+msgid ""
+"When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary "
+"I<size>. LZMA1 needs also I<lc>, I<lp>, and I<pb>."
+msgstr ""
+"Lors du décodage des flux bruts (B<--format=raw>), LZMA2 nécessite seulement "
+"la I<taille> du dictionnaire. LZMA1 nécessite aussi I<lc>, I<lp> et I<pb>."
+
+#. type: TP
+#: ../src/xz/xz.1:1692
+#, no-wrap
+msgid "B<--x86>[B<=>I<options>]"
+msgstr "B<--x86>[B<=>I<options>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1695
+#, no-wrap
+msgid "B<--arm>[B<=>I<options>]"
+msgstr "B<--arm>[B<=>I<options>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1697
+#, no-wrap
+msgid "B<--armthumb>[B<=>I<options>]"
+msgstr "B<--armthumb>[B<=>I<options>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1699
+#, fuzzy, no-wrap
+#| msgid "B<--arm>[B<=>I<options>]"
+msgid "B<--arm64>[B<=>I<options>]"
+msgstr "B<--arm>[B<=>I<options>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1701
+#, no-wrap
+msgid "B<--powerpc>[B<=>I<options>]"
+msgstr "B<--powerpc>[B<=>I<options>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1703
+#, no-wrap
+msgid "B<--ia64>[B<=>I<options>]"
+msgstr "B<--ia64>[B<=>I<options>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1705
+#, no-wrap
+msgid "B<--sparc>[B<=>I<options>]"
+msgstr "B<--sparc>[B<=>I<options>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1711
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1725
+#, fuzzy
+#| 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-15\\ % 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."
+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 ""
+"Un filtre BCJ convertit les adresses relatives du code machine en leurs "
+"équivalents absolus. Cela ne change pas la taille des données, mais évite "
+"les redondances, ce qui peut aider LZMA2 à produire un fichier B<.xz> 0 à "
+"15\\ % plus petit. Les filtres BCJ sont toujours réversibles, ce qui fait "
+"qu'utiliser un filtre BCJ pour le mauvais type de données n'occasionne pas "
+"de perte de données, même si ça pourrait empirer légèrement le taux de "
+"compression."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1728
+msgid "These BCJ filters have known problems related to the compression ratio:"
+msgstr ""
+"Ces filtres BCJ présentent des problèmes connus liés au taux de compression :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1735
+#, fuzzy
+#| msgid ""
+#| "Some types of files containing executable code (e.g. 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."
+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 ""
+"Quelques types de fichier contiennent du code exécutable (par exemple les "
+"fichiers objet, les bibliothèques statiques et les modules du noyau Linux) "
+"ont rempli les adresses dans les instructions avec des valeurs de "
+"remplissage. Ces filtres BCJ feront toujours la conversion d'adresse, ce qui "
+"pourrait péjorer la compression avec ces fichiers."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1745
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1750
+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:1757
+#, no-wrap
+msgid "Filter"
+msgstr "Filtre"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Alignment"
+msgstr "Alignement"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Notes"
+msgstr "Notes"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "x86"
+msgstr "x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "32-bit or 64-bit x86"
+msgstr "32 bits ou 64 bits x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1759
+#, no-wrap
+msgid "ARM"
+msgstr "ARM"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1760
+#, no-wrap
+msgid "ARM-Thumb"
+msgstr "ARM-Thumb"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "ARM64"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "4096-byte alignment is best"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "PowerPC"
+msgstr "PowerPC"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "Big endian only"
+msgstr "Grand boutiste seulement"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "IA-64"
+msgstr "IA-64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "16"
+msgstr "16"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "Itanium"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1764
+#, no-wrap
+msgid "SPARC"
+msgstr "SPARC"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1781
+#, fuzzy
+#| 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. For example, with the "
+#| "IA-64 filter, it's good to set B<pb=4> with LZMA2 (2^4=16). The x86 "
+#| "filter is an exception; it's usually good to stick to LZMA2's default "
+#| "four-byte alignment when compressing x86 executables."
+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. For example, with the IA-64 "
+"filter, it's good to set B<pb=4> or even B<pb=4,lp=4,lc=0> with LZMA2 "
+"(2^4=16). The x86 filter is an exception; it's usually good to stick to "
+"LZMA2's default four-byte alignment when compressing x86 executables."
+msgstr ""
+"Dans la mesure où les données filtrées par BCJ sont généralement compressées "
+"avec LZMA2, le taux de compression peut être légèrement amélioré si les "
+"options de LZMA2 sont indiquées pour la correspondance d'alignement du "
+"filtre BCJ sélectionné. Par exemple, avec le filtre IA-64, il est bon "
+"d'indiquer B<pb=4> avec LZMA2 (2^4=16). Le filtre x86 est une exception ; il "
+"est généralement approprié de coller à l'alignement quatre octets par défaut "
+"de LZMA2 lors de la compression d'exécutables x86. "
+
+#. type: Plain text
+#: ../src/xz/xz.1:1784
+msgid "All BCJ filters support the same I<options>:"
+msgstr "Tous les filtres BCJ prennent en charge les mêmes I<options> :"
+
+#. type: TP
+#: ../src/xz/xz.1:1785
+#, no-wrap
+msgid "B<start=>I<offset>"
+msgstr "B<start=>I<décalage>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1799
+msgid ""
+"Specify the start I<offset> that is used when converting between relative "
+"and absolute addresses. The I<offset> 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<offset> is almost never useful."
+msgstr ""
+"Spécifier le I<décalage> de départ qui est utilisé lors de la conversion "
+"entre les adresses relatives et absolues. Le I<décalage> 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 "
+"I<décalage> personnalisé est la plupart du temps inutile."
+
+#. type: TP
+#: ../src/xz/xz.1:1800
+#, no-wrap
+msgid "B<--delta>[B<=>I<options>]"
+msgstr "B<--delta>[B<=>I<options>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1805
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1814
+#, fuzzy
+#| msgid ""
+#| "Currently only simple byte-wise delta calculation is supported. It can "
+#| "be useful when compressing e.g. 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 e.g. with B<flac>(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<flac>(1)."
+msgstr ""
+"Actuellement, seul le calcul simple du delta par octet est pris en charge. "
+"Il peut être utile lors de la compression, par exemple, des images bitmap "
+"non compressées ou de l'audio PCM non compressé. Toutefois, des algorithmes "
+"spécialisés peuvent donner des résultats nettement supérieurs à ceux de "
+"Delta + de LZMA2. Cela est spécialement vrai avec le son qui est compressé "
+"plus vite et mieux par exemple avec B<flac>(1)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1817
+msgid "Supported I<options>:"
+msgstr "I<options> prises en charge :"
+
+#. type: TP
+#: ../src/xz/xz.1:1818
+#, no-wrap
+msgid "B<dist=>I<distance>"
+msgstr "B<dist=>I<distance>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1826
+#, fuzzy
+#| msgid ""
+#| "Specify the I<distance> of the delta calculation in bytes. I<distance> "
+#| "must be 1-256. The default is 1."
+msgid ""
+"Specify the I<distance> of the delta calculation in bytes. I<distance> must "
+"be 1\\(en256. The default is 1."
+msgstr ""
+"Indiquer la I<distance> du calcul delta en octets. La I<distance> doit être "
+"comprise entre 1 et 256. La valeur par défaut est 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1831
+msgid ""
+"For example, with B<dist=2> 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 ""
+"Par exemple, avec B<dist=2> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:1833
+#, no-wrap
+msgid "Other options"
+msgstr "Autres options"
+
+#. type: TP
+#: ../src/xz/xz.1:1834 ../src/xzdec/xzdec.1:83
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr "B<-q>, B<--quiet>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1841
+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 ""
+"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é."
+
+#. type: TP
+#: ../src/xz/xz.1:1841
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr "B<-v>, B<--verbose>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1850
+msgid ""
+"Be verbose. If standard error is connected to a terminal, B<xz> will "
+"display a progress indicator. Specifying B<--verbose> twice will give even "
+"more verbose output."
+msgstr ""
+"Être bavard. Si l'erreur standard est connectée à un terminal, B<xz> "
+"affichera une barre de progression. Indiquer B<--verbose> deux fois donnera "
+"une sortie encore plus bavarde."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1852
+msgid "The progress indicator shows the following information:"
+msgstr "La barre de progression montre l'information suivante :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1857
+msgid ""
+"Completion percentage is shown if the size of the input file is known. That "
+"is, the percentage cannot be shown in pipes."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1860
+msgid ""
+"Amount of compressed data produced (compressing) or consumed "
+"(decompressing)."
+msgstr ""
+"Quantité de données compressées produites (compression) ou consommées "
+"(décompression)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1863
+msgid ""
+"Amount of uncompressed data consumed (compressing) or produced "
+"(decompressing)."
+msgstr ""
+"Quantité de données non compressées consommées (compression) ou produites "
+"(décompression)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1867
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1874
+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<xz> started "
+"processing the file."
+msgstr ""
+"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 B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1876
+msgid "Elapsed time in the format M:SS or H:MM:SS."
+msgstr "Temps écoulé dans le format M:SS ou H:MM:SS."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1884
+#, fuzzy
+#| 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<xz> started "
+#| "processing the file. The time is shown in a less precise format which "
+#| "never has any colons, e.g. 2 min 30 s."
+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<xz> 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 ""
+"Le temps estimé restant n'est montré que lorsque la taille du fichier en "
+"entrée est connu et que quelques secondes se sont écoulées depuis que B<xz> "
+"a commencé à traiter le fichier. Le temps est montré dans un format moins "
+"précis qui n'a jamais de deux-point(B<:>), par exemple 2 min 30 s."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1899
+#, fuzzy
+#| msgid ""
+#| "When standard error is not a terminal, B<--verbose> will make B<xz> 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, e.g. due to user interruption, also the "
+#| "completion percentage is printed if the size of the input file is known."
+msgid ""
+"When standard error is not a terminal, B<--verbose> will make B<xz> 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 ""
+"Lorsque l'erreur standard n'est pas un terminal, B<--verbose> fera écrire à "
+"B<xz> le nom de fichier, la taille compressée, la taille décompressée, le "
+"taux de compression, et éventuellement aussi la vitesse et le temps écoulé "
+"sur une seule ligne de l'erreur standard après avoir compressé ou "
+"décompressé le fichier. La vitesse et le temps écoulé sont inclus seulement "
+"lorsque l'opération ne prend pas plus que quelques secondes. Si l'opération "
+"n'a pas fini, par exemple à cause d'une interruption faite par "
+"l'utilisateur, le pourcentage de complétion aussi est écrit si la taille du "
+"fichier en entrée est connue. "
+
+#. type: TP
+#: ../src/xz/xz.1:1899 ../src/xzdec/xzdec.1:89
+#, no-wrap
+msgid "B<-Q>, B<--no-warn>"
+msgstr "B<-Q>, B<--no-warn>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1909
+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 ""
+"Ne pas mettre l'état de sortie à B<2> 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 B<--quiet> et B<--no-warn> doivent "
+"être utilisées pour ne pas afficher d'avertissements, ni altérer le statut "
+"de sortie."
+
+#. type: TP
+#: ../src/xz/xz.1:1909
+#, no-wrap
+msgid "B<--robot>"
+msgstr "B<--robot>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1921
+msgid ""
+"Print messages in a machine-parsable format. This is intended to ease "
+"writing frontends that want to use B<xz> instead of liblzma, which may be "
+"the case with various scripts. The output with this option enabled is meant "
+"to be stable across B<xz> releases. See the section B<ROBOT MODE> for "
+"details."
+msgstr ""
+"Afficher les messages dans un format analysable par une machine. Ceci est "
+"destiné à faciliter l'écriture des frontaux qui voudraient utiliser B<xz> "
+"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 B<xz>. Consulter le paragraphe B<ROBOT MODE> pour "
+"les détails."
+
+#. type: TP
+#: ../src/xz/xz.1:1921
+#, no-wrap
+msgid "B<--info-memory>"
+msgstr "B<--info-memory>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1928
+#, fuzzy
+#| msgid ""
+#| "Display, in human-readable format, how much physical memory (RAM) B<xz> "
+#| "thinks the system has and the memory usage limits for compression and "
+#| "decompression, and exit successfully."
+msgid ""
+"Display, in human-readable format, how much physical memory (RAM) and how "
+"many processor threads B<xz> thinks the system has and the memory usage "
+"limits for compression and decompression, and exit successfully."
+msgstr ""
+"Afficher, dans un format lisible par l'humain, de combien de mémoire "
+"physique (RAM) dispose le système selon B<xz> et les limites d'utilisation "
+"de la mémoire pour la compression et décompression, et quitter."
+
+#. type: TP
+#: ../src/xz/xz.1:1928 ../src/xzdec/xzdec.1:96
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr "B<-h>, B<--help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1932
+msgid ""
+"Display a help message describing the most commonly used options, and exit "
+"successfully."
+msgstr ""
+"Afficher un message d'aide décrivant les options les plus couramment "
+"utilisées et quitter."
+
+#. type: TP
+#: ../src/xz/xz.1:1932
+#, no-wrap
+msgid "B<-H>, B<--long-help>"
+msgstr "B<-H>, B<--long-help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1937
+msgid ""
+"Display a help message describing all features of B<xz>, and exit "
+"successfully"
+msgstr ""
+"Afficher un message d'aide décrivant toutes les options de B<xz> et quitter."
+
+#. type: TP
+#: ../src/xz/xz.1:1937 ../src/xzdec/xzdec.1:99
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr "B<-V>, B<--version>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1946
+msgid ""
+"Display the version number of B<xz> and liblzma in human readable format. "
+"To get machine-parsable output, specify B<--robot> before B<--version>."
+msgstr ""
+"Afficher le numéro de version de B<xz> et de liblzma dans un format lisible "
+"par un humain. Pour obtenir une sortie analysable par la machine, spécifiez "
+"B<--robot> avant B<--version>."
+
+#. type: SH
+#: ../src/xz/xz.1:1947
+#, no-wrap
+msgid "ROBOT MODE"
+msgstr "MODE ROBOT"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1963
+msgid ""
+"The robot mode is activated with the B<--robot> option. It makes the output "
+"of B<xz> easier to parse by other programs. Currently B<--robot> is "
+"supported only together with B<--version>, B<--info-memory>, and B<--list>. "
+"It will be supported for compression and decompression in the future."
+msgstr ""
+"Le mode robot est activé avec l'option B<--robot>. Cela rend la sortie de "
+"B<xz> plus facile à analyser par d'autres programmes. Actuellement, B<--"
+"robot> n'est seulement pris en charge qu'avec B<--version>, B<--info-memory> "
+"et B<--list>. Il sera pris en charge pour la compression et la décompression "
+"dans le futur."
+
+#. type: SS
+#: ../src/xz/xz.1:1964
+#, no-wrap
+msgid "Version"
+msgstr "Version"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1969
+#, fuzzy
+#| msgid ""
+#| "B<xz --robot --version> will print the version number of B<xz> and "
+#| "liblzma in the following format:"
+msgid ""
+"B<xz --robot --version> prints the version number of B<xz> and liblzma in "
+"the following format:"
+msgstr ""
+"B<xz --robot --version> affichera le numéro de version de B<xz> et liblzma "
+"dans le format suivant :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1971
+msgid "B<XZ_VERSION=>I<XYYYZZZS>"
+msgstr "B<XZ_VERSION=>I<XYYYZZZS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1973
+msgid "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+msgstr "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+
+#. type: TP
+#: ../src/xz/xz.1:1973
+#, no-wrap
+msgid "I<X>"
+msgstr "I<X>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1976
+msgid "Major version."
+msgstr "Version majeure."
+
+#. type: TP
+#: ../src/xz/xz.1:1976
+#, no-wrap
+msgid "I<YYY>"
+msgstr "I<YYY>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1981
+msgid ""
+"Minor version. Even numbers are stable. Odd numbers are alpha or beta "
+"versions."
+msgstr ""
+"Version mineure. Les numéros pairs sont stables. Les numéros impairs sont "
+"des versions alpha ou beta."
+
+#. type: TP
+#: ../src/xz/xz.1:1981
+#, no-wrap
+msgid "I<ZZZ>"
+msgstr "I<ZZZ>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1985
+msgid ""
+"Patch level for stable releases or just a counter for development releases."
+msgstr ""
+"Niveau de correctif pour les options stables ou juste un compteur pour les "
+"options de développement."
+
+#. type: TP
+#: ../src/xz/xz.1:1985
+#, no-wrap
+msgid "I<S>"
+msgstr "I<S>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1993
+msgid ""
+"Stability. 0 is alpha, 1 is beta, and 2 is stable. I<S> should be always 2 "
+"when I<YYY> is even."
+msgstr ""
+"Stabilité. 0 est alpha, 1 est bêta et 2 est stable. I<S> devrait toujours "
+"être 2 quand I<YYY> est pair."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1998
+msgid ""
+"I<XYYYZZZS> are the same on both lines if B<xz> and liblzma are from the "
+"same XZ Utils release."
+msgstr ""
+"I<XYYYZZZS> sont identiques sur les deux lignes si B<xz> et liblzma sont "
+"issus de la même version d'utilitaires XZ."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2004
+msgid "Examples: 4.999.9beta is B<49990091> and 5.0.0 is B<50000002>."
+msgstr "Exemples : 4.999.9beta est B<49990091> et 5.0.0 est B<50000002>."
+
+#. type: SS
+#: ../src/xz/xz.1:2005
+#, no-wrap
+msgid "Memory limit information"
+msgstr "Information de limite de mémoire"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2008
+#, fuzzy
+#| msgid ""
+#| "B<xz --robot --info-memory> prints a single line with three tab-separated "
+#| "columns:"
+msgid ""
+"B<xz --robot --info-memory> prints a single line with multiple tab-separated "
+"columns:"
+msgstr ""
+"B<xz --robot --info-memory> affiche une seule ligne avec trois colonnes "
+"séparées par des tabulations :"
+
+#. type: IP
+#: ../src/xz/xz.1:2008
+#, no-wrap
+msgid "1."
+msgstr "1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2010
+#, fuzzy
+#| msgid "Total amount of physical memory (RAM) in bytes"
+msgid "Total amount of physical memory (RAM) in bytes."
+msgstr "Quantité totale de mémoire physique (RAM) en octets"
+
+#. type: IP
+#: ../src/xz/xz.1:2010 ../src/xz/xz.1:2125 ../src/xz/xz.1:2162
+#: ../src/xz/xz.1:2188 ../src/xz/xz.1:2258 ../src/xz/xz.1:2285
+#, no-wrap
+msgid "2."
+msgstr "2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2017
+#, fuzzy
+#| msgid ""
+#| "Memory usage limit for compression in bytes. A special value of zero "
+#| "indicates the default setting, which for single-threaded mode is the same "
+#| "as no limit."
+msgid ""
+"Memory usage limit for compression in bytes (B<--memlimit-compress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Limite d'utilisation de la mémoire pour la compression en octets. Une valeur "
+"spéciale de zéro indique le réglage par défaut, lequel en mode mono-thread "
+"indique qu'il n'y a pas de limite."
+
+#. type: IP
+#: ../src/xz/xz.1:2017 ../src/xz/xz.1:2127 ../src/xz/xz.1:2164
+#: ../src/xz/xz.1:2190 ../src/xz/xz.1:2263 ../src/xz/xz.1:2287
+#, no-wrap
+msgid "3."
+msgstr "3."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2024
+#, fuzzy
+#| msgid ""
+#| "Memory usage limit for decompression in bytes. A special value of zero "
+#| "indicates the default setting, which for single-threaded mode is the same "
+#| "as no limit."
+msgid ""
+"Memory usage limit for decompression in bytes (B<--memlimit-decompress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Limite d'utilisation de la mémoire pour la décompression en octets. Une "
+"valeur spéciale de zéro indique le réglage par défaut, ce qui est équivalent "
+"à sans limite en mode mono-thread."
+
+#. type: IP
+#: ../src/xz/xz.1:2024 ../src/xz/xz.1:2129 ../src/xz/xz.1:2166
+#: ../src/xz/xz.1:2193 ../src/xz/xz.1:2273 ../src/xz/xz.1:2289
+#, no-wrap
+msgid "4."
+msgstr "4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2036
+msgid ""
+"Since B<xz> 5.3.4alpha: Memory usage for multi-threaded decompression in "
+"bytes (B<--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 B<--memlimit-mt-"
+"decompress>."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2036 ../src/xz/xz.1:2131 ../src/xz/xz.1:2168
+#: ../src/xz/xz.1:2195 ../src/xz/xz.1:2291
+#, no-wrap
+msgid "5."
+msgstr "5."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2048
+msgid ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2048 ../src/xz/xz.1:2133 ../src/xz/xz.1:2170
+#: ../src/xz/xz.1:2197 ../src/xz/xz.1:2293
+#, no-wrap
+msgid "6."
+msgstr "6."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2053
+msgid "Since B<xz> 5.3.4alpha: Number of available processor threads."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2057
+msgid ""
+"In the future, the output of B<xz --robot --info-memory> may have more "
+"columns, but never more than a single line."
+msgstr ""
+"Dans le futur, la sortie de B<xz --robot --info-memory> pourrait avoir plus "
+"de colonnes, mais jamais plus qu'une ligne unique."
+
+#. type: SS
+#: ../src/xz/xz.1:2058
+#, no-wrap
+msgid "List mode"
+msgstr "Mode liste"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2063
+msgid ""
+"B<xz --robot --list> 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<xz --robot --list> 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 :"
+
+#. type: TP
+#: ../src/xz/xz.1:2063
+#, no-wrap
+msgid "B<name>"
+msgstr "B<name>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2067
+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:2067
+#, no-wrap
+msgid "B<file>"
+msgstr "B<file>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2075
+msgid ""
+"This line contains overall information about the B<.xz> file. This line is "
+"always printed after the B<name> line."
+msgstr ""
+"Cette ligne contient l'information globale sur le fichier B<.xz>. Cette "
+"ligne est toujours écrite après la ligne B<name>."
+
+#. type: TP
+#: ../src/xz/xz.1:2075
+#, no-wrap
+msgid "B<stream>"
+msgstr "B<stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2085
+msgid ""
+"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."
+msgstr ""
+"Ce type de ligne n'est utilisée que lorsque B< --verbose> a été indiquée. Il "
+"y a autant de lignes B<stream> qu'il y a de flux dans le fichier B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2085
+#, no-wrap
+msgid "B<block>"
+msgstr "B<block>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2100
+msgid ""
+"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."
+msgstr ""
+"Ce type de ligne n'est utilisé seulement lorsque B<--verbose> a été "
+"indiquée. Il y a autant de lignes B<block> qu'il y a de blocs dans le "
+"fichier B<.xz>. Les lignes B<block> sont affichées après toutes les lignes "
+"B<stream> ; les différents types de lignes ne sont pas imbriqués."
+
+#. type: TP
+#: ../src/xz/xz.1:2100
+#, no-wrap
+msgid "B<summary>"
+msgstr "B<summary>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2115
+msgid ""
+"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."
+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<block>. Comme la "
+"ligne B<file>, la ligne B<summary> contient l'information globale sur le "
+"fichier B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2115
+#, no-wrap
+msgid "B<totals>"
+msgstr "B<totals>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2119
+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:2123
+msgid "The columns of the B<file> lines:"
+msgstr "Les colonnes des lignes B<file> :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2127
+msgid "Number of streams in the file"
+msgstr "Nombre de flux dans le fichier"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2129
+msgid "Total number of blocks in the stream(s)"
+msgstr "Nombre total de blocs dans le ou les flux."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2131
+msgid "Compressed size of the file"
+msgstr "Taille compressée du fichier"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2133
+msgid "Uncompressed size of the file"
+msgstr "Taille décompressée du fichier"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2139
+#, fuzzy
+#| msgid ""
+#| "Compression ratio, for example B<0.123.> If ratio is over 9.999, three "
+#| "dashes (B<--->) are displayed instead of the ratio."
+msgid ""
+"Compression ratio, for example, B<0.123>. If ratio is over 9.999, three "
+"dashes (B<--->) are displayed instead of the ratio."
+msgstr ""
+"Taux de compression, par exemple B<0.123>. Si le taux est supérieur à 9 999, "
+"trois tirets (B<--->) sont affichés au lieu du taux."
+
+#. type: IP
+#: ../src/xz/xz.1:2139 ../src/xz/xz.1:2172 ../src/xz/xz.1:2199
+#: ../src/xz/xz.1:2295
+#, no-wrap
+msgid "7."
+msgstr "7."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2152
+msgid ""
+"Comma-separated list of integrity check names. The following strings are "
+"used for the known check types: B<None>, B<CRC32>, B<CRC64>, and "
+"B<SHA-256>. For unknown check types, B<Unknown->I<N> is used, where I<N> 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<None>, "
+"B<CRC32>, B<CRC64> et B<SHA256>. Pour le types de vérification inconnus, "
+"B<Unknown->I<N> est utilisé, où I<N> est un identifiant de vérification sous "
+"la forme d'un nombre décimal (un ou deux chiffres)."
+
+#. type: IP
+#: ../src/xz/xz.1:2152 ../src/xz/xz.1:2174 ../src/xz/xz.1:2201
+#: ../src/xz/xz.1:2298
+#, no-wrap
+msgid "8."
+msgstr "8."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2154
+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:2160
+msgid "The columns of the B<stream> lines:"
+msgstr "Les colonnes des lignes B<stream> :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2164
+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:2166
+msgid "Number of blocks in the stream"
+msgstr "Nombre de blocs dans le flux"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2168
+msgid "Compressed start offset"
+msgstr "Décalage de départ compressé"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2170
+msgid "Uncompressed start offset"
+msgstr "Décalage de départ décompressé"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2172
+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:2174 ../src/xz/xz.1:2203 ../src/xz/xz.1:2293
+msgid "Uncompressed size"
+msgstr "Taille décompressée"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2205
+msgid "Compression ratio"
+msgstr "Taux de compression"
+
+#. type: IP
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2203 ../src/xz/xz.1:2300
+#, no-wrap
+msgid "9."
+msgstr "9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2207
+msgid "Name of the integrity check"
+msgstr "Nom de la vérification d'intégrité"
+
+#. type: IP
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2205 ../src/xz/xz.1:2316
+#, no-wrap
+msgid "10."
+msgstr "10."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2180
+msgid "Size of stream padding"
+msgstr "Taille du remplissage de flux"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2186
+msgid "The columns of the B<block> lines:"
+msgstr "Les colonnes des lignes B<block> :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2190
+msgid "Number of the stream containing this block"
+msgstr "Numéro du flux qui contient ce bloc"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2193
+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:2195
+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:2197
+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:2199
+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:2201
+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:2219
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<block> 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<block>. 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:2221 ../src/xz/xz.1:2321
+#, no-wrap
+msgid "11."
+msgstr "11."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2223
+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:2223 ../src/xz/xz.1:2331
+#, no-wrap
+msgid "12."
+msgstr "12."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2225
+msgid "Block header size"
+msgstr "Taille d'en-tête de bloc"
+
+#. type: IP
+#: ../src/xz/xz.1:2225
+#, no-wrap
+msgid "13."
+msgstr "13."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2235
+msgid ""
+"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 "
+"(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<c> indique que la taille compressée est présente, et "
+"B<u> 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:2235
+#, no-wrap
+msgid "14."
+msgstr "14."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2238
+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:2238
+#, no-wrap
+msgid "15."
+msgstr "15."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2243
+msgid ""
+"Amount of memory (in bytes) required to decompress this block with this "
+"B<xz> version"
+msgstr ""
+"Quantité de mémoire (en octets) nécessaire pour décompresser ce bloc avec "
+"cette version de B<xz>."
+
+#. type: IP
+#: ../src/xz/xz.1:2243
+#, no-wrap
+msgid "16."
+msgstr "16."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2250
+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:2256
+msgid "The columns of the B<summary> lines:"
+msgstr "Les colonnes des lignes B<summary> :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2263
+msgid ""
+"Amount of memory (in bytes) required to decompress this file with this B<xz> "
+"version"
+msgstr ""
+"Quantité de mémoire (en octets) nécessaire pour décompresser ce fichier avec "
+"cette version de B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2269 ../src/xz/xz.1:2327
+msgid ""
+"B<yes> or B<no> indicating if all block headers have both compressed size "
+"and uncompressed size stored in them"
+msgstr ""
+"B<yes> ou B<no> 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:2273 ../src/xz/xz.1:2331
+msgid "I<Since> B<xz> I<5.1.2alpha:>"
+msgstr "I<Depuis> B<xz> I<5.1.2alpha:>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2277 ../src/xz/xz.1:2335
+msgid "Minimum B<xz> version required to decompress the file"
+msgstr "Version minimale de B<xz> nécessaire pour décompresser le fichier."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2283
+msgid "The columns of the B<totals> line:"
+msgstr "Les colonnes de la ligne B<totals> :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2287
+msgid "Number of streams"
+msgstr "Nombre de flux"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2289
+msgid "Number of blocks"
+msgstr "Nombre de blocs"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2291
+msgid "Compressed size"
+msgstr "Taille compressée"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2295
+msgid "Average compression ratio"
+msgstr "Taux de compression moyen"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2298
+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:2300
+msgid "Stream padding size"
+msgstr "Taille de remplissage de flux"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2306
+msgid ""
+"Number of files. This is here to keep the order of the earlier columns the "
+"same as on B<file> lines."
+msgstr ""
+"Nombre de fichiers. Permet de garder l'ordre des colonnes précédentes comme "
+"sur les lignes B<file>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2314
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<totals> line:"
+msgstr ""
+"Si B<--verbose> a été indiqué deux fois, des colonnes supplémentaires sont "
+"incluses sur la ligne B<totals> :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2321
+msgid ""
+"Maximum amount of memory (in bytes) required to decompress the files with "
+"this B<xz> version"
+msgstr ""
+"Quantité maximale de mémoire (en octets) nécessaire pour décompresser les "
+"fichiers avec cette version de B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2341
+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: SH
+#: ../src/xz/xz.1:2342 ../src/xzdec/xzdec.1:104 ../src/lzmainfo/lzmainfo.1:44
+#: ../src/scripts/xzgrep.1:81
+#, no-wrap
+msgid "EXIT STATUS"
+msgstr "STATUT DE SORTIE"
+
+#. type: TP
+#: ../src/xz/xz.1:2343 ../src/xzdec/xzdec.1:105 ../src/lzmainfo/lzmainfo.1:45
+#, no-wrap
+msgid "B<0>"
+msgstr "B<0>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2346 ../src/lzmainfo/lzmainfo.1:48
+msgid "All is good."
+msgstr "Tout est bon."
+
+#. type: TP
+#: ../src/xz/xz.1:2346 ../src/xzdec/xzdec.1:108 ../src/lzmainfo/lzmainfo.1:48
+#, no-wrap
+msgid "B<1>"
+msgstr "B<1>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2349 ../src/xzdec/xzdec.1:111 ../src/lzmainfo/lzmainfo.1:51
+msgid "An error occurred."
+msgstr "Une erreur est survenue."
+
+#. type: TP
+#: ../src/xz/xz.1:2349
+#, no-wrap
+msgid "B<2>"
+msgstr "B<2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2353
+msgid "Something worth a warning occurred, but no actual errors occurred."
+msgstr ""
+"Quelquechose méritant un avertissement s'est produit, mais aucune erreur "
+"véritable n'est survenue."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2356
+msgid ""
+"Notices (not warnings or errors) printed on standard error don't affect the "
+"exit status."
+msgstr ""
+"Les notifications (pas les avertissements ou les erreurs) affichées sur "
+"l'erreur standard n'affectent pas le statut de sortie."
+
+#. type: SH
+#: ../src/xz/xz.1:2357 ../src/scripts/xzgrep.1:94 ../src/scripts/xzless.1:52
+#, no-wrap
+msgid "ENVIRONMENT"
+msgstr "ENVIRONNEMENT"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2370
+msgid ""
+"B<xz> parses space-separated lists of options from the environment variables "
+"B<XZ_DEFAULTS> and B<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 "
+"B<getopt_long>(3) which is used also for the command line arguments."
+msgstr ""
+"B<xz> analyse les listes d'options séparées par des espaces à partir des "
+"variables d'environnement B<XZ_DEFAULTS> et B<XZ_OPT>, 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 "
+"B<getopt_long>(3) qui est aussi utilisé pour les arguments de la ligne de "
+"commandes."
+
+#. type: TP
+#: ../src/xz/xz.1:2370
+#, no-wrap
+msgid "B<XZ_DEFAULTS>"
+msgstr "B<XZ_DEFAULTS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2379
+msgid ""
+"User-specific or system-wide default options. Typically this is set in a "
+"shell initialization script to enable B<xz>'s memory usage limiter by "
+"default. Excluding shell initialization scripts and similar special cases, "
+"scripts must never set or unset B<XZ_DEFAULTS>."
+msgstr ""
+"Options par défaut propres à l'utilisateur ou pour tout le système. Elles "
+"sont le plus souvent définies dans un script d'initialisation de "
+"l'interpréteur pour activer le limiteur d'utilisation de la mémoire de B<xz> "
+"par défaut. A part pour les scripts d'initialisation de l'interpréteur ou "
+"des cas similaires, les sripts ne doivent jamais définir ou désactiver "
+"B<XZ_DEFAULTS>."
+
+#. type: TP
+#: ../src/xz/xz.1:2379
+#, no-wrap
+msgid "B<XZ_OPT>"
+msgstr "B<XZ_OPT>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2390
+#, fuzzy
+#| msgid ""
+#| "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 e.g. when "
+#| "B<xz> is run by a script or tool, e.g. GNU B<tar>(1):"
+msgid ""
+"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 B<tar>(1):"
+msgstr ""
+"Cela permet de passer des options à B<xz> lorsqu'il n'est pas possible de "
+"définir ces options directement sur la ligne de commande B<xz>. C'est le "
+"cas, par exemple, lorsque B<xz> est lancé par un script ou un outil, par "
+"exemple B<tar>(1) de GNU :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2396
+#, no-wrap
+msgid "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+msgstr "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2410
+#, fuzzy
+#| msgid ""
+#| "Scripts may use B<XZ_OPT> e.g. to set script-specific default compression "
+#| "options. It is still recommended to allow users to override B<XZ_OPT> if "
+#| "that is reasonable, e.g. in B<sh>(1) scripts one may use something like "
+#| "this:"
+msgid ""
+"Scripts may use B<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 B<sh>(1) scripts one may "
+"use something like this:"
+msgstr ""
+"Les scripts peuvent utiliser B<XZ_OPT>, par exemple pour définir des options "
+"de compression par défaut spécifiques au script. Il est toujours recommandé "
+"d'autoriser les utilisateurs à outrepasser B<XZ_OPT> si cela est "
+"raisonnable, comme par exemple dans les scripts B<sh>(1) quelquechose comme "
+"ceci devrait être utilisé :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2417
+#, no-wrap
+msgid ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+msgstr ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+
+#. type: SH
+#: ../src/xz/xz.1:2422
+#, no-wrap
+msgid "LZMA UTILS COMPATIBILITY"
+msgstr "Compatibilité des utilitaires LZMA"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2435
+msgid ""
+"The command line syntax of B<xz> is practically a superset of B<lzma>, "
+"B<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."
+msgstr ""
+"La syntaxe de la ligne de commande de B<xz> est quasimment un sur-ensemble "
+"de B<lzma>, B<unlzma> et B<lzcat> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:2436
+#, no-wrap
+msgid "Compression preset levels"
+msgstr "Niveaux de préréglage de la compression"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2443
+msgid ""
+"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."
+msgstr ""
+"La numérotation des préréglages de niveau de compression est différente "
+"entre les outils B<xz> 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."
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "Level"
+msgstr "Niveau"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "xz"
+msgstr "xz"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449
+#, no-wrap
+msgid "LZMA Utils"
+msgstr "Utilitaires LZMA"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "N/A"
+msgstr "N/A"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2451
+#, no-wrap
+msgid "64 KiB"
+msgstr "64 KiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2453
+#, no-wrap
+msgid "512 KiB"
+msgstr "512 KiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2468
+msgid ""
+"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:"
+msgstr ""
+"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 :"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2474
+#, no-wrap
+msgid "LZMA Utils 4.32.x"
+msgstr "Utilitaires LZMA 4.32.x"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2477 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "12 MiB"
+msgstr "12 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2480
+#, no-wrap
+msgid "26 MiB"
+msgstr "26 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2481
+#, no-wrap
+msgid "45 MiB"
+msgstr "45 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2482
+#, no-wrap
+msgid "83 MiB"
+msgstr "83 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2483
+#, no-wrap
+msgid "159 MiB"
+msgstr "159 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2484
+#, no-wrap
+msgid "311 MiB"
+msgstr "311 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2493
+msgid ""
+"The default preset level in LZMA Utils is B<-7> while in XZ Utils it is "
+"B<-6>, so both use an 8 MiB dictionary by default."
+msgstr ""
+"Le niveau de préréglage par défaut dans les outils LZMA est B<-7> alors que "
+"pour les outils XZ c'est B<-6>, les deux utilisent ainsi un dictionnaire de "
+"8 Mio par défaut."
+
+#. type: SS
+#: ../src/xz/xz.1:2494
+#, no-wrap
+msgid "Streamed vs. non-streamed .lzma files"
+msgstr "Fichiers .lzma en flux ou non"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2504
+#, fuzzy
+#| msgid ""
+#| "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."
+msgid ""
+"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."
+msgstr ""
+"La taille non compressée du fichier peut être stockée dans l'en-tête B<."
+"lzma>. C'est ainsi que font les outils LZMA avec les fichiers normaux. "
+"L'alternative est d'indiquer que la taille décompressée est inconnue et "
+"utiliser un marqueur de fin de charge pour indiquer où le décompresseur doit "
+"s'arrêter. Les outils LZMA utilisent cette méthode quand la taille "
+"décompressée n'est pas connue, ce qui est le cas par exemple dans les "
+"redirections."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2525
+msgid ""
+"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."
+msgstr ""
+"B<xz> prend en charge la décompression des fichiers B<.lzma> avec ou sans "
+"marqueur de fin de charge utile, mais tous les fichiers B<.lzma> créés par "
+"B<xz> 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 B<.lzma>. Cela peut être un "
+"problème dans quelques situations inhabituelles. Par exemple, un "
+"décompresseur B<.lzma> 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 B<.lzma> avec une taille non compressée connue."
+
+#. type: SS
+#: ../src/xz/xz.1:2526
+#, no-wrap
+msgid "Unsupported .lzma files"
+msgstr "Fichiers .lzma non pris en charge"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2549
+msgid ""
+"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 I<lp>, but always creates "
+"files with B<lc=3> and B<lp=0>. Creating files with other I<lc> and I<lp> "
+"is possible with B<xz> and with LZMA SDK."
+msgstr ""
+"Le format B<.lzma> autorise des valeurs I<lc> jusqu'à 8, et des valeurs "
+"I<lp> jusqu'à 4. Les outils LZMA peuvent décompresser des fichiers avec tous "
+"les I<lc> et I<lp>, mais créez toujours les fichiers avec B<lc=3> et "
+"B<lp=0>. Créer des fichiers avec d'autres valeurs I<lc> et I<lp> est "
+"possible avec B<xz> et avec LZMA SDK."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2560
+msgid ""
+"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 B<xz>."
+msgstr ""
+"L'implémentation du filtre LZMA1 dans liblzma nécessite que la somme de "
+"I<lc> et I<lp> soit inférieure ou égale à 4. Ainsi, les fichiers B<.lzma> "
+"qui excèdent cette limitation ne peuvent pas être décompressés avec B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2575
+msgid ""
+"LZMA Utils creates only B<.lzma> files which have a dictionary size of "
+"2^I<n> (a power of 2) but accepts files with any dictionary size. liblzma "
+"accepts only B<.lzma> files which have a dictionary size of 2^I<n> or 2^I<n> "
+"+ 2^(I<n>-1). This is to decrease false positives when detecting B<.lzma> "
+"files."
+msgstr ""
+"Les outils LZMA créent seulement des fichiers B<.lzma> qui ont une taille de "
+"dictionnaire de 2^I<n> (une puissance de 2) mais acceptent les fichiers avec "
+"toutes les tailles de dictionnaire. Libzlma n'accepte que les fichiers B<."
+"lzma> qui ont une taille dictionnaire de 2^I<n> ou 2^I<n> + 2^(I<n>-1). Cela "
+"afin de diminuer les faux positifs lors de la détection des fichiers B<."
+"lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2580
+msgid ""
+"These limitations shouldn't be a problem in practice, since practically all "
+"B<.lzma> files have been compressed with settings that liblzma will accept."
+msgstr ""
+"Ces limitations ne devraient pas poser problème en pratique, car "
+"pratiquement tous les fichiers B<.lzma> ont été compressés avec des réglages "
+"que liblzma accepte."
+
+#. type: SS
+#: ../src/xz/xz.1:2581
+#, no-wrap
+msgid "Trailing garbage"
+msgstr "Déchets excédentaires"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2591
+msgid ""
+"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."
+msgstr ""
+"Lors de la décompession, l'utilitaire LZMA ignore silencieusement tout ce "
+"qui est après le premier flux B<.lzma>. 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 B<.lzma> concaténés."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2601
+msgid ""
+"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."
+msgstr ""
+"S'il reste des données après le premier flux B<.lzma>, B<xz> considère que "
+"le fichier est corrompu sauf si B<--single-stream> a été utilisé. Cela peut "
+"casser des scripts obscurs qui ont supposé que les déchets de fin de ligne "
+"sont ignorés."
+
+#. type: SH
+#: ../src/xz/xz.1:2602 ../src/xzdec/xzdec.1:117
+#, no-wrap
+msgid "NOTES"
+msgstr "NOTES"
+
+#. type: SS
+#: ../src/xz/xz.1:2604
+#, no-wrap
+msgid "Compressed output may vary"
+msgstr "La sortie compressée peut varier"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2615
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2625
+msgid ""
+"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."
+msgstr ""
+"Cela signifie qu'une fois que B<--rsyncable> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:2626
+#, no-wrap
+msgid "Embedded .xz decompressors"
+msgstr "Décompresseurs .xz embarqués"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2643
+msgid ""
+"Embedded B<.xz> decompressor implementations like XZ Embedded don't "
+"necessarily support files created with integrity I<check> types other than "
+"B<none> and B<crc32>. Since the default is B<--check=crc64>, you must use "
+"B<--check=none> or B<--check=crc32> when creating files for embedded systems."
+msgstr ""
+"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 I<vérification> "
+"d'intégrité que B<none> et B<CRC32>. Comme la valeur par défaut est B<--"
+"check=crc64>, vous devez utiliser B<--check=none> ou B<--check=crc32> lors "
+"de la création de fichiers pour les systèmes embarqués."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2653
+msgid ""
+"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."
+msgstr ""
+"En dehors des systèmes embarqués, tous les décompresseurs de format B<.xz> "
+"gèrent tous les types de I<vérification> ou sont au moins capables de "
+"décompresser le fichier sans effectuer la vérification d'intégrité si ce "
+"type de I<vérification> particulière n'est pas pris en charge."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2656
+msgid ""
+"XZ Embedded supports BCJ filters, but only with the default start offset."
+msgstr ""
+"XZ Embedded prend en charge les filtres BCJ, mais seulement avec le décalage "
+"de départ par défaut."
+
+#. type: SH
+#: ../src/xz/xz.1:2657
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "EXEMPLES"
+
+#. type: SS
+#: ../src/xz/xz.1:2659
+#, no-wrap
+msgid "Basics"
+msgstr "Bases"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2669
+msgid ""
+"Compress the file I<foo> into I<foo.xz> using the default compression level "
+"(B<-6>), and remove I<foo> if compression is successful:"
+msgstr ""
+"Compresser le fichier I<toto> en I<toto.xz> en utilisant le niveau de "
+"compression par défaut (B<-6>) et supprimer I<toto> si la compression "
+"réussit :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2674
+#, no-wrap
+msgid "CW<xz foo>\n"
+msgstr "CW<xz toto>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2685
+msgid ""
+"Decompress I<bar.xz> into I<bar> and don't remove I<bar.xz> even if "
+"decompression is successful:"
+msgstr ""
+"Décompresser I<bidule.xz> en I<bidule> et ne pas supprimer I<bidule.xz> même "
+"si la compression réussit :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2690
+#, no-wrap
+msgid "CW<xz -dk bar.xz>\n"
+msgstr "CW<xz -dk bidule.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2703
+#, fuzzy
+#| msgid ""
+#| "Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+#| "slower than e.g. the default B<-6>, but needs less memory for compression "
+#| "and decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgid ""
+"Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+"slower than the default B<-6>, but needs less memory for compression and "
+"decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgstr ""
+"Créer I<truc.tar.xz> avec le préréglage B<-4e> (B<-4--extreme>), lequel est "
+"plus lent que par exemle B<-6> (par défaut), mais nécessite moins de mémoire "
+"pour la compression et la décompression (48\\ Mio et 5\\ Mio, "
+"respectivement) :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2708
+#, no-wrap
+msgid "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+msgstr "CW<tar cf - truc | xz -4e E<gt> truc.tar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2714
+msgid ""
+"A mix of compressed and uncompressed files can be decompressed to standard "
+"output with a single command:"
+msgstr ""
+"Un mélange de fichiers compressés et non compressés peuvent être "
+"décompressés vers la sortie standard avec une simple commande :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2719
+#, no-wrap
+msgid "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+msgstr "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+
+#. type: SS
+#: ../src/xz/xz.1:2723
+#, no-wrap
+msgid "Parallel compression of many files"
+msgstr "Compression en parallèle de plusieurs fichiers"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2729
+msgid ""
+"On GNU and *BSD, B<find>(1) and B<xargs>(1) can be used to parallelize "
+"compression of many files:"
+msgstr ""
+"Sur GNU et *BSD, B<find>(1) et B<xargs>(1) peuvent être utilisés pour mettre "
+"en parallèle la compression de plusieurs fichiers :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2735
+#, no-wrap
+msgid ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+msgstr ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2757
+msgid ""
+"The B<-P> option to B<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 B<xargs>(1) "
+"will eventually create."
+msgstr ""
+"L'option B<P> passée à B<xargs>(1) fixe le nombre de processus B<xz> en "
+"parallèles. La meilleure valeur pour l'option B<n> 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 B<xz> que B<xargs>(1) "
+"créera éventuellement."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2765
+msgid ""
+"The option B<-T1> for B<xz> is there to force it to single-threaded mode, "
+"because B<xargs>(1) is used to control the amount of parallelization."
+msgstr ""
+"L'option B<-T1> de B<xz> est là pour le forcer en mode mono-thread, car "
+"B<xargs>(1) est utilisé pour contrôler la quantité de mise en parallèle."
+
+#. type: SS
+#: ../src/xz/xz.1:2766
+#, no-wrap
+msgid "Robot mode"
+msgstr "Mode robot"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2769
+msgid ""
+"Calculate how many bytes have been saved in total after compressing multiple "
+"files:"
+msgstr ""
+"Calculer combien d'octets ont été économisés au total après avoir compressé "
+"plusieurs fichiers :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2774
+#, no-wrap
+msgid "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+msgstr "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2789
+msgid ""
+"A script may want to know that it is using new enough B<xz>. The following "
+"B<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:"
+msgstr ""
+"Un script peut vouloir savoir qu'il utilise une version suffisamment récente "
+"de B<xz>. Le script B<sh>(1) suivant vérifie que le numéro de version de "
+"l'outil B<xz> soit au minimum 5.0.0. Cette méthode est compatible avec les "
+"vieilles versions bêta, qui ne gèrent pas l'option B<--robot> :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2798
+#, no-wrap
+msgid ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+msgstr ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Votre version de xz est trop ancienne.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2805
+msgid ""
+"Set a memory usage limit for decompression using B<XZ_OPT>, but if a limit "
+"has already been set, don't increase it:"
+msgstr ""
+"Régler une limite d'utilisation de la mémoire pour la décompression en "
+"utilisant B<XZ_OPT>, mais si une limite a déjà été définie, ne pas "
+"l'augmenter : "
+
+#. type: Plain text
+#: ../src/xz/xz.1:2815
+#, fuzzy, no-wrap
+#| msgid ""
+#| "CW<NEWLIM=$((123 E<lt>E<lt> 20)) # 123 MiB\n"
+#| "OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+#| "if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+#| " XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+#| " export XZ_OPT\n"
+#| "fi>\n"
+msgid ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+msgstr ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20)) # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2825
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2833
+msgid ""
+"The CompCPU columns of the tables from the descriptions of the options "
+"B<-0> ... B<-9> and B<--extreme> are useful when customizing LZMA2 presets. "
+"Here are the relevant parts collected from those two tables:"
+msgstr ""
+"Les colonnes CompCPU des tableaux des descriptions des options B<-0> à B<-9> "
+"et B<--extreme> sont utiles lors de la personnalisation des préréglages "
+"LZMA2. Voici les parties pertinentes recueillies à partir de ces deux "
+"tableaux :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2858
+#, fuzzy
+#| msgid ""
+#| "If you know that a file requires somewhat big dictionary (e.g. 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 (e.g. 1) can be modified to use a "
+#| "bigger dictionary:"
+msgid ""
+"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:"
+msgstr ""
+"Si vous savez qu'un fichier nécessite un dictionnaire relativement gros (par "
+"exemple 32 Mio) pour bien compresser, mais que vous vouliez le compresser "
+"plus vite que B<xz-8> ne le ferait, un préréglage avec une valeur basse de "
+"CompCPU (par exemple 1) peut être modifié pour utiliser un dictionnaire plus "
+"gros :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2863
+#, no-wrap
+msgid "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+msgstr "CW<xz --lzma2=preset=1,dict=32MiB toto.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2879
+msgid ""
+"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."
+msgstr ""
+"Avec certains fichiers, la commande ci-dessus peut être plus rapide que "
+"B<xz-6> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2886
+msgid ""
+"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:"
+msgstr ""
+"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 B<xz-9> (64 Mio) :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2891
+#, no-wrap
+msgid "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+msgstr "CW<xz -vv --lzma2=dict=192MiB gros_toto.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2904
+msgid ""
+"Using B<-vv> (B<--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."
+msgstr ""
+"Utiliser B<-vv> (B<--verbose--verbose>) 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2916
+#, fuzzy
+#| msgid ""
+#| "Sometimes the compression time doesn't matter, but the decompressor "
+#| "memory usage has to be kept low e.g. to make it possible to decompress "
+#| "the file on an embedded system. The following command uses B<-6e> (B<-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 "
+#| "B<--check=crc32>) using about 100\\ KiB of memory."
+msgid ""
+"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> (B<-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 B<--"
+"check=crc32>) using about 100\\ KiB of memory."
+msgstr ""
+"Parfois le temps de compression importe peu, mais l'utilisation de la "
+"mémoire du décompresseur doit être maintenue basse (par exemple pour rendre "
+"possible la décompression d'un fichier sur un système embarqué). La commande "
+"suivante utilise B<-6e> (B<-6 --extreme>) comme base, et définit le "
+"dictionnaire à seulement 64\\ Kio. Le fichier qui en résulte peut être "
+"décompressé avec XZ Embedded (c'est pourquoi il y a B<--check=crc32>) en "
+"utilisant environ 100\\ Kio de mémoire."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2921
+#, no-wrap
+msgid "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+msgstr "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB toto>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2944
+#, fuzzy
+#| msgid ""
+#| "If you want to squeeze out as many bytes as possible, adjusting the "
+#| "number of literal context bits (I<lc>) and number of position bits "
+#| "(I<pb>) can sometimes help. Adjusting the number of literal position "
+#| "bits (I<lp>) might help too, but usually I<lc> and I<pb> are more "
+#| "important. E.g. 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 B<lc=4>):"
+msgid ""
+"If you want to squeeze out as many bytes as possible, adjusting the number "
+"of literal context bits (I<lc>) and number of position bits (I<pb>) can "
+"sometimes help. Adjusting the number of literal position bits (I<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 B<lc=4>):"
+msgstr ""
+"Si vous voulez réduire au maximum le nombre d'octets, ajuster le nombre de "
+"bits de contexte littéral (I<lc>) et le nombre de bits de position (I<pb>) "
+"peut parfois être bénéfique. Ajuster le nombre de bits de position littéraux "
+"(literal position bits)(I<lp>) devrait aider aussi, mais généralement I<lc> "
+"et I<pb> sont plus importants. Par exemple, une archive de code source "
+"contient majoritairement du texte US-ASCII, donc quelquechose du style de ce "
+"qui suit devrait donner un fichier légèrement (approximativement O.1%) plus "
+"petit que B<xz -6e> (essayez aussi sans B<lc=4>) :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2949
+#, no-wrap
+msgid "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+msgstr "CW<xz --lzma2=preset=6e,pb=0,lc=4 code_source.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2957
+#, fuzzy
+#| msgid ""
+#| "Using another filter together with LZMA2 can improve compression with "
+#| "certain file types. E.g. to compress a x86-32 or x86-64 shared library "
+#| "using the x86 BCJ filter:"
+msgid ""
+"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:"
+msgstr ""
+"Utiliser un autre filtre avec LZMA2 peut améliorer la compression avec "
+"certains types de fichiers. Par exemple, pour compresser une bibliothèque "
+"partagée x86-32 ou x86-64 en utilisant le filtre BCJ x86 :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2962
+#, no-wrap
+msgid "CW<xz --x86 --lzma2 libfoo.so>\n"
+msgstr "CW<xz --x86 --lzma2 libtoto.so>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2976
+msgid ""
+"Note that the order of the filter options is significant. If B<--x86> is "
+"specified after B<--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."
+msgstr ""
+"Notez que l'ordre des options de filtre est significatif. Si B<--x86> est "
+"indiqué après B<--lzma2>, B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2982
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2992
+#, fuzzy
+#| msgid ""
+#| "The image has to be saved in uncompressed format, e.g. as uncompressed "
+#| "TIFF. The distance parameter of the Delta filter is set to match the "
+#| "number of bytes per pixel in the image. E.g. 24-bit RGB bitmap needs "
+#| "B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to accommodate "
+#| "the three-byte alignment:"
+msgid ""
+"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 B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to "
+"accommodate the three-byte alignment:"
+msgstr ""
+"L'image doit être sauvée dans un format non compressé, comme TIFF non "
+"compressé. Le paramètre de distance du filtre Delta est défini pour "
+"correspondre au nombre d'octets par pixel dans l'image. Par exemple une "
+"image RGB 24 bits nécessite B<dist=3> et il est aussi recommandé de passer "
+"B<pb=0> à LZMA2 pour s'adapter à l'alignement trois octets :"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2997
+#, no-wrap
+msgid "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+msgstr "CW<xz --delta=dist=3 --lzma2=pb=0 toto.tiff>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3005
+#, fuzzy
+#| msgid ""
+#| "If multiple images have been put into a single archive (e.g.\\& B<.tar>), "
+#| "the Delta filter will work on that too as long as all images have the "
+#| "same number of bytes per pixel."
+msgid ""
+"If multiple images have been put into a single archive (for example, B<."
+"tar>), the Delta filter will work on that too as long as all images have the "
+"same number of bytes per pixel."
+msgstr ""
+"Si plusieurs images ont été mises dans une seule archive (par exemple\\&B<."
+"tar>), le filtre Delta les modifiera pourvu que toutes les images ont le "
+"même nombre d'octets par pixel."
+
+#. type: SH
+#: ../src/xz/xz.1:3006 ../src/xzdec/xzdec.1:143 ../src/lzmainfo/lzmainfo.1:59
+#: ../src/scripts/xzdiff.1:65 ../src/scripts/xzgrep.1:106
+#: ../src/scripts/xzless.1:65 ../src/scripts/xzmore.1:51
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "VOIR AUSSI"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3015
+msgid ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+msgstr ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3017
+msgid "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+msgstr "XZ Utilitaires: E<lt>https://tukaani.org/xz/E<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3019 ../src/xzdec/xzdec.1:146
+msgid "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+msgstr "XZ Embarqué: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3020
+#, fuzzy
+#| msgid "LZMA SDK: E<lt>http://7-zip.org/sdk.htmlE<gt>"
+msgid "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+msgstr "LZMA SDK: E<lt>http://7-zip.org/sdk.htmlE<gt>"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "XZDEC"
+msgstr "XZDEC"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "2017-04-19"
+msgstr "19-04-2017"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:10
+msgid "xzdec, lzmadec - Small .xz and .lzma decompressors"
+msgstr "xzdec, lzmadec - Small .xz et .lzma decompresseurs"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:14
+msgid "B<xzdec> [I<option...>] [I<file...>]"
+msgstr "B<xzdec> [I<option...>] [I<fichier...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:18
+msgid "B<lzmadec> [I<option...>] [I<file...>]"
+msgstr "B<lzmadec> [I<option...>] [I<fichier...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:44
+msgid ""
+"B<xzdec> is a liblzma-based decompression-only tool for B<.xz> (and only B<."
+"xz>) files. B<xzdec> is intended to work as a drop-in replacement for "
+"B<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."
+msgstr ""
+"B<xzdec> est un outil uniquement de décompression, basé sur liblzma pour les "
+"fichiers B<.xz> (et seulement B<.xz>). B<xzdec> est destiné à remplacer "
+"B<xz>(1) dans les situations les plus courantes où un script a été écrit "
+"pour utiliser B<xz --decompress --stdout> (et possiblement quelques autres "
+"options courantes) pour décompresser des fichiers B<.xz>. B<lzmadec> est "
+"identique à B<xzdec>, sauf que B<lzmadec> prend en charge les fichiers B<."
+"lzma> au lieu des fichiers B<.xz>."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:61
+msgid ""
+"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."
+msgstr ""
+"Pour réduire la taille de l'exécutable, B<xzdec> ne prend en charge ni le "
+"multithreading ni la localisation et ne lit pas les options des variables "
+"d'environnement B<XZ_DEFAULTS> et B<XZ_OPT>. B<xzdec> ne gère pas "
+"l'affichage d'information sur la progression du traitement : envoyer "
+"B<SIGINFO> à B<xzdec> ne fait rien, mais envoyer B<SIGUSR1> termine le "
+"processus au lieu d'afficher de l'information sur la progression."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:69
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> supports only decompression."
+msgstr ""
+"Ignoré pour la compatibilité avec B<xz>(1), B<xzdec> ne gère que la "
+"décompression."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:76
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never creates or removes any "
+"files."
+msgstr ""
+"Ignoré pour la compatibilité avec B<xz>(1), B<xzdec> ne crée ni ne supprime "
+"jamais aucun fichier."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:83
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> always writes the "
+"decompressed data to standard output."
+msgstr ""
+"Ignoré pour la compatibilité avec B<xz>(1), B<xzdec> écrit toujours les "
+"données décompressées sur la sortie standard."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:89
+msgid ""
+"Specifying this once does nothing since B<xzdec> never displays any warnings "
+"or notices. Specify this twice to suppress errors."
+msgstr ""
+"Spécifier cela une fois ne fait rien, car B<xzdec> n'affiche jamais aucun "
+"avertissement ou notification. Spécifier cela deux fois pour supprimer les "
+"erreurs."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:96
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never uses the exit status 2."
+msgstr ""
+"Ignoré pour la compatibilité avec B<xz>(1), B<xzdec> n'utilise jamais le "
+"satut de sortie 2."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:99
+msgid "Display a help message and exit successfully."
+msgstr "Afficher un message d'aide et quitter."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:104
+msgid "Display the version number of B<xzdec> and liblzma."
+msgstr "Afficher le numéro de version de B<xzdec> et liblzma."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:108
+msgid "All was good."
+msgstr "Tout s'est bien passé."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:117
+msgid ""
+"B<xzdec> doesn't have any warning messages like B<xz>(1) has, thus the exit "
+"status 2 is not used by B<xzdec>."
+msgstr ""
+"A la différence de B<xz>(1),B<xzdec> n'a pas de messages d'avertissement, et "
+"donc le statut de sortie 2 n'est pas utilisé par B<xzdec>."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:131
+msgid ""
+"Use B<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 B<xz>(1)."
+msgstr ""
+"Utilisez B<xz>(1) au lieu de B<xzdec> ou B<lzmadec> pour un usage normal de "
+"tous les jours. B<xzdec> ou B<lzmadec> ne sont utiles que pour les "
+"situations où il est important d'avoir un plus petit décompresseur que le "
+"B<xz>(1) complet."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:143
+msgid ""
+"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."
+msgstr ""
+"B<xzdec> et B<lzmadec> 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."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:145 ../src/lzmainfo/lzmainfo.1:60
+msgid "B<xz>(1)"
+msgstr "B<xz>(1)"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7
+#, no-wrap
+msgid "LZMAINFO"
+msgstr "LZMAINFO"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "2013-06-30"
+msgstr "30-06-2013"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:10
+msgid "lzmainfo - show information stored in the .lzma file header"
+msgstr ""
+"lzmainfo - Afficher l'information stockée dans l'en-tête du fichier .lzma"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:15
+msgid "B<lzmainfo> [B<--help>] [B<--version>] [I<file...>]"
+msgstr "B<lzmainfo> [B<--help>] [B<--version>] [I<fichier...>]"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:31
+msgid ""
+"B<lzmainfo> shows information stored in the B<.lzma> file header. It reads "
+"the first 13 bytes from the specified I<file>, decodes the header, and "
+"prints it to standard output in human readable format. If no I<files> are "
+"given or I<file> is B<->, standard input is read."
+msgstr ""
+"B<lzmainfo> affiche l'information stockée dans l'en-tête du fichier B<."
+"lzma>. Il lit les 13 premiers octets du I<fichier> indiqué, décode l'en-"
+"tête, et l'écrit sur la sortie standard dans un format lisible par un "
+"humain. Si aucun I<fichier> n'est spécifié ou si I<fichier> est B<->, "
+"l'entrée standard est lue."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:40
+msgid ""
+"Usually the most interesting information is the uncompressed size and the "
+"dictionary size. Uncompressed size can be shown only if the file is in the "
+"non-streamed B<.lzma> format variant. The amount of memory required to "
+"decompress the file is a few dozen kilobytes plus the dictionary size."
+msgstr ""
+"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 B<.lzma> 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."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:44
+msgid ""
+"B<lzmainfo> is included in XZ Utils primarily for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"B<lzmainfo> est inclus dans les utilitaires XZ essentiellement pour des "
+"besoins de rétrocompatibilité avec les utilitaires LZMA."
+
+#. type: SH
+#: ../src/lzmainfo/lzmainfo.1:51 ../src/scripts/xzdiff.1:74
+#, no-wrap
+msgid "BUGS"
+msgstr "BOGUES"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:59
+msgid ""
+"B<lzmainfo> uses B<MB> while the correct suffix would be B<MiB> (2^20 "
+"bytes). This is to keep the output compatible with LZMA Utils."
+msgstr ""
+"B<lzmainfo> utilise B<MB> alors que le suffixe correct devrait être "
+"B<MiB>(2^20 octets). Cela pour garder la sortie compatible avec les "
+"utilitaires LZMA."
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "XZDIFF"
+msgstr "XZDIFF"
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, fuzzy, no-wrap
+#| msgid "2013-06-30"
+msgid "2021-06-04"
+msgstr "30-06-2013"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:12
+msgid "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files"
+msgstr "xzcmp, xzdiff, lzcmp, lzdiff - Comparer des fichiers compressés."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:15
+msgid "B<xzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<xzcmp> [I<cmp_options>] I<fichier1> [I<fichier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:18
+msgid "B<xzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<xzdiff> [I<diff_options>] I<fichier1> [I<fichier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:21
+msgid "B<lzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<lzcmp> [I<cmp_options>] I<fichier1> [I<fichier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:24
+msgid "B<lzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<lzdiff> [I<diff_options>] I<fichier1> [I<fichier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:59
+#, fuzzy
+#| msgid ""
+#| "B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files "
+#| "compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), or "
+#| "B<lzop>(1). All options specified are passed directly to B<cmp>(1) or "
+#| "B<diff>(1). If only one file is specified, then the files compared are "
+#| "I<file1> (which must have a suffix of a supported compression format) and "
+#| "I<file1> from which the compression format suffix has been stripped. If "
+#| "two files are specified, then they are uncompressed if necessary and fed "
+#| "to B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or "
+#| "B<diff>(1) is preserved."
+msgid ""
+"B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files compressed "
+"with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), or "
+"B<zstd>(1). All options specified are passed directly to B<cmp>(1) or "
+"B<diff>(1). If only one file is specified, then the files compared are "
+"I<file1> (which must have a suffix of a supported compression format) and "
+"I<file1> from which the compression format suffix has been stripped. If two "
+"files are specified, then they are uncompressed if necessary and fed to "
+"B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or B<diff>(1) is "
+"preserved unless a decompression error occurs; then exit status is 2."
+msgstr ""
+"B<xzcmp> et B<xzdiff> invoquent B<cmp>(1) ou B<diff>(1) sur les fichiers "
+"compressés avec B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1) ou B<lzop>(1). "
+"Toutes les options spécifiées sont passées directement à B<cmp>(1) ou "
+"B<diff>(1). Si seulement un fichier est indiqué alors les fichiers comparés "
+"sont I<fichier1> (lequel doit avoir un suffixe de format de compression pris "
+"en charge) et I<fichier1> duquel le suffixe de format a été enlevé. Si deux "
+"fichiers sont spécifiés, ils sont décompressés si nécessaire et envoyés à "
+"B<cmp>(1) ou B<diff>(1). Le statut de sortie de B<cmp>(1) ou B<diff>(1) est "
+"préservé."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:65
+msgid ""
+"The names B<lzcmp> and B<lzdiff> are provided for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"Les noms B<lzcmp> et B<lzdiff> sont fournis pour des besoins de "
+"rétrocompatibilité avec les Utilitaires LZMA."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:74
+#, fuzzy
+#| msgid ""
+#| "B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+#| "B<zdiff>(1)"
+msgid ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+msgstr ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zdiff>(1"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:79
+msgid ""
+"Messages from the B<cmp>(1) or B<diff>(1) programs refer to temporary "
+"filenames instead of those specified."
+msgstr ""
+"Les messages des programmes B<cmp>(1) ou B<diff>(1) se réfèrent à des noms "
+"de fichiers temporaires et non à ceux spécifiés."
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "XZGREP"
+msgstr "XZGREP"
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "2022-07-19"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:12
+msgid "xzgrep - search compressed files for a regular expression"
+msgstr ""
+"xzgrep - Chercher une expression rationnelle dans des fichiers compressés"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:18
+#, fuzzy
+#| msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> I<file>..."
+msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> [I<file...>]"
+msgstr "B<xzgrep> [I<grep_options>] [B<-e>] I<motif> I<fichier>..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:21
+#, fuzzy
+#| msgid "B<xzegrep> ..."
+msgid "B<xzegrep> \\&..."
+msgstr "B<xzegrep> ..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:24
+#, fuzzy
+#| msgid "B<xzfgrep> ..."
+msgid "B<xzfgrep> \\&..."
+msgstr "B<xzfgrep> ..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:27
+#, fuzzy
+#| msgid "B<lzgrep> ..."
+msgid "B<lzgrep> \\&..."
+msgstr "B<lzgrep> ..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:30
+#, fuzzy
+#| msgid "B<lzegrep> ..."
+msgid "B<lzegrep> \\&..."
+msgstr "B<lzegrep> ..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:33
+#, fuzzy
+#| msgid "B<lzfgrep> ..."
+msgid "B<lzfgrep> \\&..."
+msgstr "B<lzfgrep> ..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:49
+#, fuzzy
+#| msgid ""
+#| "B<xzgrep> invokes B<grep>(1) on I<files> which may be either "
+#| "uncompressed or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), "
+#| "B<bzip2>(1), or B<lzop>(1). All options specified are passed directly to "
+#| "B<grep>(1)."
+msgid ""
+"B<xzgrep> invokes B<grep>(1) on I<files> which may be either uncompressed "
+"or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), or B<zstd>(1). All options specified are passed directly to "
+"B<grep>(1)."
+msgstr ""
+"B<xzgrep> invoque B<grep>(1) sur des I<fichiers> qui ont pu être compressés "
+"ou décompressés que ce soit avec B<xz>(1), B<lzma>(1), B<gzip>(1), "
+"B<bzip2>(1) ou B<lzop>(1). Toutes les options spécifiées sont passées "
+"directement à B<grep>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:62
+#, fuzzy
+#| msgid ""
+#| "If no I<file> is specified, then standard input is decompressed if "
+#| "necessary and fed to B<grep>(1). When reading from standard input, "
+#| "B<gzip>(1), B<bzip2>(1), and B<lzop>(1) compressed files are not "
+#| "supported."
+msgid ""
+"If no I<file> is specified, then standard input is decompressed if necessary "
+"and fed to B<grep>(1). When reading from standard input, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), and B<zstd>(1) compressed files are not supported."
+msgstr ""
+"Si aucun I<fichier> n'est spécifié, alors l'entrée standard est décompressée "
+"si nécessaire et alimente B<grep>(1). Lorsque c'est l'entrée standard qui "
+"est lue, les fichiers compressés B<gzip>(1), B<bzip2>(1) et B<lzop>(1) ne "
+"sont pas pris en charge."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:81
+#, fuzzy
+#| msgid ""
+#| "If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<egrep>(1) or "
+#| "B<fgrep>(1) is used instead of B<grep>(1). The same applies to names "
+#| "B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+#| "compatibility with LZMA Utils."
+msgid ""
+"If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<grep -E> or "
+"B<grep -F> is used instead of B<grep>(1). The same applies to names "
+"B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+"compatibility with LZMA Utils."
+msgstr ""
+"Si B<xzgrep> est invoqué comme B<xzegrep> ou B<xzfgrep>, alors B<egrep>(1) "
+"ou B<fgrep>(1) est utilisé à la place de B<grep>(1). La même chose "
+"s'applique aux noms B<lzgrep>, B<lzegrep> et B<lzfgrep> qui sont fournis "
+"pour la rétrocompatibilité avec les Utilitaires LZMA."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:86
+msgid ""
+"At least one match was found from at least one of the input files. No "
+"errors occurred."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:90
+msgid "No matches were found from any of the input files. No errors occurred."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:90
+#, no-wrap
+msgid "E<gt>1"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:94
+msgid "One or more errors occurred. It is unknown if matches were found."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:95
+#, no-wrap
+msgid "B<GREP>"
+msgstr "B<GREP>"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:106
+#, fuzzy
+#| msgid ""
+#| "If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+#| "B<grep>(1), B<egrep>(1), or B<fgrep>(1)."
+msgid ""
+"If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+"B<grep>(1), B<grep -E>, or B<grep -F>."
+msgstr ""
+"Si la variable d'environnement B<GREP> est définie, B<xzgrep> l'utilise à la "
+"place de B<grep>(1), B<egrep>(1) ou B<fgrep>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:113
+#, fuzzy
+#| msgid ""
+#| "B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zgrep>(1)"
+msgid ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+msgstr "B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zgrep>(1)"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "XZLESS"
+msgstr "XZLESS"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "2010-09-27"
+msgstr "27-09-2010"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:13
+msgid "xzless, lzless - view xz or lzma compressed (text) files"
+msgstr ""
+"xzless, lzless - Voir le contenu des fichiers (texte) compressés xz ou lzma"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:16
+msgid "B<xzless> [I<file>...]"
+msgstr "B<xzless> [I<fichier>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:19
+msgid "B<lzless> [I<file>...]"
+msgstr "B<lzless> [I<fichier>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:31
+msgid ""
+"B<xzless> is a filter that displays text from compressed files to a "
+"terminal. It works on files compressed with B<xz>(1) or B<lzma>(1). If no "
+"I<files> are given, B<xzless> reads from standard input."
+msgstr ""
+"B<xzless> est un filtre qui affiche le contenu de fichiers compressés dans "
+"un terminal. Cela fonctionne avec les fichiers compressés avec B<xz>(1) ou "
+"B<lzma>(1). Si aucun I<fichier> n'est donné, B<xzless> lit depuis l'entrée "
+"standard."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:48
+msgid ""
+"B<xzless> uses B<less>(1) to present its output. Unlike B<xzmore>, its "
+"choice of pager cannot be altered by setting an environment variable. "
+"Commands are based on both B<more>(1) and B<vi>(1) and allow back and "
+"forth movement and searching. See the B<less>(1) manual for more "
+"information."
+msgstr ""
+"B<xzless> utilise B<less>(1) pour afficher sa sortie. Contrairement à "
+"B<xzmore>, son choix d'afficheur ne peut pas être modifié en indiquant une "
+"variable d'environnement. Les commandes sont basées sur B<more>(1) et "
+"B<vi>(1) et permettent des déplacements en avant et en arrière et des "
+"recherches. Voir le manuel de B<less>(1) pour plus d'information."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:52
+msgid ""
+"The command named B<lzless> is provided for backward compatibility with LZMA "
+"Utils."
+msgstr ""
+"La commande nommée B<lzless> est fournie pour la rétrocompatibilité avec les "
+"utilitaires LZMA."
+
+#. type: TP
+#: ../src/scripts/xzless.1:53
+#, no-wrap
+msgid "B<LESSMETACHARS>"
+msgstr "B<LESSMETACHARS>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:59
+msgid ""
+"A list of characters special to the shell. Set by B<xzless> unless it is "
+"already set in the environment."
+msgstr ""
+"Une liste de caractères spéciaux pour l'interpréteur. Définis par B<xzless> "
+"à moins qu'ils ne l'aient déjà été dans l'environnement."
+
+#. type: TP
+#: ../src/scripts/xzless.1:59
+#, no-wrap
+msgid "B<LESSOPEN>"
+msgstr "B<LESSOPEN>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:65
+msgid ""
+"Set to a command line to invoke the B<xz>(1) decompressor for preprocessing "
+"the input files to B<less>(1)."
+msgstr ""
+"Définir en ligne de commande le décompresseur B<xz>(1) à invoquer pour "
+"préparer les fichiers en entrée pour B<less>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:69
+msgid "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+msgstr "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+
+#. type: TH
+#: ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZMORE"
+msgstr "XZMORE"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:10
+msgid "xzmore, lzmore - view xz or lzma compressed (text) files"
+msgstr ""
+"xzmore, lzmore - Voir le contenu des fichiers (texte) compressés xz ou lzma"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:13
+msgid "B<xzmore> [I<file...>]"
+msgstr "B<xzmore> [I<fichier...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:16
+msgid "B<lzmore> [I<file...>]"
+msgstr "B<lzmore> [I<fichier...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:24
+msgid ""
+"B<xzmore> is a filter which allows examination of B<xz>(1) or B<lzma>(1) "
+"compressed text files one screenful at a time on a soft-copy terminal."
+msgstr ""
+"B<xzmore> est un filtre qui permet d'examiner le contenu des fichiers texte "
+"compressés B<xz>(1) ou B<lzma>(1), une page d'écran à la fois, sur un "
+"terminal écran."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:33
+msgid ""
+"To use a pager other than the default B<more,> set environment variable "
+"B<PAGER> to the name of the desired program. The name B<lzmore> is provided "
+"for backward compatibility with LZMA Utils."
+msgstr ""
+"Pour utiliser un afficheur autre que B<more>, l'afficheur par défaut, "
+"définissez la variable d'environnement B<PAGER> avec le nom du programme "
+"souhaité. Le nom B<lzmore> est fourni pour la rétrocompatibilité avec les "
+"utilitaires LZMA."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:33
+#, no-wrap
+msgid "B<e> or B<q>"
+msgstr "B<e> ou B<q>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:40
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to exit."
+msgstr ""
+"Lorsque l'invite --More--(prochain fichier : I<fichier>) est affiché, cette "
+"commande force B<xzmore> à quitter."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:40
+#, no-wrap
+msgid "B<s>"
+msgstr "B<s>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:47
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to skip the next file and continue."
+msgstr ""
+"Lorsque l'invite --More--(prochain fichier : I<fichier>) est affiché, cette "
+"commande force B<xzmore> à ignorer le prochain fichier et continuer."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:51
+msgid ""
+"For list of keyboard commands supported while actually viewing the content "
+"of a file, refer to manual of the pager you use, usually B<more>(1)."
+msgstr ""
+"Pour une liste des commandes clavier prises en charge lors de la lecture du "
+"contenu d'un fichier, référez vous au manuel de l'afficheur (pager) que vous "
+"utilisez, habituellement B<more>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:55
+msgid "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+msgstr "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+
+#, no-wrap
+#~ msgid "2020-02-01"
+#~ msgstr "1er février 2020"
+
+#~ msgid ""
+#~ "Display an error and exit if the compression settings exceed the memory "
+#~ "usage limit. The default is to adjust the settings downwards so that the "
+#~ "memory usage limit is not exceeded. Automatic adjusting is always "
+#~ "disabled when creating raw streams (B<--format=raw>)."
+#~ msgstr ""
+#~ "Afficher une erreur et quitter si les réglages de compression dépassent "
+#~ "la limite d'utilisation de la mémoire. Le comportement par défaut "
+#~ "consiste à ajuster les réglages vers le bas pour que l'utilisation de la "
+#~ "mémoire ne soit pas dépassée. L'ajustement automatique est toujours "
+#~ "désactivé lors de la création de flux bruts (B<--format=raw>)."
+
+#~ msgid ""
+#~ "It is fine to apply a BCJ filter on a whole executable; there's no need "
+#~ "to apply it only on the executable section. Applying a BCJ filter on an "
+#~ "archive that contains both executable and non-executable files may or may "
+#~ "not give good results, so it generally isn't good to blindly apply a BCJ "
+#~ "filter when compressing binary packages for distribution."
+#~ msgstr ""
+#~ "Il est possible d'appliquer un filtre BCJ sur l'ensemble d'un "
+#~ "exécutable ; il n'est pas nécessaire de l'appliquer uniquement sur la "
+#~ "section exécutable. Appliquer un filtre BCJ sur une archive contenant à "
+#~ "la fois des fichiers exécutables et des fichiers non-exécutables "
+#~ "pourrait, ou non, donner de bons résultats, donc il n'est généralement "
+#~ "pas bon d'appliquer aveuglémént un filtre BCJ lors de la compression de "
+#~ "paquets binaires pour leur distribution."
+
+#~ msgid ""
+#~ "These BCJ filters are very fast and use insignificant amount of memory. "
+#~ "If a BCJ filter improves compression ratio of a file, it can improve "
+#~ "decompression speed at the same time. This is because, on the same "
+#~ "hardware, the decompression speed of LZMA2 is roughly a fixed number of "
+#~ "bytes of compressed data per second."
+#~ msgstr ""
+#~ "Ces filtres BCJ sont très rapides et utilisent une quantité insignifiante "
+#~ "de mémoire. Si un filtre BCJ améliore le taux de compression d'un "
+#~ "fichier, il peut en même temps améliorer la vitesse de décompression. "
+#~ "Cela parce que sur un même matériel, la vitesse de décompression de LZMA2 "
+#~ "est approximativement un nombre fixe d'octets de données compressées par "
+#~ "seconde."
+
+#~ msgid ""
+#~ "Applying a BCJ filter on an archive containing multiple similar "
+#~ "executables can make the compression ratio worse than not using a BCJ "
+#~ "filter. This is because the BCJ filter doesn't detect the boundaries of "
+#~ "the executable files, and doesn't reset the address conversion counter "
+#~ "for each executable."
+#~ msgstr ""
+#~ "L'application d'un filtre BCJ sur une archive contenant plusieurs "
+#~ "exécutables similaires peut rendre le taux de compression moins bon que "
+#~ "si l'on n'utilisait pas de filtre BCJ. Cela est dû au fait que le filtre "
+#~ "BCJ ne détecte pas les limites des fichiers exécutables et ne remet pas à "
+#~ "zéro le compteur de conversion d'adresse pour chaque exécutable."
+
+#~ msgid ""
+#~ "Both of the above problems will be fixed in the future in a new filter. "
+#~ "The old BCJ filters will still be useful in embedded systems, because the "
+#~ "decoder of the new filter will be bigger and use more memory."
+#~ msgstr ""
+#~ "Les deux problèmes ci-dessus seront réglés dans le futur dans un nouveau "
+#~ "filtre. Les vieux filtres BCJ seront toujours utiles dans les systèmes "
+#~ "embarqués, car le décodeur du nouveau filtre sera plus gros et utilisera "
+#~ "plus de mémoire."
+
+#~ msgid "Different instruction sets have different alignment:"
+#~ msgstr "Les différents jeux d'instructions ont un alignement différent :"
+
+#, no-wrap
+#~ msgid "Little endian only"
+#~ msgstr "Petit-boutiste seulement"
+
+#, no-wrap
+#~ msgid "Big or little endian"
+#~ msgstr "Grand ou petit boutiste"
+
+#, no-wrap
+#~ msgid "2011-03-19"
+#~ msgstr "19-03-2011"
diff --git a/po4a/ko.po b/po4a/ko.po
new file mode 100644
index 0000000..d472175
--- /dev/null
+++ b/po4a/ko.po
@@ -0,0 +1,5555 @@
+# Korean translation for the xz-man
+# This file is put in the public domain.
+# Seong-ho Cho <darkcircle.0426@gmail.com>, 2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-man 5.4.4-pre1\n"
+"POT-Creation-Date: 2023-11-01 20:27+0800\n"
+"PO-Revision-Date: 2023-07-20 11:01+0900\n"
+"Last-Translator: Seong-ho Cho <darkcircle.0426@gmail.com>\n"
+"Language-Team: Korean <translation-team-ko@googlegroups.com>\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.0.1\n"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "XZ"
+msgstr "XZ"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "2023-07-17"
+msgstr "2023-07-17"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "Tukaani"
+msgstr "Tukaani"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZ Utils"
+msgstr "XZ 유틸리티"
+
+#. type: SH
+#: ../src/xz/xz.1:11 ../src/xzdec/xzdec.1:8 ../src/lzmainfo/lzmainfo.1:8
+#: ../src/scripts/xzdiff.1:10 ../src/scripts/xzgrep.1:10
+#: ../src/scripts/xzless.1:11 ../src/scripts/xzmore.1:8
+#, no-wrap
+msgid "NAME"
+msgstr "이름"
+
+#. type: Plain text
+#: ../src/xz/xz.1:13
+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:14 ../src/xzdec/xzdec.1:10 ../src/lzmainfo/lzmainfo.1:10
+#: ../src/scripts/xzdiff.1:12 ../src/scripts/xzgrep.1:12
+#: ../src/scripts/xzless.1:13 ../src/scripts/xzmore.1:10
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr "요약"
+
+#. type: Plain text
+#: ../src/xz/xz.1:18
+msgid "B<xz> [I<option...>] [I<file...>]"
+msgstr "B<xz> [I<<옵션>...>] [I<E<lt>파일E<gt>...>]"
+
+#. type: SH
+#: ../src/xz/xz.1:19
+#, no-wrap
+msgid "COMMAND ALIASES"
+msgstr "명령 별칭"
+
+#. type: Plain text
+#: ../src/xz/xz.1:23
+msgid "B<unxz> is equivalent to B<xz --decompress>."
+msgstr "B<unxz> 명령은 B<xz --decompress> 명령과 동일합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:27
+msgid "B<xzcat> is equivalent to B<xz --decompress --stdout>."
+msgstr "B<xzcat> 명령은 B<xz --decompress --stdout> 명령과 동일합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:31
+msgid "B<lzma> is equivalent to B<xz --format=lzma>."
+msgstr "B<lzma> 명령은 B<xz --format=lzma> 명령과 동일합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:35
+msgid "B<unlzma> is equivalent to B<xz --format=lzma --decompress>."
+msgstr "B<unlzma> 명령은 B<xz --format=lzma --decompress> 명령과 동일합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:39
+msgid "B<lzcat> is equivalent to B<xz --format=lzma --decompress --stdout>."
+msgstr ""
+"B<lzcat> 명령은 B<xz --format=lzma --decompress --stdout> 명령과 동일합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:51
+msgid ""
+"When writing scripts that need to decompress files, it is recommended to "
+"always use the name B<xz> with appropriate arguments (B<xz -d> or B<xz -"
+"dc>) instead of the names B<unxz> and B<xzcat>."
+msgstr ""
+"파일 압축을 해제해야 하는 셸 스크립트를 작성할 때, B<unxz> 와 B<xzcat> 이름 "
+"대신 B<xz> 명령과 적절한 인자 값(B<xz -d> 또는 B<xz -dc>)의 사용을 추천드립니"
+"다."
+
+#. type: SH
+#: ../src/xz/xz.1:52 ../src/xzdec/xzdec.1:18 ../src/lzmainfo/lzmainfo.1:15
+#: ../src/scripts/xzdiff.1:24 ../src/scripts/xzgrep.1:33
+#: ../src/scripts/xzless.1:19 ../src/scripts/xzmore.1:16
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "설명"
+
+#. type: Plain text
+#: ../src/xz/xz.1:71
+msgid ""
+"B<xz> is a general-purpose data compression tool with command line syntax "
+"similar to B<gzip>(1) and B<bzip2>(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<lzip> is supported."
+msgstr ""
+"B<xz>는 B<gzip>(1) 과 B<bzip2>(1) 과 비슷한 명령행 문법을 지닌 범용 데이터 "
+"압축 도구입니다. 자체 파일 형식은 B<.xz> 형식이나, LZMA 유틸리티에서 사용하"
+"는 예전 B<.lzma> 형식과 형식 헤더가 없는 RAW 압축 스트림도 지원합니다. 게다"
+"가, B<lzip>에서 활용하는 B<.lz> 형식 압축 해제도 지원합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:93
+msgid ""
+"B<xz> compresses or decompresses each I<file> according to the selected "
+"operation mode. If no I<files> are given or I<file> is B<->, B<xz> reads "
+"from standard input and writes the processed data to standard output. B<xz> "
+"will refuse (display an error and skip the I<file>) to write compressed "
+"data to standard output if it is a terminal. Similarly, B<xz> will refuse "
+"to read compressed data from standard input if it is a terminal."
+msgstr ""
+"각 I<파일> 에 대한 B<xz> 압축 또는 압축 해제는 선택 동작 모드에 따릅니다. "
+"I<E<lt>파일E<gt>> 값이 주어졌거나 I<E<lt>파일E<gt>> 값이 B<->이면, B<xz> 명령"
+"에서 표준 입력을 읽고 처리한 데이터를 표준 출력에 기록합니다. B<xz> 에서는 "
+"터미널에서 활용할 경우 압축 데이터를 표준 압축으로 기록하는 동작을 거절(오류"
+"를 출력하고 I<E<lt>파일E<gt>>을 건너뜀)합니다. 이와 비슷하게, B<xz> 유틸리티"
+"를 터미널에서 실행하면 표준 입력의 압축 데이터 읽기를 거절합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:103
+msgid ""
+"Unless B<--stdout> is specified, I<files> other than B<-> are written to a "
+"new file whose name is derived from the source I<file> name:"
+msgstr ""
+"B<--stdout> 을 지정하지 않는 한, B<->가 아닌 I<E<lt>파일E<gt>>을 원본 I<E<lt>"
+"파일E<gt>> 이름에서 가져온 새 파일 이름으로 기록합니다:"
+
+#. type: IP
+#: ../src/xz/xz.1:103 ../src/xz/xz.1:109 ../src/xz/xz.1:134 ../src/xz/xz.1:139
+#: ../src/xz/xz.1:142 ../src/xz/xz.1:145 ../src/xz/xz.1:161 ../src/xz/xz.1:422
+#: ../src/xz/xz.1:425 ../src/xz/xz.1:432 ../src/xz/xz.1:677 ../src/xz/xz.1:679
+#: ../src/xz/xz.1:778 ../src/xz/xz.1:789 ../src/xz/xz.1:798 ../src/xz/xz.1:806
+#: ../src/xz/xz.1:1034 ../src/xz/xz.1:1043 ../src/xz/xz.1:1055
+#: ../src/xz/xz.1:1729 ../src/xz/xz.1:1735 ../src/xz/xz.1:1853
+#: ../src/xz/xz.1:1857 ../src/xz/xz.1:1860 ../src/xz/xz.1:1863
+#: ../src/xz/xz.1:1867 ../src/xz/xz.1:1874 ../src/xz/xz.1:1876
+#, no-wrap
+msgid "\\(bu"
+msgstr "\\(bu"
+
+#. type: Plain text
+#: ../src/xz/xz.1:109
+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> or B<.lzma>) 는 원본 파일 이름 뒤"
+"에 붙어 대상 파일이름이 됩니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:124
+msgid ""
+"When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from "
+"the filename to get the target filename. B<xz> 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<xz>에서는 B<.txz>, B<.tlz> 접미사도 인식하며, "
+"B<.tar> 접미사로 치환합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:128
+msgid ""
+"If the target file already exists, an error is displayed and the I<file> is "
+"skipped."
+msgstr ""
+"대상 파일이 이미 있으면, 오류를 나타내고 I<E<lt>파일E<gt>>을 건너뜁니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:134
+msgid ""
+"Unless writing to standard output, B<xz> will display a warning and skip the "
+"I<file> if any of the following applies:"
+msgstr ""
+"표준 출력으로 기록하기 전에는, B<xz>는 경고를 나타내며, 다음 조건에 만족할 경"
+"우 I<E<lt>파일E<gt>>을 건너뜁니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:139
+msgid ""
+"I<File> is not a regular file. Symbolic links are not followed, and thus "
+"they are not considered to be regular files."
+msgstr ""
+"I<E<lt>파일E<gt>>이 일반 파일이 아닐 때. 심볼릭 링크는 따라가지 않기에, 일"
+"반 파일로 간주하지 않습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:142
+msgid "I<File> has more than one hard link."
+msgstr "I<E<lt>파일E<gt>>이 하나 이상의 하드 링크일 떄."
+
+#. type: Plain text
+#: ../src/xz/xz.1:145
+msgid "I<File> has setuid, setgid, or sticky bit set."
+msgstr "I<E<lt>파일E<gt>>에 setuid, setgid, 끈적이 비트 집합이 붙어있을 떄."
+
+#. type: Plain text
+#: ../src/xz/xz.1:161
+msgid ""
+"The operation mode is set to compress and the I<file> 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<E<lt>파일E<gt>>은 대상 파일 형식의 접미사를 "
+"이미 붙였을 때(B<.xz> 형식으로 압축하면 B<.xz> 또는 B<.txz>, B<.lzma> 형식으"
+"로 압축하면 B<.lzma> 또는 B<.tlz>)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:171
+msgid ""
+"The operation mode is set to decompress and the I<file> 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<E<lt>파일E<gt>>에 지원 파일 형식 접미사"
+"(B<.xz>, B<.txz>, B<.lzma>, B<.tlz>, B<.lz>)를 붙이지 않았을 때."
+
+#. type: Plain text
+#: ../src/xz/xz.1:186
+msgid ""
+"After successfully compressing or decompressing the I<file>, B<xz> copies "
+"the owner, group, permissions, access time, and modification time from the "
+"source I<file> 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<file>. B<xz> "
+"doesn't support copying other metadata like access control lists or extended "
+"attributes yet."
+msgstr ""
+"I<E<lt>파일E<gt>> 의 압축 또는 압축 해제를 성공하고 나면, B<xz>는 소유자, 소"
+"유그룹, 권한, 접근 시각, 수정 시각 정보를 원본 I<E<lt>파일E<gt>>에서 대상 파"
+"일로 그대로 복사합니다. 그룹 정보 복사에 실패하면, 권한을 수정하여 원본 "
+"I<E<lt>파일E<gt>>에 접근 권한이 없는 사용자가 대상 파일로 접근하지 못하게 합"
+"니다. B<xz>는 아직 접근 제어 목록이나 확장 속성 등의 기타 메타데이터를 복사"
+"하는 기능은 지원하지 않습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:196
+msgid ""
+"Once the target file has been successfully closed, the source I<file> is "
+"removed unless B<--keep> was specified. The source I<file> is never removed "
+"if the output is written to standard output or if an error occurs."
+msgstr ""
+"대상 파일을 온전히 닫고 나면, B<--keep> 옵션을 지원하지 않았을 경우 원본 "
+"I<E<lt>파일E<gt>>을 제거합니다. 원본 I<E<lt>파일E<gt>>은 출력을 표준 출력으"
+"로 기록했거나 오류가 발생했을 경우 제거하지 않습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:208
+msgid ""
+"Sending B<SIGINFO> or B<SIGUSR1> to the B<xz> 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<xz> 프로세스에 B<SIGINFO> 시그널 또는 B<SIGUSR1> 시그널을 보내면 표준 출력"
+"으로 진행 정보를 출력합니다. 표준 오류가 터미널일 경우일 경우에만 제한하며 "
+"B<--verbose> 옵션을 지정하면 진행 표시줄을 자동으로 나타냅니다."
+
+#. type: SS
+#: ../src/xz/xz.1:209
+#, no-wrap
+msgid "Memory usage"
+msgstr "메모리 사용"
+
+#. type: Plain text
+#: ../src/xz/xz.1:225
+msgid ""
+"The memory usage of B<xz> 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<xz -9> 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<xz> 메모리 사용은 수백 킬로바이트로 시작하여 수 기가바이트까지 압축 설정에 "
+"따라 다릅니다. 압축 해제 프로그램이 필요로 하는 메모리 공간을 결정하는 파일 "
+"압축시에 설정 값을 활용합니다. 보통 압축 해제 프로그램은 파일을 만들 때, 압"
+"축 프로그램 메모리 사용량의 5% 에서 20% 정도 필요합니다. 예를 들면, B<xz -9>"
+"로 압축한 파일 압축 해제시 현재 65MiB 메모리 용량이 필요합니다. 여전하게도, "
+"압축 해제시 수 기가 바이트의 메모리가 필요한 B<.xz> 파일에도 가능한 이야기입"
+"니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:237
+msgid ""
+"Especially users of older systems may find the possibility of very large "
+"memory usage annoying. To prevent uncomfortable surprises, B<xz> 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<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(2))."
+msgstr ""
+"특히 이전 시스템 사용자의 경우 메모리 사용량이 엄청나게 늘어나는 점에 짜증이 "
+"날 수 있습니다. 이런 불편한 상황을 피하기 위해, B<xz>에 기본적으로 비활성 상"
+"태인 내장 메모리 사용 제한 기능을 넣었습니다. 일부 운영체제에서 처리 중 메모"
+"리 사용을 제한하는 수단을 제공하긴 하지만, 여기에 의지하기에는 충분히 유연하"
+"지 않습니다(예를 들면, B<ulimit>(1)을 사용하면 가상 메모리를 제한하여 "
+"B<mmap>(2)을 먹통으로 만듭니다)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:259
+msgid ""
+"The memory usage limiter can be enabled with the command line option B<--"
+"memlimit=>I<limit>. Often it is more convenient to enable the limiter by "
+"default by setting the environment variable B<XZ_DEFAULTS>, for example, "
+"B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+"separately for compression and decompression by using B<--memlimit-"
+"compress=>I<limit> and B<--memlimit-decompress=>I<limit>. Using these two "
+"options outside B<XZ_DEFAULTS> is rarely useful because a single run of "
+"B<xz> cannot do both compression and decompression and B<--"
+"memlimit=>I<limit> (or B<-M> I<limit>) is shorter to type on the command "
+"line."
+msgstr ""
+"메모리 사용 제한 기능은 B<--memlimit=>I<E<lt>제한용량E<gt>> 명령행 옵션으로 "
+"사용할 수 있습니다. 종종 B<XZ_DEFAULTS=--memlimit=150MiB>와 같이 "
+"B<XZ_DEFAULTS> 환경 변수를 설정하여 제한 기능을 켜는게 더 편합니다. B<--"
+"memlimit-compress=>I<E<lt>제한용량E<gt>> 옵션과 B<--memlimit-"
+"decompress=>I<E<lt>제한용량E<gt>> 옵션을 활용하여 압축 및 압축 해제시 별도로 "
+"한계 값을 설정할 수 있습니다. 이 두 가지 옵션의 B<XZ_DEFAULTS> 환경 변수 밖"
+"에서의 사용은, B<xz>를 단일 실행할 때 압축 및 압축 해제 동작을 동시에 수행하"
+"지 않으며, 앞서 언급한 두가지 옵션을 명령행에 입력하기에는 B<--"
+"memlimit=>I<E<lt>제한용량E<gt>>(또는 B<-M> I<E<lt>제한용량E<gt>>)이 더 짧기 "
+"때문에 별로 쓸모가 없습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:278
+msgid ""
+"If the specified memory usage limit is exceeded when decompressing, B<xz> "
+"will display an error and decompressing the file will fail. If the limit is "
+"exceeded when compressing, B<xz> 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<xz -9>, the settings will be scaled down only "
+"a little, not all the way down to B<xz -8>."
+msgstr ""
+"압축 해제시 메모리 사용 제한 지정 한계를 초과하면, B<xz> 유틸리티에서 오류를 "
+"나타내며 파일 압축 해제는 실패합니다. 압축을 실행할 때 사용 제한 지정 한계"
+"를 넘어서면 B<xz>에서는 설정 값을 줄여서 어쨌든 한계를 넘지 못하게 합니다"
+"(B<--format=raw> 옵션 또는 B<--no-adjust> 옵션 사용시 제외). 설정 한계 값이 "
+"엄청 작지 않은 이상 이 방식대로 처리하면 어쨌든 실패하지 않습니다. 설정 값조"
+"정은 압축 래벨 사전 설정과 일치하지 않을 때 단계적으로 진행하는데, 이를테면, "
+"B<xz -9> 명령 수행에 필요한 양보다 한계 값이 약간 작으면, 설정 값을 B<xz -8>"
+"에 못미치게 약간 줄여서 진행합니다."
+
+#. type: SS
+#: ../src/xz/xz.1:279
+#, no-wrap
+msgid "Concatenation and padding with .xz files"
+msgstr ".xz 파일 결합 및 패딩"
+
+#. type: Plain text
+#: ../src/xz/xz.1:287
+msgid ""
+"It is possible to concatenate B<.xz> files as is. B<xz> will decompress "
+"such files as if they were a single B<.xz> file."
+msgstr ""
+"B<.xz> 파일을 있는 그대로 합칠 수 있습니다. B<xz>는 B<.xz> 파일을 단독 파일"
+"일 때 처럼 압축해제합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:296
+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 ""
+"결합 부분과 마지막 부분 뒤에 패딩을 추가할 수 있습니다. 패딩은 널 바이트로 "
+"구성해야 하며 패딩 길이는 4바이트로 구성해야 합니다. 512 바이트 블록으로 파"
+"일 크기를 이루는 매체에 B<.xz> 파일을 저장했을 경우에 요긴할 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:300
+msgid ""
+"Concatenation and padding are not allowed with B<.lzma> files or raw streams."
+msgstr "B<.lzma> 파일 또는 원시 스트림의 경우 결합과 패딩을 허용하지 않습니다."
+
+#. type: SH
+#: ../src/xz/xz.1:301 ../src/xzdec/xzdec.1:61
+#, no-wrap
+msgid "OPTIONS"
+msgstr "옵션"
+
+#. type: SS
+#: ../src/xz/xz.1:303
+#, no-wrap
+msgid "Integer suffixes and special values"
+msgstr "정수 접두사와 별도 값"
+
+#. type: Plain text
+#: ../src/xz/xz.1:307
+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:307
+#, no-wrap
+msgid "B<KiB>"
+msgstr "B<KiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:318
+msgid ""
+"Multiply the integer by 1,024 (2^10). B<Ki>, B<k>, B<kB>, B<K>, and B<KB> "
+"are accepted as synonyms for B<KiB>."
+msgstr ""
+"1,024 (2^10) 배수 정수값. B<Ki>, B<k>, B<kB>, B<K>, B<KB> 단위를 B<KiB> 동의"
+"어로 받아들입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:318
+#, no-wrap
+msgid "B<MiB>"
+msgstr "B<MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:328
+msgid ""
+"Multiply the integer by 1,048,576 (2^20). B<Mi>, B<m>, B<M>, and B<MB> are "
+"accepted as synonyms for B<MiB>."
+msgstr ""
+"1,048,576 (2^20) 배수 정수값. B<Mi>, B<m>, B<M>, B<MB> 단위를 B<MiB> 동의어"
+"로 받아들입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:328
+#, no-wrap
+msgid "B<GiB>"
+msgstr "B<GiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:338
+msgid ""
+"Multiply the integer by 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, and B<GB> "
+"are accepted as synonyms for B<GiB>."
+msgstr ""
+"1,073,741,824 (2^30) 배수 정수값. B<Gi>, B<g>, B<G>, B<GB> 단위를 B<GiB> 동"
+"의어로 받아들입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:343
+msgid ""
+"The special value B<max> can be used to indicate the maximum integer value "
+"supported by the option."
+msgstr ""
+"특수 값 B<max>는 옵션에서 지원하는 정수 최대 값을 나타낼 때 사용할 수 있습니"
+"다."
+
+#. type: SS
+#: ../src/xz/xz.1:344
+#, no-wrap
+msgid "Operation mode"
+msgstr "동작 모드"
+
+#. type: Plain text
+#: ../src/xz/xz.1:347
+msgid ""
+"If multiple operation mode options are given, the last one takes effect."
+msgstr ""
+"여러 동작 모드를 보여드리겠습니다만, 마지막에 주어진 동작 모드로 동작합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:347
+#, no-wrap
+msgid "B<-z>, B<--compress>"
+msgstr "B<-z>, B<--compress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:356
+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<unxz> implies B<--decompress>)."
+msgstr ""
+"압축합니다. 어떤 동작 모드 옵션도 지정하지 않고 다른 동작 모드를 명령행에 따"
+"로 지정하지 않았다면 이 동작 모드는 기본입니다(예: B<unxz> 는 B<--decompress>"
+"를 암시)."
+
+#. type: TP
+#: ../src/xz/xz.1:356 ../src/xzdec/xzdec.1:62
+#, no-wrap
+msgid "B<-d>, B<--decompress>, B<--uncompress>"
+msgstr "B<-d>, B<--decompress>, B<--uncompress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:359
+msgid "Decompress."
+msgstr "압축을 해제합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:359
+#, no-wrap
+msgid "B<-t>, B<--test>"
+msgstr "B<-t>, B<--test>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:368
+msgid ""
+"Test the integrity of compressed I<files>. 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<E<lt>파일E<gt>>의 무결성을 시험해봅니다. 이 옵션은 압축 해제 데이터"
+"를 표준 출력으로 기록하는 대신 버린다는 점을 제외하고 B<--decompress --"
+"stdout>과 동일합니다. 어떤 파일도 만들거나 제거하지 않습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:368
+#, no-wrap
+msgid "B<-l>, B<--list>"
+msgstr "B<-l>, B<--list>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:377
+msgid ""
+"Print information about compressed I<files>. 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<E<lt>파일E<gt>> 정보를 출력합니다. 압축 해제 출력을 내보내지 않으며, "
+"어떤 파일도 만들거나 제거하지 않습니다. 이 조회 모드에서, 프로그램은 표준 입"
+"력 또는 기타 탐색 불가능한 원본에서 압축 데이터를 읽을 수 없습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:392
+msgid ""
+"The default listing shows basic information about I<files>, 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<less\\ -S> may be convenient if the terminal isn't wide enough."
+msgstr ""
+"I<E<lt>파일E<gt>> 기본 정보를 파일 당 한 줄 씩 기본으로 보여줍니다. 더 자세"
+"한 정보를 보려면 B<--verbose> 옵션을 사용하십시오. 더 자세한 정보는 B<--"
+"verbose> 옵션을 두번 사용하면 되지만, 추가 정보를 더 많이 가져오면서 탐색 횟"
+"수가 늘어나는 문제로 인해 느려질 수 있습니다. 세부 출력 너비는 80 문자를 초"
+"과하며, 예를 들어 출력을 파이핑한다면, 터미널이 충분히 너비가 넓지 못할 경우 "
+"B<less\\ -S> 명령이 편리할 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:399
+msgid ""
+"The exact output may vary between B<xz> versions and different locales. For "
+"machine-readable output, B<--robot --list> should be used."
+msgstr ""
+"정확한 출력은 B<xz> 버전과 다른 로캘에 따라 바뀔 수 있습니다. 기계 판독용 출"
+"력시 B<--robot --list> 옵션을 사용합니다."
+
+#. type: SS
+#: ../src/xz/xz.1:400
+#, no-wrap
+msgid "Operation modifiers"
+msgstr "동작 수정자"
+
+#. type: TP
+#: ../src/xz/xz.1:401 ../src/xzdec/xzdec.1:69
+#, no-wrap
+msgid "B<-k>, B<--keep>"
+msgstr "B<-k>, B<--keep>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:404
+msgid "Don't delete the input files."
+msgstr "입력 파일을 삭제하지 않습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:418
+msgid ""
+"Since B<xz> 5.2.6, this option also makes B<xz> 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<xz> 5.2.6 부터는 이 옵션으로 입력 파일이 일반 파일을 참조하는 심볼릭 링크"
+"나 하나 이상의 하드 링크, 내지는 setuid, setgid, 끈적이 비트 세트를 설정한 상"
+"태라도 압축하거나 압축을 풀 수 있습니다. setuid, setgid, 끈적이 비트는 대상 "
+"파일에 복사하지 않습니다. 이전 버전에서는 B<--force> 옵션을 지정했을 때만 가"
+"능했습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:418
+#, no-wrap
+msgid "B<-f>, B<--force>"
+msgstr "B<-f>, B<--force>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:421
+msgid "This option has several effects:"
+msgstr "이 옵션은 몇가지 동작에 영향을 줍니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:425
+msgid ""
+"If the target file already exists, delete it before compressing or "
+"decompressing."
+msgstr "대상 파일이 이미 있으면, 압축 또는 압축 해제 전 삭제합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:432
+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, 끈적이 비트 세트를 설정한 상태라도 압축 또는 압축 해제를 진행"
+"합니다. setuid, setgid, 끈적이 비트는 대상 파일에 복사하지 않습니다"
+
+#. type: Plain text
+#: ../src/xz/xz.1:457
+msgid ""
+"When used with B<--decompress> B<--stdout> and B<xz> cannot recognize the "
+"type of the source file, copy the source file as is to standard output. "
+"This allows B<xzcat> B<--force> to be used like B<cat>(1) for files that "
+"have not been compressed with B<xz>. Note that in future, B<xz> might "
+"support new compressed file formats, which may make B<xz> decompress more "
+"types of files instead of copying them as is to standard output. B<--"
+"format=>I<format> can be used to restrict B<xz> to decompress only a single "
+"file format."
+msgstr ""
+"B<--decompress> B<--stdout> 옵션을 같이 사용하는 상황에서 B<xz> 명령이 원본 "
+"파일의 형식을 알아내지 못할 때, 원본 파일의 사본을 표준 출력으로 보냅니다. "
+"이렇게 하면 B<xzcat> B<--force> 명령을 B<xz> 명령으로 압축하지 않은 파일에 대"
+"해 B<cat>(1) 을 사용하는 것처럼 사용할 수 있습니다. 참고로 나중에, B<xz>에"
+"서 B<xz>로 하여금 여러 형식의 파일을 표준 출력으로 복사하는 대신 압축을 해제"
+"하도록 새 압축 파일 형식을 지원할 예정입니다. B<--format=>I<E<lt>형식E<gt>> "
+"옵션은 B<xz> 명령에 단일 파일 형식만 압축 해제하도록 제한할 때 사용할 수 있습"
+"니다."
+
+#. type: TP
+#: ../src/xz/xz.1:458 ../src/xzdec/xzdec.1:76
+#, 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:464
+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:464
+#, no-wrap
+msgid "B<--single-stream>"
+msgstr "B<--single-stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:473
+msgid ""
+"Decompress only the first B<.xz> stream, and silently ignore possible "
+"remaining input data following the stream. Normally such trailing garbage "
+"makes B<xz> display an error."
+msgstr ""
+"처음 B<.xz> 스트림만 압축 해제하며, 스트림에 뒤따라오는 나머지 입력 데이터는 "
+"조용히 무시합니다. 보통 뒤따라오는 쓰레기 값에 대해서는 B<xz> 에서 오류를 나"
+"타냅니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:482
+msgid ""
+"B<xz> never decompresses more than one stream from B<.lzma> files or raw "
+"streams, but this option still makes B<xz> ignore the possible trailing data "
+"after the B<.lzma> file or raw stream."
+msgstr ""
+"B<xz>는 B<.lzma> 파일 또는 원시 스트림에서 온 하나 이상의 스트림에 대해 압축 "
+"해제동작을 취하지 않지만, 이 옵션을 사용하면 B<xz>에서 B<.lzma> 파일 또는 원"
+"시 스트림을 처리한 다음에 뒤따라오는 데이터를 무시하도록 합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:487
+msgid ""
+"This option has no effect if the operation mode is not B<--decompress> or "
+"B<--test>."
+msgstr ""
+"이 옵션은 동작 모드가 B<--decompress> 또는 B<--test>가 아니면 동작에 아무런 "
+"영향을 주지 않습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:487
+#, no-wrap
+msgid "B<--no-sparse>"
+msgstr "B<--no-sparse>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:499
+msgid ""
+"Disable creation of sparse files. By default, if decompressing into a "
+"regular file, B<xz> 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<xz> "
+"에서는 압축 해제한 파일에 이진 0값이 길게 늘어질 경우 희소 배열 파일을 만들려"
+"고 합니다. 표준 출력의 내용 길이만큼 연결한 일반 파일로 기록할 때도 동작하"
+"며 희소 파일을 만드는 동안 아무런 문제가 나타나지 않게 각각의 추가 조건을 만"
+"족합니다. 희소 파일을 만들면 디스크 공간을 절약할 수 있으며 디스크 입출력을 "
+"줄여 압축 해제 속도를 올릴 수 있습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:499
+#, 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:511
+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 ""
+"압축할 때, 대상 파일의 접두사를 B<.xz> 또는 B<.lzma> 대신 I<.suf>로 사용하십"
+"시오. 표준 출력으로 기록하지 않고 원본 파일에 I<.suf> 접두사가 붙어있으면, "
+"경고를 나타내고 해당 파일을 건너뜁니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:525
+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:531
+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:531
+#, no-wrap
+msgid "B<--files>[B<=>I<file>]"
+msgstr "B<--files>[B<=>I<E<lt>파일E<gt>>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:545
+msgid ""
+"Read the filenames to process from I<file>; if I<file> 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<file>."
+msgstr ""
+"I<E<lt>파일E<gt>>에서 처리할 파일 이름을 읽습니다. I<E<lt>파일E<gt>>을 생략하"
+"면 파일 이름은 표준 입력에서 불러옵니다. 파일 이름은 개행 문자로 끝나야 합니"
+"다. 대시 문자(B<->)는 일반 파일 이름으로 취급하며 표준 입력을 의미하지 않습"
+"니다. 파일 이름을 명령행 인자로 지정하면, I<E<lt>파일E<gt>>에서 파일 이름을 "
+"읽어들이기 전 해당 명령행 인자를 먼저 처리합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:545
+#, no-wrap
+msgid "B<--files0>[B<=>I<file>]"
+msgstr "B<--files0>[B<=>I<E<lt>파일E<gt>>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:549
+msgid ""
+"This is identical to B<--files>[B<=>I<file>] except that each filename must "
+"be terminated with the null character."
+msgstr ""
+"각 파일 이름이 널 문자로 끝나야 한다는 점만 제외하면 B<--files>[B<=>I<E<lt>파"
+"일E<gt>>] 옵션과 동일합니다."
+
+#. type: SS
+#: ../src/xz/xz.1:550
+#, no-wrap
+msgid "Basic file format and compression options"
+msgstr "기본 파일 형식 및 압축 옵션"
+
+#. type: TP
+#: ../src/xz/xz.1:551
+#, no-wrap
+msgid "B<-F> I<format>, B<--format=>I<format>"
+msgstr "B<-F> I<format>, B<--format=>I<E<lt>형식E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:556
+msgid "Specify the file I<format> to compress or decompress:"
+msgstr "압축 또는 압축해제 파일 I<E<lt>형식E<gt>>을 지정합니다:"
+
+#. type: TP
+#: ../src/xz/xz.1:557
+#, no-wrap
+msgid "B<auto>"
+msgstr "B<auto>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:569
+msgid ""
+"This is the default. When compressing, B<auto> is equivalent to B<xz>. "
+"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<auto>는 B<xz>의 기본 동작과 동일합니다. 압축을 "
+"해제할 때, 입력 파일 형식을 자동으로 찾습니다. 참고로 원시 스트림(B<--"
+"format=raw>)의 경우 자동으로 찾을 수 없습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:569
+#, no-wrap
+msgid "B<xz>"
+msgstr "B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:576
+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:576
+#, no-wrap
+msgid "B<lzma>, B<alone>"
+msgstr "B<lzma>, B<alone>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:586
+msgid ""
+"Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files "
+"when decompressing. The alternative name B<alone> is provided for backwards "
+"compatibility with LZMA Utils."
+msgstr ""
+"이전 B<.lzma> 파일 형식으로 압축하거나, 압축 해제시 B<.lzma> 파일만 받아들입"
+"니다. B<alone> 대체 명령은 LZMA 유틸리티 하위 호환성을 목적으로 제공합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:586
+#, no-wrap
+msgid "B<lzip>"
+msgstr "B<lzip>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:592
+msgid ""
+"Accept only B<.lz> files when decompressing. Compression is not supported."
+msgstr "압축 해제시 B<.lz> 파일만 받아들입니다. 압축은 지원하지 않습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:605
+msgid ""
+"The B<.lz> format version 0 and the unextended version 1 are supported. "
+"Version 0 files were produced by B<lzip> 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<lzip> 1.18."
+msgstr ""
+"B<.lz> 형식 버전 0과 비확장 버전 1을 지원합니다. 버전 0파일은 B<lzip> 1.3 이"
+"전에서만 만듭니다. 일반적이진 않지만 일부 파일의 경우 이 형식과 관련된 원본 "
+"패키지로 보관한 파일을 찾을 수도 있습니다. 개인적으로 이 형식으로 압축한 오"
+"래된 개인 파일을 가지고 있을 수도 있습니다. 형식 버전 0 압축 해제 지원은 "
+"B<lzip> 1.18에서 제거했습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:614
+msgid ""
+"B<lzip> 1.4 and later create files in the format version 1. The sync flush "
+"marker extension to the format version 1 was added in B<lzip> 1.6. This "
+"extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt "
+"input)."
+msgstr ""
+"B<lzip> 1.4 이상에서는 버전 1형식의 파일을 만듭니다. 형식 버전 1로의 동기화 "
+"제거 마커 확장은 B<lzip> 1.6에 추가했습니다. 이 확장은 거의 쓰지 않으며 "
+"B<xz> 에서 조차도 지원하지 않습니다(손상된 입력 파일로 진단함)."
+
+#. type: TP
+#: ../src/xz/xz.1:614
+#, no-wrap
+msgid "B<raw>"
+msgstr "B<raw>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:622
+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:623
+#, no-wrap
+msgid "B<-C> I<check>, B<--check=>I<check>"
+msgstr "B<-C> I<E<lt>검사방식E<gt>>, B<--check=>I<E<lt>검사방식E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:638
+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:642
+msgid "Supported I<check> types:"
+msgstr "지원 I<검사> 형식:"
+
+#. type: TP
+#: ../src/xz/xz.1:643
+#, no-wrap
+msgid "B<none>"
+msgstr "B<none>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:649
+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:649
+#, no-wrap
+msgid "B<crc32>"
+msgstr "B<crc32>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:652
+msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)."
+msgstr "IEEE-802.3 (이더넷)의 다항 연산으로 CRC32를 계산합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:652
+#, no-wrap
+msgid "B<crc64>"
+msgstr "B<crc64>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:657
+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 ""
+"ECMA-182의 다항식 연산으로 CRC64를 계산합니다. 이 동작이 기본 동작이기 때문"
+"에 CRC32가 깨진 파일을 찾을 때보다는 좀 낮은 편이며 속도 차이도 거의 없습니"
+"다."
+
+#. type: TP
+#: ../src/xz/xz.1:657
+#, no-wrap
+msgid "B<sha256>"
+msgstr "B<sha256>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:661
+msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64."
+msgstr "SHA-256 해시를 계산합니다. CRC32와 CRC64 보다는 좀 느립니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:667
+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로 검증하빈다. 이를 바꾸거나 It is not "
+"possible to change or disable it."
+
+#. type: TP
+#: ../src/xz/xz.1:667
+#, no-wrap
+msgid "B<--ignore-check>"
+msgstr "B<--ignore-check>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:673
+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 ""
+"압축 데이터를 압축해제할 경우 압축 데이터의 무결성 검증을 진행하지 않습니"
+"다. B<.xz> 헤더의 CRC32 값은 그래도 여전히 보통 방식으로 검증합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:676
+msgid ""
+"B<Do not use this option unless you know what you are doing.> Possible "
+"reasons to use this option:"
+msgstr ""
+"B<이 옵션이 정확히 무슨 동작을 하는지 알기 전에는 사용하지 마십시오.> 이 옵션"
+"을 사용하는 타당한 이유로:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:679
+msgid "Trying to recover data from a corrupt .xz file."
+msgstr "깨진 .xz 파일에서 데이터 복구를 시도합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:685
+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:686
+#, no-wrap
+msgid "B<-0> ... B<-9>"
+msgstr "B<-0> ... B<-9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:695
+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:710
+msgid ""
+"The differences between the presets are more significant than with "
+"B<gzip>(1) and B<bzip2>(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<it's not a good idea to blindly use -9 for "
+"everything> like it often is with B<gzip>(1) and B<bzip2>(1)."
+msgstr ""
+"사전 설정간 차이는 B<gzip>(1)과 B<bzip2>(1)을 사용할 때보다 더 비중을 차지합"
+"니다. 선택한 압축 설정은 압축 해제시 필요한 메모리 사용량을 셜정하므로 사전 "
+"설정 수준 값을 너무 높게 지정하면 RAM 용량이 적은 오래된 시스템에서 파일 압"
+"축 해제시 실패할 수 있습니다. 게다가, B<gzip>(1) 과 B<bzip2>(1)에서 처럼 종"
+"종 B<모든 동작에 -9를 몰래 활용하는건 바람직하지 않습니다>."
+
+#. type: TP
+#: ../src/xz/xz.1:711
+#, no-wrap
+msgid "B<-0> ... B<-3>"
+msgstr "B<-0> ... B<-3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:723
+msgid ""
+"These are somewhat fast presets. B<-0> is sometimes faster than B<gzip -9> "
+"while compressing much better. The higher ones often have speed comparable "
+"to B<bzip2>(1) with comparable or better compression ratio, although the "
+"results depend a lot on the type of data being compressed."
+msgstr ""
+"동작이 빠른 사전 설정 부류입니다. B<-0>은 때로는 B<gzip -9> 명령보다 압축율"
+"이 훨씬 우수하면서도 더 빠릅니다. 더 큰 값은 보통 B<bzip2>(1) 명령과 비교했"
+"을 떄 압축 결과가 압축 데이터에 따라 달라지더라도, 비교할 법한 속도 또는 더 "
+"나은 압축율을 보입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:723
+#, no-wrap
+msgid "B<-4> ... B<-6>"
+msgstr "B<-4> ... B<-6>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:737
+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> 옵션은 압축 해제시 메모리 사"
+"용량이 16MiB 밖에 안되기 때문에 파일을 배포할 때 최적의 선택인 기본 값입니"
+"다. (B<-5e> 또는 B<-6e>도 역시 고려할 만합니다. B<--extreme>을 참고하십시"
+"오.)"
+
+#. type: TP
+#: ../src/xz/xz.1:737
+#, no-wrap
+msgid "B<-7 ... -9>"
+msgstr "B<-7 ... -9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:744
+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>과 비슷하지만 압축 및 압축 해제시 요구 메모리 사용량이 더 높습니다. 압"
+"축 파일이 각각 8MiB, 16MiB, 32MiB 보다 클 경우에만 쓸만한 옵션입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:752
+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:754
+msgid "The following table summarises the features of the presets:"
+msgstr "다음 표에 사전 설정 기능을 정리했습니다:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "Preset"
+msgstr "Preset"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DictSize"
+msgstr "DictSize"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "CompCPU"
+msgstr "CompCPU"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "CompMem"
+msgstr "CompMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DecMem"
+msgstr "DecMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#: ../src/xz/xz.1:2840
+#, no-wrap
+msgid "-0"
+msgstr "-0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:843 ../src/xz/xz.1:2450
+#, no-wrap
+msgid "256 KiB"
+msgstr "256 KiB"
+
+#. type: TP
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2840 ../src/scripts/xzgrep.1:82
+#, no-wrap
+msgid "0"
+msgstr "0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:764 ../src/xz/xz.1:845 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "3 MiB"
+msgstr "3 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:763 ../src/xz/xz.1:843 ../src/xz/xz.1:844
+#: ../src/xz/xz.1:2451 ../src/xz/xz.1:2452 ../src/xz/xz.1:2454
+#, no-wrap
+msgid "1 MiB"
+msgstr "1 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:2451 ../src/xz/xz.1:2476
+#: ../src/xz/xz.1:2841
+#, no-wrap
+msgid "-1"
+msgstr "-1"
+
+#. type: TP
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:1758 ../src/xz/xz.1:2841
+#: ../src/scripts/xzgrep.1:86
+#, no-wrap
+msgid "1"
+msgstr "1"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "9 MiB"
+msgstr "9 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:764 ../src/xz/xz.1:844 ../src/xz/xz.1:845
+#: ../src/xz/xz.1:2452 ../src/xz/xz.1:2455 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "2 MiB"
+msgstr "2 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:2452 ../src/xz/xz.1:2477
+#: ../src/xz/xz.1:2842
+#, no-wrap
+msgid "-2"
+msgstr "-2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:1760 ../src/xz/xz.1:2842
+#, no-wrap
+msgid "2"
+msgstr "2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2477
+#, no-wrap
+msgid "17 MiB"
+msgstr "17 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2453 ../src/xz/xz.1:2478
+#: ../src/xz/xz.1:2843
+#, no-wrap
+msgid "-3"
+msgstr "-3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:843 ../src/xz/xz.1:846
+#: ../src/xz/xz.1:847 ../src/xz/xz.1:2453 ../src/xz/xz.1:2454
+#: ../src/xz/xz.1:2456
+#, no-wrap
+msgid "4 MiB"
+msgstr "4 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2843
+#, no-wrap
+msgid "3"
+msgstr "3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2458
+#: ../src/xz/xz.1:2459 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "32 MiB"
+msgstr "32 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847
+#, no-wrap
+msgid "5 MiB"
+msgstr "5 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:2454 ../src/xz/xz.1:2479
+#: ../src/xz/xz.1:2844
+#, no-wrap
+msgid "-4"
+msgstr "-4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:1759 ../src/xz/xz.1:1761
+#: ../src/xz/xz.1:1762 ../src/xz/xz.1:1764 ../src/xz/xz.1:2844
+#, no-wrap
+msgid "4"
+msgstr "4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "48 MiB"
+msgstr "48 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2455 ../src/xz/xz.1:2480
+#: ../src/xz/xz.1:2845
+#, no-wrap
+msgid "-5"
+msgstr "-5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2455 ../src/xz/xz.1:2456 ../src/xz/xz.1:2457
+#, no-wrap
+msgid "8 MiB"
+msgstr "8 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2845
+#, no-wrap
+msgid "5"
+msgstr "5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2480 ../src/xz/xz.1:2481
+#, no-wrap
+msgid "94 MiB"
+msgstr "94 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:2456 ../src/xz/xz.1:2481
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "-6"
+msgstr "-6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:769 ../src/xz/xz.1:770 ../src/xz/xz.1:771
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "6"
+msgstr "6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:2457 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "-7"
+msgstr "-7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2457
+#: ../src/xz/xz.1:2458 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "16 MiB"
+msgstr "16 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "186 MiB"
+msgstr "186 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:2458 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "-8"
+msgstr "-8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "370 MiB"
+msgstr "370 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851
+#, no-wrap
+msgid "33 MiB"
+msgstr "33 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:2459 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "-9"
+msgstr "-9"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2459
+#, no-wrap
+msgid "64 MiB"
+msgstr "64 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "674 MiB"
+msgstr "674 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852
+#, no-wrap
+msgid "65 MiB"
+msgstr "65 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:777
+msgid "Column descriptions:"
+msgstr "컬럼 설명:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:789
+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:798
+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:806
+msgid ""
+"CompMem contains the compressor memory requirements in the single-threaded "
+"mode. It may vary slightly between B<xz> versions. Memory requirements of "
+"some of the future multithreaded modes may be dramatically higher than that "
+"of the single-threaded mode."
+msgstr ""
+"CompMem은 단일-스레드 모드에서 필요한 압축 프로그램의 메모리 점유 용량입니"
+"다. B<xz> 버전에 따라 다를 수 있습니다. 앞으로 도입할 다중-스레드 모드의 메"
+"모리 사용량은 단일-스레드 모드에서의 그것보다는 훨씬 늘어납니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:813
+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 딕셔너리 크기 보다는 "
+"조금 많지만 테이블의 값은 MiB 용량으로 완전히 반올림한 값입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:814
+#, no-wrap
+msgid "B<-e>, B<--extreme>"
+msgstr "B<-e>, B<--extreme>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:823
+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<-3> 사전 설정 수준에서 약간 더 올라갈 뿐입니"
+"다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:835
+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 ""
+"4MiB와 8MiB 두 가지 딕셔너리 용량 설정이 있기 때문에 B<-3e> 와 B<-5e> 사전 설"
+"정을 (CompCPU 수치를 낮춰서) 각각 B<-4e> 와 B<-6e> 보다 약간 더 빠르게 설정"
+"할 수 있습니다. 이런 식으로 두 사전 설정이 동일하지 않습니다."
+
+#. type: tbl table
+#: ../src/xz/xz.1:843
+#, no-wrap
+msgid "-0e"
+msgstr "-0e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:843 ../src/xz/xz.1:844 ../src/xz/xz.1:845 ../src/xz/xz.1:847
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:850 ../src/xz/xz.1:851 ../src/xz/xz.1:852
+#: ../src/xz/xz.1:2848
+#, no-wrap
+msgid "8"
+msgstr "8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "-1e"
+msgstr "-1e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "13 MiB"
+msgstr "13 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "-2e"
+msgstr "-2e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "25 MiB"
+msgstr "25 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846
+#, no-wrap
+msgid "-3e"
+msgstr "-3e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846 ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "7"
+msgstr "7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:847
+#, no-wrap
+msgid "-4e"
+msgstr "-4e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "-5e"
+msgstr "-5e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2848
+#, no-wrap
+msgid "-6e"
+msgstr "-6e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:850
+#, no-wrap
+msgid "-7e"
+msgstr "-7e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:851
+#, no-wrap
+msgid "-8e"
+msgstr "-8e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:852
+#, no-wrap
+msgid "-9e"
+msgstr "-9e"
+
+#. type: Plain text
+#: ../src/xz/xz.1:864
+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 ""
+"예를 들면, 8MiB 딕셔너리를 활용하는 네가지 사전 설정이 있다고 할 때, 빠른 순"
+"으로 설정을 나열하자면, B<-5>, B<-6>, B<-5e>, B<-6e> 입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:864
+#, no-wrap
+msgid "B<--fast>"
+msgstr "B<--fast>"
+
+#. type: TP
+#: ../src/xz/xz.1:867
+#, no-wrap
+msgid "B<--best>"
+msgstr "B<--best>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:878
+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:878
+#, no-wrap
+msgid "B<--block-size=>I<size>"
+msgstr "B<--block-size=>I<E<lt>크기E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:891
+msgid ""
+"When compressing to the B<.xz> format, split the input data into blocks of "
+"I<size> 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<E<lt>크기E<gt>> 바이트 블록으로 입"
+"력 데이터를 쪼갭니다. 각각의 블록은 다중-스레드 방식으로 처리할 수 있고 임"
+"의 접근 압축 해제 가능성을 제한할 수 있게 개별적으로 압축 처리합니다. 이 옵"
+"션은 보통 다중-스레드 모드에서 기본 블록 크기를 지정할 때 사용하지만, 단일-스"
+"레드 모드에서도 사용할 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:909
+msgid ""
+"In multi-threaded mode about three times I<size> bytes will be allocated in "
+"each thread for buffering input and output. The default I<size> 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<size> less than the LZMA2 dictionary size is waste of RAM "
+"because then the LZMA2 dictionary buffer will never get fully used. The "
+"sizes of the blocks are stored in the block headers, which a future version "
+"of B<xz> will use for multi-threaded decompression."
+msgstr ""
+"다중-스레드 모드에서는 약 3배 용량의 I<E<lt>크기E<gt>> 바이트만큼 각 스레드 "
+"별로 입출력 버퍼링용 공간을 할당합니다. 기본 I<E<lt>크기E<gt>>는 LZMA2 딕셔"
+"너리 크기 또는 1MiB 중 가장 큰 쪽의 세 배입니다. 보통 바람직한 값으로 LZMA2 "
+"딕셔너리 크기나 최소한 1MiB의 2\\(en4배입니다. LZMA2 딕셔너리 크기보다 작은 "
+"I<E<lt>크기E<gt>> 는 램의 소모적 사용 공간으로 할당하는데 LZMA2 딕셔너리 버퍼"
+"를 할당한 용량 크기 전체를 다 사용하지 않기 때문입니다. 블록 크기는 블록 헤"
+"더에 저장하며, 블록 헤더는 B<xz> 차기 버전에서 다중-스레드 압축 해제시 활용"
+"할 예정입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:918
+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 a future version of B<xz> won't be able decompress the files in "
+"multi-threaded mode."
+msgstr ""
+"단일-스레드 모드에서는 기본적으로 블록 쪼개기를 하지 않습니다. 이 옵션을 설"
+"정한다고 해서 메모리 사용에 영향을 주지는 않습니다. 블록 헤더에 크기 정보를 "
+"저장하지 않기 때문에 단일-스레드 모드에서 만든 파일은 다중-스레드 모드에서 만"
+"든 파일과 동일하지 않습니다. 크기 정보의 누락은 또한 B<xz> 차기 버전에서 다"
+"중-스레드 모드에서 압축 해제가 불가능함을 의미하기도 합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:918
+#, no-wrap
+msgid "B<--block-list=>I<sizes>"
+msgstr "B<--block-list=>I<E<lt>크기E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:924
+msgid ""
+"When compressing to the B<.xz> format, start a new block after the given "
+"intervals of uncompressed data."
+msgstr ""
+"B<.xz> 형식으로 압축할 때, 압축하지 않은 데이터에 주어진 처리 시간 간격 이후"
+"에 새 블록 처리를 시작합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:930
+msgid ""
+"The uncompressed I<sizes> of the blocks are specified as a comma-separated "
+"list. Omitting a size (two or more consecutive commas) is a shorthand to "
+"use the size of the previous block."
+msgstr ""
+"압축하지 않은 블록 I<E<lt>크기E<gt>>는 쉼표로 구분한 목록으로 지정합니다. 크"
+"기 값을 생략(둘 이상의 연속 쉼표)는 이전 블록 크기를 계속 사용하겠다는 의미입"
+"니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:940
+msgid ""
+"If the input file is bigger than the sum of I<sizes>, the last value in "
+"I<sizes> is repeated until the end of the file. A special value of B<0> may "
+"be used as the last value to indicate that the rest of the file should be "
+"encoded as a single block."
+msgstr ""
+"입력 파일이 I<E<lt>크기E<gt>>의 합보다 크면, 마지막 I<E<lt>크기E<gt>> 값을 파"
+"일 마지막까지 반복해서 사용합니다. 특별히 B<0> 값을 마지막 값으로 사용하여 "
+"파일 나머지 부분을 단일 블록으로 인코딩해야 한다는 의미를 나타낼 수도 있습니"
+"다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:955
+msgid ""
+"If one specifies I<sizes> that exceed the encoder's block size (either the "
+"default value in threaded mode or the value specified with B<--block-"
+"size=>I<size>), the encoder will create additional blocks while keeping the "
+"boundaries specified in I<sizes>. 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 ""
+"인코더 블록 크기를 초과하는 I<E<lt>크기E<gt>> 값을 지정하면(스레드 모드 기본"
+"값 또는 B<--block-size=>I<E<lt>크기E<gt>> 옵션으로 지정한 값), 인코더는 "
+"I<E<lt>크기E<gt>> 지정 용량 범위는 유지하면서 추가 블록을 만듭니다. 예를 들"
+"면 B<--block-size=10MiB> B<--block-list=5MiB,10MiB,8MiB,12MiB,24MiB> 옵션을 "
+"지정하고 입력 파일을 80MiB 용량으로 전달하면, 각각 5, 10, 8, 10, 2, 10, 10, "
+"4, 10, 10, 1 MiB 용량을 차지하는 블록 11개를 결과물로 내줍니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:961
+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:961
+#, no-wrap
+msgid "B<--flush-timeout=>I<timeout>"
+msgstr "B<--flush-timeout=>I<E<lt>제한시간E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:978
+msgid ""
+"When compressing, if more than I<timeout> 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<xz> is used to compress data that is "
+"streamed over a network. Small I<timeout> values make the data available at "
+"the receiving end with a small delay, but large I<timeout> values give "
+"better compression ratio."
+msgstr ""
+"압축할 때, 이전 데이터를 소거하고 다음 입력을 블록 단위로 더 읽는데 I<E<lt>제"
+"한시간E<gt>> 밀리초(양의 정수값)가 지났을 경우, 대기중이던 모든 입력 데이터"
+"를 인코더에서 소거한 다음 출력 스트림에 전달합니다. 이런 동작은 네트워크로 "
+"스트리밍한 데이터를 B<xz>로 압축할 때 쓸만합니다. I<E<lt>제한시간E<gt>> 값"
+"을 적게 지정하면 적은 지연 시간에 데이터를 받아낼 수 있지만 I<E<lt>제한시간"
+"E<gt>> 값을 크게 하면 압축율을 높일 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:986
+msgid ""
+"This feature is disabled by default. If this option is specified more than "
+"once, the last one takes effect. The special I<timeout> value of B<0> can "
+"be used to explicitly disable this feature."
+msgstr ""
+"이 기능은 기본적으로 꺼져있습니다. 이 옵션을 한번 이상 지정하면, 마지막 옵션"
+"의 값대로 동작합니다. 특별히 I<E<lt>제한시간E<gt>> 값을 B<0>으로 설정하면 "
+"이 설정을 완전히 끌 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:988
+msgid "This feature is not available on non-POSIX systems."
+msgstr "이 기능은 POSIX 시스템이 아닌 곳에서는 사용할 수 없습니다."
+
+#. FIXME
+#. type: Plain text
+#: ../src/xz/xz.1:996
+msgid ""
+"B<This feature is still experimental.> Currently B<xz> is unsuitable for "
+"decompressing the stream in real time due to how B<xz> does buffering."
+msgstr ""
+"B<이 기능은 여전히 시험중입니다>. 현재로서는, B<xz> 버퍼링 처리 방식 때문에 "
+"B<xz>의 실시간 스트림 압축 해제 기능 활용은 적절하지 않습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:996
+#, no-wrap
+msgid "B<--memlimit-compress=>I<limit>"
+msgstr "B<--memlimit-compress=>I<E<lt>제한용량E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1001
+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:1014
+msgid ""
+"If the compression settings exceed the I<limit>, B<xz> 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<limit>, and finally reducing the LZMA2 dictionary size."
+msgstr ""
+"압축 설정이 I<E<lt>제한용량E<gt>>을 초과하면, B<xz>는 설정 값의 하향 조정을 "
+"시도하여 한계 값을 더이상 넘치지 않게 하고 자동 조절을 끝냈다는 알림을 표시합"
+"니다. 조정은 다음 순서대로 진행합니다. 스레드 수를 줄입니다. 다중-스레드 모"
+"드에서 스레드 하나의 할당 한계치가 I<E<lt>제한용량E<gt>>을 넘으면 단일-스레"
+"드 모드로 전환합니다. 그 다음 마지막으로 LZMA2 딕셔너리 크기를 줄입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1022
+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:1029
+msgid ""
+"If the I<limit> cannot be met even with the adjustments described above, an "
+"error is displayed and B<xz> will exit with exit status 1."
+msgstr ""
+"I<E<lt>제한용량E<gt>> 값이 아래 설명한 조건에 맞지 않으면, 오류가 나타나고 "
+"B<xz> 명령은 종료 상태 1번을 반환하며 빠져나갑니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1033
+msgid "The I<limit> can be specified in multiple ways:"
+msgstr "I<E<lt>제한용량E<gt>> 값은 여러 방식으로 지정할 수 있습니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1043
+msgid ""
+"The I<limit> can be an absolute value in bytes. Using an integer suffix "
+"like B<MiB> can be useful. Example: B<--memlimit-compress=80MiB>"
+msgstr ""
+"I<E<lt>제한용량E<gt>> 값은 바이트 용량 절대값입니다. 정수 값을 사용하되 "
+"B<MiB>와 같은 접미사를 사용하는게 좋습니다. 예: B<--memlimit-compress=80MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1055
+msgid ""
+"The I<limit> can be specified as a percentage of total physical memory "
+"(RAM). This can be useful especially when setting the B<XZ_DEFAULTS> "
+"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<E<lt>제한용량E<gt>> 값은 총 물리 메모리(RAM) 용량의 백분율로 지정할 수도 있"
+"습니다. 다른 컴퓨터끼리 공유하는 셸 초기화 스크립트의 B<XZ_DEFAULTS> 환경 변"
+"수에 값을 설정할 때 특히 쓸만합니다. 이런 방식으로 설정하면 시스템의 메모리 "
+"설치 용량에 따라 자동으로 늘어납니다. 예: B<--memlimit-compress=70%>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1065
+msgid ""
+"The I<limit> can be reset back to its default value by setting it to B<0>. "
+"This is currently equivalent to setting the I<limit> to B<max> (no memory "
+"usage limit)."
+msgstr ""
+"I<E<lt>제한용량E<gt>> 값은 B<0> 기본값으로 설정하여 초기화할 수 있습니다. 현"
+"재로서는 I<E<lt>제한용량E<gt>> 값이 I<max>(최대) (메모리 사용 한계 없음) 인 "
+"상태와 동일합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1089
+msgid ""
+"For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+"B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. On MIPS32 B<2000\\ "
+"MiB> is used instead. (The values B<0> and B<max> 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<xz> 32비트 버전에서는 몇가지 특별한 경우가 있습니다. I<E<lt>제한용량E<gt>> "
+"값이 B<4020MiB>를 넘으면 I<E<lt>제한용량E<gt>>을 B<4020MiB>로 고정합니다. "
+"MIPS32에서는 B<2000MiB>로 대신 고정합니다. (B<0>과 B<max>는 이 경우에 해당하"
+"지 않습니다. 압축 해제시 비슷한 기능은 없습니다.) 이 경우 32비트 실행 파일"
+"이 4GiB(MIPS32의 경우 2GiB) 주소 영역에 접근할 때 매우 용이하며, 다른 경우에"
+"는 원하는대로 문제를 일으키지 않습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1092
+msgid "See also the section B<Memory usage>."
+msgstr "B<메모리 활용> 섹션도 참고하십시오."
+
+#. type: TP
+#: ../src/xz/xz.1:1092
+#, no-wrap
+msgid "B<--memlimit-decompress=>I<limit>"
+msgstr "B<--memlimit-decompress=>I<E<lt>제한용량E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1106
+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<limit>, "
+"B<xz> will display an error and decompressing the file will fail. See B<--"
+"memlimit-compress=>I<limit> for possible ways to specify the I<limit>."
+msgstr ""
+"압축 해제시 메모리 사용 한계 용량을 설정합니다. B<--list> 모드에도 영향을 줍"
+"니다. I<E<lt>제한용량E<gt>>을 넘기지 않고서는 동작이 진행이 안될 경우, "
+"B<xz> 에서는 오류를 나타내고 파일 압축 해제를 실패로 간주합니다. I<E<lt>제한"
+"용량E<gt>>을 지정하는 가능한 방법에 대해서는 B<--memlimit-compress=>I<E<lt>제"
+"한용량E<gt>> 옵션을 참고하십시오."
+
+#. type: TP
+#: ../src/xz/xz.1:1106
+#, no-wrap
+msgid "B<--memlimit-mt-decompress=>I<limit>"
+msgstr "B<--memlimit-mt-decompress=>I<E<lt>제한용량E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1128
+msgid ""
+"Set a memory usage limit for multi-threaded decompression. This can only "
+"affect the number of threads; this will never make B<xz> refuse to "
+"decompress a file. If I<limit> is too low to allow any multi-threading, the "
+"I<limit> is ignored and B<xz> 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<limit> for "
+"multi-threading will never be higher than the limit set with B<--memlimit-"
+"decompress>."
+msgstr ""
+"다중-스레드 모드 압축 해제시 메모리 사용 한계 용량을 설정합니다. 스레드 수"
+"에 영향을 줄 수도 있습니다. B<xz>에서 파일 압축 해제를 거부하게 하진 않습니"
+"다. I<E<lt>제한용량E<gt>> 수치가 다중-스레드로 처리하기에 너무 낮다면, "
+"I<E<lt>제한용량E<gt>> 값을 무시하고 B<xz> 동작을 단일-스레드 모드로 계속 진행"
+"합니다. 참고로 B<--memlimit-decompress> 옵션도 사용하면, 단일-스레드 모드와 "
+"다중-스레드 모드 두 경우에 모두 적용하기에, 다중-스레드 모드에 적용할 I<E<lt>"
+"제한용량E<gt>> 값은 B<--memlimit-decompress>에 설정하는 제한 값보다 더 크면 "
+"안됩니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1135
+msgid ""
+"In contrast to the other memory usage limit options, B<--memlimit-mt-"
+"decompress=>I<limit> has a system-specific default I<limit>. B<xz --info-"
+"memory> can be used to see the current value."
+msgstr ""
+"다른 메모리 사용 용량 제한 옵션과는 달리, B<--memlimit-mt-decompress=>I<E<lt>"
+"제한용량E<gt>> 옵션은 시스템별 기본 I<E<lt>제한용량E<gt>> 값을 지닙니다. 현"
+"재 설정 값은 B<xz --info-memory> 명령으로 확인해볼 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1151
+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<limit> is too low on your system, "
+"feel free to increase the I<limit> but never set it to a value larger than "
+"the amount of usable RAM as with appropriate input files B<xz> 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<E<lt>제한용량E<gt>>이 시스템의 사양에 비해 낮다면, "
+"I<E<lt>제한용량E<gt>> 값을 자유롭게 올리시되, B<xz> 에서 적은 스레드 수에도 "
+"메모리 공간 할당을 시도하는 만큼, 입력 파일에 적절한 수준으로 가용 RAM 용량"
+"을 넘는 큰 값을 설정하지 마십시오. 메모리나 스와핑 영역 공간이 줄어들면 압축"
+"해제 성능을 개선하지 못합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1163
+msgid ""
+"See B<--memlimit-compress=>I<limit> for possible ways to specify the "
+"I<limit>. Setting I<limit> to B<0> resets the I<limit> to the default "
+"system-specific value."
+msgstr ""
+"I<E<lt>제한용량E<gt>> 값을 지정하는 가능한 방법을 보려면 B<--memlimit-"
+"compress=>I<E<lt>제한용량E<gt>> 옵션을 참고하십시오. I<E<lt>제한용량E<gt>> "
+"값을 B<0>으로 설정하면 I<E<lt>제한용량E<gt>> 값이 시스템 지정 기본값으로 바뀝"
+"니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1163
+#, no-wrap
+msgid "B<-M> I<limit>, B<--memlimit=>I<limit>, B<--memory=>I<limit>"
+msgstr "B<-M> I<E<lt>제한용량E<gt>>, B<--memlimit=>I<E<lt>제한용량E<gt>>, B<--memory=>I<E<lt>제한용량E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1169
+msgid ""
+"This is equivalent to specifying B<--memlimit-compress=>I<limit> B<--"
+"memlimit-decompress=>I<limit> B<--memlimit-mt-decompress=>I<limit>."
+msgstr ""
+"B<--memlimit-compress=>I<E<lt>제한용량E<gt>> B<--memlimit-decompress=>I<E<lt>"
+"제한용량E<gt>> B<--memlimit-mt-decompress=>I<E<lt>제한용량E<gt>> 지정과 동일"
+"합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1169
+#, no-wrap
+msgid "B<--no-adjust>"
+msgstr "B<--no-adjust>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1179
+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<xz> 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<xz>가 다중-스레"
+"드 모드에서 단일-스레드 모드로 전환하고 LZMA2 딕셔너리 크기를 줄이는 동작을 "
+"막아줍니다. 심지어 이 옵션을 사용하면 메모리 사용 한계를 만족하도록 스레드 "
+"수를 줄여 압축 결과물 출력에 영향이 가지 않게 합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1182
+msgid ""
+"Automatic adjusting is always disabled when creating raw streams (B<--"
+"format=raw>)."
+msgstr "원시 스트림(B<--format=raw>)을 만들 떄 자동 조정은 항상 꺼집니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1182
+#, no-wrap
+msgid "B<-T> I<threads>, B<--threads=>I<threads>"
+msgstr "B<-T> I<E<lt>스레드수E<gt>>, B<--threads=>I<E<lt>스레드수E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1197
+msgid ""
+"Specify the number of worker threads to use. Setting I<threads> to a "
+"special value B<0> makes B<xz> use up to as many threads as the processor(s) "
+"on the system support. The actual number of threads can be fewer than "
+"I<threads> 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<E<lt>스레드수E<gt>> 값을 B<0> 값으로 "
+"설정하면, B<xz>는 시스템에서 지원하는 최대 프로세서 스레드 수를 모두 확보합니"
+"다. 실제 스레드 수는 입력 파일이 주어진 설정대로 스레드 처리를 할 만큼 그렇"
+"게 크지 않을 경우, 내지는 더 많은 스레드를 사용했을 때 메모리 사용량 한계를 "
+"초과할 경우 I<E<lt>스레드수E<gt>> 보다 적을 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1216
+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<threads> to B<1> will use the single-threaded "
+"mode. Setting I<threads> to any other value, including B<0>, will use the "
+"multi-threaded compressor even if the system supports only one hardware "
+"thread. (B<xz> 5.2.x used single-threaded mode in this situation.)"
+msgstr ""
+"단일-스레드와 다중-스레드 압축 프로그램은 다른 출력 결과물을 냅니다. 단일-스"
+"레드 압축 프로그램은 작은 파일 크기 결과물을 내놓지만, 다중-스레드 압축 프로"
+"그램의 경우 다중-스레드 압축 프로그램에서 내놓은 결과물은 다중-스레드로만 압"
+"축을 해제할 수 있습니다. I<E<lt>스레드수E<gt>>를 B<1>로 설정하면 단일-스레"
+"드 모드를 사용합니다. I<E<lt>스레드수E<gt>>를 B<0>과 다른 값으로 설정하면, "
+"시스템에서 실제로 하드웨어 스레드가 1개만 지원한다 하더라도, 다중-스레드 압"
+"축 프로그램을 사용합니다. (B<xz> 5.2.x에서는 이 경우 단일-스레드 모드를 활용"
+"합니다.)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1235
+msgid ""
+"To use multi-threaded mode with only one thread, set I<threads> to B<+1>. "
+"The B<+> prefix has no effect with values other than B<1>. A memory usage "
+"limit can still make B<xz> switch to single-threaded mode unless B<--no-"
+"adjust> is used. Support for the B<+> prefix was added in B<xz> 5.4.0."
+msgstr ""
+"단일-스레드로 다중-스레드 모드를 사용하려면, I<E<lt>스레드수E<gt>>를 B<+1>로 "
+"설정하십시오. B<+> 접두사는 B<1> 이외의 값에는 영향을 주지 않습니다. 메모리 "
+"사용량 한계 설정은 B<xz>을 B<--no-adjust> 옵션을 쓰기 전까지는 단일-스레드로 "
+"전환하게 합니다. B<+> 접두사 지원은 B<xz> 5.4.0에 추가했습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1250
+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<xz> from compressing or decompressing. This default soft "
+"limit will not make B<xz> switch from multi-threaded mode to single-threaded "
+"mode. The active limits can be seen with B<xz --info-memory>."
+msgstr ""
+"자동 스레드 수를 요청했고 메모리 사용 한계를 지정하지 않았다면, 시스템에 맞게"
+"끔 가능한 스레드 수를 제한하는 기본 소프트 제한 값을 사용합니다. 스레드 수가 "
+"한개가 되면 무시하는 이런 개념이 소프트 제한이기에, B<xz>로 하여금 압축 동작 "
+"및 압축 해제 동작 수행시 멈추지 않습니다. 이 가본 소프트 제한 값은 B<xz> 실"
+"행 도중 다중-스레드 모드에서 단일-스레드 모드로 바뀌게 하지는 않습니다. 활"
+"성 제한 값은 B<xz --info-memory> 명령으로 볼 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1257
+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<size> option."
+msgstr ""
+"현재 스레딩 처리 방식은 입력을 블록 단위로 쪼개고 각각의 블록을 독립적으로 압"
+"축하는 동작을 취합니다. 기본 블록 크기는 압축 수준에 따라 다르며 B<--block-"
+"size=>I<E<lt>크기E<gt>> 옵션으로 재지정할 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1265
+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<size> has been used."
+msgstr ""
+"스레드 압축 해제 방식은 여러 블록이 블록 헤더에 넣은 크기 정보와 함께 들어간 "
+"파일에만 동작합니다. 다중-스레드 모드에서 압축한 충분히 큰 모든 파일은 이 조"
+"건에 만족하지만, 단일-스레드 모드에서 압축한 파일은 B<--block-size=>I<E<lt>크"
+"기E<gt>> 옵션을 지정하더라도 조건에 만족하지 않습니다."
+
+#. type: SS
+#: ../src/xz/xz.1:1266 ../src/xz/xz.1:2819
+#, no-wrap
+msgid "Custom compressor filter chains"
+msgstr "개별 압축 필터 체인 설정"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1282
+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:1289
+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 ""
+"필터 체인은 명령행 파이핑에 비교할 수 있습니다. 압축할 때, 압축하지 않은 입"
+"력을 첫번째 필터로 놓고, 출력 대상(이 있으면)을 다음 필터로 지정합니다. 최"
+"종 필터의 출력은 압축 파일로 기옥합니다. 체인의 최대 필터 수는 4이지만, 필"
+"터 체인상 필터 갯수는 보통 1~2개입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1297
+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:1305
+msgid ""
+"A custom filter chain is specified by using one or more filter options in "
+"the order they are wanted in the filter chain. That is, the order of filter "
+"options is significant! When decoding raw streams (B<--format=raw>), the "
+"filter chain is specified in the same order as it was specified when "
+"compressing."
+msgstr ""
+"개별 필터 체인은 필터 체인에서 원하는 순서대로 하나 이상의 필터 옵션을 사용하"
+"여 지정합니다. 이는, 필터 옵션 순서가 중요하다는 뜻입니다! 원시 스트림을 디"
+"코딩할 때(B<--format=raw>), 필터 체인은 압축할 때 지정했던 동일한 순서대로 지"
+"정합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1314
+msgid ""
+"Filters take filter-specific I<options> as a comma-separated list. Extra "
+"commas in I<options> are ignored. Every option has a default value, so you "
+"need to specify only those you want to change."
+msgstr ""
+"필터는 쉼표로 구분하는 필터별 I<E<lt>옵션E<gt>>이 있습니다. I<E<lt>옵션E<gt>>"
+"에 추가로 입력한 쉼표는 무시합니다. 모든 옵션 값에는 기본값이 있어, 값을 바"
+"꾸려면 지정해야합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1323
+msgid ""
+"To see the whole filter chain and I<options>, use B<xz -vv> (that is, use "
+"B<--verbose> twice). This works also for viewing the filter chain options "
+"used by presets."
+msgstr ""
+"전체 필터 체인과 I<E<lt>옵션E<gt>>을 보려면 B<xz -vv> (B<--verbose> 두 번)명"
+"령을 사용하십시오. 이 명령은 사전 설정이 사용하는 필터 체인 옵션도 볼 수 있"
+"습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1323
+#, no-wrap
+msgid "B<--lzma1>[B<=>I<options>]"
+msgstr "B<--lzma1>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1326
+#, no-wrap
+msgid "B<--lzma2>[B<=>I<options>]"
+msgstr "B<--lzma2>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1331
+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:1343
+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은 고전 필터로, LZMA1만 지원하는 고전 B<.lzma> 파일 형식에서만 지원합니"
+"다. LZMA2는 LZMA1의 업데이트 버전으로 LZMA1의 실질적 문제를 해결했습니다. "
+"B<.xz> 형식은 LZMA2 필터를 사용하며 LZMA1 필터는 전적으로 지원하지 않습니"
+"다. 압축 속도와 압축율은 LZMA1과 LZMA2가 실질적으로 동일합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1346
+msgid "LZMA1 and LZMA2 share the same set of I<options>:"
+msgstr "LZMA1과 LZMA2는 동일한 I<E<lt>옵션E<gt>> 집합을 공유합니다:"
+
+#. type: TP
+#: ../src/xz/xz.1:1347
+#, no-wrap
+msgid "B<preset=>I<preset>"
+msgstr "B<preset=>I<E<lt>사전설정E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1374
+msgid ""
+"Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+"matches B<--extreme>. If no B<preset> is specified, the default values of "
+"LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgstr ""
+"LZMA1 또는 LZMA2의 모든 I<E<lt>옵션E<gt>>을 I<E<lt>사전설정E<gt>>으로 초기화"
+"합니다. I<E<lt>사전설정E<gt>> 값은 정수 값으로 이루어져 있으며, 사전 설정에 "
+"변형을 줄 떄 단일 문자가 따라올 수도 있습니다. 정수 값은 B<0>에서 B<9> 까지"
+"이며, 명령행 옵션에서 B<-0> \\&...\\& B<-9>로 대응합니다. 변형 옵션으로 지원"
+"하는 문자는 현재 B<e> 뿐이며, B<--extreme>에 대응합니다. I<E<lt>사전설정"
+"E<gt>> 값을 지정하지 않으면, LZMA1 또는 LZMA2 기본값을 사전 설정 B<6>에서 가"
+"져온 I<E<lt>옵션E<gt>>으로 취합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1374
+#, no-wrap
+msgid "B<dict=>I<size>"
+msgstr "B<dict=>I<E<lt>크기E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1389
+msgid ""
+"Dictionary (history buffer) I<size> 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<size> usually improves compression ratio, but a "
+"dictionary bigger than the uncompressed file is waste of memory."
+msgstr ""
+"딕셔너리(기록 버퍼) I<E<lt>크기E<gt>>는 최근 처리한 비압축 데이터를 바이트 "
+"단위로 메모리에 얼마나 유지하는지 나타냅니다. 알고리즘은 비압축 데이터상 바"
+"이트 시퀀스(일치 항목) 반복 탐색을 시도하며, 해당 부분을 딕셔너리의 현재 참조"
+"로 치환합니다. 딕셔너리가 크면 일치하는 항목을 찾을 기회가 더 많아집니다. 따"
+"라서, 딕셔너리 I<E<lt>크기E<gt>>를 더욱 크게 설정하면 압축율을 증가할 수는 있"
+"지만, 압축하지 않은 파일보다 딕셔너리가 크면 메모리 낭비율이 올라갑니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1398
+msgid ""
+"Typical dictionary I<size> 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<E<lt>크기E<gt>>는 64KiB 에서 64MiB 정도 됩니다. 최소 4KiB 입"
+"니다. 압축시 최대 용량은 현재 1.5GiB(1536MiB)로 나타납니다. 압축 해제 프로그"
+"램에도 4GiB 미만으로 딕셔너리 크기를 이미 지원하며 4GiB 라는 수치는 LZMA1과 "
+"LZMA2 스트림 형식의 최대값입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1425
+msgid ""
+"Dictionary I<size> and match finder (I<mf>) together determine the memory "
+"usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary "
+"I<size> 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<size> either as "
+"2^I<n> or 2^I<n> + 2^(I<n>-1), so these I<sizes> are somewhat preferred for "
+"compression. Other I<sizes> will get rounded up when stored in the B<.xz> "
+"headers."
+msgstr ""
+"딕셔너리 I<E<lt>크기E<gt>>와 검색기(I<mf>)는 LZMA1 또는 LZMA 인코더의 메모리 "
+"사용량을 함께 결정합니다. 동일한(또는 더 큰) 딕셔너리 I<E<lt>크기E<gt>>가 데"
+"이터를 압축했을 때만큼 압축 해제할 떄 필요하기 때문에, 디코더의 메모리 사용량"
+"은 압축할 때의 딕셔너리 크기로 결정합니다. B<.xz> 헤더에는 딕셔너리 I<E<lt>"
+"크기E<gt>>를 2^I<n> 또는 2^I<n> + 2^(I<n>-1) 으로 저장하기에, 이 I<E<lt>크기"
+"E<gt>> 값을 압축할 때 선호하는 편입니다. 다른 I<E<lt>크기E<gt>> 값은 B<.xz> "
+"헤더에 저장할 때 반올림합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1425
+#, no-wrap
+msgid "B<lc=>I<lc>"
+msgstr "B<lc=>I<lc>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1434
+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<lc> and I<lp> "
+"must not exceed 4."
+msgstr ""
+"리터럴 컨텍스트 비트 수를 지정합니다. 최소 값은 0이고 최대 값은 4입니다. 기"
+"본 값은 3입니다. 추가로, I<lc> 값과 I<lp> 값의 합은 4를 넘으면 안됩니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1439
+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 ""
+"조건이 일치하지 않아 인코딩할 수 없는 모든 바이트는 리터럴로 인코딩합니다. "
+"이 말인 즉슨, 간단히 8비트 바이트로서의 리터럴을 한번에 하나씩 인코딩합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1453
+msgid ""
+"The literal coding makes an assumption that the highest I<lc> 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<lc> is at least "
+"3, the literal coding can take advantage of this property in the "
+"uncompressed data."
+msgstr ""
+"리터럴 코딩을 할 때 이전 비압축 바이트와 다음 바이트와의 관련성을 가진 가장 "
+"많은 I<lc> 비트 수를 가정합니다. 예를 들면, 보통 영문 문장의 경우 대문자 다"
+"음에 종종 소문자가 오고, 소문자 다음에 다른 소문자가 따라옵니다. US-ASCII 문"
+"자 세트에서는 가장 긴 비트 3개는 대문자에 대해 010, 소문자에 대해 011입니"
+"다. I<lc> 값이 최소한 3이면, 리터럴 코딩시 비압축 데이터에 대해 이런 속성의 "
+"장점을 취할 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1462
+msgid ""
+"The default value (3) is usually good. If you want maximum compression, "
+"test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+"compression worse. If it makes it worse, test B<lc=2> too."
+msgstr ""
+"(어쨌거나) 기본값 (3)은 보통 적절합니다. 최대 압축을 원한다면 B<lc=4> 값을 "
+"시험해보십시오. 때로는 약간 도움이 되기도 하겠지만, 오히려 결과가 안좋을 수"
+"도 있습니다. 결과가 엄한 방향으로 간다면, B<lc=2> 값도 시험해보십시오."
+
+#. type: TP
+#: ../src/xz/xz.1:1462
+#, no-wrap
+msgid "B<lp=>I<lp>"
+msgstr "B<lp=>I<lp>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1466
+msgid ""
+"Specify the number of literal position bits. The minimum is 0 and the "
+"maximum is 4; the default is 0."
+msgstr ""
+"리터럴 위치 비트 수를 지정하빈다. 최소 값은 0이고 최대 값은 4입니다. 기본 값"
+"은 0입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1473
+msgid ""
+"I<Lp> affects what kind of alignment in the uncompressed data is assumed "
+"when encoding literals. See I<pb> below for more information about "
+"alignment."
+msgstr ""
+"I<lp> 값은 리터럴 인코딩 진행시 비압축 데이터 정렬 방식 고려에 영향을 줍니"
+"다. 정렬 방식에 대한 자세한 정보는 하단 I<pb>를 참고하십시오."
+
+#. type: TP
+#: ../src/xz/xz.1:1473
+#, no-wrap
+msgid "B<pb=>I<pb>"
+msgstr "B<pb=>I<pb>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1477
+msgid ""
+"Specify the number of position bits. The minimum is 0 and the maximum is 4; "
+"the default is 2."
+msgstr ""
+"위치 비트 수를 지정합니다. 최소 값은 0이며 최대 값은 4입니다. 기본값은 2입"
+"니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1484
+msgid ""
+"I<Pb> affects what kind of alignment in the uncompressed data is assumed in "
+"general. The default means four-byte alignment (2^I<pb>=2^2=4), which is "
+"often a good choice when there's no better guess."
+msgstr ""
+"I<pb> 값은 보통 압축하지 않은 데이터에 어떤 정렬 방식을 고려하느냐에 영향을 "
+"줍니다. 기본적으로 4바이트 정렬(2^I<pb>=2^2=4)을 의미하는데, 이보다 더 나은 "
+"추측 값이 없어서 종종 최적의 선택으로 간주합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1498
+msgid ""
+"When the alignment is known, setting I<pb> 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<pb=0> can improve compression "
+"slightly. For UTF-16 text, B<pb=1> is a good choice. If the alignment is "
+"an odd number like 3 bytes, B<pb=0> might be the best choice."
+msgstr ""
+"정렬 상태를 알지 못할 경우, I<pb> 설정 값이 파일 크기를 조금 줄일 수 있습니"
+"다. 예를 들면, 텍스트 파일이 단일 바이트 단위로 정돈된 상태(US-ASCII, "
+"ISO-8859-*, UTF-8)라면, B<pb=0> 설정 값으로 압축율을 조금 개선할 수 있습니"
+"다. UTF-16 텍스트의 경우, B<pb=1> 설정 값이 좋은 선택입니다. 정렬 바이트가 "
+"3 바이트 같은 홀수 바이트일 경우, B<pb=0> 설정 값이 최적의 선택일지도 모릅니"
+"다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1506
+msgid ""
+"Even though the assumed alignment can be adjusted with I<pb> and I<lp>, "
+"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<pb> 값과 I<lp> 값으로 조정하긴 하지만, LZMA1과 LZMA2는 여전히 "
+"16바이트 정렬 방식으로 선호합니다. LZMA1 또는 LZMA2로 종종 압축하는 파일 형"
+"식이라고 하면 고려해볼만 합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1506
+#, no-wrap
+msgid "B<mf=>I<mf>"
+msgstr "B<mf=>I<mf>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1521
+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<preset>: 0 uses B<hc3>, "
+"1\\(en3 use B<hc4>, and the rest use B<bt4>."
+msgstr ""
+"일치 검색기는 인코더 속도, 메모리 사용량, 압축율에 주된 영향을 줍니다. 보통 "
+"해시 체인 검색기는 이진 트리 검색기보다 빠르긴 합니다. 기본 값은 I<E<lt>사전"
+"설정E<gt>>에 따라 다릅니다. 0은 B<hc3>을, 1\\(en3은 B<hc4>를, 나머지는 B<bt4>"
+"를 활용합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1527
+msgid ""
+"The following match finders are supported. The memory usage formulas below "
+"are rough approximations, which are closest to the reality when I<dict> is a "
+"power of two."
+msgstr ""
+"다음 검색 필터를 지원합니다. 메모리 사용 공식은 I<dict> 값이 2의 승수일 경"
+"우 실제에 가까운 근사치입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1528
+#, no-wrap
+msgid "B<hc3>"
+msgstr "B<hc3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1531
+msgid "Hash Chain with 2- and 3-byte hashing"
+msgstr "2바이트, 3바이트 해싱 체인"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1535 ../src/xz/xz.1:1584
+msgid "Minimum value for I<nice>: 3"
+msgstr "I<nice> 최소값: 3"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1537 ../src/xz/xz.1:1556 ../src/xz/xz.1:1586
+#: ../src/xz/xz.1:1605
+msgid "Memory usage:"
+msgstr "메모리 사용:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1542
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 7.5 (조건: I<dict> E<lt>= 16 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1547
+msgid "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 5.5 + 64 MiB (조건: I<dict> E<gt> 16 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1547
+#, no-wrap
+msgid "B<hc4>"
+msgstr "B<hc4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1550
+msgid "Hash Chain with 2-, 3-, and 4-byte hashing"
+msgstr "2바이트, 3바이트, 4바이트 해싱 체인"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1554 ../src/xz/xz.1:1603
+msgid "Minimum value for I<nice>: 4"
+msgstr "I<nice> 최소값: 4"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1561
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 7.5 (조건: I<dict> E<lt>= 32 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1566
+msgid "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 6.5 (조건: I<dict> E<gt> 32 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1566
+#, no-wrap
+msgid "B<bt2>"
+msgstr "B<bt2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1569
+msgid "Binary Tree with 2-byte hashing"
+msgstr "2바이트 해싱 이진 트리"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1573
+msgid "Minimum value for I<nice>: 2"
+msgstr "I<nice> 최소값: 2"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1577
+msgid "Memory usage: I<dict> * 9.5"
+msgstr "메모리 사용: I<dict> * 9.5"
+
+#. type: TP
+#: ../src/xz/xz.1:1577
+#, no-wrap
+msgid "B<bt3>"
+msgstr "B<bt3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1580
+msgid "Binary Tree with 2- and 3-byte hashing"
+msgstr "2바이트, 3바이트 해싱 이진트리"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1591
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 11.5 (조건: I<dict> E<lt>= 16 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1596
+msgid "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 9.5 + 64 MiB (조건: I<dict> E<gt> 16 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1596
+#, no-wrap
+msgid "B<bt4>"
+msgstr "B<bt4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1599
+msgid "Binary Tree with 2-, 3-, and 4-byte hashing"
+msgstr "2바이트, 3바이트, 4바이트 해싱 이진 트리"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1610
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 11.5 (조건: I<dict> E<lt>= 32 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1615
+msgid "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 10.5 (조건: I<dict> E<gt> 32 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1616
+#, no-wrap
+msgid "B<mode=>I<mode>"
+msgstr "B<mode=>I<E<lt>모드E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1637
+msgid ""
+"Compression I<mode> specifies the method to analyze the data produced by the "
+"match finder. Supported I<modes> are B<fast> and B<normal>. The default is "
+"B<fast> for I<presets> 0\\(en3 and B<normal> for I<presets> 4\\(en9."
+msgstr ""
+"압축 I<E<lt>모드E<gt>> 값은 일치 검색기에서 생산하는 데이터 분석 방식을 지정"
+"합니다. 지원하는 I<E<lt>모드E<gt>>는 B<fast>와 B<normal> 입니다. 기본값은 "
+"I<E<lt>사전설정E<gt>>값 0\\(en3에 대해 B<fast>, I<E<lt>사전설정E<gt>>값 "
+"4\\(en9에 대해 B<normal>입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1646
+msgid ""
+"Usually B<fast> is used with Hash Chain match finders and B<normal> with "
+"Binary Tree match finders. This is also what the I<presets> do."
+msgstr ""
+"보통 B<fast>는 해시 체인 검색기에서 사용하며 B<normal>은 이진 트리 검색기에"
+"서 사용합니다. 이 동작은 또한 I<E<lt>사전설정E<gt>> 값이 할 일이기도 합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1646
+#, no-wrap
+msgid "B<nice=>I<nice>"
+msgstr "B<nice=>I<nice>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1653
+msgid ""
+"Specify what is considered to be a nice length for a match. Once a match of "
+"at least I<nice> bytes is found, the algorithm stops looking for possibly "
+"better matches."
+msgstr ""
+"일치하는 nice 길이를 지정합니다. 최소한 I<nice> 바이트 정도 일치하면, 알고리"
+"즘이 가능한 최선의 부분을 찾는 동작을 멈춥니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1660
+msgid ""
+"I<Nice> can be 2\\(en273 bytes. Higher values tend to give better "
+"compression ratio at the expense of speed. The default depends on the "
+"I<preset>."
+msgstr ""
+"I<nice> 값은 2\\(en273 바이트입니다. 값이 클 수록 속도 면에서는 손해를 보겠"
+"지만 압축율은 더욱 올라갑니다. 기본 값은 I<E<lt>사전설정E<gt>>값에 따라 다릅"
+"니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1660
+#, no-wrap
+msgid "B<depth=>I<depth>"
+msgstr "B<depth=>I<E<lt>깊이E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1670
+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<depth> from I<mf> and I<nice>."
+msgstr ""
+"일치 검색기에서의 최대 검색 깊이를 지정합니다. 기본값은 특별한 값 0으로 지정"
+"하며, 이 값으로 압축 프로그램이 I<mf> 와 I<nice>간 적절한 I<E<lt>깊이E<gt>> "
+"값을 결정합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1681
+msgid ""
+"Reasonable I<depth> for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary "
+"Trees. Using very high values for I<depth> can make the encoder extremely "
+"slow with some files. Avoid setting the I<depth> over 1000 unless you are "
+"prepared to interrupt the compression in case it is taking far too long."
+msgstr ""
+"적절한 해시 체인 I<E<lt>깊이E<gt>> 값은 이진 트리에서 4\\(en100 그리고 "
+"16\\(en1000 입니다. 상당히 큰 값을 I<E<lt>깊이E<gt>> 값으로 사용하면 일부 파"
+"일에 대해 인코더가 매우 느리게 동작할 수가 있습니다. 압축 시간이 너무 오래걸"
+"려서 동작을 중간에 끊을 준비가 되지 않은 이상 I<E<lt>깊이E<gt>> 설정 값은 "
+"1000을 넘지 않게하십시오."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1692
+msgid ""
+"When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary "
+"I<size>. LZMA1 needs also I<lc>, I<lp>, and I<pb>."
+msgstr ""
+"원시 스트림(B<--format=raw>)을 디코딩할 때, LZMA2는 딕셔너리 I<E<lt>크기"
+"E<gt>>만 필요합니다. LZMA1는 I<lc>, I<lp>, I<pb> 값이 모두 필요합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1692
+#, no-wrap
+msgid "B<--x86>[B<=>I<options>]"
+msgstr "B<--x86>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1695
+#, no-wrap
+msgid "B<--arm>[B<=>I<options>]"
+msgstr "B<--arm>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1697
+#, no-wrap
+msgid "B<--armthumb>[B<=>I<options>]"
+msgstr "B<--armthumb>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1699
+#, no-wrap
+msgid "B<--arm64>[B<=>I<options>]"
+msgstr "B<--arm64>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1701
+#, no-wrap
+msgid "B<--powerpc>[B<=>I<options>]"
+msgstr "B<--powerpc>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1703
+#, no-wrap
+msgid "B<--ia64>[B<=>I<options>]"
+msgstr "B<--ia64>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1705
+#, no-wrap
+msgid "B<--sparc>[B<=>I<options>]"
+msgstr "B<--sparc>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1711
+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:1725
+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\\(en15% 정도 줄여주게 하는 중복성이 "
+"늘어납니다. BCJ 필터는 언제든 뒤집을 수 있어, 데이터에 적절하지 않은 BCJ 필"
+"터 형식을 활용하면, 그냥 가만히 두면 압축율이 약간 떨어지게 한다 하더라도, 데"
+"이터를 잃을 수가 있습니다. BCJ 필터는 굉장히 빠르며 메모리 공간을 적게 활용"
+"합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1728
+msgid "These BCJ filters have known problems related to the compression ratio:"
+msgstr "이 BCJ 필터에는 압축율 관련 몇가지 문제가 있습니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1735
+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 ""
+"실행 코드가 들어있는 몇가지 파일 형식(예: 목적 파일, 정적 라이브러리, 리눅스 "
+"커널 모듈)의 경우 필터 값으로 채운 명령 주소가 있습니다. 여기 BCJ 필터의 경"
+"우 파일의 압축율을 떨어뜨리는 주소 변환을 수행합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1745
+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 필터를 사용하지 않았을 때보다 압축율이 떨"
+"어질 수가 있습니다. 예를 들면, 유사하거나 동일한 실행 파일 여럿이 있으면 필"
+"터를 사용하여 파일을 덜 비슷하게 만들어 압축율이 떨어지게 합니다. 동일한 아"
+"카이브 파일에서 비 실행 파일의 내용에 대해서도 비슷한 일이 벌어질 수 있습니"
+"다. 실제로 하나는 BCJ 필터를 걸고 하나는 제외하여 각 경우에 대해 어떤 경우"
+"가 결과가 우수한 지 살펴보겠습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1750
+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:1757
+#, no-wrap
+msgid "Filter"
+msgstr "필터"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Alignment"
+msgstr "정렬"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Notes"
+msgstr "참고"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "x86"
+msgstr "x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "32-bit or 64-bit x86"
+msgstr "32-bit 또는 64-bit x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1759
+#, no-wrap
+msgid "ARM"
+msgstr "ARM"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1760
+#, no-wrap
+msgid "ARM-Thumb"
+msgstr "ARM-Thumb"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "ARM64"
+msgstr "ARM64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "4096-byte alignment is best"
+msgstr "4096 바이트 정렬이 가장 좋습니다"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "PowerPC"
+msgstr "PowerPC"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "Big endian only"
+msgstr "빅엔디안 전용"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "IA-64"
+msgstr "IA-64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "16"
+msgstr "16"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "Itanium"
+msgstr "Itanium"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1764
+#, no-wrap
+msgid "SPARC"
+msgstr "SPARC"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1781
+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. For example, with the IA-64 "
+"filter, it's good to set B<pb=4> or even B<pb=4,lp=4,lc=0> with LZMA2 "
+"(2^4=16). The x86 filter is an exception; it's usually good to stick to "
+"LZMA2's default four-byte alignment when compressing x86 executables."
+msgstr ""
+"BCJ 필터를 사용한 데이터는 LZMA2로 보통 압축하기 때문에 LZMA2 옵션을 선택한 "
+"BCJ 필터의 정렬기준에 맞추도록 설정하면 압축율을 좀 더 개선할 수 있습니다. "
+"예를 들면, IA-64 필터에서는 B<pb=4> 또는 LZMA2에 대해 B<pb=4,lp=4,lc=0> "
+"(2^4=16) 값이 바람직합ㄴ디ㅏ. x86 필터는 예외로, x86 실행 파일을 압축할 경"
+"우 LZMA2의 기본 4바이트 정렬을 따르는게 좋습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1784
+msgid "All BCJ filters support the same I<options>:"
+msgstr "모든 BCJ 필터는 동일한 I<옵션>을 지원합니다:"
+
+#. type: TP
+#: ../src/xz/xz.1:1785
+#, no-wrap
+msgid "B<start=>I<offset>"
+msgstr "B<start=>I<E<lt>오프셋E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1799
+msgid ""
+"Specify the start I<offset> that is used when converting between relative "
+"and absolute addresses. The I<offset> 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<offset> is almost never useful."
+msgstr ""
+"상대 주소와 절대 주소를 변환할 때 사용할 시작 I<E<lt>오프셋E<gt>>을 지정합니"
+"다. I<E<lt>오프셋E<gt>>에는 필터 정렬 배수여야 합니다(상단 테이블 참조). 기"
+"본값은 0입니다. 실제로 기본값이 낫습니다. 개별 I<E<lt>오프셋E<gt>> 지정 값"
+"은 거의 쓸모가 없습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1800
+#, no-wrap
+msgid "B<--delta>[B<=>I<options>]"
+msgstr "B<--delta>[B<=>I<E<lt>옵션E<gt>>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1805
+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:1814
+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<flac>(1)."
+msgstr ""
+"현재로서는 바이트 단위 단순 델타계산 결과만 보여줍니다. 예를 들면, 압축하지 "
+"않은 비트맵 그림 또는 압축하지 않은 PCM 오디오를 압축할 때 쓸만합니다. 그러"
+"나 특별한 목적으로 활용하는 알고리즘은 델타 + LZMA2 보다 더 나은 결과를 가져"
+"다 주기도 합니다. 이는 특히 오디오의 경우 맞는 이야기인데, B<flac>(1)의 경"
+"우 더 빠르고 우수한 압축율을 보여줍니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1817
+msgid "Supported I<options>:"
+msgstr "지원 I<옵션>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1818
+#, no-wrap
+msgid "B<dist=>I<distance>"
+msgstr "B<dist=>I<E<lt>차이E<gt>>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1826
+msgid ""
+"Specify the I<distance> of the delta calculation in bytes. I<distance> must "
+"be 1\\(en256. The default is 1."
+msgstr ""
+"바이트 단위 델터 계산 I<E<lt>차이E<gt>>를 지정합니다. I<E<lt>차이E<gt>>값은 "
+"1\\(en256 이어야합니다. 기본 값은 1입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1831
+msgid ""
+"For example, with B<dist=2> 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<dist=2> 옵션과 A1 B1 A2 B3 A3 B5 A4 B7 입력 값을 주면, 출력 값"
+"은 A1 B1 01 02 01 02 01 02 입니다."
+
+#. type: SS
+#: ../src/xz/xz.1:1833
+#, no-wrap
+msgid "Other options"
+msgstr "기타 옵션"
+
+#. type: TP
+#: ../src/xz/xz.1:1834 ../src/xzdec/xzdec.1:83
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr "B<-q>, B<--quiet>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1841
+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:1841
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr "B<-v>, B<--verbose>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1850
+msgid ""
+"Be verbose. If standard error is connected to a terminal, B<xz> will "
+"display a progress indicator. Specifying B<--verbose> twice will give even "
+"more verbose output."
+msgstr ""
+"출력 내용이 많아집니다. 표준 오류를 터미널에 연결했다면 B<xz>는 진행 표시를 "
+"나타냅니다. B<--verbose>를 두번 지정하면 더 많은 내용을 표시합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1852
+msgid "The progress indicator shows the following information:"
+msgstr "진행 표시에서는 다음 정보를 나타냅니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1857
+msgid ""
+"Completion percentage is shown if the size of the input file is known. That "
+"is, the percentage cannot be shown in pipes."
+msgstr ""
+"입력 파일의 크기를 알고 있을 경우 완료 백분율. 파이프 처리시에는 백분율을 나"
+"타낼 수 없습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1860
+msgid ""
+"Amount of compressed data produced (compressing) or consumed "
+"(decompressing)."
+msgstr "산출 압축 데이터 용량 (압축) 또는 소모 공간 용량 (압축 해제)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1863
+msgid ""
+"Amount of uncompressed data consumed (compressing) or produced "
+"(decompressing)."
+msgstr "비압축 데이터 소모 용량 (압축) 또는 산출 용량 (압축 해제)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1867
+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:1874
+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<xz> started "
+"processing the file."
+msgstr ""
+"압축 또는 압축 해제 속도. 초당 비압축 데이터 소모량(압축) 또는 산출 용량(압"
+"축 해제)를 측정한 값입니다. B<xz>에서 파일 처리를 시작한 몇 초 후 나타납니"
+"다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1876
+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:1884
+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<xz> 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<xz>가 파일을 처리하기 시작한 이후 입력 파일의 크기를 알고 "
+"몇 초가 지난 후에야 보여줍니다. 시간은 콜론 문자를 사용하지 않고 덜 자세한 "
+"형식으로, 예를 들면, 2분 30초 와 같은 형식으로 보여줍니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1899
+msgid ""
+"When standard error is not a terminal, B<--verbose> will make B<xz> 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<xz>에서 파일 이름, 압축 크기, "
+"압축 해제 용량, 압축율, 그리고 가능하다면 파일을 압축 또는 압축 해제한 후 표"
+"준 오류로 속도와 걸린 시간을 나타내도록 합니다. 속도와 걸린 시간 정보는 동작"
+"을 처리하는데 최소한 몇초 정도 소요했을 경우에만 들어갑니다. 동작이 끝나지 "
+"않았다면, 이를테면 사용자의 중단 요청이 있었을 경우 입력 파일의 크기를 알고 "
+"있을 때 압축 백분율 정보도 들어갑니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1899 ../src/xzdec/xzdec.1:89
+#, no-wrap
+msgid "B<-Q>, B<--no-warn>"
+msgstr "B<-Q>, B<--no-warn>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1909
+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:1909
+#, no-wrap
+msgid "B<--robot>"
+msgstr "B<--robot>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1921
+msgid ""
+"Print messages in a machine-parsable format. This is intended to ease "
+"writing frontends that want to use B<xz> instead of liblzma, which may be "
+"the case with various scripts. The output with this option enabled is meant "
+"to be stable across B<xz> releases. See the section B<ROBOT MODE> for "
+"details."
+msgstr ""
+"머신에서 해석할 형식으로 메시지를 나타냅니다. liblzma 대신 B<xz>를 활용하려"
+"는 다양상 스크립트로서의 프론트엔드를 쉽게 작성하도록 하기 위함입니다. 이 옵"
+"션을 지정한 출력은 B<xz> 릴리스가 어떻게 되든 안정 버전이란 의미입니다. 자세"
+"한 내용은 B<로봇 모드> 섹션을 참고하십시오."
+
+#. type: TP
+#: ../src/xz/xz.1:1921
+#, no-wrap
+msgid "B<--info-memory>"
+msgstr "B<--info-memory>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1928
+msgid ""
+"Display, in human-readable format, how much physical memory (RAM) and how "
+"many processor threads B<xz> thinks the system has and the memory usage "
+"limits for compression and decompression, and exit successfully."
+msgstr ""
+"압축 및 압축 해제시 물리 메모리 용량 (RAM), B<xz>에서 파악하는 프로세서 스레"
+"드 갯수, 메모리 사용량 한계를 파악하기 쉬운 형식으로 나타내고 무사히 나갑니"
+"다."
+
+#. type: TP
+#: ../src/xz/xz.1:1928 ../src/xzdec/xzdec.1:96
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr "B<-h>, B<--help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1932
+msgid ""
+"Display a help message describing the most commonly used options, and exit "
+"successfully."
+msgstr ""
+"보통 사용하는 옵션을 설명하는 도움말 메시지를 출력한 후, 완전히 빠져나갑니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1932
+#, no-wrap
+msgid "B<-H>, B<--long-help>"
+msgstr "B<-H>, B<--long-help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1937
+msgid ""
+"Display a help message describing all features of B<xz>, and exit "
+"successfully"
+msgstr ""
+"B<xz>의 모든 기능을 설명하는 도움말 메시지를 출력한 후, 완전히 빠져나갑니다"
+
+#. type: TP
+#: ../src/xz/xz.1:1937 ../src/xzdec/xzdec.1:99
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr "B<-V>, B<--version>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1946
+msgid ""
+"Display the version number of B<xz> and liblzma in human readable format. "
+"To get machine-parsable output, specify B<--robot> before B<--version>."
+msgstr ""
+"B<xz>와 liblzma 버전 번호를 가독 형식으로 출력합니다. 기계 해석 가능 형식을 "
+"가져오려면 B<--version> 앞에 B<--robot>을 지정하십시오."
+
+#. type: SH
+#: ../src/xz/xz.1:1947
+#, no-wrap
+msgid "ROBOT MODE"
+msgstr "로봇 모드"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1963
+msgid ""
+"The robot mode is activated with the B<--robot> option. It makes the output "
+"of B<xz> easier to parse by other programs. Currently B<--robot> is "
+"supported only together with B<--version>, B<--info-memory>, and B<--list>. "
+"It will be supported for compression and decompression in the future."
+msgstr ""
+"로봇 모드는 B<--robot> 옵션으로 동작합니다. B<xz> 출력을 다른 프로그램에서 "
+"해석하기 쉽게 해줍니다. 현재로서는 B<--robot> 옵션은 B<--version>, B<--"
+"info-memory>, B<--list> 옵션하고만 사용할 수 있습니다. 앞으로는 압축 및 압"
+"축 해제 동작에 대해서도 지원합니다."
+
+#. type: SS
+#: ../src/xz/xz.1:1964
+#, no-wrap
+msgid "Version"
+msgstr "버전"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1969
+msgid ""
+"B<xz --robot --version> prints the version number of B<xz> and liblzma in "
+"the following format:"
+msgstr ""
+"B<xz --robot --version> 은 B<xz> 와 liblzma의 버전 번호를 다음 형식으로 나타"
+"냅니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1971
+msgid "B<XZ_VERSION=>I<XYYYZZZS>"
+msgstr "B<XZ_VERSION=>I<XYYYZZZS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1973
+msgid "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+msgstr "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+
+#. type: TP
+#: ../src/xz/xz.1:1973
+#, no-wrap
+msgid "I<X>"
+msgstr "I<X>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1976
+msgid "Major version."
+msgstr "주 버전."
+
+#. type: TP
+#: ../src/xz/xz.1:1976
+#, no-wrap
+msgid "I<YYY>"
+msgstr "I<YYY>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1981
+msgid ""
+"Minor version. Even numbers are stable. Odd numbers are alpha or beta "
+"versions."
+msgstr "부 버전. 짝수가 안정 버전입니다. 홀수는 알파 또는 베타 버전입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1981
+#, no-wrap
+msgid "I<ZZZ>"
+msgstr "I<ZZZ>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1985
+msgid ""
+"Patch level for stable releases or just a counter for development releases."
+msgstr "안정 릴리스의 패치 수준 또는 개발 릴리스의 횟수입니다."
+
+#. type: TP
+#: ../src/xz/xz.1:1985
+#, no-wrap
+msgid "I<S>"
+msgstr "I<S>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1993
+msgid ""
+"Stability. 0 is alpha, 1 is beta, and 2 is stable. I<S> should be always 2 "
+"when I<YYY> is even."
+msgstr ""
+"안정도. 0은 알파 버전, 1은 베타 버전을 나타내며, 2는 안정 버전을 나타냅니"
+"다. I<S>는 I<YYY> 값이 짝수라 해도 항상 2여야 합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1998
+msgid ""
+"I<XYYYZZZS> are the same on both lines if B<xz> and liblzma are from the "
+"same XZ Utils release."
+msgstr ""
+"B<xz> 명령과 liblzma이 동일한 XZ 유틸리티 릴리스에서 나왔다면 두 행의 "
+"I<XYYYZZZS> 값은 같습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2004
+msgid "Examples: 4.999.9beta is B<49990091> and 5.0.0 is B<50000002>."
+msgstr "예제: 4.999.9beta는 B<49990091>이며, 5.0.0은 B<50000002>입니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2005
+#, no-wrap
+msgid "Memory limit information"
+msgstr "메모리 제한 정보"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2008
+msgid ""
+"B<xz --robot --info-memory> prints a single line with multiple tab-separated "
+"columns:"
+msgstr ""
+"B<xz --robot --info-memory> 명령은 탭으로 나뉜 여러 컬럼을 단일 행으로 나타냅"
+"니다:"
+
+#. type: IP
+#: ../src/xz/xz.1:2008
+#, no-wrap
+msgid "1."
+msgstr "1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2010
+msgid "Total amount of physical memory (RAM) in bytes."
+msgstr "물리 메모리(RAM)의 바이트 단위 총량."
+
+#. type: IP
+#: ../src/xz/xz.1:2010 ../src/xz/xz.1:2125 ../src/xz/xz.1:2162
+#: ../src/xz/xz.1:2188 ../src/xz/xz.1:2258 ../src/xz/xz.1:2285
+#, no-wrap
+msgid "2."
+msgstr "2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2017
+msgid ""
+"Memory usage limit for compression in bytes (B<--memlimit-compress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"압축 진행시 바이트 단위 메모리 사용 한계값 (B<--memlimit-compress>). 특수 "
+"값 B<0>은 단일-스레드 모드에서 제한을 두지 않는 기본 설정임을 나타냅니다."
+
+#. type: IP
+#: ../src/xz/xz.1:2017 ../src/xz/xz.1:2127 ../src/xz/xz.1:2164
+#: ../src/xz/xz.1:2190 ../src/xz/xz.1:2263 ../src/xz/xz.1:2287
+#, no-wrap
+msgid "3."
+msgstr "3."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2024
+msgid ""
+"Memory usage limit for decompression in bytes (B<--memlimit-decompress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"압축 해제시 바이트 단위 메모리 사용 한계값 (B<--memlimit-decompress>). 특수 "
+"값 B<0>은 단일-스레드 모드에서 제한을 두지 않는 기본 설정임을 나타냅니다."
+
+#. type: IP
+#: ../src/xz/xz.1:2024 ../src/xz/xz.1:2129 ../src/xz/xz.1:2166
+#: ../src/xz/xz.1:2193 ../src/xz/xz.1:2273 ../src/xz/xz.1:2289
+#, no-wrap
+msgid "4."
+msgstr "4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2036
+msgid ""
+"Since B<xz> 5.3.4alpha: Memory usage for multi-threaded decompression in "
+"bytes (B<--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 B<--memlimit-mt-"
+"decompress>."
+msgstr ""
+"B<xz> 5.3.4alpha 이후: 다중-스레드 기반 압축 해제시 바이트 단위 메모리 사용량"
+"(B<--memlimit-mt-decompress>). 분명하게 제한을 걸어두지 않았을 경우 5번째 컬"
+"럼에 나타난 시스템별 기본값을 사용하기 때문에 0 값을 지정하면 안됩니다. 또"
+"한 B<--memlimit-mt-decompress>로 세번째 컬럼 값보다 더 크게 지정을 한다 할지"
+"라도 이 값이 세번째 컬럼 값보다 크면 안됩니다."
+
+#. type: IP
+#: ../src/xz/xz.1:2036 ../src/xz/xz.1:2131 ../src/xz/xz.1:2168
+#: ../src/xz/xz.1:2195 ../src/xz/xz.1:2291
+#, no-wrap
+msgid "5."
+msgstr "5."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2048
+msgid ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+msgstr ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+
+#. type: IP
+#: ../src/xz/xz.1:2048 ../src/xz/xz.1:2133 ../src/xz/xz.1:2170
+#: ../src/xz/xz.1:2197 ../src/xz/xz.1:2293
+#, no-wrap
+msgid "6."
+msgstr "6."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2053
+msgid "Since B<xz> 5.3.4alpha: Number of available processor threads."
+msgstr "B<xz> 5.3.4alpha 이후: Number of available processor threads."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2057
+msgid ""
+"In the future, the output of B<xz --robot --info-memory> may have more "
+"columns, but never more than a single line."
+msgstr ""
+"차후, B<xz --robot --info-memory> 출력에는 더 많은 내용이 들어가지만, 한 줄 "
+"이상은 넘어가지 않습니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2058
+#, no-wrap
+msgid "List mode"
+msgstr "목록 모드"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2063
+msgid ""
+"B<xz --robot --list> 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<xz --robot --list> 명령은 탭으로 구분한 출력 형태를 활용합니다. 모든 행의 "
+"첫번째 컬럼에는 해당 행에서 찾을 수 있는 정보의 형식을 나타냅니다:"
+
+#. type: TP
+#: ../src/xz/xz.1:2063
+#, no-wrap
+msgid "B<name>"
+msgstr "B<이름>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2067
+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:2067
+#, no-wrap
+msgid "B<file>"
+msgstr "B<파일>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2075
+msgid ""
+"This line contains overall information about the B<.xz> file. This line is "
+"always printed after the B<name> line."
+msgstr ""
+"이 행에는 B<.xz> 파일의 전반적인 정보가 들어있습니다. 이 행은 항상 B<이름> "
+"행 다음에 있습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:2075
+#, no-wrap
+msgid "B<stream>"
+msgstr "B<스트림>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2085
+msgid ""
+"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."
+msgstr ""
+"이 행 형식은 B<--verbose> 옵션을 지정했을 때만 사용합니다. B<.xz> 파일의 B<"
+"스트림> 행 수만큼 나타납니다."
+
+#. type: TP
+#: ../src/xz/xz.1:2085
+#, no-wrap
+msgid "B<block>"
+msgstr "B<블록>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2100
+msgid ""
+"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."
+msgstr ""
+"이 행 형식은 B<--verbose> 옵션을 지정했을 때만 사용합니다. B<.xz> 파일의 블"
+"록 수만큼 B<블록> 행이 나타납니다. B<블록> 행은 모든 B<스트림> 행 다음에 나"
+"타납니다. 다른 형식의 행이 끼어들지는 않습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:2100
+#, no-wrap
+msgid "B<summary>"
+msgstr "B<요약>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2115
+msgid ""
+"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."
+msgstr ""
+"이 행 형식은 B<--verbose> 옵션을 두번 지정했을 때만 사용합니다. 이 행은 모"
+"든 B<블록> 행 다음에 출력합니다. B<파일> 행과 비슷하게, B<요약> 행에는 B<."
+"xz> 파일의 전반적인 정보가 담겨있습니다."
+
+#. type: TP
+#: ../src/xz/xz.1:2115
+#, no-wrap
+msgid "B<totals>"
+msgstr "B<총계>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2119
+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:2123
+msgid "The columns of the B<file> lines:"
+msgstr "B<파일> 행 컬럼:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2127
+msgid "Number of streams in the file"
+msgstr "파일 스트림 갯수"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2129
+msgid "Total number of blocks in the stream(s)"
+msgstr "스트림의 블록 총 갯수"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2131
+msgid "Compressed size of the file"
+msgstr "파일 압축 크기"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2133
+msgid "Uncompressed size of the file"
+msgstr "파일 압축 해제 크기"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2139
+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:2139 ../src/xz/xz.1:2172 ../src/xz/xz.1:2199
+#: ../src/xz/xz.1:2295
+#, no-wrap
+msgid "7."
+msgstr "7."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2152
+msgid ""
+"Comma-separated list of integrity check names. The following strings are "
+"used for the known check types: B<None>, B<CRC32>, B<CRC64>, and "
+"B<SHA-256>. For unknown check types, B<Unknown->I<N> is used, where I<N> is "
+"the Check ID as a decimal number (one or two digits)."
+msgstr ""
+"쉼표로 구분한 무결성 검사 이름 목록입니다. B<None>, B<CRC32>, B<CRC64>, "
+"B<SHA-256> 문자열을 알려진 검사 형식으로 사용합니다. 알 수 없는 검사 형식에 "
+"대해서는 B<Unknown->I<N>을 사용하며, 여기서 I<N>은 (한 두자리) 정수형 숫자값"
+"으로 이루어진 검사 ID 입니다."
+
+#. type: IP
+#: ../src/xz/xz.1:2152 ../src/xz/xz.1:2174 ../src/xz/xz.1:2201
+#: ../src/xz/xz.1:2298
+#, no-wrap
+msgid "8."
+msgstr "8."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2154
+msgid "Total size of stream padding in the file"
+msgstr "파일의 스트림 패딩 총 길이"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2160
+msgid "The columns of the B<stream> lines:"
+msgstr "B<스트림> 행 컬럼:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2164
+msgid "Stream number (the first stream is 1)"
+msgstr "스트림 번호 (첫 스트림은 1번)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2166
+msgid "Number of blocks in the stream"
+msgstr "스트림의 블록 총 갯수"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2168
+msgid "Compressed start offset"
+msgstr "압축 시작 오프셋"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2170
+msgid "Uncompressed start offset"
+msgstr "비압축 시작 오프셋"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2172
+msgid "Compressed size (does not include stream padding)"
+msgstr "압축 크기 (스트림 패딩 미포함)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2174 ../src/xz/xz.1:2203 ../src/xz/xz.1:2293
+msgid "Uncompressed size"
+msgstr "압축 해제 용량"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2205
+msgid "Compression ratio"
+msgstr "압축율"
+
+#. type: IP
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2203 ../src/xz/xz.1:2300
+#, no-wrap
+msgid "9."
+msgstr "9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2207
+msgid "Name of the integrity check"
+msgstr "무결성 검사 이름"
+
+#. type: IP
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2205 ../src/xz/xz.1:2316
+#, no-wrap
+msgid "10."
+msgstr "10."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2180
+msgid "Size of stream padding"
+msgstr "스트림 패딩 길이"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2186
+msgid "The columns of the B<block> lines:"
+msgstr "B<블록> 행 컬럼:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2190
+msgid "Number of the stream containing this block"
+msgstr "이 블록이 들어간 스트림 갯수"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2193
+msgid ""
+"Block number relative to the beginning of the stream (the first block is 1)"
+msgstr "스트림 시작 부분의 블록 번호 (첫번째 블록은 1번)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2195
+msgid "Block number relative to the beginning of the file"
+msgstr "파일 시작 부분의 블록 번호"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2197
+msgid "Compressed start offset relative to the beginning of the file"
+msgstr "파일 시작 부분의 압축 시작 오프셋"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2199
+msgid "Uncompressed start offset relative to the beginning of the file"
+msgstr "파일 시작 부분의 비압축 시작 오프셋"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2201
+msgid "Total compressed size of the block (includes headers)"
+msgstr "총 블록 압축 크기 (헤더 포함)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2219
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<block> 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:2221 ../src/xz/xz.1:2321
+#, no-wrap
+msgid "11."
+msgstr "11."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2223
+msgid "Value of the integrity check in hexadecimal"
+msgstr "16진수 무결성 검사값"
+
+#. type: IP
+#: ../src/xz/xz.1:2223 ../src/xz/xz.1:2331
+#, no-wrap
+msgid "12."
+msgstr "12."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2225
+msgid "Block header size"
+msgstr "블록 헤더 크기"
+
+#. type: IP
+#: ../src/xz/xz.1:2225
+#, no-wrap
+msgid "13."
+msgstr "13."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2235
+msgid ""
+"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 "
+"(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<c>는 압축 크기가 현재 값임을 나타내고, B<u>는 압축 전 원본 크"
+"기가 현재 값임을 나타냅니다. 플래그를 설정하지 않았다면, 문자열 길이를 유지"
+"할 목적으로 대시 B<-> 를 대신 나타냅니다. 새 플래그는 나중에 문자열 끝 부분"
+"에 추가할 예정입니다."
+
+#. type: IP
+#: ../src/xz/xz.1:2235
+#, no-wrap
+msgid "14."
+msgstr "14."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2238
+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:2238
+#, no-wrap
+msgid "15."
+msgstr "15."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2243
+msgid ""
+"Amount of memory (in bytes) required to decompress this block with this "
+"B<xz> version"
+msgstr ""
+"이 B<xz> 버전에서 이 블록의 압축을 해제할 때 필요한 (바이트 단위) 메모리 용량"
+
+#. type: IP
+#: ../src/xz/xz.1:2243
+#, no-wrap
+msgid "16."
+msgstr "16."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2250
+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:2256
+msgid "The columns of the B<summary> lines:"
+msgstr "B<요약> 행 컬럼:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2263
+msgid ""
+"Amount of memory (in bytes) required to decompress this file with this B<xz> "
+"version"
+msgstr ""
+"이 B<xz> 버전에서 이 파일 압축을 해제할 때 필요한 (바이트 단위) 메모리 용량"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2269 ../src/xz/xz.1:2327
+msgid ""
+"B<yes> or B<no> indicating if all block headers have both compressed size "
+"and uncompressed size stored in them"
+msgstr ""
+"모든 블록 헤더에 압축 크기와 압축 전 원본 크기 정보가 들어갔는지 여부를 나타"
+"내는 B<yes> 또는 B<no> 값"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2273 ../src/xz/xz.1:2331
+msgid "I<Since> B<xz> I<5.1.2alpha:>"
+msgstr "B<xz> I<5.1.2alpha> I<부터>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2277 ../src/xz/xz.1:2335
+msgid "Minimum B<xz> version required to decompress the file"
+msgstr "파일 압축 해제시 필요한 최소 B<xz> 버전"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2283
+msgid "The columns of the B<totals> line:"
+msgstr "B<총계> 행 컬럼:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2287
+msgid "Number of streams"
+msgstr "스트림 갯수"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2289
+msgid "Number of blocks"
+msgstr "블록 갯수"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2291
+msgid "Compressed size"
+msgstr "압축 크기"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2295
+msgid "Average compression ratio"
+msgstr "평균 압축율"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2298
+msgid ""
+"Comma-separated list of integrity check names that were present in the files"
+msgstr "파일에 들어 있어 쉼표로 구분한 무결성 검사 이름 목록"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2300
+msgid "Stream padding size"
+msgstr "스트림 패딩 길이"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2306
+msgid ""
+"Number of files. This is here to keep the order of the earlier columns the "
+"same as on B<file> lines."
+msgstr "파일 갯수. B<파일> 행의 컬럼 순서를 따라갑니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2314
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<totals> line:"
+msgstr ""
+"B<--verbose> 옵션을 두 번 지정하면, B<총계> 행에 추가 컬럼이 들어갑니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2321
+msgid ""
+"Maximum amount of memory (in bytes) required to decompress the files with "
+"this B<xz> version"
+msgstr ""
+"이 B<xz> 버전에서 파일 압축을 해제할 떄 필요한 (바이트 단위) 최대 메모리 사용"
+"량"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2341
+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: SH
+#: ../src/xz/xz.1:2342 ../src/xzdec/xzdec.1:104 ../src/lzmainfo/lzmainfo.1:44
+#: ../src/scripts/xzgrep.1:81
+#, no-wrap
+msgid "EXIT STATUS"
+msgstr "종료 상태"
+
+#. type: TP
+#: ../src/xz/xz.1:2343 ../src/xzdec/xzdec.1:105 ../src/lzmainfo/lzmainfo.1:45
+#, no-wrap
+msgid "B<0>"
+msgstr "B<0>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2346 ../src/lzmainfo/lzmainfo.1:48
+msgid "All is good."
+msgstr "모든 상태 양호."
+
+#. type: TP
+#: ../src/xz/xz.1:2346 ../src/xzdec/xzdec.1:108 ../src/lzmainfo/lzmainfo.1:48
+#, no-wrap
+msgid "B<1>"
+msgstr "B<1>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2349 ../src/xzdec/xzdec.1:111 ../src/lzmainfo/lzmainfo.1:51
+msgid "An error occurred."
+msgstr "오류 발생."
+
+#. type: TP
+#: ../src/xz/xz.1:2349
+#, no-wrap
+msgid "B<2>"
+msgstr "B<2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2353
+msgid "Something worth a warning occurred, but no actual errors occurred."
+msgstr "눈여겨볼 경고가 나타났지만, 실제 오류는 일어나지 않음."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2356
+msgid ""
+"Notices (not warnings or errors) printed on standard error don't affect the "
+"exit status."
+msgstr ""
+"표준 오류에 출력하는 알림(경고 또는 오류 아님)는 종료 상태에 영향을 주지 않습"
+"니다."
+
+#. type: SH
+#: ../src/xz/xz.1:2357 ../src/scripts/xzgrep.1:94 ../src/scripts/xzless.1:52
+#, no-wrap
+msgid "ENVIRONMENT"
+msgstr "환경"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2370
+msgid ""
+"B<xz> parses space-separated lists of options from the environment variables "
+"B<XZ_DEFAULTS> and B<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 "
+"B<getopt_long>(3) which is used also for the command line arguments."
+msgstr ""
+"B<xz>는 빈칸으로 구분한 옵션 값 목록을 B<XZ_DEFAULTS>, B<XZ_OPT> 환경 변수에"
+"서 순서대로, 명령행에서 옵션을 해석하기 전에 불러옵니다. 참고로 환경 변수에"
+"서 옵션만 해석하며, 옵션이 아닌 부분은 조용히 무시합니다. 해석은 "
+"B<getopt_long>(3)으로 가능하며, 명령행 인자로 활용하기도 합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:2370
+#, no-wrap
+msgid "B<XZ_DEFAULTS>"
+msgstr "B<XZ_DEFAULTS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2379
+msgid ""
+"User-specific or system-wide default options. Typically this is set in a "
+"shell initialization script to enable B<xz>'s memory usage limiter by "
+"default. Excluding shell initialization scripts and similar special cases, "
+"scripts must never set or unset B<XZ_DEFAULTS>."
+msgstr ""
+"사용자별, 시스템 범위 기본 옵션입니다. 보통 B<xz>의 메모리 사용량 제한을 기"
+"본으로 걸어둘 경우 셸 초기화 스크립트에 설정합니다. 셸 초기화 스크립트와 별"
+"도의 유사한 경우를 제외하고라면, 스크립트에서는 B<XZ_DEFAULTS> 환경 변수를 설"
+"정하지 말거나 설정을 해제해야합니다."
+
+#. type: TP
+#: ../src/xz/xz.1:2379
+#, no-wrap
+msgid "B<XZ_OPT>"
+msgstr "B<XZ_OPT>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2390
+msgid ""
+"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 B<tar>(1):"
+msgstr ""
+"B<xz> 명령행으로 옵션 설정 값을 직접 전달할 수 없을 경우 B<xz>에 옵션을 전달"
+"하는 환경 변수입니다. 예를 들어, B<xz>를 스크립트 또는 도구에서 실행할 경우 "
+"GNU B<tar>(1) 라면:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2396
+#, no-wrap
+msgid "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+msgstr "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2410
+msgid ""
+"Scripts may use B<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 B<sh>(1) scripts one may "
+"use something like this:"
+msgstr ""
+"예를 들면, 스크립트에서 B<XZ_OPT> 를 활용하여, 스크립트별로 기본 압축 옵션을 "
+"지정할 수 있습니다. 적절한 이유가 있다면 B<XZ_OPT> 옵션 값을 사용자가 바꾸는"
+"걸 추천합니다. 예를 들면, B<sh>(1) 스크립트에서 다음처럼 활용할 수도 있습니"
+"다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2417
+#, no-wrap
+msgid ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+msgstr ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+
+#. type: SH
+#: ../src/xz/xz.1:2422
+#, no-wrap
+msgid "LZMA UTILS COMPATIBILITY"
+msgstr "LZMA 유틸리티 호환성"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2435
+msgid ""
+"The command line syntax of B<xz> is practically a superset of B<lzma>, "
+"B<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."
+msgstr ""
+"B<xz>의 명령행 문법은 실제로 LZMA 유틸리티 4.32.x에서 찾을 수 있는 B<lzma>, "
+"B<unlzma> B<lzcat>의 상위 집합입니다. 대부분의 경우 LZMA 유틸리티를 XZ 유틸"
+"리티로 기존에 작성한 스크립트를 깨지 않고도 바꿀 수 있습니다. 몇가지 비호환"
+"성 문제 때문에 문제가 일어날 수는 있습니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2436
+#, no-wrap
+msgid "Compression preset levels"
+msgstr "압축 사전 설정 단계"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2443
+msgid ""
+"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."
+msgstr ""
+"압축 수준 사전 설정의 번호 부여 방식은 B<xz>와 LZMA 유틸리티가 동일하지 않습"
+"니다. 가장 중요한 차이는 다른 사전 설정에 대해 딕셔너리 크기를 어떻게 대응했"
+"느냐 여부입니다. 딕셔너리 크기는 압축 해제시 메모리 사용량과 거의 비슷합니"
+"다."
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "Level"
+msgstr "단계"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "xz"
+msgstr "xz"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449
+#, no-wrap
+msgid "LZMA Utils"
+msgstr "LZMA 유틸리티"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "N/A"
+msgstr "없음"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2451
+#, no-wrap
+msgid "64 KiB"
+msgstr "64 KiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2453
+#, no-wrap
+msgid "512 KiB"
+msgstr "512 KiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2468
+msgid ""
+"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:"
+msgstr ""
+"딕셔너리 크기 차이는 압축 프로그램 메모리 사용에 영향을 주지만, LZMA 유틸리티"
+"와 XZ 유틸리티에서 사용량이 늘어나는 다른 차이점이 있습니다:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2474
+#, no-wrap
+msgid "LZMA Utils 4.32.x"
+msgstr "LZMA 유틸리티 4.32.x"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2477 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "12 MiB"
+msgstr "12 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2480
+#, no-wrap
+msgid "26 MiB"
+msgstr "26 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2481
+#, no-wrap
+msgid "45 MiB"
+msgstr "45 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2482
+#, no-wrap
+msgid "83 MiB"
+msgstr "83 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2483
+#, no-wrap
+msgid "159 MiB"
+msgstr "159 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2484
+#, no-wrap
+msgid "311 MiB"
+msgstr "311 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2493
+msgid ""
+"The default preset level in LZMA Utils is B<-7> while in XZ Utils it is "
+"B<-6>, so both use an 8 MiB dictionary by default."
+msgstr ""
+"XZ 유틸리티의 기본 사전 설정 수준값은 B<-6>이지만 LZMA 유틸리티의 기본 사전 "
+"설정 수준값은 B<-7>입니다. 두 프로그램의 딕셔너리 메모리 기본 사용량은 8MiB입"
+"니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2494
+#, no-wrap
+msgid "Streamed vs. non-streamed .lzma files"
+msgstr "스트림 vs 비스트림 .lzma 파일"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2504
+msgid ""
+"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."
+msgstr ""
+"파일을 압축하지 않은 크기는 B<.lzma> 헤더에 저장합니다. LZMA 유틸리티는 일"
+"반 파일을 압축할 때 압축하지 않은 파일의 크기를 저장합니다. 이 대신 압축하"
+"지 않은 크기를 '알 수 없음' 으로 저장하고 압축 해제 프로그램이 멈춰야 할 지점"
+"에 end-of-payload 마커를 사용하는 방법도 있습니다. LZMA 유틸리티는 파이프로 "
+"들어온 입력과 같이 압축하지 않은 파일의 크기를 알 수 없을 때 이런 방식을 활용"
+"합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2525
+msgid ""
+"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."
+msgstr ""
+"B<xz>는 B<.lzma> 파일을 end-of-payload 마커의 유무와 관계없이 압축 해제 방식"
+"을 모두 지원하지만, B<xz>로 만든 모든 B<.lzma> 파일은 end-of-payload 마커를 "
+"사용하며, B<.lzma> 헤더에 압축하지 않은 파일 크기를 '알 수 없음'으로 표기합니"
+"다. 이 방식은 드문 상황에서 문제를 야기할 수 있습니다. 예를 들면, 임베디드 "
+"장치의 B<.lzma> 압축 해제 프로그램은 압축을 해제했을 때 크기를 알아야 동작합"
+"니다. 이 문제를 만나면, LZMA 유틸리티 또는 LZMA SDK를 활용하여 B<.lzma> 파일"
+"에 압축 전 파일 크기 정보를 저장해야합니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2526
+#, no-wrap
+msgid "Unsupported .lzma files"
+msgstr "지원하지 않는 .lzma 파일"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2549
+msgid ""
+"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 I<lp>, but always creates "
+"files with B<lc=3> and B<lp=0>. Creating files with other I<lc> and I<lp> "
+"is possible with B<xz> and with LZMA SDK."
+msgstr ""
+"B<.lzma> 형식은 I<lc> 값을 8까지 받아들이며, I<lp> 값은 4까지 받아들입니다. "
+"LZMA 유틸리티는 어떤 I<lc> 값과 I<lp> 값을 받아들이고도 압축을 해제할 수 있지"
+"만, 파일을 만들 때는 늘 B<lc=3> 값과 B<lp=0> 값을 활용합니다. 다른 I<lc> 값"
+"과 I<lp> 값으로의 파일 압축은 B<xz>와 LZMA SDK에서만 가능합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2560
+msgid ""
+"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 B<xz>."
+msgstr ""
+"liblzma의 LZMA1 필터 구현체에서는 I<lc> 값과 I<lp> 값의 합이 4를 넘어가면 안"
+"됩니다. 그래서 B<.lzma> 파일의 경우 이 제한을 넘어가면 B<xz>로 압축을 해제"
+"할 수 없습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2575
+msgid ""
+"LZMA Utils creates only B<.lzma> files which have a dictionary size of "
+"2^I<n> (a power of 2) but accepts files with any dictionary size. liblzma "
+"accepts only B<.lzma> files which have a dictionary size of 2^I<n> or 2^I<n> "
+"+ 2^(I<n>-1). This is to decrease false positives when detecting B<.lzma> "
+"files."
+msgstr ""
+"LZMA 유틸리티는 2^I<n> (2의 승수)크기를 지닌 딕셔너리를 가진 B<.lzma> 파일만 "
+"만들지만 받아들이는 파일의 딕셔너리 크기는 어떤 크기든 상관 없습니다. "
+"liblzma에서는 2^I<n>, 2^I<n> + 2^(I<n>-1) 딕셔너리 크기를 가진 B<.lzma> 파일 "
+"만 받아들입니다. 이로 인해 B<.lzma> 파일을 확인할 때 거짓 양성율이 늘어납니"
+"다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2580
+msgid ""
+"These limitations shouldn't be a problem in practice, since practically all "
+"B<.lzma> files have been compressed with settings that liblzma will accept."
+msgstr ""
+"모든 B<.lzma> 파일을 liblzma 에서 받아들일 수 있도록 압축하기 때문에 이 제한"
+"이 실제로는 문제가 되지 않습니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2581
+#, no-wrap
+msgid "Trailing garbage"
+msgstr "뒤따라오는 쓰레기 값"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2591
+msgid ""
+"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."
+msgstr ""
+"압축 해제할 때, LZMA 유틸리티는 B<.lzma> 스트림 처음 부분 다음 나머지를 다 조"
+"용히 무시합니다. 대부분의 경우, 버그입니다. LZMA 유틸리티에서 B<.lzma> 결"
+"합 파일 압축 해제를 지원하지 않음을 의미하기도 합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2601
+msgid ""
+"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."
+msgstr ""
+"B<.lzma> 스트림 처음부분 바로 다음에 데이터가 남아있을 경우, B<xz> 에서는 "
+"B<--single-stream> 옵션을 사용하지 않으면 깨진 파일로 간주합니다. 이 동작으"
+"로 하여금 뒤따라오는 쓰레기 값을 무시하도록 간주하는 애매한 스크립트 동작을 "
+"깰 수가 있습니다."
+
+#. type: SH
+#: ../src/xz/xz.1:2602 ../src/xzdec/xzdec.1:117
+#, no-wrap
+msgid "NOTES"
+msgstr "참고"
+
+#. type: SS
+#: ../src/xz/xz.1:2604
+#, no-wrap
+msgid "Compressed output may vary"
+msgstr "출력 결과물이 달라짐"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2615
+msgid ""
+"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."
+msgstr ""
+"압축하지 않은 입력 파일로부터 얻어낸 정확한 압축 출력 결과물은 압축 옵션이 완"
+"전히 동일하더라도 XZ 유틸리티의 버전에 따라 달라질 수 있습니다. 파일 형식에 "
+"영향을 주지 않고 인코더 그 자체를 개선(더 빠르게 하거나 더 나은 압축율로)하"
+"기 때문입니다. XZ 유틸리티 버전이 동일하더라도 빌드 옵션을 달리하여 빌드 상"
+"태가 제각각인 경우 출력 결과물이 달라질 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2625
+msgid ""
+"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."
+msgstr ""
+"B<--rsyncable> 기능을 넣었을 경우 동일한 xz 버전에서 이전 파일과 새 파일로 별"
+"도로 압축하지 않는 한 결과 파일을 (두 파일이 서로 다른 파일이 아니므로) "
+"rsync 처리할 필요가 없습니다. 이 문제는 인코더 구현체 기능 개발이 끝나서 xz "
+"버전이 다르더라도 안정적인 rsync 가능한 출력 결과물을 유지할 수 있을 때여야 "
+"해결할 수 있습니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2626
+#, no-wrap
+msgid "Embedded .xz decompressors"
+msgstr "내장 .xz 압축 해제 프로그램"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2643
+msgid ""
+"Embedded B<.xz> decompressor implementations like XZ Embedded don't "
+"necessarily support files created with integrity I<check> types other than "
+"B<none> and B<crc32>. Since the default is B<--check=crc64>, you must use "
+"B<--check=none> or B<--check=crc32> when creating files for embedded systems."
+msgstr ""
+"XZ 임베디드와 같은 내장 B<.xz> 압축 해제 구현체는 지원 파일의 무결성 I<검사> "
+"형식을 I<none>과 I<crc32> 이외의 설정으로 만들 필요가 없습니다. 기본값이 "
+"B<--check=crc64>일 경우에만, 임베디드 시스템에서 파일을 만들 때 B<--"
+"check=none> 또는 B<--check=crc32> 옵션을 사용해야합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2653
+msgid ""
+"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."
+msgstr ""
+"임베디드 시스템이 아니라면, 모든 B<.xz> 형식 압축 해제 프로그램에서는 모든 I<"
+"검사> 형식을 지원하거나, 일부 I<검사> 방식을 지원하지 않는다면, 최소한, 무결"
+"성 검사로 검증하지 않고 압축을 해제할 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2656
+msgid ""
+"XZ Embedded supports BCJ filters, but only with the default start offset."
+msgstr ""
+"XZ 임베디드는 BCJ 필터를 지원하지만, 기본 시작 오프셋만 지정할 수 있습니다."
+
+#. type: SH
+#: ../src/xz/xz.1:2657
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "예제"
+
+#. type: SS
+#: ../src/xz/xz.1:2659
+#, no-wrap
+msgid "Basics"
+msgstr "기본"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2669
+msgid ""
+"Compress the file I<foo> into I<foo.xz> using the default compression level "
+"(B<-6>), and remove I<foo> if compression is successful:"
+msgstr ""
+"I<foo> 파일을 기본 압축 수준 (B<-6>) 으로 I<foo.xz> 파일에 압축해 넣고, 압축 "
+"과정이 무사히 끝나면 I<foo>를 삭제합니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2674
+#, no-wrap
+msgid "CW<xz foo>\n"
+msgstr "CW<xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2685
+msgid ""
+"Decompress I<bar.xz> into I<bar> and don't remove I<bar.xz> even if "
+"decompression is successful:"
+msgstr ""
+"I<bar.xz>를 I<bar> 에 압축을 해제한 후 압축 해제가 무사히 끝나도 I<bar.xz>를 "
+"삭제하지 않습니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2690
+#, no-wrap
+msgid "CW<xz -dk bar.xz>\n"
+msgstr "CW<xz -dk bar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2703
+msgid ""
+"Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+"slower than the default B<-6>, but needs less memory for compression and "
+"decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgstr ""
+"기본 사전 설정 B<-6> 보다는 느리지만, 압축 및 압축 해제시 메모리를 적게 차지"
+"(각각 48\\ Mib, 5\\MiB)는 B<-4e> 사전 설정(B<-4 --extreme>)을 활용하여 I<baz."
+"tar.xz> 파일을 만듭니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2708
+#, no-wrap
+msgid "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+msgstr "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2714
+msgid ""
+"A mix of compressed and uncompressed files can be decompressed to standard "
+"output with a single command:"
+msgstr ""
+"압축 및 비압축 파일을 단일 명령으로 표준 출력에 압축해제할 수 있습니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2719
+#, no-wrap
+msgid "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+msgstr "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+
+#. type: SS
+#: ../src/xz/xz.1:2723
+#, no-wrap
+msgid "Parallel compression of many files"
+msgstr "다중 파일 병렬 압축"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2729
+msgid ""
+"On GNU and *BSD, B<find>(1) and B<xargs>(1) can be used to parallelize "
+"compression of many files:"
+msgstr ""
+"GNU와 *BSD에서는 B<find>(1) 명령과 B<xargs>(1) 명령으로 여러 파일의 압축을 "
+"병렬 처리할 수 있습니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2735
+#, no-wrap
+msgid ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+msgstr ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2757
+msgid ""
+"The B<-P> option to B<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 B<xargs>(1) "
+"will eventually create."
+msgstr ""
+"B<xargs>(1) 의 B<-P> 옵션으로 B<xz> 프로세스의 병렬 처리 갯수를 지정합니"
+"다. B<-n> 옵션의 최적 값은 압축할 파일 수에 달려있습니다. 압축할 파일이 몇"
+"개밖에 없다면 1이어야합니다. 파일이 수천 수만개 정도 된다면 B<xargs>(1) 이 "
+"어쨌든지간에 만들어낼 B<xz> 프로세스의 겟수를 100으로 하거나 아니면 적당한 값"
+"을 지정하여 줄이는게 좋습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2765
+msgid ""
+"The option B<-T1> for B<xz> is there to force it to single-threaded mode, "
+"because B<xargs>(1) is used to control the amount of parallelization."
+msgstr ""
+"B<xz>에 B<-T1>옵션을 지정하면 단일-스레드 모드로 강제합니다. B<xargs>(1) 에"
+"서 병렬 처리 갯수를 제어할 수 있기 때문입니다."
+
+#. type: SS
+#: ../src/xz/xz.1:2766
+#, no-wrap
+msgid "Robot mode"
+msgstr "로봇 모드"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2769
+msgid ""
+"Calculate how many bytes have been saved in total after compressing multiple "
+"files:"
+msgstr "여러 파일을 압축한 후 저장할 바이트 용량을 계산합니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2774
+#, no-wrap
+msgid "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+msgstr "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2789
+msgid ""
+"A script may want to know that it is using new enough B<xz>. The following "
+"B<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:"
+msgstr ""
+"이 스크립트에서는 충분히 최신의 B<xz> 명령을 사용하는지 알아보려 합니다. 다"
+"음 B<sh>(1) 스크립트에서는 B<xz> 도구의 버전 번호가 최소한 5.0.0인지 여부를 "
+"검사합니다. 이 방식은 B<--robot> 옵션을 지원하지 않는 오래된 베타 버전과도 "
+"호환성이 있습니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2798
+#, no-wrap
+msgid ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+msgstr ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2805
+msgid ""
+"Set a memory usage limit for decompression using B<XZ_OPT>, but if a limit "
+"has already been set, don't increase it:"
+msgstr ""
+"B<XZ_OPT> 환경 변수로 압축 해제시 메뢰 사용량 한계를 설정하지만, 한계 값을 이"
+"미 설정했다면, 값을 늘리지 않습니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2815
+#, no-wrap
+msgid ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+msgstr ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2825
+msgid ""
+"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."
+msgstr ""
+"개별 설정 필터 체인의 초단순 사용방식은 LZMA2 사전 설정 값을 별도로 설정하는 "
+"방식입니다. 사전 설정은 잠재적으로 쓸만한 압축 설정 조합만 다루기 때문에 꽤 "
+"쓸모가 있을 수도 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2833
+msgid ""
+"The CompCPU columns of the tables from the descriptions of the options "
+"B<-0> ... B<-9> and B<--extreme> are useful when customizing LZMA2 presets. "
+"Here are the relevant parts collected from those two tables:"
+msgstr ""
+"B<-0> ... B<-9> 옵션의 설명에서 테이블의 CompCPU 컬럼과 B<--extreme> 옵션은 "
+"LZMA2 사전 설정을 개별적으로 맞췄을 때 쓸만할 수도 있습니다. 여기 관련내용"
+"을 테이블 둘로 정리해서 모아보았습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2858
+msgid ""
+"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:"
+msgstr ""
+"어떤 파일을 압축할 때 상당히 큰 딕셔너리(예: 32MiB)가 필요 하다는걸 알아채셨"
+"지만, B<xz -8> 명령이 압축할 때보다 더 빠른 속도로 압축하려 한다면, 더 큰 딕"
+"셔너리 사용을 위해 더 낮은 CompCPU 사전 설정 값(예: 1)으로 수정할 수 있습니"
+"다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2863
+#, no-wrap
+msgid "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+msgstr "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2879
+msgid ""
+"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."
+msgstr ""
+"각 파일에 대해, 위 명령은 압축율이 더 좋아지면서도 B<xz -6>보다 더 빨라집니"
+"다. 그러나, CompCPU 값을 낮게 유지하는 대신 큰 딕셔너리에서 일부 파일을 강조"
+"해야 합니다. 큰 딕셔너리가 대부분의 도움을 주는 매우 명백한 상황에서는 최소"
+"한 몇 메가바이트의 매우 유사한 각 파일이 아카이브에 들어갑니다. 딕셔너리 크"
+"기는 LZMA2가 연속으로 존재하는 각 파일의 유사성으로부터 얻는 장점을 취할 수 "
+"있을 때 일부 개별 파일보다 훨씬 더 커집니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2886
+msgid ""
+"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:"
+msgstr ""
+"압축 프로그램과 압축 해제 프로그램에서 메모리를 엄청 많이 사용해도 상관 없"
+"고, 파일을 수백 메가 바이트 메모리 용량을 활용하여 압축한다면, B<xz -9> 명령"
+"에 64MiB 용량을 초과하는 딕셔너리를 사용할 수 있게 하는 방법도 쓸만할 지도 모"
+"릅니다:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2891
+#, no-wrap
+msgid "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+msgstr "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2904
+msgid ""
+"Using B<-vv> (B<--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."
+msgstr ""
+"위 예제에서와 같이 B<-vv> (B<--verbose --verbose>) 옵션을 사용하면 압축 및 압"
+"축 해제 과정에서 필요한 메모리 용량을 살펴보는데 요긴할 수 있습니다. 압축 해"
+"제한 파일 크기보다 더 큰 딕셔너리를 사용하면 불필요한 메모리 소모량이 발생하"
+"여 위 명령이 작은 파일에는 쓸모 없음을 기억하십시오."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2916
+msgid ""
+"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> (B<-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 B<--"
+"check=crc32>) using about 100\\ KiB of memory."
+msgstr ""
+"때로는 압축 시간이 딱히 상관이 없을 수도 있습니다만, 압축 해제시 메모리 사용"
+"량을 적게 유지해야 할 수도 있습니다. 예를 들면, 임베디드 시스템에서 파일 압축"
+"을 해제할 수도 있습니다. 다음 명령의 경우 B<-6e> (B<-6 --extreme>) 옵션을 기"
+"반 옵션을 사용하며 딕셔너리 크기를 64KiB만 사용하도록 제한합니다. 결과 파일"
+"은 XZ 임베디드(이게 B<--check=crc32> 옵션이 있는 이유)로 100KiB 메모리 용량"
+"을 활용하여 풀어낼 수 있습니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2921
+#, no-wrap
+msgid "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+msgstr "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2944
+msgid ""
+"If you want to squeeze out as many bytes as possible, adjusting the number "
+"of literal context bits (I<lc>) and number of position bits (I<pb>) can "
+"sometimes help. Adjusting the number of literal position bits (I<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 B<lc=4>):"
+msgstr ""
+"가능한 한 수 바이트를 더 쥐어 짜내고 싶을 때, 리터럴 문맥 비트 수(I<lc>)와 위"
+"치 비트 수(I<pb>)를 조정하면 도움이 될 수도 있습니다. 리터럴 위치 비트 수"
+"(I<lp>)를 조금 건드리는 것 또한 도움이 될 지도 모르겠지만 보통 I<lc> 값과 "
+"I<pb> 값이 더 중요합니다. 예를 들면, 소스 코드 저장 파일에는 US-ASCII 텍스트"
+"가 대부분이기에, 다음과 같은 경우는 B<xz -6e> 명령을 실행했을 때부다는 아주 "
+"약간(거의 0.1% 수준) 작은 파일을 얻어낼 수도 있습니다(B<lc=4>를 빼고도 시도해"
+"보십시오):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2949
+#, no-wrap
+msgid "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+msgstr "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2957
+msgid ""
+"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:"
+msgstr ""
+"LZMA2와 다른 필터를 함께 사용하면 일부 파일 형식에 대해 압축율을 개선할 수 있"
+"습니다. 예를 들면 x86-32 또는 x86-64 공유 라이브러리를 x86 BCJ 필터를 활용하"
+"여 압축할 경우:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2962
+#, no-wrap
+msgid "CW<xz --x86 --lzma2 libfoo.so>\n"
+msgstr "CW<xz --x86 --lzma2 libfoo.so>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2976
+msgid ""
+"Note that the order of the filter options is significant. If B<--x86> is "
+"specified after B<--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."
+msgstr ""
+"참고로 필터 옵션의 순서는 상당히 중요합니다. B<--x86>을 B<--lzma> 이전에 지"
+"정하면 B<xz>에서 오류가 나는데, LZMA2 다음에는 어떤 필터든 설정할 수 없고, 옵"
+"션 체인상 마지막 필터로 x86 BCJ 필터를 사용할 수 없기 때문입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2982
+msgid ""
+"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."
+msgstr ""
+"LZMA2와 델타 필터는 비트맵 그림에 최적의 결과를 가져다줄 수 있습니다. PNG에 "
+"보통 안성맞춥인데, PNG에는 단순 델타 필터보단 약간 더 고급진 필터를 사용하지"
+"만, 실제 압축을 진행할 때는 Deflate를 사용하기 때문입니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2992
+msgid ""
+"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 B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to "
+"accommodate the three-byte alignment:"
+msgstr ""
+"예를 들어 이미지를 압축하지 않은 비압축 TIFF로 저장해야 하는 경우가 있습니"
+"다. 델타 필터의 거리 매개변수는 그림에서 픽셀당 바이트 수에 일치하도록 설정"
+"합니다. 예를 들면, 24비트 RGB 비트맵의 경우 B<dist=3> 거리 매개변수 값을 설"
+"정해야 하며, LZMA2 압축시 3바이트 정렬을 따르도록 B<pb=0> 값을 전달하는 방법"
+"도 바람직합니다."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2997
+#, no-wrap
+msgid "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+msgstr "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3005
+msgid ""
+"If multiple images have been put into a single archive (for example, B<."
+"tar>), the Delta filter will work on that too as long as all images have the "
+"same number of bytes per pixel."
+msgstr ""
+"여러 이미지를 단일 아카이브로 넣고 싶다면(예: B<.tar>), 모든 이미지에 대해 동"
+"일한 픽셀당 바이트 수가 들어가는 경우에도 델타 필터가 동작합니다."
+
+#. type: SH
+#: ../src/xz/xz.1:3006 ../src/xzdec/xzdec.1:143 ../src/lzmainfo/lzmainfo.1:59
+#: ../src/scripts/xzdiff.1:65 ../src/scripts/xzgrep.1:106
+#: ../src/scripts/xzless.1:65 ../src/scripts/xzmore.1:51
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "추가 참조"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3015
+msgid ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+msgstr ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3017
+msgid "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+msgstr "XZ 유틸리티: E<lt>https://tukaani.org/xz/E<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3019 ../src/xzdec/xzdec.1:146
+msgid "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+msgstr "XZ 임베디드: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3020
+msgid "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+msgstr "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "XZDEC"
+msgstr "XZDEC"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "2017-04-19"
+msgstr "2017-04-19"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:10
+msgid "xzdec, lzmadec - Small .xz and .lzma decompressors"
+msgstr "xzdec, lzmadec - .xz와 .lzma용 작은 압축 해제 프로그램"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:14
+msgid "B<xzdec> [I<option...>] [I<file...>]"
+msgstr "B<xzdec> [I<<옵션>...>] [I<E<lt>파일E<gt>...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:18
+msgid "B<lzmadec> [I<option...>] [I<file...>]"
+msgstr "B<lzmadec> [I<<옵션>...>] [I<E<lt>파일E<gt>...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:44
+msgid ""
+"B<xzdec> is a liblzma-based decompression-only tool for B<.xz> (and only B<."
+"xz>) files. B<xzdec> is intended to work as a drop-in replacement for "
+"B<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."
+msgstr ""
+"B<xzdec>은 liblzma 기반 B<.xz> (그리고 B<.xz> 확장자만) 파일 압축 해제 전용 "
+"도구 프로그램입니다. B<xzdec> 은 B<xz>(1) 명령을 활용하여 B<.xz> 파일의 압"
+"축을 해제할 때 쓰던 B<xz --decompress --stdout> (그리고 일반적으로 쓰던 몇가"
+"지 다른 옵션도 같이) 명령을 작성하던 일상적인 경우를 대신하려 만든 결과물입니"
+"다. B<lzmadec> 는 B<.xz> 파일 대신 B<.lzma> 파일을 지원하는 점만 다르며, 나"
+"머지는 B<xzdec>과 동일합니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:61
+msgid ""
+"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."
+msgstr ""
+"실행 파일 크기를 줄이려는 목적으로, B<xzdec> 에서는 다중-스레드 실행 또는 현"
+"지 언어 표기를 지원하지 않으며 B<XZ_DEFAULTS> 환경 변수와 B<XZ_OPT> 환경 변수"
+"의 옵션 값을 읽지 않습니다. B<xzdec>은 단계별 진행 정보를 표시하지 않습니"
+"다. B<xzdec> 명령어로 B<SIGINFO> 시그널을 보내면 아무 동작도 취하지 않지만, "
+"B<SIGUSR1> 시그널을 보내면 프 정보를 표시하는 대신 프로세스를 끝냅니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:69
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> supports only decompression."
+msgstr ""
+"B<xz>(1) 호환성을 문제로 무시합니다. B<xzdec>은 압축 해제 기능만 지원합니"
+"다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:76
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never creates or removes any "
+"files."
+msgstr ""
+"B<xz>(1) 호환성을 문제로 무시합니다. B<xzdec>은 어떤 파일도 만들거나 제거하"
+"지 않습니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:83
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> always writes the "
+"decompressed data to standard output."
+msgstr ""
+"B<xz>(1) 호환성을 문제로 무시합니다. B<xzdec>은 항상 압축 해제한 데이터를 "
+"표준 출력으로만 기록합니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:89
+msgid ""
+"Specifying this once does nothing since B<xzdec> never displays any warnings "
+"or notices. Specify this twice to suppress errors."
+msgstr ""
+"이 옵션을 한번 지정하면 B<xzdec>에서 어떤 경고나 알림을 표시하지 않기 때문에 "
+"아무런 동작도 취하지 않습니다. 오류 메시지를 표시하지 않으려면 이 옵션을 두"
+"번 지정하십시오."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:96
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never uses the exit status 2."
+msgstr ""
+"B<xz>(1) 호환성을 문제로 무시합니다. B<xzdec>은 종료 코드 2번을 사용하지 않"
+"습니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:99
+msgid "Display a help message and exit successfully."
+msgstr "도움말 메시지를 나타내고 무사히 나갑니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:104
+msgid "Display the version number of B<xzdec> and liblzma."
+msgstr "B<xzdec>과 liblzma의 버전 번호를 나타냅니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:108
+msgid "All was good."
+msgstr "모든 상태 양호."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:117
+msgid ""
+"B<xzdec> doesn't have any warning messages like B<xz>(1) has, thus the exit "
+"status 2 is not used by B<xzdec>."
+msgstr ""
+"B<xzdec> 은 B<xz>에 있는 경고 메시지를 출력하지 않기 때문에 B<xzdec> 에서는 "
+"종료 코드 2번을 사용하지 않습니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:131
+msgid ""
+"Use B<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 B<xz>(1)."
+msgstr ""
+"보통 매일 사용하실 목적이라면 B<xzdec> 또는 B<lzmadec> 대신 B<xz> 명령을 사용"
+"하십시오. B<xzdec> 또는 B<lzmadec>은 완전한 기능을 갖춘 B<xz>(1) 보다는 작"
+"은 압축 해제 프로그램을 사용해야 할 경우에만 사용하라고 있는 명령입니다."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:143
+msgid ""
+"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."
+msgstr ""
+"B<xzdec> 과 B<lzmadec> 은 실제로 그렇게 작은건 아닙니다. 컴파일 시간에 "
+"liblzma에서 얼마나 기능을 떨궈내느냐에 따라 더 줄어들 수도 있습니다만, 보통 "
+"임베디드 운영체제 배포판이 아닌 경우는 이렇게 할 수가 없습니다. 실제로 작은 "
+"B<.xz> 압축 해제 프로그램이 필요하다면 XZ 임베디드 사용을 고려하십시오."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:145 ../src/lzmainfo/lzmainfo.1:60
+msgid "B<xz>(1)"
+msgstr "B<xz>(1)"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7
+#, no-wrap
+msgid "LZMAINFO"
+msgstr "LZMAINFO"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "2013-06-30"
+msgstr "2013-06-30"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:10
+msgid "lzmainfo - show information stored in the .lzma file header"
+msgstr "lzmainfo - .lzma 파일 헤더에 들어있는 정보를 보여줍니다"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:15
+msgid "B<lzmainfo> [B<--help>] [B<--version>] [I<file...>]"
+msgstr "B<lzmainfo> [B<--help>] [B<--version>] [I<E<lt>파일E<gt>...>]"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:31
+msgid ""
+"B<lzmainfo> shows information stored in the B<.lzma> file header. It reads "
+"the first 13 bytes from the specified I<file>, decodes the header, and "
+"prints it to standard output in human readable format. If no I<files> are "
+"given or I<file> is B<->, standard input is read."
+msgstr ""
+"B<lzmainfo> 는 B<.lzma> 파일 헤더에 들어있는 정보를 보여줍니다. 지정 I<E<lt>"
+"파일E<gt>>에서 13바이트를 우선 읽어 헤더를 디코딩한 후, 가독 형식으로 표준 출"
+"력에 보여줍니다. I<E<lt>파일E<gt>>을 지정하지 않거나 I<E<lt>파일E<gt>> 값이 "
+"I<-> 이면 표준 입력을 읽습니다."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:40
+msgid ""
+"Usually the most interesting information is the uncompressed size and the "
+"dictionary size. Uncompressed size can be shown only if the file is in the "
+"non-streamed B<.lzma> format variant. The amount of memory required to "
+"decompress the file is a few dozen kilobytes plus the dictionary size."
+msgstr ""
+"보통 대부분 관심있는 정보는 압축 해제 용량과 딕서너리 크기입니다. 압축 해제 "
+"용량의 경우 파일이 비스트림 B<.lzma> 형식 계열인 경우에만 나타납니다. 파일 "
+"압축 해제 필요 메모리 용량은 수십 킬로바이트에 딕셔너리 크기를 합친 값입니다."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:44
+msgid ""
+"B<lzmainfo> is included in XZ Utils primarily for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"B<lzmainfo> 는 LZMA 유틸리티 하위 호환성을 목적으로 XZ 유틸리티에 기본으로 들"
+"어있습니다."
+
+#. type: SH
+#: ../src/lzmainfo/lzmainfo.1:51 ../src/scripts/xzdiff.1:74
+#, no-wrap
+msgid "BUGS"
+msgstr "버그"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:59
+msgid ""
+"B<lzmainfo> uses B<MB> while the correct suffix would be B<MiB> (2^20 "
+"bytes). This is to keep the output compatible with LZMA Utils."
+msgstr ""
+"B<lzmainfo> 프로그램은 B<MiB> (2^20 바이트) 용량 단위인데 (실제로) B<MB>를 사"
+"용합니다. LZMA 유틸리티 출력 호환 유지가 목적입니다."
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "XZDIFF"
+msgstr "XZDIFF"
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "2021-06-04"
+msgstr "2021-06-04"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:12
+msgid "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files"
+msgstr "xzcmp, xzdiff, lzcmp, lzdiff - 압축 파일을 비교합니다"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:15
+msgid "B<xzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr ""
+"B<xzcmp> [I<E<lt>비교_옵션E<gt>>] I<E<lt>파일1E<gt>> [I<E<lt>파일2E<gt>>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:18
+msgid "B<xzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<xzdiff> [I<차이_옵션>] I<E<lt>파일1E<gt>> [I<E<lt>파일2E<gt>>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:21
+msgid "B<lzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr ""
+"B<lzcmp> [I<E<lt>비교_옵션E<gt>>] I<E<lt>파일1E<gt>> [I<E<lt>파일2E<gt>>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:24
+msgid "B<lzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr ""
+"B<lzdiff> [I<E<lt>차이_옵션E<gt>>] I<E<lt>파일1E<gt>> [I<E<lt>파일2E<gt>>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:59
+msgid ""
+"B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files compressed "
+"with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), or "
+"B<zstd>(1). All options specified are passed directly to B<cmp>(1) or "
+"B<diff>(1). If only one file is specified, then the files compared are "
+"I<file1> (which must have a suffix of a supported compression format) and "
+"I<file1> from which the compression format suffix has been stripped. If two "
+"files are specified, then they are uncompressed if necessary and fed to "
+"B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or B<diff>(1) is "
+"preserved unless a decompression error occurs; then exit status is 2."
+msgstr ""
+"B<xzcmp> 와 B<xzdiff> 는 B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), B<zstd>(1) 로 압축한 파일에 대해 B<cmp>(1) 또는 B<diff>(1) 명령"
+"을 실행합니다. 지정한 모든 옵션은 직접 B<cmp>(1) 또는 B<diff>(1) 명령에 전달"
+"합니다. 파일 하나만 지정했을 경우 I<E<lt>파일1E<gt>>만 비교(지원 압축 형식 "
+"접미사를 넣어야 함)하며, I<E<lt>파일1E<gt>>의 지원 압축 형식 접미사는 빠집니"
+"다. 파일 둘을 지정하면, 필요한 경우 압축 해제하며, B<cmp>(1) 또는 "
+"B<diff>(1) 명령으로 전달합니다. B<cmp>(1) 또는 B<diff>(1) 명령의 종료 상태"
+"는 압축 해제 오류가 나타나지 않는 한 보존됩니다. 압축 해제 오류가 나타나면 종"
+"료 상태는 2가 됩니다."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:65
+msgid ""
+"The names B<lzcmp> and B<lzdiff> are provided for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"B<lzcmp> 와 B<lzdiff> 명령은 LZMA 유틸리티 하위 호환성을 목적으로 제공합니다."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:74
+msgid ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+msgstr ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:79
+msgid ""
+"Messages from the B<cmp>(1) or B<diff>(1) programs refer to temporary "
+"filenames instead of those specified."
+msgstr ""
+"B<cmp>(1) 프로그램 또는 B<diff>(1) 프로그램에서 온 메시지는 지정한 파일 이"
+"름 대신 임시 파일 이름을 참조합니다."
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "XZGREP"
+msgstr "XZGREP"
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "2022-07-19"
+msgstr "2022-07-19"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:12
+msgid "xzgrep - search compressed files for a regular expression"
+msgstr "xzgrep - 정규 표현식을 활용하여 압축 파일을 검색합니다"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:18
+msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> [I<file...>]"
+msgstr ""
+"B<xzgrep> [I<grep_options>] [B<-e>] I<E<lt>패턴E<gt>> [I<E<lt>파일E<gt>...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:21
+msgid "B<xzegrep> \\&..."
+msgstr "B<xzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:24
+msgid "B<xzfgrep> \\&..."
+msgstr "B<xzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:27
+msgid "B<lzgrep> \\&..."
+msgstr "B<lzgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:30
+msgid "B<lzegrep> \\&..."
+msgstr "B<lzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:33
+msgid "B<lzfgrep> \\&..."
+msgstr "B<lzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:49
+msgid ""
+"B<xzgrep> invokes B<grep>(1) on I<files> which may be either uncompressed "
+"or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), or B<zstd>(1). All options specified are passed directly to "
+"B<grep>(1)."
+msgstr ""
+"B<xzgrep> 명령은 B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1) 로 압축을 했거나 하지 않은 I<E<lt>파일E<gt>>에 대해 B<grep>(1) 명"
+"령을 실행합니다. 모든 지정 옵션은 B<grep>(1)에 바로 전달합니다."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:62
+msgid ""
+"If no I<file> is specified, then standard input is decompressed if necessary "
+"and fed to B<grep>(1). When reading from standard input, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), and B<zstd>(1) compressed files are not supported."
+msgstr ""
+"지정한 I<E<lt>파일E<gt>>이 없다면, 필요에 따라 표준 입력 데이터 압축을 풀어내"
+"어 B<grep>(1) 에 전달합니다. 표준 입력에서 읽을 떄, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), B<zstd>(1) 압축 파일은 지원하지 않습니다."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:81
+msgid ""
+"If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<grep -E> or "
+"B<grep -F> is used instead of B<grep>(1). The same applies to names "
+"B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+"compatibility with LZMA Utils."
+msgstr ""
+"B<xzgrep>을 B<xzegrep> 또는 B<xzfgrep> 으로 실행하면 B<grep>(1) 대신 "
+"B<grep -E> 또는 B<grep -F> 명령을 활용합니다. LZMA 유틸리티와 하위 호환성을 "
+"가진 B<lzgrep>, B<lzegrep>, B<lzfgrep> 명령에도 동일합니다."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:86
+msgid ""
+"At least one match was found from at least one of the input files. No "
+"errors occurred."
+msgstr ""
+"최소한 하나 이상의 파일에서 하나 이상의 일치하는 결과를 찾았습니다. 오류가 "
+"없습니다."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:90
+msgid "No matches were found from any of the input files. No errors occurred."
+msgstr "어떤 입력 파일에서든 일치하는 내용이 없습니다. 오류가 없습니다."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:90
+#, no-wrap
+msgid "E<gt>1"
+msgstr "E<gt>1"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:94
+msgid "One or more errors occurred. It is unknown if matches were found."
+msgstr ""
+"하나 이상의 오류가 나타납니다. 일치하는 항목을 찾아낼 지 여부는 알 수 없습니"
+"다."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:95
+#, no-wrap
+msgid "B<GREP>"
+msgstr "B<GREP>"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:106
+msgid ""
+"If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+"B<grep>(1), B<grep -E>, or B<grep -F>."
+msgstr ""
+"B<GREP> 환경 변수를 설정하면, B<xzgrep>을 B<grep>(1), B<grep -E>, B<grep -F> "
+"환경 변수 대신 활용합니다."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:113
+msgid ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+msgstr ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "XZLESS"
+msgstr "XZLESS"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "2010-09-27"
+msgstr "2010-09-27"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:13
+msgid "xzless, lzless - view xz or lzma compressed (text) files"
+msgstr "xzless, lzless - xz 또는 lzma 압축 (텍스트) 파일을 봅니다"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:16
+msgid "B<xzless> [I<file>...]"
+msgstr "B<xzless> [I<E<lt>파일E<gt>>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:19
+msgid "B<lzless> [I<file>...]"
+msgstr "B<lzless> [I<E<lt>파일E<gt>>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:31
+msgid ""
+"B<xzless> is a filter that displays text from compressed files to a "
+"terminal. It works on files compressed with B<xz>(1) or B<lzma>(1). If no "
+"I<files> are given, B<xzless> reads from standard input."
+msgstr ""
+"B<xzless> 는 압축 파일을 터미널에 나타내는 필터 프로그램입니다. B<xz>(1) 또"
+"는 B<lzma>(1) 프로그램으로 압축한 파일에 대해 동작합니다. 주어진 I<E<lt>파일"
+"E<gt>> 값이 없다면, B<xzless> 는 표준 입력을 읽어들입니다."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:48
+msgid ""
+"B<xzless> uses B<less>(1) to present its output. Unlike B<xzmore>, its "
+"choice of pager cannot be altered by setting an environment variable. "
+"Commands are based on both B<more>(1) and B<vi>(1) and allow back and "
+"forth movement and searching. See the B<less>(1) manual for more "
+"information."
+msgstr ""
+"B<xzless> 는 B<less>(1) 를 사용하여 출력을 막습니다. B<xzmore> 와는 다르"
+"게, 환경 변수 설정으로 선택한 페이저를 바꿀 수 없습니다. 명령은 B<more>(1) "
+"와 B<vi>(1) 가 기반이며, 앞뒤로 움직이고 검색할 수 있습니다. 자세한 정보는 "
+"B<less>(1) 설명서를 참고하십시오."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:52
+msgid ""
+"The command named B<lzless> is provided for backward compatibility with LZMA "
+"Utils."
+msgstr "B<lzless> 명령은 LZMA 유틸리티 하위 호환용으로 제공합니다."
+
+#. type: TP
+#: ../src/scripts/xzless.1:53
+#, no-wrap
+msgid "B<LESSMETACHARS>"
+msgstr "B<LESSMETACHARS>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:59
+msgid ""
+"A list of characters special to the shell. Set by B<xzless> unless it is "
+"already set in the environment."
+msgstr ""
+"셸에서 동작할 수도 있는 특수 문자 목록입니다. 환경에 미리 설정해두지 않았다"
+"면 B<xzless>에서 설정합니다."
+
+#. type: TP
+#: ../src/scripts/xzless.1:59
+#, no-wrap
+msgid "B<LESSOPEN>"
+msgstr "B<LESSOPEN>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:65
+msgid ""
+"Set to a command line to invoke the B<xz>(1) decompressor for preprocessing "
+"the input files to B<less>(1)."
+msgstr ""
+"입력 파일을 B<less>(1) 에 전달하기 전에 B<xz>(1) 압축 해제 프로그램을 실행"
+"해서 미리 처리하는 명령행을 설정합니다."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:69
+msgid "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+msgstr "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+
+#. type: TH
+#: ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZMORE"
+msgstr "XZMORE"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:10
+msgid "xzmore, lzmore - view xz or lzma compressed (text) files"
+msgstr ""
+"xzmore, lzmore - xz 압축 (텍스트) 파일 또는 lzma 압축 (텍스트) 파일을 봅니다"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:13
+msgid "B<xzmore> [I<file...>]"
+msgstr "B<xzmore> [I<E<lt>파일E<gt>...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:16
+msgid "B<lzmore> [I<file...>]"
+msgstr "B<lzmore> [I<E<lt>파일E<gt>...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:24
+msgid ""
+"B<xzmore> is a filter which allows examination of B<xz>(1) or B<lzma>(1) "
+"compressed text files one screenful at a time on a soft-copy terminal."
+msgstr ""
+"B<xzmore> 는 B<xz>(1) 또는 B<lzma>(1) 형식으로 압축한 텍스트 파일을 한 번"
+"에 한 화면만큼 소프트-복제 터미널에 표시하는 필터입니다."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:33
+msgid ""
+"To use a pager other than the default B<more,> set environment variable "
+"B<PAGER> to the name of the desired program. The name B<lzmore> is provided "
+"for backward compatibility with LZMA Utils."
+msgstr ""
+"기본 B<more> 대신 다른 페이저 프로그램을 사용하려면, B<PAGER> 환경 변수에 원"
+"하는 프로그램 이름을 넣으십시오. B<lzmore>의 이름은 LZMA 유틸리티의 하위 호"
+"환성을 목적으로 제공합니다."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:33
+#, no-wrap
+msgid "B<e> or B<q>"
+msgstr "B<e> 또는 B<q>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:40
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to exit."
+msgstr ""
+"--More--(다음 파일: I<E<lt>파일E<gt>>) 프롬프트가 뜨면, 이 명령은 B<xzmore>"
+"를 빠져나가게 합니다."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:40
+#, no-wrap
+msgid "B<s>"
+msgstr "B<s>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:47
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to skip the next file and continue."
+msgstr ""
+"--More--(다음 파일: I<E<lt>파일E<gt>>) 프롬프트가 뜨면, 이 명령은 B<xzmore>"
+"에서 다음 파일로 건너뛰어 계속 실행하게 합니다."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:51
+msgid ""
+"For list of keyboard commands supported while actually viewing the content "
+"of a file, refer to manual of the pager you use, usually B<more>(1)."
+msgstr ""
+"파일 내용을 실제로 보는 동안 지원하는 키보드 명령 목록을 보려면, B<more>(1) "
+"와 같은 사용하는 페이저의 설명서를 참고하십시오."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:55
+msgid "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+msgstr "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+
+#~ msgid "2022-12-01"
+#~ msgstr "2022-12-01"
diff --git a/po4a/man/de/lzmainfo.1 b/po4a/man/de/lzmainfo.1
new file mode 100644
index 0000000..28efc01
--- /dev/null
+++ b/po4a/man/de/lzmainfo.1
@@ -0,0 +1,45 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" 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/po4a/man/de/xz.1 b/po4a/man/de/xz.1
new file mode 100644
index 0000000..bdf99de
--- /dev/null
+++ b/po4a/man/de/xz.1
@@ -0,0 +1,1938 @@
+'\" t
+.\"
+.\" Authors: Lasse Collin
+.\" Jia Tan
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZ 1 "17. Juli 2023" 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
+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).
+.TP
+\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP
+dekomprimpiert.
+.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.
+.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
+\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 ""
+Das \fB.lz\fP\-Format wird in Version 0 und der unerweiterten Version 1
+unterstützt. Dateien der Version 0 wurden von \fBlzip\fP 1.3 und älter
+erstellt. Solche Dateien sind nicht sehr weit verbreitet, können aber in
+Dateiarchiven gefunden werden, da einige Quellpakete in diesem Format
+veröffentlicht wurden. Es ist auch möglich, dass Benutzer alte persönliche
+Dateien in diesem Format haben. Die Dekompressionsunterstützung für das
+Format der Version 0 wurde mit der Version 1.18 aus \fBlzip\fP entfernt.
+.IP ""
+\fBlzip\fP\-Versionen ab 1.4 erstellen Dateien im Format der Version 0. Die
+Erweiterung »Sync Flush Marker« zur Formatversion 1 wurde in \fBlzip\fP 1.6
+hinzugefügt. Diese Erweiterung wird sehr selten verwendet und wird von \fBxz\fP
+nicht unterstützt (die Eingabe wird als beschädigt erkannt).
+.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
+\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. Der Speicherbedarf einiger der zukünftigen Multithread\-Modi kann
+dramatisch höher sein als im Einzel\-Thread\-Modus.
+.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
+.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. Die Größe der Blöcke wird in den Block\-Headern gespeichert, die von
+einer zukünftigen Version von \fBxz\fP für eine Multi\-Thread\-Dekompression
+genutzt wird.
+.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 eine zukünftige Version von \fBxz\fP nicht in der Lage sein wird,
+die Dateien im Multi\-Thread\-Modus zu dekomprimieren.
+.TP
+\fB\-\-block\-list=\fP\fIGrößen\fP
+beginnt bei der Kompression in das \fB.xz\fP\-Format nach den angegebenen
+Intervallen unkomprimierter Daten einen neuen Block.
+.IP ""
+Die unkomprimierte \fIGröße\fP der Blöcke wird in einer durch Kommata
+getrennten Liste angegeben. Auslassen einer Größe (zwei oder mehr
+aufeinander folgende Kommata) ist ein Kürzel dafür, die Größe des vorherigen
+Blocks zu verwenden.
+.IP ""
+Falls die Eingabedatei größer ist als die Summe der \fIGrößen\fP, dann wird der
+letzte in \fIGröße\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 ""
+Falls Sie \fIGrößen\fP 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 \fIGrößen\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\-\-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.
+.
+.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 wird durch eine oder mehrere
+Filteroptionen in der Reihenfolge angegeben, in der sie in der Filterkette
+wirksam werden sollen. Daher ist die Reihenfolge der Filteroptionen von
+signifikanter Bedeutung! Beim Dekodieren von Rohdatenströmen
+(\fB\-\-format=raw\fP) wird die Filterkette in der gleichen Reihenfolge angegeben
+wie bei der Kompression.
+.PP
+Filter 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\-\-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
+\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]
+.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;
+.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. Zum Beispiel ist es beim IA\-64\-Filter eine gute
+Wahl, \fBpb=4\fP oder sogar \fBpb=4,lp=4,lc=0\fP mit LZMA2 zu setzen (2^4=16). Der
+x86\-Filter bildet dabei eine Ausnahme; Sie sollten bei der für LZMA2
+voreingestellten 4\-Byte\-Ausrichtung bleiben, wenn Sie x86\-Binärdateien
+komprimieren.
+.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\-\-version\fP,
+\fB\-\-info\-memory\fP und \fB\-\-list\fP unterstützt. In der Zukunft wird dieser Modus
+auch für Kompression und Dekompression unterstützt.
+.
+.SS Version
+\fBxz \-\-robot \-\-version\fP gibt die Versionsnummern von \fBxz\fP und Liblzma im
+folgenden Format aus:
+.PP
+\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.
+.
+.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 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
+\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
+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. \fBUnbek.\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.
+.
+.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
+\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.
+.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. Außer bei
+Shell\-Initialisierungsskripten und in ähnlichen Spezialfällen darf 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(CWXZ_OPT=\-2v tar caf foo.tar.xz foo\fP
+.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(CWXZ_OPT=${XZ_OPT\-"\-7e"} export XZ_OPT\fP
+.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(CWxz foo\fP
+.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(CWxz \-dk bar.xz\fP
+.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(CWtar cf \- baz | xz \-4e > baz.tar.xz\fP
+.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(CWxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fP
+.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(CWfind . \-type f \e! \-name '*.xz' \-print0 \e | xargs \-0r \-P4 \-n16 xz \-T1\fP
+.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(CWxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fP
+.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(CWif ! 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\fP
+.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(CWNEWLIM=$((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\fP
+.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(CWxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fP
+.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(CWxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fP
+.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(CWxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fP
+.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(CWxz \-\-lzma2=preset=6e,pb=0,lc=4 Quellcode.tar\fP
+.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(CWxz \-\-x86 \-\-lzma2 libfoo.so\fP
+.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(CWxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fP
+.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: <https://tukaani.org/xz/>
+.br
+XZ Embedded: <https://tukaani.org/xz/embedded.html>
+.br
+LZMA\-SDK: <https://7\-zip.org/sdk.html>
diff --git a/po4a/man/de/xzdec.1 b/po4a/man/de/xzdec.1
new file mode 100644
index 0000000..43756dc
--- /dev/null
+++ b/po4a/man/de/xzdec.1
@@ -0,0 +1,87 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDEC 1 "19. April 2017" 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: <https://tukaani.org/xz/embedded.html>
diff --git a/po4a/man/de/xzdiff.1 b/po4a/man/de/xzdiff.1
new file mode 100644
index 0000000..ce366a2
--- /dev/null
+++ b/po4a/man/de/xzdiff.1
@@ -0,0 +1,45 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\" Andrew Dudman
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDIFF 1 "4. Juni 2021" Tukaani XZ\-Dienstprogramme
+.SH BEZEICHNUNG
+xzcmp, xzdiff, lzcmp, lzdiff \- komprimierte Dateien vergleichen
+.SH ÜBERSICHT
+\fBxzcmp\fP [\fIcmp\-Optionen\fP] \fIDatei1\fP [\fIDatei2\fP]
+.br
+\fBxzdiff\fP [\fIdiff\-Optionen\fP] \fIDatei1\fP [\fIDatei2\fP]
+.br
+\fBlzcmp\fP [\fIcmp\-Optionen\fP] \fIDatei1\fP [\fIDatei2\fP]
+.br
+\fBlzdiff\fP [\fIdiff\-Optionen\fP] \fIDatei1\fP [\fIDatei2\fP]
+.SH BESCHREIBUNG
+Die Dienstprogramme \fBxzcmp\fP und \fBxzdiff\fP führen die Programme \fBcmp\fP(1)
+beziehungsweise \fBdiff\fP(1) mit Dateien aus, die mittels \fBxz\fP(1),
+\fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1) oder \fBzstd\fP komprimiert
+wurden. Alle angegebenen Optionen werden direkt an \fBcmp\fP(1) oder \fBdiff\fP(1)
+übergeben. Wird nur eine Datei angegeben, wird diese \fIDatei1\fP (die eine
+Endung entsprechend eines der unterstützten Kompressionsformate haben muss)
+mit der \fIDatei1\fP verglichen, von der die Kompressionsformat\-Endung entfernt
+wird. Werden zwei Dateien angegeben, dann werden deren Inhalte (falls nötig,
+unkomprimiert) an \fBcmp\fP(1) oder \fBdiff\fP(1) weitergeleitet. Der Exit\-Status
+von \fBcmp\fP(1) oder \fBdiff\fP(1) wird dabei bewahrt (sofern kein
+Dekompressionsfehler auftrat; in diesem Fall ist der Exit\-Status 2).
+.PP
+Die Namen \fBlzcmp\fP und \fBlzdiff\fP dienen der Abwärtskompatibilität zu den
+LZMA\-Dienstprogrammen.
+.SH "SIEHE AUCH"
+\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1),
+\fBzstd\fP(1), \fBzdiff\fP(1)
+.SH FEHLER
+Die Meldungen der Programme \fBcmp\fP(1) oder \fBdiff\fP(1) können auf temporäre
+Dateinamen verweisen anstatt auf die tatsächlich angegebenen Dateinamen.
diff --git a/po4a/man/de/xzgrep.1 b/po4a/man/de/xzgrep.1
new file mode 100644
index 0000000..28b5098
--- /dev/null
+++ b/po4a/man/de/xzgrep.1
@@ -0,0 +1,64 @@
+.\"
+.\" Original zgrep.1 for gzip: Jean-loup Gailly
+.\" Charles Levert <charles@comm.polymtl.ca>
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZGREP 1 "19. Juli 2022" Tukaani XZ\-Dienstprogramme
+.SH BEZEICHNUNG
+xzgrep \- komprimierte Dateien nach einem regulären Ausdruck durchsuchen
+.SH ÜBERSICHT
+\fBxzgrep\fP [\fIgrep_Optionen\fP] [\fB\-e\fP] \fIMuster\fP [\fIDatei …\fP]
+.br
+\fBxzegrep\fP …
+.br
+\fBxzfgrep\fP …
+.br
+\fBlzgrep\fP …
+.br
+\fBlzegrep\fP …
+.br
+\fBlzfgrep\fP …
+.SH BESCHREIBUNG
+\fBxzgrep\fP wendet \fBgrep\fP(1) auf \fIDateien\fP an, die entweder unkomprimiert
+oder mit \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1) oder
+\fBzstd\fP komprimiert sein können. Alle angegebenen Optionen werden direkt an
+\fBgrep\fP(1) übergeben.
+.PP
+Wenn keine \fIDatei\fP angegeben ist, wird die Standardeingabe dekomprimiert
+(falls nötig) und an \fBgrep\fP übergeben. Beim Lesen aus der Standardeingabe
+keine Dateien unterstützt, die mit \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1) oder
+\fBzstd\fP komprimiert sind.
+.PP
+Wenn \fBxzgrep\fP als \fBxzegrep\fP oder \fBxzfgrep\fP aufgerufen wird, dann wird
+\fBgrep \-E\fP oder \fBgrep \-F\fP anstelle von \fBgrep\fP(1) verwendet. Genauso
+verhalten sich die Befehle \fBlzgrep\fP, \fBlzegrep\fP und \fBlzfgrep\fP, die die
+Abwärtskompatibilität zu den LZMA\-Dienstprogrammen gewährleisten.
+.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 gesetzt ist, verwendet \fBxzgrep\fP deren
+Inhalt anstelle von \fBgrep\fP(1), \fBgrep \-E\fP oder \fBgrep \-F\fP.
+.SH "SIEHE AUCH"
+\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1),
+\fBzgrep\fP(1)
diff --git a/po4a/man/de/xzless.1 b/po4a/man/de/xzless.1
new file mode 100644
index 0000000..fdbad59
--- /dev/null
+++ b/po4a/man/de/xzless.1
@@ -0,0 +1,47 @@
+.\"
+.\" Authors: Andrew Dudman
+.\" Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\" (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 "27. September 2010" 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 …]
+.SH BESCHREIBUNG
+\fBxzless\fP ist ein Filter, der Text aus komprimierten Dateien in einem
+Terminal anzeigt. Es funktioniert mit Dateien, die mit \fBxz\fP(1) oder
+\fBlzma\fP(1) komprimiert sind. Falls keine \fIfiles\fP angegeben sind, 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 weiter
+Information.
+.PP
+Der Befehl \fBlzless\fP dient der Abwärtskompatibilität zu den
+LZMA\-Dienstprogrammen.
+.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/po4a/man/de/xzmore.1 b/po4a/man/de/xzmore.1
new file mode 100644
index 0000000..511a37b
--- /dev/null
+++ b/po4a/man/de/xzmore.1
@@ -0,0 +1,40 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZMORE 1 "30. Juni 2013" 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]
+.SH BESCHREIBUNG
+\fBxzmore\fP ist ein Filter zur seitenweisen Anzeige von Textdateien in einem
+Terminal, die mit \fBxz\fP(1) oder \fBlzma\fP(1) komprimiert wurden.
+.PP
+Um ein anderes Textanzeigeprogramm als den voreingestellten \fBmore\fP zu
+verwenden, setzen Sie die Umgebungsvariable \fBPAGER\fP auf das gewünschte
+Programm. Der Name \fBlzmore\fP dient der Abwärtskompatibilität zu den
+LZMA\-Dienstprogrammen.
+.TP
+\fBe\fP oder \fBq\fP
+Wenn die Zeile \-\-Mehr\-\-(Nächste Datei: \fIDatei\fP) angezeigt wird, wird
+\fBxzmore\fP mit diesem Befehl beendet.
+.TP
+\fBs\fP
+Wenn die Zeile \-\-Mehr\-\-(Nächste Datei: \fIDatei\fP) angezeigt wird, springt
+\fBxzmore\fP zur nächsten Datei und zeigt diese an.
+.PP
+Eine Liste der bei der Betrachtung von Dateiinhalten verfügbaren
+Tastaturbefehle finden Sie in der Handbuchseite des verwendeten
+Textanzeigeprogramms, meist \fBmore\fP(1).
+.SH "SIEHE AUCH"
+\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1)
diff --git a/po4a/man/fr/lzmainfo.1 b/po4a/man/fr/lzmainfo.1
new file mode 100644
index 0000000..ce9b60d
--- /dev/null
+++ b/po4a/man/fr/lzmainfo.1
@@ -0,0 +1,44 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" 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/po4a/man/fr/xz.1 b/po4a/man/fr/xz.1
new file mode 100644
index 0000000..a7fc82b
--- /dev/null
+++ b/po4a/man/fr/xz.1
@@ -0,0 +1,1870 @@
+'\" t
+.\"
+.\" Authors: Lasse Collin
+.\" Jia Tan
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZ 1 2023\-07\-17 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
+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).
+.TP
+\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP
+Décompresser.
+.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.
+.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
+\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 version 0 and the unextended version 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.
+.IP ""
+\fBlzip\fP 1.4 and later create files in the format version 1. The sync flush
+marker extension to the format version 1 was added in \fBlzip\fP 1.6. This
+extension is rarely used and isn't supported by \fBxz\fP (diagnosed as corrupt
+input).
+.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
+\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 contient les besoins en mémoire du compresseur en mode mono\-thread
+\&. Cela devrait à peine varier entre les versions de \fBxz\fP. Les besoins en
+mémoire de quelques uns des futurs modes multi\-thread devraient sensiblement
+augmenter par rapport au mode mono\-thread.
+.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
+.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. The
+sizes of the blocks are stored in the block headers, which a future version
+of \fBxz\fP will use for multi\-threaded decompression.
+.IP ""
+Par défaut, il n'y a pas de répartition de bloc en mode mono\-thread. Régler
+cette option n'affecte pas l'utilisation de la mémoire. Aucune information
+de taille n'est stockée dans l'en\-tête de bloc, par conséquent les fichiers
+créés en mode single\-thread ne seront pas identiques aux fichiers créés en
+mode multi\-thread. Le manque d'information de taille signifie aussi qu'une
+future version de \fBxz\fP ne sera pas capable de décompresser les fichiers en
+mode multi\-thread.
+.TP
+\fB\-\-block\-list=\fP\fItailles\fP
+Lors de la compression dans le format \fB.xz\fP, commencer un nouveau bloc
+après les intervalles donnés des données non\ compressées.
+.IP ""
+Les \fItailles\fP non\-compressées des blocs sont spécifiées sous forme de liste
+séparée par des virgules. Omettre une taille (deux ou plus virgules
+consécutives) est un raccourci pour utiliser la taille du bloc précédent.
+.IP ""
+Si le fichier en entrée est plus grand que la somme des \fItailles\fP, la
+dernière valeur est répétée jusqu'à la fin du fichier. Une valeur spéciale
+de \fB0\fP peut être utilisée comme étant la dernière valeur pour indiquer que
+le reste du fichier devrait être encodé comme un simple bloc.
+.IP ""
+Si on spécifie des \fItailles\fP qui excèdent la taille du bloc de l'encodeur
+(soit la valeur en mode threadé, soit la valeur spécifiée avec
+\fB\-\-block\-size=\fP\fItaille\fP), l'encodeur créera des blocs supplémentaires tout
+en gardant les limites indiquées dans \fItailles\fP. Par exemple, si on indique
+\fB\-\-block\-size=10MiB\fP\fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP et que le
+fichier fait 80Mio, on aura 11 blocs de 5, 10, 8, 2, 10, 10, 4, 10, 10, et
+1\ Mio.
+.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\-\-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.
+.
+.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
+Une chaîne de filtres personnalisée est indiquée en utilisant une ou
+plusieurs options de filtre dans l'ordre où elles sont souhaitées dans la
+chaîne de filtres. Cela fait, l'ordre des options de filtre est
+significatif! Lors du décodage des flux bruts (\fB\-\-format=raw\fP), le filtre
+de chaîne est indiqué dans le même ordre qu'il fût indiqué lors de la
+compression.
+.PP
+Les filtres prennent des \fIoptions\fP spécifiques aux filtres sous la forme
+d'une liste séparée par des virgules. Les virgules supplémentaires dans les
+\fIoptions\fP sont ignorées. Toutes les options ont une valeur par défaut, donc
+vous ne devez indiquer que celles que vous voulez changer.
+.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\-\-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
+\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]
+.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;
+.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. For example, with the IA\-64
+filter, it's good to set \fBpb=4\fP or even \fBpb=4,lp=4,lc=0\fP with LZMA2
+(2^4=16). The x86 filter is an exception; it's usually good to stick to
+LZMA2's default four\-byte alignment when compressing x86 executables.
+.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"
+Le mode robot est activé avec l'option \fB\-\-robot\fP. Cela rend la sortie de
+\fBxz\fP plus facile à analyser par d'autres programmes. Actuellement,
+\fB\-\-robot\fP n'est seulement pris en charge qu'avec \fB\-\-version\fP,
+\fB\-\-info\-memory\fP et \fB\-\-list\fP. Il sera pris en charge pour la compression et
+la décompression dans le futur.
+.
+.SS Version
+\fBxz \-\-robot \-\-version\fP prints the version number of \fBxz\fP and liblzma in
+the following format:
+.PP
+\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.
+.
+.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 "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
+\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
+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.
+.
+.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
+\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.
+.TP
+\fBXZ_DEFAULTS\fP
+Options par défaut propres à l'utilisateur ou pour tout le système. Elles
+sont le plus souvent définies dans un script d'initialisation de
+l'interpréteur pour activer le limiteur d'utilisation de la mémoire de \fBxz\fP
+par défaut. A part pour les scripts d'initialisation de l'interpréteur ou
+des cas similaires, les sripts ne doivent jamais définir ou désactiver
+\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(CWXZ_OPT=\-2v tar caf foo.tar.xz foo\fP
+.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(CWXZ_OPT=${XZ_OPT\-"\-7e"} export XZ_OPT\fP
+.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(CWxz toto\fP
+.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(CWxz \-dk bidule.xz\fP
+.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(CWtar cf \- truc | xz \-4e > truc.tar.xz\fP
+.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(CWxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fP
+.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(CWfind . \-type f \e! \-name '*.xz' \-print0 \e | xargs \-0r \-P4 \-n16 xz \-T1\fP
+.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(CWxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fP
+.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(CWif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || [ "$XZ_VERSION" \-lt 50000002 ]; then echo "Votre version de xz est trop ancienne." fi unset XZ_VERSION LIBLZMA_VERSION\fP
+.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(CWNEWLIM=$((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\fP
+.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(CWxz \-\-lzma2=preset=1,dict=32MiB toto.tar\fP
+.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(CWxz \-vv \-\-lzma2=dict=192MiB gros_toto.tar\fP
+.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(CWxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB toto\fP
+.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(CWxz \-\-lzma2=preset=6e,pb=0,lc=4 code_source.tar\fP
+.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(CWxz \-\-x86 \-\-lzma2 libtoto.so\fP
+.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(CWxz \-\-delta=dist=3 \-\-lzma2=pb=0 toto.tiff\fP
+.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 Utilitaires: <https://tukaani.org/xz/>
+.br
+XZ Embarqué: <https://tukaani.org/xz/embedded.html>
+.br
+LZMA SDK: <https://7\-zip.org/sdk.html>
diff --git a/po4a/man/fr/xzdec.1 b/po4a/man/fr/xzdec.1
new file mode 100644
index 0000000..88742d0
--- /dev/null
+++ b/po4a/man/fr/xzdec.1
@@ -0,0 +1,87 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDEC 1 19\-04\-2017 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 Embarqué: <https://tukaani.org/xz/embedded.html>
diff --git a/po4a/man/fr/xzdiff.1 b/po4a/man/fr/xzdiff.1
new file mode 100644
index 0000000..77a2ddf
--- /dev/null
+++ b/po4a/man/fr/xzdiff.1
@@ -0,0 +1,43 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\" Andrew Dudman
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDIFF 1 2021\-06\-04 Tukaani "Utilitaires XZ"
+.SH NOM
+xzcmp, xzdiff, lzcmp, lzdiff \- Comparer des fichiers compressés.
+.SH SYNOPSIS
+\fBxzcmp\fP [\fIcmp_options\fP] \fIfichier1\fP [\fIfichier2\fP]
+.br
+\fBxzdiff\fP [\fIdiff_options\fP] \fIfichier1\fP [\fIfichier2\fP]
+.br
+\fBlzcmp\fP [\fIcmp_options\fP] \fIfichier1\fP [\fIfichier2\fP]
+.br
+\fBlzdiff\fP [\fIdiff_options\fP] \fIfichier1\fP [\fIfichier2\fP]
+.SH DESCRIPTION
+\fBxzcmp\fP and \fBxzdiff\fP invoke \fBcmp\fP(1) or \fBdiff\fP(1) on files compressed
+with \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), or
+\fBzstd\fP(1). All options specified are passed directly to \fBcmp\fP(1) or
+\fBdiff\fP(1). If only one file is specified, then the files compared are
+\fIfile1\fP (which must have a suffix of a supported compression format) and
+\fIfile1\fP from which the compression format suffix has been stripped. If two
+files are specified, then they are uncompressed if necessary and fed to
+\fBcmp\fP(1) or \fBdiff\fP(1). The exit status from \fBcmp\fP(1) or \fBdiff\fP(1) is
+preserved unless a decompression error occurs; then exit status is 2.
+.PP
+Les noms \fBlzcmp\fP et \fBlzdiff\fP sont fournis pour des besoins de
+rétrocompatibilité avec les Utilitaires LZMA.
+.SH "VOIR AUSSI"
+\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1),
+\fBzstd\fP(1), \fBzdiff\fP(1)
+.SH BOGUES
+Les messages des programmes \fBcmp\fP(1) ou \fBdiff\fP(1) se réfèrent à des noms
+de fichiers temporaires et non à ceux spécifiés.
diff --git a/po4a/man/fr/xzless.1 b/po4a/man/fr/xzless.1
new file mode 100644
index 0000000..58db86a
--- /dev/null
+++ b/po4a/man/fr/xzless.1
@@ -0,0 +1,46 @@
+.\"
+.\" Authors: Andrew Dudman
+.\" Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\" (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 27\-09\-2010 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 [\fIfichier\fP...]
+.SH DESCRIPTION
+\fBxzless\fP est un filtre qui affiche le contenu de fichiers compressés dans
+un terminal. Cela fonctionne avec les fichiers compressés avec \fBxz\fP(1) ou
+\fBlzma\fP(1). Si aucun \fIfichier\fP n'est donné, \fBxzless\fP lit depuis l'entrée
+standard.
+.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
+La commande nommée \fBlzless\fP est fournie pour la rétrocompatibilité avec les
+utilitaires LZMA.
+.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/po4a/man/fr/xzmore.1 b/po4a/man/fr/xzmore.1
new file mode 100644
index 0000000..305d705
--- /dev/null
+++ b/po4a/man/fr/xzmore.1
@@ -0,0 +1,41 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZMORE 1 30\-06\-2013 Tukaani "Utilitaires XZ"
+.SH NOM
+xzmore, lzmore \- Voir le contenu des fichiers (texte) compressés xz ou lzma
+.SH SYNOPSIS
+\fBxzmore\fP [\fIfichier...\fP]
+.br
+\fBlzmore\fP [\fIfichier...\fP]
+.SH DESCRIPTION
+\fBxzmore\fP est un filtre qui permet d'examiner le contenu des fichiers texte
+compressés \fBxz\fP(1) ou \fBlzma\fP(1), une page d'écran à la fois, sur un
+terminal écran.
+.PP
+Pour utiliser un afficheur autre que \fBmore\fP, l'afficheur par défaut,
+définissez la variable d'environnement \fBPAGER\fP avec le nom du programme
+souhaité. Le nom \fBlzmore\fP est fourni pour la rétrocompatibilité avec les
+utilitaires LZMA.
+.TP
+\fBe\fP ou \fBq\fP
+Lorsque l'invite \-\-More\-\-(prochain fichier\ : \fIfichier\fP) est affiché, cette
+commande force \fBxzmore\fP à quitter.
+.TP
+\fBs\fP
+Lorsque l'invite \-\-More\-\-(prochain fichier\ : \fIfichier\fP) est affiché, cette
+commande force \fBxzmore\fP à ignorer le prochain fichier et continuer.
+.PP
+Pour une liste des commandes clavier prises en charge lors de la lecture du
+contenu d'un fichier, référez vous au manuel de l'afficheur (pager) que vous
+utilisez, habituellement \fBmore\fP(1).
+.SH "VOIR AUSSI"
+\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1)
diff --git a/po4a/man/ko/lzmainfo.1 b/po4a/man/ko/lzmainfo.1
new file mode 100644
index 0000000..0faf5e0
--- /dev/null
+++ b/po4a/man/ko/lzmainfo.1
@@ -0,0 +1,37 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" 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/po4a/man/ko/xz.1 b/po4a/man/ko/xz.1
new file mode 100644
index 0000000..d93c199
--- /dev/null
+++ b/po4a/man/ko/xz.1
@@ -0,0 +1,1445 @@
+'\" t
+.\"
+.\" Authors: Lasse Collin
+.\" Jia Tan
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZ 1 2023\-07\-17 Tukaani "XZ 유틸리티"
+.
+.SH 이름
+xz, unxz, xzcat, lzma, unlzma, lzcat \- .xz 파일과 .lzma 파일을 압축 또는 압축 해제합니다
+.
+.SH 요약
+\fBxz\fP [\f\fI옵션\fP...\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
+메모리 사용 제한 기능은 \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를 암시).
+.TP
+\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\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가 아니면 동작에 아무런 영향을 주지 않습니다.
+.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
+\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에서 제거했습니다.
+.IP ""
+\fBlzip\fP 1.4 이상에서는 버전 1형식의 파일을 만듭니다. 형식 버전 1로의 동기화 제거 마커 확장은 \fBlzip\fP 1.6에
+추가했습니다. 이 확장은 거의 쓰지 않으며 \fBxz\fP 에서 조차도 지원하지 않습니다(손상된 입력 파일로 진단함).
+.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
+\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
+.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 딕셔너리 버퍼를 할당한 용량 크기 전체를 다 사용하지 않기 때문입니다. 블록 크기는 블록 헤더에
+저장하며, 블록 헤더는 \fBxz\fP 차기 버전에서 다중\-스레드 압축 해제시 활용할 예정입니다.
+.IP ""
+단일\-스레드 모드에서는 기본적으로 블록 쪼개기를 하지 않습니다. 이 옵션을 설정한다고 해서 메모리 사용에 영향을 주지는 않습니다.
+블록 헤더에 크기 정보를 저장하지 않기 때문에 단일\-스레드 모드에서 만든 파일은 다중\-스레드 모드에서 만든 파일과 동일하지 않습니다.
+크기 정보의 누락은 또한 \fBxz\fP 차기 버전에서 다중\-스레드 모드에서 압축 해제가 불가능함을 의미하기도 합니다.
+.TP
+\fB\-\-block\-list=\fP\fI<크기>\fP
+\&\fB.xz\fP 형식으로 압축할 때, 압축하지 않은 데이터에 주어진 처리 시간 간격 이후에 새 블록 처리를 시작합니다.
+.IP ""
+압축하지 않은 블록 \fI<크기>\fP는 쉼표로 구분한 목록으로 지정합니다. 크기 값을 생략(둘 이상의 연속 쉼표)는 이전
+블록 크기를 계속 사용하겠다는 의미입니다.
+.IP ""
+입력 파일이 \fI<크기>\fP의 합보다 크면, 마지막 \fI<크기>\fP 값을 파일 마지막까지 반복해서 사용합니다.
+특별히 \fB0\fP 값을 마지막 값으로 사용하여 파일 나머지 부분을 단일 블록으로 인코딩해야 한다는 의미를 나타낼 수도 있습니다.
+.IP ""
+인코더 블록 크기를 초과하는 \fI<크기>\fP 값을 지정하면(스레드 모드 기본값 또는
+\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\-\-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 옵션을 지정하더라도 조건에 만족하지 않습니다.
+.
+.SS "개별 압축 필터 체인 설정"
+개별 필터 체인은 사전 설정에 엮인 설정에 의존하는 대신 압축 설정을 세부적으로 하나하나 설정할 수 있게 합니다. 개별 필터 체인을
+지정하면, 명령행에 앞서 지정한 사전 설정 옵션(\fB\-0\fP \&...\& \fB\-9\fP 과 \fB\-\-extreme\fP)은 무시합니다. 사전
+설정 옵션을 하나 이상의 필터 체인 옵션 다음에 지정하면, 새 사전 설정을 취하며, 앞서 지정한 개별 필터 체인 옵션은 무시합니다.
+.PP
+필터 체인은 명령행 파이핑에 비교할 수 있습니다. 압축할 때, 압축하지 않은 입력을 첫번째 필터로 놓고, 출력 대상(이 있으면)을 다음
+필터로 지정합니다. 최종 필터의 출력은 압축 파일로 기옥합니다. 체인의 최대 필터 수는 4이지만, 필터 체인상 필터 갯수는 보통
+1~2개입니다.
+.PP
+수많은 필터가 필터 체인 상에서 제약점을 가지고 있습니다. 일부 필터는 체인의 마지막 필터로만 동작하며, 일부 다른 필터는 마지막이 아닌
+필터로, 어떤 동작은 체인의 어떤 위치에든 둡니다. 필터에 따라, 이 제한은 필터 설계를 따르거나 보안 문제를 막기 위해 존재하기도
+합니다.
+.PP
+개별 필터 체인은 필터 체인에서 원하는 순서대로 하나 이상의 필터 옵션을 사용하여 지정합니다. 이는, 필터 옵션 순서가 중요하다는
+뜻입니다! 원시 스트림을 디코딩할 때(\fB\-\-format=raw\fP), 필터 체인은 압축할 때 지정했던 동일한 순서대로 지정합니다.
+.PP
+필터는 쉼표로 구분하는 필터별 \fI<옵션>\fP이 있습니다. \fI<옵션>\fP에 추가로 입력한 쉼표는 무시합니다.
+모든 옵션 값에는 기본값이 있어, 값을 바꾸려면 지정해야합니다.
+.PP
+전체 필터 체인과 \fI<옵션>\fP을 보려면 \fBxz \-vv\fP (\fB\-\-verbose\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
+\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]
+.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;
+.TE
+.RE
+.RE
+.IP ""
+BCJ 필터를 사용한 데이터는 LZMA2로 보통 압축하기 때문에 LZMA2 옵션을 선택한 BCJ 필터의 정렬기준에 맞추도록 설정하면
+압축율을 좀 더 개선할 수 있습니다. 예를 들면, IA\-64 필터에서는 \fBpb=4\fP 또는 LZMA2에 대해
+\fBpb=4,lp=4,lc=0\fP (2^4=16) 값이 바람직합ㄴ디ㅏ. x86 필터는 예외로, x86 실행 파일을 압축할 경우
+LZMA2의 기본 4바이트 정렬을 따르는게 좋습니다.
+.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\-\-version\fP, \fB\-\-info\-memory\fP, \fB\-\-list\fP 옵션하고만 사용할 수 있습니다.
+앞으로는 압축 및 압축 해제 동작에 대해서도 지원합니다.
+.
+.SS 버전
+\fBxz \-\-robot \-\-version\fP 은 \fBxz\fP 와 liblzma의 버전 번호를 다음 형식으로 나타냅니다:
+.PP
+\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입니다.
+.
+.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 \-\-list\fP 명령은 탭으로 구분한 출력 형태를 활용합니다. 모든 행의 첫번째 컬럼에는 해당 행에서 찾을 수
+있는 정보의 형식을 나타냅니다:
+.TP
+\fB이름\fP
+이 행은 항상 파일 목록 시작 부분의 첫번째 줄에 있습니다. 이 행의 두번째 컬럼에 파일 이름이 들어있습니다.
+.TP
+\fB파일\fP
+이 행에는 \fB.xz\fP 파일의 전반적인 정보가 들어있습니다. 이 행은 항상 \fB이름\fP 행 다음에 있습니다.
+.TP
+\fB스트림\fP
+이 행 형식은 \fB\-\-verbose\fP 옵션을 지정했을 때만 사용합니다. \fB.xz\fP 파일의 \fB스트림\fP 행 수만큼 나타납니다.
+.TP
+\fB블록\fP
+이 행 형식은 \fB\-\-verbose\fP 옵션을 지정했을 때만 사용합니다. \fB.xz\fP 파일의 블록 수만큼 \fB블록\fP 행이 나타납니다.
+\fB블록\fP 행은 모든 \fB스트림\fP 행 다음에 나타납니다. 다른 형식의 행이 끼어들지는 않습니다.
+.TP
+\fB요약\fP
+이 행 형식은 \fB\-\-verbose\fP 옵션을 두번 지정했을 때만 사용합니다. 이 행은 모든 \fB블록\fP 행 다음에 출력합니다.
+\fB파일\fP 행과 비슷하게, \fB요약\fP 행에는 \fB.xz\fP 파일의 전반적인 정보가 담겨있습니다.
+.TP
+\fB총계\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라면, 대시 문자 3개 (\fB\-\-\-\fP)를 비율 값 대신 나타냅니다.
+.IP 7. 4
+쉼표로 구분한 무결성 검사 이름 목록입니다. \fBNone\fP, \fBCRC32\fP, \fBCRC64\fP, \fBSHA\-256\fP 문자열을 알려진
+검사 형식으로 사용합니다. 알 수 없는 검사 형식에 대해서는 \fBUnknown\-\fP\fIN\fP을 사용하며, 여기서 \fIN\fP은 (한 두자리)
+정수형 숫자값으로 이루어진 검사 ID 입니다.
+.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
+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
+\fB요약\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
+\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 옵션을 두 번 지정하면, \fB총계\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
+차후 버전에서는 새 행 형식을 추가하고 기존 행 형식에 추가할 수 있는 새 컬럼을 넣기 까지는 알 수 있겠지만, 기존 컬럼은 바꾸지 않을
+예정입니다.
+.
+.SH "종료 상태"
+.TP
+\fB0\fP
+모든 상태 양호.
+.TP
+\fB1\fP
+오류 발생.
+.TP
+\fB2\fP
+눈여겨볼 경고가 나타났지만, 실제 오류는 일어나지 않음.
+.PP
+표준 오류에 출력하는 알림(경고 또는 오류 아님)는 종료 상태에 영향을 주지 않습니다.
+.
+.SH 환경
+\fBxz\fP는 빈칸으로 구분한 옵션 값 목록을 \fBXZ_DEFAULTS\fP, \fBXZ_OPT\fP 환경 변수에서 순서대로, 명령행에서 옵션을
+해석하기 전에 불러옵니다. 참고로 환경 변수에서 옵션만 해석하며, 옵션이 아닌 부분은 조용히 무시합니다. 해석은
+\fBgetopt_long\fP(3)으로 가능하며, 명령행 인자로 활용하기도 합니다.
+.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(CWXZ_OPT=\-2v tar caf foo.tar.xz foo\fP
+.fi
+.RE
+.RE
+.IP ""
+예를 들면, 스크립트에서 \fBXZ_OPT\fP 를 활용하여, 스크립트별로 기본 압축 옵션을 지정할 수 있습니다. 적절한 이유가 있다면
+\fBXZ_OPT\fP 옵션 값을 사용자가 바꾸는걸 추천합니다. 예를 들면, \fBsh\fP(1) 스크립트에서 다음처럼 활용할 수도 있습니다:
+.RS
+.RS
+.PP
+.nf
+\f(CWXZ_OPT=${XZ_OPT\-"\-7e"} export XZ_OPT\fP
+.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(CWxz foo\fP
+.fi
+.RE
+.PP
+\fIbar.xz\fP를 \fIbar\fP 에 압축을 해제한 후 압축 해제가 무사히 끝나도 \fIbar.xz\fP를 삭제하지 않습니다:
+.RS
+.PP
+.nf
+\f(CWxz \-dk bar.xz\fP
+.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(CWtar cf \- baz | xz \-4e > baz.tar.xz\fP
+.fi
+.RE
+.PP
+압축 및 비압축 파일을 단일 명령으로 표준 출력에 압축해제할 수 있습니다:
+.RS
+.PP
+.nf
+\f(CWxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fP
+.fi
+.RE
+.
+.SS "다중 파일 병렬 압축"
+GNU와 *BSD에서는 \fBfind\fP(1) 명령과 \fBxargs\fP(1) 명령으로 여러 파일의 압축을 병렬 처리할 수 있습니다:
+.RS
+.PP
+.nf
+\f(CWfind . \-type f \e! \-name '*.xz' \-print0 \e | xargs \-0r \-P4 \-n16 xz \-T1\fP
+.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(CWxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fP
+.fi
+.RE
+.PP
+이 스크립트에서는 충분히 최신의 \fBxz\fP 명령을 사용하는지 알아보려 합니다. 다음 \fBsh\fP(1) 스크립트에서는 \fBxz\fP 도구의
+버전 번호가 최소한 5.0.0인지 여부를 검사합니다. 이 방식은 \fB\-\-robot\fP 옵션을 지원하지 않는 오래된 베타 버전과도 호환성이
+있습니다:
+.RS
+.PP
+.nf
+\f(CWif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || [ "$XZ_VERSION" \-lt 50000002 ]; then echo "Your xz is too old." fi unset XZ_VERSION LIBLZMA_VERSION\fP
+.fi
+.RE
+.PP
+\fBXZ_OPT\fP 환경 변수로 압축 해제시 메뢰 사용량 한계를 설정하지만, 한계 값을 이미 설정했다면, 값을 늘리지 않습니다:
+.RS
+.PP
+.nf
+\f(CWNEWLIM=$((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\fP
+.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(CWxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fP
+.fi
+.RE
+.PP
+각 파일에 대해, 위 명령은 압축율이 더 좋아지면서도 \fBxz \-6\fP보다 더 빨라집니다. 그러나, CompCPU 값을 낮게 유지하는
+대신 큰 딕셔너리에서 일부 파일을 강조해야 합니다. 큰 딕셔너리가 대부분의 도움을 주는 매우 명백한 상황에서는 최소한 몇 메가바이트의
+매우 유사한 각 파일이 아카이브에 들어갑니다. 딕셔너리 크기는 LZMA2가 연속으로 존재하는 각 파일의 유사성으로부터 얻는 장점을 취할
+수 있을 때 일부 개별 파일보다 훨씬 더 커집니다.
+.PP
+압축 프로그램과 압축 해제 프로그램에서 메모리를 엄청 많이 사용해도 상관 없고, 파일을 수백 메가 바이트 메모리 용량을 활용하여
+압축한다면, \fBxz \-9\fP 명령에 64MiB 용량을 초과하는 딕셔너리를 사용할 수 있게 하는 방법도 쓸만할 지도 모릅니다:
+.RS
+.PP
+.nf
+\f(CWxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fP
+.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(CWxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fP
+.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(CWxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fP
+.fi
+.RE
+.PP
+LZMA2와 다른 필터를 함께 사용하면 일부 파일 형식에 대해 압축율을 개선할 수 있습니다. 예를 들면 x86\-32 또는 x86\-64
+공유 라이브러리를 x86 BCJ 필터를 활용하여 압축할 경우:
+.RS
+.PP
+.nf
+\f(CWxz \-\-x86 \-\-lzma2 libfoo.so\fP
+.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(CWxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fP
+.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 유틸리티: <https://tukaani.org/xz/>
+.br
+XZ 임베디드: <https://tukaani.org/xz/embedded.html>
+.br
+LZMA SDK: <https://7\-zip.org/sdk.html>
diff --git a/po4a/man/ko/xzdec.1 b/po4a/man/ko/xzdec.1
new file mode 100644
index 0000000..881d4cc
--- /dev/null
+++ b/po4a/man/ko/xzdec.1
@@ -0,0 +1,71 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDEC 1 2017\-04\-19 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 임베디드: <https://tukaani.org/xz/embedded.html>
diff --git a/po4a/man/ko/xzdiff.1 b/po4a/man/ko/xzdiff.1
new file mode 100644
index 0000000..bea6426
--- /dev/null
+++ b/po4a/man/ko/xzdiff.1
@@ -0,0 +1,39 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\" Andrew Dudman
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDIFF 1 2021\-06\-04 Tukaani "XZ 유틸리티"
+.SH 이름
+xzcmp, xzdiff, lzcmp, lzdiff \- 압축 파일을 비교합니다
+.SH 요약
+\fBxzcmp\fP [\fI<비교_옵션>\fP] \fI<파일1>\fP [\fI<파일2>\fP]
+.br
+\fBxzdiff\fP [\fI차이_옵션\fP] \fI<파일1>\fP [\fI<파일2>\fP]
+.br
+\fBlzcmp\fP [\fI<비교_옵션>\fP] \fI<파일1>\fP [\fI<파일2>\fP]
+.br
+\fBlzdiff\fP [\fI<차이_옵션>\fP] \fI<파일1>\fP [\fI<파일2>\fP]
+.SH 설명
+\fBxzcmp\fP 와 \fBxzdiff\fP 는 \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1),
+\fBlzop\fP(1), \fBzstd\fP(1) 로 압축한 파일에 대해 \fBcmp\fP(1) 또는 \fBdiff\fP(1) 명령을 실행합니다. 지정한
+모든 옵션은 직접 \fBcmp\fP(1) 또는 \fBdiff\fP(1) 명령에 전달합니다. 파일 하나만 지정했을 경우
+\fI<파일1>\fP만 비교(지원 압축 형식 접미사를 넣어야 함)하며, \fI<파일1>\fP의 지원 압축 형식 접미사는
+빠집니다. 파일 둘을 지정하면, 필요한 경우 압축 해제하며, \fBcmp\fP(1) 또는 \fBdiff\fP(1) 명령으로 전달합니다.
+\fBcmp\fP(1) 또는 \fBdiff\fP(1) 명령의 종료 상태는 압축 해제 오류가 나타나지 않는 한 보존됩니다. 압축 해제 오류가
+나타나면 종료 상태는 2가 됩니다.
+.PP
+\fBlzcmp\fP 와 \fBlzdiff\fP 명령은 LZMA 유틸리티 하위 호환성을 목적으로 제공합니다.
+.SH "추가 참조"
+\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1),
+\fBzstd\fP(1), \fBzdiff\fP(1)
+.SH 버그
+\fBcmp\fP(1) 프로그램 또는 \fBdiff\fP(1) 프로그램에서 온 메시지는 지정한 파일 이름 대신 임시 파일 이름을 참조합니다.
diff --git a/po4a/man/ko/xzgrep.1 b/po4a/man/ko/xzgrep.1
new file mode 100644
index 0000000..a04fea2
--- /dev/null
+++ b/po4a/man/ko/xzgrep.1
@@ -0,0 +1,57 @@
+.\"
+.\" Original zgrep.1 for gzip: Jean-loup Gailly
+.\" Charles Levert <charles@comm.polymtl.ca>
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZGREP 1 2022\-07\-19 Tukaani "XZ 유틸리티"
+.SH 이름
+xzgrep \- 정규 표현식을 활용하여 압축 파일을 검색합니다
+.SH 요약
+\fBxzgrep\fP [\fIgrep_options\fP] [\fB\-e\fP] \fI<패턴>\fP [\fI<파일>...\fP]
+.br
+\fBxzegrep\fP \&...
+.br
+\fBxzfgrep\fP \&...
+.br
+\fBlzgrep\fP \&...
+.br
+\fBlzegrep\fP \&...
+.br
+\fBlzfgrep\fP \&...
+.SH 설명
+\fBxzgrep\fP 명령은 \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1),
+\fBzstd\fP(1) 로 압축을 했거나 하지 않은 \fI<파일>\fP에 대해 \fBgrep\fP(1) 명령을 실행합니다. 모든 지정
+옵션은 \fBgrep\fP(1)에 바로 전달합니다.
+.PP
+지정한 \fI<파일>\fP이 없다면, 필요에 따라 표준 입력 데이터 압축을 풀어내어 \fBgrep\fP(1) 에 전달합니다. 표준
+입력에서 읽을 떄, \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1) 압축 파일은 지원하지 않습니다.
+.PP
+\fBxzgrep\fP을 \fBxzegrep\fP 또는 \fBxzfgrep\fP 으로 실행하면 \fBgrep\fP(1) 대신 \fBgrep \-E\fP 또는
+\fBgrep \-F\fP 명령을 활용합니다. LZMA 유틸리티와 하위 호환성을 가진 \fBlzgrep\fP, \fBlzegrep\fP,
+\fBlzfgrep\fP 명령에도 동일합니다.
+.SH "종료 상태"
+.TP
+0
+최소한 하나 이상의 파일에서 하나 이상의 일치하는 결과를 찾았습니다. 오류가 없습니다.
+.TP
+1
+어떤 입력 파일에서든 일치하는 내용이 없습니다. 오류가 없습니다.
+.TP
+>1
+하나 이상의 오류가 나타납니다. 일치하는 항목을 찾아낼 지 여부는 알 수 없습니다.
+.SH 환경
+.TP
+\fBGREP\fP
+\fBGREP\fP 환경 변수를 설정하면, \fBxzgrep\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),
+\fBzgrep\fP(1)
diff --git a/po4a/man/ko/xzless.1 b/po4a/man/ko/xzless.1
new file mode 100644
index 0000000..1d745af
--- /dev/null
+++ b/po4a/man/ko/xzless.1
@@ -0,0 +1,39 @@
+.\"
+.\" Authors: Andrew Dudman
+.\" Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\" (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 2010\-09\-27 Tukaani "XZ 유틸리티"
+.SH 이름
+xzless, lzless \- xz 또는 lzma 압축 (텍스트) 파일을 봅니다
+.SH 요약
+\fBxzless\fP [\fI<파일>\fP...]
+.br
+\fBlzless\fP [\fI<파일>\fP...]
+.SH 설명
+\fBxzless\fP 는 압축 파일을 터미널에 나타내는 필터 프로그램입니다. \fBxz\fP(1) 또는 \fBlzma\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/po4a/man/ko/xzmore.1 b/po4a/man/ko/xzmore.1
new file mode 100644
index 0000000..fd6f9f2
--- /dev/null
+++ b/po4a/man/ko/xzmore.1
@@ -0,0 +1,36 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZMORE 1 2013\-06\-30 Tukaani "XZ 유틸리티"
+.SH 이름
+xzmore, lzmore \- xz 압축 (텍스트) 파일 또는 lzma 압축 (텍스트) 파일을 봅니다
+.SH 요약
+\fBxzmore\fP [\fI<파일>...\fP]
+.br
+\fBlzmore\fP [\fI<파일>...\fP]
+.SH 설명
+\fBxzmore\fP 는 \fBxz\fP(1) 또는 \fBlzma\fP(1) 형식으로 압축한 텍스트 파일을 한 번에 한 화면만큼 소프트\-복제
+터미널에 표시하는 필터입니다.
+.PP
+기본 \fBmore\fP 대신 다른 페이저 프로그램을 사용하려면, \fBPAGER\fP 환경 변수에 원하는 프로그램 이름을 넣으십시오.
+\fBlzmore\fP의 이름은 LZMA 유틸리티의 하위 호환성을 목적으로 제공합니다.
+.TP
+\fBe\fP 또는 \fBq\fP
+\-\-More\-\-(다음 파일: \fI<파일>\fP) 프롬프트가 뜨면, 이 명령은 \fBxzmore\fP를 빠져나가게 합니다.
+.TP
+\fBs\fP
+\-\-More\-\-(다음 파일: \fI<파일>\fP) 프롬프트가 뜨면, 이 명령은 \fBxzmore\fP에서 다음 파일로 건너뛰어 계속
+실행하게 합니다.
+.PP
+파일 내용을 실제로 보는 동안 지원하는 키보드 명령 목록을 보려면, \fBmore\fP(1) 와 같은 사용하는 페이저의 설명서를
+참고하십시오.
+.SH "추가 참조"
+\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1)
diff --git a/po4a/man/pt_BR/lzmainfo.1 b/po4a/man/pt_BR/lzmainfo.1
new file mode 100644
index 0000000..160a494
--- /dev/null
+++ b/po4a/man/pt_BR/lzmainfo.1
@@ -0,0 +1,43 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" 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/po4a/man/pt_BR/xz.1 b/po4a/man/pt_BR/xz.1
new file mode 100644
index 0000000..d8ccb2f
--- /dev/null
+++ b/po4a/man/pt_BR/xz.1
@@ -0,0 +1,1837 @@
+'\" t
+.\"
+.\" Authors: Lasse Collin
+.\" Jia Tan
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZ 1 2023\-07\-17 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
+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).
+.TP
+\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP
+Descompacta.
+.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.
+.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
+\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 ""
+O formato \fB.lz\fP versão 0 e a versão não estendida 1 são suportados. Os
+arquivos da versão 0 foram produzidos por \fBlzip\fP 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 \fBlzip\fP 1.18.
+.IP ""
+\fBlzip\fP 1.4 e posteriores criam arquivos no formato versão 1. A extensão do
+marcador de descarga de sincronização para o formato versão 1 foi adicionada
+em \fBlzip\fP 1.6. Esta extensão raramente é usada e não é suportada por \fBxz\fP
+(diagnosticada como entrada corrompida).
+.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
+\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 contém os requisitos de memória do compactador no modo de thread
+única.Pode variar ligeiramente entre as versões \fBxz\fP. Os requisitos de
+memória de alguns dos futuros modos de várias threads (multithread) podem
+ser dramaticamente maiores do que os do modo de thread única.
+.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
+.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 ""
+No modo multi\-thread, cerca de três vezes \fItamanho\fP bytes serão alocados em
+cada thread para armazenar em buffer a entrada e a saída. O \fItamanho\fP
+padrão é três vezes o tamanho do dicionário LZMA2 ou 1 MiB, o que for
+maior. Normalmente, um bom valor é 2\(en4 vezes o tamanho do dicionário
+LZMA2 ou pelo menos 1 MiB. Usar \fItamanho\fP menor que o tamanho do dicionário
+LZMA2 é um desperdício de RAM porque o buffer do dicionário LZMA2 nunca será
+totalmente usado. Os tamanhos dos blocos são armazenados nos cabeçalhos dos
+blocos, que uma versão futura do \fBxz\fP usará para descompactação em
+multi\-thread.
+.IP ""
+No modo de thread única, nenhuma divisão de bloco é feita por
+padrão. Definir essa opção não afeta o uso da memória. Nenhuma informação de
+tamanho é armazenada nos cabeçalhos dos blocos, portanto, os arquivos
+criados no modo de thread única não serão idênticos aos arquivos criados no
+modo multi\-thread. A falta de informações de tamanho também significa que
+uma versão futura do \fBxz\fP não poderá descompactar os arquivos no modo
+multi\-thread.
+.TP
+\fB\-\-block\-list=\fP\fItamanhos\fP
+Ao compactar para o formato \fB.xz\fP, inicia um novo bloco após os intervalos
+fornecidos de dados não compactados.
+.IP ""
+Os \fItamanhos\fP não compactados dos blocos são especificados como uma lista
+separada por vírgulas. Omitir um tamanho (duas ou mais vírgulas
+consecutivas) é uma forma abreviada de usar o tamanho do bloco anterior.
+.IP ""
+Se o arquivo de entrada for maior que a soma de \fItamanhos\fP, o último valor
+em \fItamanhos\fP é repetido até o final do arquivo. Um valor especial de \fB0\fP
+pode ser usado como o último valor para indicar que o restante do arquivo
+deve ser codificado como um único bloco.
+.IP ""
+Se alguém especificar \fItamanhos\fP que excedam o tamanho do bloco do
+codificador (seja o valor padrão no modo em threads ou o valor especificado
+com \fB\-\-block\-size=\fP\fItamanho\fP), o codificador criará blocos adicionais
+enquanto mantém o limites especificados em \fItamanhos\fP. Por exemplo, se
+alguém especificar \fB\-\-block\-size=10MiB\fP
+\fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP e o arquivo de entrada for 80
+MiB, obterá 11 blocos: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10 e 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\-\-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.
+.
+.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
+Uma cadeia de filtro personalizada é especificada usando uma ou mais opções
+de filtro na ordem desejada na cadeia de filtro. Ou seja, a ordem das opções
+de filtro é significativa! Ao decodificar fluxos brutos (\fB\-\-format=raw\fP), a
+cadeia de filtros é especificada na mesma ordem em que foi especificada
+durante a compactação.
+.PP
+Os filtros usam \fIopções\fP específicas do filtro como uma lista separada por
+vírgulas. As vírgulas extras em \fIopções\fP são ignoradas. Cada opção tem um
+valor padrão, portanto, você precisa especificar apenas aquelas que deseja
+alterar.
+.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\-\-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
+\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]
+.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;
+.TE
+.RE
+.RE
+.IP ""
+Como os dados filtrados por BCJ geralmente são compactados com LZMA2, a taxa
+de compactação pode melhorar ligeiramente se as opções de LZMA2 forem
+definidas para corresponder ao alinhamento do filtro BCJ selecionado. Por
+exemplo, com o filtro IA\-64, é bom definir \fBpb=4\fP ou mesmo
+\fBpb=4,lp=4,lc=0\fP com LZMA2 (2^4=16). O filtro x86 é uma exceção; geralmente
+é bom manter o alinhamento padrão de quatro bytes do LZMA2 ao compactar
+executáveis x86.
+.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Ô"
+O modo robô é ativado com a opção \fB\-\-robot\fP. Isso torna a saída de \fBxz\fP
+mais fácil de ser analisada por outros programas. Atualmente \fB\-\-robot\fP é
+suportado apenas junto com \fB\-\-version\fP, \fB\-\-info\-memory\fP e \fB\-\-list\fP. Ele
+terá suporte para compactação e descompactação no futuro.
+.
+.SS Versão
+\fBxz \-\-robot \-\-version\fP prints the version number of \fBxz\fP and liblzma in
+the following format:
+.PP
+\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.
+.
+.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 "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
+\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
+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.
+.
+.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
+\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.
+.TP
+\fBXZ_DEFAULTS\fP
+Opções padrão específicas do usuário ou de todo o sistema. Normalmente, isso
+é definido em um script de inicialização do shell para habilitar o limitador
+de uso de memória do \fBxz\fP por padrão. Excluindo scripts de inicialização de
+shell e casos especiais semelhantes, os scripts nunca devem definir ou
+remover a definição de \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(CWXZ_OPT=\-2v tar caf foo.tar.xz foo\fP
+.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(CWXZ_OPT=${XZ_OPT\-"\-7e"} export XZ_OPT\fP
+.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(CWxz foo\fP
+.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(CWxz \-dk bar.xz\fP
+.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(CWtar cf \- baz | xz \-4e > baz.tar.xz\fP
+.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(CWxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fP
+.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(CWfind . \-type f \e! \-name '*.xz' \-print0 \e | xargs \-0r \-P4 \-n16 xz \-T1\fP
+.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(CWxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fP
+.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(CWif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || [ "$XZ_VERSION" \-lt 50000002 ]; then echo "Your xz is too old." fi unset XZ_VERSION LIBLZMA_VERSION\fP
+.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(CWNEWLIM=$((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\fP
+.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(CWxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fP
+.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(CWxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fP
+.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(CWxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fP
+.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(CWxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fP
+.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(CWxz \-\-x86 \-\-lzma2 libfoo.so\fP
+.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(CWxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fP
+.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: <https://tukaani.org/xz/>
+.br
+XZ Embedded: <https://tukaani.org/xz/embedded.html>
+.br
+LZMA SDK: <https://7\-zip.org/sdk.html>
diff --git a/po4a/man/pt_BR/xzdec.1 b/po4a/man/pt_BR/xzdec.1
new file mode 100644
index 0000000..09f9255
--- /dev/null
+++ b/po4a/man/pt_BR/xzdec.1
@@ -0,0 +1,85 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDEC 1 2017\-04\-19 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: <https://tukaani.org/xz/embedded.html>
diff --git a/po4a/man/pt_BR/xzdiff.1 b/po4a/man/pt_BR/xzdiff.1
new file mode 100644
index 0000000..9203c41
--- /dev/null
+++ b/po4a/man/pt_BR/xzdiff.1
@@ -0,0 +1,44 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\" Andrew Dudman
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDIFF 1 2021\-06\-04 Tukaani "XZ Utils"
+.SH NOME
+xzcmp, xzdiff, lzcmp, lzdiff \- compara arquivos compactados
+.SH SINOPSE
+\fBxzcmp\fP [\fIopções_cmd\fP] \fIarquivo1\fP [\fIarquivo2\fP]
+.br
+\fBxzdiff\fP [\fIopções_diff\fP] \fIarquivo1\fP [\fIarquivo2\fP]
+.br
+\fBlzcmp\fP [\fIopções_cmp\fP] \fIarquivo1\fP [\fIarquivo2\fP]
+.br
+\fBlzdiff\fP [\fIopções_diff\fP] \fIarquivo1\fP [\fIarquivo2\fP]
+.SH DESCRIÇÃO
+\fBxzcmp\fP e \fBxzdiff\fP invocam \fBcmp\fP(1) ou \fBdiff\fP(1) em arquivos compactados
+com \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP( 1), \fBbzip2\fP(1), \fBlzop\fP(1) ou
+\fBzstd\fP(1). Todas as opções especificadas são passadas diretamente para
+\fBcmp\fP(1) ou \fBdiff\fP(1). Se apenas um arquivo for especificado, os arquivos
+comparados serão \fIarquivo1\fP (que deve ter um sufixo de um formato de
+compactação compatível) e \fIarquivo1\fP do qual o sufixo do formato de
+compactação foi removido. Se dois arquivos forem especificados, eles serão
+descompactados, se necessário, e enviados para \fBcmp\fP(1) ou \fBdiff\fP(1). O
+status de saída de \fBcmp\fP(1) ou \fBdiff\fP(1) é preservado, a menos que ocorra
+um erro de descompactação; então o status de saída é 2.
+.PP
+Os nomes \fBlzcmp\fP e \fBlzdiff\fP são fornecidos para compatibilidade com
+versões anteriores do LZMA Utils.
+.SH "VEJA TAMBÉM"
+\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1),
+\fBzstd\fP(1), \fBzdiff\fP(1)
+.SH BUGS
+As mensagens dos programas \fBcmp\fP(1) ou \fBdiff\fP(1) referem\-se a nomes de
+arquivos temporários em vez daqueles especificados.
diff --git a/po4a/man/pt_BR/xzgrep.1 b/po4a/man/pt_BR/xzgrep.1
new file mode 100644
index 0000000..1a347fb
--- /dev/null
+++ b/po4a/man/pt_BR/xzgrep.1
@@ -0,0 +1,63 @@
+.\"
+.\" Original zgrep.1 for gzip: Jean-loup Gailly
+.\" Charles Levert <charles@comm.polymtl.ca>
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZGREP 1 2022\-07\-19 Tukaani "XZ Utils"
+.SH NOME
+xzgrep \- pesquisa arquivos compactados para uma expressão regular
+.SH SINOPSE
+\fBxzgrep\fP [\fIopções_grep\fP] [\fB\-e\fP] \fIpadrão\fP [\fIarquivo...\fP]
+.br
+\fBxzegrep\fP \&...
+.br
+\fBxzfgrep\fP \&...
+.br
+\fBlzgrep\fP \&...
+.br
+\fBlzegrep\fP \&...
+.br
+\fBlzfgrep\fP \&...
+.SH DESCRIÇÃO
+\fBxzgrep\fP invoca \fBgrep\fP(1) em \fIarquivos\fP que podem ser descompactados ou
+compactados com \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1),
+ou \fBzstd\fP(1). Todas as opções especificadas são passadas diretamente para
+\fBgrep\fP(1).
+.PP
+Se nenhum \fIarquivo\fP for especificado, a entrada padrão será descompactada,
+se necessário, e enviada para \fBgrep\fP(1). Ao ler da entrada padrão, os
+arquivos compactados \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1) e \fBzstd\fP(1) não
+são suportados.
+.PP
+Se \fBxzgrep\fP for chamado como \fBxzegrep\fP ou \fBxzfgrep\fP, então \fBgrep \-E\fP ou
+\fBgrep \-F\fP será usado em vez de \fBgrep\fP(1). O mesmo se aplica aos nomes
+\fBlzgrep\fP, \fBlzegrep\fP e \fBlzfgrep\fP, que são fornecidos para compatibilidade
+com versões anteriores do LZMA Utils.
+.SH "STATUS DE SAÍDA"
+.TP
+0
+Pelo menos uma correspondência foi encontrada em pelo menos um dos arquivos
+de entrada. Nenhum erro ocorreu.
+.TP
+1
+Nenhuma correspondência foi encontrada em nenhum dos arquivos de
+entrada. Nenhum erro ocorreu.
+.TP
+>1
+Ocorreu um ou mais erros. Não se sabe se foram encontradas correspondências.
+.SH AMBIENTE
+.TP
+\fBGREP\fP
+Se a variável de ambiente \fBGREP\fP for definida, \fBxzgrep\fP a usará em vez de
+\fBgrep\fP(1), \fBgrep \-E\fP ou \fBgrep \-F\fP.
+.SH "VEJA TAMBÉM"
+\fBgrep\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1), \fBzstd\fP(1),
+\fBzgrep\fP(1)
diff --git a/po4a/man/pt_BR/xzless.1 b/po4a/man/pt_BR/xzless.1
new file mode 100644
index 0000000..c2da329
--- /dev/null
+++ b/po4a/man/pt_BR/xzless.1
@@ -0,0 +1,46 @@
+.\"
+.\" Authors: Andrew Dudman
+.\" Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\" (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 2010\-09\-27 Tukaani "XZ Utils"
+.SH NOME
+xzless, lzless \- visualiza arquivos (texto) compactados em xz ou lzma
+.SH SINOPSE
+\fBxzless\fP [\fIarquivo\fP...]
+.br
+\fBlzless\fP [\fIarquivo\fP...]
+.SH DESCRIÇÃO
+\fBxzless\fP é um filtro que exibe texto de arquivos compactados em um
+terminal. Ele funciona em arquivos compactados com \fBxz\fP(1) ou
+\fBlzma\fP(1). Se nenhum \fIfiles\fP for fornecido, \fBxzless\fP lê da entrada
+padrão.
+.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
+O comando denominado \fBlzless\fP é fornecido para compatibilidade com versões
+anteriores do LZMA Utils.
+.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/po4a/man/pt_BR/xzmore.1 b/po4a/man/pt_BR/xzmore.1
new file mode 100644
index 0000000..281ea63
--- /dev/null
+++ b/po4a/man/pt_BR/xzmore.1
@@ -0,0 +1,39 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZMORE 1 2013\-06\-30 Tukaani "XZ Utils"
+.SH NOME
+xzmore, lzmore \- visualiza arquivos (texto) compactados em xz ou lzma
+.SH SINOPSE
+\fBxzmore\fP [\fIarquivo...\fP]
+.br
+\fBlzmore\fP [\fIarquivo...\fP]
+.SH DESCRIÇÃO
+\fBxzmore\fP é um filtro que permite o exame de arquivos de texto compactados
+\fBxz\fP(1) ou \fBlzma\fP(1) uma tela por vez em um terminal de cópia eletrônica.
+.PP
+Para usar um pager diferente do padrão \fBmore,\fP defina a variável de
+ambiente \fBPAGER\fP para o nome do programa desejado. O nome \fBlzmore\fP é
+fornecido para compatibilidade com versões anteriores do LZMA Utils.
+.TP
+\fBe\fP ou \fBq\fP
+Quando o prompt \-\-More\-\-(Next file: \fIarquivo\fP) é impresso, esse comando faz
+com que \fBxzmore\fP saia.
+.TP
+\fBs\fP
+Quando o prompt \-\-More\-\-(Next file: \fIarquivo\fP) é impresso, esse comando faz
+com que \fBxzmore\fP pule o próximo arquivo e continue.
+.PP
+Para obter uma lista de comandos de teclado suportados durante a exibição
+real do conteúdo de um arquivo, consulte o manual do paginador que você usa,
+geralmente \fBmore\fP(1).
+.SH "VEJA TAMBÉM"
+\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1)
diff --git a/po4a/man/ro/lzmainfo.1 b/po4a/man/ro/lzmainfo.1
new file mode 100644
index 0000000..789c25d
--- /dev/null
+++ b/po4a/man/ro/lzmainfo.1
@@ -0,0 +1,44 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" 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/po4a/man/ro/xz.1 b/po4a/man/ro/xz.1
new file mode 100644
index 0000000..e9a4bd4
--- /dev/null
+++ b/po4a/man/ro/xz.1
@@ -0,0 +1,1921 @@
+'\" t
+.\"
+.\" Authors: Lasse Collin
+.\" Jia Tan
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZ 1 17.07.2023 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
+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).
+.TP
+\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\fP
+Decomprimare.
+.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 căutate.
+.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.
+.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
+\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 ""
+Formatul \fB.lz\fP versiunea 0 și versiunea neextinsă 1 sunt acceptate.
+Fișierele versiunea 0 au fost produse de \fBlzip\fP cu versiunea 1.3 sau mai
+veche. Astfel de fișiere nu sunt obișnuite, dar pot fi găsite în arhivele
+de fișiere, deoarece câteva pachete sursă au fost lansate în acest format.
+Oamenii ar putea avea și fișiere personale vechi în acest format. Suportul
+de decomprimare pentru versiunea de format 0 a fost eliminat în \fBlzip\fP
+1.18.
+.IP ""
+\fBlzip\fP 1.4 și versiunile ulterioare creează fișiere în formatul versiunea
+1. Extensia „sync flush marker” pentru versiunea 1 de format a fost
+adăugată în \fBlzip\fP 1.6. Această extensie este folosită rar și nu este
+acceptată de \fBxz\fP (diagnosticată ca intrare coruptă).
+.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
+\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. Cerințele de
+memorie ale unora dintre viitoarele moduri cu mai multe fire de execuție pot
+să fie din nefericire cu mult mai mari decât cele ale modului cu un singur
+fir.
+.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
+.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. Dimensiunile blocurilor sunt stocate în antetele blocurilor, pe
+care o versiune viitoare a \fBxz\fP le va folosi pentru decomprimarea cu mai
+multe fire de execuție.
+.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 despre dimensiune înseamnă, de asemenea,
+că o versiune viitoare de \fBxz\fP nu va putea decomprima fișierele în modul cu
+mai multe fire de execuție.
+.TP
+\fB\-\-block\-list=\fP\fIdimensiuni\fP
+Atunci când comprimă în formatul \fB.xz\fP, începe un nou bloc după intervalele
+specificate, de date necomprimate.
+.IP ""
+\fIDimensiunile\fP necomprimate ale blocurilor sunt specificate ca o listă
+separată prin virgule. Omiterea unei dimensiuni (două sau mai multe virgule
+consecutive) este o prescurtare pentru a folosi dimensiunea blocului
+anterior.
+.IP ""
+Dacă fișierul de intrare este mai mare decât suma \fIdimensiuni\fPlor, ultima
+valoare din \fIdimensiuni\fP se repetă până la sfârșitul fișierului. O valoare
+specială de \fB0\fP poate fi utilizată ca ultima valoare pentru a indica faptul
+că restul fișierului ar trebui să fie codificat ca un singur bloc.
+.IP ""
+Dacă se specifică \fIdimensiuni\fP care depășesc dimensiunea blocului
+codificatorului (fie valoarea implicită în modul fire de execuție, fie
+valoarea specificată cu opțiunea \fB\-\-block\-size=\fP\fIdimensiune\fP),
+codificatorul va crea blocuri suplimentare păstrând în același timp limitele
+specificate în \fIdimensiuni\fP. De exemplu, dacă se specifică
+\fB\-\-block\-size=10MiB\fP \fB\-\-block\-list=5MiB,10MiB,8MiB,12MiB,24MiB\fP iar
+fișierul de intrare este de 80Mio, se vor obține 11 blocuri de: 5, 10, 8,
+10, 2, 10, 10, 4, 10, 10 și 1Mio.
+.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\-\-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.
+.
+.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 filtrare personalizat este specificat utilizând una sau mai multe
+opțiuni de filtrare în ordinea în care sunt cerute în lanțul de filtrare.
+Adică, ordinea opțiunilor de filtrare este semnificativă! La decodificarea
+fluxurilor brute (\fB\-\-format=raw\fP), lanțul de filtrare este specificat în
+aceeași ordine în care a fost specificat la comprimare.
+.PP
+Filtrele iau \fIopțiuni\fP specifice filtrului ca o listă separată prin
+virgule. Virgulele suplimentare din \fIopțiuni\fP sunt ignorate. Fiecare
+opțiune are o valoare implicită, așa că trebuie să specificați numai 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\-\-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
+\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]
+.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;
+.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. De
+exemplu, cu filtrul IA\-64, este bine să stabiliți \fBpb=4\fP sau chiar
+\fBpb=4,lp=4,lc=0\fP cu LZMA2 (2^4=16). Filtrul x86 este o excepție; de
+obicei, este bine să rămână la alinierea implicită de patru octeți a LZMA2
+atunci când se comprimă executabile x86.
+.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\-\-version\fP, \fB\-\-info\-memory\fP și
+\fB\-\-list\fP. Va fi acceptată pentru comprimare și decomprimare în viitor.
+.
+.SS Versiunea
+\fBxz \-\-robot \-\-version\fP va afișa numărul versiunii \fBxz\fP și liblzma în
+următorul format:
+.PP
+\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.
+.
+.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 "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
+\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
+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ă \fBNone\-\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.
+.
+.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"
+\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ă.
+.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. 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(CWXZ_OPT=\-2v tar caf foo.tar.xz foo\fP
+.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(CWXZ_OPT=${XZ_OPT\-"\-7e"} export XZ_OPT\fP
+.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(CWxz foo\fP
+.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(CWxz \-dk bar.xz\fP
+.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(CWtar cf \- baz | xz \-4e > baz.tar.xz\fP
+.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(CWxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fP
+.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(CWfind . \-type f \e! \-name '*.xz' \-print0 \e | xargs \-0r \-P4 \-n16 xz \-T1\fP
+.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(CWxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fP
+.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(CWif ! 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\fP
+.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(CWNEWLIM=$((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\fP
+.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(CWxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fP
+.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(CWxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fP
+.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(CWxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fP
+.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(CWxz \-\-lzma2=preset=6e,pb=0,lc=4 fișierul_sursă.tar\fP
+.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(CWxz \-\-x86 \-\-lzma2 libfoo.so\fP
+.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(CWxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fP
+.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: <https://tukaani.org/xz/>
+.br
+XZ Embedded: <https://tukaani.org/xz/embedded.html>
+.br
+LZMA SDK: <https://7\-zip.org/sdk.html>
diff --git a/po4a/man/ro/xzdec.1 b/po4a/man/ro/xzdec.1
new file mode 100644
index 0000000..91e4d6c
--- /dev/null
+++ b/po4a/man/ro/xzdec.1
@@ -0,0 +1,88 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDEC 1 19.04.2017 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: <https://tukaani.org/xz/embedded.html>
diff --git a/po4a/man/ro/xzdiff.1 b/po4a/man/ro/xzdiff.1
new file mode 100644
index 0000000..9d4d833
--- /dev/null
+++ b/po4a/man/ro/xzdiff.1
@@ -0,0 +1,45 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\" Andrew Dudman
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDIFF 1 04.06.2021 Tukaani "Utilități XZ"
+.SH NUME
+xzcmp, xzdiff, lzcmp, lzdiff \- compară fișierele comprimate
+.SH REZUMAT
+\fBxzcmp\fP [\fIopțiuni_comparare\fP] \fIfișier1\fP [\fIfișier2\fP]
+.br
+\fBxzdiff\fP [\fIopțiuni_diferențe\fP] \fIfișier1\fP [\fIfișier2\fP]
+.br
+\fBlzcmp\fP [\fIopțiuni_comparare\fP] \fIfișier1\fP [\fIfișier2\fP]
+.br
+\fBlzdiff\fP [\fIopțiuni_diferențe\fP] \fIfișier1\fP [\fIfișier2\fP]
+.SH DESCRIERE
+\fBxzcmp\fP și \fBxzdiff\fP invocă \fBcmp\fP(1) sau \fBdiff\fP(1) pentru fișierele
+comprimate cu \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP( 1), \fBbzip2\fP(1), \fBlzop\fP(1) sau
+\fBzstd\fP(1). Toate opțiunile specificate sunt transmise direct către
+\fBcmp\fP(1) sau \fBdiff\fP(1). Dacă este specificat un singur fișier, atunci
+fișierele comparate sunt \fIfișier1\fP (care trebuie să aibă un sufix al unui
+format de comprimare acceptat) și \fIfișier1\fP din care a fost eliminat
+sufixul formatului de comprimare. Dacă sunt specificate două fișiere,
+atunci acestea sunt decomprimate dacă este necesar și introduse în \fBcmp\fP(1)
+sau \fBdiff\fP(1). Starea de ieșire din \fBcmp\fP(1) sau \fBdiff\fP(1) este păstrată
+cu excepția cazului în care apare o eroare de decomprimare; atunci starea de
+ieșire este 2.
+.PP
+Numele \fBlzcmp\fP și \fBlzdiff\fP sunt furnizate pentru compatibilitatea cu LZMA
+Utils.
+.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), \fBzdiff\fP(1)
+.SH ERORI
+Mesajele din programele \fBcmp\fP(1) sau \fBdiff\fP(1) se referă la nume de
+fișiere temporare în loc de cele specificate.
diff --git a/po4a/man/ro/xzgrep.1 b/po4a/man/ro/xzgrep.1
new file mode 100644
index 0000000..e1d6371
--- /dev/null
+++ b/po4a/man/ro/xzgrep.1
@@ -0,0 +1,64 @@
+.\"
+.\" Original zgrep.1 for gzip: Jean-loup Gailly
+.\" Charles Levert <charles@comm.polymtl.ca>
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZGREP 1 19.07.2022 Tukaani "Utilități XZ"
+.SH NUME
+xzgrep \- caută în fișierele comprimate pentru o expresie regulată
+.SH REZUMAT
+\fBxzgrep\fP [\fIopțiuni_grep\fP] [\fB\-e\fP] \fImodel\fP [\fIfișier...\fP]
+.br
+\fBxzegrep\fP \&...
+.br
+\fBxzfgrep\fP \&...
+.br
+\fBlzgrep\fP \&...
+.br
+\fBlzegrep\fP \&...
+.br
+\fBlzfgrep\fP \&...
+.SH DESCRIERE
+\fBxzgrep\fP invocă \fBgrep\fP(1) pentru \fIfișiere\fP care pot să fie decomprimate
+sau comprimate cu \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1)
+sau \fBzstd\fP(1). Toate opțiunile specificate sunt transmise direct către
+\fBgrep\fP(1).
+.PP
+Dacă nu este specificat \fIfișier\fP, atunci intrarea standard este
+decomprimată dacă este necesar și alimentează \fBgrep\fP(1). La citirea din
+intrarea standard, fișierele comprimate \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1)
+și \fBzstd\fP(1) nu sunt acceptate.
+.PP
+Dacă \fBxzgrep\fP este invocat ca \fBxzegrep\fP sau \fBxzfgrep\fP, atunci este
+folosit \fBgrep \-E\fP sau \fBgrep \-F\fP în loc de \fBgrep\fP(1). Același lucru este
+valabil și pentru comenzile \fBlzgrep\fP, \fBlzegrep\fP și \fBlzfgrep\fP, care sunt
+furnizate pentru compatibilitate cu LZMA Utils.
+.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 definită, \fBxzgrep\fP o folosește în loc
+de \fBgrep\fP(1), \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),
+\fBzgrep\fP(1)
diff --git a/po4a/man/ro/xzless.1 b/po4a/man/ro/xzless.1
new file mode 100644
index 0000000..abb8667
--- /dev/null
+++ b/po4a/man/ro/xzless.1
@@ -0,0 +1,47 @@
+.\"
+.\" Authors: Andrew Dudman
+.\" Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\" (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 27.09.2010 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...]
+.SH DESCRIERE
+\fBxzless\fP este un filtru care afișează textul din fișierele comprimate pe un
+terminal. Funcționează pentru fișiere comprimate cu \fBxz\fP(1) sau
+\fBlzma\fP(1). Dacă nu sunt date \fIfișiere\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.
+.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/po4a/man/ro/xzmore.1 b/po4a/man/ro/xzmore.1
new file mode 100644
index 0000000..ea45c68
--- /dev/null
+++ b/po4a/man/ro/xzmore.1
@@ -0,0 +1,40 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZMORE 1 30.06.2013 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]
+.SH DESCRIERE
+\fBxzmore\fP este un filtru care vă permite să examinați conținutul fișierelor
+text comprimate \fBxz\fP(1) sau \fBlzma\fP(1), câte o pagină pe ecran, pe un
+terminal.
+.PP
+Pentru a utiliza un paginator, altul decât paginatorul implicit \fBmore\fP,
+definiți variabila de mediu \fBPAGER\fP cu numele programului dorit. Comanda
+\fBlzmore\fP este furnizată pentru compatibilitatea cu LZMA Utils.
+.TP
+\fBe\fP sau \fBq\fP
+Când linia \-\-More\-\-(Fișierul următor: \fIfișier\fP) este afișată, această
+comandă face ca \fBxzmore\fP să iasă.
+.TP
+\fBs\fP
+Când linia \-\-More\-\-(Fișierul următor: \fIfișier\fP) este afișată, această
+comandă face ca \fBxzmore\fP să omită următorul fișier și să continue.
+.PP
+Pentru lista comenzilor de la tastatură acceptate în timp ce vizualizați
+conținutul unui fișier, consultați manualul paginatorului pe care îl
+utilizați, de obicei \fBmore\fP(1).
+.SH "CONSULTAȚI ȘI"
+\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1)
diff --git a/po4a/man/uk/lzmainfo.1 b/po4a/man/uk/lzmainfo.1
new file mode 100644
index 0000000..357f114
--- /dev/null
+++ b/po4a/man/uk/lzmainfo.1
@@ -0,0 +1,44 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" 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/po4a/man/uk/xz.1 b/po4a/man/uk/xz.1
new file mode 100644
index 0000000..7e11bf6
--- /dev/null
+++ b/po4a/man/uk/xz.1
@@ -0,0 +1,1868 @@
+'\" t
+.\"
+.\" Authors: Lasse Collin
+.\" Jia Tan
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZ 1 "17 липня 2023 року" 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
+Обмежувач пам'яті можна увімкнути за допомогою параметра командного рядка
+\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).
+.TP
+\fB\-d\fP, \fB\-\-decompress\fP, \fB\-\-uncompress\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.
+.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
+\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.
+.IP ""
+\fBlzip\fP 1.4 і пізніші версії створюють файли у форматі версії 1. Розширення
+синхронізації позначки витирання до формату версії 1 було додано у \fBlzip\fP
+1.6. Це розширення використовують не часто, його підтримки у \fBxz\fP не
+передбачено (програма повідомлятиме про пошкоджені вхідні дані).
+.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
+\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
+.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 ніколи не буде використано
+повністю. Розміри блоків зберігатимуться у заголовках блоків, які майбутня
+версія \fBxz\fP використовуватиме для багатопотокового розпаковування.
+.IP ""
+У однопотоковому режимі поділ на блоки типово не
+виконуватиметься. Встановлення значення для цього параметра не впливатиме на
+використання пам'яті. У заголовках блоків не зберігатимуться дані щодо
+розміру, отже файли, які створено в однопотоковому режимі не будуть
+ідентичними до файлів, які створено у багатопотоковому режимі. Те, що у
+заголовках блоків не зберігатимуться дані щодо розміру також означає, що
+майбутні версії \fBxz\fP не зможуть розпаковувати такі файли у багатопотоковому
+режимі.
+.TP
+\fB\-\-block\-list=\fP\fIрозміри\fP
+При стисканні у форматі \fB.xz\fP починати новий блок після вказаної кількості
+інтервалів нестиснених даних.
+.IP ""
+Значення \fIрозмірів\fP розпакованих блоків слід задавати у форматі списку
+відокремлених комами значень. Якщо розмір пропущено (дві або декілька
+послідовних коми), буде використано розмір попереднього блоку.
+.IP ""
+Якщо файл вхідних даних є більшим за розміром за суму \fIрозмірів\fP, останнє
+значення у \fIрозмірах\fP буде повторено до кінця файла. Особливе значення \fB0\fP
+може бути використано як останнє значення, щоб позначити, що решту файла має
+бути закодовано як єдиний блок.
+.IP ""
+Якщо вказати \fIрозміри\fP, які перевищують розмір блоку кодувальника (або
+типове значення у режимі із потоками обробки, або значення, яке встановлено
+за допомогою \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\-\-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.
+.
+.SS "Нетипові ланцюжки фільтрів засобу стискання"
+Нетиповий ланцюжок фільтрування уможливлює докладне визначення параметрів
+стискання замість використання параметрів, які пов'язано із наперед
+визначеними рівнями стискання. Якщо вказано нетиповий ланцюжок фільтрів,
+параметри рівнів стискання (\fB\-0\fP \&...\& \fB\-9\fP і \fB\-\-extreme\fP), які
+передують їм у рядку команди, буде знехтувано. Якщо параметр рівня стискання
+вказано після одного або декількох параметрів нетипового ланцюжка фільтрів,
+буде використано рівень стискання, а попередніми параметрами ланцюжка
+фільтрування буде знехтувано.
+.PP
+Ланцюжок фільтрів можна порівняти із конвеєром у командному рядку. При
+стисканні нестиснені вхідні дані потрапляють до першого фільтра, виведені
+ним дані йдуть до наступного фільтра (якщо такий є). Виведені останнім
+фільтром дані буде записано до стисненого файла. Максимальна кількість
+фільтрів у ланцюжку дорівнює чотирьом, але у типовому ланцюжку фільтрів
+використовують один або два фільтри.
+.PP
+У багатьох фільтрів є обмеження на місце перебування у ланцюжку фільтрів:
+деякі фільтри можуть працювати, лише якщо вони є останніми у ланцюжку,
+деякі, лише якщо не останніми, а деякі працюють у будь\-якій позиції
+ланцюжка. Залежно від фільтра, це обмеження є наслідком структури фільтра
+або існує для запобігання проблем із захистом.
+.PP
+Нетиповий ланцюжок фільтрів визначають за допомогою одного або декількох
+параметрів фільтрування у бажаному для ланцюжка фільтрування порядку. Тобто
+порядок параметрів фільтрування впливає на результат! При декодуванні
+необробленого потоку даних (\fB\-\-format=raw\fP) ланцюжок фільтрів визначають у
+тому самому порядку, який використовують для стискання даних.
+.PP
+Фільтри приймають специфічні для фільтрів \fIпараметри\fP у форматі списку
+значень, які відокремлено комами. Зайві коми у \fIпараметрах\fP буде
+проігноровано. У кожного параметра є типове значення, отже, вам слід вказати
+лише ті параметри, значення яких ви хочете змінити.
+.PP
+Щоб переглянути увесь ланцюжок фільтрів та \fIпараметри\fP, скористайтеся
+командою \fBxz \-vv\fP (тобто, скористайтеся \fB\-\-verbose\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
+\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]
+.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;
+.TE
+.RE
+.RE
+.IP ""
+Оскільки фільтровані BCJ дані, зазвичай, стискають за допомогою LZMA2,
+коефіцієнт стискання можна трохи поліпшити, якщо параметри LZMA2 буде
+встановлено так, щоб вони відповідали вирівнюванню вибраного фільтра
+BCJ. Наприклад, з фільтром IA\-64 варто встановити \fBpb=4\fP або навіть
+\fBpb=4,lp=4,lc=0\fP з LZMA2 (2^4=16). Фільтр x86 є винятком; його, зазвичай,
+варто поєднувати із типовим чотирибайтовим вирівнюванням LZMA2 при стисканні
+виконуваних файлів x86.
+.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\-\-version\fP, \fB\-\-info\-memory\fP та
+\fB\-\-list\fP. У майбутньому підтримку параметра буде передбачено для стискання
+та розпаковування.
+.
+.SS Версія
+\fBxz \-\-robot \-\-version\fP виведе назву версії \fBxz\fP і liblzma у такому
+форматі:
+.PP
+\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.
+.
+.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 \-\-list\fP використано табуляції для поділу виведених
+даних. Першим стовпчиком у кожному рядку є рядок, що вказує на тип
+відомостей, які можна знайти у цьому рядку:
+.TP
+\fBназва\fP
+Це завжди перший рядок на початку списку файла. Другим стовпчиком у рядку є
+назва файла.
+.TP
+\fBфайл\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
+Список відокремлених комами назв перевірок цілісності. Наведені нижче рядки
+використовують для відомих типів перевірок: \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
+У майбутніх версіях може бути додано нові типи рядків і нові стовпчики до
+наявних типів рядків, але наявні стовпчики мають лишитися незмінними.
+.
+.SH "СТАН ВИХОДУ"
+.TP
+\fB0\fP
+Усе добре.
+.TP
+\fB1\fP
+Сталася помилка.
+.TP
+\fB2\fP
+Сталося щось варте попередження, але справжніх помилок не сталося.
+.PP
+Зауваження (не попередження або помилки), які виведено до стандартного
+виведення помилок, не впливають на стан виходу.
+.
+.SH СЕРЕДОВИЩЕ
+\fBxz\fP обробляє списки відокремлених пробілами параметрів зі змінних
+середовища \fBXZ_DEFAULTS\fP і \fBXZ_OPT\fP, перш ніж обробляти параметри з рядка
+команди. Зауважте, що буде оброблено лише параметри зі змінних середовища;
+усі непараметричні записи буде без повідомлень проігноровано. Обробку буде
+виконано за допомогою функції \fBgetopt_long\fP(3), яку також використовують
+для аргументів рядка команди.
+.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(CWXZ_OPT=\-2v tar caf foo.tar.xz foo\fP
+.fi
+.RE
+.RE
+.IP ""
+Скрипти можуть використовувати \fBXZ_OPT\fP, наприклад, для встановлення
+специфічних типових параметрів стискання. Втім, рекомендуємо дозволити
+користувачам перевизначати \fBXZ_OPT\fP, якщо це має якісь причини. Наприклад,
+у скриптах \fBsh\fP(1) можна скористатися чимось таким:
+.RS
+.RS
+.PP
+.nf
+\f(CWXZ_OPT=${XZ_OPT\-"\-7e"} export XZ_OPT\fP
+.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(CWxz foo\fP
+.fi
+.RE
+.PP
+Розпакувати \fIbar.xz\fP до \fIbar\fP і не вилучати \fIbar.xz\fP, навіть якщо
+розпаковування відбулося успішно:
+.RS
+.PP
+.nf
+\f(CWxz \-dk bar.xz\fP
+.fi
+.RE
+.PP
+Створити \fIbaz.tar.xz\fP з використанням шаблона \fB\-4e\fP (\fB\-4 \-\-extreme\fP),
+який є повільнішими за типовий \fB\-6\fP, але потребує менше пам'яті для
+стискання та розпаковування (48\ МіБ та 5\ МіБ, відповідно):
+.RS
+.PP
+.nf
+\f(CWtar cf \- baz | xz \-4e > baz.tar.xz\fP
+.fi
+.RE
+.PP
+Суміш стиснених і нестиснених файлів можна розпакувати до стандартного
+виведення за допомогою єдиної команди:
+.RS
+.PP
+.nf
+\f(CWxz \-dcf a.txt b.txt.xz c.txt d.txt.lzma > abcd.txt\fP
+.fi
+.RE
+.
+.SS "Паралельне стискання багатьох файлів"
+У GNU і *BSD можна скористатися \fBfind\fP(1) і \fBxargs\fP(1) для паралельного
+стискання багатьох файлів:
+.RS
+.PP
+.nf
+\f(CWfind . \-type f \e! \-name '*.xz' \-print0 \e | xargs \-0r \-P4 \-n16 xz \-T1\fP
+.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(CWxz \-\-robot \-\-list *.xz | awk '/^totals/{print $5\-$4}'\fP
+.fi
+.RE
+.PP
+Скрипту можуть знадобитися дані щодо того, що використано достатньо нову
+версію \fBxz\fP. У наведеному нижче скрипті \fBsh\fP(1) виконано перевірку того,
+що номер версії засобу \fBxz\fP є принаймні рівним 5.0.0. Цей спосіб є сумісним
+зі старими тестовими версіями, де не передбачено підтримки параметра
+\fB\-\-robot\fP:
+.RS
+.PP
+.nf
+\f(CWif ! eval "$(xz \-\-robot \-\-version 2> /dev/null)" || [ "$XZ_VERSION" \-lt 50000002 ]; then echo "Your xz is too old." fi unset XZ_VERSION LIBLZMA_VERSION\fP
+.fi
+.RE
+.PP
+Встановити обмеження на використання пам'яті для розпаковування за допомогою
+\fBXZ_OPT\fP, але якщо обмеження вже було встановлено, не збільшувати його:
+.RS
+.PP
+.nf
+\f(CWNEWLIM=$((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\fP
+.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(CWxz \-\-lzma2=preset=1,dict=32MiB foo.tar\fP
+.fi
+.RE
+.PP
+Для певних файлів наведена вище команда може працювати швидше за \fBxz \-6\fP і
+стискати дані значно краще. Втім, слід наголосити, переваги більшого
+словника з одночасним низьким значенням CompCPU проявляються лише для деяких
+файлів. Найочевиднішим випадком, коли великий словник є корисним, є випадок,
+коли архів містить дуже подібні файли розміром у принаймні декілька
+мегабайтів. Розмір словника має бути значно більшим за будь\-який окремий
+файл, щоб у LZMA2 було використано усі переваги подібностей між послідовними
+файлами.
+.PP
+Якщо дуже високий рівень використання пам'яті у засобі стискання або
+розпаковування не є проблемою, і файли, який стискають має об'єм у принаймні
+декілька десятків мегабайтів, може бути корисним використання навіть
+більшого за 64 МіБ словника, який використано у \fBxz \-9\fP:
+.RS
+.PP
+.nf
+\f(CWxz \-vv \-\-lzma2=dict=192MiB big_foo.tar\fP
+.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(CWxz \-\-check=crc32 \-\-lzma2=preset=6e,dict=64KiB foo\fP
+.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(CWxz \-\-lzma2=preset=6e,pb=0,lc=4 source_code.tar\fP
+.fi
+.RE
+.PP
+Використання іншого фільтра разом із LZMA2 може покращити стискання для
+певних типів файлів. Наприклад, для стискання бібліотеки спільного
+користування x86\-32 або x86\-64 з використанням фільтра BCJ x86 скористайтеся
+такою командою:
+.RS
+.PP
+.nf
+\f(CWxz \-\-x86 \-\-lzma2 libfoo.so\fP
+.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(CWxz \-\-delta=dist=3 \-\-lzma2=pb=0 foo.tiff\fP
+.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: <https://tukaani.org/xz/>
+.br
+Вбудовуваний XZ: <https://tukaani.org/xz/embedded.html>
+.br
+LZMA SDK: <https://7\-zip.org/sdk.html>
diff --git a/po4a/man/uk/xzdec.1 b/po4a/man/uk/xzdec.1
new file mode 100644
index 0000000..03a7e8c
--- /dev/null
+++ b/po4a/man/uk/xzdec.1
@@ -0,0 +1,84 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDEC 1 "19 квітня 2017 року" 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: <https://tukaani.org/xz/embedded.html>
diff --git a/po4a/man/uk/xzdiff.1 b/po4a/man/uk/xzdiff.1
new file mode 100644
index 0000000..1f4f367
--- /dev/null
+++ b/po4a/man/uk/xzdiff.1
@@ -0,0 +1,44 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\" Andrew Dudman
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZDIFF 1 "4 червня 2021 року" Tukaani "XZ Utils"
+.SH НАЗВА
+xzcmp, xzdiff, lzcmp, lzdiff — порівняння стиснених файлів
+.SH "КОРОТКИЙ ОПИС"
+\fBxzcmp\fP [\fIпараметри_cmp\fP] \fIфайл1\fP [\fIфайл2\fP]
+.br
+\fBxzdiff\fP [\fIпараметри_diff\fP] \fIфайл1\fP [\fIфайл2\fP]
+.br
+\fBlzcmp\fP [\fIпараметри_cmp\fP] \fIфайл1\fP [\fIфайл2\fP]
+.br
+\fBlzdiff\fP [\fIпараметри_diff\fP] \fIфайл1\fP [\fIфайл2\fP]
+.SH ОПИС
+\fBxzcmp\fP і \fBxzdiff\fP викликають \fBcmp\fP(1) або \fBdiff\fP(1) для файлів, які
+стиснено за допомогою \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1),
+\fBlzop\fP(1) або \fBzstd\fP(1). Усі вказані параметри передаються безпосередньо
+\fBcmp\fP(1) або \fBdiff\fP(1). Якщо вказано лише один файл, порівнюваними файлами
+будуть \fIфайл1\fP (який повинен мати суфікс підтримуваного файла стискання) і
+\fIфайл1\fP, з назви якого вилучено суфікс формату стискання. Якщо вказано два
+файли, їх буде, якщо потрібно, розпаковано і передано \fBcmp\fP(1) або
+\fBdiff\fP(1). Стан виходу \fBcmp\fP(1) або \fBdiff\fP(1) буде збережено, якщо не
+станеться помилок розпаковування. Якщо станеться помилка розпаковування,
+станом виходу буде 2.
+.PP
+Працездатність назв \fBlzcmp\fP і \fBlzdiff\fP забезпечено для зворотної
+сумісності із LZMA Utils.
+.SH "ДИВ. ТАКОЖ"
+\fBcmp\fP(1), \fBdiff\fP(1), \fBxz\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1),
+\fBzstd\fP(1), \fBzdiff\fP(1)
+.SH ВАДИ
+Повідомлення від програм \fBcmp\fP(1) або \fBdiff\fP(1) посилатимуться на назви
+тимчасових файлів, а не вказані назви.
diff --git a/po4a/man/uk/xzgrep.1 b/po4a/man/uk/xzgrep.1
new file mode 100644
index 0000000..5afc7ab
--- /dev/null
+++ b/po4a/man/uk/xzgrep.1
@@ -0,0 +1,64 @@
+.\"
+.\" Original zgrep.1 for gzip: Jean-loup Gailly
+.\" Charles Levert <charles@comm.polymtl.ca>
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZGREP 1 "19 липня 2022 року" Tukaani "XZ Utils"
+.SH НАЗВА
+xzgrep — пошук у стиснених файлах формального виразу
+.SH "КОРОТКИЙ ОПИС"
+\fBxzgrep\fP [\fIпараметри_grep\fP] [\fB\-e\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, які можуть бути розпакованими
+або запакованими за допомогою \fBxz\fP(1), \fBlzma\fP(1), \fBgzip\fP(1), \fBbzip2\fP(1),
+\fBlzop\fP(1) або \fBzstd\fP(1). Усі вказані параметри передаються безпосередньо
+\fBgrep\fP(1).
+.PP
+Якщо не вказано жодного \fIфайла\fP, буде розпаковано дані зі стандартного
+джерела вхідних даних і передано ці дані \fBgrep\fP(1). Якщо дані буде
+прочитано зі стандартного джерела вхідних даних, підтримку стиснених файлів
+\fBgzip\fP(1), \fBbzip2\fP(1), \fBlzop\fP(1) та \fBzstd\fP(1) буде вимкнено.
+.PP
+Якщо \fBxzgrep\fP викликано як \fBxzegrep\fP або \fBxzfgrep\fP, буде використано
+\fBgrep \-E\fP або \fBgrep \-F\fP замість \fBgrep\fP(1). Те саме стосується програм із
+назвами \fBlzgrep\fP, \fBlzegrep\fP та \fBlzfgrep\fP, які створено для зворотної
+сумісності з LZMA Utils.
+.SH "СТАН ВИХОДУ"
+.TP
+0
+В одному з файлів вхідних даних знайдено принаймні одну
+відповідність. Помилок не сталося.
+.TP
+1
+У жодному з файлів вхідних даних не знайдено відповідника. Не сталося ніяких
+помилок.
+.TP
+>1
+Сталася одна або декілька помилок. Невідомо, чи було знайдено відповідники
+критерію пошуку.
+.SH СЕРЕДОВИЩЕ
+.TP
+\fBGREP\fP
+Якщо встановлено значення змінної середовища \fBGREP\fP, буде використано це
+значення \fBxzgrep\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),
+\fBzgrep\fP(1)
diff --git a/po4a/man/uk/xzless.1 b/po4a/man/uk/xzless.1
new file mode 100644
index 0000000..3054a3e
--- /dev/null
+++ b/po4a/man/uk/xzless.1
@@ -0,0 +1,47 @@
+.\"
+.\" Authors: Andrew Dudman
+.\" Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\" (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 "27 вересня 2010 року" Tukaani "XZ Utils"
+.SH НАЗВА
+xzless, lzless — перегляд стиснених xz або lzma (текстових) файлів
+.SH "КОРОТКИЙ ОПИС"
+\fBxzless\fP [\fIфайл\fP...]
+.br
+\fBlzless\fP [\fIфайл\fP...]
+.SH ОПИС
+\fBxzless\fP є фільтром, який показує текст зі стиснених файлів у
+терміналі. Працює для файлів, які стиснуто за допомогою \fBxz\fP(1) або
+\fBlzma\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/po4a/man/uk/xzmore.1 b/po4a/man/uk/xzmore.1
new file mode 100644
index 0000000..f7abf17
--- /dev/null
+++ b/po4a/man/uk/xzmore.1
@@ -0,0 +1,40 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH XZMORE 1 "30 червня 2013 року" Tukaani "XZ Utils"
+.SH НАЗВА
+xzmore, lzmore — перегляд стиснених xz або lzma (текстових) файлів
+.SH "КОРОТКИЙ ОПИС"
+\fBxzmore\fP [\fIфайл...\fP]
+.br
+\fBlzmore\fP [\fIфайл...\fP]
+.SH ОПИС
+\fBxzmore\fP є фільтром, за допомогою якого можна вивчати стиснені \fBxz\fP(1) або
+\fBlzma\fP(1) текстові файли поекранно на терміналах із м'яким копіюванням.
+.PP
+Щоб скористатися засобом поділу на сторінки, відмінним від типового \fBmore\fP,
+встановіть для змінної середовища \fBPAGER\fP значення назви бажаної
+програми. Команду \fBlzmore\fP реалізовано для забезпечення зворотної
+сумісності з LZMA Utils.
+.TP
+\fBe\fP або \fBq\fP
+Якщо виведено запит \-\-More\-\-(Наступний файл: \fIфайл\fP), ця команда наказує
+\fBxzmore\fP завершити роботу.
+.TP
+\fBs\fP
+Якщо виведено запит \-\-More\-\-(Наступний файл: \fIфайл\fP), ця команда наказує
+\fBxzmore\fP перейти до наступного файла і продовжити показ даних.
+.PP
+Список клавіатурних команд, якими можна скористатися під час перегляду
+вмісту файла, наведено на сторінці засобу поділу файла на сторінки, яким ви
+користуєтеся, зазвичай, на сторінці \fBmore\fP(1).
+.SH "ДИВ. ТАКОЖ"
+\fBmore\fP(1), \fBxz\fP(1), \fBxzless\fP(1), \fBzmore\fP(1)
diff --git a/po4a/po4a.conf b/po4a/po4a.conf
new file mode 100644
index 0000000..5342530
--- /dev/null
+++ b/po4a/po4a.conf
@@ -0,0 +1,14 @@
+# To add a new language, add it to po4a_langs and run "update-po"
+# to get a new .po file. After translating the .po file, run
+# "update-po" again to generate the translated man pages.
+
+[po4a_langs] de fr ko pt_BR ro uk
+[po4a_paths] xz-man.pot $lang:$lang.po
+
+[type: man] ../src/xz/xz.1 $lang:man/$lang/xz.1
+[type: man] ../src/xzdec/xzdec.1 $lang:man/$lang/xzdec.1
+[type: man] ../src/lzmainfo/lzmainfo.1 $lang:man/$lang/lzmainfo.1
+[type: man] ../src/scripts/xzdiff.1 $lang:man/$lang/xzdiff.1
+[type: man] ../src/scripts/xzgrep.1 $lang:man/$lang/xzgrep.1
+[type: man] ../src/scripts/xzless.1 $lang:man/$lang/xzless.1
+[type: man] ../src/scripts/xzmore.1 $lang:man/$lang/xzmore.1
diff --git a/po4a/pt_BR.po b/po4a/pt_BR.po
new file mode 100644
index 0000000..ad943be
--- /dev/null
+++ b/po4a/pt_BR.po
@@ -0,0 +1,5748 @@
+# Brazilian Portuguese translations for xz package
+# Traduções em português brasileiro para o pacote xz.
+# This file is put in the public domain.
+# Rafael Fontenelle <rafaelff@gnome.org>, 2022-2023.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-man 5.4.0-pre2\n"
+"POT-Creation-Date: 2023-11-01 20:27+0800\n"
+"PO-Revision-Date: 2023-01-26 13:29-0300\n"
+"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
+"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
+"net>\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:9
+#, no-wrap
+msgid "XZ"
+msgstr "XZ"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, fuzzy, no-wrap
+#| msgid "2022-07-19"
+msgid "2023-07-17"
+msgstr "2022-07-19"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "Tukaani"
+msgstr "Tukaani"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZ Utils"
+msgstr "XZ Utils"
+
+#. type: SH
+#: ../src/xz/xz.1:11 ../src/xzdec/xzdec.1:8 ../src/lzmainfo/lzmainfo.1:8
+#: ../src/scripts/xzdiff.1:10 ../src/scripts/xzgrep.1:10
+#: ../src/scripts/xzless.1:11 ../src/scripts/xzmore.1:8
+#, no-wrap
+msgid "NAME"
+msgstr "NOME"
+
+#. type: Plain text
+#: ../src/xz/xz.1:13
+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:14 ../src/xzdec/xzdec.1:10 ../src/lzmainfo/lzmainfo.1:10
+#: ../src/scripts/xzdiff.1:12 ../src/scripts/xzgrep.1:12
+#: ../src/scripts/xzless.1:13 ../src/scripts/xzmore.1:10
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr "SINOPSE"
+
+#. type: Plain text
+#: ../src/xz/xz.1:18
+msgid "B<xz> [I<option...>] [I<file...>]"
+msgstr "B<xz> [I<opção...>] [I<arquivo...>]"
+
+#. type: SH
+#: ../src/xz/xz.1:19
+#, no-wrap
+msgid "COMMAND ALIASES"
+msgstr "COMANDOS APELIDOS"
+
+#. type: Plain text
+#: ../src/xz/xz.1:23
+msgid "B<unxz> is equivalent to B<xz --decompress>."
+msgstr "B<unxz> é equivalente a B<xz --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:27
+msgid "B<xzcat> is equivalent to B<xz --decompress --stdout>."
+msgstr "B<xzcat> é equivalente a B<xz --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:31
+msgid "B<lzma> is equivalent to B<xz --format=lzma>."
+msgstr "B<lzma> é equivalente a B<xz --format=lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:35
+msgid "B<unlzma> is equivalent to B<xz --format=lzma --decompress>."
+msgstr "B<unlzma> é equivalente a B<xz --format=lzma --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:39
+msgid "B<lzcat> is equivalent to B<xz --format=lzma --decompress --stdout>."
+msgstr "B<lzcat> é equivalente a B<xz --format=lzma --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:51
+msgid ""
+"When writing scripts that need to decompress files, it is recommended to "
+"always use the name B<xz> with appropriate arguments (B<xz -d> or B<xz -"
+"dc>) instead of the names B<unxz> and B<xzcat>."
+msgstr ""
+"Ao escrever scripts que precisam descompactar arquivos, é recomendável "
+"sempre usar o nome B<xz> com os argumentos apropriados (B<xz -d> ou B<xz -"
+"dc>) em vez dos nomes B<unxz> e B<xzcat>."
+
+#. type: SH
+#: ../src/xz/xz.1:52 ../src/xzdec/xzdec.1:18 ../src/lzmainfo/lzmainfo.1:15
+#: ../src/scripts/xzdiff.1:24 ../src/scripts/xzgrep.1:33
+#: ../src/scripts/xzless.1:19 ../src/scripts/xzmore.1:16
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "DESCRIÇÃO"
+
+#. type: Plain text
+#: ../src/xz/xz.1:71
+msgid ""
+"B<xz> is a general-purpose data compression tool with command line syntax "
+"similar to B<gzip>(1) and B<bzip2>(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<lzip> is supported."
+msgstr ""
+"B<xz> é uma ferramenta de compactação de dados de uso geral com sintaxe de "
+"linha de comando semelhante ao B<gzip>(1) e ao B<bzip2>(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<lzip> é suportada."
+
+#. type: Plain text
+#: ../src/xz/xz.1:93
+msgid ""
+"B<xz> compresses or decompresses each I<file> according to the selected "
+"operation mode. If no I<files> are given or I<file> is B<->, B<xz> reads "
+"from standard input and writes the processed data to standard output. B<xz> "
+"will refuse (display an error and skip the I<file>) to write compressed "
+"data to standard output if it is a terminal. Similarly, B<xz> will refuse "
+"to read compressed data from standard input if it is a terminal."
+msgstr ""
+"B<xz> compacta ou descompacta cada I<arquivo> de acordo com o modo de "
+"operação selecionado. Se nenhum I<arquivo> for fornecido ou I<arquivo> for "
+"B<->, B<xz> lê da entrada padrão e grava os dados processados na saída "
+"padrão. B<xz> recusará (exibirá um erro e ignorará o I<arquivo>) para gravar "
+"dados compactados na saída padrão se for um terminal. Da mesma forma, B<xz> "
+"se recusará a ler dados compactados da entrada padrão se for um terminal."
+
+#. type: Plain text
+#: ../src/xz/xz.1:103
+msgid ""
+"Unless B<--stdout> is specified, I<files> other than B<-> are written to a "
+"new file whose name is derived from the source I<file> name:"
+msgstr ""
+"A menos que B<--stdout> seja especificado, I<arquivos> diferentes de B<-> "
+"são gravados em um novo arquivo cujo nome é derivado do nome I<arquivo> de "
+"origem:"
+
+#. type: IP
+#: ../src/xz/xz.1:103 ../src/xz/xz.1:109 ../src/xz/xz.1:134 ../src/xz/xz.1:139
+#: ../src/xz/xz.1:142 ../src/xz/xz.1:145 ../src/xz/xz.1:161 ../src/xz/xz.1:422
+#: ../src/xz/xz.1:425 ../src/xz/xz.1:432 ../src/xz/xz.1:677 ../src/xz/xz.1:679
+#: ../src/xz/xz.1:778 ../src/xz/xz.1:789 ../src/xz/xz.1:798 ../src/xz/xz.1:806
+#: ../src/xz/xz.1:1034 ../src/xz/xz.1:1043 ../src/xz/xz.1:1055
+#: ../src/xz/xz.1:1729 ../src/xz/xz.1:1735 ../src/xz/xz.1:1853
+#: ../src/xz/xz.1:1857 ../src/xz/xz.1:1860 ../src/xz/xz.1:1863
+#: ../src/xz/xz.1:1867 ../src/xz/xz.1:1874 ../src/xz/xz.1:1876
+#, no-wrap
+msgid "\\(bu"
+msgstr "\\(bu"
+
+#. type: Plain text
+#: ../src/xz/xz.1:109
+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:124
+msgid ""
+"When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from "
+"the filename to get the target filename. B<xz> 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<xz> também reconhece os "
+"sufixos B<.txz> e B<.tlz> e os substitui pelo sufixo B<.tar>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:128
+msgid ""
+"If the target file already exists, an error is displayed and the I<file> is "
+"skipped."
+msgstr ""
+"Se o arquivo de destino já existir, um erro será exibido e I<arquivo> será "
+"ignorado."
+
+#. type: Plain text
+#: ../src/xz/xz.1:134
+msgid ""
+"Unless writing to standard output, B<xz> will display a warning and skip the "
+"I<file> if any of the following applies:"
+msgstr ""
+"A menos que grave na saída padrão, B<xz> exibirá um aviso e pulará o "
+"I<arquivo> se qualquer um dos seguintes se aplicar:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:139
+msgid ""
+"I<File> is not a regular file. Symbolic links are not followed, and thus "
+"they are not considered to be regular files."
+msgstr ""
+"I<Arquivo> 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:142
+msgid "I<File> has more than one hard link."
+msgstr "I<Arquivo> tem mais de um link físico."
+
+#. type: Plain text
+#: ../src/xz/xz.1:145
+msgid "I<File> has setuid, setgid, or sticky bit set."
+msgstr "I<File> tem setuid, setgid ou sticky bit definido."
+
+#. type: Plain text
+#: ../src/xz/xz.1:161
+msgid ""
+"The operation mode is set to compress and the I<file> 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<arquivo> 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:171
+msgid ""
+"The operation mode is set to decompress and the I<file> 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<arquivo> 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:186
+msgid ""
+"After successfully compressing or decompressing the I<file>, B<xz> copies "
+"the owner, group, permissions, access time, and modification time from the "
+"source I<file> 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<file>. B<xz> "
+"doesn't support copying other metadata like access control lists or extended "
+"attributes yet."
+msgstr ""
+"Depois de compactar ou descompactar com êxito o I<arquivo>, o B<xz> copia o "
+"dono, grupo, permissões, horário de acesso e horário de modificação do "
+"I<arquivo> 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<arquivo> de "
+"origem. B<xz> 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:196
+msgid ""
+"Once the target file has been successfully closed, the source I<file> is "
+"removed unless B<--keep> was specified. The source I<file> 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<arquivo> de "
+"origem será removido, a menos que B<--keep> tenha sido especificado. O "
+"I<arquivo> 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:208
+msgid ""
+"Sending B<SIGINFO> or B<SIGUSR1> to the B<xz> 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<SIGINFO> ou B<SIGUSR1> para o processo do B<xz> 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:209
+#, no-wrap
+msgid "Memory usage"
+msgstr "Uso de memória"
+
+#. type: Plain text
+#: ../src/xz/xz.1:225
+msgid ""
+"The memory usage of B<xz> 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<xz -9> 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<xz> 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<xz -9> 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:237
+msgid ""
+"Especially users of older systems may find the possibility of very large "
+"memory usage annoying. To prevent uncomfortable surprises, B<xz> 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<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(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<xz> 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<ulimit>(1) para "
+"limitar a memória virtual tende a prejudicar B<mmap>(2))."
+
+#. type: Plain text
+#: ../src/xz/xz.1:259
+msgid ""
+"The memory usage limiter can be enabled with the command line option B<--"
+"memlimit=>I<limit>. Often it is more convenient to enable the limiter by "
+"default by setting the environment variable B<XZ_DEFAULTS>, for example, "
+"B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+"separately for compression and decompression by using B<--memlimit-"
+"compress=>I<limit> and B<--memlimit-decompress=>I<limit>. Using these two "
+"options outside B<XZ_DEFAULTS> is rarely useful because a single run of "
+"B<xz> cannot do both compression and decompression and B<--"
+"memlimit=>I<limit> (or B<-M> I<limit>) 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<limite>. Geralmente é mais conveniente habilitar o "
+"limitador por padrão definindo a variável de ambiente B<XZ_DEFAULTS>, por "
+"exemplo, B<XZ_DEFAULTS=--memlimit=150MiB>. É possível definir os limites "
+"separadamente para compactação e descompactação usando B<--memlimit-"
+"compress=>I<limite> e B<--memlimit-decompress=>I<limite>. Usar essas duas "
+"opções fora de B<XZ_DEFAULTS> raramente é útil porque uma única execução de "
+"B<xz> não pode fazer compactação e descompactação e B<--memlimit=>I<limite> "
+"(ou B<-M> I<limite> ) é mais curto para digitar na linha de comando."
+
+#. type: Plain text
+#: ../src/xz/xz.1:278
+msgid ""
+"If the specified memory usage limit is exceeded when decompressing, B<xz> "
+"will display an error and decompressing the file will fail. If the limit is "
+"exceeded when compressing, B<xz> 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<xz -9>, the settings will be scaled down only "
+"a little, not all the way down to B<xz -8>."
+msgstr ""
+"Se o limite de uso de memória especificado for excedido durante a "
+"descompactação, B<xz> exibirá um erro e a descompactação do arquivo falhará. "
+"Se o limite for excedido durante a compactação, B<xz> 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<xz -9>, as configurações serão reduzidas apenas um pouco , não até B<xz "
+"-8>."
+
+#. type: SS
+#: ../src/xz/xz.1:279
+#, no-wrap
+msgid "Concatenation and padding with .xz files"
+msgstr "Concatenação e preenchimento com arquivos .xz"
+
+#. type: Plain text
+#: ../src/xz/xz.1:287
+msgid ""
+"It is possible to concatenate B<.xz> files as is. B<xz> will decompress "
+"such files as if they were a single B<.xz> file."
+msgstr ""
+"É possível concatenar arquivos B<.xz> como estão. B<xz> irá descompactar "
+"tais arquivos como se fossem um único arquivo B<.xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:296
+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:300
+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:301 ../src/xzdec/xzdec.1:61
+#, no-wrap
+msgid "OPTIONS"
+msgstr "OPÇÕES"
+
+#. type: SS
+#: ../src/xz/xz.1:303
+#, no-wrap
+msgid "Integer suffixes and special values"
+msgstr "Sufixos inteiros e valores especiais"
+
+#. type: Plain text
+#: ../src/xz/xz.1:307
+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:307
+#, no-wrap
+msgid "B<KiB>"
+msgstr "B<KiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:318
+msgid ""
+"Multiply the integer by 1,024 (2^10). B<Ki>, B<k>, B<kB>, B<K>, and B<KB> "
+"are accepted as synonyms for B<KiB>."
+msgstr ""
+"Multiplica o inteiro por 1.024 (2^10). B<Ki>, B<k>, B<kB>, B<K> e B<KB> são "
+"aceitos como sinônimos de B<KiB>."
+
+#. type: TP
+#: ../src/xz/xz.1:318
+#, no-wrap
+msgid "B<MiB>"
+msgstr "B<MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:328
+msgid ""
+"Multiply the integer by 1,048,576 (2^20). B<Mi>, B<m>, B<M>, and B<MB> are "
+"accepted as synonyms for B<MiB>."
+msgstr ""
+"Multiplica o número inteiro por 1.048.576 (2^20). B<Mi>, B<m>, B<M> e B<MB> "
+"são aceitos como sinônimos de B<MiB>."
+
+#. type: TP
+#: ../src/xz/xz.1:328
+#, no-wrap
+msgid "B<GiB>"
+msgstr "B<GiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:338
+msgid ""
+"Multiply the integer by 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, and B<GB> "
+"are accepted as synonyms for B<GiB>."
+msgstr ""
+"Multiplica o número inteiro por 1.073.741.824 (2^30). B<Gi>, B<g>, B<G> e "
+"B<GB> são aceitos como sinônimos de B<GiB>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:343
+msgid ""
+"The special value B<max> can be used to indicate the maximum integer value "
+"supported by the option."
+msgstr ""
+"O valor especial B<max> pode ser usado para indicar o valor inteiro máximo "
+"suportado pela opção."
+
+#. type: SS
+#: ../src/xz/xz.1:344
+#, no-wrap
+msgid "Operation mode"
+msgstr "Modo de operação"
+
+#. type: Plain text
+#: ../src/xz/xz.1:347
+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:347
+#, no-wrap
+msgid "B<-z>, B<--compress>"
+msgstr "B<-z>, B<--compress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:356
+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<unxz> 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<unxz> implica em B<--decompress>)."
+
+#. type: TP
+#: ../src/xz/xz.1:356 ../src/xzdec/xzdec.1:62
+#, no-wrap
+msgid "B<-d>, B<--decompress>, B<--uncompress>"
+msgstr "B<-d>, B<--decompress>, B<--uncompress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:359
+msgid "Decompress."
+msgstr "Descompacta."
+
+#. type: TP
+#: ../src/xz/xz.1:359
+#, no-wrap
+msgid "B<-t>, B<--test>"
+msgstr "B<-t>, B<--test>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:368
+msgid ""
+"Test the integrity of compressed I<files>. 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<arquivos> 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:368
+#, no-wrap
+msgid "B<-l>, B<--list>"
+msgstr "B<-l>, B<--list>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:377
+msgid ""
+"Print information about compressed I<files>. 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<arquivos> 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:392
+msgid ""
+"The default listing shows basic information about I<files>, 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<less\\ -S> may be convenient if the terminal isn't wide enough."
+msgstr ""
+"A listagem padrão mostra informações básicas sobre I<arquivos>, 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<less\\ -S> pode "
+"ser conveniente se o terminal não tiver largura o suficiente."
+
+#. type: Plain text
+#: ../src/xz/xz.1:399
+msgid ""
+"The exact output may vary between B<xz> 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<xz> e localidades diferentes. Para "
+"saída legível por máquina, B<--robot --list> deve ser usado."
+
+#. type: SS
+#: ../src/xz/xz.1:400
+#, no-wrap
+msgid "Operation modifiers"
+msgstr "Modificadores de operação"
+
+#. type: TP
+#: ../src/xz/xz.1:401 ../src/xzdec/xzdec.1:69
+#, no-wrap
+msgid "B<-k>, B<--keep>"
+msgstr "B<-k>, B<--keep>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:404
+msgid "Don't delete the input files."
+msgstr "Não exclui os arquivos de entrada."
+
+#. type: Plain text
+#: ../src/xz/xz.1:418
+msgid ""
+"Since B<xz> 5.2.6, this option also makes B<xz> 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<xz> 5.2.6, esta opção também faz B<xz> 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:418
+#, no-wrap
+msgid "B<-f>, B<--force>"
+msgstr "B<-f>, B<--force>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:421
+msgid "This option has several effects:"
+msgstr "Esta opção tem vários efeitos:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:425
+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:432
+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:457
+msgid ""
+"When used with B<--decompress> B<--stdout> and B<xz> cannot recognize the "
+"type of the source file, copy the source file as is to standard output. "
+"This allows B<xzcat> B<--force> to be used like B<cat>(1) for files that "
+"have not been compressed with B<xz>. Note that in future, B<xz> might "
+"support new compressed file formats, which may make B<xz> decompress more "
+"types of files instead of copying them as is to standard output. B<--"
+"format=>I<format> can be used to restrict B<xz> to decompress only a single "
+"file format."
+msgstr ""
+"Quando usado com B<--decompress> B<--stdout> e B<xz> 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<xzcat> B<--force> seja usado como B<cat>(1) para "
+"arquivos que não foram compactados com B<xz>. Observe que, no futuro, o "
+"B<xz> pode oferecer suporte a novos formatos de arquivo compactado, o que "
+"pode fazer com que o B<xz> descompacte mais tipos de arquivos em vez de "
+"copiá-los como na saída padrão. B<--format=>I<formato> pode ser usado para "
+"restringir B<xz> para descompactar apenas um único formato de arquivo."
+
+#. type: TP
+#: ../src/xz/xz.1:458 ../src/xzdec/xzdec.1:76
+#, 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:464
+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:464
+#, no-wrap
+msgid "B<--single-stream>"
+msgstr "B<--single-stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:473
+msgid ""
+"Decompress only the first B<.xz> stream, and silently ignore possible "
+"remaining input data following the stream. Normally such trailing garbage "
+"makes B<xz> 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<xz> exiba um erro."
+
+#. type: Plain text
+#: ../src/xz/xz.1:482
+msgid ""
+"B<xz> never decompresses more than one stream from B<.lzma> files or raw "
+"streams, but this option still makes B<xz> ignore the possible trailing data "
+"after the B<.lzma> file or raw stream."
+msgstr ""
+"B<xz> nunca descompacta mais de um fluxo de arquivos B<.lzma> ou fluxos "
+"brutos, mas esta opção ainda faz B<xz> ignorar os possíveis dados "
+"posteriores após o arquivo B<.lzma> ou fluxo bruto."
+
+#. type: Plain text
+#: ../src/xz/xz.1:487
+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: TP
+#: ../src/xz/xz.1:487
+#, no-wrap
+msgid "B<--no-sparse>"
+msgstr "B<--no-sparse>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:499
+msgid ""
+"Disable creation of sparse files. By default, if decompressing into a "
+"regular file, B<xz> 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<xz> 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:499
+#, 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:511
+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:525
+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:531
+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:531
+#, no-wrap
+msgid "B<--files>[B<=>I<file>]"
+msgstr "B<--files>[B<=>I<arquivo>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:545
+msgid ""
+"Read the filenames to process from I<file>; if I<file> 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<file>."
+msgstr ""
+"Lê os nomes dos arquivos a serem processados em I<arquivo>; se I<arquivo> "
+"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<arquivo>."
+
+#. type: TP
+#: ../src/xz/xz.1:545
+#, no-wrap
+msgid "B<--files0>[B<=>I<file>]"
+msgstr "B<--files0>[B<=>I<arquivo>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:549
+msgid ""
+"This is identical to B<--files>[B<=>I<file>] except that each filename must "
+"be terminated with the null character."
+msgstr ""
+"Isso é idêntico a B<--files>[B<=>I<arquivo>], exceto que cada nome de "
+"arquivo deve ser finalizado com o caractere nulo."
+
+#. type: SS
+#: ../src/xz/xz.1:550
+#, 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:551
+#, no-wrap
+msgid "B<-F> I<format>, B<--format=>I<format>"
+msgstr "B<-F> I<formato>, B<--format=>I<formato>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:556
+msgid "Specify the file I<format> to compress or decompress:"
+msgstr "Especifica o I<formato> de arquivo para compactar ou descompactar:"
+
+#. type: TP
+#: ../src/xz/xz.1:557
+#, no-wrap
+msgid "B<auto>"
+msgstr "B<auto>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:569
+msgid ""
+"This is the default. When compressing, B<auto> is equivalent to B<xz>. "
+"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<auto> é equivalente a B<xz>. 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:569
+#, no-wrap
+msgid "B<xz>"
+msgstr "B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:576
+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:576
+#, no-wrap
+msgid "B<lzma>, B<alone>"
+msgstr "B<lzma>, B<alone>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:586
+msgid ""
+"Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files "
+"when decompressing. The alternative name B<alone> 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<alone> é fornecido para "
+"compatibilidade com versões anteriores do LZMA Utils."
+
+#. type: TP
+#: ../src/xz/xz.1:586
+#, no-wrap
+msgid "B<lzip>"
+msgstr "B<lzip>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:592
+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:605
+msgid ""
+"The B<.lz> format version 0 and the unextended version 1 are supported. "
+"Version 0 files were produced by B<lzip> 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<lzip> 1.18."
+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<lzip> 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<lzip> 1.18."
+
+#. type: Plain text
+#: ../src/xz/xz.1:614
+msgid ""
+"B<lzip> 1.4 and later create files in the format version 1. The sync flush "
+"marker extension to the format version 1 was added in B<lzip> 1.6. This "
+"extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt "
+"input)."
+msgstr ""
+"B<lzip> 1.4 e posteriores criam arquivos no formato versão 1. A extensão do "
+"marcador de descarga de sincronização para o formato versão 1 foi adicionada "
+"em B<lzip> 1.6. Esta extensão raramente é usada e não é suportada por B<xz> "
+"(diagnosticada como entrada corrompida)."
+
+#. type: TP
+#: ../src/xz/xz.1:614
+#, no-wrap
+msgid "B<raw>"
+msgstr "B<raw>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:622
+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:623
+#, no-wrap
+msgid "B<-C> I<check>, B<--check=>I<check>"
+msgstr "B<-C> I<verificação>, B<--check=>I<verificação>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:638
+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:642
+msgid "Supported I<check> types:"
+msgstr "Tipos de I<verificação> suportados:"
+
+#. type: TP
+#: ../src/xz/xz.1:643
+#, no-wrap
+msgid "B<none>"
+msgstr "B<none>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:649
+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:649
+#, no-wrap
+msgid "B<crc32>"
+msgstr "B<crc32>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:652
+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:652
+#, no-wrap
+msgid "B<crc64>"
+msgstr "B<crc64>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:657
+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:657
+#, no-wrap
+msgid "B<sha256>"
+msgstr "B<sha256>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:661
+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:667
+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:667
+#, 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:673
+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:676
+msgid ""
+"B<Do not use this option unless you know what you are doing.> Possible "
+"reasons to use this option:"
+msgstr ""
+"B<Não use esta opção a menos que saiba o que está fazendo.> Possíveis razões "
+"para usar esta opção:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:679
+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:685
+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:686
+#, no-wrap
+msgid "B<-0> ... B<-9>"
+msgstr "B<-0> ... B<-9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:695
+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:710
+msgid ""
+"The differences between the presets are more significant than with "
+"B<gzip>(1) and B<bzip2>(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<it's not a good idea to blindly use -9 for "
+"everything> like it often is with B<gzip>(1) and B<bzip2>(1)."
+msgstr ""
+"As diferenças entre as predefinições são mais significativas do que com "
+"B<gzip>(1) e B<bzip2>(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<não é uma boa ideia "
+"usar cegamente -9 para tudo> como costuma acontecer com B<gzip>(1) e "
+"B<bzip2>(1)."
+
+#. type: TP
+#: ../src/xz/xz.1:711
+#, no-wrap
+msgid "B<-0> ... B<-3>"
+msgstr "B<-0> ... B<-3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:723
+msgid ""
+"These are somewhat fast presets. B<-0> is sometimes faster than B<gzip -9> "
+"while compressing much better. The higher ones often have speed comparable "
+"to B<bzip2>(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<gzip -9> ao mesmo tempo que compacta muito melhor. As mais altas "
+"geralmente têm velocidade comparável ao B<bzip2>(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:723
+#, no-wrap
+msgid "B<-4> ... B<-6>"
+msgstr "B<-4> ... B<-6>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:737
+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:737
+#, no-wrap
+msgid "B<-7 ... -9>"
+msgstr "B<-7 ... -9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:744
+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:752
+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:754
+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:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "Preset"
+msgstr "Predefinição"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DictSize"
+msgstr "DicTam"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "CompCPU"
+msgstr "CompCPU"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "CompMem"
+msgstr "CompMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DecMem"
+msgstr "DecMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#: ../src/xz/xz.1:2840
+#, no-wrap
+msgid "-0"
+msgstr "-0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:843 ../src/xz/xz.1:2450
+#, no-wrap
+msgid "256 KiB"
+msgstr "256 KiB"
+
+#. type: TP
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2840 ../src/scripts/xzgrep.1:82
+#, no-wrap
+msgid "0"
+msgstr "0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:764 ../src/xz/xz.1:845 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "3 MiB"
+msgstr "3 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:763 ../src/xz/xz.1:843 ../src/xz/xz.1:844
+#: ../src/xz/xz.1:2451 ../src/xz/xz.1:2452 ../src/xz/xz.1:2454
+#, no-wrap
+msgid "1 MiB"
+msgstr "1 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:2451 ../src/xz/xz.1:2476
+#: ../src/xz/xz.1:2841
+#, no-wrap
+msgid "-1"
+msgstr "-1"
+
+#. type: TP
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:1758 ../src/xz/xz.1:2841
+#: ../src/scripts/xzgrep.1:86
+#, no-wrap
+msgid "1"
+msgstr "1"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "9 MiB"
+msgstr "9 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:764 ../src/xz/xz.1:844 ../src/xz/xz.1:845
+#: ../src/xz/xz.1:2452 ../src/xz/xz.1:2455 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "2 MiB"
+msgstr "2 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:2452 ../src/xz/xz.1:2477
+#: ../src/xz/xz.1:2842
+#, no-wrap
+msgid "-2"
+msgstr "-2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:1760 ../src/xz/xz.1:2842
+#, no-wrap
+msgid "2"
+msgstr "2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2477
+#, no-wrap
+msgid "17 MiB"
+msgstr "17 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2453 ../src/xz/xz.1:2478
+#: ../src/xz/xz.1:2843
+#, no-wrap
+msgid "-3"
+msgstr "-3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:843 ../src/xz/xz.1:846
+#: ../src/xz/xz.1:847 ../src/xz/xz.1:2453 ../src/xz/xz.1:2454
+#: ../src/xz/xz.1:2456
+#, no-wrap
+msgid "4 MiB"
+msgstr "4 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2843
+#, no-wrap
+msgid "3"
+msgstr "3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2458
+#: ../src/xz/xz.1:2459 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "32 MiB"
+msgstr "32 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847
+#, no-wrap
+msgid "5 MiB"
+msgstr "5 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:2454 ../src/xz/xz.1:2479
+#: ../src/xz/xz.1:2844
+#, no-wrap
+msgid "-4"
+msgstr "-4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:1759 ../src/xz/xz.1:1761
+#: ../src/xz/xz.1:1762 ../src/xz/xz.1:1764 ../src/xz/xz.1:2844
+#, no-wrap
+msgid "4"
+msgstr "4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "48 MiB"
+msgstr "48 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2455 ../src/xz/xz.1:2480
+#: ../src/xz/xz.1:2845
+#, no-wrap
+msgid "-5"
+msgstr "-5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2455 ../src/xz/xz.1:2456 ../src/xz/xz.1:2457
+#, no-wrap
+msgid "8 MiB"
+msgstr "8 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2845
+#, no-wrap
+msgid "5"
+msgstr "5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2480 ../src/xz/xz.1:2481
+#, no-wrap
+msgid "94 MiB"
+msgstr "94 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:2456 ../src/xz/xz.1:2481
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "-6"
+msgstr "-6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:769 ../src/xz/xz.1:770 ../src/xz/xz.1:771
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "6"
+msgstr "6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:2457 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "-7"
+msgstr "-7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2457
+#: ../src/xz/xz.1:2458 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "16 MiB"
+msgstr "16 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "186 MiB"
+msgstr "186 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:2458 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "-8"
+msgstr "-8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "370 MiB"
+msgstr "370 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851
+#, no-wrap
+msgid "33 MiB"
+msgstr "33 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:2459 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "-9"
+msgstr "-9"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2459
+#, no-wrap
+msgid "64 MiB"
+msgstr "64 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "674 MiB"
+msgstr "674 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852
+#, no-wrap
+msgid "65 MiB"
+msgstr "65 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:777
+msgid "Column descriptions:"
+msgstr "Descrições das colunas:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:789
+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:798
+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:806
+msgid ""
+"CompMem contains the compressor memory requirements in the single-threaded "
+"mode. It may vary slightly between B<xz> versions. Memory requirements of "
+"some of the future multithreaded modes may be dramatically higher than that "
+"of the single-threaded mode."
+msgstr ""
+"CompMem contém os requisitos de memória do compactador no modo de thread "
+"única.Pode variar ligeiramente entre as versões B<xz>. Os requisitos de "
+"memória de alguns dos futuros modos de várias threads (multithread) podem "
+"ser dramaticamente maiores do que os do modo de thread única."
+
+#. type: Plain text
+#: ../src/xz/xz.1:813
+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: TP
+#: ../src/xz/xz.1:814
+#, no-wrap
+msgid "B<-e>, B<--extreme>"
+msgstr "B<-e>, B<--extreme>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:823
+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:835
+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:843
+#, no-wrap
+msgid "-0e"
+msgstr "-0e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:843 ../src/xz/xz.1:844 ../src/xz/xz.1:845 ../src/xz/xz.1:847
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:850 ../src/xz/xz.1:851 ../src/xz/xz.1:852
+#: ../src/xz/xz.1:2848
+#, no-wrap
+msgid "8"
+msgstr "8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "-1e"
+msgstr "-1e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "13 MiB"
+msgstr "13 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "-2e"
+msgstr "-2e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "25 MiB"
+msgstr "25 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846
+#, no-wrap
+msgid "-3e"
+msgstr "-3e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846 ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "7"
+msgstr "7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:847
+#, no-wrap
+msgid "-4e"
+msgstr "-4e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "-5e"
+msgstr "-5e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2848
+#, no-wrap
+msgid "-6e"
+msgstr "-6e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:850
+#, no-wrap
+msgid "-7e"
+msgstr "-7e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:851
+#, no-wrap
+msgid "-8e"
+msgstr "-8e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:852
+#, no-wrap
+msgid "-9e"
+msgstr "-9e"
+
+#. type: Plain text
+#: ../src/xz/xz.1:864
+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:864
+#, no-wrap
+msgid "B<--fast>"
+msgstr "B<--fast>"
+
+#. type: TP
+#: ../src/xz/xz.1:867
+#, no-wrap
+msgid "B<--best>"
+msgstr "B<--best>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:878
+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:878
+#, no-wrap
+msgid "B<--block-size=>I<size>"
+msgstr "B<--block-size=>I<tamanho>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:891
+msgid ""
+"When compressing to the B<.xz> format, split the input data into blocks of "
+"I<size> 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<tamanho> 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:909
+msgid ""
+"In multi-threaded mode about three times I<size> bytes will be allocated in "
+"each thread for buffering input and output. The default I<size> 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<size> less than the LZMA2 dictionary size is waste of RAM "
+"because then the LZMA2 dictionary buffer will never get fully used. The "
+"sizes of the blocks are stored in the block headers, which a future version "
+"of B<xz> will use for multi-threaded decompression."
+msgstr ""
+"No modo multi-thread, cerca de três vezes I<tamanho> bytes serão alocados em "
+"cada thread para armazenar em buffer a entrada e a saída. O I<tamanho> "
+"padrão é três vezes o tamanho do dicionário LZMA2 ou 1 MiB, o que for maior. "
+"Normalmente, um bom valor é 2\\(en4 vezes o tamanho do dicionário LZMA2 ou "
+"pelo menos 1 MiB. Usar I<tamanho> menor que o tamanho do dicionário LZMA2 é "
+"um desperdício de RAM porque o buffer do dicionário LZMA2 nunca será "
+"totalmente usado. Os tamanhos dos blocos são armazenados nos cabeçalhos dos "
+"blocos, que uma versão futura do B<xz> usará para descompactação em multi-"
+"thread."
+
+#. type: Plain text
+#: ../src/xz/xz.1:918
+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 a future version of B<xz> won't be able decompress the files in "
+"multi-threaded mode."
+msgstr ""
+"No modo de thread única, nenhuma divisão de bloco é feita por padrão. "
+"Definir essa opção não afeta o uso da memória. Nenhuma informação de tamanho "
+"é armazenada nos cabeçalhos dos blocos, portanto, os arquivos criados no "
+"modo de thread única não serão idênticos aos arquivos criados no modo multi-"
+"thread. A falta de informações de tamanho também significa que uma versão "
+"futura do B<xz> não poderá descompactar os arquivos no modo multi-thread."
+
+#. type: TP
+#: ../src/xz/xz.1:918
+#, no-wrap
+msgid "B<--block-list=>I<sizes>"
+msgstr "B<--block-list=>I<tamanhos>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:924
+msgid ""
+"When compressing to the B<.xz> format, start a new block after the given "
+"intervals of uncompressed data."
+msgstr ""
+"Ao compactar para o formato B<.xz>, inicia um novo bloco após os intervalos "
+"fornecidos de dados não compactados."
+
+#. type: Plain text
+#: ../src/xz/xz.1:930
+msgid ""
+"The uncompressed I<sizes> of the blocks are specified as a comma-separated "
+"list. Omitting a size (two or more consecutive commas) is a shorthand to "
+"use the size of the previous block."
+msgstr ""
+"Os I<tamanhos> não compactados dos blocos são especificados como uma lista "
+"separada por vírgulas. Omitir um tamanho (duas ou mais vírgulas "
+"consecutivas) é uma forma abreviada de usar o tamanho do bloco anterior."
+
+#. type: Plain text
+#: ../src/xz/xz.1:940
+msgid ""
+"If the input file is bigger than the sum of I<sizes>, the last value in "
+"I<sizes> is repeated until the end of the file. A special value of B<0> may "
+"be used as the last value to indicate that the rest of the file should be "
+"encoded as a single block."
+msgstr ""
+"Se o arquivo de entrada for maior que a soma de I<tamanhos>, o último valor "
+"em I<tamanhos> é repetido até o final do arquivo. Um valor especial de B<0> "
+"pode ser usado como o último valor para indicar que o restante do arquivo "
+"deve ser codificado como um único bloco."
+
+#. type: Plain text
+#: ../src/xz/xz.1:955
+msgid ""
+"If one specifies I<sizes> that exceed the encoder's block size (either the "
+"default value in threaded mode or the value specified with B<--block-"
+"size=>I<size>), the encoder will create additional blocks while keeping the "
+"boundaries specified in I<sizes>. 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 ""
+"Se alguém especificar I<tamanhos> que excedam o tamanho do bloco do "
+"codificador (seja o valor padrão no modo em threads ou o valor especificado "
+"com B<--block-size=>I<tamanho>), o codificador criará blocos adicionais "
+"enquanto mantém o limites especificados em I<tamanhos>. Por exemplo, se "
+"alguém especificar B<--block-size=10MiB> B<--block-"
+"list=5MiB,10MiB,8MiB,12MiB,24MiB> e o arquivo de entrada for 80 MiB, obterá "
+"11 blocos: 5, 10, 8, 10, 2, 10, 10, 4, 10, 10 e 1 MiB."
+
+#. type: Plain text
+#: ../src/xz/xz.1:961
+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:961
+#, no-wrap
+msgid "B<--flush-timeout=>I<timeout>"
+msgstr "B<--flush-timeout=>I<tempo_limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:978
+msgid ""
+"When compressing, if more than I<timeout> 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<xz> is used to compress data that is "
+"streamed over a network. Small I<timeout> values make the data available at "
+"the receiving end with a small delay, but large I<timeout> values give "
+"better compression ratio."
+msgstr ""
+"Ao compactar, se mais de I<tempo_limite> 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<xz> for usado para compactar dados transmitidos por uma rede. Valores "
+"I<tempo_limite> pequenos tornam os dados disponíveis na extremidade "
+"receptora com um pequeno atraso, mas valores I<tempo_limite> grandes "
+"oferecem melhor taxa de compactação."
+
+#. type: Plain text
+#: ../src/xz/xz.1:986
+msgid ""
+"This feature is disabled by default. If this option is specified more than "
+"once, the last one takes effect. The special I<timeout> 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<tempo_limite> de "
+"B<0> pode ser usado para desabilitar explicitamente esse recurso."
+
+#. type: Plain text
+#: ../src/xz/xz.1:988
+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:996
+msgid ""
+"B<This feature is still experimental.> Currently B<xz> is unsuitable for "
+"decompressing the stream in real time due to how B<xz> does buffering."
+msgstr ""
+"B<Este recurso ainda é experimental.> Atualmente, B<xz> não é adequado para "
+"descompactar o fluxo em tempo real devido à forma como B<xz> faz o buffer."
+
+#. type: TP
+#: ../src/xz/xz.1:996
+#, no-wrap
+msgid "B<--memlimit-compress=>I<limit>"
+msgstr "B<--memlimit-compress=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1001
+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:1014
+msgid ""
+"If the compression settings exceed the I<limit>, B<xz> 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<limit>, and finally reducing the LZMA2 dictionary size."
+msgstr ""
+"Se as configurações de compactação excederem o I<limite>, B<xz> 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<limite> e, finalmente, reduzindo o tamanho do dicionário LZMA2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1022
+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:1029
+msgid ""
+"If the I<limit> cannot be met even with the adjustments described above, an "
+"error is displayed and B<xz> will exit with exit status 1."
+msgstr ""
+"Se o I<limite> não puder ser alcançado mesmo com os ajustes descritos acima, "
+"um erro será exibido e B<xz> sairá com status de saída 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1033
+msgid "The I<limit> can be specified in multiple ways:"
+msgstr "O I<limite> pode ser especificado de várias maneiras:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1043
+msgid ""
+"The I<limit> can be an absolute value in bytes. Using an integer suffix "
+"like B<MiB> can be useful. Example: B<--memlimit-compress=80MiB>"
+msgstr ""
+"O I<limite> pode ser um valor absoluto em bytes. Usar um sufixo inteiro como "
+"B<MiB> pode ser útil. Exemplo: B<--memlimit-compress=80MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1055
+msgid ""
+"The I<limit> can be specified as a percentage of total physical memory "
+"(RAM). This can be useful especially when setting the B<XZ_DEFAULTS> "
+"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<limite> 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<XZ_DEFAULTS> 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:1065
+msgid ""
+"The I<limit> can be reset back to its default value by setting it to B<0>. "
+"This is currently equivalent to setting the I<limit> to B<max> (no memory "
+"usage limit)."
+msgstr ""
+"O I<limite> pode ser redefinido para seu valor padrão, definindo-o como "
+"B<0>. Atualmente, isso equivale a definir I<limite> como B<max> (sem limite "
+"de uso de memória)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1089
+msgid ""
+"For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+"B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. On MIPS32 B<2000\\ "
+"MiB> is used instead. (The values B<0> and B<max> 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<xz> de 32 bits, há um caso especial: se o I<limite> estiver acima de "
+"B<4020\\ MiB>, o I<limite> é definido como B<4020\\ MiB>. No MIPS32 B<2000\\ "
+"MiB> é usado em seu lugar. (Os valores B<0> e B<max> 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:1092
+msgid "See also the section B<Memory usage>."
+msgstr "Consulte também a seção B<Uso de memória>."
+
+#. type: TP
+#: ../src/xz/xz.1:1092
+#, no-wrap
+msgid "B<--memlimit-decompress=>I<limit>"
+msgstr "B<--memlimit-decompress=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1106
+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<limit>, "
+"B<xz> will display an error and decompressing the file will fail. See B<--"
+"memlimit-compress=>I<limit> for possible ways to specify the I<limit>."
+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<limite>, "
+"B<xz> exibirá um erro e a descompactação do arquivo falhará. Consulte B<--"
+"memlimit-compress=>I<limite> para possíveis maneiras de especificar o "
+"I<limite>."
+
+#. type: TP
+#: ../src/xz/xz.1:1106
+#, no-wrap
+msgid "B<--memlimit-mt-decompress=>I<limit>"
+msgstr "B<--memlimit-mt-decompress=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1128
+msgid ""
+"Set a memory usage limit for multi-threaded decompression. This can only "
+"affect the number of threads; this will never make B<xz> refuse to "
+"decompress a file. If I<limit> is too low to allow any multi-threading, the "
+"I<limit> is ignored and B<xz> 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<limit> 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<xz> se "
+"recuse a descompactar um arquivo. Se I<limite> for muito baixo para permitir "
+"qualquer multi-thread, o I<limite> será ignorado e B<xz> 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<limite> efetivo para multi-threading nunca será maior que o limite "
+"definido com B<--memlimit-decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1135
+msgid ""
+"In contrast to the other memory usage limit options, B<--memlimit-mt-"
+"decompress=>I<limit> has a system-specific default I<limit>. B<xz --info-"
+"memory> 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<limite> tem um padrão I<limite> específico do sistema. B<xz "
+"--info-memory> pode ser usado para ver o valor atual."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1151
+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<limit> is too low on your system, "
+"feel free to increase the I<limit> but never set it to a value larger than "
+"the amount of usable RAM as with appropriate input files B<xz> 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<limite> padrão for muito "
+"baixo em seu sistema, sinta-se à vontade para aumentar o I<limite>, mas "
+"nunca defina-o para um valor maior que a quantidade de RAM utilizável, pois "
+"com os arquivos de entrada apropriados B<xz> 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:1163
+msgid ""
+"See B<--memlimit-compress=>I<limit> for possible ways to specify the "
+"I<limit>. Setting I<limit> to B<0> resets the I<limit> to the default "
+"system-specific value."
+msgstr ""
+"Consulte B<--memlimit-compress=>I<limite> para possíveis maneiras de "
+"especificar o I<limite>. Definir I<limite> como B<0> redefine I<limite> para "
+"o valor padrão específico do sistema."
+
+#. type: TP
+#: ../src/xz/xz.1:1163
+#, no-wrap
+msgid "B<-M> I<limit>, B<--memlimit=>I<limit>, B<--memory=>I<limit>"
+msgstr "B<-M> I<limite>, B<--memlimit=>I<limite>, B<--memory=>I<limite>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1169
+msgid ""
+"This is equivalent to specifying B<--memlimit-compress=>I<limit> B<--"
+"memlimit-decompress=>I<limit> B<--memlimit-mt-decompress=>I<limit>."
+msgstr ""
+"Isso é equivalente a especificar B<--memlimit-compress=>I<limite> B<--"
+"memlimit-decompress=>I<limite> B<--memlimit-mt-decompress=>I<limite>."
+
+#. type: TP
+#: ../src/xz/xz.1:1169
+#, no-wrap
+msgid "B<--no-adjust>"
+msgstr "B<--no-adjust>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1179
+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<xz> 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<xz> 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:1182
+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:1182
+#, no-wrap
+msgid "B<-T> I<threads>, B<--threads=>I<threads>"
+msgstr "B<-T> I<threads>, B<--threads=>I<threads>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1197
+msgid ""
+"Specify the number of worker threads to use. Setting I<threads> to a "
+"special value B<0> makes B<xz> use up to as many threads as the processor(s) "
+"on the system support. The actual number of threads can be fewer than "
+"I<threads> 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<threads> para um valor especial B<0> faz com que B<xz> use tantos threads "
+"quanto o(s) processador(es) no suporte do sistema. O número real de "
+"encadeamentos pode ser menor que I<threads> 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:1216
+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<threads> to B<1> will use the single-threaded "
+"mode. Setting I<threads> to any other value, including B<0>, will use the "
+"multi-threaded compressor even if the system supports only one hardware "
+"thread. (B<xz> 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<threads> como B<1> usará o "
+"modo de thread única. Definir I<threads> 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<xz> 5.2.x usou o modo de "
+"thread única nesta situação.)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1235
+msgid ""
+"To use multi-threaded mode with only one thread, set I<threads> to B<+1>. "
+"The B<+> prefix has no effect with values other than B<1>. A memory usage "
+"limit can still make B<xz> switch to single-threaded mode unless B<--no-"
+"adjust> is used. Support for the B<+> prefix was added in B<xz> 5.4.0."
+msgstr ""
+"Para usar o modo de várias threads com apenas uma thread, defina I<threads> "
+"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<xz> 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<xz> 5.4.0."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1250
+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<xz> from compressing or decompressing. This default soft "
+"limit will not make B<xz> switch from multi-threaded mode to single-threaded "
+"mode. The active limits can be seen with B<xz --info-memory>."
+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<xz> de compactar ou "
+"descompactar. Este limite flexível padrão não fará com que B<xz> alterne do "
+"modo de várias threads para o modo de thread única. Os limites ativos podem "
+"ser vistos com B<xz --info-memory>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1257
+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<size> 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<tamanho>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1265
+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<size> 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<tamanho> tiver sido usado."
+
+#. type: SS
+#: ../src/xz/xz.1:1266 ../src/xz/xz.1:2819
+#, no-wrap
+msgid "Custom compressor filter chains"
+msgstr "Cadeias de filtro de compressor personalizadas"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1282
+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:1289
+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:1297
+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:1305
+msgid ""
+"A custom filter chain is specified by using one or more filter options in "
+"the order they are wanted in the filter chain. That is, the order of filter "
+"options is significant! When decoding raw streams (B<--format=raw>), the "
+"filter chain is specified in the same order as it was specified when "
+"compressing."
+msgstr ""
+"Uma cadeia de filtro personalizada é especificada usando uma ou mais opções "
+"de filtro na ordem desejada na cadeia de filtro. Ou seja, a ordem das opções "
+"de filtro é significativa! Ao decodificar fluxos brutos (B<--format=raw>), a "
+"cadeia de filtros é especificada na mesma ordem em que foi especificada "
+"durante a compactação."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1314
+msgid ""
+"Filters take filter-specific I<options> as a comma-separated list. Extra "
+"commas in I<options> are ignored. Every option has a default value, so you "
+"need to specify only those you want to change."
+msgstr ""
+"Os filtros usam I<opções> específicas do filtro como uma lista separada por "
+"vírgulas. As vírgulas extras em I<opções> são ignoradas. Cada opção tem um "
+"valor padrão, portanto, você precisa especificar apenas aquelas que deseja "
+"alterar."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1323
+msgid ""
+"To see the whole filter chain and I<options>, use B<xz -vv> (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<opções>, use B<xz -vv> (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:1323
+#, no-wrap
+msgid "B<--lzma1>[B<=>I<options>]"
+msgstr "B<--lzma1>[B<=>I<opções>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1326
+#, no-wrap
+msgid "B<--lzma2>[B<=>I<options>]"
+msgstr "B<--lzma2>[B<=>I<opções>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1331
+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:1343
+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:1346
+msgid "LZMA1 and LZMA2 share the same set of I<options>:"
+msgstr "LZMA1 e LZMA2 compartilham o mesmo conjunto de I<opções>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1347
+#, no-wrap
+msgid "B<preset=>I<preset>"
+msgstr "B<preset=>I<predefinição>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1374
+msgid ""
+"Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+"matches B<--extreme>. If no B<preset> is specified, the default values of "
+"LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgstr ""
+"Redefine todas as I<opções> de LZMA1 ou LZMA2 para I<predefinição>. "
+"I<Predefinição> 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<e>, que corresponde a B<--"
+"extreme>. Se nenhum B<preset> for especificado, os valores padrão das "
+"I<opções> LZMA1 ou LZMA2 serão obtidos da predefinição B<6>."
+
+#. type: TP
+#: ../src/xz/xz.1:1374
+#, no-wrap
+msgid "B<dict=>I<size>"
+msgstr "B<dict=>I<tamanho>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1389
+msgid ""
+"Dictionary (history buffer) I<size> 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<size> usually improves compression ratio, but a "
+"dictionary bigger than the uncompressed file is waste of memory."
+msgstr ""
+"O I<tamanho> 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<tamanho> "
+"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:1398
+msgid ""
+"Typical dictionary I<size> 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<tamanho> 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:1425
+msgid ""
+"Dictionary I<size> and match finder (I<mf>) together determine the memory "
+"usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary "
+"I<size> 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<size> either as "
+"2^I<n> or 2^I<n> + 2^(I<n>-1), so these I<sizes> are somewhat preferred for "
+"compression. Other I<sizes> will get rounded up when stored in the B<.xz> "
+"headers."
+msgstr ""
+"O I<tamanho> de dicionário e o localizador de correspondência (I<mf>) juntos "
+"determinam o uso de memória do codificador LZMA1 ou LZMA2. O mesmo (ou "
+"maior) I<tamanho> 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<tamanho> de dicionário como 2^I<n> ou 2^I<n> "
+"+ 2^(I<n>-1), então esses I<tamanhos> são um tanto preferidos para "
+"compactação. Outros I<tamanhos> serão arredondados quando armazenados nos "
+"cabeçalhos B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:1425
+#, no-wrap
+msgid "B<lc=>I<lc>"
+msgstr "B<lc=>I<lc>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1434
+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<lc> and I<lp> "
+"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<lc> e I<lp> não deve exceder 4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1439
+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:1453
+msgid ""
+"The literal coding makes an assumption that the highest I<lc> 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<lc> 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<lc> 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<lc> é pelo "
+"menos 3, a codificação literal pode aproveitar essa propriedade nos dados "
+"não compactados."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1462
+msgid ""
+"The default value (3) is usually good. If you want maximum compression, "
+"test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+"compression worse. If it makes it worse, test B<lc=2> too."
+msgstr ""
+"O valor padrão (3) geralmente é bom. Se você deseja compactação máxima, "
+"experimente B<lc=4>. Às vezes ajuda um pouco, às vezes piora a compactação. "
+"Se piorar, experimente B<lc=2> também."
+
+#. type: TP
+#: ../src/xz/xz.1:1462
+#, no-wrap
+msgid "B<lp=>I<lp>"
+msgstr "B<lp=>I<lp>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1466
+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:1473
+msgid ""
+"I<Lp> affects what kind of alignment in the uncompressed data is assumed "
+"when encoding literals. See I<pb> below for more information about "
+"alignment."
+msgstr ""
+"I<Lp> afeta que tipo de alinhamento nos dados não compactados é assumido ao "
+"codificar literais. Consulte I<pb> abaixo para obter mais informações sobre "
+"alinhamento."
+
+#. type: TP
+#: ../src/xz/xz.1:1473
+#, no-wrap
+msgid "B<pb=>I<pb>"
+msgstr "B<pb=>I<pb>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1477
+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:1484
+msgid ""
+"I<Pb> affects what kind of alignment in the uncompressed data is assumed in "
+"general. The default means four-byte alignment (2^I<pb>=2^2=4), which is "
+"often a good choice when there's no better guess."
+msgstr ""
+"I<Pb> afeta que tipo de alinhamento nos dados não compactados é assumido em "
+"geral. O padrão significa alinhamento de quatro bytes (2^I<pb>=2^2=4), que "
+"geralmente é uma boa escolha quando não há melhor estimativa."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1498
+msgid ""
+"When the alignment is known, setting I<pb> 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<pb=0> can improve compression "
+"slightly. For UTF-16 text, B<pb=1> is a good choice. If the alignment is "
+"an odd number like 3 bytes, B<pb=0> might be the best choice."
+msgstr ""
+"Quando o alinhamento é conhecido, definir I<pb> 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<pb=0> "
+"pode melhorar um pouco a compactação. Para texto UTF-16, B<pb=1> é uma boa "
+"escolha. Se o alinhamento for um número ímpar como 3 bytes, B<pb=0> pode ser "
+"a melhor escolha."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1506
+msgid ""
+"Even though the assumed alignment can be adjusted with I<pb> and I<lp>, "
+"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<pb> e I<lp>, 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:1506
+#, no-wrap
+msgid "B<mf=>I<mf>"
+msgstr "B<mf=>I<mf>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1521
+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<preset>: 0 uses B<hc3>, "
+"1\\(en3 use B<hc4>, and the rest use B<bt4>."
+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<predefinição>: 0 usa B<hc3>, 1\\(en3 usa B<hc4> e o resto usa B<bt4>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1527
+msgid ""
+"The following match finders are supported. The memory usage formulas below "
+"are rough approximations, which are closest to the reality when I<dict> 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<dict> é uma potência de dois."
+
+#. type: TP
+#: ../src/xz/xz.1:1528
+#, no-wrap
+msgid "B<hc3>"
+msgstr "B<hc3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1531
+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:1535 ../src/xz/xz.1:1584
+msgid "Minimum value for I<nice>: 3"
+msgstr "Valor mínimo para I<nice>: 3"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1537 ../src/xz/xz.1:1556 ../src/xz/xz.1:1586
+#: ../src/xz/xz.1:1605
+msgid "Memory usage:"
+msgstr "Uso de memória:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1542
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1547
+msgid "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1547
+#, no-wrap
+msgid "B<hc4>"
+msgstr "B<hc4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1550
+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:1554 ../src/xz/xz.1:1603
+msgid "Minimum value for I<nice>: 4"
+msgstr "Valor mínimo para I<nice>: 4"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1561
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1566
+msgid "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1566
+#, no-wrap
+msgid "B<bt2>"
+msgstr "B<bt2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1569
+msgid "Binary Tree with 2-byte hashing"
+msgstr "Árvore binária com hashing de 2 bytes"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1573
+msgid "Minimum value for I<nice>: 2"
+msgstr "Valor mínimo para I<nice>: 2"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1577
+msgid "Memory usage: I<dict> * 9.5"
+msgstr "Uso de memória: I<dict> * 9.5"
+
+#. type: TP
+#: ../src/xz/xz.1:1577
+#, no-wrap
+msgid "B<bt3>"
+msgstr "B<bt3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1580
+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:1591
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1596
+msgid "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1596
+#, no-wrap
+msgid "B<bt4>"
+msgstr "B<bt4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1599
+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:1610
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1615
+msgid "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+
+#. type: TP
+#: ../src/xz/xz.1:1616
+#, no-wrap
+msgid "B<mode=>I<mode>"
+msgstr "B<mode=>I<modo>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1637
+msgid ""
+"Compression I<mode> specifies the method to analyze the data produced by the "
+"match finder. Supported I<modes> are B<fast> and B<normal>. The default is "
+"B<fast> for I<presets> 0\\(en3 and B<normal> for I<presets> 4\\(en9."
+msgstr ""
+"O I<modo> de compactação especifica o método para analisar os dados "
+"produzidos pelo localizador de correspondência. Os I<modos> suportados são "
+"B<fast> e B<normal>. O padrão é B<fast> para I<predefinições> 0\\(en3 e "
+"B<normal> para I<predefinições> 4\\(en9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1646
+msgid ""
+"Usually B<fast> is used with Hash Chain match finders and B<normal> with "
+"Binary Tree match finders. This is also what the I<presets> do."
+msgstr ""
+"Normalmente, B<fast> é usado com localizadores de correspondência cadeia de "
+"hashs e B<normal> com localizadores de correspondência de árvore binária. "
+"Isso também é o que os I<predefinições> fazem."
+
+#. type: TP
+#: ../src/xz/xz.1:1646
+#, no-wrap
+msgid "B<nice=>I<nice>"
+msgstr "B<nice=>I<nice>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1653
+msgid ""
+"Specify what is considered to be a nice length for a match. Once a match of "
+"at least I<nice> 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<nice> bytes é encontrada, o "
+"algoritmo para de procurar correspondências possivelmente melhores."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1660
+msgid ""
+"I<Nice> can be 2\\(en273 bytes. Higher values tend to give better "
+"compression ratio at the expense of speed. The default depends on the "
+"I<preset>."
+msgstr ""
+"I<Nice> 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<predefinição>."
+
+#. type: TP
+#: ../src/xz/xz.1:1660
+#, no-wrap
+msgid "B<depth=>I<depth>"
+msgstr "B<depth=>I<profundidade>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1670
+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<depth> from I<mf> and I<nice>."
+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<profundidade> razoável de I<mf> e I<nice>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1681
+msgid ""
+"Reasonable I<depth> for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary "
+"Trees. Using very high values for I<depth> can make the encoder extremely "
+"slow with some files. Avoid setting the I<depth> over 1000 unless you are "
+"prepared to interrupt the compression in case it is taking far too long."
+msgstr ""
+"Uma I<profundidade> razoável para cadeias de hash é 4\\(en100 e 16\\(en1000 "
+"para árvores binárias. Usar valores muito altos para I<profundidade> pode "
+"tornar o codificador extremamente lento com alguns arquivos. Evite definir "
+"I<profundidade> 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:1692
+msgid ""
+"When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary "
+"I<size>. LZMA1 needs also I<lc>, I<lp>, and I<pb>."
+msgstr ""
+"Ao decodificar fluxos brutos (B<--format=raw>), o LZMA2 precisa apenas do "
+"dicionário I<tamanho>. LZMA1 também precisa de I<lc>, I<lp> e I<pb>."
+
+#. type: TP
+#: ../src/xz/xz.1:1692
+#, no-wrap
+msgid "B<--x86>[B<=>I<options>]"
+msgstr "B<--x86>[B<=>I<opções>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1695
+#, no-wrap
+msgid "B<--arm>[B<=>I<options>]"
+msgstr "B<--arm>[B<=>I<opções>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1697
+#, no-wrap
+msgid "B<--armthumb>[B<=>I<options>]"
+msgstr "B<--armthumb>[B<=>I<opções>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1699
+#, no-wrap
+msgid "B<--arm64>[B<=>I<options>]"
+msgstr "B<--arm64>[B<=>I<opções>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1701
+#, no-wrap
+msgid "B<--powerpc>[B<=>I<options>]"
+msgstr "B<--powerpc>[B<=>I<opções>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1703
+#, no-wrap
+msgid "B<--ia64>[B<=>I<options>]"
+msgstr "B<--ia64>[B<=>I<opções>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1705
+#, no-wrap
+msgid "B<--sparc>[B<=>I<options>]"
+msgstr "B<--sparc>[B<=>I<opções>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1711
+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:1725
+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:1728
+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:1735
+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:1745
+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:1750
+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:1757
+#, no-wrap
+msgid "Filter"
+msgstr "Filtro"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Alignment"
+msgstr "Alinhamento"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Notes"
+msgstr "Observações"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "x86"
+msgstr "x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "32-bit or 64-bit x86"
+msgstr "x86 32 bits ou 64 bits"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1759
+#, no-wrap
+msgid "ARM"
+msgstr "ARM"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1760
+#, no-wrap
+msgid "ARM-Thumb"
+msgstr "ARM-Thumb"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "ARM64"
+msgstr "ARM64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "4096-byte alignment is best"
+msgstr ""
+"Alinhamento de 4096 bytes\n"
+";;é melhor"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "PowerPC"
+msgstr "PowerPC"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "Big endian only"
+msgstr "Somente big endian"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "IA-64"
+msgstr "IA-64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "16"
+msgstr "16"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "Itanium"
+msgstr "Itanium"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1764
+#, no-wrap
+msgid "SPARC"
+msgstr "SPARC"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1781
+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. For example, with the IA-64 "
+"filter, it's good to set B<pb=4> or even B<pb=4,lp=4,lc=0> with LZMA2 "
+"(2^4=16). The x86 filter is an exception; it's usually good to stick to "
+"LZMA2's default four-byte alignment when compressing x86 executables."
+msgstr ""
+"Como os dados filtrados por BCJ geralmente são compactados com LZMA2, a taxa "
+"de compactação pode melhorar ligeiramente se as opções de LZMA2 forem "
+"definidas para corresponder ao alinhamento do filtro BCJ selecionado. Por "
+"exemplo, com o filtro IA-64, é bom definir B<pb=4> ou mesmo B<pb=4,lp=4,"
+"lc=0> com LZMA2 (2^4=16). O filtro x86 é uma exceção; geralmente é bom "
+"manter o alinhamento padrão de quatro bytes do LZMA2 ao compactar "
+"executáveis x86."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1784
+msgid "All BCJ filters support the same I<options>:"
+msgstr "Todos os filtros BCJ suportam as mesmas I<opções>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1785
+#, no-wrap
+msgid "B<start=>I<offset>"
+msgstr "B<start=>I<deslocamento>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1799
+msgid ""
+"Specify the start I<offset> that is used when converting between relative "
+"and absolute addresses. The I<offset> 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<offset> is almost never useful."
+msgstr ""
+"Especifica o I<deslocamento> inicial que é usado na conversão entre "
+"endereços relativos e absolutos. O I<deslocamento> 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<deslocamento> personalizado quase nunca é "
+"útil."
+
+#. type: TP
+#: ../src/xz/xz.1:1800
+#, no-wrap
+msgid "B<--delta>[B<=>I<options>]"
+msgstr "B<--delta>[B<=>I<opções>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1805
+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:1814
+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<flac>(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<flac>(1)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1817
+msgid "Supported I<options>:"
+msgstr "I<Opções> suportadas:"
+
+#. type: TP
+#: ../src/xz/xz.1:1818
+#, no-wrap
+msgid "B<dist=>I<distance>"
+msgstr "B<dist=>I<distância>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1826
+msgid ""
+"Specify the I<distance> of the delta calculation in bytes. I<distance> must "
+"be 1\\(en256. The default is 1."
+msgstr ""
+"Especifica a I<distância> do cálculo delta em bytes. I<distância> deve ser "
+"1\\(en256. O padrão é 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1831
+msgid ""
+"For example, with B<dist=2> 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<dist=2> 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:1833
+#, no-wrap
+msgid "Other options"
+msgstr "Outras opções"
+
+#. type: TP
+#: ../src/xz/xz.1:1834 ../src/xzdec/xzdec.1:83
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr "B<-q>, B<--quiet>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1841
+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:1841
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr "B<-v>, B<--verbose>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1850
+msgid ""
+"Be verbose. If standard error is connected to a terminal, B<xz> 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<xz> "
+"exibirá um indicador de progresso. Especifique B<--verbose> duas vezes dará "
+"uma saída ainda mais detalhada."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1852
+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:1857
+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:1860
+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:1863
+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:1867
+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:1874
+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<xz> 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<xz> começou a processar o arquivo."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1876
+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:1884
+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<xz> 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<xz> 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:1899
+msgid ""
+"When standard error is not a terminal, B<--verbose> will make B<xz> 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<xz> "
+"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:1899 ../src/xzdec/xzdec.1:89
+#, no-wrap
+msgid "B<-Q>, B<--no-warn>"
+msgstr "B<-Q>, B<--no-warn>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1909
+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:1909
+#, no-wrap
+msgid "B<--robot>"
+msgstr "B<--robot>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1921
+msgid ""
+"Print messages in a machine-parsable format. This is intended to ease "
+"writing frontends that want to use B<xz> instead of liblzma, which may be "
+"the case with various scripts. The output with this option enabled is meant "
+"to be stable across B<xz> releases. See the section B<ROBOT MODE> 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<xz> 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<xz>. Consulte a seção B<MODO ROBÔ> para obter detalhes."
+
+#. type: TP
+#: ../src/xz/xz.1:1921
+#, no-wrap
+msgid "B<--info-memory>"
+msgstr "B<--info-memory>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1928
+msgid ""
+"Display, in human-readable format, how much physical memory (RAM) and how "
+"many processor threads B<xz> 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<xz> 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:1928 ../src/xzdec/xzdec.1:96
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr "B<-h>, B<--help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1932
+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:1932
+#, no-wrap
+msgid "B<-H>, B<--long-help>"
+msgstr "B<-H>, B<--long-help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1937
+msgid ""
+"Display a help message describing all features of B<xz>, and exit "
+"successfully"
+msgstr ""
+"Exibe uma mensagem de ajuda descrevendo todos os recursos de B<xz> e sai com "
+"sucesso"
+
+#. type: TP
+#: ../src/xz/xz.1:1937 ../src/xzdec/xzdec.1:99
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr "B<-V>, B<--version>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1946
+msgid ""
+"Display the version number of B<xz> 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<xz> 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:1947
+#, no-wrap
+msgid "ROBOT MODE"
+msgstr "MODO ROBÔ"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1963
+msgid ""
+"The robot mode is activated with the B<--robot> option. It makes the output "
+"of B<xz> easier to parse by other programs. Currently B<--robot> is "
+"supported only together with B<--version>, B<--info-memory>, and B<--list>. "
+"It will be supported for compression and decompression in the future."
+msgstr ""
+"O modo robô é ativado com a opção B<--robot>. Isso torna a saída de B<xz> "
+"mais fácil de ser analisada por outros programas. Atualmente B<--robot> é "
+"suportado apenas junto com B<--version>, B<--info-memory> e B<--list>. Ele "
+"terá suporte para compactação e descompactação no futuro."
+
+#. type: SS
+#: ../src/xz/xz.1:1964
+#, no-wrap
+msgid "Version"
+msgstr "Versão"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1969
+#, fuzzy
+#| msgid ""
+#| "B<xz --robot --version> will print the version number of B<xz> and "
+#| "liblzma in the following format:"
+msgid ""
+"B<xz --robot --version> prints the version number of B<xz> and liblzma in "
+"the following format:"
+msgstr ""
+"B<xz --robot --version> imprimirá o número da versão de B<xz> e liblzma no "
+"seguinte formato:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1971
+msgid "B<XZ_VERSION=>I<XYYYZZZS>"
+msgstr "B<XZ_VERSION=>I<XYYYZZZS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1973
+msgid "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+msgstr "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+
+#. type: TP
+#: ../src/xz/xz.1:1973
+#, no-wrap
+msgid "I<X>"
+msgstr "I<X>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1976
+msgid "Major version."
+msgstr "Versão principal."
+
+#. type: TP
+#: ../src/xz/xz.1:1976
+#, no-wrap
+msgid "I<YYY>"
+msgstr "I<YYY>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1981
+msgid ""
+"Minor version. Even numbers are stable. Odd numbers are alpha or beta "
+"versions."
+msgstr ""
+"Versão menor. Números pares são estáveis. Os números ímpares são versões "
+"alfa ou beta."
+
+#. type: TP
+#: ../src/xz/xz.1:1981
+#, no-wrap
+msgid "I<ZZZ>"
+msgstr "I<ZZZ>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1985
+msgid ""
+"Patch level for stable releases or just a counter for development releases."
+msgstr ""
+"Nível de patch para versões estáveis ou apenas um contador para versões de "
+"desenvolvimento."
+
+#. type: TP
+#: ../src/xz/xz.1:1985
+#, no-wrap
+msgid "I<S>"
+msgstr "I<S>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1993
+msgid ""
+"Stability. 0 is alpha, 1 is beta, and 2 is stable. I<S> should be always 2 "
+"when I<YYY> is even."
+msgstr ""
+"Estabilidade. 0 é alfa, 1 é beta e 2 é estável. I<S> deve ser sempre 2 "
+"quando I<YYY> for par."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1998
+msgid ""
+"I<XYYYZZZS> are the same on both lines if B<xz> and liblzma are from the "
+"same XZ Utils release."
+msgstr ""
+"I<XYYYZZZS> são iguais em ambas as linhas se B<xz> e liblzma forem da mesma "
+"versão do XZ Utils."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2004
+msgid "Examples: 4.999.9beta is B<49990091> and 5.0.0 is B<50000002>."
+msgstr "Exemplos: 4.999.9beta é B<49990091> e 5.0.0 é B<50000002>."
+
+#. type: SS
+#: ../src/xz/xz.1:2005
+#, no-wrap
+msgid "Memory limit information"
+msgstr "Informações de limite de memória"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2008
+#, fuzzy
+#| msgid ""
+#| "B<xz --robot --info-memory> prints a single line with three tab-separated "
+#| "columns:"
+msgid ""
+"B<xz --robot --info-memory> prints a single line with multiple tab-separated "
+"columns:"
+msgstr ""
+"B<xz --robot --info-memory> imprime uma única linha com três colunas "
+"separadas por tabulações:"
+
+#. type: IP
+#: ../src/xz/xz.1:2008
+#, no-wrap
+msgid "1."
+msgstr "1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2010
+msgid "Total amount of physical memory (RAM) in bytes."
+msgstr "Quantidade total de memória física (RAM) em bytes."
+
+#. type: IP
+#: ../src/xz/xz.1:2010 ../src/xz/xz.1:2125 ../src/xz/xz.1:2162
+#: ../src/xz/xz.1:2188 ../src/xz/xz.1:2258 ../src/xz/xz.1:2285
+#, no-wrap
+msgid "2."
+msgstr "2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2017
+msgid ""
+"Memory usage limit for compression in bytes (B<--memlimit-compress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Limite de uso de memória para compactação em bytes (B<--memlimit-compress>). "
+"Um valor especial de B<0> indica a configuração padrão que para o modo de "
+"thread única é o mesmo que sem limite."
+
+#. type: IP
+#: ../src/xz/xz.1:2017 ../src/xz/xz.1:2127 ../src/xz/xz.1:2164
+#: ../src/xz/xz.1:2190 ../src/xz/xz.1:2263 ../src/xz/xz.1:2287
+#, no-wrap
+msgid "3."
+msgstr "3."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2024
+msgid ""
+"Memory usage limit for decompression in bytes (B<--memlimit-decompress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Limite de uso de memória para descompactação em bytes (B<--memlimit-"
+"decompress>). Um valor especial de B<0> indica a configuração padrão que "
+"para o modo de thread única é o mesmo que sem limite."
+
+#. type: IP
+#: ../src/xz/xz.1:2024 ../src/xz/xz.1:2129 ../src/xz/xz.1:2166
+#: ../src/xz/xz.1:2193 ../src/xz/xz.1:2273 ../src/xz/xz.1:2289
+#, no-wrap
+msgid "4."
+msgstr "4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2036
+msgid ""
+"Since B<xz> 5.3.4alpha: Memory usage for multi-threaded decompression in "
+"bytes (B<--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 B<--memlimit-mt-"
+"decompress>."
+msgstr ""
+"Desde B<xz> 5.3.4alpha: Uso de memória para descompactação com várias thread "
+"em bytes (B<--memlimit-mt-decompress>). 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 B<--memlimit-"
+"mt-decompress>."
+
+#. type: IP
+#: ../src/xz/xz.1:2036 ../src/xz/xz.1:2131 ../src/xz/xz.1:2168
+#: ../src/xz/xz.1:2195 ../src/xz/xz.1:2291
+#, no-wrap
+msgid "5."
+msgstr "5."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2048
+msgid ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+msgstr ""
+"Desde B<xz> 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 (B<--threads=0>) e nenhum limite de uso de "
+"memória foi especificado (B<--memlimit-compress>). Isso também é usado como "
+"o valor padrão para B<--memlimit-mt-decompress>."
+
+#. type: IP
+#: ../src/xz/xz.1:2048 ../src/xz/xz.1:2133 ../src/xz/xz.1:2170
+#: ../src/xz/xz.1:2197 ../src/xz/xz.1:2293
+#, no-wrap
+msgid "6."
+msgstr "6."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2053
+msgid "Since B<xz> 5.3.4alpha: Number of available processor threads."
+msgstr "Desde B<xz> 5.3.4alpha: Número de threads de processador disponíveis."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2057
+msgid ""
+"In the future, the output of B<xz --robot --info-memory> may have more "
+"columns, but never more than a single line."
+msgstr ""
+"No futuro, a saída de B<xz --robot --info-memory> pode ter mais colunas, mas "
+"nunca mais do que uma única linha."
+
+#. type: SS
+#: ../src/xz/xz.1:2058
+#, no-wrap
+msgid "List mode"
+msgstr "Modo lista"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2063
+msgid ""
+"B<xz --robot --list> 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<xz --robot --list> 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:"
+
+#. type: TP
+#: ../src/xz/xz.1:2063
+#, no-wrap
+msgid "B<name>"
+msgstr "B<name>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2067
+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:2067
+#, no-wrap
+msgid "B<file>"
+msgstr "B<file>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2075
+msgid ""
+"This line contains overall information about the B<.xz> file. This line is "
+"always printed after the B<name> line."
+msgstr ""
+"Esta linha contém informações gerais sobre o arquivo B<.xz>. Esta linha é "
+"sempre impressa após a linha B<name>."
+
+#. type: TP
+#: ../src/xz/xz.1:2075
+#, no-wrap
+msgid "B<stream>"
+msgstr "B<stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2085
+msgid ""
+"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."
+msgstr ""
+"Este tipo de linha é usado somente quando B<--verbose> foi especificado. "
+"Existem tantas linhas de B<stream> quanto fluxos no arquivo B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2085
+#, no-wrap
+msgid "B<block>"
+msgstr "B<block>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2100
+msgid ""
+"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."
+msgstr ""
+"Este tipo de linha é usado somente quando B<--verbose> foi especificado. "
+"Existem tantas linhas B<block> quanto blocos no arquivo B<.xz>. As linhas "
+"B<block> são mostradas após todas as linhas B<stream>; diferentes tipos de "
+"linha não são intercalados."
+
+#. type: TP
+#: ../src/xz/xz.1:2100
+#, no-wrap
+msgid "B<summary>"
+msgstr "B<summary>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2115
+msgid ""
+"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."
+msgstr ""
+"Este tipo de linha é usado apenas quando B<--verbose> foi especificado duas "
+"vezes. Esta linha é impressa após todas as linhas de B<block>. Assim como a "
+"linha B<arquivo>, a linha B<summary> contém informações gerais sobre o "
+"arquivo B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2115
+#, no-wrap
+msgid "B<totals>"
+msgstr "B<totals>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2119
+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:2123
+msgid "The columns of the B<file> lines:"
+msgstr "As colunas das linhas B<file>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2127
+msgid "Number of streams in the file"
+msgstr "Número de fluxos no arquivo"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2129
+msgid "Total number of blocks in the stream(s)"
+msgstr "Número total de blocos no(s) fluxo(s)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2131
+msgid "Compressed size of the file"
+msgstr "Tamanho compactado do arquivo"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2133
+msgid "Uncompressed size of the file"
+msgstr "Uncompressed size of the file"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2139
+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:2139 ../src/xz/xz.1:2172 ../src/xz/xz.1:2199
+#: ../src/xz/xz.1:2295
+#, no-wrap
+msgid "7."
+msgstr "7."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2152
+msgid ""
+"Comma-separated list of integrity check names. The following strings are "
+"used for the known check types: B<None>, B<CRC32>, B<CRC64>, and "
+"B<SHA-256>. For unknown check types, B<Unknown->I<N> is used, where I<N> 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<None>, B<CRC32>, B<CRC64> e B<SHA-256>. Para tipos de verificações "
+"desconhecidos, B<Unknown->I<N> é usado, onde I<N> é o ID do cheque como um "
+"número decimal (um ou dois dígitos)."
+
+#. type: IP
+#: ../src/xz/xz.1:2152 ../src/xz/xz.1:2174 ../src/xz/xz.1:2201
+#: ../src/xz/xz.1:2298
+#, no-wrap
+msgid "8."
+msgstr "8."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2154
+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:2160
+msgid "The columns of the B<stream> lines:"
+msgstr "As colunas das linhas B<stream>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2164
+msgid "Stream number (the first stream is 1)"
+msgstr "Número do fluxo (o primeiro fluxo é 1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2166
+msgid "Number of blocks in the stream"
+msgstr "Número de blocos no fluxo"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2168
+msgid "Compressed start offset"
+msgstr "Deslocamento inicial compactado"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2170
+msgid "Uncompressed start offset"
+msgstr "Deslocamento inicial descompactado"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2172
+msgid "Compressed size (does not include stream padding)"
+msgstr "Tamanho compactado (não inclui preenchimento de fluxo)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2174 ../src/xz/xz.1:2203 ../src/xz/xz.1:2293
+msgid "Uncompressed size"
+msgstr "Tamanho descompactado"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2205
+msgid "Compression ratio"
+msgstr "Taxa de compactação"
+
+#. type: IP
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2203 ../src/xz/xz.1:2300
+#, no-wrap
+msgid "9."
+msgstr "9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2207
+msgid "Name of the integrity check"
+msgstr "Nome da verificação de integridade"
+
+#. type: IP
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2205 ../src/xz/xz.1:2316
+#, no-wrap
+msgid "10."
+msgstr "10."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2180
+msgid "Size of stream padding"
+msgstr "Tamanho do preenchimento do fluxo"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2186
+msgid "The columns of the B<block> lines:"
+msgstr "As colunas das linhas B<block>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2190
+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:2193
+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:2195
+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:2197
+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:2199
+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:2201
+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:2219
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<block> 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<block>. 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:2221 ../src/xz/xz.1:2321
+#, no-wrap
+msgid "11."
+msgstr "11."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2223
+msgid "Value of the integrity check in hexadecimal"
+msgstr "Valor da verificação de integridade em hexadecimal"
+
+#. type: IP
+#: ../src/xz/xz.1:2223 ../src/xz/xz.1:2331
+#, no-wrap
+msgid "12."
+msgstr "12."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2225
+msgid "Block header size"
+msgstr "Tamanho do cabeçalho do bloco"
+
+#. type: IP
+#: ../src/xz/xz.1:2225
+#, no-wrap
+msgid "13."
+msgstr "13."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2235
+msgid ""
+"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 "
+"(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<c> indica que o tamanho compactado está presente e "
+"B<u> 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:2235
+#, no-wrap
+msgid "14."
+msgstr "14."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2238
+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:2238
+#, no-wrap
+msgid "15."
+msgstr "15."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2243
+msgid ""
+"Amount of memory (in bytes) required to decompress this block with this "
+"B<xz> version"
+msgstr ""
+"Quantidade de memória (em bytes) necessária para descompactar este bloco com "
+"esta versão B<xz>"
+
+#. type: IP
+#: ../src/xz/xz.1:2243
+#, no-wrap
+msgid "16."
+msgstr "16."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2250
+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:2256
+msgid "The columns of the B<summary> lines:"
+msgstr "As colunas das linhas B<summary>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2263
+msgid ""
+"Amount of memory (in bytes) required to decompress this file with this B<xz> "
+"version"
+msgstr ""
+"Quantidade de memória (em bytes) necessária para descompactar este arquivo "
+"com esta versão do B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2269 ../src/xz/xz.1:2327
+msgid ""
+"B<yes> or B<no> indicating if all block headers have both compressed size "
+"and uncompressed size stored in them"
+msgstr ""
+"B<yes> ou B<no> 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:2273 ../src/xz/xz.1:2331
+msgid "I<Since> B<xz> I<5.1.2alpha:>"
+msgstr "I<Desde> B<xz> I<5.1.2alpha:>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2277 ../src/xz/xz.1:2335
+msgid "Minimum B<xz> version required to decompress the file"
+msgstr "Versão mínima do B<xz> necessária para descompactar o arquivo"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2283
+msgid "The columns of the B<totals> line:"
+msgstr "As colunas da linha B<totals>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2287
+msgid "Number of streams"
+msgstr "Número de fluxos"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2289
+msgid "Number of blocks"
+msgstr "Número de blocos"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2291
+msgid "Compressed size"
+msgstr "Tamanho compactado"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2295
+msgid "Average compression ratio"
+msgstr "Taxa de compactação média"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2298
+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:2300
+msgid "Stream padding size"
+msgstr "Tamanho do preenchimento do fluxo"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2306
+msgid ""
+"Number of files. This is here to keep the order of the earlier columns the "
+"same as on B<file> lines."
+msgstr ""
+"Número de arquivos. Isso está aqui para manter a ordem das colunas "
+"anteriores a mesma das linhas B<file>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2314
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<totals> line:"
+msgstr ""
+"Se B<--verbose> for especificado duas vezes, colunas adicionais serão "
+"incluídas na linha B<totals>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2321
+msgid ""
+"Maximum amount of memory (in bytes) required to decompress the files with "
+"this B<xz> version"
+msgstr ""
+"Quantidade máxima de memória (em bytes) necessária para descompactar os "
+"arquivos com esta versão do B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2341
+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: SH
+#: ../src/xz/xz.1:2342 ../src/xzdec/xzdec.1:104 ../src/lzmainfo/lzmainfo.1:44
+#: ../src/scripts/xzgrep.1:81
+#, no-wrap
+msgid "EXIT STATUS"
+msgstr "STATUS DE SAÍDA"
+
+#. type: TP
+#: ../src/xz/xz.1:2343 ../src/xzdec/xzdec.1:105 ../src/lzmainfo/lzmainfo.1:45
+#, no-wrap
+msgid "B<0>"
+msgstr "B<0>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2346 ../src/lzmainfo/lzmainfo.1:48
+msgid "All is good."
+msgstr "Está tudo bem."
+
+#. type: TP
+#: ../src/xz/xz.1:2346 ../src/xzdec/xzdec.1:108 ../src/lzmainfo/lzmainfo.1:48
+#, no-wrap
+msgid "B<1>"
+msgstr "B<1>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2349 ../src/xzdec/xzdec.1:111 ../src/lzmainfo/lzmainfo.1:51
+msgid "An error occurred."
+msgstr "Ocorreu um erro."
+
+#. type: TP
+#: ../src/xz/xz.1:2349
+#, no-wrap
+msgid "B<2>"
+msgstr "B<2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2353
+msgid "Something worth a warning occurred, but no actual errors occurred."
+msgstr "Algo digno de um aviso ocorreu, mas ocorreu nenhum erro real."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2356
+msgid ""
+"Notices (not warnings or errors) printed on standard error don't affect the "
+"exit status."
+msgstr ""
+"Observações (não avisos ou erros) impressas no erro padrão não afetam o "
+"status de saída."
+
+#. type: SH
+#: ../src/xz/xz.1:2357 ../src/scripts/xzgrep.1:94 ../src/scripts/xzless.1:52
+#, no-wrap
+msgid "ENVIRONMENT"
+msgstr "AMBIENTE"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2370
+msgid ""
+"B<xz> parses space-separated lists of options from the environment variables "
+"B<XZ_DEFAULTS> and B<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 "
+"B<getopt_long>(3) which is used also for the command line arguments."
+msgstr ""
+"B<xz> analisa listas de opções separadas por espaços das variáveis de "
+"ambiente B<XZ_DEFAULTS> e B<XZ_OPT>, 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 B<getopt_long>(3) que também é usado para "
+"os argumentos da linha de comando."
+
+#. type: TP
+#: ../src/xz/xz.1:2370
+#, no-wrap
+msgid "B<XZ_DEFAULTS>"
+msgstr "B<XZ_DEFAULTS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2379
+msgid ""
+"User-specific or system-wide default options. Typically this is set in a "
+"shell initialization script to enable B<xz>'s memory usage limiter by "
+"default. Excluding shell initialization scripts and similar special cases, "
+"scripts must never set or unset B<XZ_DEFAULTS>."
+msgstr ""
+"Opções padrão específicas do usuário ou de todo o sistema. Normalmente, isso "
+"é definido em um script de inicialização do shell para habilitar o limitador "
+"de uso de memória do B<xz> por padrão. Excluindo scripts de inicialização de "
+"shell e casos especiais semelhantes, os scripts nunca devem definir ou "
+"remover a definição de B<XZ_DEFAULTS>."
+
+#. type: TP
+#: ../src/xz/xz.1:2379
+#, no-wrap
+msgid "B<XZ_OPT>"
+msgstr "B<XZ_OPT>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2390
+msgid ""
+"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 B<tar>(1):"
+msgstr ""
+"Isso é para passar opções para B<xz> quando não é possível definir as opções "
+"diretamente na linha de comando B<xz>. Este é o caso quando B<xz> é "
+"executado por um script ou ferramenta, por exemplo, GNU B<tar>(1):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2396
+#, no-wrap
+msgid "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+msgstr "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2410
+msgid ""
+"Scripts may use B<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 B<sh>(1) scripts one may "
+"use something like this:"
+msgstr ""
+"Os scripts podem usar B<XZ_OPT>, por exemplo, para definir opções de "
+"compactação padrão específicas do script. Ainda é recomendável permitir que "
+"os usuários substituam B<XZ_OPT> se isso for razoável. Por exemplo, em "
+"scripts B<sh>(1) pode-se usar algo assim:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2417
+#, no-wrap
+msgid ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+msgstr ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+
+#. type: SH
+#: ../src/xz/xz.1:2422
+#, no-wrap
+msgid "LZMA UTILS COMPATIBILITY"
+msgstr "COMPATIBILIDADE COM LZMA UTILS"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2435
+msgid ""
+"The command line syntax of B<xz> is practically a superset of B<lzma>, "
+"B<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."
+msgstr ""
+"A sintaxe da linha de comando do B<xz> é praticamente um superconjunto de "
+"B<lzma>, B<unlzma> e B<lzcat> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:2436
+#, no-wrap
+msgid "Compression preset levels"
+msgstr "Níveis de predefinição de compactação"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2443
+msgid ""
+"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."
+msgstr ""
+"A numeração das predefinições de nível de compactação não é idêntica em "
+"B<xz> 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."
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "Level"
+msgstr "Nível"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "xz"
+msgstr "xz"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449
+#, no-wrap
+msgid "LZMA Utils"
+msgstr "LZMA Utils"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "N/A"
+msgstr "N/D"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2451
+#, no-wrap
+msgid "64 KiB"
+msgstr "64 KiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2453
+#, no-wrap
+msgid "512 KiB"
+msgstr "512 KiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2468
+msgid ""
+"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:"
+msgstr ""
+"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:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2474
+#, no-wrap
+msgid "LZMA Utils 4.32.x"
+msgstr "LZMA Utils 4.32.x"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2477 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "12 MiB"
+msgstr "12 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2480
+#, no-wrap
+msgid "26 MiB"
+msgstr "26 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2481
+#, no-wrap
+msgid "45 MiB"
+msgstr "45 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2482
+#, no-wrap
+msgid "83 MiB"
+msgstr "83 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2483
+#, no-wrap
+msgid "159 MiB"
+msgstr "159 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2484
+#, no-wrap
+msgid "311 MiB"
+msgstr "311 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2493
+msgid ""
+"The default preset level in LZMA Utils is B<-7> while in XZ Utils it is "
+"B<-6>, so both use an 8 MiB dictionary by default."
+msgstr ""
+"O nível de predefinição padrão no LZMA Utils é B<-7> enquanto no XZ Utils é "
+"B<-6>, então ambos usam um dicionário de 8 MiB por padrão."
+
+#. type: SS
+#: ../src/xz/xz.1:2494
+#, no-wrap
+msgid "Streamed vs. non-streamed .lzma files"
+msgstr "Arquivos .lzma em um fluxo versus sem ser em um fluxo"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2504
+msgid ""
+"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."
+msgstr ""
+"O tamanho descompactado do arquivo pode ser armazenado no cabeçalho de B<."
+"lzma>. 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)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2525
+msgid ""
+"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."
+msgstr ""
+"B<xz> oferece suporte à descompactação de arquivos B<.lzma> com ou sem "
+"marcador de fim de carga útil, mas todos os arquivos B<.lzma> criados por "
+"B<xz> usarão marcador de fim de carga útil e terão o tamanho descompactado "
+"marcado como desconhecido no cabeçalho de B<.lzma>. Isso pode ser um "
+"problema em algumas situações incomuns. Por exemplo, um descompactador de B<."
+"lzma> 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 B<.lzma> com "
+"tamanho descompactado conhecido."
+
+#. type: SS
+#: ../src/xz/xz.1:2526
+#, no-wrap
+msgid "Unsupported .lzma files"
+msgstr "Arquivos .lzma não suportados"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2549
+msgid ""
+"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 I<lp>, but always creates "
+"files with B<lc=3> and B<lp=0>. Creating files with other I<lc> and I<lp> "
+"is possible with B<xz> and with LZMA SDK."
+msgstr ""
+"O formato B<.lzma> permite valores I<lc> até 8 e valores I<lp> até 4. LZMA "
+"Utils pode descompactar arquivos com qualquer I<lc> e I<lp>, mas sempre cria "
+"arquivos com B<lc=3> e B<lp=0>. Criar arquivos com outros I<lc> e I<lp> é "
+"possível com B<xz> e com LZMA SDK."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2560
+msgid ""
+"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 B<xz>."
+msgstr ""
+"A implementação do filtro LZMA1 em liblzma requer que a soma de I<lc> e "
+"I<lp> não exceda 4. Assim, arquivos B<.lzma>, que excedam esta limitação, "
+"não podem ser descompactados com B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2575
+msgid ""
+"LZMA Utils creates only B<.lzma> files which have a dictionary size of "
+"2^I<n> (a power of 2) but accepts files with any dictionary size. liblzma "
+"accepts only B<.lzma> files which have a dictionary size of 2^I<n> or 2^I<n> "
+"+ 2^(I<n>-1). This is to decrease false positives when detecting B<.lzma> "
+"files."
+msgstr ""
+"LZMA Utils cria apenas arquivos B<.lzma> que possuem um tamanho de "
+"dicionário de 2^I<n> (uma potência de 2), mas aceita arquivos com qualquer "
+"tamanho de dicionário. liblzma aceita apenas arquivos B<.lzma> que tenham um "
+"tamanho de dicionário de 2^I<n> ou 2^I<n> + 2^(I<n>-1). Isso é para diminuir "
+"os falsos positivos ao detectar arquivos B<.lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2580
+msgid ""
+"These limitations shouldn't be a problem in practice, since practically all "
+"B<.lzma> files have been compressed with settings that liblzma will accept."
+msgstr ""
+"Essas limitações não devem ser um problema na prática, já que praticamente "
+"todos os arquivos B<.lzma> foram compactados com configurações que o liblzma "
+"aceitará."
+
+#. type: SS
+#: ../src/xz/xz.1:2581
+#, no-wrap
+msgid "Trailing garbage"
+msgstr "Lixo à direita"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2591
+msgid ""
+"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."
+msgstr ""
+"Ao descompactar, o LZMA Utils silenciosamente ignora tudo após o primeiro "
+"fluxo B<.lzma>. 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 "
+"B<.lzma> concatenados."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2601
+msgid ""
+"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."
+msgstr ""
+"Se houver dados restantes após o primeiro fluxo de B<.lzma>, B<xz> considera "
+"o arquivo corrompido, a menos que B<--single-stream> tenha sido usado. Isso "
+"pode quebrar scripts obscuros que presumiram que o lixo à direita é ignorado."
+
+#. type: SH
+#: ../src/xz/xz.1:2602 ../src/xzdec/xzdec.1:117
+#, no-wrap
+msgid "NOTES"
+msgstr "NOTAS"
+
+#. type: SS
+#: ../src/xz/xz.1:2604
+#, no-wrap
+msgid "Compressed output may vary"
+msgstr "A saída compactada pode variar"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2615
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2625
+msgid ""
+"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."
+msgstr ""
+"A informação acima significa que, uma vez que B<--rsyncable> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:2626
+#, no-wrap
+msgid "Embedded .xz decompressors"
+msgstr "Descompactadores .xz embarcados"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2643
+msgid ""
+"Embedded B<.xz> decompressor implementations like XZ Embedded don't "
+"necessarily support files created with integrity I<check> types other than "
+"B<none> and B<crc32>. Since the default is B<--check=crc64>, you must use "
+"B<--check=none> or B<--check=crc32> when creating files for embedded systems."
+msgstr ""
+"As implementações do descompactador B<.xz> embarcados, como o XZ Embedded, "
+"não oferecem necessariamente suporte a arquivos criados com tipos de "
+"I<verificações> de integridade diferentes de B<none> e B<crc32>. Como o "
+"padrão é B<--check=crc64>, você deve usar B<--check=none> ou B<--"
+"check=crc32> ao criar arquivos para sistemas embarcados."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2653
+msgid ""
+"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."
+msgstr ""
+"Fora dos sistemas embarcados, todos os descompactadores de formato B<.xz> "
+"oferecem suporte a todos os tipos de I<verificação> ou, pelo menos, são "
+"capazes de descompactar o arquivo sem verificar a verificação de integridade "
+"se a I<verificação> específica não for suportada."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2656
+msgid ""
+"XZ Embedded supports BCJ filters, but only with the default start offset."
+msgstr ""
+"XZ Embedded oferece suporte a filtros BCJ, mas apenas com o deslocamento "
+"inicial padrão."
+
+#. type: SH
+#: ../src/xz/xz.1:2657
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "EXEMPLOS"
+
+#. type: SS
+#: ../src/xz/xz.1:2659
+#, no-wrap
+msgid "Basics"
+msgstr "Básico"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2669
+msgid ""
+"Compress the file I<foo> into I<foo.xz> using the default compression level "
+"(B<-6>), and remove I<foo> if compression is successful:"
+msgstr ""
+"Compactar o arquivo I<foo> em I<foo.xz> usando o nível de compactação padrão "
+"(B<-6>) e remover I<foo> se a compactação for bem-sucedida:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2674
+#, no-wrap
+msgid "CW<xz foo>\n"
+msgstr "CW<xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2685
+msgid ""
+"Decompress I<bar.xz> into I<bar> and don't remove I<bar.xz> even if "
+"decompression is successful:"
+msgstr ""
+"Descompactar I<bar.xz> em I<bar> e não remover I<bar.xz> mesmo se a "
+"descompactação for bem-sucedida:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2690
+#, no-wrap
+msgid "CW<xz -dk bar.xz>\n"
+msgstr "CW<xz -dk bar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2703
+msgid ""
+"Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+"slower than the default B<-6>, but needs less memory for compression and "
+"decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgstr ""
+"Criar I<baz.tar.xz> com a predefinição B<-4e> (B<-4 --extreme>), que é mais "
+"lenta que o padrão B<-6>, mas precisa de menos memória para compactação e "
+"descompactação (48 \\ MiB e 5\\ MiB, respectivamente):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2708
+#, no-wrap
+msgid "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+msgstr "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2714
+msgid ""
+"A mix of compressed and uncompressed files can be decompressed to standard "
+"output with a single command:"
+msgstr ""
+"Uma mistura de arquivos compactados e descompactados pode ser descompactada "
+"para a saída padrão com um único comando:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2719
+#, no-wrap
+msgid "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+msgstr "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+
+#. type: SS
+#: ../src/xz/xz.1:2723
+#, no-wrap
+msgid "Parallel compression of many files"
+msgstr "Compactação paralela de muitos arquivos"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2729
+msgid ""
+"On GNU and *BSD, B<find>(1) and B<xargs>(1) can be used to parallelize "
+"compression of many files:"
+msgstr ""
+"No GNU e *BSD, B<find>(1) e B<xargs>(1) podem ser usados para paralelizar a "
+"compactação de muitos arquivos:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2735
+#, no-wrap
+msgid ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+msgstr ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2757
+msgid ""
+"The B<-P> option to B<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 B<xargs>(1) "
+"will eventually create."
+msgstr ""
+"A opção B<-P> para B<xargs>(1) define o número de processos paralelos do "
+"B<xz>. O melhor valor para a opção B<-n> 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 B<xz> que B<xargs>(1) "
+"eventualmente criará."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2765
+msgid ""
+"The option B<-T1> for B<xz> is there to force it to single-threaded mode, "
+"because B<xargs>(1) is used to control the amount of parallelization."
+msgstr ""
+"A opção B<-T1> para B<xz> existe para forçá-lo ao modo de thread única, "
+"porque B<xargs>(1) é usado para controlar a quantidade de paralelização."
+
+#. type: SS
+#: ../src/xz/xz.1:2766
+#, no-wrap
+msgid "Robot mode"
+msgstr "Modo robô"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2769
+msgid ""
+"Calculate how many bytes have been saved in total after compressing multiple "
+"files:"
+msgstr ""
+"Calcular quantos bytes foram salvos no total depois de compactar vários "
+"arquivos:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2774
+#, no-wrap
+msgid "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+msgstr "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2789
+msgid ""
+"A script may want to know that it is using new enough B<xz>. The following "
+"B<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:"
+msgstr ""
+"Um script pode querer saber que está usando B<xz> novo o suficiente. O "
+"seguinte script B<sh>(1) verifica se o número da versão da ferramenta B<xz> "
+"é pelo menos 5.0.0. Este método é compatível com versões beta antigas, que "
+"não suportavam a opção B<--robot>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2798
+#, no-wrap
+msgid ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+msgstr ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2805
+msgid ""
+"Set a memory usage limit for decompression using B<XZ_OPT>, but if a limit "
+"has already been set, don't increase it:"
+msgstr ""
+"Definir um limite de uso de memória para descompactação usando B<XZ_OPT>, "
+"mas se um limite já tiver sido definido, não o aumentar:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2815
+#, no-wrap
+msgid ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+msgstr ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2825
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2833
+msgid ""
+"The CompCPU columns of the tables from the descriptions of the options "
+"B<-0> ... B<-9> and B<--extreme> are useful when customizing LZMA2 presets. "
+"Here are the relevant parts collected from those two tables:"
+msgstr ""
+"As colunas CompCPU das tabelas das descrições das opções B<-0> ... B<-9> e "
+"B<--extreme> são úteis ao personalizar as predefinições LZMA2. Aqui estão as "
+"partes relevantes coletadas dessas duas tabelas:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2858
+msgid ""
+"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:"
+msgstr ""
+"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 B<xz -8> faria, uma predefinição com um valor CompCPU "
+"baixo (por exemplo, 1) pode ser modificado para usar um dicionário maior:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2863
+#, no-wrap
+msgid "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+msgstr "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2879
+msgid ""
+"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."
+msgstr ""
+"Com certos arquivos, o comando acima pode ser mais rápido que B<xz -6> "
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2886
+msgid ""
+"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:"
+msgstr ""
+"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 B<xz -9> usaria:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2891
+#, no-wrap
+msgid "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+msgstr "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2904
+msgid ""
+"Using B<-vv> (B<--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."
+msgstr ""
+"Usar B<-vv> (B<--verbose --verbose>) 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2916
+msgid ""
+"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> (B<-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 B<--"
+"check=crc32>) using about 100\\ KiB of memory."
+msgstr ""
+"À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 "
+"B<-6e> (B<-6 --extreme>) como base e define o dicionário como apenas 64\\ "
+"KiB. O arquivo resultante pode ser descompactado com XZ Embedded (é por isso "
+"que existe B<--check=crc32>) usando cerca de 100\\ KiB de memória."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2921
+#, no-wrap
+msgid "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+msgstr "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2944
+msgid ""
+"If you want to squeeze out as many bytes as possible, adjusting the number "
+"of literal context bits (I<lc>) and number of position bits (I<pb>) can "
+"sometimes help. Adjusting the number of literal position bits (I<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 B<lc=4>):"
+msgstr ""
+"Se você deseja espremer o máximo de bytes possível, ajustar o número de bits "
+"de contexto literal (I<lc>) e o número de bits de posição (I<pb>) às vezes "
+"pode ajudar. Ajustar o número de bits de posição literal (I<lp>) também pode "
+"ajudar, mas geralmente I<lc> e I<pb> 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 B<xz -6e> (tente também sem B<lc=4>):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2949
+#, no-wrap
+msgid "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+msgstr "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2957
+msgid ""
+"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:"
+msgstr ""
+"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:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2962
+#, no-wrap
+msgid "CW<xz --x86 --lzma2 libfoo.so>\n"
+msgstr "CW<xz --x86 --lzma2 libfoo.so>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2976
+msgid ""
+"Note that the order of the filter options is significant. If B<--x86> is "
+"specified after B<--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."
+msgstr ""
+"Observe que a ordem das opções de filtro é significativa. Se B<--x86> for "
+"especificado após B<--lzma2>, B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2982
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2992
+msgid ""
+"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 B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to "
+"accommodate the three-byte alignment:"
+msgstr ""
+"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 B<dist=3>, e também é bom passar B<pb=0> para LZMA2 "
+"para acomodar o alinhamento de três bytes:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2997
+#, no-wrap
+msgid "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+msgstr "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3005
+msgid ""
+"If multiple images have been put into a single archive (for example, B<."
+"tar>), the Delta filter will work on that too as long as all images have the "
+"same number of bytes per pixel."
+msgstr ""
+"Se várias imagens foram colocadas em um único arquivo (por exemplo, B<."
+"tar>), o filtro Delta também funcionará, desde que todas as imagens tenham o "
+"mesmo número de bytes por pixel."
+
+#. type: SH
+#: ../src/xz/xz.1:3006 ../src/xzdec/xzdec.1:143 ../src/lzmainfo/lzmainfo.1:59
+#: ../src/scripts/xzdiff.1:65 ../src/scripts/xzgrep.1:106
+#: ../src/scripts/xzless.1:65 ../src/scripts/xzmore.1:51
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "VEJA TAMBÉM"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3015
+msgid ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+msgstr ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3017
+msgid "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+msgstr "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3019 ../src/xzdec/xzdec.1:146
+msgid "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+msgstr "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3020
+#, fuzzy
+#| msgid "LZMA SDK: E<lt>http://7-zip.org/sdk.htmlE<gt>"
+msgid "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+msgstr "LZMA SDK: E<lt>http://7-zip.org/sdk.htmlE<gt>"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "XZDEC"
+msgstr "XZDEC"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "2017-04-19"
+msgstr "2017-04-19"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:10
+msgid "xzdec, lzmadec - Small .xz and .lzma decompressors"
+msgstr "xzdec, lzmadec - Pequenos descompactadores .xz e .lzma"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:14
+msgid "B<xzdec> [I<option...>] [I<file...>]"
+msgstr "B<xzdec> [I<opção...>] [I<arquivo...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:18
+msgid "B<lzmadec> [I<option...>] [I<file...>]"
+msgstr "B<lzmadec> [I<opção...>] [I<arquivo...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:44
+msgid ""
+"B<xzdec> is a liblzma-based decompression-only tool for B<.xz> (and only B<."
+"xz>) files. B<xzdec> is intended to work as a drop-in replacement for "
+"B<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."
+msgstr ""
+"B<xzdec> é uma ferramenta de descompactação baseada em liblzma somente para "
+"arquivos B<.xz> (e somente B<.xz>). B<xzdec> destina-se a funcionar como um "
+"substituto para B<xz>(1) nas situações mais comuns em que um script foi "
+"escrito para usar B<xz --decompress --stdout> (e possivelmente alguns outras "
+"opções comumente usadas) para descompactar arquivos B<.xz>. B<lzmadec> é "
+"idêntico a B<xzdec> exceto que B<lzmadec> tem suporte a arquivos B<.lzma> em "
+"vez de arquivos B<.xz>."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:61
+msgid ""
+"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."
+msgstr ""
+"Para reduzir o tamanho do executável, B<xzdec> 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 "
+"B<XZ_DEFAULTS> e B<XZ_OPT>. B<xzdec> não tem suporte à exibição de "
+"informações de progresso intermediárias: enviar B<SIGINFO> para B<xzdec> não "
+"faz nada, mas enviar B<SIGUSR1> encerra o processo em vez de exibir "
+"informações de progresso."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:69
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> supports only decompression."
+msgstr ""
+"Ignorada para compatibilidade B<xz>(1). B<xzdec> tem suporte a apenas "
+"descompactação."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:76
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never creates or removes any "
+"files."
+msgstr ""
+"Ignorada para compatibilidade B<xz>(1). B<xzdec> nunca cria ou remove "
+"quaisquer arquivos."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:83
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> always writes the "
+"decompressed data to standard output."
+msgstr ""
+"Ignorada para compatibilidade B<xz>(1). B<xzdec> sempre grava os dados "
+"descompactados para a saída padrão."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:89
+msgid ""
+"Specifying this once does nothing since B<xzdec> never displays any warnings "
+"or notices. Specify this twice to suppress errors."
+msgstr ""
+"Especificar isso uma vez não faz nada, pois B<xzdec> nunca exibe nenhum "
+"aviso ou notificação. Especifique isso duas vezes para suprimir erros."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:96
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never uses the exit status 2."
+msgstr ""
+"Ignorada para compatibilidade B<xz>(1). B<xzdec> nunca usa o status de saída "
+"2."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:99
+msgid "Display a help message and exit successfully."
+msgstr "Exibe uma mensagem de ajuda e sai com sucesso."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:104
+msgid "Display the version number of B<xzdec> and liblzma."
+msgstr "Mostra o número da versão do B<xzdec> e liblzma."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:108
+msgid "All was good."
+msgstr "Correu tudo bem."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:117
+msgid ""
+"B<xzdec> doesn't have any warning messages like B<xz>(1) has, thus the exit "
+"status 2 is not used by B<xzdec>."
+msgstr ""
+"B<xzdec> não possui nenhuma mensagem de aviso como o B<xz>(1), portanto, o "
+"status de saída 2 não é usado por B<xzdec>."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:131
+msgid ""
+"Use B<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 B<xz>(1)."
+msgstr ""
+"Use B<xz>(1) em vez de B<xzdec> ou B<lzmadec> para uso diário normal. "
+"B<xzdec> ou B<lzmadec> destinam-se apenas a situações em que é importante "
+"ter um descompactador menor do que o B<xz>(1) completo."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:143
+msgid ""
+"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."
+msgstr ""
+"B<xzdec> e B<lzmadec> 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 B<.xz> realmente pequeno, considere usar o XZ "
+"Embedded."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:145 ../src/lzmainfo/lzmainfo.1:60
+msgid "B<xz>(1)"
+msgstr "B<xz>(1)"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7
+#, no-wrap
+msgid "LZMAINFO"
+msgstr "LZMAINFO"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "2013-06-30"
+msgstr "2013-06-30"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:10
+msgid "lzmainfo - show information stored in the .lzma file header"
+msgstr ""
+"lzmainfo - mostra informações armazenadas no cabeçalho do arquivo .lzma"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:15
+msgid "B<lzmainfo> [B<--help>] [B<--version>] [I<file...>]"
+msgstr "B<lzmainfo> [B<--help>] [B<--version>] [I<arquivo...>]"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:31
+msgid ""
+"B<lzmainfo> shows information stored in the B<.lzma> file header. It reads "
+"the first 13 bytes from the specified I<file>, decodes the header, and "
+"prints it to standard output in human readable format. If no I<files> are "
+"given or I<file> is B<->, standard input is read."
+msgstr ""
+"B<lzmainfo> mostra as informações armazenadas no cabeçalho do arquivo B<."
+"lzma>. Ele lê os primeiros 13 bytes do I<arquivo> especificado, decodifica o "
+"cabeçalho e o imprime na saída padrão em formato legível por humanos. Se "
+"nenhum I<arquivo> for fornecido ou I<arquivo> for B<->, a entrada padrão "
+"será lida."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:40
+msgid ""
+"Usually the most interesting information is the uncompressed size and the "
+"dictionary size. Uncompressed size can be shown only if the file is in the "
+"non-streamed B<.lzma> format variant. The amount of memory required to "
+"decompress the file is a few dozen kilobytes plus the dictionary size."
+msgstr ""
+"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 B<.lzma> 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."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:44
+msgid ""
+"B<lzmainfo> is included in XZ Utils primarily for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"B<lzmainfo> está incluído no XZ Utils principalmente para compatibilidade "
+"com versões anteriores do LZMA Utils."
+
+#. type: SH
+#: ../src/lzmainfo/lzmainfo.1:51 ../src/scripts/xzdiff.1:74
+#, no-wrap
+msgid "BUGS"
+msgstr "BUGS"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:59
+msgid ""
+"B<lzmainfo> uses B<MB> while the correct suffix would be B<MiB> (2^20 "
+"bytes). This is to keep the output compatible with LZMA Utils."
+msgstr ""
+"B<lzmainfo> usa B<MB> enquanto o sufixo correto seria B<MiB> (2^20 bytes). "
+"Isso é para manter a saída compatível com LZMA Utils."
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "XZDIFF"
+msgstr "XZDIFF"
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "2021-06-04"
+msgstr "2021-06-04"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:12
+msgid "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files"
+msgstr "xzcmp, xzdiff, lzcmp, lzdiff - compara arquivos compactados"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:15
+msgid "B<xzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<xzcmp> [I<opções_cmd>] I<arquivo1> [I<arquivo2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:18
+msgid "B<xzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<xzdiff> [I<opções_diff>] I<arquivo1> [I<arquivo2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:21
+msgid "B<lzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<lzcmp> [I<opções_cmp>] I<arquivo1> [I<arquivo2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:24
+msgid "B<lzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<lzdiff> [I<opções_diff>] I<arquivo1> [I<arquivo2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:59
+msgid ""
+"B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files compressed "
+"with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), or "
+"B<zstd>(1). All options specified are passed directly to B<cmp>(1) or "
+"B<diff>(1). If only one file is specified, then the files compared are "
+"I<file1> (which must have a suffix of a supported compression format) and "
+"I<file1> from which the compression format suffix has been stripped. If two "
+"files are specified, then they are uncompressed if necessary and fed to "
+"B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or B<diff>(1) is "
+"preserved unless a decompression error occurs; then exit status is 2."
+msgstr ""
+"B<xzcmp> e B<xzdiff> invocam B<cmp>(1) ou B<diff>(1) em arquivos compactados "
+"com B<xz>(1), B<lzma>(1), B<gzip>( 1), B<bzip2>(1), B<lzop>(1) ou "
+"B<zstd>(1). Todas as opções especificadas são passadas diretamente para "
+"B<cmp>(1) ou B<diff>(1). Se apenas um arquivo for especificado, os arquivos "
+"comparados serão I<arquivo1> (que deve ter um sufixo de um formato de "
+"compactação compatível) e I<arquivo1> do qual o sufixo do formato de "
+"compactação foi removido. Se dois arquivos forem especificados, eles serão "
+"descompactados, se necessário, e enviados para B<cmp>(1) ou B<diff>(1). O "
+"status de saída de B<cmp>(1) ou B<diff>(1) é preservado, a menos que ocorra "
+"um erro de descompactação; então o status de saída é 2."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:65
+msgid ""
+"The names B<lzcmp> and B<lzdiff> are provided for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"Os nomes B<lzcmp> e B<lzdiff> são fornecidos para compatibilidade com "
+"versões anteriores do LZMA Utils."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:74
+msgid ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+msgstr ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:79
+msgid ""
+"Messages from the B<cmp>(1) or B<diff>(1) programs refer to temporary "
+"filenames instead of those specified."
+msgstr ""
+"As mensagens dos programas B<cmp>(1) ou B<diff>(1) referem-se a nomes de "
+"arquivos temporários em vez daqueles especificados."
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "XZGREP"
+msgstr "XZGREP"
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "2022-07-19"
+msgstr "2022-07-19"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:12
+msgid "xzgrep - search compressed files for a regular expression"
+msgstr "xzgrep - pesquisa arquivos compactados para uma expressão regular"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:18
+msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> [I<file...>]"
+msgstr "B<xzgrep> [I<opções_grep>] [B<-e>] I<padrão> [I<arquivo...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:21
+msgid "B<xzegrep> \\&..."
+msgstr "B<xzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:24
+msgid "B<xzfgrep> \\&..."
+msgstr "B<xzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:27
+msgid "B<lzgrep> \\&..."
+msgstr "B<lzgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:30
+msgid "B<lzegrep> \\&..."
+msgstr "B<lzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:33
+msgid "B<lzfgrep> \\&..."
+msgstr "B<lzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:49
+msgid ""
+"B<xzgrep> invokes B<grep>(1) on I<files> which may be either uncompressed "
+"or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), or B<zstd>(1). All options specified are passed directly to "
+"B<grep>(1)."
+msgstr ""
+"B<xzgrep> invoca B<grep>(1) em I<arquivos> que podem ser descompactados ou "
+"compactados com B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"ou B<zstd>(1). Todas as opções especificadas são passadas diretamente para "
+"B<grep>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:62
+msgid ""
+"If no I<file> is specified, then standard input is decompressed if necessary "
+"and fed to B<grep>(1). When reading from standard input, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), and B<zstd>(1) compressed files are not supported."
+msgstr ""
+"Se nenhum I<arquivo> for especificado, a entrada padrão será descompactada, "
+"se necessário, e enviada para B<grep>(1). Ao ler da entrada padrão, os "
+"arquivos compactados B<gzip>(1), B<bzip2>(1), B<lzop>(1) e B<zstd>(1) não "
+"são suportados."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:81
+msgid ""
+"If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<grep -E> or "
+"B<grep -F> is used instead of B<grep>(1). The same applies to names "
+"B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+"compatibility with LZMA Utils."
+msgstr ""
+"Se B<xzgrep> for chamado como B<xzegrep> ou B<xzfgrep>, então B<grep -E> ou "
+"B<grep -F> será usado em vez de B<grep>(1). O mesmo se aplica aos nomes "
+"B<lzgrep>, B<lzegrep> e B<lzfgrep>, que são fornecidos para compatibilidade "
+"com versões anteriores do LZMA Utils."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:86
+msgid ""
+"At least one match was found from at least one of the input files. No "
+"errors occurred."
+msgstr ""
+"Pelo menos uma correspondência foi encontrada em pelo menos um dos arquivos "
+"de entrada. Nenhum erro ocorreu."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:90
+msgid "No matches were found from any of the input files. No errors occurred."
+msgstr ""
+"Nenhuma correspondência foi encontrada em nenhum dos arquivos de entrada. "
+"Nenhum erro ocorreu."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:90
+#, no-wrap
+msgid "E<gt>1"
+msgstr "E<gt>1"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:94
+msgid "One or more errors occurred. It is unknown if matches were found."
+msgstr ""
+"Ocorreu um ou mais erros. Não se sabe se foram encontradas correspondências."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:95
+#, no-wrap
+msgid "B<GREP>"
+msgstr "B<GREP>"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:106
+msgid ""
+"If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+"B<grep>(1), B<grep -E>, or B<grep -F>."
+msgstr ""
+"Se a variável de ambiente B<GREP> for definida, B<xzgrep> a usará em vez de "
+"B<grep>(1), B<grep -E> ou B<grep -F>."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:113
+msgid ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+msgstr ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "XZLESS"
+msgstr "XZLESS"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "2010-09-27"
+msgstr "2010-09-27"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:13
+msgid "xzless, lzless - view xz or lzma compressed (text) files"
+msgstr "xzless, lzless - visualiza arquivos (texto) compactados em xz ou lzma"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:16
+msgid "B<xzless> [I<file>...]"
+msgstr "B<xzless> [I<arquivo>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:19
+msgid "B<lzless> [I<file>...]"
+msgstr "B<lzless> [I<arquivo>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:31
+msgid ""
+"B<xzless> is a filter that displays text from compressed files to a "
+"terminal. It works on files compressed with B<xz>(1) or B<lzma>(1). If no "
+"I<files> are given, B<xzless> reads from standard input."
+msgstr ""
+"B<xzless> é um filtro que exibe texto de arquivos compactados em um "
+"terminal. Ele funciona em arquivos compactados com B<xz>(1) ou B<lzma>(1). "
+"Se nenhum I<files> for fornecido, B<xzless> lê da entrada padrão."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:48
+msgid ""
+"B<xzless> uses B<less>(1) to present its output. Unlike B<xzmore>, its "
+"choice of pager cannot be altered by setting an environment variable. "
+"Commands are based on both B<more>(1) and B<vi>(1) and allow back and "
+"forth movement and searching. See the B<less>(1) manual for more "
+"information."
+msgstr ""
+"B<xzless> usa B<less>(1) para apresentar sua saída. Ao contrário de "
+"B<xzmore>, sua escolha de pager não pode ser alterada pela configuração de "
+"uma variável de ambiente. Os comandos são baseados em B<more>(1) e B<vi>(1) "
+"e permitem movimento e busca para frente e para trás. Consulte o manual "
+"B<less>(1) para obter mais informações."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:52
+msgid ""
+"The command named B<lzless> is provided for backward compatibility with LZMA "
+"Utils."
+msgstr ""
+"O comando denominado B<lzless> é fornecido para compatibilidade com versões "
+"anteriores do LZMA Utils."
+
+#. type: TP
+#: ../src/scripts/xzless.1:53
+#, no-wrap
+msgid "B<LESSMETACHARS>"
+msgstr "B<LESSMETACHARS>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:59
+msgid ""
+"A list of characters special to the shell. Set by B<xzless> unless it is "
+"already set in the environment."
+msgstr ""
+"Uma lista de caracteres especiais para o shell. Definido por B<xzless> a "
+"menos que já esteja definido no ambiente."
+
+#. type: TP
+#: ../src/scripts/xzless.1:59
+#, no-wrap
+msgid "B<LESSOPEN>"
+msgstr "B<LESSOPEN>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:65
+msgid ""
+"Set to a command line to invoke the B<xz>(1) decompressor for preprocessing "
+"the input files to B<less>(1)."
+msgstr ""
+"Defina como uma linha de comando para invocar o descompactador B<xz>(1) para "
+"pré-processar os arquivos de entrada para B<less>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:69
+msgid "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+msgstr "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+
+#. type: TH
+#: ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZMORE"
+msgstr "XZMORE"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:10
+msgid "xzmore, lzmore - view xz or lzma compressed (text) files"
+msgstr "xzmore, lzmore - visualiza arquivos (texto) compactados em xz ou lzma"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:13
+msgid "B<xzmore> [I<file...>]"
+msgstr "B<xzmore> [I<arquivo...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:16
+msgid "B<lzmore> [I<file...>]"
+msgstr "B<lzmore> [I<arquivo...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:24
+msgid ""
+"B<xzmore> is a filter which allows examination of B<xz>(1) or B<lzma>(1) "
+"compressed text files one screenful at a time on a soft-copy terminal."
+msgstr ""
+"B<xzmore> é um filtro que permite o exame de arquivos de texto compactados "
+"B<xz>(1) ou B<lzma>(1) uma tela por vez em um terminal de cópia eletrônica."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:33
+msgid ""
+"To use a pager other than the default B<more,> set environment variable "
+"B<PAGER> to the name of the desired program. The name B<lzmore> is provided "
+"for backward compatibility with LZMA Utils."
+msgstr ""
+"Para usar um pager diferente do padrão B<more,> defina a variável de "
+"ambiente B<PAGER> para o nome do programa desejado. O nome B<lzmore> é "
+"fornecido para compatibilidade com versões anteriores do LZMA Utils."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:33
+#, no-wrap
+msgid "B<e> or B<q>"
+msgstr "B<e> ou B<q>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:40
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to exit."
+msgstr ""
+"Quando o prompt --More--(Next file: I<arquivo>) é impresso, esse comando faz "
+"com que B<xzmore> saia."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:40
+#, no-wrap
+msgid "B<s>"
+msgstr "B<s>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:47
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to skip the next file and continue."
+msgstr ""
+"Quando o prompt --More--(Next file: I<arquivo>) é impresso, esse comando faz "
+"com que B<xzmore> pule o próximo arquivo e continue."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:51
+msgid ""
+"For list of keyboard commands supported while actually viewing the content "
+"of a file, refer to manual of the pager you use, usually B<more>(1)."
+msgstr ""
+"Para obter uma lista de comandos de teclado suportados durante a exibição "
+"real do conteúdo de um arquivo, consulte o manual do paginador que você usa, "
+"geralmente B<more>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:55
+msgid "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+msgstr "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+
+#, no-wrap
+#~ msgid "2022-12-01"
+#~ msgstr "2022-12-01"
diff --git a/po4a/ro.po b/po4a/ro.po
new file mode 100644
index 0000000..3048997
--- /dev/null
+++ b/po4a/ro.po
@@ -0,0 +1,5838 @@
+# Mesajele în limba română pentru pachetul xz-man.
+# This file is put in the public domain.
+#
+# Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>, 2022 - 2023.
+#
+# 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 Y, făcută de X, Z(luna-anul).
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-man 5.4.4-pre1\n"
+"POT-Creation-Date: 2023-11-01 20:27+0800\n"
+"PO-Revision-Date: 2023-07-19 19:29+0200\n"
+"Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
+"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
+"Language: ro\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: plural=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
+"20)) ? 1 : 2);\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"X-Generator: Poedit 3.2.2\n"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "XZ"
+msgstr "XZ"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "2023-07-17"
+msgstr "17.07.2023"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "Tukaani"
+msgstr "Tukaani"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZ Utils"
+msgstr "Utilități XZ"
+
+#. type: SH
+#: ../src/xz/xz.1:11 ../src/xzdec/xzdec.1:8 ../src/lzmainfo/lzmainfo.1:8
+#: ../src/scripts/xzdiff.1:10 ../src/scripts/xzgrep.1:10
+#: ../src/scripts/xzless.1:11 ../src/scripts/xzmore.1:8
+#, no-wrap
+msgid "NAME"
+msgstr "NUME"
+
+#. type: Plain text
+#: ../src/xz/xz.1:13
+msgid ""
+"xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma "
+"files"
+msgstr ""
+"xz, unxz, xzcat, lzma, unlzma, lzcat - Comprimă sau decomprimă fișiere .xz "
+"și .lzma"
+
+#. type: SH
+#: ../src/xz/xz.1:14 ../src/xzdec/xzdec.1:10 ../src/lzmainfo/lzmainfo.1:10
+#: ../src/scripts/xzdiff.1:12 ../src/scripts/xzgrep.1:12
+#: ../src/scripts/xzless.1:13 ../src/scripts/xzmore.1:10
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr "REZUMAT"
+
+#. type: Plain text
+#: ../src/xz/xz.1:18
+msgid "B<xz> [I<option...>] [I<file...>]"
+msgstr "B<xz> [I<opțiune...>] [I<fișier...>]"
+
+#. type: SH
+#: ../src/xz/xz.1:19
+#, no-wrap
+msgid "COMMAND ALIASES"
+msgstr "ALIAS COMENZI"
+
+#. type: Plain text
+#: ../src/xz/xz.1:23
+msgid "B<unxz> is equivalent to B<xz --decompress>."
+msgstr "B<unxz> este echivalent cu B<xz --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:27
+msgid "B<xzcat> is equivalent to B<xz --decompress --stdout>."
+msgstr "B<xzcat> este echivalent cu B<xz --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:31
+msgid "B<lzma> is equivalent to B<xz --format=lzma>."
+msgstr "B<lzma> este echivalent cu B<xz --format=lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:35
+msgid "B<unlzma> is equivalent to B<xz --format=lzma --decompress>."
+msgstr "B<unlzma> este echivalent cu B<xz --format=lzma --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:39
+msgid "B<lzcat> is equivalent to B<xz --format=lzma --decompress --stdout>."
+msgstr "B<lzcat> este echivalent cu B<xz --format=lzma --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:51
+msgid ""
+"When writing scripts that need to decompress files, it is recommended to "
+"always use the name B<xz> with appropriate arguments (B<xz -d> or B<xz -"
+"dc>) instead of the names B<unxz> and B<xzcat>."
+msgstr ""
+"Când scrieți scripturi care trebuie să decomprime fișiere, este recomandat "
+"să folosiți întotdeauna comanda B<xz> cu argumentele adecvate (B<xz -d> sau "
+"B<xz -dc>) în loc de comenzile B<unxz> și B<xzcat>."
+
+#. type: SH
+#: ../src/xz/xz.1:52 ../src/xzdec/xzdec.1:18 ../src/lzmainfo/lzmainfo.1:15
+#: ../src/scripts/xzdiff.1:24 ../src/scripts/xzgrep.1:33
+#: ../src/scripts/xzless.1:19 ../src/scripts/xzmore.1:16
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "DESCRIERE"
+
+#. type: Plain text
+#: ../src/xz/xz.1:71
+msgid ""
+"B<xz> is a general-purpose data compression tool with command line syntax "
+"similar to B<gzip>(1) and B<bzip2>(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<lzip> is supported."
+msgstr ""
+"B<xz> este un instrument de comprimare a datelor de uz general cu sintaxă de "
+"linie de comandă similară cu B<gzip>(1) și B<bzip2>(1). Formatul de fișier "
+"nativ este formatul B<.xz>, dar formatul vechi B<.lzma> folosit de LZMA "
+"Utils și fluxurile comprimate brute fără anteturi de format container sunt "
+"de asemenea acceptate. În plus, este acceptată decomprimarea formatului B<."
+"lz> folosit de B<lzip>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:93
+msgid ""
+"B<xz> compresses or decompresses each I<file> according to the selected "
+"operation mode. If no I<files> are given or I<file> is B<->, B<xz> reads "
+"from standard input and writes the processed data to standard output. B<xz> "
+"will refuse (display an error and skip the I<file>) to write compressed "
+"data to standard output if it is a terminal. Similarly, B<xz> will refuse "
+"to read compressed data from standard input if it is a terminal."
+msgstr ""
+"B<xz> comprimă sau decomprimă fiecare I<fișier> în funcție de modul de "
+"operare selectat. Dacă nu sunt date I<fișiere> sau I<fișier> este B<->, "
+"B<xz> citește de la intrarea standard și scrie datele procesate la ieșirea "
+"standard. B<xz> va refuza (afișează o eroare și omite I<fișier>) să scrie "
+"date comprimate la ieșirea standard dacă este un terminal. În mod similar, "
+"B<xz> va refuza să citească datele comprimate de la intrarea standard dacă "
+"este un terminal."
+
+#. type: Plain text
+#: ../src/xz/xz.1:103
+msgid ""
+"Unless B<--stdout> is specified, I<files> other than B<-> are written to a "
+"new file whose name is derived from the source I<file> name:"
+msgstr ""
+"Cu excepția cazului în care este specificată opțiunea B<--stdout>, "
+"I<fișierele> altele decât B<-> sunt scrise într-un fișier nou al cărui nume "
+"este derivat din numele I<fișierului> sursă:"
+
+#. type: IP
+#: ../src/xz/xz.1:103 ../src/xz/xz.1:109 ../src/xz/xz.1:134 ../src/xz/xz.1:139
+#: ../src/xz/xz.1:142 ../src/xz/xz.1:145 ../src/xz/xz.1:161 ../src/xz/xz.1:422
+#: ../src/xz/xz.1:425 ../src/xz/xz.1:432 ../src/xz/xz.1:677 ../src/xz/xz.1:679
+#: ../src/xz/xz.1:778 ../src/xz/xz.1:789 ../src/xz/xz.1:798 ../src/xz/xz.1:806
+#: ../src/xz/xz.1:1034 ../src/xz/xz.1:1043 ../src/xz/xz.1:1055
+#: ../src/xz/xz.1:1729 ../src/xz/xz.1:1735 ../src/xz/xz.1:1853
+#: ../src/xz/xz.1:1857 ../src/xz/xz.1:1860 ../src/xz/xz.1:1863
+#: ../src/xz/xz.1:1867 ../src/xz/xz.1:1874 ../src/xz/xz.1:1876
+#, no-wrap
+msgid "\\(bu"
+msgstr "\\(bu"
+
+#. type: Plain text
+#: ../src/xz/xz.1:109
+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 ""
+"La comprimare, sufixul formatului de fișier țintă (B<.xz> sau B<.lzma>) "
+"este atașat la numele fișierului sursă pentru a se obține numele fișierului "
+"țintă."
+
+#. type: Plain text
+#: ../src/xz/xz.1:124
+msgid ""
+"When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from "
+"the filename to get the target filename. B<xz> also recognizes the suffixes "
+"B<.txz> and B<.tlz>, and replaces them with the B<.tar> suffix."
+msgstr ""
+"La decomprimare, sufixul B<.xz>, B<.lzma> sau B<.lz> este eliminat din "
+"numele fișierului pentru a se obține numele fișierului țintă. B<xz> "
+"recunoaște și sufixele B<.txz> și B<.tlz> și le înlocuiește cu sufixul B<."
+"tar>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:128
+msgid ""
+"If the target file already exists, an error is displayed and the I<file> is "
+"skipped."
+msgstr ""
+"Dacă fișierul țintă există deja, este afișată o eroare și I<fișier> este "
+"omis."
+
+#. type: Plain text
+#: ../src/xz/xz.1:134
+msgid ""
+"Unless writing to standard output, B<xz> will display a warning and skip the "
+"I<file> if any of the following applies:"
+msgstr ""
+"Cu excepția cazului în care scrie la ieșirea standard, B<xz> va afișa un "
+"avertisment și va omite I<fișier>ul dacă se aplică oricare dintre "
+"următoarele:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:139
+msgid ""
+"I<File> is not a regular file. Symbolic links are not followed, and thus "
+"they are not considered to be regular files."
+msgstr ""
+"I<Fișierul> nu este un fișier obișnuit. Legăturile simbolice nu sunt urmate "
+"și, prin urmare, nu sunt considerate fișiere obișnuite."
+
+#. type: Plain text
+#: ../src/xz/xz.1:142
+msgid "I<File> has more than one hard link."
+msgstr "I<Fișierul> are mai mult de o legătură dură."
+
+#. type: Plain text
+#: ../src/xz/xz.1:145
+msgid "I<File> has setuid, setgid, or sticky bit set."
+msgstr ""
+"I<Fișierul> are activat bitul «setuid», «setgid» sau cel lipicios(sticky)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:161
+msgid ""
+"The operation mode is set to compress and the I<file> 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 ""
+"Modul de operare este stabilit la comprimare și I<fișier> are deja un sufix "
+"al formatului de fișier țintă (B<.xz> sau B<.txz> când se comprimă în "
+"formatul B<.xz> și B<.lzma> sau B<.tlz> când se comprimă în formatul B<."
+"lzma>)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:171
+msgid ""
+"The operation mode is set to decompress and the I<file> doesn't have a "
+"suffix of any of the supported file formats (B<.xz>, B<.txz>, B<.lzma>, B<."
+"tlz>, or B<.lz>)."
+msgstr ""
+"Modul de operare este stabilit la decomprimare și I<fișierul> nu are un "
+"sufix al niciunui format de fișier acceptat (B<.xz>, B<.txz>, B<.lzma>, B<."
+"tlz>, sau B<.lz>)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:186
+msgid ""
+"After successfully compressing or decompressing the I<file>, B<xz> copies "
+"the owner, group, permissions, access time, and modification time from the "
+"source I<file> 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<file>. B<xz> "
+"doesn't support copying other metadata like access control lists or extended "
+"attributes yet."
+msgstr ""
+"După comprimarea sau decomprimarea cu succes a I<fișierului>, B<xz> copiază "
+"proprietarul, grupul, permisiunile, timpul de acces și timpul de modificare "
+"din I<fișierul> 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 I<fișierul> "
+"sursă. B<xz> nu acceptă încă copierea altor metadate, cum ar fi listele de "
+"control al accesului sau atributele extinse."
+
+#. type: Plain text
+#: ../src/xz/xz.1:196
+msgid ""
+"Once the target file has been successfully closed, the source I<file> is "
+"removed unless B<--keep> was specified. The source I<file> is never removed "
+"if the output is written to standard output or if an error occurs."
+msgstr ""
+"Odată ce fișierul țintă a fost închis cu succes, I<fișierul> sursă este "
+"eliminat dacă nu a fost specificată opțiunea B<--keep>. I<Fișierul> sursă "
+"nu este niciodată eliminat dacă rezultatul este scris la ieșirea standard "
+"sau dacă apare o eroare."
+
+#. type: Plain text
+#: ../src/xz/xz.1:208
+msgid ""
+"Sending B<SIGINFO> or B<SIGUSR1> to the B<xz> 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 ""
+"Trimiterea unui semnal B<SIGINFO> sau B<SIGUSR1> către procesul B<xz> 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 B<--verbose> "
+"va afișa un indicator de progres de actualizare automată."
+
+#. type: SS
+#: ../src/xz/xz.1:209
+#, no-wrap
+msgid "Memory usage"
+msgstr "Utilizarea memoriei"
+
+# R-GC, scrie:
+# nu am respectat forma de-a scrie procentele,
+# ale autorilor: „5\ % to 20\ %”; pentru că noi
+# folosim forma: „5\% la 20\%”; adică, ceea ce
+# va vedea utilizatorul la afișarea acestui mesaj,
+# va fi: „5% la 20%”, și nu: „5 % la 20 %”
+#. type: Plain text
+#: ../src/xz/xz.1:225
+msgid ""
+"The memory usage of B<xz> 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<xz -9> currently requires 65\\ MiB of "
+"memory. Still, it is possible to have B<.xz> files that require several "
+"gigabytes of memory to decompress."
+msgstr ""
+"Cantitatea de memorie utilizată de B<xz> 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 B<xz -9> necesită în prezent 65Mio de "
+"memorie. Totuși, este posibil să aveți fișiere B<.xz> care necesită câțiva "
+"gigaocteți de memorie pentru decomprimare."
+
+#. type: Plain text
+#: ../src/xz/xz.1:237
+msgid ""
+"Especially users of older systems may find the possibility of very large "
+"memory usage annoying. To prevent uncomfortable surprises, B<xz> 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<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(2))."
+msgstr ""
+"În special utilizatorii de sisteme mai vechi pot considera deranjantă "
+"posibilitatea unei utilizări foarte mari a memoriei. Pentru a preveni "
+"surprizele neplăcute, B<xz> 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 B<ulimit>(1) pentru a limita memoria virtuală tinde să paralizeze "
+"B<mmap>(2))."
+
+#. type: Plain text
+#: ../src/xz/xz.1:259
+msgid ""
+"The memory usage limiter can be enabled with the command line option B<--"
+"memlimit=>I<limit>. Often it is more convenient to enable the limiter by "
+"default by setting the environment variable B<XZ_DEFAULTS>, for example, "
+"B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+"separately for compression and decompression by using B<--memlimit-"
+"compress=>I<limit> and B<--memlimit-decompress=>I<limit>. Using these two "
+"options outside B<XZ_DEFAULTS> is rarely useful because a single run of "
+"B<xz> cannot do both compression and decompression and B<--"
+"memlimit=>I<limit> (or B<-M> I<limit>) is shorter to type on the command "
+"line."
+msgstr ""
+"Limitatorul de utilizare a memoriei poate fi activat cu opțiunea din linia "
+"de comandă B<--memlimit=>I<limita>. Adesea este mai convenabil să activați "
+"limitatorul în mod implicit prin definirea variabilei de mediu "
+"B<XZ_DEFAULTS>, de exemplu, B<XZ_DEFAULTS=--memlimit=150MiB>. Este posibil "
+"să stabiliți limitele separat pentru comprimare și decomprimare folosind B<--"
+"memlimit-compress=>I<limita> și B<--memlimit-decompress=>I<limita>. "
+"Utilizarea acestor două opțiuni în afara B<XZ_DEFAULTS> este foarte rar "
+"utilă, deoarece o singură rulare a B<xz> nu poate face atât comprimarea, cât "
+"și decomprimarea și B<--memlimit=>I<limita> (sau B<-M> I<limita> ) este mai "
+"scurt de tastat pe linia de comandă."
+
+#. type: Plain text
+#: ../src/xz/xz.1:278
+msgid ""
+"If the specified memory usage limit is exceeded when decompressing, B<xz> "
+"will display an error and decompressing the file will fail. If the limit is "
+"exceeded when compressing, B<xz> 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<xz -9>, the settings will be scaled down only "
+"a little, not all the way down to B<xz -8>."
+msgstr ""
+"Dacă limita de utilizare a memoriei specificată este depășită la "
+"decomprimare, B<xz> va afișa o eroare și decomprimarea fișierului va eșua. "
+"Dacă limita este depășită la comprimare, B<xz> 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 B<--format=raw> sau B<--no-adjust>). Î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 B<xz -9>, valorile "
+"stabilite vor fi reduse doar puțin , nu până la valoarea prestabilită a lui "
+"B<xz -8>."
+
+#. type: SS
+#: ../src/xz/xz.1:279
+#, no-wrap
+msgid "Concatenation and padding with .xz files"
+msgstr "Concatenare și completare (prin umplere cu octeți nuli) cu fișiere .xz"
+
+#. type: Plain text
+#: ../src/xz/xz.1:287
+msgid ""
+"It is possible to concatenate B<.xz> files as is. B<xz> will decompress "
+"such files as if they were a single B<.xz> file."
+msgstr ""
+"Este posibil să concatenați fișierele B<.xz> așa cum sunt. B<xz> va "
+"decomprima astfel de fișiere ca și cum ar fi un singur fișier B<.xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:296
+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 ""
+"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 B<.xz> este stocat pe un "
+"mediu care măsoară dimensiunile fișierelor în blocuri de 512 de octeți."
+
+#. type: Plain text
+#: ../src/xz/xz.1:300
+msgid ""
+"Concatenation and padding are not allowed with B<.lzma> files or raw streams."
+msgstr ""
+"Concatenarea și completarea nu sunt permise cu fișierele B<.lzma> sau "
+"fluxurile brute."
+
+#. type: SH
+#: ../src/xz/xz.1:301 ../src/xzdec/xzdec.1:61
+#, no-wrap
+msgid "OPTIONS"
+msgstr "OPȚIUNI"
+
+#. type: SS
+#: ../src/xz/xz.1:303
+#, no-wrap
+msgid "Integer suffixes and special values"
+msgstr "Sufixe de numere întregi și valori speciale"
+
+#. type: Plain text
+#: ../src/xz/xz.1:307
+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 ""
+"Î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."
+
+#. type: TP
+#: ../src/xz/xz.1:307
+#, no-wrap
+msgid "B<KiB>"
+msgstr "B<KiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:318
+msgid ""
+"Multiply the integer by 1,024 (2^10). B<Ki>, B<k>, B<kB>, B<K>, and B<KB> "
+"are accepted as synonyms for B<KiB>."
+msgstr ""
+"Înmulțește numărul întreg cu 1.024 (2^10). B<Ki>, B<k>, B<kB>, B<K> și "
+"B<KB> sunt acceptate ca sinonime pentru B<KiB>."
+
+#. type: TP
+#: ../src/xz/xz.1:318
+#, no-wrap
+msgid "B<MiB>"
+msgstr "B<MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:328
+msgid ""
+"Multiply the integer by 1,048,576 (2^20). B<Mi>, B<m>, B<M>, and B<MB> are "
+"accepted as synonyms for B<MiB>."
+msgstr ""
+"Înmulțește numărul întreg cu 1,048,576 (2^20). B<Mi>, B<m>, B<M>, și B<MB> "
+"sunt acceptate ca sinonime pentru B<MiB>."
+
+#. type: TP
+#: ../src/xz/xz.1:328
+#, no-wrap
+msgid "B<GiB>"
+msgstr "B<GiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:338
+msgid ""
+"Multiply the integer by 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, and B<GB> "
+"are accepted as synonyms for B<GiB>."
+msgstr ""
+"Înmulțește numărul întreg cu 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, și "
+"B<GB> sunt acceptate ca sinonime pentru B<GiB>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:343
+msgid ""
+"The special value B<max> can be used to indicate the maximum integer value "
+"supported by the option."
+msgstr ""
+"Valoarea specială B<max> poate fi utilizată pentru a indica valoarea maximă "
+"întreagă suportată de opțiune."
+
+#. type: SS
+#: ../src/xz/xz.1:344
+#, no-wrap
+msgid "Operation mode"
+msgstr "Mod de operare"
+
+#. type: Plain text
+#: ../src/xz/xz.1:347
+msgid ""
+"If multiple operation mode options are given, the last one takes effect."
+msgstr ""
+"Dacă sunt date mai multe opțiuni de mod de funcționare, ultima dintre ele, "
+"este cea care va avea efect."
+
+#. type: TP
+#: ../src/xz/xz.1:347
+#, no-wrap
+msgid "B<-z>, B<--compress>"
+msgstr "B<-z>, B<--compress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:356
+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<unxz> implies B<--decompress>)."
+msgstr ""
+"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, B<unxz> implică "
+"B<--decompress>)."
+
+#. type: TP
+#: ../src/xz/xz.1:356 ../src/xzdec/xzdec.1:62
+#, no-wrap
+msgid "B<-d>, B<--decompress>, B<--uncompress>"
+msgstr "B<-d>, B<--decompress>, B<--uncompress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:359
+msgid "Decompress."
+msgstr "Decomprimare."
+
+#. type: TP
+#: ../src/xz/xz.1:359
+#, no-wrap
+msgid "B<-t>, B<--test>"
+msgstr "B<-t>, B<--test>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:368
+msgid ""
+"Test the integrity of compressed I<files>. 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 ""
+"Testează integritatea I<fișierelor> comprimate. Această opțiune este "
+"echivalentă cu B<--decompress --stdout> 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."
+
+#. type: TP
+#: ../src/xz/xz.1:368
+#, no-wrap
+msgid "B<-l>, B<--list>"
+msgstr "B<-l>, B<--list>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:377
+msgid ""
+"Print information about compressed I<files>. 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 ""
+"Afișează informații despre I<fișiere> 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 căutate."
+
+#. type: Plain text
+#: ../src/xz/xz.1:392
+msgid ""
+"The default listing shows basic information about I<files>, 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<less\\ -S> may be convenient if the terminal isn't wide enough."
+msgstr ""
+"Listarea implicită arată informații de bază despre I<fișiere>, câte un "
+"fișier pe linie. Pentru a obține informații mai detaliate, utilizați și "
+"opțiunea B<--verbose>. Pentru și mai multe informații, utilizați opțiunea "
+"B<--verbose> 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, B<less\\ -S> poate fi convenabilă "
+"dacă terminalul nu este suficient de lat."
+
+#. type: Plain text
+#: ../src/xz/xz.1:399
+msgid ""
+"The exact output may vary between B<xz> versions and different locales. For "
+"machine-readable output, B<--robot --list> should be used."
+msgstr ""
+"Ieșirea exactă poate varia între versiunile B<xz> și diferitele "
+"localizări(configurările regionale). Pentru ieșiri care pot fi citite de "
+"mașină, ar trebui utilizată opțiunea B<--robot --list>."
+
+#. type: SS
+#: ../src/xz/xz.1:400
+#, no-wrap
+msgid "Operation modifiers"
+msgstr "Modificatori de operare"
+
+#. type: TP
+#: ../src/xz/xz.1:401 ../src/xzdec/xzdec.1:69
+#, no-wrap
+msgid "B<-k>, B<--keep>"
+msgstr "B<-k>, B<--keep>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:404
+msgid "Don't delete the input files."
+msgstr "Nu șterge fișierele de intrare."
+
+#. type: Plain text
+#: ../src/xz/xz.1:418
+msgid ""
+"Since B<xz> 5.2.6, this option also makes B<xz> 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 ""
+"Începând cu B<xz> 5.2.6, această opțiune face ca B<xz> 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 B<--force>."
+
+#. type: TP
+#: ../src/xz/xz.1:418
+#, no-wrap
+msgid "B<-f>, B<--force>"
+msgstr "B<-f>, B<--force>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:421
+msgid "This option has several effects:"
+msgstr "Această opțiune are mai multe efecte:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:425
+msgid ""
+"If the target file already exists, delete it before compressing or "
+"decompressing."
+msgstr ""
+"Dacă fișierul țintă există deja, îl șterge înainte de comprimare sau "
+"decomprimare."
+
+#. type: Plain text
+#: ../src/xz/xz.1:432
+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 ""
+"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ă."
+
+#. type: Plain text
+#: ../src/xz/xz.1:457
+msgid ""
+"When used with B<--decompress> B<--stdout> and B<xz> cannot recognize the "
+"type of the source file, copy the source file as is to standard output. "
+"This allows B<xzcat> B<--force> to be used like B<cat>(1) for files that "
+"have not been compressed with B<xz>. Note that in future, B<xz> might "
+"support new compressed file formats, which may make B<xz> decompress more "
+"types of files instead of copying them as is to standard output. B<--"
+"format=>I<format> can be used to restrict B<xz> to decompress only a single "
+"file format."
+msgstr ""
+"Când este utilizată cu opțiunile B<--decompress> și B<--stdout>, comanda "
+"B<xz> 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 B<xzcat> B<--"
+"force> să fie folosită drept comanda B<cat>(1) pentru fișierele care nu au "
+"fost comprimate cu B<xz>. Rețineți că, în viitor, B<xz> ar putea să accepte "
+"noi formate de fișiere comprimate, ceea ce poate face ca B<xz> să decomprime "
+"mai multe tipuri de fișiere în loc să le copieze așa cum sunt la ieșirea "
+"standard. Opțiunea B<--format=>I<format> poate fi folosită pentru a "
+"restricționa B<xz> să decomprime doar un singur format de fișier."
+
+#. type: TP
+#: ../src/xz/xz.1:458 ../src/xzdec/xzdec.1:76
+#, 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:464
+msgid ""
+"Write the compressed or decompressed data to standard output instead of a "
+"file. This implies B<--keep>."
+msgstr ""
+"Scrie datele comprimate sau decomprimate la ieșirea standard în loc de într-"
+"un fișier. Aceasta implică B<--keep>."
+
+#. type: TP
+#: ../src/xz/xz.1:464
+#, no-wrap
+msgid "B<--single-stream>"
+msgstr "B<--single-stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:473
+msgid ""
+"Decompress only the first B<.xz> stream, and silently ignore possible "
+"remaining input data following the stream. Normally such trailing garbage "
+"makes B<xz> display an error."
+msgstr ""
+"Decomprimă numai primul flux B<.xz> și ignoră în tăcere posibilele date de "
+"intrare rămase în urma fluxului. În mod normal, astfel de resturi rămase "
+"face ca B<xz> să afișeze o eroare."
+
+#. type: Plain text
+#: ../src/xz/xz.1:482
+msgid ""
+"B<xz> never decompresses more than one stream from B<.lzma> files or raw "
+"streams, but this option still makes B<xz> ignore the possible trailing data "
+"after the B<.lzma> file or raw stream."
+msgstr ""
+"B<xz> nu decomprimă niciodată mai mult de un flux din fișierele B<.lzma> sau "
+"din fluxurile brute, dar această opțiune face ca B<xz> să ignore posibilele "
+"resturi de date rămase după fișierul B<.lzma> sau fluxul brut."
+
+#. type: Plain text
+#: ../src/xz/xz.1:487
+msgid ""
+"This option has no effect if the operation mode is not B<--decompress> or "
+"B<--test>."
+msgstr ""
+"Această opțiune nu are efect dacă modul de funcționare nu este B<--"
+"decompress> sau B<--test>."
+
+#. type: TP
+#: ../src/xz/xz.1:487
+#, no-wrap
+msgid "B<--no-sparse>"
+msgstr "B<--no-sparse>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:499
+msgid ""
+"Disable creation of sparse files. By default, if decompressing into a "
+"regular file, B<xz> 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 ""
+"Dezactivează crearea de fișiere dispersate. În mod implicit, dacă "
+"decomprimă într-un fișier obișnuit, B<xz> î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."
+
+#. type: TP
+#: ../src/xz/xz.1:499
+#, 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:511
+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 ""
+"Când comprimă, utilizează I<.suf> ca sufix pentru fișierul țintă în loc de "
+"B<.xz> sau B<.lzma>. Dacă nu scrie la ieșirea standard și fișierul sursă "
+"are deja sufixul I<.suf>, este afișat un avertisment și fișierul este omis."
+
+#. type: Plain text
+#: ../src/xz/xz.1:525
+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 ""
+"Când decomprimă, recunoaște fișierele cu sufixul I<.suf> în plus față de "
+"fișierele cu sufixul B<.xz>, B<.txz>, B<.lzma>, B<.tlz> sau B<.lz>. Dacă "
+"fișierul sursă are sufixul I<.suf>, sufixul este eliminat pentru a obține "
+"numele fișierului țintă."
+
+#. type: Plain text
+#: ../src/xz/xz.1:531
+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 ""
+"La comprimarea sau decomprimarea fluxurilor brute (B<--format=raw>), 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."
+
+#. type: TP
+#: ../src/xz/xz.1:531
+#, no-wrap
+msgid "B<--files>[B<=>I<file>]"
+msgstr "B<--files>[B<=>I<fișier>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:545
+msgid ""
+"Read the filenames to process from I<file>; if I<file> 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<file>."
+msgstr ""
+"Citește numele fișierelor de procesat din I<fișier>; dacă I<fișierul> 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ță (B<-"
+">) 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 I<fișier>."
+
+#. type: TP
+#: ../src/xz/xz.1:545
+#, no-wrap
+msgid "B<--files0>[B<=>I<file>]"
+msgstr "B<--files0>[B<=>I<fișier>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:549
+msgid ""
+"This is identical to B<--files>[B<=>I<file>] except that each filename must "
+"be terminated with the null character."
+msgstr ""
+"Această opțiune este identică cu B<--files>[B<=>I<fișier>], cu excepția "
+"faptului că fiecare nume de fișier trebuie să fie terminat cu caracterul nul."
+
+#. type: SS
+#: ../src/xz/xz.1:550
+#, no-wrap
+msgid "Basic file format and compression options"
+msgstr "Formatul de bază al fișierului și opțiunile de comprimare"
+
+#. type: TP
+#: ../src/xz/xz.1:551
+#, no-wrap
+msgid "B<-F> I<format>, B<--format=>I<format>"
+msgstr "B<-F> I<format>, B<--format=>I<format>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:556
+msgid "Specify the file I<format> to compress or decompress:"
+msgstr "Specifică I<formatul> fișierului pentru comprimare sau decomprimare:"
+
+#. type: TP
+#: ../src/xz/xz.1:557
+#, no-wrap
+msgid "B<auto>"
+msgstr "B<auto>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:569
+msgid ""
+"This is the default. When compressing, B<auto> is equivalent to B<xz>. "
+"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 ""
+"Aceasta este valoarea implicită. La comprimare, B<auto> este echivalent cu "
+"B<xz>. La decomprimare, formatul fișierului de intrare este detectat "
+"automat. Rețineți că fluxurile brute (create cu B<--format=raw>) nu pot fi "
+"detectate automat."
+
+#. type: TP
+#: ../src/xz/xz.1:569
+#, no-wrap
+msgid "B<xz>"
+msgstr "B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:576
+msgid ""
+"Compress to the B<.xz> file format, or accept only B<.xz> files when "
+"decompressing."
+msgstr ""
+"Comprimă în formatul de fișier B<.xz> sau acceptă numai fișierele B<.xz> "
+"când decomprimă."
+
+#. type: TP
+#: ../src/xz/xz.1:576
+#, no-wrap
+msgid "B<lzma>, B<alone>"
+msgstr "B<lzma>, B<alone>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:586
+msgid ""
+"Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files "
+"when decompressing. The alternative name B<alone> is provided for backwards "
+"compatibility with LZMA Utils."
+msgstr ""
+"Comprimă în formatul de fișier B<.lzma> vechi sau acceptă numai fișierele B<."
+"lzma> când decomprimă. Numele alternativ B<alone> este furnizat pentru "
+"compatibilitatea cu versiunile mai vechi de LZMA Utils."
+
+#. type: TP
+#: ../src/xz/xz.1:586
+#, no-wrap
+msgid "B<lzip>"
+msgstr "B<lzip>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:592
+msgid ""
+"Accept only B<.lz> files when decompressing. Compression is not supported."
+msgstr ""
+"Acceptă numai fișierele B<.lz> când decomprimă. Comprimarea nu este "
+"acceptată."
+
+#. type: Plain text
+#: ../src/xz/xz.1:605
+msgid ""
+"The B<.lz> format version 0 and the unextended version 1 are supported. "
+"Version 0 files were produced by B<lzip> 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<lzip> 1.18."
+msgstr ""
+"Formatul B<.lz> versiunea 0 și versiunea neextinsă 1 sunt acceptate. "
+"Fișierele versiunea 0 au fost produse de B<lzip> cu versiunea 1.3 sau mai "
+"veche. Astfel de fișiere nu sunt obișnuite, dar pot fi găsite în arhivele "
+"de fișiere, deoarece câteva pachete sursă au fost lansate în acest format. "
+"Oamenii ar putea avea și fișiere personale vechi în acest format. Suportul "
+"de decomprimare pentru versiunea de format 0 a fost eliminat în B<lzip> 1.18."
+
+#. type: Plain text
+#: ../src/xz/xz.1:614
+msgid ""
+"B<lzip> 1.4 and later create files in the format version 1. The sync flush "
+"marker extension to the format version 1 was added in B<lzip> 1.6. This "
+"extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt "
+"input)."
+msgstr ""
+"B<lzip> 1.4 și versiunile ulterioare creează fișiere în formatul versiunea "
+"1. Extensia „sync flush marker” pentru versiunea 1 de format a fost "
+"adăugată în B<lzip> 1.6. Această extensie este folosită rar și nu este "
+"acceptată de B<xz> (diagnosticată ca intrare coruptă)."
+
+#. type: TP
+#: ../src/xz/xz.1:614
+#, no-wrap
+msgid "B<raw>"
+msgstr "B<raw>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:622
+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 ""
+"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 B<--format=raw> și să specificați în mod "
+"explicit lanțul de filtre, care în mod normal ar fi fost stocat în "
+"anteturile containerului."
+
+#. type: TP
+#: ../src/xz/xz.1:623
+#, no-wrap
+msgid "B<-C> I<check>, B<--check=>I<check>"
+msgstr "B<-C> I<verificarea>, B<--check=>I<verificarea>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:638
+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 ""
+"Specifică tipul verificării integrității. Verificarea este calculată din "
+"datele necomprimate și stocată în fișierul B<.xz>. Această opțiune are "
+"efect numai la comprimarea în format B<.xz>; formatul B<.lzma> nu acceptă "
+"verificări de integritate. Verificarea integrității (dacă există) este "
+"efectuată atunci când fișierul B<.xz> este decomprimat."
+
+#. type: Plain text
+#: ../src/xz/xz.1:642
+msgid "Supported I<check> types:"
+msgstr "Tipuri de I<verificare> acceptate:"
+
+#. type: TP
+#: ../src/xz/xz.1:643
+#, no-wrap
+msgid "B<none>"
+msgstr "B<none>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:649
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:649
+#, no-wrap
+msgid "B<crc32>"
+msgstr "B<crc32>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:652
+msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)."
+msgstr "Calculează CRC32 folosind polinomul din IEEE-802.3 (Ethernet)."
+
+#. type: TP
+#: ../src/xz/xz.1:652
+#, no-wrap
+msgid "B<crc64>"
+msgstr "B<crc64>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:657
+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 ""
+"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ă."
+
+#. type: TP
+#: ../src/xz/xz.1:657
+#, no-wrap
+msgid "B<sha256>"
+msgstr "B<sha256>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:661
+msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64."
+msgstr ""
+"Calculează SHA-256. Acest lucru este oarecum mai lent decât CRC32 și CRC64."
+
+#. type: Plain text
+#: ../src/xz/xz.1:667
+msgid ""
+"Integrity of the B<.xz> headers is always verified with CRC32. It is not "
+"possible to change or disable it."
+msgstr ""
+"Integritatea antetelor B<.xz> este întotdeauna verificată cu CRC32. Nu este "
+"posibilă modificarea sau dezactivarea acesteia."
+
+#. type: TP
+#: ../src/xz/xz.1:667
+#, no-wrap
+msgid "B<--ignore-check>"
+msgstr "B<--ignore-check>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:673
+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 ""
+"Nu efectuează verificarea integrității datelor comprimate la decomprimare. "
+"Valorile CRC32 din antetele B<.xz> vor fi însă verificate normal."
+
+#. type: Plain text
+#: ../src/xz/xz.1:676
+msgid ""
+"B<Do not use this option unless you know what you are doing.> Possible "
+"reasons to use this option:"
+msgstr ""
+"B<Nu utilizați această opțiune decât dacă știți ce faceți.> Motive posibile "
+"pentru a utiliza această opțiune:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:679
+msgid "Trying to recover data from a corrupt .xz file."
+msgstr "Încercarea de a recupera datele dintr-un fișier .xz corupt."
+
+#. type: Plain text
+#: ../src/xz/xz.1:685
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:686
+#, no-wrap
+msgid "B<-0> ... B<-9>"
+msgstr "B<-0> ... B<-9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:695
+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 ""
+"Selectează un nivel prestabilit de comprimare. Valoarea implicită este "
+"B<-6>. 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:710
+msgid ""
+"The differences between the presets are more significant than with "
+"B<gzip>(1) and B<bzip2>(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<it's not a good idea to blindly use -9 for "
+"everything> like it often is with B<gzip>(1) and B<bzip2>(1)."
+msgstr ""
+"Diferențele dintre valorile prestabilite sunt mai semnificative decât cu "
+"B<gzip>(1) și B<bzip2>(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, B<nu este o idee bună să folosiți orbește -9 pentru tot> așa cum se "
+"întâmplă adesea cu B<gzip>(1) și B<bzip2>(1)."
+
+#. type: TP
+#: ../src/xz/xz.1:711
+#, no-wrap
+msgid "B<-0> ... B<-3>"
+msgstr "B<-0> ... B<-3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:723
+msgid ""
+"These are somewhat fast presets. B<-0> is sometimes faster than B<gzip -9> "
+"while compressing much better. The higher ones often have speed comparable "
+"to B<bzip2>(1) with comparable or better compression ratio, although the "
+"results depend a lot on the type of data being compressed."
+msgstr ""
+"Acestea sunt valorile prestabilite oarecum rapide. B<-0> este uneori mai "
+"rapid decât B<gzip -9> în timp ce comprimă mult mai bine. Cele mai ridicate "
+"au adesea viteza comparabilă cu B<bzip2>(1) cu un raport de comprimare "
+"comparabil sau mai bun, deși rezultatele depind foarte mult de tipul de date "
+"care sunt comprimate."
+
+#. type: TP
+#: ../src/xz/xz.1:723
+#, no-wrap
+msgid "B<-4> ... B<-6>"
+msgstr "B<-4> ... B<-6>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:737
+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 ""
+"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. B<-6> 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 "
+"(B<-5e> sau B<-6e> ar putea fi demne de luat în considerare. A se vedea "
+"opțiunea B<--extreme>.)"
+
+#. type: TP
+#: ../src/xz/xz.1:737
+#, no-wrap
+msgid "B<-7 ... -9>"
+msgstr "B<-7 ... -9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:744
+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 ""
+"Acestea sunt precum B<-6>, 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:752
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:754
+msgid "The following table summarises the features of the presets:"
+msgstr "Următorul tabel rezumă caracteristicile valorilor prestabilite:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "Preset"
+msgstr "ValPrestab"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DictSize"
+msgstr "DimDict"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "CompCPU"
+msgstr "CPUComp"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "CompMem"
+msgstr "MemComp"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DecMem"
+msgstr "MemDec"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#: ../src/xz/xz.1:2840
+#, no-wrap
+msgid "-0"
+msgstr "-0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:843 ../src/xz/xz.1:2450
+#, no-wrap
+msgid "256 KiB"
+msgstr "256 KiB"
+
+#. type: TP
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2840 ../src/scripts/xzgrep.1:82
+#, no-wrap
+msgid "0"
+msgstr "0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:764 ../src/xz/xz.1:845 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "3 MiB"
+msgstr "3 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:763 ../src/xz/xz.1:843 ../src/xz/xz.1:844
+#: ../src/xz/xz.1:2451 ../src/xz/xz.1:2452 ../src/xz/xz.1:2454
+#, no-wrap
+msgid "1 MiB"
+msgstr "1 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:2451 ../src/xz/xz.1:2476
+#: ../src/xz/xz.1:2841
+#, no-wrap
+msgid "-1"
+msgstr "-1"
+
+#. type: TP
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:1758 ../src/xz/xz.1:2841
+#: ../src/scripts/xzgrep.1:86
+#, no-wrap
+msgid "1"
+msgstr "1"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "9 MiB"
+msgstr "9 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:764 ../src/xz/xz.1:844 ../src/xz/xz.1:845
+#: ../src/xz/xz.1:2452 ../src/xz/xz.1:2455 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "2 MiB"
+msgstr "2 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:2452 ../src/xz/xz.1:2477
+#: ../src/xz/xz.1:2842
+#, no-wrap
+msgid "-2"
+msgstr "-2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:1760 ../src/xz/xz.1:2842
+#, no-wrap
+msgid "2"
+msgstr "2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2477
+#, no-wrap
+msgid "17 MiB"
+msgstr "17 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2453 ../src/xz/xz.1:2478
+#: ../src/xz/xz.1:2843
+#, no-wrap
+msgid "-3"
+msgstr "-3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:843 ../src/xz/xz.1:846
+#: ../src/xz/xz.1:847 ../src/xz/xz.1:2453 ../src/xz/xz.1:2454
+#: ../src/xz/xz.1:2456
+#, no-wrap
+msgid "4 MiB"
+msgstr "4 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2843
+#, no-wrap
+msgid "3"
+msgstr "3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2458
+#: ../src/xz/xz.1:2459 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "32 MiB"
+msgstr "32 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847
+#, no-wrap
+msgid "5 MiB"
+msgstr "5 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:2454 ../src/xz/xz.1:2479
+#: ../src/xz/xz.1:2844
+#, no-wrap
+msgid "-4"
+msgstr "-4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:1759 ../src/xz/xz.1:1761
+#: ../src/xz/xz.1:1762 ../src/xz/xz.1:1764 ../src/xz/xz.1:2844
+#, no-wrap
+msgid "4"
+msgstr "4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "48 MiB"
+msgstr "48 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2455 ../src/xz/xz.1:2480
+#: ../src/xz/xz.1:2845
+#, no-wrap
+msgid "-5"
+msgstr "-5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2455 ../src/xz/xz.1:2456 ../src/xz/xz.1:2457
+#, no-wrap
+msgid "8 MiB"
+msgstr "8 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2845
+#, no-wrap
+msgid "5"
+msgstr "5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2480 ../src/xz/xz.1:2481
+#, no-wrap
+msgid "94 MiB"
+msgstr "94 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:2456 ../src/xz/xz.1:2481
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "-6"
+msgstr "-6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:769 ../src/xz/xz.1:770 ../src/xz/xz.1:771
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "6"
+msgstr "6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:2457 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "-7"
+msgstr "-7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2457
+#: ../src/xz/xz.1:2458 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "16 MiB"
+msgstr "16 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "186 MiB"
+msgstr "186 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:2458 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "-8"
+msgstr "-8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "370 MiB"
+msgstr "370 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851
+#, no-wrap
+msgid "33 MiB"
+msgstr "33 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:2459 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "-9"
+msgstr "-9"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2459
+#, no-wrap
+msgid "64 MiB"
+msgstr "64 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "674 MiB"
+msgstr "674 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852
+#, no-wrap
+msgid "65 MiB"
+msgstr "65 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:777
+msgid "Column descriptions:"
+msgstr "Descrieri coloane:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:789
+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 ""
+"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 B<-7> ... "
+"B<-9> atunci când nu este nevoie cu adevărat de ele. Pentru valoarea "
+"prestabilită B<-6> sau alta mai mică, cantitatea de memorie irosită este de "
+"obicei suficient de mică pentru a nu conta."
+
+#. type: Plain text
+#: ../src/xz/xz.1:798
+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 ""
+"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 B<-6> ... "
+"B<-9>, 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 "
+"B<--extreme>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:806
+msgid ""
+"CompMem contains the compressor memory requirements in the single-threaded "
+"mode. It may vary slightly between B<xz> versions. Memory requirements of "
+"some of the future multithreaded modes may be dramatically higher than that "
+"of the single-threaded mode."
+msgstr ""
+"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 B<xz>. Cerințele de "
+"memorie ale unora dintre viitoarele moduri cu mai multe fire de execuție pot "
+"să fie din nefericire cu mult mai mari decât cele ale modului cu un singur "
+"fir."
+
+#. type: Plain text
+#: ../src/xz/xz.1:813
+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 ""
+"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."
+
+#. type: TP
+#: ../src/xz/xz.1:814
+#, no-wrap
+msgid "B<-e>, B<--extreme>"
+msgstr "B<-e>, B<--extreme>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:823
+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 ""
+"Utilizează o variantă mai lentă a nivelului prestabilit de comprimare "
+"selectat (B<-0> ... B<-9>) 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 B<-0> ... B<-3>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:835
+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 ""
+"Deoarece există două valori prestabilite cu dimensiuni ale dicționarului de "
+"4Mio și 8Mio, valorile prestabilite B<-3e> și B<-5e> folosesc configurări "
+"puțin mai rapide (CPUComp mai mic) decât B<-4e> și B<-6e>, respectiv. În "
+"acest fel, nu există două nivele prestabilite identice."
+
+#. type: tbl table
+#: ../src/xz/xz.1:843
+#, no-wrap
+msgid "-0e"
+msgstr "-0e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:843 ../src/xz/xz.1:844 ../src/xz/xz.1:845 ../src/xz/xz.1:847
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:850 ../src/xz/xz.1:851 ../src/xz/xz.1:852
+#: ../src/xz/xz.1:2848
+#, no-wrap
+msgid "8"
+msgstr "8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "-1e"
+msgstr "-1e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "13 MiB"
+msgstr "13 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "-2e"
+msgstr "-2e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "25 MiB"
+msgstr "25 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846
+#, no-wrap
+msgid "-3e"
+msgstr "-3e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846 ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "7"
+msgstr "7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:847
+#, no-wrap
+msgid "-4e"
+msgstr "-4e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "-5e"
+msgstr "-5e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2848
+#, no-wrap
+msgid "-6e"
+msgstr "-6e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:850
+#, no-wrap
+msgid "-7e"
+msgstr "-7e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:851
+#, no-wrap
+msgid "-8e"
+msgstr "-8e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:852
+#, no-wrap
+msgid "-9e"
+msgstr "-9e"
+
+#. type: Plain text
+#: ../src/xz/xz.1:864
+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 ""
+"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 "
+"B<-5>, B<-6>, B<-5e> și B<-6e> ."
+
+#. type: TP
+#: ../src/xz/xz.1:864
+#, no-wrap
+msgid "B<--fast>"
+msgstr "B<--fast>"
+
+#. type: TP
+#: ../src/xz/xz.1:867
+#, no-wrap
+msgid "B<--best>"
+msgstr "B<--best>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:878
+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 ""
+"Acestea sunt alias de opțiuni, oarecum înșelătoare pentru B<-0> și, "
+"respectiv, B<-9>. Acestea sunt furnizate numai pentru compatibilitatea cu "
+"LZMA Utils. Evitați utilizarea acestor opțiuni."
+
+#. type: TP
+#: ../src/xz/xz.1:878
+#, no-wrap
+msgid "B<--block-size=>I<size>"
+msgstr "B<--block-size=>I<dimensiunea>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:891
+msgid ""
+"When compressing to the B<.xz> format, split the input data into blocks of "
+"I<size> 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 ""
+"Când comprimă în formatul B<.xz>, împarte datele de intrare în blocuri de "
+"I<dimensiunea> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:909
+msgid ""
+"In multi-threaded mode about three times I<size> bytes will be allocated in "
+"each thread for buffering input and output. The default I<size> 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<size> less than the LZMA2 dictionary size is waste of RAM "
+"because then the LZMA2 dictionary buffer will never get fully used. The "
+"sizes of the blocks are stored in the block headers, which a future version "
+"of B<xz> will use for multi-threaded decompression."
+msgstr ""
+"În modul cu mai multe fire de execuție, aproximativ de trei ori "
+"I<dimensiunea> de octeți vor fi alocați în fiecare fir pentru stocarea "
+"intrării și ieșirii. I<Dimensiunea> 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 I<dimensiuni> 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. Dimensiunile blocurilor sunt stocate în antetele blocurilor, pe "
+"care o versiune viitoare a B<xz> le va folosi pentru decomprimarea cu mai "
+"multe fire de execuție."
+
+#. type: Plain text
+#: ../src/xz/xz.1:918
+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 a future version of B<xz> won't be able decompress the files in "
+"multi-threaded mode."
+msgstr ""
+"Î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 despre dimensiune înseamnă, de asemenea, "
+"că o versiune viitoare de B<xz> nu va putea decomprima fișierele în modul cu "
+"mai multe fire de execuție."
+
+#. type: TP
+#: ../src/xz/xz.1:918
+#, no-wrap
+msgid "B<--block-list=>I<sizes>"
+msgstr "B<--block-list=>I<dimensiuni>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:924
+msgid ""
+"When compressing to the B<.xz> format, start a new block after the given "
+"intervals of uncompressed data."
+msgstr ""
+"Atunci când comprimă în formatul B<.xz>, începe un nou bloc după intervalele "
+"specificate, de date necomprimate."
+
+#. type: Plain text
+#: ../src/xz/xz.1:930
+msgid ""
+"The uncompressed I<sizes> of the blocks are specified as a comma-separated "
+"list. Omitting a size (two or more consecutive commas) is a shorthand to "
+"use the size of the previous block."
+msgstr ""
+"I<Dimensiunile> necomprimate ale blocurilor sunt specificate ca o listă "
+"separată prin virgule. Omiterea unei dimensiuni (două sau mai multe virgule "
+"consecutive) este o prescurtare pentru a folosi dimensiunea blocului "
+"anterior."
+
+#. type: Plain text
+#: ../src/xz/xz.1:940
+msgid ""
+"If the input file is bigger than the sum of I<sizes>, the last value in "
+"I<sizes> is repeated until the end of the file. A special value of B<0> may "
+"be used as the last value to indicate that the rest of the file should be "
+"encoded as a single block."
+msgstr ""
+"Dacă fișierul de intrare este mai mare decât suma I<dimensiuni>lor, ultima "
+"valoare din I<dimensiuni> se repetă până la sfârșitul fișierului. O valoare "
+"specială de B<0> poate fi utilizată ca ultima valoare pentru a indica faptul "
+"că restul fișierului ar trebui să fie codificat ca un singur bloc."
+
+#. type: Plain text
+#: ../src/xz/xz.1:955
+msgid ""
+"If one specifies I<sizes> that exceed the encoder's block size (either the "
+"default value in threaded mode or the value specified with B<--block-"
+"size=>I<size>), the encoder will create additional blocks while keeping the "
+"boundaries specified in I<sizes>. 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 ""
+"Dacă se specifică I<dimensiuni> care depășesc dimensiunea blocului "
+"codificatorului (fie valoarea implicită în modul fire de execuție, fie "
+"valoarea specificată cu opțiunea B<--block-size=>I<dimensiune>), "
+"codificatorul va crea blocuri suplimentare păstrând în același timp limitele "
+"specificate în I<dimensiuni>. De exemplu, dacă se specifică B<--block-"
+"size=10MiB> B<--block-list=5MiB,10MiB,8MiB,12MiB,24MiB> iar fișierul de "
+"intrare este de 80Mio, se vor obține 11 blocuri de: 5, 10, 8, 10, 2, 10, 10, "
+"4, 10, 10 și 1Mio."
+
+#. type: Plain text
+#: ../src/xz/xz.1:961
+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 ""
+"Î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."
+
+#. type: TP
+#: ../src/xz/xz.1:961
+#, no-wrap
+msgid "B<--flush-timeout=>I<timeout>"
+msgstr "B<--flush-timeout=>I<timp_limită>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:978
+msgid ""
+"When compressing, if more than I<timeout> 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<xz> is used to compress data that is "
+"streamed over a network. Small I<timeout> values make the data available at "
+"the receiving end with a small delay, but large I<timeout> values give "
+"better compression ratio."
+msgstr ""
+"La comprimare, dacă au trecut mai mult de I<timp_limită> 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ă B<xz> este utilizat pentru a comprima datele care sunt "
+"transmise în flux printr-o rețea. Valorile mici de I<timp_limită> fac "
+"datele disponibile la capătul de recepție cu o mică întârziere, dar valorile "
+"mari de I<timp_limită> oferă un raport de comprimare mai bun."
+
+#. type: Plain text
+#: ../src/xz/xz.1:986
+msgid ""
+"This feature is disabled by default. If this option is specified more than "
+"once, the last one takes effect. The special I<timeout> value of B<0> can "
+"be used to explicitly disable this feature."
+msgstr ""
+"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 I<timp_limită> de B<0>, poate fi "
+"utilizată pentru a dezactiva în mod explicit această caracteristică."
+
+#. type: Plain text
+#: ../src/xz/xz.1:988
+msgid "This feature is not available on non-POSIX systems."
+msgstr "Această caracteristică nu este disponibilă în sistemele non-POSIX."
+
+#. FIXME
+#. type: Plain text
+#: ../src/xz/xz.1:996
+msgid ""
+"B<This feature is still experimental.> Currently B<xz> is unsuitable for "
+"decompressing the stream in real time due to how B<xz> does buffering."
+msgstr ""
+"B<Această caracteristică este încă experimentală.> În prezent, B<xz> este "
+"nepotrivit pentru decomprimarea fluxului în timp real datorită modului în "
+"care B<xz> utilizează memoria tampon."
+
+#. type: TP
+#: ../src/xz/xz.1:996
+#, no-wrap
+msgid "B<--memlimit-compress=>I<limit>"
+msgstr "B<--memlimit-compress=>I<limita>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1001
+msgid ""
+"Set a memory usage limit for compression. If this option is specified "
+"multiple times, the last one takes effect."
+msgstr ""
+"Stabilește o limită de utilizare a memoriei pentru comprimare. Dacă această "
+"opțiune este specificată de mai multe ori, ultima va avea efect."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1014
+msgid ""
+"If the compression settings exceed the I<limit>, B<xz> 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<limit>, and finally reducing the LZMA2 dictionary size."
+msgstr ""
+"Dacă parametrii de comprimare depășesc I<limita>, B<xz> 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 I<limita> și, în final, "
+"reducerea dimensiunii dicționarului LZMA2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1022
+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 ""
+"Când comprimă cu opțiunea B<--format=raw> sau dacă a fost specificată "
+"opțiunea B<--no-adjust>, numai numărul de fire poate fi redus, deoarece se "
+"poate face fără a afecta rezultatul comprimării."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1029
+msgid ""
+"If the I<limit> cannot be met even with the adjustments described above, an "
+"error is displayed and B<xz> will exit with exit status 1."
+msgstr ""
+"Dacă I<limita> nu poate fi îndeplinită chiar și cu ajustările descrise mai "
+"sus, este afișată o eroare și B<xz> va ieși cu starea de ieșire 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1033
+msgid "The I<limit> can be specified in multiple ways:"
+msgstr "I<Limita> poate fi specificata în mai multe moduri:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1043
+msgid ""
+"The I<limit> can be an absolute value in bytes. Using an integer suffix "
+"like B<MiB> can be useful. Example: B<--memlimit-compress=80MiB>"
+msgstr ""
+"I<Limita> poate fi o valoare absolută în octeți. Utilizarea unui sufix "
+"întreg precum B<MiB> poate fi utilă. De exemplu: B<--memlimit-"
+"compress=80MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1055
+msgid ""
+"The I<limit> can be specified as a percentage of total physical memory "
+"(RAM). This can be useful especially when setting the B<XZ_DEFAULTS> "
+"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<Limita> 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 "
+"B<XZ_DEFAULTS> î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: B<--memlimit-compress=70%>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1065
+msgid ""
+"The I<limit> can be reset back to its default value by setting it to B<0>. "
+"This is currently equivalent to setting the I<limit> to B<max> (no memory "
+"usage limit)."
+msgstr ""
+"I<Limita> poate fi restabilită la valoarea implicită dându-i valoarea B<0>. "
+"În prezent, aceasta este echivalentă cu stabilirea I<limitei> la B<max> "
+"(fără limită de utilizare a memoriei)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1089
+msgid ""
+"For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+"B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. On MIPS32 B<2000\\ "
+"MiB> is used instead. (The values B<0> and B<max> 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 ""
+"Pentru B<xz> pe 32 de biți există un caz special: dacă I<limita> ar fi peste "
+"B<4020MiB>, I<limita> este stabilită la B<4020MiB>. Pe MIPS32 este "
+"stabilită în schimb la B<2000MiB>. (Valorile B<0> și B<max> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1092
+msgid "See also the section B<Memory usage>."
+msgstr "Consultați și secțiunea B<Utilizarea memoriei>."
+
+#. type: TP
+#: ../src/xz/xz.1:1092
+#, no-wrap
+msgid "B<--memlimit-decompress=>I<limit>"
+msgstr "B<--memlimit-decompress=>I<limita>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1106
+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<limit>, "
+"B<xz> will display an error and decompressing the file will fail. See B<--"
+"memlimit-compress=>I<limit> for possible ways to specify the I<limit>."
+msgstr ""
+"Stabilește o limită de utilizare a memoriei pentru decomprimare. Acest "
+"lucru afectează și modul B<--list>. Dacă operațiunea nu este posibilă fără "
+"a depăși I<limita>, B<xz> va afișa o eroare și decomprimarea fișierului va "
+"eșua. Consultați B<--memlimit-compress=>I<limita> pentru modalitățile "
+"posibile de a specifica I<limita>."
+
+#. type: TP
+#: ../src/xz/xz.1:1106
+#, no-wrap
+msgid "B<--memlimit-mt-decompress=>I<limit>"
+msgstr "B<--memlimit-mt-decompress=>I<limita>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1128
+msgid ""
+"Set a memory usage limit for multi-threaded decompression. This can only "
+"affect the number of threads; this will never make B<xz> refuse to "
+"decompress a file. If I<limit> is too low to allow any multi-threading, the "
+"I<limit> is ignored and B<xz> 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<limit> for "
+"multi-threading will never be higher than the limit set with B<--memlimit-"
+"decompress>."
+msgstr ""
+"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 B<xz> să refuze "
+"decomprimarea unui fișier. Dacă I<limita> este prea scăzută pentru a "
+"permite orice mod cu mai multe fire de execuție, I<limita> este ignorată și "
+"B<xz> va continua în modul cu un singur fir de execuție. Rețineți că, dacă "
+"se folosește și opțiunea B<--memlimit-decompress>, 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 I<limita> efectivă pentru modul cu mai multe fire "
+"de execuție nu va fi niciodată mai mare decât limita stabilită cu opțiunea "
+"B<--memlimit-decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1135
+msgid ""
+"In contrast to the other memory usage limit options, B<--memlimit-mt-"
+"decompress=>I<limit> has a system-specific default I<limit>. B<xz --info-"
+"memory> can be used to see the current value."
+msgstr ""
+"Spre deosebire de celelalte opțiuni de limită de utilizare a memoriei, "
+"opțiunea B<--memlimit-mt-decompress=>I<limita> are o I<limită> implicită "
+"specifică sistemului. Comanda B<xz --info-memory> poate fi folosită pentru "
+"a vedea valoarea curentă."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1151
+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<limit> is too low on your system, "
+"feel free to increase the I<limit> but never set it to a value larger than "
+"the amount of usable RAM as with appropriate input files B<xz> 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 ""
+"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ă I<limita> "
+"implicită este prea scăzută pe sistemul dumneavoastră, nu ezitați să "
+"creșteți I<limita>, 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, B<xz> va încerca să utilizeze acea cantitate de memorie chiar și "
+"cu un număr redus de fire de execuție. Rularea lui B<xz> cu depășirea "
+"cantității de memorie fizice(RAM) sau a celei de interschimb(swap) nu va "
+"îmbunătăți performanța de decomprimare."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1163
+msgid ""
+"See B<--memlimit-compress=>I<limit> for possible ways to specify the "
+"I<limit>. Setting I<limit> to B<0> resets the I<limit> to the default "
+"system-specific value."
+msgstr ""
+"Consultați opțiunea B<--memlimit-compress=>I<limita> pentru modalități "
+"posibile de a specifica I<limita>. Stabilirea I<limitei> la B<0> "
+"restabilește I<limita> la valoarea implicită specifică sistemului."
+
+#. type: TP
+#: ../src/xz/xz.1:1163
+#, no-wrap
+msgid "B<-M> I<limit>, B<--memlimit=>I<limit>, B<--memory=>I<limit>"
+msgstr "B<-M> I<limita>, B<--memlimit=>I<limita>, B<--memory=>I<limita>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1169
+msgid ""
+"This is equivalent to specifying B<--memlimit-compress=>I<limit> B<--"
+"memlimit-decompress=>I<limit> B<--memlimit-mt-decompress=>I<limit>."
+msgstr ""
+"Aceasta este echivalentă cu specificarea opțiunilor: B<--memlimit-"
+"compress=>I<limita> B<--memlimit-decompress=>I<limita> B<--memlimit-mt-"
+"decompress=>I<limita>."
+
+#. type: TP
+#: ../src/xz/xz.1:1169
+#, no-wrap
+msgid "B<--no-adjust>"
+msgstr "B<--no-adjust>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1179
+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<xz> 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 ""
+"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ă B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1182
+msgid ""
+"Automatic adjusting is always disabled when creating raw streams (B<--"
+"format=raw>)."
+msgstr ""
+"Ajustarea automată este întotdeauna dezactivată la crearea fluxurilor brute "
+"(B<--format=raw>)."
+
+#. type: TP
+#: ../src/xz/xz.1:1182
+#, no-wrap
+msgid "B<-T> I<threads>, B<--threads=>I<threads>"
+msgstr "B<-T> I<număr>, B<--threads=>I<număr>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1197
+msgid ""
+"Specify the number of worker threads to use. Setting I<threads> to a "
+"special value B<0> makes B<xz> use up to as many threads as the processor(s) "
+"on the system support. The actual number of threads can be fewer than "
+"I<threads> 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 ""
+"Specifică numărul de fire de execuție de utilizat. Stabilirea I<numărului> "
+"la valoarea specială B<0>, face ca B<xz> 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 I<număr> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1216
+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<threads> to B<1> will use the single-threaded "
+"mode. Setting I<threads> to any other value, including B<0>, will use the "
+"multi-threaded compressor even if the system supports only one hardware "
+"thread. (B<xz> 5.2.x used single-threaded mode in this situation.)"
+msgstr ""
+"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 I<numărului> la B<1> va determina ca B<xz> să "
+"folosească modul cu un singur fir de execuție. Stabilirea I<numărului> la "
+"orice altă valoare, inclusiv B<0>, va determina ca B<xz> să folosească "
+"comprimarea cu mai multe fire de execuție chiar dacă sistemul acceptă doar "
+"un fir hardware. (B<xz> 5.2.x folosește modul cu un singur fir de execuție "
+"în această situație.)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1235
+msgid ""
+"To use multi-threaded mode with only one thread, set I<threads> to B<+1>. "
+"The B<+> prefix has no effect with values other than B<1>. A memory usage "
+"limit can still make B<xz> switch to single-threaded mode unless B<--no-"
+"adjust> is used. Support for the B<+> prefix was added in B<xz> 5.4.0."
+msgstr ""
+"Pentru a utiliza modul cu mai multe fire de execuție cu un singur fir, "
+"stabiliți I<numărul> la B<+1>. Prefixul B<+> nu are efect cu alte valori "
+"decât B<1>. O limită de utilizare a memoriei poate face în continuare B<xz> "
+"să treacă în modul cu un singur fir, cu excepția cazului în care este "
+"utilizată opțiunea B<--no-adjust>. Suportul pentru prefixul B<+> a fost "
+"adăugat în B<xz> 5.4.0."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1250
+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<xz> from compressing or decompressing. This default soft "
+"limit will not make B<xz> switch from multi-threaded mode to single-threaded "
+"mode. The active limits can be seen with B<xz --info-memory>."
+msgstr ""
+"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ă B<xz> să comprime sau să decomprime. Această limită „maleabilă” "
+"implicită nu va face B<xz> 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 B<xz --info-memory>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1257
+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<size> option."
+msgstr ""
+"Î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 B<--block-size=>I<dimensiune>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1265
+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<size> has been used."
+msgstr ""
+"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 B<--block-size=>I<dimensiune>."
+
+#. type: SS
+#: ../src/xz/xz.1:1266 ../src/xz/xz.1:2819
+#, no-wrap
+msgid "Custom compressor filter chains"
+msgstr "Lanțuri de filtrare personalizate pentru instrumentul de comprimare"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1282
+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 ""
+"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 (B<-0> \\&...\\& B<-9> și B<--extreme>) 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1289
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1297
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1305
+msgid ""
+"A custom filter chain is specified by using one or more filter options in "
+"the order they are wanted in the filter chain. That is, the order of filter "
+"options is significant! When decoding raw streams (B<--format=raw>), the "
+"filter chain is specified in the same order as it was specified when "
+"compressing."
+msgstr ""
+"Un lanț de filtrare personalizat este specificat utilizând una sau mai multe "
+"opțiuni de filtrare în ordinea în care sunt cerute în lanțul de filtrare. "
+"Adică, ordinea opțiunilor de filtrare este semnificativă! La decodificarea "
+"fluxurilor brute (B<--format=raw>), lanțul de filtrare este specificat în "
+"aceeași ordine în care a fost specificat la comprimare."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1314
+msgid ""
+"Filters take filter-specific I<options> as a comma-separated list. Extra "
+"commas in I<options> are ignored. Every option has a default value, so you "
+"need to specify only those you want to change."
+msgstr ""
+"Filtrele iau I<opțiuni> specifice filtrului ca o listă separată prin "
+"virgule. Virgulele suplimentare din I<opțiuni> sunt ignorate. Fiecare "
+"opțiune are o valoare implicită, așa că trebuie să specificați numai cele pe "
+"care doriți să le modificați."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1323
+msgid ""
+"To see the whole filter chain and I<options>, use B<xz -vv> (that is, use "
+"B<--verbose> twice). This works also for viewing the filter chain options "
+"used by presets."
+msgstr ""
+"Pentru a vedea întregul lanț de filtre și I<opțiuni>, utilizați B<xz -vv> "
+"(adică folosiți B<--verbose> de două ori). Acest lucru funcționează și "
+"pentru vizualizarea opțiunilor lanțului de filtre utilizate de valorile "
+"prestabilite."
+
+#. type: TP
+#: ../src/xz/xz.1:1323
+#, no-wrap
+msgid "B<--lzma1>[B<=>I<options>]"
+msgstr "B<--lzma1>[B<=>I<opțiuni>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1326
+#, no-wrap
+msgid "B<--lzma2>[B<=>I<options>]"
+msgstr "B<--lzma2>[B<=>I<opțiuni>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1331
+msgid ""
+"Add LZMA1 or LZMA2 filter to the filter chain. These filters can be used "
+"only as the last filter in the chain."
+msgstr ""
+"Adaugă filtrul LZMA1 sau LZMA2 la lanțul de filtre. Aceste filtre pot fi "
+"folosite doar ca ultimul filtru din lanț."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1343
+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 este un filtru vechi, care este acceptat aproape exclusiv datorită "
+"formatului de fișier vechi B<.lzma>, care acceptă numai LZMA1. LZMA2 este o "
+"versiune actualizată a LZMA1 pentru a rezolva unele probleme practice ale "
+"LZMA1. Formatul B<.xz> folosește LZMA2 și nu acceptă deloc LZMA1. Viteza "
+"de comprimare și rapoartele LZMA1 și LZMA2 sunt practic aceleași."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1346
+msgid "LZMA1 and LZMA2 share the same set of I<options>:"
+msgstr "LZMA1 și LZMA2 au același set de I<opțiuni>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1347
+#, no-wrap
+msgid "B<preset=>I<preset>"
+msgstr "B<preset=>I<prestabilit>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1374
+msgid ""
+"Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+"matches B<--extreme>. If no B<preset> is specified, the default values of "
+"LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgstr ""
+"Reconfigurează toate I<opțiunile> LZMA1 sau LZMA2 la I<prestabilit>. "
+"I<Prestabilit> 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 B<0> la B<9>, potrivindu-se cu opțiunile liniei de comandă B<-0> \\&..."
+"\\& B<-9>. Singurul modificator acceptat în prezent este B<e>, care se "
+"potrivește cu B<--extreme>. Dacă nu este specificat B<prestabilit>, "
+"valorile implicite ale I<opțiunilor> LZMA1 sau LZMA2 sunt preluate din "
+"prestabilirea B<6>."
+
+#. type: TP
+#: ../src/xz/xz.1:1374
+#, no-wrap
+msgid "B<dict=>I<size>"
+msgstr "B<dict=>I<dimensiunea>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1389
+msgid ""
+"Dictionary (history buffer) I<size> 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<size> usually improves compression ratio, but a "
+"dictionary bigger than the uncompressed file is waste of memory."
+msgstr ""
+"I<Dimensiunea> 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 "
+"I<dimensiunii> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1398
+msgid ""
+"Typical dictionary I<size> 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<Dimensiunea>tipică 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1425
+msgid ""
+"Dictionary I<size> and match finder (I<mf>) together determine the memory "
+"usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary "
+"I<size> 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<size> either as "
+"2^I<n> or 2^I<n> + 2^(I<n>-1), so these I<sizes> are somewhat preferred for "
+"compression. Other I<sizes> will get rounded up when stored in the B<.xz> "
+"headers."
+msgstr ""
+"I<Dimensiunea> dicționarului și găsitorul de potriviri (match finder) → "
+"(I<mf>) determină împreună utilizarea memoriei de către codificatorul LZMA1 "
+"sau LZMA2. Aceeași I<dimensiune> 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 B<.xz> stochează "
+"I<dimensiunea> dicționarului fie ca 2^I<n>, fie ca 2^I<n> + 2^(I<n>-1), deci "
+"aceste I<dimensiuni> sunt oarecum preferate pentru comprimare. Alte "
+"I<dimensiuni> vor fi rotunjite atunci când sunt stocate în anteturile B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:1425
+#, no-wrap
+msgid "B<lc=>I<lc>"
+msgstr "B<lc=>I<lc>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1434
+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<lc> and I<lp> "
+"must not exceed 4."
+msgstr ""
+"Specifică numărul de biți de context literal. Minimul este 0 și maximul "
+"este 4; implicit este 3. În plus, suma I<lc> și I<lp> nu trebuie să "
+"depășească 4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1439
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1453
+msgid ""
+"The literal coding makes an assumption that the highest I<lc> 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<lc> is at least "
+"3, the literal coding can take advantage of this property in the "
+"uncompressed data."
+msgstr ""
+"Codificarea literală presupune că cei mai mari biți I<lc> 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 I<lc> este cel puțin 3, codificarea literală "
+"poate profita de această proprietate în datele necomprimate."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1462
+msgid ""
+"The default value (3) is usually good. If you want maximum compression, "
+"test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+"compression worse. If it makes it worse, test B<lc=2> too."
+msgstr ""
+"Valoarea implicită (3) este de obicei bună. Dacă doriți o comprimare "
+"maximă, testați B<lc=4>. Uneori ajută puțin, iar uneori înrăutățește "
+"comprimarea . Dacă o agravează, încercați de-asemeni cu B<lc=2>."
+
+#. type: TP
+#: ../src/xz/xz.1:1462
+#, no-wrap
+msgid "B<lp=>I<lp>"
+msgstr "B<lp=>I<lp>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1466
+msgid ""
+"Specify the number of literal position bits. The minimum is 0 and the "
+"maximum is 4; the default is 0."
+msgstr ""
+"Specifică numărul de biți de poziție literală. Minimul este 0 și maximul "
+"este 4; implicit este 0."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1473
+msgid ""
+"I<Lp> affects what kind of alignment in the uncompressed data is assumed "
+"when encoding literals. See I<pb> below for more information about "
+"alignment."
+msgstr ""
+"I<Lp> afectează ce fel de aliniere în datele necomprimate este presupusă la "
+"codificarea literalelor. Consultați argumentul I<pb> de mai jos pentru mai "
+"multe informații despre aliniere."
+
+#. type: TP
+#: ../src/xz/xz.1:1473
+#, no-wrap
+msgid "B<pb=>I<pb>"
+msgstr "B<pb=>I<pb>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1477
+msgid ""
+"Specify the number of position bits. The minimum is 0 and the maximum is 4; "
+"the default is 2."
+msgstr ""
+"Specifică numărul de biți de poziție. Minimul este 0 și maximul este 4; "
+"implicit este 2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1484
+msgid ""
+"I<Pb> affects what kind of alignment in the uncompressed data is assumed in "
+"general. The default means four-byte alignment (2^I<pb>=2^2=4), which is "
+"often a good choice when there's no better guess."
+msgstr ""
+"I<Pb> afectează ce fel de aliniere în datele necomprimate este presupusă în "
+"general. Valoarea implicită înseamnă alinierea pe patru octeți "
+"(2^I<pb>=2^2=4), care este adesea o alegere bună atunci când nu există o "
+"ipoteză mai bună."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1498
+msgid ""
+"When the alignment is known, setting I<pb> 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<pb=0> can improve compression "
+"slightly. For UTF-16 text, B<pb=1> is a good choice. If the alignment is "
+"an odd number like 3 bytes, B<pb=0> might be the best choice."
+msgstr ""
+"Când alinierea este cunoscută, definirea lui I<pb> î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 B<pb=0> poate "
+"îmbunătăți ușor comprimarea. Pentru textul UTF-16, B<pb=1> este o alegere "
+"bună. Dacă alinierea este un număr impar, cum ar fi 3 octeți, B<pb=0> ar "
+"putea fi cea mai bună alegere."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1506
+msgid ""
+"Even though the assumed alignment can be adjusted with I<pb> and I<lp>, "
+"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 ""
+"Chiar dacă alinierea presupusă poate fi ajustată cu I<pb> și I<lp>, 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."
+
+#. type: TP
+#: ../src/xz/xz.1:1506
+#, no-wrap
+msgid "B<mf=>I<mf>"
+msgstr "B<mf=>I<mf>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1521
+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<preset>: 0 uses B<hc3>, "
+"1\\(en3 use B<hc4>, and the rest use B<bt4>."
+msgstr ""
+"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 I<prestabilit>: "
+"0 folosește B<hc3>, 1\\(en3 folosește B<hc4>, iar restul folosește B<bt4>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1527
+msgid ""
+"The following match finders are supported. The memory usage formulas below "
+"are rough approximations, which are closest to the reality when I<dict> is a "
+"power of two."
+msgstr ""
+"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 I<dict> este o putere a lui doi."
+
+#. type: TP
+#: ../src/xz/xz.1:1528
+#, no-wrap
+msgid "B<hc3>"
+msgstr "B<hc3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1531
+msgid "Hash Chain with 2- and 3-byte hashing"
+msgstr "Lanț de sumă de control, cu suma de control de 2 și 3 octeți"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1535 ../src/xz/xz.1:1584
+msgid "Minimum value for I<nice>: 3"
+msgstr "Valoarea minimă pentru I<nice>: 3"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1537 ../src/xz/xz.1:1556 ../src/xz/xz.1:1586
+#: ../src/xz/xz.1:1605
+msgid "Memory usage:"
+msgstr "Utilizarea memoriei:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1542
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 7.5 (dacă I<dict> E<lt>= 16 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1547
+msgid "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 5.5 + 64 MiB (dacă I<dict> E<gt> 16 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1547
+#, no-wrap
+msgid "B<hc4>"
+msgstr "B<hc4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1550
+msgid "Hash Chain with 2-, 3-, and 4-byte hashing"
+msgstr "Lanț de sumă de control, cu suma de control de 2, 3 și 4 octeți"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1554 ../src/xz/xz.1:1603
+msgid "Minimum value for I<nice>: 4"
+msgstr "Valoarea minimă pentru I<nice>: 4"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1561
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 7.5 (dacă I<dict> E<lt>= 32 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1566
+msgid "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 6.5 (dacă I<dict> E<gt> 32 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1566
+#, no-wrap
+msgid "B<bt2>"
+msgstr "B<bt2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1569
+msgid "Binary Tree with 2-byte hashing"
+msgstr "Arbore binar cu suma de control de 2 octeți"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1573
+msgid "Minimum value for I<nice>: 2"
+msgstr "Valoarea minimă pentru I<nice>: 2"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1577
+msgid "Memory usage: I<dict> * 9.5"
+msgstr "Utilizarea memoriei: I<dict> * 9.5"
+
+#. type: TP
+#: ../src/xz/xz.1:1577
+#, no-wrap
+msgid "B<bt3>"
+msgstr "B<bt3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1580
+msgid "Binary Tree with 2- and 3-byte hashing"
+msgstr "Arbore binar cu suma de control de 2 și 3 octeți"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1591
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 11.5 (dacă I<dict> E<lt>= 16 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1596
+msgid "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 9.5 + 64 MiB (dacă I<dict> E<gt> 16 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1596
+#, no-wrap
+msgid "B<bt4>"
+msgstr "B<bt4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1599
+msgid "Binary Tree with 2-, 3-, and 4-byte hashing"
+msgstr "Arbore binar cu suma de control de 2, 3 și 4 octeți"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1610
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 11.5 (dacă I<dict> E<lt>= 32 Mio);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1615
+msgid "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 10.5 (dacă I<dict> E<gt> 32 Mio)"
+
+#. type: TP
+#: ../src/xz/xz.1:1616
+#, no-wrap
+msgid "B<mode=>I<mode>"
+msgstr "B<mode=>I<mod>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1637
+msgid ""
+"Compression I<mode> specifies the method to analyze the data produced by the "
+"match finder. Supported I<modes> are B<fast> and B<normal>. The default is "
+"B<fast> for I<presets> 0\\(en3 and B<normal> for I<presets> 4\\(en9."
+msgstr ""
+"Comprimarea I<mod> specifică metoda de analiză a datelor produse de "
+"găsitorul de potriviri. I<Modurile> acceptate sunt B<fast>(rapid) și "
+"B<normal>. Valoarea implicită este B<fast> pentru I<prestabiliri> 0\\(en3 "
+"și B<normal> pentru I<prestabiliri> 4\\(en9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1646
+msgid ""
+"Usually B<fast> is used with Hash Chain match finders and B<normal> with "
+"Binary Tree match finders. This is also what the I<presets> do."
+msgstr ""
+"De obicei, B<fast> este folosit cu instrumentele de căutare de potriviri ale "
+"lanțului de sume de control, și B<normal> cu instrumentele de căutare de "
+"potriviri din arborele binar. Aceasta este și ceea ce fac I<prestabiririle>."
+
+#. type: TP
+#: ../src/xz/xz.1:1646
+#, no-wrap
+msgid "B<nice=>I<nice>"
+msgstr "B<nice=>I<nice>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1653
+msgid ""
+"Specify what is considered to be a nice length for a match. Once a match of "
+"at least I<nice> bytes is found, the algorithm stops looking for possibly "
+"better matches."
+msgstr ""
+"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 I<nice> octeți, "
+"algoritmul nu mai caută după potriviri posibile mai bune."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1660
+msgid ""
+"I<Nice> can be 2\\(en273 bytes. Higher values tend to give better "
+"compression ratio at the expense of speed. The default depends on the "
+"I<preset>."
+msgstr ""
+"I<Nice> 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 I<prestabilit>."
+
+#. type: TP
+#: ../src/xz/xz.1:1660
+#, no-wrap
+msgid "B<depth=>I<depth>"
+msgstr "B<depth=>I<adâncimea>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1670
+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<depth> from I<mf> and I<nice>."
+msgstr ""
+"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 I<adâncime> rezonabilă pornind de la valorile "
+"I<mf> și I<nice>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1681
+msgid ""
+"Reasonable I<depth> for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary "
+"Trees. Using very high values for I<depth> can make the encoder extremely "
+"slow with some files. Avoid setting the I<depth> over 1000 unless you are "
+"prepared to interrupt the compression in case it is taking far too long."
+msgstr ""
+"I<Adâncimea> rezonabilă pentru lanțuri de sumă de control este 4\\(en100 și "
+"16\\(en1000 pentru arbori binari. Folosirea unor valori foarte mari pentru "
+"I<adâncime> poate face codificatorul extrem de lent cu unele fișiere. "
+"Evitați să stabiliți I<adâncimea> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1692
+msgid ""
+"When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary "
+"I<size>. LZMA1 needs also I<lc>, I<lp>, and I<pb>."
+msgstr ""
+"La decodificarea fluxurilor brute (B<--format=raw>), LZMA2 are nevoie doar "
+"de I<dimensiunea> dicționarului. LZMA1 are nevoie de asemenea de I<lc>, "
+"I<lp> și I<pb>."
+
+#. type: TP
+#: ../src/xz/xz.1:1692
+#, no-wrap
+msgid "B<--x86>[B<=>I<options>]"
+msgstr "B<--x86>[B<=>I<opțiuni>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1695
+#, no-wrap
+msgid "B<--arm>[B<=>I<options>]"
+msgstr "B<--arm>[B<=>I<opțiuni>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1697
+#, no-wrap
+msgid "B<--armthumb>[B<=>I<options>]"
+msgstr "B<--armthumb>[B<=>I<opțiuni>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1699
+#, no-wrap
+msgid "B<--arm64>[B<=>I<options>]"
+msgstr "B<--arm64>[B<=>I<opțiuni>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1701
+#, no-wrap
+msgid "B<--powerpc>[B<=>I<options>]"
+msgstr "B<--powerpc>[B<=>I<opțiuni>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1703
+#, no-wrap
+msgid "B<--ia64>[B<=>I<options>]"
+msgstr "B<--ia64>[B<=>I<opțiuni>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1705
+#, no-wrap
+msgid "B<--sparc>[B<=>I<options>]"
+msgstr "B<--sparc>[B<=>I<opțiuni>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1711
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1725
+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 ""
+"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 B<.xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1728
+msgid "These BCJ filters have known problems related to the compression ratio:"
+msgstr ""
+"Aceste filtre BCJ au probleme cunoscute legate de raportul de comprimare:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1735
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1745
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1750
+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 ""
+"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."
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Filter"
+msgstr "Filtru"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Alignment"
+msgstr "Aliniere"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Notes"
+msgstr "Note"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "x86"
+msgstr "x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "32-bit or 64-bit x86"
+msgstr ""
+"x86 pe 32 de biți\n"
+";;sau 64 de biți"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1759
+#, no-wrap
+msgid "ARM"
+msgstr "ARM"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1760
+#, no-wrap
+msgid "ARM-Thumb"
+msgstr "ARM-Thumb"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "ARM64"
+msgstr "ARM64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "4096-byte alignment is best"
+msgstr ""
+"alinierea pe 4096-octeți\n"
+";;este cea mai bună"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "PowerPC"
+msgstr "PowerPC"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "Big endian only"
+msgstr "Doar big endian"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "IA-64"
+msgstr "IA-64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "16"
+msgstr "16"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "Itanium"
+msgstr "Itanium"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1764
+#, no-wrap
+msgid "SPARC"
+msgstr "SPARC"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1781
+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. For example, with the IA-64 "
+"filter, it's good to set B<pb=4> or even B<pb=4,lp=4,lc=0> with LZMA2 "
+"(2^4=16). The x86 filter is an exception; it's usually good to stick to "
+"LZMA2's default four-byte alignment when compressing x86 executables."
+msgstr ""
+"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. De "
+"exemplu, cu filtrul IA-64, este bine să stabiliți B<pb=4> sau chiar B<pb=4,"
+"lp=4,lc=0> cu LZMA2 (2^4=16). Filtrul x86 este o excepție; de obicei, este "
+"bine să rămână la alinierea implicită de patru octeți a LZMA2 atunci când se "
+"comprimă executabile x86."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1784
+msgid "All BCJ filters support the same I<options>:"
+msgstr "Toate filtrele BCJ acceptă același I<opțiuni>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1785
+#, no-wrap
+msgid "B<start=>I<offset>"
+msgstr "B<start=>I<poziție>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1799
+msgid ""
+"Specify the start I<offset> that is used when converting between relative "
+"and absolute addresses. The I<offset> 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<offset> is almost never useful."
+msgstr ""
+"Specifică I<poziția> de pornire care este utilizată la conversia între "
+"adresele relative și absolute. I<Poziția> 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 "
+"I<poziții> personalizate nu este aproape niciodată utilă."
+
+#. type: TP
+#: ../src/xz/xz.1:1800
+#, no-wrap
+msgid "B<--delta>[B<=>I<options>]"
+msgstr "B<--delta>[B<=>I<opțiuni>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1805
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1814
+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<flac>(1)."
+msgstr ""
+"Î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 B<flac>(1)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1817
+msgid "Supported I<options>:"
+msgstr "I<Opțiuni> acceptate:"
+
+#. type: TP
+#: ../src/xz/xz.1:1818
+#, no-wrap
+msgid "B<dist=>I<distance>"
+msgstr "B<dist=>I<distanța>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1826
+msgid ""
+"Specify the I<distance> of the delta calculation in bytes. I<distance> must "
+"be 1\\(en256. The default is 1."
+msgstr ""
+"Specifică I<distanța> calculului delta în octeți. I<Distanța> trebuie să "
+"fie 1\\(en256. Valoarea implicită este 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1831
+msgid ""
+"For example, with B<dist=2> 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 ""
+"De exemplu, cu B<dist=2> ș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."
+
+#. type: SS
+#: ../src/xz/xz.1:1833
+#, no-wrap
+msgid "Other options"
+msgstr "Alte opțiuni"
+
+#. type: TP
+#: ../src/xz/xz.1:1834 ../src/xzdec/xzdec.1:83
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr "B<-q>, B<--quiet>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1841
+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 ""
+"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ă."
+
+#. type: TP
+#: ../src/xz/xz.1:1841
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr "B<-v>, B<--verbose>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1850
+msgid ""
+"Be verbose. If standard error is connected to a terminal, B<xz> will "
+"display a progress indicator. Specifying B<--verbose> twice will give even "
+"more verbose output."
+msgstr ""
+"Oferă informații detaliate. Dacă ieșirea de eroare standard este conectată "
+"la un terminal, B<xz> va afișa un indicator de progres. Specificarea "
+"opțiunii B<--verbose> de două ori, va avea ca rezultat oferirea de "
+"informații și mai detaliate."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1852
+msgid "The progress indicator shows the following information:"
+msgstr "Indicatorul de progres afișează următoarele informații:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1857
+msgid ""
+"Completion percentage is shown if the size of the input file is known. That "
+"is, the percentage cannot be shown in pipes."
+msgstr ""
+"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)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1860
+msgid ""
+"Amount of compressed data produced (compressing) or consumed "
+"(decompressing)."
+msgstr ""
+"Cantitatea de date comprimate produse (comprimare) sau consumate "
+"(decomprimare)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1863
+msgid ""
+"Amount of uncompressed data consumed (compressing) or produced "
+"(decompressing)."
+msgstr ""
+"Cantitatea de date necomprimate consumate (comprimare) sau produse "
+"(decomprimare)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1867
+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 ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1874
+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<xz> started "
+"processing the file."
+msgstr ""
+"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 B<xz> a început procesarea fișierului."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1876
+msgid "Elapsed time in the format M:SS or H:MM:SS."
+msgstr "Timpul scurs în format M:SS sau H:MM:SS."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1884
+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<xz> 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 ""
+"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 B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1899
+msgid ""
+"When standard error is not a terminal, B<--verbose> will make B<xz> 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 ""
+"Când ieșirea de eroare standard nu este un terminal, B<--verbose> va face "
+"B<xz> 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."
+
+#. type: TP
+#: ../src/xz/xz.1:1899 ../src/xzdec/xzdec.1:89
+#, no-wrap
+msgid "B<-Q>, B<--no-warn>"
+msgstr "B<-Q>, B<--no-warn>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1909
+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 ""
+"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 B<--quiet> cât și B<--no-warn> trebuie "
+"folosite pentru a nu afișa avertismente și pentru a nu modifica starea de "
+"ieșire."
+
+#. type: TP
+#: ../src/xz/xz.1:1909
+#, no-wrap
+msgid "B<--robot>"
+msgstr "B<--robot>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1921
+msgid ""
+"Print messages in a machine-parsable format. This is intended to ease "
+"writing frontends that want to use B<xz> instead of liblzma, which may be "
+"the case with various scripts. The output with this option enabled is meant "
+"to be stable across B<xz> releases. See the section B<ROBOT MODE> for "
+"details."
+msgstr ""
+"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ă B<xz> î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 B<xz>. Consultați secțiunea B<MOD ROBOT> pentru detalii."
+
+#. type: TP
+#: ../src/xz/xz.1:1921
+#, no-wrap
+msgid "B<--info-memory>"
+msgstr "B<--info-memory>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1928
+msgid ""
+"Display, in human-readable format, how much physical memory (RAM) and how "
+"many processor threads B<xz> thinks the system has and the memory usage "
+"limits for compression and decompression, and exit successfully."
+msgstr ""
+"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 B<xz> crede că are sistemul și "
+"limitele de utilizare a memoriei pentru comprimare și decomprimare și iese "
+"cu succes."
+
+#. type: TP
+#: ../src/xz/xz.1:1928 ../src/xzdec/xzdec.1:96
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr "B<-h>, B<--help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1932
+msgid ""
+"Display a help message describing the most commonly used options, and exit "
+"successfully."
+msgstr ""
+"Afișează un mesaj de ajutor care descrie opțiunile cele mai frecvent "
+"utilizate și iese cu succes."
+
+#. type: TP
+#: ../src/xz/xz.1:1932
+#, no-wrap
+msgid "B<-H>, B<--long-help>"
+msgstr "B<-H>, B<--long-help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1937
+msgid ""
+"Display a help message describing all features of B<xz>, and exit "
+"successfully"
+msgstr ""
+"Afișează un mesaj de ajutor care descrie toate caracteristicile B<xz> și "
+"iese cu succes"
+
+#. type: TP
+#: ../src/xz/xz.1:1937 ../src/xzdec/xzdec.1:99
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr "B<-V>, B<--version>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1946
+msgid ""
+"Display the version number of B<xz> and liblzma in human readable format. "
+"To get machine-parsable output, specify B<--robot> before B<--version>."
+msgstr ""
+"Afișează numărul versiunii B<xz> și liblzma într-un format care poate fi "
+"citit de om. Pentru a obține rezultate analizabile de mașină, specificați "
+"B<--robot> înainte de B<--version>."
+
+#. type: SH
+#: ../src/xz/xz.1:1947
+#, no-wrap
+msgid "ROBOT MODE"
+msgstr "MOD ROBOT"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1963
+msgid ""
+"The robot mode is activated with the B<--robot> option. It makes the output "
+"of B<xz> easier to parse by other programs. Currently B<--robot> is "
+"supported only together with B<--version>, B<--info-memory>, and B<--list>. "
+"It will be supported for compression and decompression in the future."
+msgstr ""
+"Modul robot este activat cu opțiunea B<--robot>. Face ieșirea lui B<xz> mai "
+"ușor de analizat de către alte programe. În prezent, opțiunea B<--robot> "
+"este acceptată numai împreună cu opțiunile B<--version>, B<--info-memory> și "
+"B<--list>. Va fi acceptată pentru comprimare și decomprimare în viitor."
+
+#. type: SS
+#: ../src/xz/xz.1:1964
+#, no-wrap
+msgid "Version"
+msgstr "Versiunea"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1969
+msgid ""
+"B<xz --robot --version> prints the version number of B<xz> and liblzma in "
+"the following format:"
+msgstr ""
+"B<xz --robot --version> va afișa numărul versiunii B<xz> și liblzma în "
+"următorul format:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1971
+msgid "B<XZ_VERSION=>I<XYYYZZZS>"
+msgstr "B<XZ_VERSION=>I<XYYYZZZS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1973
+msgid "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+msgstr "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+
+#. type: TP
+#: ../src/xz/xz.1:1973
+#, no-wrap
+msgid "I<X>"
+msgstr "I<X>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1976
+msgid "Major version."
+msgstr "Versiunea majoră."
+
+#. type: TP
+#: ../src/xz/xz.1:1976
+#, no-wrap
+msgid "I<YYY>"
+msgstr "I<YYY>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1981
+msgid ""
+"Minor version. Even numbers are stable. Odd numbers are alpha or beta "
+"versions."
+msgstr ""
+"Versiunea minoră. Numerele pare sunt prezente în versiunile stabile. "
+"Numerele impare sunt prezente în versiunile alfa sau beta."
+
+#. type: TP
+#: ../src/xz/xz.1:1981
+#, no-wrap
+msgid "I<ZZZ>"
+msgstr "I<ZZZ>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1985
+msgid ""
+"Patch level for stable releases or just a counter for development releases."
+msgstr ""
+"Nivelul de plasture(patch) pentru versiunile stabile sau doar un contor "
+"pentru versiunile de dezvoltare."
+
+#. type: TP
+#: ../src/xz/xz.1:1985
+#, no-wrap
+msgid "I<S>"
+msgstr "I<S>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1993
+msgid ""
+"Stability. 0 is alpha, 1 is beta, and 2 is stable. I<S> should be always 2 "
+"when I<YYY> is even."
+msgstr ""
+"Stabilitate. 0 este alfa, 1 este beta și 2 este stabil. I<S> trebuie să "
+"fie întotdeauna 2 atunci când I<AAA> este par."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1998
+msgid ""
+"I<XYYYZZZS> are the same on both lines if B<xz> and liblzma are from the "
+"same XZ Utils release."
+msgstr ""
+"I<XYYYZZZS> sunt aceleași pe ambele linii dacă B<xz> și liblzma sunt din "
+"aceeași versiune XZ Utils."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2004
+msgid "Examples: 4.999.9beta is B<49990091> and 5.0.0 is B<50000002>."
+msgstr "Exemple: 4.999.9beta este B<49990091> și 5.0.0 este B<50000002>."
+
+#. type: SS
+#: ../src/xz/xz.1:2005
+#, no-wrap
+msgid "Memory limit information"
+msgstr "Informații privind limita memoriei"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2008
+msgid ""
+"B<xz --robot --info-memory> prints a single line with multiple tab-separated "
+"columns:"
+msgstr ""
+"B<xz --robot --info-memory> afișează o singură linie cu multiple coloane "
+"separate prin tabulatoare:"
+
+#. type: IP
+#: ../src/xz/xz.1:2008
+#, no-wrap
+msgid "1."
+msgstr "1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2010
+msgid "Total amount of physical memory (RAM) in bytes."
+msgstr "Cantitatea totală de memorie fizică (RAM) în octeți."
+
+#. type: IP
+#: ../src/xz/xz.1:2010 ../src/xz/xz.1:2125 ../src/xz/xz.1:2162
+#: ../src/xz/xz.1:2188 ../src/xz/xz.1:2258 ../src/xz/xz.1:2285
+#, no-wrap
+msgid "2."
+msgstr "2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2017
+msgid ""
+"Memory usage limit for compression in bytes (B<--memlimit-compress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Limita de utilizare a memoriei pentru comprimare în octeți (B<--memlimit-"
+"compress>). O valoare specială de B<0> indică configurarea implicită, care "
+"pentru modul cu un singur fir este la fel ca fără limită."
+
+#. type: IP
+#: ../src/xz/xz.1:2017 ../src/xz/xz.1:2127 ../src/xz/xz.1:2164
+#: ../src/xz/xz.1:2190 ../src/xz/xz.1:2263 ../src/xz/xz.1:2287
+#, no-wrap
+msgid "3."
+msgstr "3."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2024
+msgid ""
+"Memory usage limit for decompression in bytes (B<--memlimit-decompress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Limita de utilizare a memoriei pentru decomprimare în octeți (B<--memlimit-"
+"decompress>). O valoare specială de B<0> indică configurarea implicită, "
+"care pentru modul cu un singur fir este la fel ca fără limită."
+
+#. type: IP
+#: ../src/xz/xz.1:2024 ../src/xz/xz.1:2129 ../src/xz/xz.1:2166
+#: ../src/xz/xz.1:2193 ../src/xz/xz.1:2273 ../src/xz/xz.1:2289
+#, no-wrap
+msgid "4."
+msgstr "4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2036
+msgid ""
+"Since B<xz> 5.3.4alpha: Memory usage for multi-threaded decompression in "
+"bytes (B<--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 B<--memlimit-mt-"
+"decompress>."
+msgstr ""
+"Începând cu B<xz> 5.3.4alpha: Utilizarea memoriei pentru decomprimarea cu "
+"mai multe fire în octeți (B<--memlimit-mt-decompress>). 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 B<--memlimit-"
+"mt-decompress>."
+
+#. type: IP
+#: ../src/xz/xz.1:2036 ../src/xz/xz.1:2131 ../src/xz/xz.1:2168
+#: ../src/xz/xz.1:2195 ../src/xz/xz.1:2291
+#, no-wrap
+msgid "5."
+msgstr "5."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2048
+msgid ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+msgstr ""
+"Începând cu B<xz> 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 "
+"(B<--threads=0>) și nicio limită de utilizare a memoriei nu fost specificată "
+"cu (B<--memlimit-compress>). Aceasta este, de asemenea, utilizată ca "
+"valoare implicită pentru B<--memlimit-mt-decompress>."
+
+#. type: IP
+#: ../src/xz/xz.1:2048 ../src/xz/xz.1:2133 ../src/xz/xz.1:2170
+#: ../src/xz/xz.1:2197 ../src/xz/xz.1:2293
+#, no-wrap
+msgid "6."
+msgstr "6."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2053
+msgid "Since B<xz> 5.3.4alpha: Number of available processor threads."
+msgstr ""
+"Începând cu B<xz> 5.3.4alpha: numărul de fire de execuție de procesor "
+"disponibile."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2057
+msgid ""
+"In the future, the output of B<xz --robot --info-memory> may have more "
+"columns, but never more than a single line."
+msgstr ""
+"În viitor, rezultatul B<xz --robot --info-memory> poate avea mai multe "
+"coloane, dar niciodată mai mult de o singură linie."
+
+#. type: SS
+#: ../src/xz/xz.1:2058
+#, no-wrap
+msgid "List mode"
+msgstr "Modul listă"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2063
+msgid ""
+"B<xz --robot --list> 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<xz --robot --list> 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:"
+
+#. type: TP
+#: ../src/xz/xz.1:2063
+#, no-wrap
+msgid "B<name>"
+msgstr "B<name>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2067
+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:2067
+#, no-wrap
+msgid "B<file>"
+msgstr "B<file>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2075
+msgid ""
+"This line contains overall information about the B<.xz> file. This line is "
+"always printed after the B<name> line."
+msgstr ""
+"Această linie conține informații generale despre fișierul B<.xz>. Această "
+"linie este întotdeauna tipărită după linia B<name>."
+
+#. type: TP
+#: ../src/xz/xz.1:2075
+#, no-wrap
+msgid "B<stream>"
+msgstr "B<stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2085
+msgid ""
+"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."
+msgstr ""
+"Acest tip de linie este utilizat numai atunci când a fost specificată "
+"opțiunea B<--verbose>. Există tot atâtea linii B<stream> câte fluxuri "
+"există în fișierul B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2085
+#, no-wrap
+msgid "B<block>"
+msgstr "B<block>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2100
+msgid ""
+"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."
+msgstr ""
+"Acest tip de linie este utilizat numai atunci când a fost specificată "
+"opțiunea B<--verbose>. Există tot atâtea linii B<block> câte blocuri există "
+"în fișierul B<.xz>. Liniile B<block> sunt afișate după toate liniile "
+"B<stream>; tipurile diferite de linii nu sunt intercalate."
+
+#. type: TP
+#: ../src/xz/xz.1:2100
+#, no-wrap
+msgid "B<summary>"
+msgstr "B<summary>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2115
+msgid ""
+"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."
+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<block>. Ca și linia B<file>, linia B<summary> conține informații generale "
+"despre fișierul B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2115
+#, no-wrap
+msgid "B<totals>"
+msgstr "B<totals>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2119
+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:2123
+msgid "The columns of the B<file> lines:"
+msgstr "Coloanele din liniile B<file>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2127
+msgid "Number of streams in the file"
+msgstr "Numărul de fluxuri din fișier"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2129
+msgid "Total number of blocks in the stream(s)"
+msgstr "Numărul total de blocuri din fluxuri"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2131
+msgid "Compressed size of the file"
+msgstr "Dimensiunea comprimată a fișierului"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2133
+msgid "Uncompressed size of the file"
+msgstr "Dimensiunea necomprimată a fișierului"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2139
+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:2139 ../src/xz/xz.1:2172 ../src/xz/xz.1:2199
+#: ../src/xz/xz.1:2295
+#, no-wrap
+msgid "7."
+msgstr "7."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2152
+msgid ""
+"Comma-separated list of integrity check names. The following strings are "
+"used for the known check types: B<None>, B<CRC32>, B<CRC64>, and "
+"B<SHA-256>. For unknown check types, B<Unknown->I<N> is used, where I<N> 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<None>, B<CRC32>, B<CRC64> și B<SHA-256>. Pentru tipurile de verificări "
+"necunoscute, se utilizează B<None->I<N>, unde I<N> este ID-ul de verificare "
+"ca număr zecimal (una sau două cifre)."
+
+#. type: IP
+#: ../src/xz/xz.1:2152 ../src/xz/xz.1:2174 ../src/xz/xz.1:2201
+#: ../src/xz/xz.1:2298
+#, no-wrap
+msgid "8."
+msgstr "8."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2154
+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:2160
+msgid "The columns of the B<stream> lines:"
+msgstr "Coloanele din liniile B<stream>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2164
+msgid "Stream number (the first stream is 1)"
+msgstr "Numărul fluxului (primul flux este 1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2166
+msgid "Number of blocks in the stream"
+msgstr "Numărul de blocuri din flux"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2168
+msgid "Compressed start offset"
+msgstr "Poziția de pornire a comprimării"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2170
+msgid "Uncompressed start offset"
+msgstr "Poziția de pornire a decomprimării"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2172
+msgid "Compressed size (does not include stream padding)"
+msgstr "Dimensiune comprimată (nu include umplutura fluxului)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2174 ../src/xz/xz.1:2203 ../src/xz/xz.1:2293
+msgid "Uncompressed size"
+msgstr "Dimensiune necomprimată"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2205
+msgid "Compression ratio"
+msgstr "Raport de comprimare"
+
+#. type: IP
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2203 ../src/xz/xz.1:2300
+#, no-wrap
+msgid "9."
+msgstr "9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2207
+msgid "Name of the integrity check"
+msgstr "Numele verificării de integritate"
+
+#. type: IP
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2205 ../src/xz/xz.1:2316
+#, no-wrap
+msgid "10."
+msgstr "10."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2180
+msgid "Size of stream padding"
+msgstr "Dimensiunea umpluturii fluxului"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2186
+msgid "The columns of the B<block> lines:"
+msgstr "Coloanele din liniile B<block>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2190
+msgid "Number of the stream containing this block"
+msgstr "Numărul fluxului care conține acest bloc"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2193
+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:2195
+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:2197
+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:2199
+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:2201
+msgid "Total compressed size of the block (includes headers)"
+msgstr "Dimensiunea totală comprimată a blocului (include antetele)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2219
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<block> 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<block>. 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:2221 ../src/xz/xz.1:2321
+#, no-wrap
+msgid "11."
+msgstr "11."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2223
+msgid "Value of the integrity check in hexadecimal"
+msgstr "Valoarea verificării integrității în hexazecimal"
+
+#. type: IP
+#: ../src/xz/xz.1:2223 ../src/xz/xz.1:2331
+#, no-wrap
+msgid "12."
+msgstr "12."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2225
+msgid "Block header size"
+msgstr "Dimensiunea antetului blocului"
+
+#. type: IP
+#: ../src/xz/xz.1:2225
+#, no-wrap
+msgid "13."
+msgstr "13."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2235
+msgid ""
+"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 "
+"(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<c> indică faptul că este prezentă dimensiunea "
+"comprimată, iar B<u> 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:2235
+#, no-wrap
+msgid "14."
+msgstr "14."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2238
+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:2238
+#, no-wrap
+msgid "15."
+msgstr "15."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2243
+msgid ""
+"Amount of memory (in bytes) required to decompress this block with this "
+"B<xz> version"
+msgstr ""
+"Cantitatea de memorie (în octeți) necesară pentru a decomprima acest bloc cu "
+"această versiune B<xz>"
+
+#. type: IP
+#: ../src/xz/xz.1:2243
+#, no-wrap
+msgid "16."
+msgstr "16."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2250
+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:2256
+msgid "The columns of the B<summary> lines:"
+msgstr "Coloanele din liniile B<summary>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2263
+msgid ""
+"Amount of memory (in bytes) required to decompress this file with this B<xz> "
+"version"
+msgstr ""
+"Cantitatea de memorie (în octeți) necesară pentru a decomprima acest fișier "
+"cu această versiune B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2269 ../src/xz/xz.1:2327
+msgid ""
+"B<yes> or B<no> indicating if all block headers have both compressed size "
+"and uncompressed size stored in them"
+msgstr ""
+"B<yes> sau B<no> 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:2273 ../src/xz/xz.1:2331
+msgid "I<Since> B<xz> I<5.1.2alpha:>"
+msgstr "I<Începând cu> B<xz> I<5.1.2alpha:>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2277 ../src/xz/xz.1:2335
+msgid "Minimum B<xz> version required to decompress the file"
+msgstr "Versiunea B<xz> minimă necesară pentru a decomprima fișierul"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2283
+msgid "The columns of the B<totals> line:"
+msgstr "Coloanele din linia B<totals>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2287
+msgid "Number of streams"
+msgstr "Numărul de fluxuri"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2289
+msgid "Number of blocks"
+msgstr "Numărul de blocuri"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2291
+msgid "Compressed size"
+msgstr "Dimensiunea comprimată"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2295
+msgid "Average compression ratio"
+msgstr "Raportul mediu de comprimare"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2298
+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:2300
+msgid "Stream padding size"
+msgstr "Dimensiunea umpluturii fluxului"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2306
+msgid ""
+"Number of files. This is here to keep the order of the earlier columns the "
+"same as on B<file> lines."
+msgstr ""
+"Numărul de fișiere. Aceasta este aici pentru a păstra ordinea coloanelor "
+"anterioare la fel ca pe liniile B<file>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2314
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<totals> line:"
+msgstr ""
+"Dacă opțiunea B<--verbose> a fost specificată de două ori, pe linia "
+"B<totals> sunt incluse coloane suplimentare:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2321
+msgid ""
+"Maximum amount of memory (in bytes) required to decompress the files with "
+"this B<xz> version"
+msgstr ""
+"Cantitatea maximă de memorie (în octeți) necesară pentru a decomprima "
+"fișierele cu această versiune B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2341
+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: SH
+#: ../src/xz/xz.1:2342 ../src/xzdec/xzdec.1:104 ../src/lzmainfo/lzmainfo.1:44
+#: ../src/scripts/xzgrep.1:81
+#, no-wrap
+msgid "EXIT STATUS"
+msgstr "STARE DE IEȘIRE"
+
+#. type: TP
+#: ../src/xz/xz.1:2343 ../src/xzdec/xzdec.1:105 ../src/lzmainfo/lzmainfo.1:45
+#, no-wrap
+msgid "B<0>"
+msgstr "B<0>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2346 ../src/lzmainfo/lzmainfo.1:48
+msgid "All is good."
+msgstr "Totul este bine."
+
+#. type: TP
+#: ../src/xz/xz.1:2346 ../src/xzdec/xzdec.1:108 ../src/lzmainfo/lzmainfo.1:48
+#, no-wrap
+msgid "B<1>"
+msgstr "B<1>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2349 ../src/xzdec/xzdec.1:111 ../src/lzmainfo/lzmainfo.1:51
+msgid "An error occurred."
+msgstr "A apărut o eroare."
+
+#. type: TP
+#: ../src/xz/xz.1:2349
+#, no-wrap
+msgid "B<2>"
+msgstr "B<2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2353
+msgid "Something worth a warning occurred, but no actual errors occurred."
+msgstr ""
+"A apărut ceva care merită să fie avertizat, dar nu au apărut erori reale."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2356
+msgid ""
+"Notices (not warnings or errors) printed on standard error don't affect the "
+"exit status."
+msgstr ""
+"Notificările (nu avertismentele sau erorile) afișate la ieșirea de eroare "
+"standard nu afectează starea de ieșire."
+
+#. type: SH
+#: ../src/xz/xz.1:2357 ../src/scripts/xzgrep.1:94 ../src/scripts/xzless.1:52
+#, no-wrap
+msgid "ENVIRONMENT"
+msgstr "VARIABILE DE MEDIU"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2370
+msgid ""
+"B<xz> parses space-separated lists of options from the environment variables "
+"B<XZ_DEFAULTS> and B<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 "
+"B<getopt_long>(3) which is used also for the command line arguments."
+msgstr ""
+"B<xz> analizează liste de opțiuni separate prin spații din variabilele de "
+"mediu B<XZ_DEFAULTS> și B<XZ_OPT>, î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 B<getopt_long>(3) care este folosită și pentru "
+"argumentele liniei de comandă."
+
+#. type: TP
+#: ../src/xz/xz.1:2370
+#, no-wrap
+msgid "B<XZ_DEFAULTS>"
+msgstr "B<XZ_DEFAULTS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2379
+msgid ""
+"User-specific or system-wide default options. Typically this is set in a "
+"shell initialization script to enable B<xz>'s memory usage limiter by "
+"default. Excluding shell initialization scripts and similar special cases, "
+"scripts must never set or unset B<XZ_DEFAULTS>."
+msgstr ""
+"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 "
+"B<xz> implicit. Excluzând scripturile de inițializare shell și cazurile "
+"speciale similare, scripturile nu trebuie niciodată să modifice sau să "
+"dezactiveze B<XZ_DEFAULTS>."
+
+#. type: TP
+#: ../src/xz/xz.1:2379
+#, no-wrap
+msgid "B<XZ_OPT>"
+msgstr "B<XZ_OPT>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2390
+msgid ""
+"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 B<tar>(1):"
+msgstr ""
+"Acest lucru este pentru transmiterea opțiunilor către B<xz> atunci când nu "
+"este posibil să definiți opțiunile direct în linia de comandă a B<xz>. "
+"Acesta este cazul când B<xz> este rulat de un script sau de un instrument, "
+"de exemplu, GNU B<tar>(1):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2396
+#, no-wrap
+msgid "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+msgstr "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2410
+msgid ""
+"Scripts may use B<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 B<sh>(1) scripts one may "
+"use something like this:"
+msgstr ""
+"Scripturile pot folosi B<XZ_OPT>, de exemplu, pentru a configura opțiunile "
+"implicite de comprimare specifice scriptului. Se recomandă totuși să se "
+"permită utilizatorilor să înlocuiască B<XZ_OPT> dacă acest lucru este "
+"rezonabil. De exemplu, în scripturile B<sh>(1) se poate folosi ceva de "
+"genul acesta:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2417
+#, no-wrap
+msgid ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+msgstr ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+
+#. type: SH
+#: ../src/xz/xz.1:2422
+#, no-wrap
+msgid "LZMA UTILS COMPATIBILITY"
+msgstr "COMPATIBILITATE CU LZMA-UTILS"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2435
+msgid ""
+"The command line syntax of B<xz> is practically a superset of B<lzma>, "
+"B<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."
+msgstr ""
+"Sintaxa liniei de comandă a lui B<xz> este practic o super-colecție de "
+"B<lzma>, B<unlzma> și B<lzcat> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:2436
+#, no-wrap
+msgid "Compression preset levels"
+msgstr "Niveluri de comprimare prestabilite"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2443
+msgid ""
+"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."
+msgstr ""
+"Numerotarea nivelurilor de comprimare prestabilite nu este identică în B<xz> "
+"ș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."
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "Level"
+msgstr "Nivel"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "xz"
+msgstr "xz"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449
+#, no-wrap
+msgid "LZMA Utils"
+msgstr "LZMA Utils"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "N/A"
+msgstr "N/A"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2451
+#, no-wrap
+msgid "64 KiB"
+msgstr "64 KiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2453
+#, no-wrap
+msgid "512 KiB"
+msgstr "512 KiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2468
+msgid ""
+"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:"
+msgstr ""
+"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:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2474
+#, no-wrap
+msgid "LZMA Utils 4.32.x"
+msgstr "LZMA Utils 4.32.x"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2477 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "12 MiB"
+msgstr "12 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2480
+#, no-wrap
+msgid "26 MiB"
+msgstr "26 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2481
+#, no-wrap
+msgid "45 MiB"
+msgstr "45 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2482
+#, no-wrap
+msgid "83 MiB"
+msgstr "83 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2483
+#, no-wrap
+msgid "159 MiB"
+msgstr "159 MiB"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2484
+#, no-wrap
+msgid "311 MiB"
+msgstr "311 MiB"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2493
+msgid ""
+"The default preset level in LZMA Utils is B<-7> while in XZ Utils it is "
+"B<-6>, so both use an 8 MiB dictionary by default."
+msgstr ""
+"Nivelul prestabilit implicit în LZMA Utils este B<-7>, în timp ce în XZ "
+"Utils este B<-6>, deci ambele folosesc un dicționar de 8Mio în mod implicit."
+
+#. type: SS
+#: ../src/xz/xz.1:2494
+#, no-wrap
+msgid "Streamed vs. non-streamed .lzma files"
+msgstr "Fișiere .lzma transmise în flux vs. netransmise în flux"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2504
+msgid ""
+"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."
+msgstr ""
+"Dimensiunea necomprimată a fișierului poate fi stocată în antetul B<.lzma>. "
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2525
+msgid ""
+"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."
+msgstr ""
+"B<xz> acceptă decomprimarea fișierelor B<.lzma> cu sau fără marcaj de "
+"sfârșit de încărcare, dar toate fișierele B<.lzma> create de B<xz> vor "
+"folosi marcajul de sfârșit de încărcare și vor avea dimensiunea necomprimată "
+"marcată ca necunoscută în antetul B<.lzma>. Aceasta poate fi o problemă în "
+"unele situații mai puțin frecvente. De exemplu, un instrument de "
+"decomprimare B<.lzma> î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 B<.lzma> cu dimensiunea necomprimată cunoscută."
+
+#. type: SS
+#: ../src/xz/xz.1:2526
+#, no-wrap
+msgid "Unsupported .lzma files"
+msgstr "Fișiere .lzma neacceptate"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2549
+msgid ""
+"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 I<lp>, but always creates "
+"files with B<lc=3> and B<lp=0>. Creating files with other I<lc> and I<lp> "
+"is possible with B<xz> and with LZMA SDK."
+msgstr ""
+"Formatul B<.lzma> permite valori I<lc> de până la 8 și valori I<lp> de până "
+"la 4. LZMA Utils poate decomprima fișiere cu orice I<lc> și I<lp>, dar "
+"creează întotdeauna fișiere cu B<lc=3> și B<lp=0>. Crearea de fișiere cu "
+"alte I<lc> și I<lp> este posibilă cu B<xz> și cu LZMA SDK."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2560
+msgid ""
+"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 B<xz>."
+msgstr ""
+"Implementarea filtrului LZMA1 în liblzma necesită ca suma I<lc> și I<lp> să "
+"nu depășească 4. Altfel, fișierele B<.lzma>, care depășesc această "
+"limitare, nu pot fi decomprimate cu B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2575
+msgid ""
+"LZMA Utils creates only B<.lzma> files which have a dictionary size of "
+"2^I<n> (a power of 2) but accepts files with any dictionary size. liblzma "
+"accepts only B<.lzma> files which have a dictionary size of 2^I<n> or 2^I<n> "
+"+ 2^(I<n>-1). This is to decrease false positives when detecting B<.lzma> "
+"files."
+msgstr ""
+"LZMA Utils creează numai fișiere B<.lzma> care au o dimensiune de dicționar "
+"de 2^I<n> (o putere de 2), dar acceptă fișiere cu orice dimensiune de "
+"dicționar. liblzma acceptă numai fișierele B<.lzma> care au dimensiunea de "
+"dicționar de 2^I<n> sau 2^I<n> + 2^(I<n>-1). Acest lucru este pentru a "
+"reduce numărul de „fals pozitiv” atunci când se detectează fișiere B<.lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2580
+msgid ""
+"These limitations shouldn't be a problem in practice, since practically all "
+"B<.lzma> files have been compressed with settings that liblzma will accept."
+msgstr ""
+"Aceste limitări nu ar trebui să fie o problemă în practică, deoarece practic "
+"toate fișierele B<.lzma> au fost comprimate cu opțiuni pe care liblzma le va "
+"accepta."
+
+#. type: SS
+#: ../src/xz/xz.1:2581
+#, no-wrap
+msgid "Trailing garbage"
+msgstr "Resturi rămase"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2591
+msgid ""
+"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."
+msgstr ""
+"Când decomprimă, LZMA Utils ignoră în tăcere totul după primul flux B<."
+"lzma>. În majoritatea situațiilor, aceasta este o eroare. Aceasta "
+"înseamnă, de asemenea, că LZMA Utils nu acceptă decomprimarea fișierelor B<."
+"lzma> concatenate."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2601
+msgid ""
+"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."
+msgstr ""
+"Dacă au rămas date după primul flux B<.lzma>, B<xz> consideră că fișierul "
+"este corupt, cu excepția cazului în care a fost utilizată opțiunea B<--"
+"single-stream>. Acest lucru poate rupe scripturile obscure(scrise "
+"deficitar) care presupun că resturile rămase sunt ignorate."
+
+#. type: SH
+#: ../src/xz/xz.1:2602 ../src/xzdec/xzdec.1:117
+#, no-wrap
+msgid "NOTES"
+msgstr "NOTE"
+
+#. type: SS
+#: ../src/xz/xz.1:2604
+#, no-wrap
+msgid "Compressed output may vary"
+msgstr "Rezultatul comprimării poate varia"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2615
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2625
+msgid ""
+"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."
+msgstr ""
+"Cele de mai sus înseamnă că odată ce opțiunea B<--rsyncable> 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."
+
+#. type: SS
+#: ../src/xz/xz.1:2626
+#, no-wrap
+msgid "Embedded .xz decompressors"
+msgstr "Instrumente de decomprimare .xz încorporate"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2643
+msgid ""
+"Embedded B<.xz> decompressor implementations like XZ Embedded don't "
+"necessarily support files created with integrity I<check> types other than "
+"B<none> and B<crc32>. Since the default is B<--check=crc64>, you must use "
+"B<--check=none> or B<--check=crc32> when creating files for embedded systems."
+msgstr ""
+"Implementările instrumentului de decomprimare B<.xz> încorporat, cum ar fi "
+"XZ Embedded, nu acceptă neapărat fișiere create cu tipuri de I<verificare> a "
+"integrității, altele decât B<none> și B<crc32>. Deoarece valoarea implicită "
+"este B<--check=crc64>, trebuie să utilizați B<--check=none> sau B<--"
+"check=crc32> atunci când creați fișiere pentru sistemele încorporate."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2653
+msgid ""
+"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."
+msgstr ""
+"În afara sistemelor încorporate, toate instrumentele de decomprimare în "
+"format B<.xz> acceptă toate tipurile de I<verificare> sau cel puțin pot "
+"decomprima fișierul fără a efectua verificarea integrității dacă acel tip de "
+"I<verificare> nu este acceptat."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2656
+msgid ""
+"XZ Embedded supports BCJ filters, but only with the default start offset."
+msgstr ""
+"XZ Embedded acceptă filtre BCJ, dar numai cu poziție de pornire implicită."
+
+#. type: SH
+#: ../src/xz/xz.1:2657
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "EXEMPLE"
+
+#. type: SS
+#: ../src/xz/xz.1:2659
+#, no-wrap
+msgid "Basics"
+msgstr "Bazice"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2669
+msgid ""
+"Compress the file I<foo> into I<foo.xz> using the default compression level "
+"(B<-6>), and remove I<foo> if compression is successful:"
+msgstr ""
+"Comprimă fișierul I<foo> în I<foo.xz> folosind nivelul de comprimare "
+"implicit (B<-6>) și elimină fișierul I<foo> dacă comprimarea are succes:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2674
+#, no-wrap
+msgid "CW<xz foo>\n"
+msgstr "CW<xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2685
+msgid ""
+"Decompress I<bar.xz> into I<bar> and don't remove I<bar.xz> even if "
+"decompression is successful:"
+msgstr ""
+"Decomprimă I<bar.xz> în I<bar> și nu elimină I<bar.xz> chiar dacă "
+"decomprimarea este efectuată cu succes:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2690
+#, no-wrap
+msgid "CW<xz -dk bar.xz>\n"
+msgstr "CW<xz -dk bar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2703
+msgid ""
+"Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+"slower than the default B<-6>, but needs less memory for compression and "
+"decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgstr ""
+"Creează I<baz.tar.xz> cu nivelul prestabilit B<-4e> (B<-4 --extreme>), care "
+"este mai lent decât nivelul prestabilit implicit B<-6>, dar necesită mai "
+"puțină memorie pentru comprimare și decomprimare (48Mio și, respectiv, 5Mio):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2708
+#, no-wrap
+msgid "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+msgstr "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2714
+msgid ""
+"A mix of compressed and uncompressed files can be decompressed to standard "
+"output with a single command:"
+msgstr ""
+"Un amestec de fișiere comprimate și necomprimate poate fi decomprimat la "
+"ieșirea standard cu o singură comandă:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2719
+#, no-wrap
+msgid "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+msgstr "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+
+#. type: SS
+#: ../src/xz/xz.1:2723
+#, no-wrap
+msgid "Parallel compression of many files"
+msgstr "Comprimarea în paralel a mai multor fișiere"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2729
+msgid ""
+"On GNU and *BSD, B<find>(1) and B<xargs>(1) can be used to parallelize "
+"compression of many files:"
+msgstr ""
+"În sisteme GNU și *BSD, B<find>(1) și B<xargs>(1) pot fi utilizate pentru a "
+"paraleliza comprimarea mai multor fișiere:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2735
+#, no-wrap
+msgid ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+msgstr ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2757
+msgid ""
+"The B<-P> option to B<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 B<xargs>(1) "
+"will eventually create."
+msgstr ""
+"Opțiunea B<-P> pentru comanda B<xargs>(1) stabilește numărul de procese "
+"paralele B<xz>. Cea mai bună valoare pentru opțiunea B<-n> 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 B<xz> pe care B<xargs>(1) le va crea în final."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2765
+msgid ""
+"The option B<-T1> for B<xz> is there to force it to single-threaded mode, "
+"because B<xargs>(1) is used to control the amount of parallelization."
+msgstr ""
+"Opțiunea B<-T1> pentru B<xz> este acolo pentru a-l forța să ruleze în modul "
+"cu un singur fir de execuție, deoarece B<xargs>(1) este folosit pentru a "
+"controla cantitatea de paralelizare."
+
+#. type: SS
+#: ../src/xz/xz.1:2766
+#, no-wrap
+msgid "Robot mode"
+msgstr "Modul robot"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2769
+msgid ""
+"Calculate how many bytes have been saved in total after compressing multiple "
+"files:"
+msgstr ""
+"Calculează câți octeți au fost salvați în total după comprimarea mai multor "
+"fișiere:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2774
+#, no-wrap
+msgid "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+msgstr "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2789
+msgid ""
+"A script may want to know that it is using new enough B<xz>. The following "
+"B<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:"
+msgstr ""
+"Un script poate dori să afle dacă folosește o versiune B<xz> suficient de "
+"nouă. Următorul script B<sh>(1) verifică dacă numărul versiunii "
+"instrumentului B<xz> este cel puțin 5.0.0. Această metodă este compatibilă "
+"cu versiunile beta vechi, care nu acceptau opțiunea B<--robot>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2798
+#, no-wrap
+msgid ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+msgstr ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Versiunea dumneavoastră de „xz” este prea veche!\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2805
+msgid ""
+"Set a memory usage limit for decompression using B<XZ_OPT>, but if a limit "
+"has already been set, don't increase it:"
+msgstr ""
+"Stabilește o limită de utilizare a memoriei pentru decomprimare folosind "
+"variabila de mediu B<XZ_OPT>, dar dacă o limită a fost deja stabilită, nu o "
+"mărește:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2815
+#, no-wrap
+msgid ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+msgstr ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2825
+msgid ""
+"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."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2833
+msgid ""
+"The CompCPU columns of the tables from the descriptions of the options "
+"B<-0> ... B<-9> and B<--extreme> are useful when customizing LZMA2 presets. "
+"Here are the relevant parts collected from those two tables:"
+msgstr ""
+"Coloanele CPUComp din tabelele de descriere a opțiunilor B<-0> ... B<-9> și "
+"B<--extreme> sunt utile atunci când personalizați opțiunilor prestabilite "
+"LZMA2. Iată părțile relevante colectate din aceste două tabele:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2858
+msgid ""
+"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:"
+msgstr ""
+"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 B<xz -8>, o opțiune prestabilită cu o valoare CPUComp scăzută "
+"(de exemplu, 1) poate fi modificată pentru a utiliza un dicționar mai mare:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2863
+#, no-wrap
+msgid "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+msgstr "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2879
+msgid ""
+"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."
+msgstr ""
+"Cu anumite fișiere, comanda de mai sus poate fi mai rapidă decât B<xz -6> î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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2886
+msgid ""
+"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:"
+msgstr ""
+"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 B<xz -9>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2891
+#, no-wrap
+msgid "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+msgstr "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2904
+msgid ""
+"Using B<-vv> (B<--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."
+msgstr ""
+"Utilizarea opțiunii B<-vv> (B<--verbose --verbose>) 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2916
+msgid ""
+"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> (B<-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 B<--"
+"check=crc32>) using about 100\\ KiB of memory."
+msgstr ""
+"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 B<-6e> (B<-6 --extreme>) ca bază și fixează dimensiunea "
+"dicționarului la doar 64Kio. Fișierul rezultat poate fi decomprimat cu XZ "
+"Embedded (de aceea există B<--check=crc32>) folosind aproximativ 100Kio de "
+"memorie."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2921
+#, no-wrap
+msgid "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+msgstr "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2944
+msgid ""
+"If you want to squeeze out as many bytes as possible, adjusting the number "
+"of literal context bits (I<lc>) and number of position bits (I<pb>) can "
+"sometimes help. Adjusting the number of literal position bits (I<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 B<lc=4>):"
+msgstr ""
+"Dacă doriți să stoarceți cât mai mulți octeți posibil, ajustarea numărului "
+"de biți de context literal (I<lc>) și a numărului de biți de poziție (I<pb>) "
+"poate ajuta uneori. Ajustarea numărului de biți de poziție literală (I<lp>) "
+"ar putea ajuta, de asemenea, dar de obicei I<lc> și I<pb> 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 B<xz -6e> (încercați și fără "
+"B<lc=4>):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2949
+#, no-wrap
+msgid "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+msgstr "CW<xz --lzma2=preset=6e,pb=0,lc=4 fișierul_sursă.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2957
+msgid ""
+"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:"
+msgstr ""
+"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:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2962
+#, no-wrap
+msgid "CW<xz --x86 --lzma2 libfoo.so>\n"
+msgstr "CW<xz --x86 --lzma2 libfoo.so>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2976
+msgid ""
+"Note that the order of the filter options is significant. If B<--x86> is "
+"specified after B<--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."
+msgstr ""
+"Rețineți că ordinea opțiunilor de filtrare este semnificativă. Dacă B<--"
+"x86> este specificată după B<--lzma2>, B<xz> 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."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2982
+msgid ""
+"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."
+msgstr ""
+"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ă."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2992
+msgid ""
+"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 B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to "
+"accommodate the three-byte alignment:"
+msgstr ""
+"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ă B<dist=3> și este, de asemenea, bine să pasați "
+"B<pb=0> la LZMA2 pentru a se adapta alinierii pe trei octeți:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2997
+#, no-wrap
+msgid "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+msgstr "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3005
+msgid ""
+"If multiple images have been put into a single archive (for example, B<."
+"tar>), the Delta filter will work on that too as long as all images have the "
+"same number of bytes per pixel."
+msgstr ""
+"Dacă mai multe imagini au fost introduse într-o singură arhivă (de exemplu, "
+"B<.tar>), 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."
+
+#. type: SH
+#: ../src/xz/xz.1:3006 ../src/xzdec/xzdec.1:143 ../src/lzmainfo/lzmainfo.1:59
+#: ../src/scripts/xzdiff.1:65 ../src/scripts/xzgrep.1:106
+#: ../src/scripts/xzless.1:65 ../src/scripts/xzmore.1:51
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "CONSULTAȚI ȘI"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3015
+msgid ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+msgstr ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3017
+msgid "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+msgstr "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3019 ../src/xzdec/xzdec.1:146
+msgid "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+msgstr "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3020
+msgid "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+msgstr "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "XZDEC"
+msgstr "XZDEC"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "2017-04-19"
+msgstr "19.04.2017"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:10
+msgid "xzdec, lzmadec - Small .xz and .lzma decompressors"
+msgstr "xzdec, lzmadec - Programe de decomprimare mici de fișiere .xz și .lzma"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:14
+msgid "B<xzdec> [I<option...>] [I<file...>]"
+msgstr "B<xzdec> [I<opțiune...>] [I<fișier...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:18
+msgid "B<lzmadec> [I<option...>] [I<file...>]"
+msgstr "B<lzmadec> [I<opțiune...>] [I<fișier...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:44
+msgid ""
+"B<xzdec> is a liblzma-based decompression-only tool for B<.xz> (and only B<."
+"xz>) files. B<xzdec> is intended to work as a drop-in replacement for "
+"B<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."
+msgstr ""
+"B<xzdec> este un instrument de decomprimare bazat pe liblzma pentru "
+"fișierele B<.xz> (și numai B<.xz>). B<xzdec> este destinat să funcționeze "
+"ca un înlocuitor pentru B<xz>(1) în cele mai frecvente situații în care un "
+"script a fost scris pentru a utiliza B<xz --decompress --stdout> (și posibil "
+"câteva alte opțiuni frecvent utilizate) pentru a decomprima fișierele B<."
+"xz>. B<lzmadec> este identic cu B<xzdec> cu excepția faptului că B<lzmadec> "
+"acceptă fișierele B<.lzma> în loc de fișierele B<.xz>."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:61
+msgid ""
+"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."
+msgstr ""
+"Pentru a reduce dimensiunea executabilului, B<xzdec> 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 "
+"B<XZ_DEFAULTS> și B<XZ_OPT>. B<xzdec> nu acceptă afișarea informațiilor "
+"intermediare de progres: trimiterea semnalului B<SIGINFO> la B<xzdec> nu "
+"face nimic, iar trimiterea semnalului B<SIGUSR1> încheie procesul în loc să "
+"afișeze informații despre progres."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:69
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> supports only decompression."
+msgstr ""
+"Ignorat pentru compatibilitate cu B<xz>(1). B<xzdec> acceptă numai "
+"decomprimarea."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:76
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never creates or removes any "
+"files."
+msgstr ""
+"Ignorat pentru compatibilitate cu B<xz>(1). B<xzdec> nu creează sau elimină "
+"niciodată niciun fișier."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:83
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> always writes the "
+"decompressed data to standard output."
+msgstr ""
+"Ignorat pentru compatibilitate cu B<xz>(1). B<xzdec> scrie întotdeauna "
+"datele decomprimate la ieșirea standard."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:89
+msgid ""
+"Specifying this once does nothing since B<xzdec> never displays any warnings "
+"or notices. Specify this twice to suppress errors."
+msgstr ""
+"Specificarea acestui lucru o dată nu face nimic, deoarece B<xzdec> nu "
+"afișează niciodată avertismente sau notificări. Specificați acest lucru de "
+"două ori pentru a suprima erorile."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:96
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never uses the exit status 2."
+msgstr ""
+"Ignorat pentru compatibilitate cu B<xz>(1). B<xzdec> nu folosește niciodată "
+"starea de ieșire 2."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:99
+msgid "Display a help message and exit successfully."
+msgstr "Afișează un mesaj de ajutor și iese cu succes."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:104
+msgid "Display the version number of B<xzdec> and liblzma."
+msgstr "Afișează numărul versiunii B<xzdec> și liblzma."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:108
+msgid "All was good."
+msgstr "Toate au fost bine."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:117
+msgid ""
+"B<xzdec> doesn't have any warning messages like B<xz>(1) has, thus the exit "
+"status 2 is not used by B<xzdec>."
+msgstr ""
+"B<xzdec> nu are niciun mesaj de avertizare precum B<xz>(1), astfel că starea "
+"de ieșire 2 nu este folosită de B<xzdec>."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:131
+msgid ""
+"Use B<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 B<xz>(1)."
+msgstr ""
+"Utilizați B<xz>(1) în loc de B<xzdec> sau B<lzmadec> pentru utilizarea "
+"normală de zi cu zi. B<xzdec> sau B<lzmadec> sunt destinate numai "
+"situațiilor în care este important să aveți un instrument de decomprimare "
+"mai mic decât B<xz>(1), cu funcții complete."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:143
+msgid ""
+"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."
+msgstr ""
+"B<xzdec> și B<lzmadec> 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 B<.xz> cu "
+"adevărat mic, luați în considerare utilizarea XZ Embedded."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:145 ../src/lzmainfo/lzmainfo.1:60
+msgid "B<xz>(1)"
+msgstr "B<xz>(1)"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7
+#, no-wrap
+msgid "LZMAINFO"
+msgstr "LZMAINFO"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "2013-06-30"
+msgstr "30.06.2013"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:10
+msgid "lzmainfo - show information stored in the .lzma file header"
+msgstr "lzmainfo - afișează informațiile stocate în antetul fișierului .lzma"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:15
+msgid "B<lzmainfo> [B<--help>] [B<--version>] [I<file...>]"
+msgstr "B<lzmainfo> [B<--help>] [B<--version>] [I<fișier...>]"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:31
+msgid ""
+"B<lzmainfo> shows information stored in the B<.lzma> file header. It reads "
+"the first 13 bytes from the specified I<file>, decodes the header, and "
+"prints it to standard output in human readable format. If no I<files> are "
+"given or I<file> is B<->, standard input is read."
+msgstr ""
+"B<lzmainfo> afișează informațiile stocate în antetul fișierului B<.lzma>. "
+"Citește primii 13 octeți din I<fișierul> specificat, decodifică antetul și "
+"îl afișează la ieșirea standard în format care poate fi citit de om. Dacă "
+"nu sunt date I<fișiere> sau dacă I<fișier> este B<->, se citește intrarea "
+"standard."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:40
+msgid ""
+"Usually the most interesting information is the uncompressed size and the "
+"dictionary size. Uncompressed size can be shown only if the file is in the "
+"non-streamed B<.lzma> format variant. The amount of memory required to "
+"decompress the file is a few dozen kilobytes plus the dictionary size."
+msgstr ""
+"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 B<.lzma> netransmis în flux. "
+"Cantitatea de memorie necesară pentru a decomprima fișierul este de câteva "
+"zeci de kiloocteți plus dimensiunea dicționarului."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:44
+msgid ""
+"B<lzmainfo> is included in XZ Utils primarily for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"B<lzmainfo> este inclus în XZ Utils în primul rând pentru compatibilitatea "
+"cu LZMA Utils."
+
+#. type: SH
+#: ../src/lzmainfo/lzmainfo.1:51 ../src/scripts/xzdiff.1:74
+#, no-wrap
+msgid "BUGS"
+msgstr "ERORI"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:59
+msgid ""
+"B<lzmainfo> uses B<MB> while the correct suffix would be B<MiB> (2^20 "
+"bytes). This is to keep the output compatible with LZMA Utils."
+msgstr ""
+"B<lzmainfo> folosește sufixul B<MB> în timp ce sufixul corect ar fi B<MiB> "
+"(2^20 octeți). Acest lucru este pentru a menține ieșirea compatibilă cu "
+"LZMA Utils."
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "XZDIFF"
+msgstr "XZDIFF"
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "2021-06-04"
+msgstr "04.06.2021"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:12
+msgid "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files"
+msgstr "xzcmp, xzdiff, lzcmp, lzdiff - compară fișierele comprimate"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:15
+msgid "B<xzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<xzcmp> [I<opțiuni_comparare>] I<fișier1> [I<fișier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:18
+msgid "B<xzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<xzdiff> [I<opțiuni_diferențe>] I<fișier1> [I<fișier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:21
+msgid "B<lzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<lzcmp> [I<opțiuni_comparare>] I<fișier1> [I<fișier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:24
+msgid "B<lzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<lzdiff> [I<opțiuni_diferențe>] I<fișier1> [I<fișier2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:59
+msgid ""
+"B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files compressed "
+"with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), or "
+"B<zstd>(1). All options specified are passed directly to B<cmp>(1) or "
+"B<diff>(1). If only one file is specified, then the files compared are "
+"I<file1> (which must have a suffix of a supported compression format) and "
+"I<file1> from which the compression format suffix has been stripped. If two "
+"files are specified, then they are uncompressed if necessary and fed to "
+"B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or B<diff>(1) is "
+"preserved unless a decompression error occurs; then exit status is 2."
+msgstr ""
+"B<xzcmp> și B<xzdiff> invocă B<cmp>(1) sau B<diff>(1) pentru fișierele "
+"comprimate cu B<xz>(1), B<lzma>(1), B<gzip>( 1), B<bzip2>(1), B<lzop>(1) sau "
+"B<zstd>(1). Toate opțiunile specificate sunt transmise direct către "
+"B<cmp>(1) sau B<diff>(1). Dacă este specificat un singur fișier, atunci "
+"fișierele comparate sunt I<fișier1> (care trebuie să aibă un sufix al unui "
+"format de comprimare acceptat) și I<fișier1> din care a fost eliminat "
+"sufixul formatului de comprimare. Dacă sunt specificate două fișiere, "
+"atunci acestea sunt decomprimate dacă este necesar și introduse în B<cmp>(1) "
+"sau B<diff>(1). Starea de ieșire din B<cmp>(1) sau B<diff>(1) este păstrată "
+"cu excepția cazului în care apare o eroare de decomprimare; atunci starea de "
+"ieșire este 2."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:65
+msgid ""
+"The names B<lzcmp> and B<lzdiff> are provided for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"Numele B<lzcmp> și B<lzdiff> sunt furnizate pentru compatibilitatea cu LZMA "
+"Utils."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:74
+msgid ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+msgstr ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:79
+msgid ""
+"Messages from the B<cmp>(1) or B<diff>(1) programs refer to temporary "
+"filenames instead of those specified."
+msgstr ""
+"Mesajele din programele B<cmp>(1) sau B<diff>(1) se referă la nume de "
+"fișiere temporare în loc de cele specificate."
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "XZGREP"
+msgstr "XZGREP"
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "2022-07-19"
+msgstr "19.07.2022"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:12
+msgid "xzgrep - search compressed files for a regular expression"
+msgstr "xzgrep - caută în fișierele comprimate pentru o expresie regulată"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:18
+msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> [I<file...>]"
+msgstr "B<xzgrep> [I<opțiuni_grep>] [B<-e>] I<model> [I<fișier...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:21
+msgid "B<xzegrep> \\&..."
+msgstr "B<xzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:24
+msgid "B<xzfgrep> \\&..."
+msgstr "B<xzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:27
+msgid "B<lzgrep> \\&..."
+msgstr "B<lzgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:30
+msgid "B<lzegrep> \\&..."
+msgstr "B<lzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:33
+msgid "B<lzfgrep> \\&..."
+msgstr "B<lzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:49
+msgid ""
+"B<xzgrep> invokes B<grep>(1) on I<files> which may be either uncompressed "
+"or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), or B<zstd>(1). All options specified are passed directly to "
+"B<grep>(1)."
+msgstr ""
+"B<xzgrep> invocă B<grep>(1) pentru I<fișiere> care pot să fie decomprimate "
+"sau comprimate cu B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1) "
+"sau B<zstd>(1). Toate opțiunile specificate sunt transmise direct către "
+"B<grep>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:62
+msgid ""
+"If no I<file> is specified, then standard input is decompressed if necessary "
+"and fed to B<grep>(1). When reading from standard input, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), and B<zstd>(1) compressed files are not supported."
+msgstr ""
+"Dacă nu este specificat I<fișier>, atunci intrarea standard este "
+"decomprimată dacă este necesar și alimentează B<grep>(1). La citirea din "
+"intrarea standard, fișierele comprimate B<gzip>(1), B<bzip2>(1), B<lzop>(1) "
+"și B<zstd>(1) nu sunt acceptate."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:81
+msgid ""
+"If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<grep -E> or "
+"B<grep -F> is used instead of B<grep>(1). The same applies to names "
+"B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+"compatibility with LZMA Utils."
+msgstr ""
+"Dacă B<xzgrep> este invocat ca B<xzegrep> sau B<xzfgrep>, atunci este "
+"folosit B<grep -E> sau B<grep -F> în loc de B<grep>(1). Același lucru este "
+"valabil și pentru comenzile B<lzgrep>, B<lzegrep> și B<lzfgrep>, care sunt "
+"furnizate pentru compatibilitate cu LZMA Utils."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:86
+msgid ""
+"At least one match was found from at least one of the input files. No "
+"errors occurred."
+msgstr ""
+"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."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:90
+msgid "No matches were found from any of the input files. No errors occurred."
+msgstr ""
+"Nu au fost găsite potriviri din niciunul dintre fișierele de la intrare. Nu "
+"au apărut erori."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:90
+#, no-wrap
+msgid "E<gt>1"
+msgstr "E<gt>1"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:94
+msgid "One or more errors occurred. It is unknown if matches were found."
+msgstr ""
+"A apărut una sau mai multe erori. Nu se cunoaște dacă au fost găsite "
+"potriviri."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:95
+#, no-wrap
+msgid "B<GREP>"
+msgstr "B<GREP>"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:106
+msgid ""
+"If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+"B<grep>(1), B<grep -E>, or B<grep -F>."
+msgstr ""
+"Dacă variabila de mediu B<GREP> este definită, B<xzgrep> o folosește în loc "
+"de B<grep>(1), B<grep -E> sau B<grep -F>."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:113
+msgid ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+msgstr ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "XZLESS"
+msgstr "XZLESS"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "2010-09-27"
+msgstr "27.09.2010"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:13
+msgid "xzless, lzless - view xz or lzma compressed (text) files"
+msgstr "xzless, lzless - vizualizează fișierele (text) comprimate xz sau lzma"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:16
+msgid "B<xzless> [I<file>...]"
+msgstr "B<xzless> [I<fișier>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:19
+msgid "B<lzless> [I<file>...]"
+msgstr "B<lzless> [I<fișier>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:31
+msgid ""
+"B<xzless> is a filter that displays text from compressed files to a "
+"terminal. It works on files compressed with B<xz>(1) or B<lzma>(1). If no "
+"I<files> are given, B<xzless> reads from standard input."
+msgstr ""
+"B<xzless> este un filtru care afișează textul din fișierele comprimate pe un "
+"terminal. Funcționează pentru fișiere comprimate cu B<xz>(1) sau "
+"B<lzma>(1). Dacă nu sunt date I<fișiere>, B<xzless> citește de la intrarea "
+"standard."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:48
+msgid ""
+"B<xzless> uses B<less>(1) to present its output. Unlike B<xzmore>, its "
+"choice of pager cannot be altered by setting an environment variable. "
+"Commands are based on both B<more>(1) and B<vi>(1) and allow back and "
+"forth movement and searching. See the B<less>(1) manual for more "
+"information."
+msgstr ""
+"B<xzless> folosește B<less>(1) pentru a-și prezenta rezultatul. Spre "
+"deosebire de B<xzmore>, alegerea sa de pager nu poate fi modificată prin "
+"definirea unei variabile de mediu. Comenzile se bazează atât pe B<more>(1) "
+"cât și pe B<vi>(1) și permit mișcarea înainte și înapoi și căutarea. "
+"Consultați manualul B<less>(1) pentru mai multe informații."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:52
+msgid ""
+"The command named B<lzless> is provided for backward compatibility with LZMA "
+"Utils."
+msgstr ""
+"Comanda numită B<lzless> este furnizată pentru compatibilitatea cu LZMA "
+"Utils."
+
+#. type: TP
+#: ../src/scripts/xzless.1:53
+#, no-wrap
+msgid "B<LESSMETACHARS>"
+msgstr "B<LESSMETACHARS>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:59
+msgid ""
+"A list of characters special to the shell. Set by B<xzless> unless it is "
+"already set in the environment."
+msgstr ""
+"O listă de caractere speciale pentru shell. Definită de B<xzless>, cu "
+"excepția cazului în care este deja definită în mediu."
+
+#. type: TP
+#: ../src/scripts/xzless.1:59
+#, no-wrap
+msgid "B<LESSOPEN>"
+msgstr "B<LESSOPEN>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:65
+msgid ""
+"Set to a command line to invoke the B<xz>(1) decompressor for preprocessing "
+"the input files to B<less>(1)."
+msgstr ""
+"Aceasta este definită în linia de comandă pentru a invoca instrumentul de "
+"decomprimare B<xz>(1) pentru preprocesarea fișierelor de intrare pentru "
+"B<less>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:69
+msgid "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+msgstr "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+
+#. type: TH
+#: ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZMORE"
+msgstr "XZMORE"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:10
+msgid "xzmore, lzmore - view xz or lzma compressed (text) files"
+msgstr "xzmore, lzmore - vizualizează fișierele (text) comprimate xz sau lzma"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:13
+msgid "B<xzmore> [I<file...>]"
+msgstr "B<xzmore> [I<fișier...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:16
+msgid "B<lzmore> [I<file...>]"
+msgstr "B<lzmore> [I<fișier...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:24
+msgid ""
+"B<xzmore> is a filter which allows examination of B<xz>(1) or B<lzma>(1) "
+"compressed text files one screenful at a time on a soft-copy terminal."
+msgstr ""
+"B<xzmore> este un filtru care vă permite să examinați conținutul fișierelor "
+"text comprimate B<xz>(1) sau B<lzma>(1), câte o pagină pe ecran, pe un "
+"terminal."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:33
+msgid ""
+"To use a pager other than the default B<more,> set environment variable "
+"B<PAGER> to the name of the desired program. The name B<lzmore> is provided "
+"for backward compatibility with LZMA Utils."
+msgstr ""
+"Pentru a utiliza un paginator, altul decât paginatorul implicit B<more>, "
+"definiți variabila de mediu B<PAGER> cu numele programului dorit. Comanda "
+"B<lzmore> este furnizată pentru compatibilitatea cu LZMA Utils."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:33
+#, no-wrap
+msgid "B<e> or B<q>"
+msgstr "B<e> sau B<q>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:40
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to exit."
+msgstr ""
+"Când linia --More--(Fișierul următor: I<fișier>) este afișată, această "
+"comandă face ca B<xzmore> să iasă."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:40
+#, no-wrap
+msgid "B<s>"
+msgstr "B<s>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:47
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to skip the next file and continue."
+msgstr ""
+"Când linia --More--(Fișierul următor: I<fișier>) este afișată, această "
+"comandă face ca B<xzmore> să omită următorul fișier și să continue."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:51
+msgid ""
+"For list of keyboard commands supported while actually viewing the content "
+"of a file, refer to manual of the pager you use, usually B<more>(1)."
+msgstr ""
+"Pentru lista comenzilor de la tastatură acceptate în timp ce vizualizați "
+"conținutul unui fișier, consultați manualul paginatorului pe care îl "
+"utilizați, de obicei B<more>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:55
+msgid "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+msgstr "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+
+#~ msgid "2022-12-01"
+#~ msgstr "01.12.2022"
+
+#~ msgid "2020-02-01"
+#~ msgstr "01.02.2020"
diff --git a/po4a/uk.po b/po4a/uk.po
new file mode 100644
index 0000000..0aa366a
--- /dev/null
+++ b/po4a/uk.po
@@ -0,0 +1,5760 @@
+# Ukrainian translation for xz-man.
+# This file is distributed under the same license as the XZ Utils package.
+# This file is put in the public domain.
+#
+# Yuri Chornoivan <yurchor@ukr.net>, 2022, 2023.
+msgid ""
+msgstr ""
+"Project-Id-Version: xz-man-5.4.4-pre1\n"
+"POT-Creation-Date: 2023-11-01 20:27+0800\n"
+"PO-Revision-Date: 2023-07-19 20:55+0300\n"
+"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
+"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\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 20.12.0\n"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "XZ"
+msgstr "XZ"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "2023-07-17"
+msgstr "17 липня 2023 року"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "Tukaani"
+msgstr "Tukaani"
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZ Utils"
+msgstr "XZ Utils"
+
+#. type: SH
+#: ../src/xz/xz.1:11 ../src/xzdec/xzdec.1:8 ../src/lzmainfo/lzmainfo.1:8
+#: ../src/scripts/xzdiff.1:10 ../src/scripts/xzgrep.1:10
+#: ../src/scripts/xzless.1:11 ../src/scripts/xzmore.1:8
+#, no-wrap
+msgid "NAME"
+msgstr "НАЗВА"
+
+#. type: Plain text
+#: ../src/xz/xz.1:13
+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:14 ../src/xzdec/xzdec.1:10 ../src/lzmainfo/lzmainfo.1:10
+#: ../src/scripts/xzdiff.1:12 ../src/scripts/xzgrep.1:12
+#: ../src/scripts/xzless.1:13 ../src/scripts/xzmore.1:10
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr "КОРОТКИЙ ОПИС"
+
+#. type: Plain text
+#: ../src/xz/xz.1:18
+msgid "B<xz> [I<option...>] [I<file...>]"
+msgstr "B<xz> [I<параметр...>] [I<файл...>]"
+
+#. type: SH
+#: ../src/xz/xz.1:19
+#, no-wrap
+msgid "COMMAND ALIASES"
+msgstr "СКОРОЧЕННЯ КОМАНД"
+
+#. type: Plain text
+#: ../src/xz/xz.1:23
+msgid "B<unxz> is equivalent to B<xz --decompress>."
+msgstr "B<unxz> є рівноцінним до B<xz --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:27
+msgid "B<xzcat> is equivalent to B<xz --decompress --stdout>."
+msgstr "B<xzcat> є рівноцінним до B<xz --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:31
+msgid "B<lzma> is equivalent to B<xz --format=lzma>."
+msgstr "B<lzma> є рівноцінним до B<xz --format=lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:35
+msgid "B<unlzma> is equivalent to B<xz --format=lzma --decompress>."
+msgstr "B<unlzma> є рівноцінним до B<xz --format=lzma --decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:39
+msgid "B<lzcat> is equivalent to B<xz --format=lzma --decompress --stdout>."
+msgstr "B<lzcat> є рівноцінним до B<xz --format=lzma --decompress --stdout>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:51
+msgid ""
+"When writing scripts that need to decompress files, it is recommended to "
+"always use the name B<xz> with appropriate arguments (B<xz -d> or B<xz -"
+"dc>) instead of the names B<unxz> and B<xzcat>."
+msgstr ""
+"При написанні скриптів, де потрібно розпаковувати файли, рекомендуємо завжди "
+"використовувати B<xz> із відповідними аргументами (B<xz -d> або B<xz -dc>), "
+"замість B<unxz> і B<xzcat>."
+
+#. type: SH
+#: ../src/xz/xz.1:52 ../src/xzdec/xzdec.1:18 ../src/lzmainfo/lzmainfo.1:15
+#: ../src/scripts/xzdiff.1:24 ../src/scripts/xzgrep.1:33
+#: ../src/scripts/xzless.1:19 ../src/scripts/xzmore.1:16
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr "ОПИС"
+
+#. type: Plain text
+#: ../src/xz/xz.1:71
+msgid ""
+"B<xz> is a general-purpose data compression tool with command line syntax "
+"similar to B<gzip>(1) and B<bzip2>(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<lzip> is supported."
+msgstr ""
+"B<xz> інструмент загального призначення для стискання даних із синтаксисом "
+"командного рядка, подібним для B<gzip>(1) і B<bzip2>(1). Власним форматом "
+"файлів є B<.xz>, але передбачено підтримку застарілого формату B<.lzma>, "
+"який було використано у LZMA Utils, та необроблених потоків стиснених даних "
+"без заголовків формату контейнера. Крім того, передбачено підтримку "
+"розпаковування формату B<.lz>, який використано у B<lzip>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:93
+msgid ""
+"B<xz> compresses or decompresses each I<file> according to the selected "
+"operation mode. If no I<files> are given or I<file> is B<->, B<xz> reads "
+"from standard input and writes the processed data to standard output. B<xz> "
+"will refuse (display an error and skip the I<file>) to write compressed "
+"data to standard output if it is a terminal. Similarly, B<xz> will refuse "
+"to read compressed data from standard input if it is a terminal."
+msgstr ""
+"B<xz> стискає або розпаковує кожен I<файл> відповідно до вибраного режиму "
+"дій. Якщо I<файли> не задано або якщо I<файлом> є B<->, B<xz> читатиме дані "
+"зі стандартного джерела вхідних даних і записуватиме оброблені дані до "
+"стандартного виведення. B<xz> відмовить (покаже повідомлення про помилку і "
+"пропустить I<файл>) у записів стиснених даних до стандартного виведення, "
+"якщо це термінал. Так само, B<xz> відмовить у читанні стиснених даних зі "
+"стандартного джерела вхідних даних, якщо це термінал."
+
+#. type: Plain text
+#: ../src/xz/xz.1:103
+msgid ""
+"Unless B<--stdout> is specified, I<files> other than B<-> are written to a "
+"new file whose name is derived from the source I<file> name:"
+msgstr ""
+"Якщо не вказано B<--stdout>, I<файли>, відмінні від B<->, буде записано до "
+"нового файла, чию назву буде визначено з назви початкового I<файла>:"
+
+#. type: IP
+#: ../src/xz/xz.1:103 ../src/xz/xz.1:109 ../src/xz/xz.1:134 ../src/xz/xz.1:139
+#: ../src/xz/xz.1:142 ../src/xz/xz.1:145 ../src/xz/xz.1:161 ../src/xz/xz.1:422
+#: ../src/xz/xz.1:425 ../src/xz/xz.1:432 ../src/xz/xz.1:677 ../src/xz/xz.1:679
+#: ../src/xz/xz.1:778 ../src/xz/xz.1:789 ../src/xz/xz.1:798 ../src/xz/xz.1:806
+#: ../src/xz/xz.1:1034 ../src/xz/xz.1:1043 ../src/xz/xz.1:1055
+#: ../src/xz/xz.1:1729 ../src/xz/xz.1:1735 ../src/xz/xz.1:1853
+#: ../src/xz/xz.1:1857 ../src/xz/xz.1:1860 ../src/xz/xz.1:1863
+#: ../src/xz/xz.1:1867 ../src/xz/xz.1:1874 ../src/xz/xz.1:1876
+#, no-wrap
+msgid "\\(bu"
+msgstr "\\(bu"
+
+#. type: Plain text
+#: ../src/xz/xz.1:109
+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:124
+msgid ""
+"When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from "
+"the filename to get the target filename. B<xz> 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<xz> розпізнає "
+"суфікси B<.txz> і B<.tlz> і замінює їх на суфікс B<.tar>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:128
+msgid ""
+"If the target file already exists, an error is displayed and the I<file> is "
+"skipped."
+msgstr ""
+"Якщо файл призначення вже існує, буде показано повідомлення про помилку, а "
+"I<файл> буде пропущено."
+
+#. type: Plain text
+#: ../src/xz/xz.1:134
+msgid ""
+"Unless writing to standard output, B<xz> will display a warning and skip the "
+"I<file> if any of the following applies:"
+msgstr ""
+"Окрім випадку запису до стандартного виведення, B<xz> покаже попередження і "
+"пропустить обробку I<файла>, якщо буде виконано будь-яку з таких умов:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:139
+msgid ""
+"I<File> 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:142
+msgid "I<File> has more than one hard link."
+msgstr "На I<файл> існує декілька жорстких посилань."
+
+#. type: Plain text
+#: ../src/xz/xz.1:145
+msgid "I<File> has setuid, setgid, or sticky bit set."
+msgstr "Для I<файла> встановлено setuid, setgid або «липкий» біт."
+
+#. type: Plain text
+#: ../src/xz/xz.1:161
+msgid ""
+"The operation mode is set to compress and the I<file> 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:171
+msgid ""
+"The operation mode is set to decompress and the I<file> 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:186
+msgid ""
+"After successfully compressing or decompressing the I<file>, B<xz> copies "
+"the owner, group, permissions, access time, and modification time from the "
+"source I<file> 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<file>. B<xz> "
+"doesn't support copying other metadata like access control lists or extended "
+"attributes yet."
+msgstr ""
+"Після успішного стискання або розпаковування I<файла>, B<xz> копіює дані "
+"щодо власника, групи, прав доступу, часу доступу та моменту внесення змін з "
+"початкового I<файла> до файла призначення. Якщо копіювання даних щодо групи "
+"зазнає невдачі, права доступу буде змінено так, що файл призначення стане "
+"недоступним для користувачів, які не мають права доступу до початкового "
+"I<файла>. В B<xz> ще не передбачено підтримки копіювання інших метаданих, "
+"зокрема списків керування доступом або розширених атрибутів."
+
+#. type: Plain text
+#: ../src/xz/xz.1:196
+msgid ""
+"Once the target file has been successfully closed, the source I<file> is "
+"removed unless B<--keep> was specified. The source I<file> 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:208
+msgid ""
+"Sending B<SIGINFO> or B<SIGUSR1> to the B<xz> 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<SIGINFO> або B<SIGUSR1> до процесу B<xz> призводить до "
+"виведення даних щодо поступу до стандартного виведення помилок. Це має лише "
+"обмежене використання, оскільки якщо стандартним виведенням помилок є "
+"термінал, використання B<--verbose> призведе до показу автоматично "
+"оновлюваного індикатора поступу."
+
+#. type: SS
+#: ../src/xz/xz.1:209
+#, no-wrap
+msgid "Memory usage"
+msgstr "Використання пам'яті"
+
+#. type: Plain text
+#: ../src/xz/xz.1:225
+msgid ""
+"The memory usage of B<xz> 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<xz -9> 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<xz> пам'яті може бути різним: від декількох сотень кілобайтів "
+"до декількох гігабайтів, залежно від параметрів стискання. Параметри, які "
+"використано при стисканні файла, визначають вимоги до об'єму пам'яті при "
+"розпакуванні. Типово, засобу розпаковування потрібно від 5\\ % до 20\\ % "
+"об'єму пам'яті, якого засіб стискання потребує при створенні файла. "
+"Наприклад, розпаковування файла, який створено з використанням B<xz -9>, у "
+"поточній версії потребує 65\\ МіБ пам'яті. Втім, можливе створення файлів B<."
+"xz>, які потребуватимуть для розпаковування декількох гігабайтів пам'яті."
+
+#. type: Plain text
+#: ../src/xz/xz.1:237
+msgid ""
+"Especially users of older systems may find the possibility of very large "
+"memory usage annoying. To prevent uncomfortable surprises, B<xz> 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<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(2))."
+msgstr ""
+"Ймовірність високого рівня використання пам'яті може бути особливо "
+"дошкульною для користувачів застарілих комп'ютерів. Щоб запобігти прикрим "
+"несподіванкам, у B<xz> передбачено вбудований обмежувач пам'яті, який типово "
+"вимкнено. Хоча у деяких операційних системах передбачено спосіб обмежити "
+"використання пам'яті процесами, сподівання на його ефективність не є аж "
+"надто гнучким (наприклад, використання B<ulimit>(1) для обмеження "
+"віртуальної пам'яті призводить до викривлення даних B<mmap>(2))."
+
+#. type: Plain text
+#: ../src/xz/xz.1:259
+msgid ""
+"The memory usage limiter can be enabled with the command line option B<--"
+"memlimit=>I<limit>. Often it is more convenient to enable the limiter by "
+"default by setting the environment variable B<XZ_DEFAULTS>, for example, "
+"B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+"separately for compression and decompression by using B<--memlimit-"
+"compress=>I<limit> and B<--memlimit-decompress=>I<limit>. Using these two "
+"options outside B<XZ_DEFAULTS> is rarely useful because a single run of "
+"B<xz> cannot do both compression and decompression and B<--"
+"memlimit=>I<limit> (or B<-M> I<limit>) is shorter to type on the command "
+"line."
+msgstr ""
+"Обмежувач пам'яті можна увімкнути за допомогою параметра командного рядка "
+"B<--memlimit=>I<обмеження>. Часто, зручніше увімкнути обмежувач на типовому "
+"рівні, встановивши значення для змінної середовища B<XZ_DEFAULTS>, "
+"наприклад, B<XZ_DEFAULTS=--memlimit=150MiB>. Можна встановити обмеження "
+"окремо для стискання і розпакування за допомогою B<--memlimit-"
+"compress=>I<limit> and B<--memlimit-decompress=>I<обмеження>. Використання "
+"цих двох параметрів поза B<XZ_DEFAULTS> не таке вже і корисне, оскільки "
+"одноразовий запуск B<xz> не може одночасно призводити до стискання та "
+"розпаковування, а набрати у командному рядку B<--memlimit=>I<обмеження> (або "
+"B<-M> I<обмеження>) набагато швидше."
+
+#. type: Plain text
+#: ../src/xz/xz.1:278
+msgid ""
+"If the specified memory usage limit is exceeded when decompressing, B<xz> "
+"will display an error and decompressing the file will fail. If the limit is "
+"exceeded when compressing, B<xz> 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<xz -9>, the settings will be scaled down only "
+"a little, not all the way down to B<xz -8>."
+msgstr ""
+"Якщо під час розпаковування вказане обмеження буде перевищено, B<xz> покаже "
+"повідомлення про помилку, а розпаковування файла зазнає невдачі. Якщо "
+"обмеження буде перевищено при стисканні, B<xz> спробує масштабувати "
+"параметри так, щоб не перевищувати обмеження (окрім випадків використання "
+"B<--format=raw> або B<--no-adjust>). Отже, дію буде виконано, якщо обмеження "
+"не є надто жорстким. Масштабування параметрів буде виконано кроками, які не "
+"збігаються із рівнями шаблонів стискання. Наприклад, якщо обмеження лише "
+"трохи не вкладається у об'єм потрібний для B<xz -9>, параметри буде змінено "
+"лише трохи, не до рівня B<xz -8>."
+
+#. type: SS
+#: ../src/xz/xz.1:279
+#, no-wrap
+msgid "Concatenation and padding with .xz files"
+msgstr "Поєднання і заповнення з файлами .xz"
+
+#. type: Plain text
+#: ../src/xz/xz.1:287
+msgid ""
+"It is possible to concatenate B<.xz> files as is. B<xz> will decompress "
+"such files as if they were a single B<.xz> file."
+msgstr ""
+"Можна поєднати файли B<.xz> без додаткової обробки. B<xz> розпакує такі "
+"файли так, наче вони є єдиним файлом B<.xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:296
+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:300
+msgid ""
+"Concatenation and padding are not allowed with B<.lzma> files or raw streams."
+msgstr ""
+"Поєднання та заповнення не можна використовувати для файлів B<.lzma> або "
+"потоків необроблених даних."
+
+#. type: SH
+#: ../src/xz/xz.1:301 ../src/xzdec/xzdec.1:61
+#, no-wrap
+msgid "OPTIONS"
+msgstr "ПАРАМЕТРИ"
+
+#. type: SS
+#: ../src/xz/xz.1:303
+#, no-wrap
+msgid "Integer suffixes and special values"
+msgstr "Цілочисельні суфікси і спеціальні значення"
+
+#. type: Plain text
+#: ../src/xz/xz.1:307
+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:307
+#, no-wrap
+msgid "B<KiB>"
+msgstr "B<KiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:318
+msgid ""
+"Multiply the integer by 1,024 (2^10). B<Ki>, B<k>, B<kB>, B<K>, and B<KB> "
+"are accepted as synonyms for B<KiB>."
+msgstr ""
+"Помножити ціле число на 1024 (2^10). Синонімами B<KiB> є B<Ki>, B<k>, B<kB>, "
+"B<K> та B<KB>."
+
+#. type: TP
+#: ../src/xz/xz.1:318
+#, no-wrap
+msgid "B<MiB>"
+msgstr "B<MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:328
+msgid ""
+"Multiply the integer by 1,048,576 (2^20). B<Mi>, B<m>, B<M>, and B<MB> are "
+"accepted as synonyms for B<MiB>."
+msgstr ""
+"Помножити ціле число на 1048576 (2^20). Синонімами B<MiB> є B, B<Mi>, B<m>, "
+"B<M> та B<MB>."
+
+#. type: TP
+#: ../src/xz/xz.1:328
+#, no-wrap
+msgid "B<GiB>"
+msgstr "B<GiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:338
+msgid ""
+"Multiply the integer by 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, and B<GB> "
+"are accepted as synonyms for B<GiB>."
+msgstr ""
+"Помножити ціле число на 1073741824 (2^30). Синонімами B<GiB> є B, B<Gi>, "
+"B<g>, B<G> та B<GB>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:343
+msgid ""
+"The special value B<max> can be used to indicate the maximum integer value "
+"supported by the option."
+msgstr ""
+"Можна скористатися особливим значенням B<max> для позначення максимального "
+"цілого значення, підтримку якого передбачено для параметра."
+
+#. type: SS
+#: ../src/xz/xz.1:344
+#, no-wrap
+msgid "Operation mode"
+msgstr "Режим операції"
+
+#. type: Plain text
+#: ../src/xz/xz.1:347
+msgid ""
+"If multiple operation mode options are given, the last one takes effect."
+msgstr ""
+"Якщо вказано декілька параметрів режиму дій, буде використано лише останній "
+"з них."
+
+#. type: TP
+#: ../src/xz/xz.1:347
+#, no-wrap
+msgid "B<-z>, B<--compress>"
+msgstr "B<-z>, B<--compress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:356
+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<unxz> implies B<--decompress>)."
+msgstr ""
+"Стиснути. Це типовий режим дій, якщо не вказано параметр режиму дій, а назва "
+"команди неявним чином не визначає іншого режиму дій (наприклад, B<unxz> "
+"неявно визначає B<--decompress>)."
+
+#. type: TP
+#: ../src/xz/xz.1:356 ../src/xzdec/xzdec.1:62
+#, no-wrap
+msgid "B<-d>, B<--decompress>, B<--uncompress>"
+msgstr "B<-d>, B<--decompress>, B<--uncompress>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:359
+msgid "Decompress."
+msgstr "Розпакувати."
+
+#. type: TP
+#: ../src/xz/xz.1:359
+#, no-wrap
+msgid "B<-t>, B<--test>"
+msgstr "B<-t>, B<--test>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:368
+msgid ""
+"Test the integrity of compressed I<files>. 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:368
+#, no-wrap
+msgid "B<-l>, B<--list>"
+msgstr "B<-l>, B<--list>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:377
+msgid ""
+"Print information about compressed I<files>. 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<файли>. Розпакування даних не "
+"виконуватиметься, жодних файлів не буде створено або вилучено. У режимі "
+"списку програма не може читати дані зі стандартного введення або з інших "
+"джерел, де неможливе позиціювання."
+
+#. type: Plain text
+#: ../src/xz/xz.1:392
+msgid ""
+"The default listing shows basic information about I<files>, 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<less\\ -S> may be convenient if the terminal isn't wide enough."
+msgstr ""
+"У типовому списку буде показано базові відомості щодо файлів I<файли>, по "
+"одному файлу на рядок. Щоб отримати докладніші відомості, скористайтеся "
+"параметром B<--verbose>. Щоб розширити спектр відомостей, скористайтеся "
+"параметром B<--verbose> двічі, але зауважте, що це може призвести до "
+"значного уповільнення роботи, оскільки отримання додаткових відомостей "
+"потребує великої кількості позиціювань. Ширина області докладного виведення "
+"даних перевищує 80 символів, тому передавання конвеєром виведених даних, "
+"наприклад, до B<less\\ -S>, може бути зручним способом перегляду даних, якщо "
+"термінал недостатньо широкий."
+
+#. type: Plain text
+#: ../src/xz/xz.1:399
+msgid ""
+"The exact output may vary between B<xz> versions and different locales. For "
+"machine-readable output, B<--robot --list> should be used."
+msgstr ""
+"Виведені дані залежать від версії B<xz> та використаної локалі. Для "
+"отримання даних, які будуть придатні до обробки комп'ютером, слід "
+"скористатися параметрами B<--robot --list>."
+
+#. type: SS
+#: ../src/xz/xz.1:400
+#, no-wrap
+msgid "Operation modifiers"
+msgstr "Модифікатори режиму роботи"
+
+#. type: TP
+#: ../src/xz/xz.1:401 ../src/xzdec/xzdec.1:69
+#, no-wrap
+msgid "B<-k>, B<--keep>"
+msgstr "B<-k>, B<--keep>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:404
+msgid "Don't delete the input files."
+msgstr "Не вилучати вхідні файли."
+
+#. type: Plain text
+#: ../src/xz/xz.1:418
+msgid ""
+"Since B<xz> 5.2.6, this option also makes B<xz> 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<xz> 5.2.6, використання цього параметра також наказує "
+"B<xz> виконувати стискання або розпаковування, навіть якщо вхідними даними є "
+"символічне посилання на звичайний файл, файл, який має декілька жорстких "
+"посилань, або файл, для якого встановлено setuid, setgid або липкий біт. "
+"setuid, setgid та липкий біт не буде скопійовано до файла-результату. У "
+"попередніх версіях, ці дії виконувалися, лише якщо було використано параметр "
+"B<--force>."
+
+#. type: TP
+#: ../src/xz/xz.1:418
+#, no-wrap
+msgid "B<-f>, B<--force>"
+msgstr "B<-f>, B<--force>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:421
+msgid "This option has several effects:"
+msgstr "Результатів використання цього параметра буде декілька:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:425
+msgid ""
+"If the target file already exists, delete it before compressing or "
+"decompressing."
+msgstr ""
+"Якщо файл-результат вже існує, вилучити його до стискання або розпаковування."
+
+#. type: Plain text
+#: ../src/xz/xz.1:432
+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 або липкий біт "
+"setuid, setgid та липкий біт не буде скопійовано до файла-результату."
+
+#. type: Plain text
+#: ../src/xz/xz.1:457
+msgid ""
+"When used with B<--decompress> B<--stdout> and B<xz> cannot recognize the "
+"type of the source file, copy the source file as is to standard output. "
+"This allows B<xzcat> B<--force> to be used like B<cat>(1) for files that "
+"have not been compressed with B<xz>. Note that in future, B<xz> might "
+"support new compressed file formats, which may make B<xz> decompress more "
+"types of files instead of copying them as is to standard output. B<--"
+"format=>I<format> can be used to restrict B<xz> to decompress only a single "
+"file format."
+msgstr ""
+"Якщо використано разом із B<--decompress>, B<--stdout>, і B<xz> не зможе "
+"розпізнати тип початкового файла, копіювати початковий файл без змін до "
+"стандартного виведення. Це надає змогу користуватися B<xzcat> B<--force> "
+"подібно до B<cat>(1) для файлів, які не було стиснено за допомогою B<xz>. "
+"Зауважте, що у майбутньому у B<xz> може бути реалізовано підтримку нових "
+"форматів стиснених файлів, замість копіювання їх без змін до стандартного "
+"виведення. Можна скористатися B<--format=>I<формат> для обмеження стискання "
+"у B<xz> єдиним форматом файлів."
+
+#. type: TP
+#: ../src/xz/xz.1:458 ../src/xzdec/xzdec.1:76
+#, 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:464
+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:464
+#, no-wrap
+msgid "B<--single-stream>"
+msgstr "B<--single-stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:473
+msgid ""
+"Decompress only the first B<.xz> stream, and silently ignore possible "
+"remaining input data following the stream. Normally such trailing garbage "
+"makes B<xz> display an error."
+msgstr ""
+"Розпакувати лише перший потік даних B<.xz> і без повідомлень проігнорувати "
+"решту вхідних даних, які слідують за цим потоком. Зазвичай, такі зайві дані "
+"наприкінці файла призводять до показу B<xz> повідомлення про помилку."
+
+#. type: Plain text
+#: ../src/xz/xz.1:482
+msgid ""
+"B<xz> never decompresses more than one stream from B<.lzma> files or raw "
+"streams, but this option still makes B<xz> ignore the possible trailing data "
+"after the B<.lzma> file or raw stream."
+msgstr ""
+"B<xz> ніколи не виконуватиме спроби видобути декілька потоків даних з файлів "
+"B<.lzma> або необроблених потоків даних, але використання цього параметра "
+"все одно наказує B<xz> ігнорувати можливі кінцеві дані після файла B<.lzma> "
+"або необробленого потоку даних."
+
+#. type: Plain text
+#: ../src/xz/xz.1:487
+msgid ""
+"This option has no effect if the operation mode is not B<--decompress> or "
+"B<--test>."
+msgstr ""
+"Цей параметр нічого не змінює, якщо режимом дій не є B<--decompress> або B<--"
+"test>."
+
+#. type: TP
+#: ../src/xz/xz.1:487
+#, no-wrap
+msgid "B<--no-sparse>"
+msgstr "B<--no-sparse>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:499
+msgid ""
+"Disable creation of sparse files. By default, if decompressing into a "
+"regular file, B<xz> 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<xz> намагається створити розріджений файл, якщо "
+"розпаковані дані містять довгі послідовності двійкових нулів. Це також "
+"працює, коли виконується запис до стандартного виведення, доки стандартне "
+"виведення з'єднано зі звичайним файлом і виконуються певні додаткові умови, "
+"які убезпечують роботу. Створення розріджених файлів може заощадити місце на "
+"диску і пришвидшити розпаковування шляхом зменшення кількості дій введення "
+"та виведення даних на диску."
+
+#. type: TP
+#: ../src/xz/xz.1:499
+#, 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:511
+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:525
+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:531
+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:531
+#, no-wrap
+msgid "B<--files>[B<=>I<file>]"
+msgstr "B<--files>[B<=>I<файл>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:545
+msgid ""
+"Read the filenames to process from I<file>; if I<file> 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<file>."
+msgstr ""
+"Прочитати назви файлів для обробки з файла I<файл>; якщо I<file> не вказано, "
+"назви файлів буде прочитано зі стандартного потоку вхідних даних. Назви "
+"файлів має бути відокремлено символом нового рядка. Символ дефіса (B<->) "
+"буде оброблено як звичайну назву файла; він не позначатиме стандартного "
+"джерела вхідних даних. Якщо також буде вказано назви файлів у аргументах "
+"рядка команди, файли з цими назвами буде оброблено до обробки файлів, назви "
+"яких було прочитано з файла I<файл>."
+
+#. type: TP
+#: ../src/xz/xz.1:545
+#, no-wrap
+msgid "B<--files0>[B<=>I<file>]"
+msgstr "B<--files0>[B<=>I<файл>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:549
+msgid ""
+"This is identical to B<--files>[B<=>I<file>] except that each filename must "
+"be terminated with the null character."
+msgstr ""
+"Те саме, що і B<--files>[B<=>I<файл>], але файли у списку має бути "
+"відокремлено нульовим символом."
+
+#. type: SS
+#: ../src/xz/xz.1:550
+#, no-wrap
+msgid "Basic file format and compression options"
+msgstr "Параметри базового формату файлів та стискання"
+
+#. type: TP
+#: ../src/xz/xz.1:551
+#, no-wrap
+msgid "B<-F> I<format>, B<--format=>I<format>"
+msgstr "B<-F> I<format>, B<--format=>I<формат>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:556
+msgid "Specify the file I<format> to compress or decompress:"
+msgstr "Вказати файл I<формат> для стискання або розпакування:"
+
+#. type: TP
+#: ../src/xz/xz.1:557
+#, no-wrap
+msgid "B<auto>"
+msgstr "B<auto>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:569
+msgid ""
+"This is the default. When compressing, B<auto> is equivalent to B<xz>. "
+"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<auto> є еквівалентом B<xz>. При "
+"розпакуванні формат файла вхідних даних буде виявлено автоматично. Зауважте, "
+"що автоматичне виявлення необроблених потоків даних (створених за допомогою "
+"B<--format=raw>) неможливе."
+
+#. type: TP
+#: ../src/xz/xz.1:569
+#, no-wrap
+msgid "B<xz>"
+msgstr "B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:576
+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:576
+#, no-wrap
+msgid "B<lzma>, B<alone>"
+msgstr "B<lzma>, B<alone>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:586
+msgid ""
+"Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files "
+"when decompressing. The alternative name B<alone> is provided for backwards "
+"compatibility with LZMA Utils."
+msgstr ""
+"Стиснути дані до застарілого формату файлів B<.lzma> або приймати лише файли "
+"B<.lzma> при розпаковуванні. Альтернативну назву B<alone> може бути "
+"використано для зворотної сумісності із LZMA Utils."
+
+#. type: TP
+#: ../src/xz/xz.1:586
+#, no-wrap
+msgid "B<lzip>"
+msgstr "B<lzip>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:592
+msgid ""
+"Accept only B<.lz> files when decompressing. Compression is not supported."
+msgstr ""
+"Приймати лише файли B<.lz> при розпакуванні. Підтримки стискання не "
+"передбачено."
+
+#. type: Plain text
+#: ../src/xz/xz.1:605
+msgid ""
+"The B<.lz> format version 0 and the unextended version 1 are supported. "
+"Version 0 files were produced by B<lzip> 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<lzip> 1.18."
+msgstr ""
+"Передбачено підтримку версії формату B<.lz> 0 та нерозширеної версії 1. "
+"Файли версії 0 було створено B<lzip> 1.3 та старішими версіями. Такі файли "
+"не є поширеними, але їх можна знайти у файлових архівах, оскільки певну "
+"незначну кількість пакунків із початковим кодом було випущено у цьому "
+"форматі. Також можуть існувати особисті файли у цьому форматі. Підтримку "
+"розпаковування для формату версії 0 було вилучено у B<lzip> 1.18."
+
+#. type: Plain text
+#: ../src/xz/xz.1:614
+msgid ""
+"B<lzip> 1.4 and later create files in the format version 1. The sync flush "
+"marker extension to the format version 1 was added in B<lzip> 1.6. This "
+"extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt "
+"input)."
+msgstr ""
+"B<lzip> 1.4 і пізніші версії створюють файли у форматі версії 1. Розширення "
+"синхронізації позначки витирання до формату версії 1 було додано у B<lzip> "
+"1.6. Це розширення використовують не часто, його підтримки у B<xz> не "
+"передбачено (програма повідомлятиме про пошкоджені вхідні дані)."
+
+#. type: TP
+#: ../src/xz/xz.1:614
+#, no-wrap
+msgid "B<raw>"
+msgstr "B<raw>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:622
+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:623
+#, no-wrap
+msgid "B<-C> I<check>, B<--check=>I<check>"
+msgstr "B<-C> I<перевірка>, B<--check=>I<перевірка>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:638
+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:642
+msgid "Supported I<check> types:"
+msgstr "Підтримувані типи I<перевірок>:"
+
+#. type: TP
+#: ../src/xz/xz.1:643
+#, no-wrap
+msgid "B<none>"
+msgstr "B<none>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:649
+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:649
+#, no-wrap
+msgid "B<crc32>"
+msgstr "B<crc32>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:652
+msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)."
+msgstr "Обчислити CRC32 за допомогою полінома з IEEE-802.3 (Ethernet)."
+
+#. type: TP
+#: ../src/xz/xz.1:652
+#, no-wrap
+msgid "B<crc64>"
+msgstr "B<crc64>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:657
+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:657
+#, no-wrap
+msgid "B<sha256>"
+msgstr "B<sha256>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:661
+msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64."
+msgstr "Обчислити SHA-256. Цей варіант дещо повільніший за CRC32 і CRC64."
+
+#. type: Plain text
+#: ../src/xz/xz.1:667
+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:667
+#, no-wrap
+msgid "B<--ignore-check>"
+msgstr "B<--ignore-check>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:673
+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:676
+msgid ""
+"B<Do not use this option unless you know what you are doing.> Possible "
+"reasons to use this option:"
+msgstr ""
+"B<Не користуйтеся цим параметром, якщо ви не усвідомлюєте наслідків ваших "
+"дій.> Можливі причини скористатися цим параметром:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:679
+msgid "Trying to recover data from a corrupt .xz file."
+msgstr "Спроба отримання даних з пошкодженого файла .xz."
+
+#. type: Plain text
+#: ../src/xz/xz.1:685
+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:686
+#, no-wrap
+msgid "B<-0> ... B<-9>"
+msgstr "B<-0> ... B<-9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:695
+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:710
+msgid ""
+"The differences between the presets are more significant than with "
+"B<gzip>(1) and B<bzip2>(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<it's not a good idea to blindly use -9 for "
+"everything> like it often is with B<gzip>(1) and B<bzip2>(1)."
+msgstr ""
+"Різниця між рівнями є суттєвішою, ніж у B<gzip>(1) і B<bzip2>(1). Вибрані "
+"параметри стискання визначають вимоги до пам'яті під час розпаковування, "
+"отже використання надто високого рівня стискання може призвести до проблем "
+"під час розпаковування файла на застарілих комп'ютерах із невеликим обсягом "
+"оперативної пам'яті. Зокрема, B<не варто використовувати -9 для усього>, як "
+"це часто буває для B<gzip>(1) і B<bzip2>(1)."
+
+#. type: TP
+#: ../src/xz/xz.1:711
+#, no-wrap
+msgid "B<-0> ... B<-3>"
+msgstr "B<-0> ... B<-3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:723
+msgid ""
+"These are somewhat fast presets. B<-0> is sometimes faster than B<gzip -9> "
+"while compressing much better. The higher ones often have speed comparable "
+"to B<bzip2>(1) with comparable or better compression ratio, although the "
+"results depend a lot on the type of data being compressed."
+msgstr ""
+"Це дещо швидші набори налаштувань. B<-0> іноді є швидшим за B<gzip -9>, "
+"забезпечуючи набагато більший коефіцієнт стискання. Вищі рівні часто мають "
+"швидкість, яку можна порівняти з B<bzip2>(1) із подібним або кращим "
+"коефіцієнтом стискання, хоча результати значно залежать від типу даних, які "
+"стискають."
+
+#. type: TP
+#: ../src/xz/xz.1:723
+#, no-wrap
+msgid "B<-4> ... B<-6>"
+msgstr "B<-4> ... B<-6>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:737
+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:737
+#, no-wrap
+msgid "B<-7 ... -9>"
+msgstr "B<-7 ... -9>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:744
+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:752
+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:754
+msgid "The following table summarises the features of the presets:"
+msgstr "У наведеній нижче таблиці підсумовано можливості шаблонів:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "Preset"
+msgstr "Шаблон"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DictSize"
+msgstr "DictSize"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "CompCPU"
+msgstr "CompCPU"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "CompMem"
+msgstr "CompMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DecMem"
+msgstr "DecMem"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#: ../src/xz/xz.1:2840
+#, no-wrap
+msgid "-0"
+msgstr "-0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:843 ../src/xz/xz.1:2450
+#, no-wrap
+msgid "256 KiB"
+msgstr "256 КіБ"
+
+#. type: TP
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2840 ../src/scripts/xzgrep.1:82
+#, no-wrap
+msgid "0"
+msgstr "0"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:764 ../src/xz/xz.1:845 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "3 MiB"
+msgstr "3 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:763 ../src/xz/xz.1:843 ../src/xz/xz.1:844
+#: ../src/xz/xz.1:2451 ../src/xz/xz.1:2452 ../src/xz/xz.1:2454
+#, no-wrap
+msgid "1 MiB"
+msgstr "1 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:2451 ../src/xz/xz.1:2476
+#: ../src/xz/xz.1:2841
+#, no-wrap
+msgid "-1"
+msgstr "-1"
+
+#. type: TP
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:1758 ../src/xz/xz.1:2841
+#: ../src/scripts/xzgrep.1:86
+#, no-wrap
+msgid "1"
+msgstr "1"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "9 MiB"
+msgstr "9 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:764 ../src/xz/xz.1:844 ../src/xz/xz.1:845
+#: ../src/xz/xz.1:2452 ../src/xz/xz.1:2455 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "2 MiB"
+msgstr "2 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:2452 ../src/xz/xz.1:2477
+#: ../src/xz/xz.1:2842
+#, no-wrap
+msgid "-2"
+msgstr "-2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:1760 ../src/xz/xz.1:2842
+#, no-wrap
+msgid "2"
+msgstr "2"
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2477
+#, no-wrap
+msgid "17 MiB"
+msgstr "17 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2453 ../src/xz/xz.1:2478
+#: ../src/xz/xz.1:2843
+#, no-wrap
+msgid "-3"
+msgstr "-3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:843 ../src/xz/xz.1:846
+#: ../src/xz/xz.1:847 ../src/xz/xz.1:2453 ../src/xz/xz.1:2454
+#: ../src/xz/xz.1:2456
+#, no-wrap
+msgid "4 MiB"
+msgstr "4 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2843
+#, no-wrap
+msgid "3"
+msgstr "3"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2458
+#: ../src/xz/xz.1:2459 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "32 MiB"
+msgstr "32 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847
+#, no-wrap
+msgid "5 MiB"
+msgstr "5 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:2454 ../src/xz/xz.1:2479
+#: ../src/xz/xz.1:2844
+#, no-wrap
+msgid "-4"
+msgstr "-4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:1759 ../src/xz/xz.1:1761
+#: ../src/xz/xz.1:1762 ../src/xz/xz.1:1764 ../src/xz/xz.1:2844
+#, no-wrap
+msgid "4"
+msgstr "4"
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "48 MiB"
+msgstr "48 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2455 ../src/xz/xz.1:2480
+#: ../src/xz/xz.1:2845
+#, no-wrap
+msgid "-5"
+msgstr "-5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2455 ../src/xz/xz.1:2456 ../src/xz/xz.1:2457
+#, no-wrap
+msgid "8 MiB"
+msgstr "8 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2845
+#, no-wrap
+msgid "5"
+msgstr "5"
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2480 ../src/xz/xz.1:2481
+#, no-wrap
+msgid "94 MiB"
+msgstr "94 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:2456 ../src/xz/xz.1:2481
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "-6"
+msgstr "-6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:769 ../src/xz/xz.1:770 ../src/xz/xz.1:771
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "6"
+msgstr "6"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:2457 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "-7"
+msgstr "-7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2457
+#: ../src/xz/xz.1:2458 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "16 MiB"
+msgstr "16 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "186 MiB"
+msgstr "186 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:2458 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "-8"
+msgstr "-8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "370 MiB"
+msgstr "370 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851
+#, no-wrap
+msgid "33 MiB"
+msgstr "33 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:2459 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "-9"
+msgstr "-9"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2459
+#, no-wrap
+msgid "64 MiB"
+msgstr "64 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "674 MiB"
+msgstr "674 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852
+#, no-wrap
+msgid "65 MiB"
+msgstr "65 МіБ"
+
+#. type: Plain text
+#: ../src/xz/xz.1:777
+msgid "Column descriptions:"
+msgstr "Описи стовпчиків:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:789
+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:798
+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:806
+msgid ""
+"CompMem contains the compressor memory requirements in the single-threaded "
+"mode. It may vary slightly between B<xz> versions. Memory requirements of "
+"some of the future multithreaded modes may be dramatically higher than that "
+"of the single-threaded mode."
+msgstr ""
+"CompMem містить вимоги до пам'яті засобу стискання у однопотоковому режимі. "
+"Значення можуть бути дещо різними для різних версій B<xz>. Вимоги до пам'яті "
+"деяких майбутніх багатопотокових режимів можуть бути набагато вищими, ніж "
+"вимоги у однопотоковому режимі."
+
+#. type: Plain text
+#: ../src/xz/xz.1:813
+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: TP
+#: ../src/xz/xz.1:814
+#, no-wrap
+msgid "B<-e>, B<--extreme>"
+msgstr "B<-e>, B<--extreme>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:823
+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:835
+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:843
+#, no-wrap
+msgid "-0e"
+msgstr "-0e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:843 ../src/xz/xz.1:844 ../src/xz/xz.1:845 ../src/xz/xz.1:847
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:850 ../src/xz/xz.1:851 ../src/xz/xz.1:852
+#: ../src/xz/xz.1:2848
+#, no-wrap
+msgid "8"
+msgstr "8"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "-1e"
+msgstr "-1e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "13 MiB"
+msgstr "13 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "-2e"
+msgstr "-2e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "25 MiB"
+msgstr "25 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846
+#, no-wrap
+msgid "-3e"
+msgstr "-3e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:846 ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "7"
+msgstr "7"
+
+#. type: tbl table
+#: ../src/xz/xz.1:847
+#, no-wrap
+msgid "-4e"
+msgstr "-4e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "-5e"
+msgstr "-5e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2848
+#, no-wrap
+msgid "-6e"
+msgstr "-6e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:850
+#, no-wrap
+msgid "-7e"
+msgstr "-7e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:851
+#, no-wrap
+msgid "-8e"
+msgstr "-8e"
+
+#. type: tbl table
+#: ../src/xz/xz.1:852
+#, no-wrap
+msgid "-9e"
+msgstr "-9e"
+
+#. type: Plain text
+#: ../src/xz/xz.1:864
+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:864
+#, no-wrap
+msgid "B<--fast>"
+msgstr "B<--fast>"
+
+#. type: TP
+#: ../src/xz/xz.1:867
+#, no-wrap
+msgid "B<--best>"
+msgstr "B<--best>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:878
+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 Utils. "
+"Намагайтеся не користуватися цими варіантами параметрів."
+
+#. type: TP
+#: ../src/xz/xz.1:878
+#, no-wrap
+msgid "B<--block-size=>I<size>"
+msgstr "B<--block-size=>I<розмір>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:891
+msgid ""
+"When compressing to the B<.xz> format, split the input data into blocks of "
+"I<size> 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:909
+msgid ""
+"In multi-threaded mode about three times I<size> bytes will be allocated in "
+"each thread for buffering input and output. The default I<size> 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<size> less than the LZMA2 dictionary size is waste of RAM "
+"because then the LZMA2 dictionary buffer will never get fully used. The "
+"sizes of the blocks are stored in the block headers, which a future version "
+"of B<xz> will use for multi-threaded decompression."
+msgstr ""
+"У багатопотоковому режимі для кожного потоку буде отримано для буферів "
+"вхідних і вихідних даних майже утричі більше за I<розмір> байтів. Типовий "
+"I<розмір> утричі більший за розмір словника LZMA2 або дорівнює 1 МіБ, буде "
+"вибрано більше значення. Типовим добрим значенням буде значення, яке у "
+"2\\(en4 рази перевищує розмір словника LZMA2 або дорівнює принаймні 1 МіБ. "
+"Використання значення I<розмір>, яке є меншим за розмір словника LZMA2, має "
+"наслідком марну витрату оперативної пам'яті, оскільки його використання "
+"призводить до того, що буфер словника LZMA2 ніколи не буде використано "
+"повністю. Розміри блоків зберігатимуться у заголовках блоків, які майбутня "
+"версія B<xz> використовуватиме для багатопотокового розпаковування."
+
+#. type: Plain text
+#: ../src/xz/xz.1:918
+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 a future version of B<xz> won't be able decompress the files in "
+"multi-threaded mode."
+msgstr ""
+"У однопотоковому режимі поділ на блоки типово не виконуватиметься. "
+"Встановлення значення для цього параметра не впливатиме на використання "
+"пам'яті. У заголовках блоків не зберігатимуться дані щодо розміру, отже "
+"файли, які створено в однопотоковому режимі не будуть ідентичними до файлів, "
+"які створено у багатопотоковому режимі. Те, що у заголовках блоків не "
+"зберігатимуться дані щодо розміру також означає, що майбутні версії B<xz> не "
+"зможуть розпаковувати такі файли у багатопотоковому режимі."
+
+#. type: TP
+#: ../src/xz/xz.1:918
+#, no-wrap
+msgid "B<--block-list=>I<sizes>"
+msgstr "B<--block-list=>I<розміри>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:924
+msgid ""
+"When compressing to the B<.xz> format, start a new block after the given "
+"intervals of uncompressed data."
+msgstr ""
+"При стисканні у форматі B<.xz> починати новий блок після вказаної кількості "
+"інтервалів нестиснених даних."
+
+#. type: Plain text
+#: ../src/xz/xz.1:930
+msgid ""
+"The uncompressed I<sizes> of the blocks are specified as a comma-separated "
+"list. Omitting a size (two or more consecutive commas) is a shorthand to "
+"use the size of the previous block."
+msgstr ""
+"Значення I<розмірів> розпакованих блоків слід задавати у форматі списку "
+"відокремлених комами значень. Якщо розмір пропущено (дві або декілька "
+"послідовних коми), буде використано розмір попереднього блоку."
+
+#. type: Plain text
+#: ../src/xz/xz.1:940
+msgid ""
+"If the input file is bigger than the sum of I<sizes>, the last value in "
+"I<sizes> is repeated until the end of the file. A special value of B<0> may "
+"be used as the last value to indicate that the rest of the file should be "
+"encoded as a single block."
+msgstr ""
+"Якщо файл вхідних даних є більшим за розміром за суму I<розмірів>, останнє "
+"значення у I<розмірах> буде повторено до кінця файла. Особливе значення B<0> "
+"може бути використано як останнє значення, щоб позначити, що решту файла має "
+"бути закодовано як єдиний блок."
+
+#. type: Plain text
+#: ../src/xz/xz.1:955
+msgid ""
+"If one specifies I<sizes> that exceed the encoder's block size (either the "
+"default value in threaded mode or the value specified with B<--block-"
+"size=>I<size>), the encoder will create additional blocks while keeping the "
+"boundaries specified in I<sizes>. 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 ""
+"Якщо вказати I<розміри>, які перевищують розмір блоку кодувальника (або "
+"типове значення у режимі із потоками обробки, або значення, яке встановлено "
+"за допомогою 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:961
+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:961
+#, no-wrap
+msgid "B<--flush-timeout=>I<timeout>"
+msgstr "B<--flush-timeout=>I<час_очікування>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:978
+msgid ""
+"When compressing, if more than I<timeout> 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<xz> is used to compress data that is "
+"streamed over a network. Small I<timeout> values make the data available at "
+"the receiving end with a small delay, but large I<timeout> values give "
+"better compression ratio."
+msgstr ""
+"При стискання, якщо з моменту попереднього витирання мине понад "
+"I<час_очікування> мілісекунд (додатне ціле значення) і читання додаткових "
+"даних буде заблоковано, усі вхідні дані у черзі обробки буде витерто з "
+"кодувальника і зроблено доступним у потоці вихідних даних. Це може бути "
+"корисним, якщо B<xz> використовують для стискання даних, які передають "
+"потоком мережею. Невеликі значення аргументу I<час_очікування> зроблять дані "
+"доступними на боці отримання із малою затримкою, а великі значення аргумент "
+"I<час_очікування> уможливлять кращий коефіцієнт стискання."
+
+#. type: Plain text
+#: ../src/xz/xz.1:986
+msgid ""
+"This feature is disabled by default. If this option is specified more than "
+"once, the last one takes effect. The special I<timeout> value of B<0> can "
+"be used to explicitly disable this feature."
+msgstr ""
+"Типово, цю можливість вимкнено. Якщо цей параметр вказано декілька разів, "
+"буде використано лише останнє вказане значення. Особливим значенням "
+"аргументу I<час_очікування>, рівним B<0>, можна скористатися для вимикання "
+"цієї можливості явним чином."
+
+#. type: Plain text
+#: ../src/xz/xz.1:988
+msgid "This feature is not available on non-POSIX systems."
+msgstr "Ця можливість недоступна у системах, які не є системами POSIX."
+
+#. FIXME
+#. type: Plain text
+#: ../src/xz/xz.1:996
+msgid ""
+"B<This feature is still experimental.> Currently B<xz> is unsuitable for "
+"decompressing the stream in real time due to how B<xz> does buffering."
+msgstr ""
+"B<Ця можливість усе ще є експериментальною.> У поточній версії, B<xz> не "
+"може розпаковувати потік даних у режимі реального часу через те, у який "
+"спосіб B<xz> виконує буферизацію."
+
+#. type: TP
+#: ../src/xz/xz.1:996
+#, no-wrap
+msgid "B<--memlimit-compress=>I<limit>"
+msgstr "B<--memlimit-compress=>I<обмеження>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1001
+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:1014
+msgid ""
+"If the compression settings exceed the I<limit>, B<xz> 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<limit>, and finally reducing the LZMA2 dictionary size."
+msgstr ""
+"Якщо параметри стискання перевищують I<обмеження>, B<xz> спробує скоригувати "
+"параметри так, щоб обмеження не було перевищено, і покаже повідомлення про "
+"те, що було виконано автоматичне коригування. Коригування буде виконано у "
+"такому порядку: зменшення кількості потоків обробки, перемикання у "
+"однопотоковий режим, якщо хоч в одному потоці багатопотокового режиму буде "
+"перевищено I<обмеження>, і нарешті, зменшення розміру словника LZMA2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1022
+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:1029
+msgid ""
+"If the I<limit> cannot be met even with the adjustments described above, an "
+"error is displayed and B<xz> will exit with exit status 1."
+msgstr ""
+"Якщо I<обмеження> не може бути виконано за допомогою коригувань, які описано "
+"вище, буде показано повідомлення про помилку, а B<xz> завершить роботу зі "
+"станом виходу 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1033
+msgid "The I<limit> can be specified in multiple ways:"
+msgstr "Аргумент I<обмеження> можна вказати у декілька способів:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1043
+msgid ""
+"The I<limit> can be an absolute value in bytes. Using an integer suffix "
+"like B<MiB> can be useful. Example: B<--memlimit-compress=80MiB>"
+msgstr ""
+"Значенням I<обмеження> може бути додатне ціле значення у байтах. Можна "
+"скористатися цілочисельним суфіксом, подібним до B<MiB>. Приклад: B<--"
+"memlimit-compress=80MiB>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1055
+msgid ""
+"The I<limit> can be specified as a percentage of total physical memory "
+"(RAM). This can be useful especially when setting the B<XZ_DEFAULTS> "
+"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<XZ_DEFAULTS> у скрипті ініціалізації системи, який є "
+"спільним для різних комп'ютерів. У такий спосіб можна вказати вищий рівень "
+"обмеження для систем із більшим об'ємом пам'яті. Приклад: B<--memlimit-"
+"compress=70%>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1065
+msgid ""
+"The I<limit> can be reset back to its default value by setting it to B<0>. "
+"This is currently equivalent to setting the I<limit> to B<max> (no memory "
+"usage limit)."
+msgstr ""
+"Аргументу I<обмеження> може бути повернуто типове значення встановленням "
+"значення B<0>. У поточній версії це еквівалентно до встановлення значення "
+"аргументу I<обмеження> B<max> (без обмеження на використання пам'яті)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1089
+msgid ""
+"For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+"B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. On MIPS32 B<2000\\ "
+"MiB> is used instead. (The values B<0> and B<max> 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 ""
+"Для 32-бітової версії B<xz> передбачено особливий випадок: якщо I<обмеження> "
+"перевищуватиме B<4020\\ МіБ>, для I<обмеження> буде встановлено значення "
+"B<4020\\ MiB>. На MIPS32 замість цього буде використано B<2000\\ MiB>. (Це "
+"не стосується значень B<0> і B<max>. Подібної можливості для розпаковування "
+"не існує.) Це може бути корисним, коли 32-бітовий виконуваний файл має "
+"доступ до простору адрес у 4\\ ГіБ (2 GiB на MIPS32), хоча, сподіваємося, не "
+"зашкодить і в інших випадках."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1092
+msgid "See also the section B<Memory usage>."
+msgstr "Див. також розділ B<Використання пам'яті>."
+
+#. type: TP
+#: ../src/xz/xz.1:1092
+#, no-wrap
+msgid "B<--memlimit-decompress=>I<limit>"
+msgstr "B<--memlimit-decompress=>I<обмеження>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1106
+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<limit>, "
+"B<xz> will display an error and decompressing the file will fail. See B<--"
+"memlimit-compress=>I<limit> for possible ways to specify the I<limit>."
+msgstr ""
+"Встановити обмеження пам'яті на розпаковування. це також вплине на режим B<--"
+"list>. Якщо дія є неможливою без перевищення I<обмеження>, B<xz> покаже "
+"повідомлення про помилку і розпаковування файла не відбудеться. Див. B<--"
+"memlimit-compress=>I<обмеження>, щоб дізнатися більше про те, як можна "
+"задати I<обмеження>."
+
+#. type: TP
+#: ../src/xz/xz.1:1106
+#, no-wrap
+msgid "B<--memlimit-mt-decompress=>I<limit>"
+msgstr "B<--memlimit-mt-decompress=>I<обмеження>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1128
+msgid ""
+"Set a memory usage limit for multi-threaded decompression. This can only "
+"affect the number of threads; this will never make B<xz> refuse to "
+"decompress a file. If I<limit> is too low to allow any multi-threading, the "
+"I<limit> is ignored and B<xz> 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<limit> for "
+"multi-threading will never be higher than the limit set with B<--memlimit-"
+"decompress>."
+msgstr ""
+"Встановити обмеження використання пам'яті для багатопотокового "
+"розпаковування. Це може вплинути лише на кількість потоків обробки; це "
+"ніколи не призводитиме до відмови B<xz> у розпаковуванні файла. Якщо "
+"I<обмеження є надто низьким>, щоб уможливити будь-яку багатопотокову "
+"обробку, I<обмеження> буде проігноровано, і B<xz> продовжить обробку в "
+"однопотоковому режимі. Зауважте, що якщо використано також B<--memlimit-"
+"decompress>, цей параметр буде застосовано до обох режимів, однопотокового "
+"та багатопотокового, а отже, задіяне I<обмеження> для багатопотокового "
+"режиму ніколи не перевищуватиме обмеження, яке встановлено за допомогою B<--"
+"memlimit-decompress>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1135
+msgid ""
+"In contrast to the other memory usage limit options, B<--memlimit-mt-"
+"decompress=>I<limit> has a system-specific default I<limit>. B<xz --info-"
+"memory> can be used to see the current value."
+msgstr ""
+"На відміну від інших параметрів обмеження використання пам'яті, B<--memlimit-"
+"mt-decompress=>I<обмеження> містить специфічне для системи типове значення "
+"I<обмеження>. Можна скористатися B<xz --info-memory> для перегляду поточного "
+"значення."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1151
+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<limit> is too low on your system, "
+"feel free to increase the I<limit> but never set it to a value larger than "
+"the amount of usable RAM as with appropriate input files B<xz> 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<xz> спробує скористатися цим об'ємом "
+"пам'яті, навіть із низькою кількістю потоків обробки. Вичерпання об'єму "
+"оперативної пам'яті або використання резервної пам'яті на диску не покращить "
+"швидкодію системи під час розпаковування."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1163
+msgid ""
+"See B<--memlimit-compress=>I<limit> for possible ways to specify the "
+"I<limit>. Setting I<limit> to B<0> resets the I<limit> to the default "
+"system-specific value."
+msgstr ""
+"Див. B<--memlimit-compress=>I<обмеження>, щоб ознайомитися із можливими "
+"способами визначення I<обмеження>. Встановлення для I<обмеження> значення "
+"B<0> відновлює типове специфічне для системи значення I<обмеження>."
+
+#. type: TP
+#: ../src/xz/xz.1:1163
+#, no-wrap
+msgid "B<-M> I<limit>, B<--memlimit=>I<limit>, B<--memory=>I<limit>"
+msgstr "B<-M> I<обмеження>, B<--memlimit=>I<обмеження>, B<--memory=>I<обмеження>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1169
+msgid ""
+"This is equivalent to specifying B<--memlimit-compress=>I<limit> B<--"
+"memlimit-decompress=>I<limit> B<--memlimit-mt-decompress=>I<limit>."
+msgstr ""
+"Є еквівалентом визначення B<--memlimit-compress=>I<обмеження> B<--memlimit-"
+"decompress=>I<обмеження> B<--memlimit-mt-decompress=>I<обмеження>."
+
+#. type: TP
+#: ../src/xz/xz.1:1169
+#, no-wrap
+msgid "B<--no-adjust>"
+msgstr "B<--no-adjust>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1179
+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<xz> 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<xz> перемикати кодувальник з багатопотокового режиму на однопотоковий "
+"режим і зменшувати розмір словника LZMA2. Навіть якщо використано цей "
+"параметр, кількість потоків може бути зменшено для виконання обмеження на "
+"використання пам'яті, оскільки це не вплине на результати стискання."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1182
+msgid ""
+"Automatic adjusting is always disabled when creating raw streams (B<--"
+"format=raw>)."
+msgstr ""
+"Автоматичне коригування завжди буде вимкнено при створенні потоків "
+"необроблених даних (B<--format=raw>)."
+
+#. type: TP
+#: ../src/xz/xz.1:1182
+#, no-wrap
+msgid "B<-T> I<threads>, B<--threads=>I<threads>"
+msgstr "B<-T> I<потоки>, B<--threads=>I<потоки>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1197
+msgid ""
+"Specify the number of worker threads to use. Setting I<threads> to a "
+"special value B<0> makes B<xz> use up to as many threads as the processor(s) "
+"on the system support. The actual number of threads can be fewer than "
+"I<threads> 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<xz> використати не "
+"більше потоків обробки, ніж передбачено підтримку у процесорах системи. "
+"Справжня кількість потоків може бути меншою за значення I<потоки>, якщо файл "
+"вхідних даних не є достатньо великим для поділу на потоки обробки при "
+"заданих параметрах або якщо використання додаткових потоків призведе до "
+"перевищення обмеження на використання пам'яті."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1216
+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<threads> to B<1> will use the single-threaded "
+"mode. Setting I<threads> to any other value, including B<0>, will use the "
+"multi-threaded compressor even if the system supports only one hardware "
+"thread. (B<xz> 5.2.x used single-threaded mode in this situation.)"
+msgstr ""
+"Засоби стискання в однопотоковому та багатопотоковому режимі дають різні "
+"результати. Однопотоковий засіб стискання дасть найменший розмір файла, але "
+"лише результати роботи багатопотокового засобу стискання може бути "
+"розпаковано з використанням декількох потоків. Встановлення для аргументу "
+"I<потоки> значення B<1> призведе до використання однопотокового режиму. "
+"Встановлення для аргументу I<потоки> будь-якого іншого значення, включно з "
+"B<0>, призведе до використання багатопотокового засобу стискання, навіть "
+"якщо у системі передбачено підтримки лише одного апаратного потоку обробки "
+"даних. (Версія B<xz> 5.2.x у цьому випадку використовувала однопотоковий "
+"режим.)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1235
+msgid ""
+"To use multi-threaded mode with only one thread, set I<threads> to B<+1>. "
+"The B<+> prefix has no effect with values other than B<1>. A memory usage "
+"limit can still make B<xz> switch to single-threaded mode unless B<--no-"
+"adjust> is used. Support for the B<+> prefix was added in B<xz> 5.4.0."
+msgstr ""
+"Щоб скористатися багатопотоковим режимом із лише одним потоком обробки, "
+"встановіть для аргументу I<потоки> значення B<+1>. Префікс B<+> не впливає "
+"на значення, окрім B<1>. Обмеження на використання пам'яті можуть перемкнути "
+"B<xz> в однопотоковий режим, якщо не використано параметр B<--no-adjust>. "
+"Підтримку B<+> prefix було додано у версії B<xz> 5.4.0."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1250
+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<xz> from compressing or decompressing. This default soft "
+"limit will not make B<xz> switch from multi-threaded mode to single-threaded "
+"mode. The active limits can be seen with B<xz --info-memory>."
+msgstr ""
+"Якщо було вказано автоматичне визначення кількості потоків і не вказано "
+"обмеження на використання пам'яті, буде використано специфічне для системи "
+"типове м'яке обмеження для можливого обмеження кількості потоків обробки. Це "
+"обмеження є м'яким у сенсі того, що його буде проігноровано, якщо кількість "
+"потоків зрівняється з одиницею, а отже, м'яке обмеження ніколи не "
+"запобігатиму у B<xz> стисканню або розпаковуванню. Це типове м'яке обмеження "
+"не перемкне B<xz> з багатопотокового режиму на однопотоковий режим. Активні "
+"обмеження можна переглянути за допомогою команди B<xz --info-memory>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1257
+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<size> option."
+msgstr ""
+"У поточній версії єдиним способом поділу на потоки обробки є поділ вхідних "
+"даних на блоки і стискання цих блоків незалежно один від одного. Типовий "
+"розмір блоку залежить від рівня стискання. Його може бути перевизначено за "
+"допомогою параметра B<--block-size=>I<розмір>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1265
+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<size> has been used."
+msgstr ""
+"Розпакування з потоками обробки працює лише для файлів, які містять декілька "
+"блоків із даними щодо розміру у заголовках блоків. Цю умову задовольняють "
+"усі достатньо великі файли, які стиснено у багатопотоковому режимі, але не "
+"задовольняють будь-які файли, які було стиснуто у однопотоковому режимі, "
+"навіть якщо було використано параметр B<--block-size=>I<розмір>."
+
+#. type: SS
+#: ../src/xz/xz.1:1266 ../src/xz/xz.1:2819
+#, no-wrap
+msgid "Custom compressor filter chains"
+msgstr "Нетипові ланцюжки фільтрів засобу стискання"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1282
+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:1289
+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 ""
+"Ланцюжок фільтрів можна порівняти із конвеєром у командному рядку. При "
+"стисканні нестиснені вхідні дані потрапляють до першого фільтра, виведені "
+"ним дані йдуть до наступного фільтра (якщо такий є). Виведені останнім "
+"фільтром дані буде записано до стисненого файла. Максимальна кількість "
+"фільтрів у ланцюжку дорівнює чотирьом, але у типовому ланцюжку фільтрів "
+"використовують один або два фільтри."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1297
+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:1305
+msgid ""
+"A custom filter chain is specified by using one or more filter options in "
+"the order they are wanted in the filter chain. That is, the order of filter "
+"options is significant! When decoding raw streams (B<--format=raw>), the "
+"filter chain is specified in the same order as it was specified when "
+"compressing."
+msgstr ""
+"Нетиповий ланцюжок фільтрів визначають за допомогою одного або декількох "
+"параметрів фільтрування у бажаному для ланцюжка фільтрування порядку. Тобто "
+"порядок параметрів фільтрування впливає на результат! При декодуванні "
+"необробленого потоку даних (B<--format=raw>) ланцюжок фільтрів визначають у "
+"тому самому порядку, який використовують для стискання даних."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1314
+msgid ""
+"Filters take filter-specific I<options> as a comma-separated list. Extra "
+"commas in I<options> are ignored. Every option has a default value, so you "
+"need to specify only those you want to change."
+msgstr ""
+"Фільтри приймають специфічні для фільтрів I<параметри> у форматі списку "
+"значень, які відокремлено комами. Зайві коми у I<параметрах> буде "
+"проігноровано. У кожного параметра є типове значення, отже, вам слід вказати "
+"лише ті параметри, значення яких ви хочете змінити."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1323
+msgid ""
+"To see the whole filter chain and I<options>, use B<xz -vv> (that is, use "
+"B<--verbose> twice). This works also for viewing the filter chain options "
+"used by presets."
+msgstr ""
+"Щоб переглянути увесь ланцюжок фільтрів та I<параметри>, скористайтеся "
+"командою B<xz -vv> (тобто, скористайтеся B<--verbose> двічі). Це працює "
+"також для перегляду параметрів ланцюжка фільтрів, який використано у рівнях "
+"стискання."
+
+#. type: TP
+#: ../src/xz/xz.1:1323
+#, no-wrap
+msgid "B<--lzma1>[B<=>I<options>]"
+msgstr "B<--lzma1>[B<=>I<параметри>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1326
+#, no-wrap
+msgid "B<--lzma2>[B<=>I<options>]"
+msgstr "B<--lzma2>[B<=>I<параметри>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1331
+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:1343
+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:1346
+msgid "LZMA1 and LZMA2 share the same set of I<options>:"
+msgstr "LZMA1 і LZMA2 спільно використовують той самий набір I<параметрів>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1347
+#, no-wrap
+msgid "B<preset=>I<preset>"
+msgstr "B<preset=>I<шаблон>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1374
+msgid ""
+"Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+"matches B<--extreme>. If no B<preset> is specified, the default values of "
+"LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgstr ""
+"Скинути усі I<параметри> LZMA1 або LZMA2 до параметрів I<шаблона>. Аргумент "
+"I<шаблон> складається з цілого числа, після якого може бути однолітерний "
+"модифікатор шаблона. Ціле число може належати лише діапазону від B<0> до "
+"B<9>, що відповідає параметрам командного рядка B<-0> \\&...\\& B<-9>. "
+"Єдиним підтримуваним модифікатором у поточній версії є B<e>, щоб відповідає "
+"параметру B<--extreme>. Якщо аргумент B<шаблон> не вказано, типові значення "
+"I<параметрів> LZMA1 або LZMA2 буде взято із шаблона B<6>."
+
+#. type: TP
+#: ../src/xz/xz.1:1374
+#, no-wrap
+msgid "B<dict=>I<size>"
+msgstr "B<dict=>I<розмір>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1389
+msgid ""
+"Dictionary (history buffer) I<size> 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<size> 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:1398
+msgid ""
+"Typical dictionary I<size> 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:1425
+msgid ""
+"Dictionary I<size> and match finder (I<mf>) together determine the memory "
+"usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary "
+"I<size> 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<size> either as "
+"2^I<n> or 2^I<n> + 2^(I<n>-1), so these I<sizes> are somewhat preferred for "
+"compression. Other I<sizes> will get rounded up when stored in the B<.xz> "
+"headers."
+msgstr ""
+"Аргумент I<розміру> словника і засіб пошуку відповідників (I<mf>) разом "
+"визначають параметри використання пам'яті для кодувальника LZMA1 або LZMA2. "
+"Для розпаковування потрібен такий самий (або більший) I<розмір> словника, що "
+"і для стискання, отже, використання пам'яті для засобу розпаковування буде "
+"визначено за розміром словника, який було використано для стискання. У "
+"заголовках B<.xz> зберігається I<розмір> словника або як 2^I<n>, або як "
+"2^I<n> + 2^(I<n>-1), отже, ці I<розміри> є дещо пріоритетними для стискання. "
+"Інші I<розміри> буде отримано округленням при зберіганні у заголовках B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:1425
+#, no-wrap
+msgid "B<lc=>I<lc>"
+msgstr "B<lc=>I<lc>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1434
+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<lc> and I<lp> "
+"must not exceed 4."
+msgstr ""
+"Визначає кількість буквальних контекстних бітів. Мінімальною кількістю є 0, "
+"а максимальною — 4. Типовою кількістю є 3. Крім того, сума I<lc> і I<lp> має "
+"не перевищувати 4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1439
+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 ""
+"Усі байти, які не може бути закодовано як відповідності, буде закодовано як "
+"літерали. Тобто літерали є просто 8-бітовими байтами, які буде закодовано по "
+"одному за раз."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1453
+msgid ""
+"The literal coding makes an assumption that the highest I<lc> 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<lc> is at least "
+"3, the literal coding can take advantage of this property in the "
+"uncompressed data."
+msgstr ""
+"При кодуванні літералів роблять припущення, що найвищі біти I<lc> "
+"попереднього нестисненого байта корелюють із наступним байтом. Наприклад, у "
+"типовому тексті англійською за літерою у верхньому регістрі йде літера у "
+"нижньому регістрі, а за літерою у нижньому регістрі, зазвичай, йде інша "
+"літера у нижньому регістрі. У наборі символів US-ASCII найвищими трьома "
+"бітами є 010 для літер верхнього регістру і 011 для літер нижнього регістру. "
+"Якщо I<lc> дорівнює принаймні 3, при кодуванні літералів можна отримати "
+"перевагу встановлення цієї властивості для нестиснених даних."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1462
+msgid ""
+"The default value (3) is usually good. If you want maximum compression, "
+"test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+"compression worse. If it makes it worse, test B<lc=2> too."
+msgstr ""
+"Зазвичай, типового значення (3) достатньо. Якщо вам потрібне максимальне "
+"стискання, спробуйте B<lc=4>. Іноді це трохи допомагає, а іноді, робить "
+"стискання гіршим. Якщо стискання стане гіршим, спробуйте також B<lc=2>."
+
+#. type: TP
+#: ../src/xz/xz.1:1462
+#, no-wrap
+msgid "B<lp=>I<lp>"
+msgstr "B<lp=>I<lp>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1466
+msgid ""
+"Specify the number of literal position bits. The minimum is 0 and the "
+"maximum is 4; the default is 0."
+msgstr ""
+"Визначає кількість буквальних позиційних бітів. Мінімальною кількістю є 0, а "
+"максимальною — 4. Типовою кількістю є 0."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1473
+msgid ""
+"I<Lp> affects what kind of alignment in the uncompressed data is assumed "
+"when encoding literals. See I<pb> below for more information about "
+"alignment."
+msgstr ""
+"I<Lp> впливає на те, яке вирівнювання у нестиснених даних слід припускати "
+"при кодуванні літералів. Див. I<pb> нижче, щоб дізнатися більше про "
+"вирівнювання."
+
+#. type: TP
+#: ../src/xz/xz.1:1473
+#, no-wrap
+msgid "B<pb=>I<pb>"
+msgstr "B<pb=>I<pb>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1477
+msgid ""
+"Specify the number of position bits. The minimum is 0 and the maximum is 4; "
+"the default is 2."
+msgstr ""
+"Визначає кількість позиційних бітів. Мінімальною кількістю є 0, а "
+"максимальною — 4. Типовою кількістю є 2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1484
+msgid ""
+"I<Pb> affects what kind of alignment in the uncompressed data is assumed in "
+"general. The default means four-byte alignment (2^I<pb>=2^2=4), which is "
+"often a good choice when there's no better guess."
+msgstr ""
+"I<Pb> впливає на те, який тип вирівнювання загалом припускатиметься для "
+"нестиснених даних. Типовим є чотирибайтове вирівнювання (2^I<pb>=2^2=4), "
+"яке, зазвичай, є добрим варіантом, якщо немає кращих припущень."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1498
+msgid ""
+"When the alignment is known, setting I<pb> 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<pb=0> can improve compression "
+"slightly. For UTF-16 text, B<pb=1> is a good choice. If the alignment is "
+"an odd number like 3 bytes, B<pb=0> might be the best choice."
+msgstr ""
+"Якщо вирівнювання є відомим, встановлення відповідним чином I<pb> може трохи "
+"зменшити розмір файла. Наприклад, у текстових файлах із однобайтовим "
+"вирівнюванням (US-ASCII, ISO-8859-*, UTF-8), встановлення значення B<pb=0> "
+"може трохи поліпшити стискання. Для тексту UTF-16 добрим варіантом є "
+"B<pb=1>. Якщо вирівнювання є непарним числом, наприклад 3 байти, найкращим "
+"вибором, ймовірно, є B<pb=0>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1506
+msgid ""
+"Even though the assumed alignment can be adjusted with I<pb> and I<lp>, "
+"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<pb> і I<lp>, "
+"у LZMA1 і LZMA2 дещо пріоритетним є 16-байтове вирівнювання. Це, ймовірно, "
+"слід враховувати при компонуванні форматів файлів, які, ймовірно, часто "
+"будуть стискатися з використанням LZMA1 або LZMA2."
+
+#. type: TP
+#: ../src/xz/xz.1:1506
+#, no-wrap
+msgid "B<mf=>I<mf>"
+msgstr "B<mf=>I<mf>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1521
+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<preset>: 0 uses B<hc3>, "
+"1\\(en3 use B<hc4>, and the rest use B<bt4>."
+msgstr ""
+"Засіб пошуку відповідників має значний вплив на швидкість, використання "
+"пам'яті та коефіцієнт стискання кодувальника. Зазвичай, засоби пошуку "
+"відповідників на основі ланцюжка хешів є швидшими за засоби пошуку "
+"відповідників на основі двійкового дерева. Типовий засіб залежить від "
+"I<шаблона>: для 0 використовують B<hc3>, для 1\\(en3 — B<hc4>, а для решти "
+"використовують B<bt4>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1527
+msgid ""
+"The following match finders are supported. The memory usage formulas below "
+"are rough approximations, which are closest to the reality when I<dict> is a "
+"power of two."
+msgstr ""
+"Передбачено підтримку вказаних нижче засобів пошуку відповідників. Наведені "
+"нижче формули обчислення використання пам'яті є грубими наближеннями, які є "
+"найближчими до реальних значень, якщо значенням I<словник> є степінь двійки."
+
+#. type: TP
+#: ../src/xz/xz.1:1528
+#, no-wrap
+msgid "B<hc3>"
+msgstr "B<hc3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1531
+msgid "Hash Chain with 2- and 3-byte hashing"
+msgstr "Ланцюжок хешів із 2- та 3-байтовим хешуванням"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1535 ../src/xz/xz.1:1584
+msgid "Minimum value for I<nice>: 3"
+msgstr "Мінімальне значення I<пріоритетності>: 3"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1537 ../src/xz/xz.1:1556 ../src/xz/xz.1:1586
+#: ../src/xz/xz.1:1605
+msgid "Memory usage:"
+msgstr "Використання пам'яті:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1542
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 7.5 (якщо I<dict> E<lt>= 16 МіБ);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1547
+msgid "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 5.5 + 64 МіБ (якщо I<dict> E<gt> 16 МіБ)"
+
+#. type: TP
+#: ../src/xz/xz.1:1547
+#, no-wrap
+msgid "B<hc4>"
+msgstr "B<hc4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1550
+msgid "Hash Chain with 2-, 3-, and 4-byte hashing"
+msgstr "Ланцюжок хешів із 2-, 3- та 4-байтовим хешуванням"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1554 ../src/xz/xz.1:1603
+msgid "Minimum value for I<nice>: 4"
+msgstr "Мінімальне значення I<пріоритетності>: 4"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1561
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 7.5 (якщо I<dict> E<lt>= 32 МіБ);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1566
+msgid "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 6.5 (якщо I<dict> E<gt> 32 МіБ)"
+
+#. type: TP
+#: ../src/xz/xz.1:1566
+#, no-wrap
+msgid "B<bt2>"
+msgstr "B<bt2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1569
+msgid "Binary Tree with 2-byte hashing"
+msgstr "Двійкове дерево із 2-байтовим хешуванням"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1573
+msgid "Minimum value for I<nice>: 2"
+msgstr "Мінімальне значення I<пріоритетності>: 2"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1577
+msgid "Memory usage: I<dict> * 9.5"
+msgstr "Використання пам'яті: I<dict> * 9.5"
+
+#. type: TP
+#: ../src/xz/xz.1:1577
+#, no-wrap
+msgid "B<bt3>"
+msgstr "B<bt3>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1580
+msgid "Binary Tree with 2- and 3-byte hashing"
+msgstr "Двійкове дерево із 2- і 3-байтовим хешуванням"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1591
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr "I<dict> * 11.5 (якщо I<dict> E<lt>= 16 МіБ);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1596
+msgid "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr "I<dict> * 9.5 + 64 МіБ (якщо I<dict> E<gt> 16 МіБ)"
+
+#. type: TP
+#: ../src/xz/xz.1:1596
+#, no-wrap
+msgid "B<bt4>"
+msgstr "B<bt4>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1599
+msgid "Binary Tree with 2-, 3-, and 4-byte hashing"
+msgstr "Двійкове дерево із 2-, 3- і 4-байтовим хешуванням"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1610
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr "I<dict> * 11.5 (якщо I<dict> E<lt>= 32 МіБ);"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1615
+msgid "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+msgstr "I<dict> * 10.5 (якщо I<dict> E<gt> 32 МіБ)"
+
+#. type: TP
+#: ../src/xz/xz.1:1616
+#, no-wrap
+msgid "B<mode=>I<mode>"
+msgstr "B<mode=>I<режим>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1637
+msgid ""
+"Compression I<mode> specifies the method to analyze the data produced by the "
+"match finder. Supported I<modes> are B<fast> and B<normal>. The default is "
+"B<fast> for I<presets> 0\\(en3 and B<normal> for I<presets> 4\\(en9."
+msgstr ""
+"Параметр I<режиму> стискання визначає спосіб, який буде використано для "
+"аналізу даних, які створено засобом пошуку відповідників. Підтримуваними "
+"I<режимами> є B<fast> (швидкий) і B<normal> (нормальний). Типовим є режим "
+"B<fast> для I<шаблонів> 0\\(en3 і режим B<normal> для I<шаблонів> 4\\(en9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1646
+msgid ""
+"Usually B<fast> is used with Hash Chain match finders and B<normal> with "
+"Binary Tree match finders. This is also what the I<presets> do."
+msgstr ""
+"Зазвичай, із засобом пошуку відповідників на основі ланцюжка хешів "
+"використовують B<fast>, а із засобом пошуку відповідників на основі "
+"двійкового дерева використовують B<normal>. Так само налаштовано і "
+"I<шаблони>."
+
+#. type: TP
+#: ../src/xz/xz.1:1646
+#, no-wrap
+msgid "B<nice=>I<nice>"
+msgstr "B<nice=>I<пріоритетність>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1653
+msgid ""
+"Specify what is considered to be a nice length for a match. Once a match of "
+"at least I<nice> bytes is found, the algorithm stops looking for possibly "
+"better matches."
+msgstr ""
+"Вказати, яка довжина є пріоритетною для відповідності. Щойно буде виявлено "
+"відповідність у принаймні I<пріоритетність> байтів, алгоритм зупинятиме "
+"пошук можливих кращих відповідників."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1660
+msgid ""
+"I<Nice> can be 2\\(en273 bytes. Higher values tend to give better "
+"compression ratio at the expense of speed. The default depends on the "
+"I<preset>."
+msgstr ""
+"I<Пріоритетністю> може бути число до 2\\(en273 байтів. Вищі значення дають "
+"кращий коефіцієнт стискання за рахунок швидкості. Типове значення залежить "
+"від I<шаблона>."
+
+#. type: TP
+#: ../src/xz/xz.1:1660
+#, no-wrap
+msgid "B<depth=>I<depth>"
+msgstr "B<depth=>I<глибина>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1670
+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<depth> from I<mf> and I<nice>."
+msgstr ""
+"Вказати максимальну глибину пошуку у засобі пошуку відповідності. Типовим є "
+"особливе значення 0, яке наказує засобу стискання визначити прийнятну "
+"I<глибину> на основі I<mf> і I<пріоритетності>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1681
+msgid ""
+"Reasonable I<depth> for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary "
+"Trees. Using very high values for I<depth> can make the encoder extremely "
+"slow with some files. Avoid setting the I<depth> over 1000 unless you are "
+"prepared to interrupt the compression in case it is taking far too long."
+msgstr ""
+"Прийнятним значенням I<глибини> для ланцюжків хешів є 4\\(en100 і "
+"16\\(en1000 для двійкових дерев. Використання дуже високих значень для "
+"I<глибини> може зробити кодувальник дуже повільним для деяких файлів. Не "
+"встановлюйте значення I<глибини>, що перевищує 1000, якщо ви не готові "
+"перервати стискання, якщо воно триватиме надто довго."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1692
+msgid ""
+"When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary "
+"I<size>. LZMA1 needs also I<lc>, I<lp>, and I<pb>."
+msgstr ""
+"При декодуванні необроблених потоків даних (B<--format=raw>), LZMA2 потребує "
+"лише I<розміру> словника. LZMA1 потребує також I<lc>, I<lp> і I<pb>."
+
+#. type: TP
+#: ../src/xz/xz.1:1692
+#, no-wrap
+msgid "B<--x86>[B<=>I<options>]"
+msgstr "B<--x86>[B<=>I<параметри>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1695
+#, no-wrap
+msgid "B<--arm>[B<=>I<options>]"
+msgstr "B<--arm>[B<=>I<параметри>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1697
+#, no-wrap
+msgid "B<--armthumb>[B<=>I<options>]"
+msgstr "B<--armthumb>[B<=>I<параметри>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1699
+#, no-wrap
+msgid "B<--arm64>[B<=>I<options>]"
+msgstr "B<--arm64>[B<=>I<параметри>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1701
+#, no-wrap
+msgid "B<--powerpc>[B<=>I<options>]"
+msgstr "B<--powerpc>[B<=>I<параметри>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1703
+#, no-wrap
+msgid "B<--ia64>[B<=>I<options>]"
+msgstr "B<--ia64>[B<=>I<параметри>]"
+
+#. type: TP
+#: ../src/xz/xz.1:1705
+#, no-wrap
+msgid "B<--sparc>[B<=>I<options>]"
+msgstr "B<--sparc>[B<=>I<параметри>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1711
+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 ""
+"Додати фільтр гілок/викликів/переходів (branch/call/jump або BCJ) до "
+"ланцюжка фільтрів. Цими фільтрами можна скористатися, лише якщо вони не є "
+"останнім фільтром у ланцюжку фільтрів."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1725
+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\\(en15\\ % менше. Фільтри BCJ "
+"завжди є придатними до обернення, тому використання фільтра BCJ до "
+"помилкового типу даних не спричинятиме втрати даних, хоча може дещо "
+"погіршити коефіцієнт стискання. Фільтри BCJ є дуже швидкими і такими, що "
+"використовують незначний об'єм пам'яті."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1728
+msgid "These BCJ filters have known problems related to the compression ratio:"
+msgstr ""
+"Ці фільтри BCJ мають відомі проблеми, які пов'язано із рівнем стискання:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1735
+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:1745
+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. Наприклад, якщо "
+"є подібні або навіть однакові виконувані файли, фільтрування, ймовірно, "
+"зробить ці файли менш подібними, а отже, зробить стискання гіршим. Вміст "
+"файлів, які не є виконуваними, у тому самому архіві також може вплинути на "
+"результат. На практиці, варто спробувати варіанти з фільтром BCJ і без "
+"нього, щоб визначитися із тим, що буде кращим у кожній ситуації."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1750
+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:1757
+#, no-wrap
+msgid "Filter"
+msgstr "Фільтр"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Alignment"
+msgstr "Вирівнювання"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Notes"
+msgstr "Нотатки"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "x86"
+msgstr "x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "32-bit or 64-bit x86"
+msgstr "32-бітова або 64-бітова x86"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1759
+#, no-wrap
+msgid "ARM"
+msgstr "ARM"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1760
+#, no-wrap
+msgid "ARM-Thumb"
+msgstr "ARM-Thumb"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "ARM64"
+msgstr "ARM64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "4096-byte alignment is best"
+msgstr ""
+"Найкращим є вирівнювання за\n"
+";;4096 байтами"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "PowerPC"
+msgstr "PowerPC"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "Big endian only"
+msgstr "Лише зворотний порядок байтів"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "IA-64"
+msgstr "IA-64"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "16"
+msgstr "16"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "Itanium"
+msgstr "Itanium"
+
+#. type: tbl table
+#: ../src/xz/xz.1:1764
+#, no-wrap
+msgid "SPARC"
+msgstr "SPARC"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1781
+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. For example, with the IA-64 "
+"filter, it's good to set B<pb=4> or even B<pb=4,lp=4,lc=0> with LZMA2 "
+"(2^4=16). The x86 filter is an exception; it's usually good to stick to "
+"LZMA2's default four-byte alignment when compressing x86 executables."
+msgstr ""
+"Оскільки фільтровані BCJ дані, зазвичай, стискають за допомогою LZMA2, "
+"коефіцієнт стискання можна трохи поліпшити, якщо параметри LZMA2 буде "
+"встановлено так, щоб вони відповідали вирівнюванню вибраного фільтра BCJ. "
+"Наприклад, з фільтром IA-64 варто встановити B<pb=4> або навіть B<pb=4,lp=4,"
+"lc=0> з LZMA2 (2^4=16). Фільтр x86 є винятком; його, зазвичай, варто "
+"поєднувати із типовим чотирибайтовим вирівнюванням LZMA2 при стисканні "
+"виконуваних файлів x86."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1784
+msgid "All BCJ filters support the same I<options>:"
+msgstr "У всіх фільтрах BCJ передбачено підтримку тих самих I<параметрів>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1785
+#, no-wrap
+msgid "B<start=>I<offset>"
+msgstr "B<start=>I<зсув>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1799
+msgid ""
+"Specify the start I<offset> that is used when converting between relative "
+"and absolute addresses. The I<offset> 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<offset> is almost never useful."
+msgstr ""
+"Встановити початковий I<зсув>, який буде використано при перетворенні між "
+"відносною та абсолютною адресами. Значення I<зсув> має бути кратним до "
+"вирівнювання фільтра (див. таблицю вище). Типовим зсувом є нульовий. На "
+"практиці, типове значення є прийнятним; визначення нетипового значення "
+"I<зсув> майже завжди нічого корисного не дає."
+
+#. type: TP
+#: ../src/xz/xz.1:1800
+#, no-wrap
+msgid "B<--delta>[B<=>I<options>]"
+msgstr "B<--delta>[B<=>I<параметри>]"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1805
+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:1814
+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<flac>(1)."
+msgstr ""
+"У поточній версії передбачено підтримку обчислення лише простої побітової "
+"дельти. Це може бути корисним при стисканні, наприклад, нестиснутих "
+"растрових зображень або нестиснутих звукових даних PCM. Втім, спеціалізовані "
+"алгоритми можуть давати значно кращі результати за дельту + LZMA2. Це "
+"правило особливо стосується звукових даних, які стискає швидше і краще, "
+"наприклад, B<flac>(1)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1817
+msgid "Supported I<options>:"
+msgstr "Підтримувані I<параметри>:"
+
+#. type: TP
+#: ../src/xz/xz.1:1818
+#, no-wrap
+msgid "B<dist=>I<distance>"
+msgstr "B<dist=>I<відстань>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1826
+msgid ""
+"Specify the I<distance> of the delta calculation in bytes. I<distance> must "
+"be 1\\(en256. The default is 1."
+msgstr ""
+"Вказати I<відстань> обчислень різниці у байтах. Значення I<відстань> має "
+"потрапляти у діапазон 1\\(en256. Типовим значенням є 1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1831
+msgid ""
+"For example, with B<dist=2> 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<dist=2> та восьмибайтовими вхідними даними A1 B1 A2 B3 A3 B5 "
+"A4 B7, результатом буде A1 B1 01 02 01 02 01 02."
+
+#. type: SS
+#: ../src/xz/xz.1:1833
+#, no-wrap
+msgid "Other options"
+msgstr "Інші параметри"
+
+#. type: TP
+#: ../src/xz/xz.1:1834 ../src/xzdec/xzdec.1:83
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr "B<-q>, B<--quiet>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1841
+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:1841
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr "B<-v>, B<--verbose>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1850
+msgid ""
+"Be verbose. If standard error is connected to a terminal, B<xz> will "
+"display a progress indicator. Specifying B<--verbose> twice will give even "
+"more verbose output."
+msgstr ""
+"Докладний режим повідомлень. Якщо стандартне виведення помилок з'єднано із "
+"терміналом, B<xz> показуватиме індикатор поступу. Використання B<--verbose> "
+"двічі призведе до ще докладнішого виведення."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1852
+msgid "The progress indicator shows the following information:"
+msgstr "Індикатор поступу показує такі дані:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1857
+msgid ""
+"Completion percentage is shown if the size of the input file is known. That "
+"is, the percentage cannot be shown in pipes."
+msgstr ""
+"Частку завершеності буде показано, якщо відомий розмір файла вхідних даних. "
+"Тобто, для каналів даних частку не може бути показано."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1860
+msgid ""
+"Amount of compressed data produced (compressing) or consumed "
+"(decompressing)."
+msgstr ""
+"Об'єм стиснених виведених даних (стискання) або оброблених (розпаковування)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1863
+msgid ""
+"Amount of uncompressed data consumed (compressing) or produced "
+"(decompressing)."
+msgstr ""
+"Об'єм незапакованих даних (стискання) або виведених даних (розпаковування)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1867
+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:1874
+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<xz> started "
+"processing the file."
+msgstr ""
+"Швидкість стискання або розпаковування. Обчислюється як об'єм нестиснутих "
+"даних (стискання) або виведених даних (розпаковування) за секунду. Його буде "
+"показано за декілька секунд з моменту, коли B<xz> почала обробляти файл."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1876
+msgid "Elapsed time in the format M:SS or H:MM:SS."
+msgstr "Витрачений час у форматі Х:СС або Г:ХХ:СС."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1884
+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<xz> 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<xz> почала "
+"обробляти файл. Час буде показано у менш точному форматі, без двокрапок, "
+"наприклад, 2 хв. 30 с."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1899
+msgid ""
+"When standard error is not a terminal, B<--verbose> will make B<xz> 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<xz> виведе назву файла, стиснений розмір, нестиснений розмір, "
+"коефіцієнт стискання та, можливо, також швидкість та витрачений час у одному "
+"рядку до стандартного виведення помилок після стискання або розпаковування "
+"файла. Швидкість та витрачений час буде включено, лише якщо дія триває "
+"принаймні декілька секунд. Якщо дію не буде завершено, наприклад, через "
+"втручання користувача, буде також виведено частку виконання, якщо відомий "
+"розмір файла вхідних даних."
+
+#. type: TP
+#: ../src/xz/xz.1:1899 ../src/xzdec/xzdec.1:89
+#, no-wrap
+msgid "B<-Q>, B<--no-warn>"
+msgstr "B<-Q>, B<--no-warn>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1909
+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:1909
+#, no-wrap
+msgid "B<--robot>"
+msgstr "B<--robot>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1921
+msgid ""
+"Print messages in a machine-parsable format. This is intended to ease "
+"writing frontends that want to use B<xz> instead of liblzma, which may be "
+"the case with various scripts. The output with this option enabled is meant "
+"to be stable across B<xz> releases. See the section B<ROBOT MODE> for "
+"details."
+msgstr ""
+"Виводити повідомлення у придатному для обробки комп'ютером форматі. Цей "
+"формат призначено для полегшення написання оболонок, які використовуватимуть "
+"B<xz> замість liblzma, що може бути зручним для різноманітних скриптів. "
+"Виведені дані з цим параметром має бути стабільним для усіх випусків B<xz>. "
+"Докладніший опис можна знайти у розділі B<РЕЖИМ РОБОТА>."
+
+#. type: TP
+#: ../src/xz/xz.1:1921
+#, no-wrap
+msgid "B<--info-memory>"
+msgstr "B<--info-memory>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1928
+msgid ""
+"Display, in human-readable format, how much physical memory (RAM) and how "
+"many processor threads B<xz> thinks the system has and the memory usage "
+"limits for compression and decompression, and exit successfully."
+msgstr ""
+"Вивести у придатному для читання людиною форматі, скільки фізичної пам'яті "
+"(RAM) та скільки потоків процесора є за даними B<xz> у системі, обмеження "
+"для стискання та розпаковування, а потім успішно завершити роботу."
+
+#. type: TP
+#: ../src/xz/xz.1:1928 ../src/xzdec/xzdec.1:96
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr "B<-h>, B<--help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1932
+msgid ""
+"Display a help message describing the most commonly used options, and exit "
+"successfully."
+msgstr ""
+"Вивести повідомлення про помилку з описом найбільш типових використаних "
+"параметрів і успішно завершити роботу."
+
+#. type: TP
+#: ../src/xz/xz.1:1932
+#, no-wrap
+msgid "B<-H>, B<--long-help>"
+msgstr "B<-H>, B<--long-help>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1937
+msgid ""
+"Display a help message describing all features of B<xz>, and exit "
+"successfully"
+msgstr ""
+"Вивести довідкове повідомлення з описом усіх можливостей B<xz> і успішно "
+"завершити роботу"
+
+#. type: TP
+#: ../src/xz/xz.1:1937 ../src/xzdec/xzdec.1:99
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr "B<-V>, B<--version>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1946
+msgid ""
+"Display the version number of B<xz> and liblzma in human readable format. "
+"To get machine-parsable output, specify B<--robot> before B<--version>."
+msgstr ""
+"Вивести номер версії B<xz> та liblzma у зручному для читання форматі. Щоб "
+"отримати дані, зручні для обробки на комп'ютері, вкажіть B<--robot> до B<--"
+"version>."
+
+#. type: SH
+#: ../src/xz/xz.1:1947
+#, no-wrap
+msgid "ROBOT MODE"
+msgstr "РЕЖИМ РОБОТА"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1963
+msgid ""
+"The robot mode is activated with the B<--robot> option. It makes the output "
+"of B<xz> easier to parse by other programs. Currently B<--robot> is "
+"supported only together with B<--version>, B<--info-memory>, and B<--list>. "
+"It will be supported for compression and decompression in the future."
+msgstr ""
+"Режим робота активують за допомогою параметра B<--robot>. Він спрощує "
+"обробку виведених B<xz> даних іншими програмами. У поточній версії підтримку "
+"B<--robot> передбачено лише разом із B<--version>, B<--info-memory> та B<--"
+"list>. У майбутньому підтримку параметра буде передбачено для стискання та "
+"розпаковування."
+
+#. type: SS
+#: ../src/xz/xz.1:1964
+#, no-wrap
+msgid "Version"
+msgstr "Версія"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1969
+msgid ""
+"B<xz --robot --version> prints the version number of B<xz> and liblzma in "
+"the following format:"
+msgstr ""
+"B<xz --robot --version> виведе назву версії B<xz> і liblzma у такому форматі:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1971
+msgid "B<XZ_VERSION=>I<XYYYZZZS>"
+msgstr "B<XZ_VERSION=>I<XYYYZZZS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1973
+msgid "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+msgstr "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+
+#. type: TP
+#: ../src/xz/xz.1:1973
+#, no-wrap
+msgid "I<X>"
+msgstr "I<X>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1976
+msgid "Major version."
+msgstr "Основна версія."
+
+#. type: TP
+#: ../src/xz/xz.1:1976
+#, no-wrap
+msgid "I<YYY>"
+msgstr "I<YYY>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1981
+msgid ""
+"Minor version. Even numbers are stable. Odd numbers are alpha or beta "
+"versions."
+msgstr ""
+"Проміжна версія. Непарні номери буде використано для стабільних версій. "
+"Непарні номери є номерами тестових версій."
+
+#. type: TP
+#: ../src/xz/xz.1:1981
+#, no-wrap
+msgid "I<ZZZ>"
+msgstr "I<ZZZ>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1985
+msgid ""
+"Patch level for stable releases or just a counter for development releases."
+msgstr ""
+"Рівень латання для стабільних випусків або просто лічильник для випусків, "
+"які перебувають у розробці."
+
+#. type: TP
+#: ../src/xz/xz.1:1985
+#, no-wrap
+msgid "I<S>"
+msgstr "I<S>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:1993
+msgid ""
+"Stability. 0 is alpha, 1 is beta, and 2 is stable. I<S> should be always 2 "
+"when I<YYY> is even."
+msgstr ""
+"Стабільність. 0 — alpha, 1 — beta, а 2 означає «стабільна версія». I<S> має "
+"завжди дорівнювати 2, якщо I<YYY> є парним."
+
+#. type: Plain text
+#: ../src/xz/xz.1:1998
+msgid ""
+"I<XYYYZZZS> are the same on both lines if B<xz> and liblzma are from the "
+"same XZ Utils release."
+msgstr ""
+"I<XYYYZZZS> є тим самим в обох рядках, якщо B<xz> і liblzma належать до "
+"одного випуску XZ Utils."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2004
+msgid "Examples: 4.999.9beta is B<49990091> and 5.0.0 is B<50000002>."
+msgstr "Приклади: 4.999.9beta — це B<49990091>, а 5.0.0 — це B<50000002>."
+
+#. type: SS
+#: ../src/xz/xz.1:2005
+#, no-wrap
+msgid "Memory limit information"
+msgstr "Дані щодо обмеження пам'яті"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2008
+msgid ""
+"B<xz --robot --info-memory> prints a single line with multiple tab-separated "
+"columns:"
+msgstr ""
+"B<xz --robot --info-memory> виводить один рядок з декількома відокремленими "
+"табуляціями стовпчиками:"
+
+#. type: IP
+#: ../src/xz/xz.1:2008
+#, no-wrap
+msgid "1."
+msgstr "1."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2010
+msgid "Total amount of physical memory (RAM) in bytes."
+msgstr "Загальний об'єм фізичної пам'яті (RAM) у байтах."
+
+#. type: IP
+#: ../src/xz/xz.1:2010 ../src/xz/xz.1:2125 ../src/xz/xz.1:2162
+#: ../src/xz/xz.1:2188 ../src/xz/xz.1:2258 ../src/xz/xz.1:2285
+#, no-wrap
+msgid "2."
+msgstr "2."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2017
+msgid ""
+"Memory usage limit for compression in bytes (B<--memlimit-compress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Обмеження на використання пам'яті для стискання у байтах (B<--memlimit-"
+"compress>). Особливе значення B<0> вказує на типові налаштування, якими для "
+"однопотокового режиму є налаштування без обмеження на використання пам'яті."
+
+#. type: IP
+#: ../src/xz/xz.1:2017 ../src/xz/xz.1:2127 ../src/xz/xz.1:2164
+#: ../src/xz/xz.1:2190 ../src/xz/xz.1:2263 ../src/xz/xz.1:2287
+#, no-wrap
+msgid "3."
+msgstr "3."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2024
+msgid ""
+"Memory usage limit for decompression in bytes (B<--memlimit-decompress>). A "
+"special value of B<0> indicates the default setting which for single-"
+"threaded mode is the same as no limit."
+msgstr ""
+"Обмеження на використання пам'яті для розпакування у байтах (B<--memlimit-"
+"decompress>). Особливе значення B<0> вказує на типові налаштування, якими "
+"для однопотокового режиму є налаштування без обмеження на використання "
+"пам'яті."
+
+#. type: IP
+#: ../src/xz/xz.1:2024 ../src/xz/xz.1:2129 ../src/xz/xz.1:2166
+#: ../src/xz/xz.1:2193 ../src/xz/xz.1:2273 ../src/xz/xz.1:2289
+#, no-wrap
+msgid "4."
+msgstr "4."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2036
+msgid ""
+"Since B<xz> 5.3.4alpha: Memory usage for multi-threaded decompression in "
+"bytes (B<--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 B<--memlimit-mt-"
+"decompress>."
+msgstr ""
+"Починаючи з B<xz> 5.3.4alpha: використання пам'яті для багатопотокового "
+"розпаковування у байтах (B<--memlimit-mt-decompress>). Ніколи не дорівнює "
+"нулеві, оскільки буде використано специфічне для системи типове значення, "
+"яке показано у стовпчику 5, якщо обмеження не встановлено явним чином. Також "
+"ніколи не перевищуватиме значення у стовпчику 3, навіть якщо було вказано "
+"більше значення за допомогою B<--memlimit-mt-decompress>."
+
+#. type: IP
+#: ../src/xz/xz.1:2036 ../src/xz/xz.1:2131 ../src/xz/xz.1:2168
+#: ../src/xz/xz.1:2195 ../src/xz/xz.1:2291
+#, no-wrap
+msgid "5."
+msgstr "5."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2048
+msgid ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+msgstr ""
+"Починаючи з B<xz> 5.3.4alpha: специфічне для системи типове обмеження на "
+"використання пам'яті, яке використовують для обмеження кількості потоків при "
+"стисканні з автоматичною кількістю потоків (B<--threads=0>) і без визначення "
+"обмеження на використання пам'яті (B<--memlimit-compress>). Це значення "
+"також використовують як типове значення для B<--memlimit-mt-decompress>."
+
+#. type: IP
+#: ../src/xz/xz.1:2048 ../src/xz/xz.1:2133 ../src/xz/xz.1:2170
+#: ../src/xz/xz.1:2197 ../src/xz/xz.1:2293
+#, no-wrap
+msgid "6."
+msgstr "6."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2053
+msgid "Since B<xz> 5.3.4alpha: Number of available processor threads."
+msgstr ""
+"Починаючи з B<xz> 5.3.4alpha: кількість доступних потоків обробки процесора."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2057
+msgid ""
+"In the future, the output of B<xz --robot --info-memory> may have more "
+"columns, but never more than a single line."
+msgstr ""
+"У майбутньому у виведенні B<xz --robot --info-memory> може бути більше "
+"стовпчиків, але у виведеному буде не більше за один рядок."
+
+#. type: SS
+#: ../src/xz/xz.1:2058
+#, no-wrap
+msgid "List mode"
+msgstr "Режим списку"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2063
+msgid ""
+"B<xz --robot --list> 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<xz --robot --list> використано табуляції для поділу виведених даних. "
+"Першим стовпчиком у кожному рядку є рядок, що вказує на тип відомостей, які "
+"можна знайти у цьому рядку:"
+
+#. type: TP
+#: ../src/xz/xz.1:2063
+#, no-wrap
+msgid "B<name>"
+msgstr "B<назва>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2067
+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:2067
+#, no-wrap
+msgid "B<file>"
+msgstr "B<файл>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2075
+msgid ""
+"This line contains overall information about the B<.xz> file. This line is "
+"always printed after the B<name> line."
+msgstr ""
+"У цьому рядку містяться загальні відомості щодо файла B<.xz>. Цей рядок "
+"завжди виводять після рядка B<name>."
+
+#. type: TP
+#: ../src/xz/xz.1:2075
+#, no-wrap
+msgid "B<stream>"
+msgstr "B<stream>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2085
+msgid ""
+"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."
+msgstr ""
+"Цей тип рядка використовують, лише якщо було вказано B<--verbose>. Буде "
+"стільки рядків B<stream>, скільки потоків у файлі B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2085
+#, no-wrap
+msgid "B<block>"
+msgstr "B<block>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2100
+msgid ""
+"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."
+msgstr ""
+"Цей тип рядка використовують, лише якщо було вказано B<--verbose>. Буде "
+"стільки рядків B<block>, скільки блоків у файлі B<.xz>. Рядки B<block> буде "
+"показано після усіх рядків B<stream>; різні типи рядків не перемежовуються."
+
+#. type: TP
+#: ../src/xz/xz.1:2100
+#, no-wrap
+msgid "B<summary>"
+msgstr "B<summary>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2115
+msgid ""
+"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."
+msgstr ""
+"Цей тип рядків використовують, лише якщо B<--verbose> було вказано двічі. "
+"Цей рядок буде виведено після усіх рядків B<block>. Подібно до рядка "
+"B<file>, рядок B<summary> містить загальні відомості щодо файла B<.xz>."
+
+#. type: TP
+#: ../src/xz/xz.1:2115
+#, no-wrap
+msgid "B<totals>"
+msgstr "B<totals>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2119
+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:2123
+msgid "The columns of the B<file> lines:"
+msgstr "Стовпчики у рядках B<файла>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2127
+msgid "Number of streams in the file"
+msgstr "Кількість потоків у файлі"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2129
+msgid "Total number of blocks in the stream(s)"
+msgstr "Загальна кількість блоків у потоках"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2131
+msgid "Compressed size of the file"
+msgstr "Розмір стисненого файла"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2133
+msgid "Uncompressed size of the file"
+msgstr "Розмір нестисненого файла"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2139
+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:2139 ../src/xz/xz.1:2172 ../src/xz/xz.1:2199
+#: ../src/xz/xz.1:2295
+#, no-wrap
+msgid "7."
+msgstr "7."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2152
+msgid ""
+"Comma-separated list of integrity check names. The following strings are "
+"used for the known check types: B<None>, B<CRC32>, B<CRC64>, and "
+"B<SHA-256>. For unknown check types, B<Unknown->I<N> is used, where I<N> is "
+"the Check ID as a decimal number (one or two digits)."
+msgstr ""
+"Список відокремлених комами назв перевірок цілісності. Наведені нижче рядки "
+"використовують для відомих типів перевірок: B<None>, B<CRC32>, B<CRC64> і "
+"B<SHA-256>. Для невідомих типів перевірок буде використано B<Unknown->I<N>, "
+"де I<N> є ідентифікатором перевірки у форматі десяткового числа (одна або "
+"дві цифри)."
+
+#. type: IP
+#: ../src/xz/xz.1:2152 ../src/xz/xz.1:2174 ../src/xz/xz.1:2201
+#: ../src/xz/xz.1:2298
+#, no-wrap
+msgid "8."
+msgstr "8."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2154
+msgid "Total size of stream padding in the file"
+msgstr "Загальний розмір доповнення потоку у файлі"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2160
+msgid "The columns of the B<stream> lines:"
+msgstr "Стовпчики у рядках B<stream>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2164
+msgid "Stream number (the first stream is 1)"
+msgstr "Номер потоку (перший потік має номер 1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2166
+msgid "Number of blocks in the stream"
+msgstr "Кількість блоків у потоці"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2168
+msgid "Compressed start offset"
+msgstr "Зсув початку стисненого"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2170
+msgid "Uncompressed start offset"
+msgstr "Зсув початку нестисненого"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2172
+msgid "Compressed size (does not include stream padding)"
+msgstr "Стиснений розмір (не включає доповнення потоку)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2174 ../src/xz/xz.1:2203 ../src/xz/xz.1:2293
+msgid "Uncompressed size"
+msgstr "Нестиснутий розмір"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2205
+msgid "Compression ratio"
+msgstr "Рівень стискання"
+
+#. type: IP
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2203 ../src/xz/xz.1:2300
+#, no-wrap
+msgid "9."
+msgstr "9."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2207
+msgid "Name of the integrity check"
+msgstr "Назва перевірки цілісності"
+
+#. type: IP
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2205 ../src/xz/xz.1:2316
+#, no-wrap
+msgid "10."
+msgstr "10."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2180
+msgid "Size of stream padding"
+msgstr "Розмір доповнення потоку"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2186
+msgid "The columns of the B<block> lines:"
+msgstr "Стовпчики у рядках B<block>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2190
+msgid "Number of the stream containing this block"
+msgstr "Номер потоку, що містить цей блок"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2193
+msgid ""
+"Block number relative to the beginning of the stream (the first block is 1)"
+msgstr "Номер блоку відносно початку потоку (перший блок має номер 1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2195
+msgid "Block number relative to the beginning of the file"
+msgstr "Номер блоку відносно початку файла"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2197
+msgid "Compressed start offset relative to the beginning of the file"
+msgstr "Зсув початку стисненого відносно початку файла"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2199
+msgid "Uncompressed start offset relative to the beginning of the file"
+msgstr "Зсув початку нестисненого відносно початку файла"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2201
+msgid "Total compressed size of the block (includes headers)"
+msgstr "Загальний стиснений розмір блоку (включено з заголовками)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2219
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<block> 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<block> буде включено "
+"додаткові стовпчики. Ці стовпчики не буде показано, якщо вказано одинарний "
+"параметр B<--verbose>, оскільки отримання цих відомостей потребує багатьох "
+"позиціювань, а ця процедура може бути повільною:"
+
+#. type: IP
+#: ../src/xz/xz.1:2221 ../src/xz/xz.1:2321
+#, no-wrap
+msgid "11."
+msgstr "11."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2223
+msgid "Value of the integrity check in hexadecimal"
+msgstr "Значення перевірки цілісності у шістнадцятковій формі"
+
+#. type: IP
+#: ../src/xz/xz.1:2223 ../src/xz/xz.1:2331
+#, no-wrap
+msgid "12."
+msgstr "12."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2225
+msgid "Block header size"
+msgstr "Розмір заголовка блоку"
+
+#. type: IP
+#: ../src/xz/xz.1:2225
+#, no-wrap
+msgid "13."
+msgstr "13."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2235
+msgid ""
+"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 "
+"(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<c> вказує, що наявний стиснений розмір, а B<u> вказує, що "
+"наявний нестиснений розмір. Якщо прапорець не встановлено, буде показано (B<-"
+">) замість підтримання фіксованого розміру рядка. У майбутньому наприкінці "
+"рядка може бути додано нові прапорці."
+
+#. type: IP
+#: ../src/xz/xz.1:2235
+#, no-wrap
+msgid "14."
+msgstr "14."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2238
+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:2238
+#, no-wrap
+msgid "15."
+msgstr "15."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2243
+msgid ""
+"Amount of memory (in bytes) required to decompress this block with this "
+"B<xz> version"
+msgstr ""
+"Об'єм пам'яті (у байтах), який потрібен для розпаковування цього блоку за "
+"допомогою цієї версії B<xz>"
+
+#. type: IP
+#: ../src/xz/xz.1:2243
+#, no-wrap
+msgid "16."
+msgstr "16."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2250
+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:2256
+msgid "The columns of the B<summary> lines:"
+msgstr "Стовпчики у рядках B<summary>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2263
+msgid ""
+"Amount of memory (in bytes) required to decompress this file with this B<xz> "
+"version"
+msgstr ""
+"Об'єм пам'яті (у байтах), який потрібен для розпаковування цього файла за "
+"допомогою цієї версії B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2269 ../src/xz/xz.1:2327
+msgid ""
+"B<yes> or B<no> indicating if all block headers have both compressed size "
+"and uncompressed size stored in them"
+msgstr ""
+"B<yes> або B<no> вказує, якщо усі заголовки блоків містять одразу стиснений "
+"розмір та розпакований розмір"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2273 ../src/xz/xz.1:2331
+msgid "I<Since> B<xz> I<5.1.2alpha:>"
+msgstr "I<Починаючи з> B<xz> I<5.1.2alpha:>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2277 ../src/xz/xz.1:2335
+msgid "Minimum B<xz> version required to decompress the file"
+msgstr "Мінімальна версія B<xz>, яка потрібна для розпаковування файла"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2283
+msgid "The columns of the B<totals> line:"
+msgstr "Стовпчики рядка B<totals>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2287
+msgid "Number of streams"
+msgstr "Кількість потоків"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2289
+msgid "Number of blocks"
+msgstr "Кількість блоків"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2291
+msgid "Compressed size"
+msgstr "Стиснутий розмір"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2295
+msgid "Average compression ratio"
+msgstr "Середній коефіцієнт стискання"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2298
+msgid ""
+"Comma-separated list of integrity check names that were present in the files"
+msgstr ""
+"Список відокремлених комами назв перевірок цілісності, результати яких "
+"наявні у файлах"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2300
+msgid "Stream padding size"
+msgstr "Розмір доповнення потоку"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2306
+msgid ""
+"Number of files. This is here to keep the order of the earlier columns the "
+"same as on B<file> lines."
+msgstr ""
+"Кількість файлів. Наявний тут для зберігання такого самого порядку "
+"стовпчиків, що і у попередніх рядках B<file>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2314
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<totals> line:"
+msgstr ""
+"Якщо B<--verbose> було вказано двічі, до рядка B<totals> буде включено "
+"додаткові стовпчики:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2321
+msgid ""
+"Maximum amount of memory (in bytes) required to decompress the files with "
+"this B<xz> version"
+msgstr ""
+"Максимальний об'єм пам'яті (у байтах), який потрібен для розпаковування "
+"файлів за допомогою цієї версії B<xz>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2341
+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: SH
+#: ../src/xz/xz.1:2342 ../src/xzdec/xzdec.1:104 ../src/lzmainfo/lzmainfo.1:44
+#: ../src/scripts/xzgrep.1:81
+#, no-wrap
+msgid "EXIT STATUS"
+msgstr "СТАН ВИХОДУ"
+
+#. type: TP
+#: ../src/xz/xz.1:2343 ../src/xzdec/xzdec.1:105 ../src/lzmainfo/lzmainfo.1:45
+#, no-wrap
+msgid "B<0>"
+msgstr "B<0>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2346 ../src/lzmainfo/lzmainfo.1:48
+msgid "All is good."
+msgstr "Усе добре."
+
+#. type: TP
+#: ../src/xz/xz.1:2346 ../src/xzdec/xzdec.1:108 ../src/lzmainfo/lzmainfo.1:48
+#, no-wrap
+msgid "B<1>"
+msgstr "B<1>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2349 ../src/xzdec/xzdec.1:111 ../src/lzmainfo/lzmainfo.1:51
+msgid "An error occurred."
+msgstr "Сталася помилка."
+
+#. type: TP
+#: ../src/xz/xz.1:2349
+#, no-wrap
+msgid "B<2>"
+msgstr "B<2>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2353
+msgid "Something worth a warning occurred, but no actual errors occurred."
+msgstr "Сталося щось варте попередження, але справжніх помилок не сталося."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2356
+msgid ""
+"Notices (not warnings or errors) printed on standard error don't affect the "
+"exit status."
+msgstr ""
+"Зауваження (не попередження або помилки), які виведено до стандартного "
+"виведення помилок, не впливають на стан виходу."
+
+#. type: SH
+#: ../src/xz/xz.1:2357 ../src/scripts/xzgrep.1:94 ../src/scripts/xzless.1:52
+#, no-wrap
+msgid "ENVIRONMENT"
+msgstr "СЕРЕДОВИЩЕ"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2370
+msgid ""
+"B<xz> parses space-separated lists of options from the environment variables "
+"B<XZ_DEFAULTS> and B<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 "
+"B<getopt_long>(3) which is used also for the command line arguments."
+msgstr ""
+"B<xz> обробляє списки відокремлених пробілами параметрів зі змінних "
+"середовища B<XZ_DEFAULTS> і B<XZ_OPT>, перш ніж обробляти параметри з рядка "
+"команди. Зауважте, що буде оброблено лише параметри зі змінних середовища; "
+"усі непараметричні записи буде без повідомлень проігноровано. Обробку буде "
+"виконано за допомогою функції B<getopt_long>(3), яку також використовують "
+"для аргументів рядка команди."
+
+#. type: TP
+#: ../src/xz/xz.1:2370
+#, no-wrap
+msgid "B<XZ_DEFAULTS>"
+msgstr "B<XZ_DEFAULTS>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2379
+msgid ""
+"User-specific or system-wide default options. Typically this is set in a "
+"shell initialization script to enable B<xz>'s memory usage limiter by "
+"default. Excluding shell initialization scripts and similar special cases, "
+"scripts must never set or unset B<XZ_DEFAULTS>."
+msgstr ""
+"Специфічні для користувача або загальносистемні типові параметри. Зазвичай, "
+"їх встановлюють у скрипті ініціалізації оболонки для типового вмикання "
+"обмеження на використання пам'яті у B<xz>. Окрім скриптів ініціалізації "
+"оболонки і подібних особливих випадків, не слід встановлювати або "
+"скасовувати встановлення значення B<XZ_DEFAULTS> у скриптах."
+
+#. type: TP
+#: ../src/xz/xz.1:2379
+#, no-wrap
+msgid "B<XZ_OPT>"
+msgstr "B<XZ_OPT>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2390
+msgid ""
+"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 B<tar>(1):"
+msgstr ""
+"Цю змінну призначено для передавання параметрів до B<xz>, якщо неможливо "
+"встановити параметри безпосередньо у рядку команди B<xz>. Це трапляється, "
+"якщо B<xz> запущено скриптом або інструментом, наприклад, GNU B<tar>(1):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2396
+#, no-wrap
+msgid "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+msgstr "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2410
+msgid ""
+"Scripts may use B<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 B<sh>(1) scripts one may "
+"use something like this:"
+msgstr ""
+"Скрипти можуть використовувати B<XZ_OPT>, наприклад, для встановлення "
+"специфічних типових параметрів стискання. Втім, рекомендуємо дозволити "
+"користувачам перевизначати B<XZ_OPT>, якщо це має якісь причини. Наприклад, "
+"у скриптах B<sh>(1) можна скористатися чимось таким:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2417
+#, no-wrap
+msgid ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+msgstr ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+
+#. type: SH
+#: ../src/xz/xz.1:2422
+#, no-wrap
+msgid "LZMA UTILS COMPATIBILITY"
+msgstr "СУМІСНІСТЬ ІЗ LZMA UTILS"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2435
+msgid ""
+"The command line syntax of B<xz> is practically a superset of B<lzma>, "
+"B<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."
+msgstr ""
+"Синтаксис рядка команди B<xz> практично є надбудовою щодо B<lzma>, B<unlzma> "
+"і B<lzcat> з LZMA Utils 4.32.x. У більшості випадків можна замінити LZMA "
+"Utils XZ Utils без порушення працездатності наявних скриптів. Втім, існують "
+"певні несумісності, які іноді можуть спричиняти проблеми."
+
+#. type: SS
+#: ../src/xz/xz.1:2436
+#, no-wrap
+msgid "Compression preset levels"
+msgstr "Рівні шаблонів стискання"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2443
+msgid ""
+"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."
+msgstr ""
+"Нумерація у шаблонах рівнів стискання у B<xz> не є тотожною до нумерації у "
+"LZMA Utils. Найважливішою відмінністю є прив'язка розмірів словника до "
+"різних шаблонів. Розмір словника грубо рівний використанню пам'яті у засобі "
+"розпаковування."
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "Level"
+msgstr "Рівень"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "xz"
+msgstr "xz"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449
+#, no-wrap
+msgid "LZMA Utils"
+msgstr "LZMA Utils"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "N/A"
+msgstr "н/д"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2451
+#, no-wrap
+msgid "64 KiB"
+msgstr "64 КіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2453
+#, no-wrap
+msgid "512 KiB"
+msgstr "512 КіБ"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2468
+msgid ""
+"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:"
+msgstr ""
+"Відмінності у розмірах словників також впливають на використання пам'яті "
+"засобом стискання, але є і інші відмінності між LZMA Utils і XZ Utils, які "
+"роблять різницю ще помітнішою:"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2474
+#, no-wrap
+msgid "LZMA Utils 4.32.x"
+msgstr "LZMA Utils 4.32.x"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2477 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "12 MiB"
+msgstr "12 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2480
+#, no-wrap
+msgid "26 MiB"
+msgstr "26 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2481
+#, no-wrap
+msgid "45 MiB"
+msgstr "45 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2482
+#, no-wrap
+msgid "83 MiB"
+msgstr "83 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2483
+#, no-wrap
+msgid "159 MiB"
+msgstr "159 МіБ"
+
+#. type: tbl table
+#: ../src/xz/xz.1:2484
+#, no-wrap
+msgid "311 MiB"
+msgstr "311 МіБ"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2493
+msgid ""
+"The default preset level in LZMA Utils is B<-7> while in XZ Utils it is "
+"B<-6>, so both use an 8 MiB dictionary by default."
+msgstr ""
+"Типовим рівнем стискання у LZMA Utils є B<-7>, а у XZ Utils — B<-6>, отже, "
+"обидва комплекти програм типово використовують словник розміром у 8 МіБ."
+
+#. type: SS
+#: ../src/xz/xz.1:2494
+#, no-wrap
+msgid "Streamed vs. non-streamed .lzma files"
+msgstr "Потокові і непотокові файл .lzma"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2504
+msgid ""
+"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."
+msgstr ""
+"Розмір нестисненого файла може бути збережено у заголовку B<.lzma>. LZMA "
+"Utils зберігають дані при стисканні звичайних файлів. Альтернативним "
+"підходом є позначення нестисненого розміру як невідомого і використання "
+"позначки кінця вмісту для позначення місця, де засіб розпаковування має "
+"зупинитися. У LZMA Utils цей спосіб використовують, якщо нестиснений розмір "
+"є невідомим, що трапляється, наприклад, для конвеєрів обробки даних."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2525
+msgid ""
+"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."
+msgstr ""
+"У B<xz> передбачено підтримку розпаковування файлів B<.lzma> з позначкою "
+"кінця вмісту та без неї, але усі файли B<.lzma>, які створено за допомогою "
+"B<xz>, використовують позначку кінця вмісту, а нестиснений розмір у "
+"заголовку B<.lzma> позначають як невідомий. Це може призвести до проблем у "
+"деяких нетипових ситуаціях. Наприклад, розпакувальник B<.lzma> у вбудованому "
+"пристрої може працювати лише з файлами, для яких відомий нестиснений розмір. "
+"Якщо ви зіткнулися з цією проблемою, вам слід скористатися LZMA Utils або "
+"LZMA SDK для створення файлів B<.lzma> із відомим розміром нестиснених даних."
+
+#. type: SS
+#: ../src/xz/xz.1:2526
+#, no-wrap
+msgid "Unsupported .lzma files"
+msgstr "Непідтримувані файли .lzma"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2549
+msgid ""
+"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 I<lp>, but always creates "
+"files with B<lc=3> and B<lp=0>. Creating files with other I<lc> and I<lp> "
+"is possible with B<xz> and with LZMA SDK."
+msgstr ""
+"У форматі B<.lzma> можливі значення I<lc> аж до 8 і значення I<lp> аж до 4. "
+"LZMA Utils можуть розпаковувати файли із будь-якими значеннями I<lc> і "
+"I<lp>, але завжди створюють файли з B<lc=3> і B<lp=0>. Створення файлів з "
+"іншими значеннями I<lc> і I<lp> є можливим за допомогою B<xz> і LZMA SDK."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2560
+msgid ""
+"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 B<xz>."
+msgstr ""
+"Реалізація фільтра LZMA1 у liblzma потребує, щоби сума I<lc> і I<lp> не "
+"перевищувала 4. Отже, файли B<.lzma>, у яких перевищено обмеження, не може "
+"бути розпаковано за допомогою B<xz>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2575
+msgid ""
+"LZMA Utils creates only B<.lzma> files which have a dictionary size of "
+"2^I<n> (a power of 2) but accepts files with any dictionary size. liblzma "
+"accepts only B<.lzma> files which have a dictionary size of 2^I<n> or 2^I<n> "
+"+ 2^(I<n>-1). This is to decrease false positives when detecting B<.lzma> "
+"files."
+msgstr ""
+"LZMA Utils створюють лише файли B<.lzma>, які мають розмір словника у 2^I<n> "
+"(степінь 2), але приймають файли із будь-яким розміром словника. liblzma "
+"приймає лише файли B<.lzma>, які мають розмір словника 2^I<n> або 2^I<n> + "
+"2^(I<n>-1). Так зроблено для зменшення помилок при виявленні файлів B<.lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2580
+msgid ""
+"These limitations shouldn't be a problem in practice, since practically all "
+"B<.lzma> files have been compressed with settings that liblzma will accept."
+msgstr ""
+"Ці обмеження не мають призводити до проблем на практиці, оскільки практично "
+"усі файли B<.lzma> було стиснено з використанням параметрів, які приймає "
+"liblzma."
+
+#. type: SS
+#: ../src/xz/xz.1:2581
+#, no-wrap
+msgid "Trailing garbage"
+msgstr "Кінцевий мотлох"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2591
+msgid ""
+"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."
+msgstr ""
+"При розпаковуванні LZMA Utils без повідомлень ігнорують усі дані після "
+"першого потоку B<.lzma>. У більшості випадків це пов'язано із вадою у "
+"програмі. Це також означає, що у LZMA Utils не передбачено підтримки "
+"розпаковування з'єднаних файлів B<.lzma>."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2601
+msgid ""
+"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."
+msgstr ""
+"Якщо після першого потоку B<.lzma> лишилися дані, B<xz> вважатиме файл "
+"пошкодженим, якщо не було використано B<--single-stream>. Це може зашкодити "
+"роботі скриптів, де зроблено припущення, що кінцеві зайві дані буде "
+"проігноровано."
+
+#. type: SH
+#: ../src/xz/xz.1:2602 ../src/xzdec/xzdec.1:117
+#, no-wrap
+msgid "NOTES"
+msgstr "ПРИМІТКИ"
+
+#. type: SS
+#: ../src/xz/xz.1:2604
+#, no-wrap
+msgid "Compressed output may vary"
+msgstr "Стискання даних може бути різним"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2615
+msgid ""
+"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."
+msgstr ""
+"Точні стиснені дані, які створено на основі того самого нестисненого файла "
+"вхідних даних, можуть бути різними для різних версій XZ Utils, навіть якщо "
+"використано однакові параметри стискання. Причиною цього є удосконалення у "
+"кодувальнику (пришвидшення або краще стискання) без зміни формату файлів. "
+"Виведені дані можуть бути різними навіть для різних збірок тієї самої версії "
+"XZ Utils, якщо використано різні параметри збирання."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2625
+msgid ""
+"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."
+msgstr ""
+"Написане вище означає, що після реалізації B<--rsyncable> файли-результати "
+"не обов'язково можна буде синхронізувати за допомогою rsyncable, якщо старий "
+"і новий файли було стиснено за допомогою тієї самої версії xz. Цю проблему "
+"можна усунути, якщо буде заморожено частину реалізації кодувальника, щоб "
+"введені для rsync дані були стабільними між версіями xz."
+
+#. type: SS
+#: ../src/xz/xz.1:2626
+#, no-wrap
+msgid "Embedded .xz decompressors"
+msgstr "Вбудовані розпакувальники .xz"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2643
+msgid ""
+"Embedded B<.xz> decompressor implementations like XZ Embedded don't "
+"necessarily support files created with integrity I<check> types other than "
+"B<none> and B<crc32>. Since the default is B<--check=crc64>, you must use "
+"B<--check=none> or B<--check=crc32> when creating files for embedded systems."
+msgstr ""
+"У вбудованих реалізаціях розпакувальника B<.xz>, подібних до XZ Embedded, не "
+"обов'язково передбачено підтримку файлів, які створено із типами "
+"I<перевірки> цілісності, відмінними від B<none> і B<crc32>. Оскільки типовим "
+"є B<--check=crc64>, вам слід використовувати B<--check=none> або B<--"
+"check=crc32> при створенні файлів для вбудованих систем."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2653
+msgid ""
+"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."
+msgstr ""
+"Поза вбудованими системами, в усіх засобах розпаковування формату B<.xz> "
+"передбачено підтримку усіх типів I<перевірок> або принаймні можливість "
+"розпакувати файл без перевірки цілісності, якщо підтримки певної "
+"I<перевірки> не передбачено."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2656
+msgid ""
+"XZ Embedded supports BCJ filters, but only with the default start offset."
+msgstr ""
+"У XZ Embedded передбачено підтримку BCJ, але лише з типовим початковим "
+"зсувом."
+
+#. type: SH
+#: ../src/xz/xz.1:2657
+#, no-wrap
+msgid "EXAMPLES"
+msgstr "ПРИКЛАДИ"
+
+#. type: SS
+#: ../src/xz/xz.1:2659
+#, no-wrap
+msgid "Basics"
+msgstr "Основи"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2669
+msgid ""
+"Compress the file I<foo> into I<foo.xz> using the default compression level "
+"(B<-6>), and remove I<foo> if compression is successful:"
+msgstr ""
+"Стиснути файл I<foo> до I<foo.xz> за допомогою типового рівня стискання "
+"(B<-6>) і вилучити I<foo>, якщо стискання відбулося успішно:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2674
+#, no-wrap
+msgid "CW<xz foo>\n"
+msgstr "CW<xz foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2685
+msgid ""
+"Decompress I<bar.xz> into I<bar> and don't remove I<bar.xz> even if "
+"decompression is successful:"
+msgstr ""
+"Розпакувати I<bar.xz> до I<bar> і не вилучати I<bar.xz>, навіть якщо "
+"розпаковування відбулося успішно:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2690
+#, no-wrap
+msgid "CW<xz -dk bar.xz>\n"
+msgstr "CW<xz -dk bar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2703
+msgid ""
+"Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+"slower than the default B<-6>, but needs less memory for compression and "
+"decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgstr ""
+"Створити I<baz.tar.xz> з використанням шаблона B<-4e> (B<-4 --extreme>), "
+"який є повільнішими за типовий B<-6>, але потребує менше пам'яті для "
+"стискання та розпаковування (48\\ МіБ та 5\\ МіБ, відповідно):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2708
+#, no-wrap
+msgid "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+msgstr "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2714
+msgid ""
+"A mix of compressed and uncompressed files can be decompressed to standard "
+"output with a single command:"
+msgstr ""
+"Суміш стиснених і нестиснених файлів можна розпакувати до стандартного "
+"виведення за допомогою єдиної команди:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2719
+#, no-wrap
+msgid "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+msgstr "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+
+#. type: SS
+#: ../src/xz/xz.1:2723
+#, no-wrap
+msgid "Parallel compression of many files"
+msgstr "Паралельне стискання багатьох файлів"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2729
+msgid ""
+"On GNU and *BSD, B<find>(1) and B<xargs>(1) can be used to parallelize "
+"compression of many files:"
+msgstr ""
+"У GNU і *BSD можна скористатися B<find>(1) і B<xargs>(1) для паралельного "
+"стискання багатьох файлів:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2735
+#, no-wrap
+msgid ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+msgstr ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2757
+msgid ""
+"The B<-P> option to B<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 B<xargs>(1) "
+"will eventually create."
+msgstr ""
+"Параметр B<-P> B<xargs>(1) встановлює кількість паралельних процесів B<xz>. "
+"Найкраще значення параметра B<-n> залежить від того, скільки файлів має бути "
+"стиснено. Якщо файлів мало, значенням, ймовірно, має бути 1. Якщо файлів "
+"десятки тисяч, може знадобитися значення 100 або навіть більше, щоб зменшити "
+"кількість процесів B<xz>, які врешті створить B<xargs>(1)."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2765
+msgid ""
+"The option B<-T1> for B<xz> is there to force it to single-threaded mode, "
+"because B<xargs>(1) is used to control the amount of parallelization."
+msgstr ""
+"Параметр B<-T1> для B<xz> тут для примусового встановлення однопотокового "
+"режиму, оскільки для керування рівнем паралелізації використано B<xargs>(1)."
+
+#. type: SS
+#: ../src/xz/xz.1:2766
+#, no-wrap
+msgid "Robot mode"
+msgstr "Режим робота"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2769
+msgid ""
+"Calculate how many bytes have been saved in total after compressing multiple "
+"files:"
+msgstr ""
+"Обчислити скільки байтів було заощаджено загалом після стискання декількох "
+"файлів:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2774
+#, no-wrap
+msgid "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+msgstr "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2789
+msgid ""
+"A script may want to know that it is using new enough B<xz>. The following "
+"B<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:"
+msgstr ""
+"Скрипту можуть знадобитися дані щодо того, що використано достатньо нову "
+"версію B<xz>. У наведеному нижче скрипті B<sh>(1) виконано перевірку того, "
+"що номер версії засобу B<xz> є принаймні рівним 5.0.0. Цей спосіб є сумісним "
+"зі старими тестовими версіями, де не передбачено підтримки параметра B<--"
+"robot>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2798
+#, no-wrap
+msgid ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+msgstr ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2805
+msgid ""
+"Set a memory usage limit for decompression using B<XZ_OPT>, but if a limit "
+"has already been set, don't increase it:"
+msgstr ""
+"Встановити обмеження на використання пам'яті для розпаковування за допомогою "
+"B<XZ_OPT>, але якщо обмеження вже було встановлено, не збільшувати його:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2815
+#, no-wrap
+msgid ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+msgstr ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2825
+msgid ""
+"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."
+msgstr ""
+"Найпростішим використанням ланцюжка фільтрів є налаштовування шаблона LZMA2. "
+"Це може бути корисним, оскільки у шаблонах використано лише підмножину "
+"потенційно корисних комбінацій параметрів стискання."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2833
+msgid ""
+"The CompCPU columns of the tables from the descriptions of the options "
+"B<-0> ... B<-9> and B<--extreme> are useful when customizing LZMA2 presets. "
+"Here are the relevant parts collected from those two tables:"
+msgstr ""
+"При налаштовуванні шаблонів LZMA2 корисними є стовпчики CompCPU таблиць з "
+"описів параметрів B<-0> ... B<-9> і B<--extreme>. Ось відповідні частини з "
+"цих двох таблиць:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2858
+msgid ""
+"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:"
+msgstr ""
+"Якщо вам відомо, що певний файл потребує дещо більшого словника (наприклад, "
+"32\\ МіБ) для якісного стискання, але ви хочете стиснути його швидше за "
+"команду B<xz -8>, можна внести зміни до шаблона із нижчим значенням CompCPU "
+"(наприклад, 1) для використання більшого словника:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2863
+#, no-wrap
+msgid "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+msgstr "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2879
+msgid ""
+"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."
+msgstr ""
+"Для певних файлів наведена вище команда може працювати швидше за B<xz -6> і "
+"стискати дані значно краще. Втім, слід наголосити, переваги більшого "
+"словника з одночасним низьким значенням CompCPU проявляються лише для деяких "
+"файлів. Найочевиднішим випадком, коли великий словник є корисним, є випадок, "
+"коли архів містить дуже подібні файли розміром у принаймні декілька "
+"мегабайтів. Розмір словника має бути значно більшим за будь-який окремий "
+"файл, щоб у LZMA2 було використано усі переваги подібностей між послідовними "
+"файлами."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2886
+msgid ""
+"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:"
+msgstr ""
+"Якщо дуже високий рівень використання пам'яті у засобі стискання або "
+"розпаковування не є проблемою, і файли, який стискають має об'єм у принаймні "
+"декілька десятків мегабайтів, може бути корисним використання навіть "
+"більшого за 64 МіБ словника, який використано у B<xz -9>:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2891
+#, no-wrap
+msgid "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+msgstr "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2904
+msgid ""
+"Using B<-vv> (B<--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."
+msgstr ""
+"Використання B<-vv> (B<--verbose --verbose>), подібно до наведеного вище "
+"прикладу, може бути корисним для перегляду вимог з боку засобів стискання та "
+"розпаковування до пам'яті. Пам'ятайте, що використання словника, розмір "
+"якого перевищує розмір файла, який стискають, є простоюю витратою пам'яті, "
+"отже наведену вище команду не варто використовувати для малих файлів."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2916
+msgid ""
+"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> (B<-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 B<--"
+"check=crc32>) using about 100\\ KiB of memory."
+msgstr ""
+"Іноді час стискання не має значення, але використання пам'яті засобом "
+"розпаковування має бути низьким для того, щоб, наприклад, уможливити "
+"розпаковування файла у вбудованій системі. У наведеній нижче команді "
+"використано B<-6e> (B<-6 --extreme>) як основу і встановлено розмір словника "
+"лише у 64\\ КіБ. Файл-результат можна розпакувати за допомогою XZ Embedded "
+"(ось чому використано B<--check=crc32>) з використанням лише 100\\ КіБ "
+"пам'яті."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2921
+#, no-wrap
+msgid "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+msgstr "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2944
+msgid ""
+"If you want to squeeze out as many bytes as possible, adjusting the number "
+"of literal context bits (I<lc>) and number of position bits (I<pb>) can "
+"sometimes help. Adjusting the number of literal position bits (I<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 B<lc=4>):"
+msgstr ""
+"Якщо вам потрібно витиснути зі стискання максимальну кількість байтів, може "
+"допомогти коригування кількості бітів контексту літералів (I<lc>) та "
+"кількість позиційних бітів (I<pb>). Також може допомогти коригування "
+"кількості бітів позиції літералів (I<lp>), але, зазвичай, важливішими є "
+"I<lc> і I<pb>. Наприклад, в архівах зі початковим кодом міститься "
+"здебільшого текст US-ASCII, щось подібне до наведеного нижче може дещо (на "
+"щось близьке до 0,1\\ %) зменшити файл, порівняно із B<xz -6e> (спробуйте "
+"також без B<lc=4>):"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2949
+#, no-wrap
+msgid "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+msgstr "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2957
+msgid ""
+"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:"
+msgstr ""
+"Використання іншого фільтра разом із LZMA2 може покращити стискання для "
+"певних типів файлів. Наприклад, для стискання бібліотеки спільного "
+"користування x86-32 або x86-64 з використанням фільтра BCJ x86 скористайтеся "
+"такою командою:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2962
+#, no-wrap
+msgid "CW<xz --x86 --lzma2 libfoo.so>\n"
+msgstr "CW<xz --x86 --lzma2 libfoo.so>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2976
+msgid ""
+"Note that the order of the filter options is significant. If B<--x86> is "
+"specified after B<--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."
+msgstr ""
+"Зауважте, що порядок параметрів фільтрування має значення. Якщо B<--x86> "
+"вказано після B<--lzma2>, B<xz> повідомить про помилку, оскільки після LZMA2 "
+"не може бути жодного фільтра, а також оскільки фільтр BCJ x86 не можна "
+"використовувати як останній фільтр у ланцюжку."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2982
+msgid ""
+"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."
+msgstr ""
+"Фільтр Delta разом із LZMA2 може дати добрі результати для растрових "
+"зображень. Зазвичай, результати є кращими за формат PNG, у якого є декілька "
+"більш досконалих фільтрів, ніж проста дельта, але там використовують для "
+"стискання Deflate."
+
+#. type: Plain text
+#: ../src/xz/xz.1:2992
+msgid ""
+"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 B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to "
+"accommodate the three-byte alignment:"
+msgstr ""
+"Зображення слід берегти у нестисненому форматі, наприклад, як нестиснений "
+"TIFF. Параметр відстані фільтра Delta встановлюють так, щоб він збігався із "
+"кількістю байтів на піксель у зображенні. Наприклад, для 24-бітового "
+"растрового зображення RGB слід вказати B<dist=3>, а також добре передати "
+"B<pb=0> до LZMA2 для пристосовування до трибайтового вирівнювання:"
+
+#. type: Plain text
+#: ../src/xz/xz.1:2997
+#, no-wrap
+msgid "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+msgstr "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3005
+msgid ""
+"If multiple images have been put into a single archive (for example, B<."
+"tar>), the Delta filter will work on that too as long as all images have the "
+"same number of bytes per pixel."
+msgstr ""
+"Якщо в один архів запаковано декілька зображень (наприклад, в архів B<."
+"tar>), фільтр Delta також даватиме добрі результати, якщо у всіх зображеннях "
+"однакова кількість байтів для кожного пікселя."
+
+#. type: SH
+#: ../src/xz/xz.1:3006 ../src/xzdec/xzdec.1:143 ../src/lzmainfo/lzmainfo.1:59
+#: ../src/scripts/xzdiff.1:65 ../src/scripts/xzgrep.1:106
+#: ../src/scripts/xzless.1:65 ../src/scripts/xzmore.1:51
+#, no-wrap
+msgid "SEE ALSO"
+msgstr "ДИВ. ТАКОЖ"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3015
+msgid ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+msgstr ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3017
+msgid "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+msgstr "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3019 ../src/xzdec/xzdec.1:146
+msgid "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+msgstr "Вбудовуваний XZ: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+
+#. type: Plain text
+#: ../src/xz/xz.1:3020
+msgid "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+msgstr "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "XZDEC"
+msgstr "XZDEC"
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "2017-04-19"
+msgstr "19 квітня 2017 року"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:10
+msgid "xzdec, lzmadec - Small .xz and .lzma decompressors"
+msgstr "xzdec, lzmadec — невеличкі розпакувальники .xz і .lzma"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:14
+msgid "B<xzdec> [I<option...>] [I<file...>]"
+msgstr "B<xzdec> [I<параметр...>] [I<файл...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:18
+msgid "B<lzmadec> [I<option...>] [I<file...>]"
+msgstr "B<lzmadec> [I<параметр...>] [I<файл...>]"
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:44
+msgid ""
+"B<xzdec> is a liblzma-based decompression-only tool for B<.xz> (and only B<."
+"xz>) files. B<xzdec> is intended to work as a drop-in replacement for "
+"B<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."
+msgstr ""
+"B<xzdec> є інструментом на основі liblzma, який призначено лише для "
+"розпаковування файлів B<.xz> (і лише файлів B<.xz>). B<xzdec> призначено для "
+"того, щоб працювати як повноцінний замінник B<xz>(1) у більшості типових "
+"ситуацій, де скрипт було написано для використання B<xz --decompress --"
+"stdout> (і, можливо, декількох інших типових параметрів), для розпаковування "
+"файлів B<.xz>. B<lzmadec> є тотожним до B<xzdec>, але у B<lzmadec> "
+"передбачено підтримку файлів B<.lzma>, замість файлів B<.xz>."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:61
+msgid ""
+"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."
+msgstr ""
+"Щоб зменшити розмір виконуваного файла, у B<xzdec> не передбачено підтримки "
+"багатопотокової обробки та локалізації, а також читання параметрів зі "
+"змінних середовища B<XZ_DEFAULTS> і B<XZ_OPT>. У B<xzdec> не передбачено "
+"підтримки показу проміжних даних щодо поступу: надсилання B<SIGINFO> до "
+"B<xzdec> не призводить ні до яких наслідків, але надсилання B<SIGUSR1> "
+"перериває процес, замість показу даних щодо поступу."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:69
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> supports only decompression."
+msgstr ""
+"Буде проігноровано для сумісності з B<xz>(1). У B<xzdec> передбачено "
+"підтримку лише розпаковування."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:76
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never creates or removes any "
+"files."
+msgstr ""
+"Буде проігноровано. Призначено для сумісності з B<xz>(1). B<xzdec> ніколи не "
+"створюватиме і ніколи не вилучатиме ці файли."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:83
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> always writes the "
+"decompressed data to standard output."
+msgstr ""
+"Буде проігноровано. Для сумісності з B<xz>(1). B<xzdec> завжди записує "
+"розпаковані дані до стандартного виведення."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:89
+msgid ""
+"Specifying this once does nothing since B<xzdec> never displays any warnings "
+"or notices. Specify this twice to suppress errors."
+msgstr ""
+"Якщо цей параметр вказано один раз, нічого не станеться, оскільки B<xzdec> "
+"ніколи не показуватиме жодних попереджень або нотаток. Вкажіть параметр "
+"двічі, щоб придушити повідомлення про помилки."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:96
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never uses the exit status 2."
+msgstr ""
+"Буде проігноровано для сумісності із B<xz>(1). B<xzdec> ніколи не "
+"використовує стан виходу 2."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:99
+msgid "Display a help message and exit successfully."
+msgstr "Вивести довідкове повідомлення і успішно завершити роботу."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:104
+msgid "Display the version number of B<xzdec> and liblzma."
+msgstr "Вивести номер версії B<xzdec> та liblzma."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:108
+msgid "All was good."
+msgstr "Усе добре."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:117
+msgid ""
+"B<xzdec> doesn't have any warning messages like B<xz>(1) has, thus the exit "
+"status 2 is not used by B<xzdec>."
+msgstr ""
+"B<xzdec> не має жодних повідомлень із попередженнями, на відміну від "
+"B<xz>(1), тому у B<xzdec> стан виходу 2 не використовується."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:131
+msgid ""
+"Use B<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 B<xz>(1)."
+msgstr ""
+"Користуйтеся B<xz>(1), замість B<xzdec> або B<lzmadec>, для щоденних потреб. "
+"B<xzdec> та B<lzmadec> призначено лише для тих ситуацій, коли важливо мати "
+"меншу програму для розпаковування, ніж B<xz>(1)."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:143
+msgid ""
+"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."
+msgstr ""
+"B<xzdec> і B<lzmadec> не такі вже і малі програми. Їхній розмір можна "
+"зменшити викиданням можливостей з liblzma під час збирання, але цього "
+"зазвичай не роблять для виконуваних файлів, які поширюються у типових, не "
+"вбудованих, дистрибутивах операційних систем. Якщо вам потрібний дуже мала "
+"програма для розпаковування B<.xz>, варто скористатися XZ Embedded."
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:145 ../src/lzmainfo/lzmainfo.1:60
+msgid "B<xz>(1)"
+msgstr "B<xz>(1)"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7
+#, no-wrap
+msgid "LZMAINFO"
+msgstr "LZMAINFO"
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "2013-06-30"
+msgstr "30 червня 2013 року"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:10
+msgid "lzmainfo - show information stored in the .lzma file header"
+msgstr "lzmainfo — показ відомостей, які зберігаються у заголовку файла .lzma"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:15
+msgid "B<lzmainfo> [B<--help>] [B<--version>] [I<file...>]"
+msgstr "B<lzmainfo> [B<--help>] [B<--version>] [I<файл...>]"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:31
+msgid ""
+"B<lzmainfo> shows information stored in the B<.lzma> file header. It reads "
+"the first 13 bytes from the specified I<file>, decodes the header, and "
+"prints it to standard output in human readable format. If no I<files> are "
+"given or I<file> is B<->, standard input is read."
+msgstr ""
+"B<lzmainfo> показує дані, що зберігаються у заголовку файла B<.lzma>. Вона "
+"читає перші 13 байтів із вказаного I<файла>, розкодовує заголовок і виводить "
+"його до стандартного виведення у зручному для читання форматі. Якщо не "
+"вказано жодного I<файла> або замість I<файла> вказано B<->, дані буде "
+"прочитано зі стандартного вхідного джерела даних."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:40
+msgid ""
+"Usually the most interesting information is the uncompressed size and the "
+"dictionary size. Uncompressed size can be shown only if the file is in the "
+"non-streamed B<.lzma> format variant. The amount of memory required to "
+"decompress the file is a few dozen kilobytes plus the dictionary size."
+msgstr ""
+"Зазвичай, найцікавішою інформацією є розпакований розмір та розмір словника. "
+"Розпакований розмір може бути показано, лише якщо файл записано у "
+"непотоковому варіанті формату B<.lzma>. Об'єм пам'яті, потрібний для "
+"розпаковування файла, складає декілька десятків кілобайтів плюс розмір "
+"словника."
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:44
+msgid ""
+"B<lzmainfo> is included in XZ Utils primarily for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"B<lzmainfo> включено до XZ Utils в основному для зворотної сумісності із "
+"LZMA Utils."
+
+#. type: SH
+#: ../src/lzmainfo/lzmainfo.1:51 ../src/scripts/xzdiff.1:74
+#, no-wrap
+msgid "BUGS"
+msgstr "ВАДИ"
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:59
+msgid ""
+"B<lzmainfo> uses B<MB> while the correct suffix would be B<MiB> (2^20 "
+"bytes). This is to keep the output compatible with LZMA Utils."
+msgstr ""
+"B<lzmainfo> використовує B<MB>, хоча правильним суфіксом мав би бути B<MiB> "
+"(2^20 байтів). Так зроблено, щоб зберегти сумісність виведених даних із LZMA "
+"Utils."
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "XZDIFF"
+msgstr "XZDIFF"
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "2021-06-04"
+msgstr "4 червня 2021 року"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:12
+msgid "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files"
+msgstr "xzcmp, xzdiff, lzcmp, lzdiff — порівняння стиснених файлів"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:15
+msgid "B<xzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<xzcmp> [I<параметри_cmp>] I<файл1> [I<файл2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:18
+msgid "B<xzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<xzdiff> [I<параметри_diff>] I<файл1> [I<файл2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:21
+msgid "B<lzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr "B<lzcmp> [I<параметри_cmp>] I<файл1> [I<файл2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:24
+msgid "B<lzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr "B<lzdiff> [I<параметри_diff>] I<файл1> [I<файл2>]"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:59
+msgid ""
+"B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files compressed "
+"with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), or "
+"B<zstd>(1). All options specified are passed directly to B<cmp>(1) or "
+"B<diff>(1). If only one file is specified, then the files compared are "
+"I<file1> (which must have a suffix of a supported compression format) and "
+"I<file1> from which the compression format suffix has been stripped. If two "
+"files are specified, then they are uncompressed if necessary and fed to "
+"B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or B<diff>(1) is "
+"preserved unless a decompression error occurs; then exit status is 2."
+msgstr ""
+"B<xzcmp> і B<xzdiff> викликають B<cmp>(1) або B<diff>(1) для файлів, які "
+"стиснено за допомогою B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1) або B<zstd>(1). Усі вказані параметри передаються безпосередньо "
+"B<cmp>(1) або B<diff>(1). Якщо вказано лише один файл, порівнюваними файлами "
+"будуть I<файл1> (який повинен мати суфікс підтримуваного файла стискання) і "
+"I<файл1>, з назви якого вилучено суфікс формату стискання. Якщо вказано два "
+"файли, їх буде, якщо потрібно, розпаковано і передано B<cmp>(1) або "
+"B<diff>(1). Стан виходу B<cmp>(1) або B<diff>(1) буде збережено, якщо не "
+"станеться помилок розпаковування. Якщо станеться помилка розпаковування, "
+"станом виходу буде 2."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:65
+msgid ""
+"The names B<lzcmp> and B<lzdiff> are provided for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+"Працездатність назв B<lzcmp> і B<lzdiff> забезпечено для зворотної "
+"сумісності із LZMA Utils."
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:74
+msgid ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+msgstr ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:79
+msgid ""
+"Messages from the B<cmp>(1) or B<diff>(1) programs refer to temporary "
+"filenames instead of those specified."
+msgstr ""
+"Повідомлення від програм B<cmp>(1) або B<diff>(1) посилатимуться на назви "
+"тимчасових файлів, а не вказані назви."
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "XZGREP"
+msgstr "XZGREP"
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "2022-07-19"
+msgstr "19 липня 2022 року"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:12
+msgid "xzgrep - search compressed files for a regular expression"
+msgstr "xzgrep — пошук у стиснених файлах формального виразу"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:18
+msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> [I<file...>]"
+msgstr "B<xzgrep> [I<параметри_grep>] [B<-e>] I<взірець> [I<файл...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:21
+msgid "B<xzegrep> \\&..."
+msgstr "B<xzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:24
+msgid "B<xzfgrep> \\&..."
+msgstr "B<xzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:27
+msgid "B<lzgrep> \\&..."
+msgstr "B<lzgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:30
+msgid "B<lzegrep> \\&..."
+msgstr "B<lzegrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:33
+msgid "B<lzfgrep> \\&..."
+msgstr "B<lzfgrep> \\&..."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:49
+msgid ""
+"B<xzgrep> invokes B<grep>(1) on I<files> which may be either uncompressed "
+"or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), or B<zstd>(1). All options specified are passed directly to "
+"B<grep>(1)."
+msgstr ""
+"B<xzgrep> викликає B<grep>(1) для I<файлів>, які можуть бути розпакованими "
+"або запакованими за допомогою B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1) або B<zstd>(1). Усі вказані параметри передаються безпосередньо "
+"B<grep>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:62
+msgid ""
+"If no I<file> is specified, then standard input is decompressed if necessary "
+"and fed to B<grep>(1). When reading from standard input, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), and B<zstd>(1) compressed files are not supported."
+msgstr ""
+"Якщо не вказано жодного I<файла>, буде розпаковано дані зі стандартного "
+"джерела вхідних даних і передано ці дані B<grep>(1). Якщо дані буде "
+"прочитано зі стандартного джерела вхідних даних, підтримку стиснених файлів "
+"B<gzip>(1), B<bzip2>(1), B<lzop>(1) та B<zstd>(1) буде вимкнено."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:81
+msgid ""
+"If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<grep -E> or "
+"B<grep -F> is used instead of B<grep>(1). The same applies to names "
+"B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+"compatibility with LZMA Utils."
+msgstr ""
+"Якщо B<xzgrep> викликано як B<xzegrep> або B<xzfgrep>, буде використано "
+"B<grep -E> або B<grep -F> замість B<grep>(1). Те саме стосується програм із "
+"назвами B<lzgrep>, B<lzegrep> та B<lzfgrep>, які створено для зворотної "
+"сумісності з LZMA Utils."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:86
+msgid ""
+"At least one match was found from at least one of the input files. No "
+"errors occurred."
+msgstr ""
+"В одному з файлів вхідних даних знайдено принаймні одну відповідність. "
+"Помилок не сталося."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:90
+msgid "No matches were found from any of the input files. No errors occurred."
+msgstr ""
+"У жодному з файлів вхідних даних не знайдено відповідника. Не сталося ніяких "
+"помилок."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:90
+#, no-wrap
+msgid "E<gt>1"
+msgstr "E<gt>1"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:94
+msgid "One or more errors occurred. It is unknown if matches were found."
+msgstr ""
+"Сталася одна або декілька помилок. Невідомо, чи було знайдено відповідники "
+"критерію пошуку."
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:95
+#, no-wrap
+msgid "B<GREP>"
+msgstr "B<GREP>"
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:106
+msgid ""
+"If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+"B<grep>(1), B<grep -E>, or B<grep -F>."
+msgstr ""
+"Якщо встановлено значення змінної середовища B<GREP>, буде використано це "
+"значення B<xzgrep>, замість B<grep>(1), B<grep -E> або B<grep -F>."
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:113
+msgid ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+msgstr ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "XZLESS"
+msgstr "XZLESS"
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "2010-09-27"
+msgstr "27 вересня 2010 року"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:13
+msgid "xzless, lzless - view xz or lzma compressed (text) files"
+msgstr "xzless, lzless — перегляд стиснених xz або lzma (текстових) файлів"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:16
+msgid "B<xzless> [I<file>...]"
+msgstr "B<xzless> [I<файл>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:19
+msgid "B<lzless> [I<file>...]"
+msgstr "B<lzless> [I<файл>...]"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:31
+msgid ""
+"B<xzless> is a filter that displays text from compressed files to a "
+"terminal. It works on files compressed with B<xz>(1) or B<lzma>(1). If no "
+"I<files> are given, B<xzless> reads from standard input."
+msgstr ""
+"B<xzless> є фільтром, який показує текст зі стиснених файлів у терміналі. "
+"Працює для файлів, які стиснуто за допомогою B<xz>(1) або B<lzma>(1). Якщо "
+"не вказано жодного I<файла>, B<xzless> читатиме дані зі стандартного джерела "
+"вхідних даних."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:48
+msgid ""
+"B<xzless> uses B<less>(1) to present its output. Unlike B<xzmore>, its "
+"choice of pager cannot be altered by setting an environment variable. "
+"Commands are based on both B<more>(1) and B<vi>(1) and allow back and "
+"forth movement and searching. See the B<less>(1) manual for more "
+"information."
+msgstr ""
+"Для показу виведених даних B<xzless> використовує B<less>(1). На відміну від "
+"B<xzmore>, вибір програми для поділу на сторінки не можна змінити за "
+"допомогою змінної середовища. Команди засновано на B<more>(1) і B<vi>(1). За "
+"допомогою команд можна просуватися назад і вперед даними та шукати дані. Щоб "
+"дізнатися більше, ознайомтеся із підручником з B<less>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:52
+msgid ""
+"The command named B<lzless> is provided for backward compatibility with LZMA "
+"Utils."
+msgstr ""
+"Команду B<lzless> реалізовано для забезпечення зворотної сумісності з LZMA "
+"Utils."
+
+#. type: TP
+#: ../src/scripts/xzless.1:53
+#, no-wrap
+msgid "B<LESSMETACHARS>"
+msgstr "B<LESSMETACHARS>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:59
+msgid ""
+"A list of characters special to the shell. Set by B<xzless> unless it is "
+"already set in the environment."
+msgstr ""
+"Список символів, які є особливими символами командної оболонки. "
+"Встановлюється B<xzless>, якщо його ще не встановлено у середовищі."
+
+#. type: TP
+#: ../src/scripts/xzless.1:59
+#, no-wrap
+msgid "B<LESSOPEN>"
+msgstr "B<LESSOPEN>"
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:65
+msgid ""
+"Set to a command line to invoke the B<xz>(1) decompressor for preprocessing "
+"the input files to B<less>(1)."
+msgstr ""
+"Має значення рядка команди для виклику засобу розпаковування B<xz>(1) для "
+"обробки вхідних файлів B<less>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:69
+msgid "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+msgstr "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+
+#. type: TH
+#: ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZMORE"
+msgstr "XZMORE"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:10
+msgid "xzmore, lzmore - view xz or lzma compressed (text) files"
+msgstr "xzmore, lzmore — перегляд стиснених xz або lzma (текстових) файлів"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:13
+msgid "B<xzmore> [I<file...>]"
+msgstr "B<xzmore> [I<файл...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:16
+msgid "B<lzmore> [I<file...>]"
+msgstr "B<lzmore> [I<файл...>]"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:24
+msgid ""
+"B<xzmore> is a filter which allows examination of B<xz>(1) or B<lzma>(1) "
+"compressed text files one screenful at a time on a soft-copy terminal."
+msgstr ""
+"B<xzmore> є фільтром, за допомогою якого можна вивчати стиснені B<xz>(1) або "
+"B<lzma>(1) текстові файли поекранно на терміналах із м'яким копіюванням."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:33
+msgid ""
+"To use a pager other than the default B<more,> set environment variable "
+"B<PAGER> to the name of the desired program. The name B<lzmore> is provided "
+"for backward compatibility with LZMA Utils."
+msgstr ""
+"Щоб скористатися засобом поділу на сторінки, відмінним від типового B<more>, "
+"встановіть для змінної середовища B<PAGER> значення назви бажаної програми. "
+"Команду B<lzmore> реалізовано для забезпечення зворотної сумісності з LZMA "
+"Utils."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:33
+#, no-wrap
+msgid "B<e> or B<q>"
+msgstr "B<e> або B<q>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:40
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to exit."
+msgstr ""
+"Якщо виведено запит --More--(Наступний файл: I<файл>), ця команда наказує "
+"B<xzmore> завершити роботу."
+
+#. type: TP
+#: ../src/scripts/xzmore.1:40
+#, no-wrap
+msgid "B<s>"
+msgstr "B<s>"
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:47
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to skip the next file and continue."
+msgstr ""
+"Якщо виведено запит --More--(Наступний файл: I<файл>), ця команда наказує "
+"B<xzmore> перейти до наступного файла і продовжити показ даних."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:51
+msgid ""
+"For list of keyboard commands supported while actually viewing the content "
+"of a file, refer to manual of the pager you use, usually B<more>(1)."
+msgstr ""
+"Список клавіатурних команд, якими можна скористатися під час перегляду "
+"вмісту файла, наведено на сторінці засобу поділу файла на сторінки, яким ви "
+"користуєтеся, зазвичай, на сторінці B<more>(1)."
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:55
+msgid "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+msgstr "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+
+#~ msgid "2022-12-01"
+#~ msgstr "1 грудня 2022 року"
diff --git a/po4a/update-po b/po4a/update-po
new file mode 100755
index 0000000..b1cc9f5
--- /dev/null
+++ b/po4a/update-po
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+#############################################################################
+#
+# Updates xz-man.pot and the *.po files, and generates translated man pages.
+# These are done using the program po4a. If po4a is missing, it is still
+# possible to build the package without translated man pages.
+#
+#############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+#############################################################################
+
+if type po4a > /dev/null 2>&1; then
+ :
+else
+ echo "po4a/update-po: The program 'po4a' was not found." >&2
+ echo "po4a/update-po: Translated man pages were not generated." >&2
+ exit 1
+fi
+
+if test ! -f po4a.conf; then
+ cd `dirname "$0"` || exit 1
+ if test ! -f po4a.conf; then
+ echo "po4a/update-po: Error: Cannot find po4a.conf." >&2
+ exit 1
+ fi
+fi
+
+PACKAGE_VERSION=`cd .. && sh build-aux/version.sh` || exit 1
+
+# Using --force to get up-to-date version numbers in the output files
+# when nothing else has changed. This makes it slower but it's fine
+# as long as this isn't run every time when "make" is run at the
+# top level directory. (po4a isn't super-fast even without --force).
+set -x
+po4a --force --verbose \
+ --package-name="XZ Utils" \
+ --package-version="$PACKAGE_VERSION" \
+ --copyright-holder="[See the headers in the input files.]" \
+ po4a.conf
diff --git a/po4a/xz-man.pot b/po4a/xz-man.pot
new file mode 100644
index 0000000..49c3ee0
--- /dev/null
+++ b/po4a/xz-man.pot
@@ -0,0 +1,4642 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR [See the headers in the input files.]
+# This file is distributed under the same license as the XZ Utils package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: XZ Utils 5.4.5\n"
+"POT-Creation-Date: 2023-11-01 20:27+0800\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "XZ"
+msgstr ""
+
+#. type: TH
+#: ../src/xz/xz.1:9
+#, no-wrap
+msgid "2023-07-17"
+msgstr ""
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "Tukaani"
+msgstr ""
+
+#. type: TH
+#: ../src/xz/xz.1:9 ../src/xzdec/xzdec.1:7 ../src/lzmainfo/lzmainfo.1:7
+#: ../src/scripts/xzdiff.1:9 ../src/scripts/xzgrep.1:9
+#: ../src/scripts/xzless.1:10 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZ Utils"
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:11 ../src/xzdec/xzdec.1:8 ../src/lzmainfo/lzmainfo.1:8
+#: ../src/scripts/xzdiff.1:10 ../src/scripts/xzgrep.1:10
+#: ../src/scripts/xzless.1:11 ../src/scripts/xzmore.1:8
+#, no-wrap
+msgid "NAME"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:13
+msgid ""
+"xz, unxz, xzcat, lzma, unlzma, lzcat - Compress or decompress .xz and .lzma "
+"files"
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:14 ../src/xzdec/xzdec.1:10 ../src/lzmainfo/lzmainfo.1:10
+#: ../src/scripts/xzdiff.1:12 ../src/scripts/xzgrep.1:12
+#: ../src/scripts/xzless.1:13 ../src/scripts/xzmore.1:10
+#, no-wrap
+msgid "SYNOPSIS"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:18
+msgid "B<xz> [I<option...>] [I<file...>]"
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:19
+#, no-wrap
+msgid "COMMAND ALIASES"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:23
+msgid "B<unxz> is equivalent to B<xz --decompress>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:27
+msgid "B<xzcat> is equivalent to B<xz --decompress --stdout>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:31
+msgid "B<lzma> is equivalent to B<xz --format=lzma>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:35
+msgid "B<unlzma> is equivalent to B<xz --format=lzma --decompress>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:39
+msgid "B<lzcat> is equivalent to B<xz --format=lzma --decompress --stdout>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:51
+msgid ""
+"When writing scripts that need to decompress files, it is recommended to "
+"always use the name B<xz> with appropriate arguments (B<xz -d> or B<xz -dc>) "
+"instead of the names B<unxz> and B<xzcat>."
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:52 ../src/xzdec/xzdec.1:18 ../src/lzmainfo/lzmainfo.1:15
+#: ../src/scripts/xzdiff.1:24 ../src/scripts/xzgrep.1:33
+#: ../src/scripts/xzless.1:19 ../src/scripts/xzmore.1:16
+#, no-wrap
+msgid "DESCRIPTION"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:71
+msgid ""
+"B<xz> is a general-purpose data compression tool with command line syntax "
+"similar to B<gzip>(1) and B<bzip2>(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<lzip> is supported."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:93
+msgid ""
+"B<xz> compresses or decompresses each I<file> according to the selected "
+"operation mode. If no I<files> are given or I<file> is B<->, B<xz> reads "
+"from standard input and writes the processed data to standard output. B<xz> "
+"will refuse (display an error and skip the I<file>) to write compressed "
+"data to standard output if it is a terminal. Similarly, B<xz> will refuse "
+"to read compressed data from standard input if it is a terminal."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:103
+msgid ""
+"Unless B<--stdout> is specified, I<files> other than B<-> are written to a "
+"new file whose name is derived from the source I<file> name:"
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:103 ../src/xz/xz.1:109 ../src/xz/xz.1:134 ../src/xz/xz.1:139
+#: ../src/xz/xz.1:142 ../src/xz/xz.1:145 ../src/xz/xz.1:161 ../src/xz/xz.1:422
+#: ../src/xz/xz.1:425 ../src/xz/xz.1:432 ../src/xz/xz.1:677 ../src/xz/xz.1:679
+#: ../src/xz/xz.1:778 ../src/xz/xz.1:789 ../src/xz/xz.1:798 ../src/xz/xz.1:806
+#: ../src/xz/xz.1:1034 ../src/xz/xz.1:1043 ../src/xz/xz.1:1055
+#: ../src/xz/xz.1:1729 ../src/xz/xz.1:1735 ../src/xz/xz.1:1853
+#: ../src/xz/xz.1:1857 ../src/xz/xz.1:1860 ../src/xz/xz.1:1863
+#: ../src/xz/xz.1:1867 ../src/xz/xz.1:1874 ../src/xz/xz.1:1876
+#, no-wrap
+msgid "\\(bu"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:109
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:124
+msgid ""
+"When decompressing, the B<.xz>, B<.lzma>, or B<.lz> suffix is removed from "
+"the filename to get the target filename. B<xz> also recognizes the suffixes "
+"B<.txz> and B<.tlz>, and replaces them with the B<.tar> suffix."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:128
+msgid ""
+"If the target file already exists, an error is displayed and the I<file> is "
+"skipped."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:134
+msgid ""
+"Unless writing to standard output, B<xz> will display a warning and skip the "
+"I<file> if any of the following applies:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:139
+msgid ""
+"I<File> is not a regular file. Symbolic links are not followed, and thus "
+"they are not considered to be regular files."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:142
+msgid "I<File> has more than one hard link."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:145
+msgid "I<File> has setuid, setgid, or sticky bit set."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:161
+msgid ""
+"The operation mode is set to compress and the I<file> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:171
+msgid ""
+"The operation mode is set to decompress and the I<file> doesn't have a "
+"suffix of any of the supported file formats (B<.xz>, B<.txz>, B<.lzma>, "
+"B<.tlz>, or B<.lz>)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:186
+msgid ""
+"After successfully compressing or decompressing the I<file>, B<xz> copies "
+"the owner, group, permissions, access time, and modification time from the "
+"source I<file> 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<file>. B<xz> "
+"doesn't support copying other metadata like access control lists or extended "
+"attributes yet."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:196
+msgid ""
+"Once the target file has been successfully closed, the source I<file> is "
+"removed unless B<--keep> was specified. The source I<file> is never removed "
+"if the output is written to standard output or if an error occurs."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:208
+msgid ""
+"Sending B<SIGINFO> or B<SIGUSR1> to the B<xz> 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 ""
+
+#. type: SS
+#: ../src/xz/xz.1:209
+#, no-wrap
+msgid "Memory usage"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:225
+msgid ""
+"The memory usage of B<xz> 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<xz -9> currently requires 65\\ MiB of "
+"memory. Still, it is possible to have B<.xz> files that require several "
+"gigabytes of memory to decompress."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:237
+msgid ""
+"Especially users of older systems may find the possibility of very large "
+"memory usage annoying. To prevent uncomfortable surprises, B<xz> 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<ulimit>(1) to limit virtual memory tends to cripple B<mmap>(2))."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:259
+msgid ""
+"The memory usage limiter can be enabled with the command line option "
+"B<--memlimit=>I<limit>. Often it is more convenient to enable the limiter "
+"by default by setting the environment variable B<XZ_DEFAULTS>, for example, "
+"B<XZ_DEFAULTS=--memlimit=150MiB>. It is possible to set the limits "
+"separately for compression and decompression by using "
+"B<--memlimit-compress=>I<limit> and B<--memlimit-decompress=>I<limit>. "
+"Using these two options outside B<XZ_DEFAULTS> is rarely useful because a "
+"single run of B<xz> cannot do both compression and decompression and "
+"B<--memlimit=>I<limit> (or B<-M> I<limit>) is shorter to type on the "
+"command line."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:278
+msgid ""
+"If the specified memory usage limit is exceeded when decompressing, B<xz> "
+"will display an error and decompressing the file will fail. If the limit is "
+"exceeded when compressing, B<xz> 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<xz -9>, the settings will be scaled down only "
+"a little, not all the way down to B<xz -8>."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:279
+#, no-wrap
+msgid "Concatenation and padding with .xz files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:287
+msgid ""
+"It is possible to concatenate B<.xz> files as is. B<xz> will decompress "
+"such files as if they were a single B<.xz> file."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:296
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:300
+msgid ""
+"Concatenation and padding are not allowed with B<.lzma> files or raw "
+"streams."
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:301 ../src/xzdec/xzdec.1:61
+#, no-wrap
+msgid "OPTIONS"
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:303
+#, no-wrap
+msgid "Integer suffixes and special values"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:307
+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:307
+#, no-wrap
+msgid "B<KiB>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:318
+msgid ""
+"Multiply the integer by 1,024 (2^10). B<Ki>, B<k>, B<kB>, B<K>, and B<KB> "
+"are accepted as synonyms for B<KiB>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:318
+#, no-wrap
+msgid "B<MiB>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:328
+msgid ""
+"Multiply the integer by 1,048,576 (2^20). B<Mi>, B<m>, B<M>, and B<MB> are "
+"accepted as synonyms for B<MiB>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:328
+#, no-wrap
+msgid "B<GiB>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:338
+msgid ""
+"Multiply the integer by 1,073,741,824 (2^30). B<Gi>, B<g>, B<G>, and B<GB> "
+"are accepted as synonyms for B<GiB>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:343
+msgid ""
+"The special value B<max> can be used to indicate the maximum integer value "
+"supported by the option."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:344
+#, no-wrap
+msgid "Operation mode"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:347
+msgid "If multiple operation mode options are given, the last one takes effect."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:347
+#, no-wrap
+msgid "B<-z>, B<--compress>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:356
+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<unxz> implies B<--decompress>)."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:356 ../src/xzdec/xzdec.1:62
+#, no-wrap
+msgid "B<-d>, B<--decompress>, B<--uncompress>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:359
+msgid "Decompress."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:359
+#, no-wrap
+msgid "B<-t>, B<--test>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:368
+msgid ""
+"Test the integrity of compressed I<files>. 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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:368
+#, no-wrap
+msgid "B<-l>, B<--list>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:377
+msgid ""
+"Print information about compressed I<files>. 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:392
+msgid ""
+"The default listing shows basic information about I<files>, 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<less\\ -S> may be convenient if the terminal isn't wide enough."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:399
+msgid ""
+"The exact output may vary between B<xz> versions and different locales. For "
+"machine-readable output, B<--robot --list> should be used."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:400
+#, no-wrap
+msgid "Operation modifiers"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:401 ../src/xzdec/xzdec.1:69
+#, no-wrap
+msgid "B<-k>, B<--keep>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:404
+msgid "Don't delete the input files."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:418
+msgid ""
+"Since B<xz> 5.2.6, this option also makes B<xz> 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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:418
+#, no-wrap
+msgid "B<-f>, B<--force>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:421
+msgid "This option has several effects:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:425
+msgid ""
+"If the target file already exists, delete it before compressing or "
+"decompressing."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:432
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:457
+msgid ""
+"When used with B<--decompress> B<--stdout> and B<xz> cannot recognize the "
+"type of the source file, copy the source file as is to standard output. "
+"This allows B<xzcat> B<--force> to be used like B<cat>(1) for files that "
+"have not been compressed with B<xz>. Note that in future, B<xz> might "
+"support new compressed file formats, which may make B<xz> decompress more "
+"types of files instead of copying them as is to standard output. "
+"B<--format=>I<format> can be used to restrict B<xz> to decompress only a "
+"single file format."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:458 ../src/xzdec/xzdec.1:76
+#, no-wrap
+msgid "B<-c>, B<--stdout>, B<--to-stdout>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:464
+msgid ""
+"Write the compressed or decompressed data to standard output instead of a "
+"file. This implies B<--keep>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:464
+#, no-wrap
+msgid "B<--single-stream>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:473
+msgid ""
+"Decompress only the first B<.xz> stream, and silently ignore possible "
+"remaining input data following the stream. Normally such trailing garbage "
+"makes B<xz> display an error."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:482
+msgid ""
+"B<xz> never decompresses more than one stream from B<.lzma> files or raw "
+"streams, but this option still makes B<xz> ignore the possible trailing data "
+"after the B<.lzma> file or raw stream."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:487
+msgid ""
+"This option has no effect if the operation mode is not B<--decompress> or "
+"B<--test>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:487
+#, no-wrap
+msgid "B<--no-sparse>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:499
+msgid ""
+"Disable creation of sparse files. By default, if decompressing into a "
+"regular file, B<xz> 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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:499
+#, no-wrap
+msgid "B<-S> I<.suf>, B<--suffix=>I<.suf>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:511
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:525
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:531
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:531
+#, no-wrap
+msgid "B<--files>[B<=>I<file>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:545
+msgid ""
+"Read the filenames to process from I<file>; if I<file> 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<file>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:545
+#, no-wrap
+msgid "B<--files0>[B<=>I<file>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:549
+msgid ""
+"This is identical to B<--files>[B<=>I<file>] except that each filename must "
+"be terminated with the null character."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:550
+#, no-wrap
+msgid "Basic file format and compression options"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:551
+#, no-wrap
+msgid "B<-F> I<format>, B<--format=>I<format>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:556
+msgid "Specify the file I<format> to compress or decompress:"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:557
+#, no-wrap
+msgid "B<auto>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:569
+msgid ""
+"This is the default. When compressing, B<auto> is equivalent to B<xz>. "
+"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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:569
+#, no-wrap
+msgid "B<xz>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:576
+msgid ""
+"Compress to the B<.xz> file format, or accept only B<.xz> files when "
+"decompressing."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:576
+#, no-wrap
+msgid "B<lzma>, B<alone>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:586
+msgid ""
+"Compress to the legacy B<.lzma> file format, or accept only B<.lzma> files "
+"when decompressing. The alternative name B<alone> is provided for backwards "
+"compatibility with LZMA Utils."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:586
+#, no-wrap
+msgid "B<lzip>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:592
+msgid "Accept only B<.lz> files when decompressing. Compression is not supported."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:605
+msgid ""
+"The B<.lz> format version 0 and the unextended version 1 are supported. "
+"Version 0 files were produced by B<lzip> 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<lzip> 1.18."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:614
+msgid ""
+"B<lzip> 1.4 and later create files in the format version 1. The sync flush "
+"marker extension to the format version 1 was added in B<lzip> 1.6. This "
+"extension is rarely used and isn't supported by B<xz> (diagnosed as corrupt "
+"input)."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:614
+#, no-wrap
+msgid "B<raw>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:622
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:623
+#, no-wrap
+msgid "B<-C> I<check>, B<--check=>I<check>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:638
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:642
+msgid "Supported I<check> types:"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:643
+#, no-wrap
+msgid "B<none>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:649
+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:649
+#, no-wrap
+msgid "B<crc32>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:652
+msgid "Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet)."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:652
+#, no-wrap
+msgid "B<crc64>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:657
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:657
+#, no-wrap
+msgid "B<sha256>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:661
+msgid "Calculate SHA-256. This is somewhat slower than CRC32 and CRC64."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:667
+msgid ""
+"Integrity of the B<.xz> headers is always verified with CRC32. It is not "
+"possible to change or disable it."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:667
+#, no-wrap
+msgid "B<--ignore-check>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:673
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:676
+msgid ""
+"B<Do not use this option unless you know what you are doing.> Possible "
+"reasons to use this option:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:679
+msgid "Trying to recover data from a corrupt .xz file."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:685
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:686
+#, no-wrap
+msgid "B<-0> ... B<-9>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:695
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:710
+msgid ""
+"The differences between the presets are more significant than with "
+"B<gzip>(1) and B<bzip2>(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<it's not a good idea to blindly use -9 for "
+"everything> like it often is with B<gzip>(1) and B<bzip2>(1)."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:711
+#, no-wrap
+msgid "B<-0> ... B<-3>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:723
+msgid ""
+"These are somewhat fast presets. B<-0> is sometimes faster than B<gzip -9> "
+"while compressing much better. The higher ones often have speed comparable "
+"to B<bzip2>(1) with comparable or better compression ratio, although the "
+"results depend a lot on the type of data being compressed."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:723
+#, no-wrap
+msgid "B<-4> ... B<-6>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:737
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:737
+#, no-wrap
+msgid "B<-7 ... -9>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:744
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:752
+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:754
+msgid "The following table summarises the features of the presets:"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "Preset"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DictSize"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842 ../src/xz/xz.1:2839
+#, no-wrap
+msgid "CompCPU"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "CompMem"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:761 ../src/xz/xz.1:842
+#, no-wrap
+msgid "DecMem"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#: ../src/xz/xz.1:2840
+#, no-wrap
+msgid "-0"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:843 ../src/xz/xz.1:2450
+#, no-wrap
+msgid "256 KiB"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:2840 ../src/scripts/xzgrep.1:82
+#, no-wrap
+msgid "0"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:764 ../src/xz/xz.1:845 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "3 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:762 ../src/xz/xz.1:763 ../src/xz/xz.1:843 ../src/xz/xz.1:844
+#: ../src/xz/xz.1:2451 ../src/xz/xz.1:2452 ../src/xz/xz.1:2454
+#, no-wrap
+msgid "1 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:2451 ../src/xz/xz.1:2476
+#: ../src/xz/xz.1:2841
+#, no-wrap
+msgid "-1"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:1758 ../src/xz/xz.1:2841
+#: ../src/scripts/xzgrep.1:86
+#, no-wrap
+msgid "1"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "9 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:763 ../src/xz/xz.1:764 ../src/xz/xz.1:844 ../src/xz/xz.1:845
+#: ../src/xz/xz.1:2452 ../src/xz/xz.1:2455 ../src/xz/xz.1:2476
+#, no-wrap
+msgid "2 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:2452 ../src/xz/xz.1:2477
+#: ../src/xz/xz.1:2842
+#, no-wrap
+msgid "-2"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:1760 ../src/xz/xz.1:2842
+#, no-wrap
+msgid "2"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:764 ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2477
+#, no-wrap
+msgid "17 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2453 ../src/xz/xz.1:2478
+#: ../src/xz/xz.1:2843
+#, no-wrap
+msgid "-3"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:843 ../src/xz/xz.1:846
+#: ../src/xz/xz.1:847 ../src/xz/xz.1:2453 ../src/xz/xz.1:2454
+#: ../src/xz/xz.1:2456
+#, no-wrap
+msgid "4 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:2843
+#, no-wrap
+msgid "3"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2458
+#: ../src/xz/xz.1:2459 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "32 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:765 ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847
+#, no-wrap
+msgid "5 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:2454 ../src/xz/xz.1:2479
+#: ../src/xz/xz.1:2844
+#, no-wrap
+msgid "-4"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:1759 ../src/xz/xz.1:1761
+#: ../src/xz/xz.1:1762 ../src/xz/xz.1:1764 ../src/xz/xz.1:2844
+#, no-wrap
+msgid "4"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:766 ../src/xz/xz.1:846 ../src/xz/xz.1:847 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "48 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2455 ../src/xz/xz.1:2480
+#: ../src/xz/xz.1:2845
+#, no-wrap
+msgid "-5"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2455 ../src/xz/xz.1:2456 ../src/xz/xz.1:2457
+#, no-wrap
+msgid "8 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:2845
+#, no-wrap
+msgid "5"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:767 ../src/xz/xz.1:768 ../src/xz/xz.1:848 ../src/xz/xz.1:849
+#: ../src/xz/xz.1:2480 ../src/xz/xz.1:2481
+#, no-wrap
+msgid "94 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:2456 ../src/xz/xz.1:2481
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "-6"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:768 ../src/xz/xz.1:769 ../src/xz/xz.1:770 ../src/xz/xz.1:771
+#: ../src/xz/xz.1:2846
+#, no-wrap
+msgid "6"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:2457 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "-7"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2457
+#: ../src/xz/xz.1:2458 ../src/xz/xz.1:2479
+#, no-wrap
+msgid "16 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:769 ../src/xz/xz.1:850 ../src/xz/xz.1:2482
+#, no-wrap
+msgid "186 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:2458 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "-8"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851 ../src/xz/xz.1:2483
+#, no-wrap
+msgid "370 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:770 ../src/xz/xz.1:851
+#, no-wrap
+msgid "33 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:2459 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "-9"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2459
+#, no-wrap
+msgid "64 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852 ../src/xz/xz.1:2484
+#, no-wrap
+msgid "674 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:771 ../src/xz/xz.1:852
+#, no-wrap
+msgid "65 MiB"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:777
+msgid "Column descriptions:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:789
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:798
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:806
+msgid ""
+"CompMem contains the compressor memory requirements in the single-threaded "
+"mode. It may vary slightly between B<xz> versions. Memory requirements of "
+"some of the future multithreaded modes may be dramatically higher than that "
+"of the single-threaded mode."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:813
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:814
+#, no-wrap
+msgid "B<-e>, B<--extreme>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:823
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:835
+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 ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:843
+#, no-wrap
+msgid "-0e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:843 ../src/xz/xz.1:844 ../src/xz/xz.1:845 ../src/xz/xz.1:847
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:850 ../src/xz/xz.1:851 ../src/xz/xz.1:852
+#: ../src/xz/xz.1:2848
+#, no-wrap
+msgid "8"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "-1e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:844
+#, no-wrap
+msgid "13 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "-2e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:845
+#, no-wrap
+msgid "25 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:846
+#, no-wrap
+msgid "-3e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:846 ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "7"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:847
+#, no-wrap
+msgid "-4e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:848 ../src/xz/xz.1:2847
+#, no-wrap
+msgid "-5e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:849 ../src/xz/xz.1:2848
+#, no-wrap
+msgid "-6e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:850
+#, no-wrap
+msgid "-7e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:851
+#, no-wrap
+msgid "-8e"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:852
+#, no-wrap
+msgid "-9e"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:864
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:864
+#, no-wrap
+msgid "B<--fast>"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:867
+#, no-wrap
+msgid "B<--best>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:878
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:878
+#, no-wrap
+msgid "B<--block-size=>I<size>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:891
+msgid ""
+"When compressing to the B<.xz> format, split the input data into blocks of "
+"I<size> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:909
+msgid ""
+"In multi-threaded mode about three times I<size> bytes will be allocated in "
+"each thread for buffering input and output. The default I<size> 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<size> less than the LZMA2 dictionary size is waste of RAM "
+"because then the LZMA2 dictionary buffer will never get fully used. The "
+"sizes of the blocks are stored in the block headers, which a future version "
+"of B<xz> will use for multi-threaded decompression."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:918
+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 a future version of B<xz> won't be able decompress the files in "
+"multi-threaded mode."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:918
+#, no-wrap
+msgid "B<--block-list=>I<sizes>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:924
+msgid ""
+"When compressing to the B<.xz> format, start a new block after the given "
+"intervals of uncompressed data."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:930
+msgid ""
+"The uncompressed I<sizes> of the blocks are specified as a comma-separated "
+"list. Omitting a size (two or more consecutive commas) is a shorthand to "
+"use the size of the previous block."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:940
+msgid ""
+"If the input file is bigger than the sum of I<sizes>, the last value in "
+"I<sizes> is repeated until the end of the file. A special value of B<0> may "
+"be used as the last value to indicate that the rest of the file should be "
+"encoded as a single block."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:955
+msgid ""
+"If one specifies I<sizes> that exceed the encoder's block size (either the "
+"default value in threaded mode or the value specified with "
+"B<--block-size=>I<size>), the encoder will create additional blocks while "
+"keeping the boundaries specified in I<sizes>. 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:961
+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:961
+#, no-wrap
+msgid "B<--flush-timeout=>I<timeout>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:978
+msgid ""
+"When compressing, if more than I<timeout> 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<xz> is used to compress data that is "
+"streamed over a network. Small I<timeout> values make the data available at "
+"the receiving end with a small delay, but large I<timeout> values give "
+"better compression ratio."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:986
+msgid ""
+"This feature is disabled by default. If this option is specified more than "
+"once, the last one takes effect. The special I<timeout> value of B<0> can "
+"be used to explicitly disable this feature."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:988
+msgid "This feature is not available on non-POSIX systems."
+msgstr ""
+
+#. FIXME
+#. type: Plain text
+#: ../src/xz/xz.1:996
+msgid ""
+"B<This feature is still experimental.> Currently B<xz> is unsuitable for "
+"decompressing the stream in real time due to how B<xz> does buffering."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:996
+#, no-wrap
+msgid "B<--memlimit-compress=>I<limit>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1001
+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:1014
+msgid ""
+"If the compression settings exceed the I<limit>, B<xz> 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<limit>, and finally reducing the LZMA2 dictionary size."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1022
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1029
+msgid ""
+"If the I<limit> cannot be met even with the adjustments described above, an "
+"error is displayed and B<xz> will exit with exit status 1."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1033
+msgid "The I<limit> can be specified in multiple ways:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1043
+msgid ""
+"The I<limit> can be an absolute value in bytes. Using an integer suffix "
+"like B<MiB> can be useful. Example: B<--memlimit-compress=80MiB>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1055
+msgid ""
+"The I<limit> can be specified as a percentage of total physical memory "
+"(RAM). This can be useful especially when setting the B<XZ_DEFAULTS> "
+"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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1065
+msgid ""
+"The I<limit> can be reset back to its default value by setting it to B<0>. "
+"This is currently equivalent to setting the I<limit> to B<max> (no memory "
+"usage limit)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1089
+msgid ""
+"For 32-bit B<xz> there is a special case: if the I<limit> would be over "
+"B<4020\\ MiB>, the I<limit> is set to B<4020\\ MiB>. On MIPS32 B<2000\\ "
+"MiB> is used instead. (The values B<0> and B<max> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1092
+msgid "See also the section B<Memory usage>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1092
+#, no-wrap
+msgid "B<--memlimit-decompress=>I<limit>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1106
+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<limit>, "
+"B<xz> will display an error and decompressing the file will fail. See "
+"B<--memlimit-compress=>I<limit> for possible ways to specify the I<limit>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1106
+#, no-wrap
+msgid "B<--memlimit-mt-decompress=>I<limit>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1128
+msgid ""
+"Set a memory usage limit for multi-threaded decompression. This can only "
+"affect the number of threads; this will never make B<xz> refuse to "
+"decompress a file. If I<limit> is too low to allow any multi-threading, the "
+"I<limit> is ignored and B<xz> 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<limit> for "
+"multi-threading will never be higher than the limit set with "
+"B<--memlimit-decompress>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1135
+msgid ""
+"In contrast to the other memory usage limit options, "
+"B<--memlimit-mt-decompress=>I<limit> has a system-specific default "
+"I<limit>. B<xz --info-memory> can be used to see the current value."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1151
+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<limit> is too low on your system, "
+"feel free to increase the I<limit> but never set it to a value larger than "
+"the amount of usable RAM as with appropriate input files B<xz> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1163
+msgid ""
+"See B<--memlimit-compress=>I<limit> for possible ways to specify the "
+"I<limit>. Setting I<limit> to B<0> resets the I<limit> to the default "
+"system-specific value."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1163
+#, no-wrap
+msgid "B<-M> I<limit>, B<--memlimit=>I<limit>, B<--memory=>I<limit>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1169
+msgid ""
+"This is equivalent to specifying B<--memlimit-compress=>I<limit> "
+"B<--memlimit-decompress=>I<limit> B<--memlimit-mt-decompress=>I<limit>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1169
+#, no-wrap
+msgid "B<--no-adjust>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1179
+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<xz> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1182
+msgid ""
+"Automatic adjusting is always disabled when creating raw streams "
+"(B<--format=raw>)."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1182
+#, no-wrap
+msgid "B<-T> I<threads>, B<--threads=>I<threads>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1197
+msgid ""
+"Specify the number of worker threads to use. Setting I<threads> to a "
+"special value B<0> makes B<xz> use up to as many threads as the processor(s) "
+"on the system support. The actual number of threads can be fewer than "
+"I<threads> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1216
+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<threads> to B<1> will use the single-threaded "
+"mode. Setting I<threads> to any other value, including B<0>, will use the "
+"multi-threaded compressor even if the system supports only one hardware "
+"thread. (B<xz> 5.2.x used single-threaded mode in this situation.)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1235
+msgid ""
+"To use multi-threaded mode with only one thread, set I<threads> to B<+1>. "
+"The B<+> prefix has no effect with values other than B<1>. A memory usage "
+"limit can still make B<xz> switch to single-threaded mode unless "
+"B<--no-adjust> is used. Support for the B<+> prefix was added in B<xz> "
+"5.4.0."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1250
+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<xz> from compressing or decompressing. This default soft "
+"limit will not make B<xz> switch from multi-threaded mode to single-threaded "
+"mode. The active limits can be seen with B<xz --info-memory>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1257
+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<size> option."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1265
+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<size> has been used."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:1266 ../src/xz/xz.1:2819
+#, no-wrap
+msgid "Custom compressor filter chains"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1282
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1289
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1297
+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:1305
+msgid ""
+"A custom filter chain is specified by using one or more filter options in "
+"the order they are wanted in the filter chain. That is, the order of filter "
+"options is significant! When decoding raw streams (B<--format=raw>), the "
+"filter chain is specified in the same order as it was specified when "
+"compressing."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1314
+msgid ""
+"Filters take filter-specific I<options> as a comma-separated list. Extra "
+"commas in I<options> are ignored. Every option has a default value, so you "
+"need to specify only those you want to change."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1323
+msgid ""
+"To see the whole filter chain and I<options>, use B<xz -vv> (that is, use "
+"B<--verbose> twice). This works also for viewing the filter chain options "
+"used by presets."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1323
+#, no-wrap
+msgid "B<--lzma1>[B<=>I<options>]"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1326
+#, no-wrap
+msgid "B<--lzma2>[B<=>I<options>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1331
+msgid ""
+"Add LZMA1 or LZMA2 filter to the filter chain. These filters can be used "
+"only as the last filter in the chain."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1343
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1346
+msgid "LZMA1 and LZMA2 share the same set of I<options>:"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1347
+#, no-wrap
+msgid "B<preset=>I<preset>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1374
+msgid ""
+"Reset all LZMA1 or LZMA2 I<options> to I<preset>. I<Preset> 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<e>, which "
+"matches B<--extreme>. If no B<preset> is specified, the default values of "
+"LZMA1 or LZMA2 I<options> are taken from the preset B<6>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1374
+#, no-wrap
+msgid "B<dict=>I<size>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1389
+msgid ""
+"Dictionary (history buffer) I<size> 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<size> usually improves compression ratio, but a "
+"dictionary bigger than the uncompressed file is waste of memory."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1398
+msgid ""
+"Typical dictionary I<size> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1425
+msgid ""
+"Dictionary I<size> and match finder (I<mf>) together determine the memory "
+"usage of the LZMA1 or LZMA2 encoder. The same (or bigger) dictionary "
+"I<size> 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<size> either as "
+"2^I<n> or 2^I<n> + 2^(I<n>-1), so these I<sizes> are somewhat preferred for "
+"compression. Other I<sizes> will get rounded up when stored in the B<.xz> "
+"headers."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1425
+#, no-wrap
+msgid "B<lc=>I<lc>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1434
+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<lc> and I<lp> "
+"must not exceed 4."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1439
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1453
+msgid ""
+"The literal coding makes an assumption that the highest I<lc> 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<lc> is at least "
+"3, the literal coding can take advantage of this property in the "
+"uncompressed data."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1462
+msgid ""
+"The default value (3) is usually good. If you want maximum compression, "
+"test B<lc=4>. Sometimes it helps a little, and sometimes it makes "
+"compression worse. If it makes it worse, test B<lc=2> too."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1462
+#, no-wrap
+msgid "B<lp=>I<lp>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1466
+msgid ""
+"Specify the number of literal position bits. The minimum is 0 and the "
+"maximum is 4; the default is 0."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1473
+msgid ""
+"I<Lp> affects what kind of alignment in the uncompressed data is assumed "
+"when encoding literals. See I<pb> below for more information about "
+"alignment."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1473
+#, no-wrap
+msgid "B<pb=>I<pb>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1477
+msgid ""
+"Specify the number of position bits. The minimum is 0 and the maximum is 4; "
+"the default is 2."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1484
+msgid ""
+"I<Pb> affects what kind of alignment in the uncompressed data is assumed in "
+"general. The default means four-byte alignment (2^I<pb>=2^2=4), which is "
+"often a good choice when there's no better guess."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1498
+msgid ""
+"When the alignment is known, setting I<pb> 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<pb=0> can improve compression "
+"slightly. For UTF-16 text, B<pb=1> is a good choice. If the alignment is "
+"an odd number like 3 bytes, B<pb=0> might be the best choice."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1506
+msgid ""
+"Even though the assumed alignment can be adjusted with I<pb> and I<lp>, "
+"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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:1506
+#, no-wrap
+msgid "B<mf=>I<mf>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1521
+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<preset>: 0 uses B<hc3>, "
+"1\\(en3 use B<hc4>, and the rest use B<bt4>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1527
+msgid ""
+"The following match finders are supported. The memory usage formulas below "
+"are rough approximations, which are closest to the reality when I<dict> is a "
+"power of two."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1528
+#, no-wrap
+msgid "B<hc3>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1531
+msgid "Hash Chain with 2- and 3-byte hashing"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1535 ../src/xz/xz.1:1584
+msgid "Minimum value for I<nice>: 3"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1537 ../src/xz/xz.1:1556 ../src/xz/xz.1:1586
+#: ../src/xz/xz.1:1605
+msgid "Memory usage:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1542
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1547
+msgid "I<dict> * 5.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1547
+#, no-wrap
+msgid "B<hc4>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1550
+msgid "Hash Chain with 2-, 3-, and 4-byte hashing"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1554 ../src/xz/xz.1:1603
+msgid "Minimum value for I<nice>: 4"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1561
+msgid "I<dict> * 7.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1566
+msgid "I<dict> * 6.5 (if I<dict> E<gt> 32 MiB)"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1566
+#, no-wrap
+msgid "B<bt2>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1569
+msgid "Binary Tree with 2-byte hashing"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1573
+msgid "Minimum value for I<nice>: 2"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1577
+msgid "Memory usage: I<dict> * 9.5"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1577
+#, no-wrap
+msgid "B<bt3>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1580
+msgid "Binary Tree with 2- and 3-byte hashing"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1591
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 16 MiB);"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1596
+msgid "I<dict> * 9.5 + 64 MiB (if I<dict> E<gt> 16 MiB)"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1596
+#, no-wrap
+msgid "B<bt4>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1599
+msgid "Binary Tree with 2-, 3-, and 4-byte hashing"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1610
+msgid "I<dict> * 11.5 (if I<dict> E<lt>= 32 MiB);"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1615
+msgid "I<dict> * 10.5 (if I<dict> E<gt> 32 MiB)"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1616
+#, no-wrap
+msgid "B<mode=>I<mode>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1637
+msgid ""
+"Compression I<mode> specifies the method to analyze the data produced by the "
+"match finder. Supported I<modes> are B<fast> and B<normal>. The default is "
+"B<fast> for I<presets> 0\\(en3 and B<normal> for I<presets> 4\\(en9."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1646
+msgid ""
+"Usually B<fast> is used with Hash Chain match finders and B<normal> with "
+"Binary Tree match finders. This is also what the I<presets> do."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1646
+#, no-wrap
+msgid "B<nice=>I<nice>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1653
+msgid ""
+"Specify what is considered to be a nice length for a match. Once a match of "
+"at least I<nice> bytes is found, the algorithm stops looking for possibly "
+"better matches."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1660
+msgid ""
+"I<Nice> can be 2\\(en273 bytes. Higher values tend to give better "
+"compression ratio at the expense of speed. The default depends on the "
+"I<preset>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1660
+#, no-wrap
+msgid "B<depth=>I<depth>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1670
+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<depth> from I<mf> and I<nice>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1681
+msgid ""
+"Reasonable I<depth> for Hash Chains is 4\\(en100 and 16\\(en1000 for Binary "
+"Trees. Using very high values for I<depth> can make the encoder extremely "
+"slow with some files. Avoid setting the I<depth> over 1000 unless you are "
+"prepared to interrupt the compression in case it is taking far too long."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1692
+msgid ""
+"When decoding raw streams (B<--format=raw>), LZMA2 needs only the dictionary "
+"I<size>. LZMA1 needs also I<lc>, I<lp>, and I<pb>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1692
+#, no-wrap
+msgid "B<--x86>[B<=>I<options>]"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1695
+#, no-wrap
+msgid "B<--arm>[B<=>I<options>]"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1697
+#, no-wrap
+msgid "B<--armthumb>[B<=>I<options>]"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1699
+#, no-wrap
+msgid "B<--arm64>[B<=>I<options>]"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1701
+#, no-wrap
+msgid "B<--powerpc>[B<=>I<options>]"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1703
+#, no-wrap
+msgid "B<--ia64>[B<=>I<options>]"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1705
+#, no-wrap
+msgid "B<--sparc>[B<=>I<options>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1711
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1725
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1728
+msgid "These BCJ filters have known problems related to the compression ratio:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1735
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1745
+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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1750
+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:1757
+#, no-wrap
+msgid "Filter"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Alignment"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1757
+#, no-wrap
+msgid "Notes"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "x86"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1758
+#, no-wrap
+msgid "32-bit or 64-bit x86"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1759
+#, no-wrap
+msgid "ARM"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1760
+#, no-wrap
+msgid "ARM-Thumb"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "ARM64"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1761
+#, no-wrap
+msgid "4096-byte alignment is best"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "PowerPC"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1762
+#, no-wrap
+msgid "Big endian only"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "IA-64"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "16"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1763
+#, no-wrap
+msgid "Itanium"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:1764
+#, no-wrap
+msgid "SPARC"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1781
+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. For example, with the IA-64 "
+"filter, it's good to set B<pb=4> or even B<pb=4,lp=4,lc=0> with LZMA2 "
+"(2^4=16). The x86 filter is an exception; it's usually good to stick to "
+"LZMA2's default four-byte alignment when compressing x86 executables."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1784
+msgid "All BCJ filters support the same I<options>:"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1785
+#, no-wrap
+msgid "B<start=>I<offset>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1799
+msgid ""
+"Specify the start I<offset> that is used when converting between relative "
+"and absolute addresses. The I<offset> 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<offset> is almost never useful."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1800
+#, no-wrap
+msgid "B<--delta>[B<=>I<options>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1805
+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:1814
+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<flac>(1)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1817
+msgid "Supported I<options>:"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1818
+#, no-wrap
+msgid "B<dist=>I<distance>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1826
+msgid ""
+"Specify the I<distance> of the delta calculation in bytes. I<distance> must "
+"be 1\\(en256. The default is 1."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1831
+msgid ""
+"For example, with B<dist=2> 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 ""
+
+#. type: SS
+#: ../src/xz/xz.1:1833
+#, no-wrap
+msgid "Other options"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1834 ../src/xzdec/xzdec.1:83
+#, no-wrap
+msgid "B<-q>, B<--quiet>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1841
+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:1841
+#, no-wrap
+msgid "B<-v>, B<--verbose>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1850
+msgid ""
+"Be verbose. If standard error is connected to a terminal, B<xz> will "
+"display a progress indicator. Specifying B<--verbose> twice will give even "
+"more verbose output."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1852
+msgid "The progress indicator shows the following information:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1857
+msgid ""
+"Completion percentage is shown if the size of the input file is known. That "
+"is, the percentage cannot be shown in pipes."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1860
+msgid ""
+"Amount of compressed data produced (compressing) or consumed "
+"(decompressing)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1863
+msgid ""
+"Amount of uncompressed data consumed (compressing) or produced "
+"(decompressing)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1867
+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:1874
+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<xz> started "
+"processing the file."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1876
+msgid "Elapsed time in the format M:SS or H:MM:SS."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1884
+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<xz> 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 ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1899
+msgid ""
+"When standard error is not a terminal, B<--verbose> will make B<xz> 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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:1899 ../src/xzdec/xzdec.1:89
+#, no-wrap
+msgid "B<-Q>, B<--no-warn>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1909
+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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:1909
+#, no-wrap
+msgid "B<--robot>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1921
+msgid ""
+"Print messages in a machine-parsable format. This is intended to ease "
+"writing frontends that want to use B<xz> instead of liblzma, which may be "
+"the case with various scripts. The output with this option enabled is meant "
+"to be stable across B<xz> releases. See the section B<ROBOT MODE> for "
+"details."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1921
+#, no-wrap
+msgid "B<--info-memory>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1928
+msgid ""
+"Display, in human-readable format, how much physical memory (RAM) and how "
+"many processor threads B<xz> thinks the system has and the memory usage "
+"limits for compression and decompression, and exit successfully."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1928 ../src/xzdec/xzdec.1:96
+#, no-wrap
+msgid "B<-h>, B<--help>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1932
+msgid ""
+"Display a help message describing the most commonly used options, and exit "
+"successfully."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1932
+#, no-wrap
+msgid "B<-H>, B<--long-help>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1937
+msgid ""
+"Display a help message describing all features of B<xz>, and exit "
+"successfully"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1937 ../src/xzdec/xzdec.1:99
+#, no-wrap
+msgid "B<-V>, B<--version>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1946
+msgid ""
+"Display the version number of B<xz> and liblzma in human readable format. "
+"To get machine-parsable output, specify B<--robot> before B<--version>."
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:1947
+#, no-wrap
+msgid "ROBOT MODE"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1963
+msgid ""
+"The robot mode is activated with the B<--robot> option. It makes the output "
+"of B<xz> easier to parse by other programs. Currently B<--robot> is "
+"supported only together with B<--version>, B<--info-memory>, and B<--list>. "
+"It will be supported for compression and decompression in the future."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:1964
+#, no-wrap
+msgid "Version"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1969
+msgid ""
+"B<xz --robot --version> prints the version number of B<xz> and liblzma in "
+"the following format:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1971
+msgid "B<XZ_VERSION=>I<XYYYZZZS>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1973
+msgid "B<LIBLZMA_VERSION=>I<XYYYZZZS>"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1973
+#, no-wrap
+msgid "I<X>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1976
+msgid "Major version."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1976
+#, no-wrap
+msgid "I<YYY>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1981
+msgid ""
+"Minor version. Even numbers are stable. Odd numbers are alpha or beta "
+"versions."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1981
+#, no-wrap
+msgid "I<ZZZ>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1985
+msgid "Patch level for stable releases or just a counter for development releases."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:1985
+#, no-wrap
+msgid "I<S>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1993
+msgid ""
+"Stability. 0 is alpha, 1 is beta, and 2 is stable. I<S> should be always 2 "
+"when I<YYY> is even."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:1998
+msgid ""
+"I<XYYYZZZS> are the same on both lines if B<xz> and liblzma are from the "
+"same XZ Utils release."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2004
+msgid "Examples: 4.999.9beta is B<49990091> and 5.0.0 is B<50000002>."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2005
+#, no-wrap
+msgid "Memory limit information"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2008
+msgid ""
+"B<xz --robot --info-memory> prints a single line with multiple tab-separated "
+"columns:"
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2008
+#, no-wrap
+msgid "1."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2010
+msgid "Total amount of physical memory (RAM) in bytes."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2010 ../src/xz/xz.1:2125 ../src/xz/xz.1:2162
+#: ../src/xz/xz.1:2188 ../src/xz/xz.1:2258 ../src/xz/xz.1:2285
+#, no-wrap
+msgid "2."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2017
+msgid ""
+"Memory usage limit for compression in bytes (B<--memlimit-compress>). A "
+"special value of B<0> indicates the default setting which for "
+"single-threaded mode is the same as no limit."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2017 ../src/xz/xz.1:2127 ../src/xz/xz.1:2164
+#: ../src/xz/xz.1:2190 ../src/xz/xz.1:2263 ../src/xz/xz.1:2287
+#, no-wrap
+msgid "3."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2024
+msgid ""
+"Memory usage limit for decompression in bytes (B<--memlimit-decompress>). A "
+"special value of B<0> indicates the default setting which for "
+"single-threaded mode is the same as no limit."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2024 ../src/xz/xz.1:2129 ../src/xz/xz.1:2166
+#: ../src/xz/xz.1:2193 ../src/xz/xz.1:2273 ../src/xz/xz.1:2289
+#, no-wrap
+msgid "4."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2036
+msgid ""
+"Since B<xz> 5.3.4alpha: Memory usage for multi-threaded decompression in "
+"bytes (B<--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 "
+"B<--memlimit-mt-decompress>."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2036 ../src/xz/xz.1:2131 ../src/xz/xz.1:2168
+#: ../src/xz/xz.1:2195 ../src/xz/xz.1:2291
+#, no-wrap
+msgid "5."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2048
+msgid ""
+"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 (B<--threads=0>) and no memory usage limit has been "
+"specified (B<--memlimit-compress>). This is also used as the default value "
+"for B<--memlimit-mt-decompress>."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2048 ../src/xz/xz.1:2133 ../src/xz/xz.1:2170
+#: ../src/xz/xz.1:2197 ../src/xz/xz.1:2293
+#, no-wrap
+msgid "6."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2053
+msgid "Since B<xz> 5.3.4alpha: Number of available processor threads."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2057
+msgid ""
+"In the future, the output of B<xz --robot --info-memory> may have more "
+"columns, but never more than a single line."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2058
+#, no-wrap
+msgid "List mode"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2063
+msgid ""
+"B<xz --robot --list> 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 ""
+
+#. type: TP
+#: ../src/xz/xz.1:2063
+#, no-wrap
+msgid "B<name>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2067
+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:2067
+#, no-wrap
+msgid "B<file>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2075
+msgid ""
+"This line contains overall information about the B<.xz> file. This line is "
+"always printed after the B<name> line."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2075
+#, no-wrap
+msgid "B<stream>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2085
+msgid ""
+"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."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2085
+#, no-wrap
+msgid "B<block>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2100
+msgid ""
+"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."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2100
+#, no-wrap
+msgid "B<summary>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2115
+msgid ""
+"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."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2115
+#, no-wrap
+msgid "B<totals>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2119
+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:2123
+msgid "The columns of the B<file> lines:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2127
+msgid "Number of streams in the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2129
+msgid "Total number of blocks in the stream(s)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2131
+msgid "Compressed size of the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2133
+msgid "Uncompressed size of the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2139
+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:2139 ../src/xz/xz.1:2172 ../src/xz/xz.1:2199
+#: ../src/xz/xz.1:2295
+#, no-wrap
+msgid "7."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2152
+msgid ""
+"Comma-separated list of integrity check names. The following strings are "
+"used for the known check types: B<None>, B<CRC32>, B<CRC64>, and "
+"B<SHA-256>. For unknown check types, B<Unknown->I<N> is used, where I<N> is "
+"the Check ID as a decimal number (one or two digits)."
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2152 ../src/xz/xz.1:2174 ../src/xz/xz.1:2201
+#: ../src/xz/xz.1:2298
+#, no-wrap
+msgid "8."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2154
+msgid "Total size of stream padding in the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2160
+msgid "The columns of the B<stream> lines:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2164
+msgid "Stream number (the first stream is 1)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2166
+msgid "Number of blocks in the stream"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2168
+msgid "Compressed start offset"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2170
+msgid "Uncompressed start offset"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2172
+msgid "Compressed size (does not include stream padding)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2174 ../src/xz/xz.1:2203 ../src/xz/xz.1:2293
+msgid "Uncompressed size"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2205
+msgid "Compression ratio"
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2176 ../src/xz/xz.1:2203 ../src/xz/xz.1:2300
+#, no-wrap
+msgid "9."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2207
+msgid "Name of the integrity check"
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2178 ../src/xz/xz.1:2205 ../src/xz/xz.1:2316
+#, no-wrap
+msgid "10."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2180
+msgid "Size of stream padding"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2186
+msgid "The columns of the B<block> lines:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2190
+msgid "Number of the stream containing this block"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2193
+msgid "Block number relative to the beginning of the stream (the first block is 1)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2195
+msgid "Block number relative to the beginning of the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2197
+msgid "Compressed start offset relative to the beginning of the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2199
+msgid "Uncompressed start offset relative to the beginning of the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2201
+msgid "Total compressed size of the block (includes headers)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2219
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<block> 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:2221 ../src/xz/xz.1:2321
+#, no-wrap
+msgid "11."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2223
+msgid "Value of the integrity check in hexadecimal"
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2223 ../src/xz/xz.1:2331
+#, no-wrap
+msgid "12."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2225
+msgid "Block header size"
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2225
+#, no-wrap
+msgid "13."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2235
+msgid ""
+"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 "
+"(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:2235
+#, no-wrap
+msgid "14."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2238
+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:2238
+#, no-wrap
+msgid "15."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2243
+msgid ""
+"Amount of memory (in bytes) required to decompress this block with this "
+"B<xz> version"
+msgstr ""
+
+#. type: IP
+#: ../src/xz/xz.1:2243
+#, no-wrap
+msgid "16."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2250
+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:2256
+msgid "The columns of the B<summary> lines:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2263
+msgid ""
+"Amount of memory (in bytes) required to decompress this file with this B<xz> "
+"version"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2269 ../src/xz/xz.1:2327
+msgid ""
+"B<yes> or B<no> indicating if all block headers have both compressed size "
+"and uncompressed size stored in them"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2273 ../src/xz/xz.1:2331
+msgid "I<Since> B<xz> I<5.1.2alpha:>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2277 ../src/xz/xz.1:2335
+msgid "Minimum B<xz> version required to decompress the file"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2283
+msgid "The columns of the B<totals> line:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2287
+msgid "Number of streams"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2289
+msgid "Number of blocks"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2291
+msgid "Compressed size"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2295
+msgid "Average compression ratio"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2298
+msgid "Comma-separated list of integrity check names that were present in the files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2300
+msgid "Stream padding size"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2306
+msgid ""
+"Number of files. This is here to keep the order of the earlier columns the "
+"same as on B<file> lines."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2314
+msgid ""
+"If B<--verbose> was specified twice, additional columns are included on the "
+"B<totals> line:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2321
+msgid ""
+"Maximum amount of memory (in bytes) required to decompress the files with "
+"this B<xz> version"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2341
+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: SH
+#: ../src/xz/xz.1:2342 ../src/xzdec/xzdec.1:104 ../src/lzmainfo/lzmainfo.1:44
+#: ../src/scripts/xzgrep.1:81
+#, no-wrap
+msgid "EXIT STATUS"
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2343 ../src/xzdec/xzdec.1:105 ../src/lzmainfo/lzmainfo.1:45
+#, no-wrap
+msgid "B<0>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2346 ../src/lzmainfo/lzmainfo.1:48
+msgid "All is good."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2346 ../src/xzdec/xzdec.1:108 ../src/lzmainfo/lzmainfo.1:48
+#, no-wrap
+msgid "B<1>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2349 ../src/xzdec/xzdec.1:111 ../src/lzmainfo/lzmainfo.1:51
+msgid "An error occurred."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2349
+#, no-wrap
+msgid "B<2>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2353
+msgid "Something worth a warning occurred, but no actual errors occurred."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2356
+msgid ""
+"Notices (not warnings or errors) printed on standard error don't affect the "
+"exit status."
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:2357 ../src/scripts/xzgrep.1:94 ../src/scripts/xzless.1:52
+#, no-wrap
+msgid "ENVIRONMENT"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2370
+msgid ""
+"B<xz> parses space-separated lists of options from the environment variables "
+"B<XZ_DEFAULTS> and B<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 "
+"B<getopt_long>(3) which is used also for the command line arguments."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2370
+#, no-wrap
+msgid "B<XZ_DEFAULTS>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2379
+msgid ""
+"User-specific or system-wide default options. Typically this is set in a "
+"shell initialization script to enable B<xz>'s memory usage limiter by "
+"default. Excluding shell initialization scripts and similar special cases, "
+"scripts must never set or unset B<XZ_DEFAULTS>."
+msgstr ""
+
+#. type: TP
+#: ../src/xz/xz.1:2379
+#, no-wrap
+msgid "B<XZ_OPT>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2390
+msgid ""
+"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 B<tar>(1):"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2396
+#, no-wrap
+msgid "CW<XZ_OPT=-2v tar caf foo.tar.xz foo>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2410
+msgid ""
+"Scripts may use B<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 B<sh>(1) scripts one may "
+"use something like this:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2417
+#, no-wrap
+msgid ""
+"CW<XZ_OPT=${XZ_OPT-\"-7e\"}\n"
+"export XZ_OPT>\n"
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:2422
+#, no-wrap
+msgid "LZMA UTILS COMPATIBILITY"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2435
+msgid ""
+"The command line syntax of B<xz> is practically a superset of B<lzma>, "
+"B<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."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2436
+#, no-wrap
+msgid "Compression preset levels"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2443
+msgid ""
+"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."
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "Level"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449 ../src/xz/xz.1:2474
+#, no-wrap
+msgid "xz"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2449
+#, no-wrap
+msgid "LZMA Utils"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2450 ../src/xz/xz.1:2475
+#, no-wrap
+msgid "N/A"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2451
+#, no-wrap
+msgid "64 KiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2453
+#, no-wrap
+msgid "512 KiB"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2468
+msgid ""
+"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:"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2474
+#, no-wrap
+msgid "LZMA Utils 4.32.x"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2477 ../src/xz/xz.1:2478
+#, no-wrap
+msgid "12 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2480
+#, no-wrap
+msgid "26 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2481
+#, no-wrap
+msgid "45 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2482
+#, no-wrap
+msgid "83 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2483
+#, no-wrap
+msgid "159 MiB"
+msgstr ""
+
+#. type: tbl table
+#: ../src/xz/xz.1:2484
+#, no-wrap
+msgid "311 MiB"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2493
+msgid ""
+"The default preset level in LZMA Utils is B<-7> while in XZ Utils it is "
+"B<-6>, so both use an 8 MiB dictionary by default."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2494
+#, no-wrap
+msgid "Streamed vs. non-streamed .lzma files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2504
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2525
+msgid ""
+"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."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2526
+#, no-wrap
+msgid "Unsupported .lzma files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2549
+msgid ""
+"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 I<lp>, but always creates "
+"files with B<lc=3> and B<lp=0>. Creating files with other I<lc> and I<lp> "
+"is possible with B<xz> and with LZMA SDK."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2560
+msgid ""
+"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 B<xz>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2575
+msgid ""
+"LZMA Utils creates only B<.lzma> files which have a dictionary size of "
+"2^I<n> (a power of 2) but accepts files with any dictionary size. liblzma "
+"accepts only B<.lzma> files which have a dictionary size of 2^I<n> or 2^I<n> "
+"+ 2^(I<n>-1). This is to decrease false positives when detecting B<.lzma> "
+"files."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2580
+msgid ""
+"These limitations shouldn't be a problem in practice, since practically all "
+"B<.lzma> files have been compressed with settings that liblzma will accept."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2581
+#, no-wrap
+msgid "Trailing garbage"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2591
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2601
+msgid ""
+"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."
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:2602 ../src/xzdec/xzdec.1:117
+#, no-wrap
+msgid "NOTES"
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2604
+#, no-wrap
+msgid "Compressed output may vary"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2615
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2625
+msgid ""
+"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."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2626
+#, no-wrap
+msgid "Embedded .xz decompressors"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2643
+msgid ""
+"Embedded B<.xz> decompressor implementations like XZ Embedded don't "
+"necessarily support files created with integrity I<check> types other than "
+"B<none> and B<crc32>. Since the default is B<--check=crc64>, you must use "
+"B<--check=none> or B<--check=crc32> when creating files for embedded "
+"systems."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2653
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2656
+msgid "XZ Embedded supports BCJ filters, but only with the default start offset."
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:2657
+#, no-wrap
+msgid "EXAMPLES"
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2659
+#, no-wrap
+msgid "Basics"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2669
+msgid ""
+"Compress the file I<foo> into I<foo.xz> using the default compression level "
+"(B<-6>), and remove I<foo> if compression is successful:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2674
+#, no-wrap
+msgid "CW<xz foo>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2685
+msgid ""
+"Decompress I<bar.xz> into I<bar> and don't remove I<bar.xz> even if "
+"decompression is successful:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2690
+#, no-wrap
+msgid "CW<xz -dk bar.xz>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2703
+msgid ""
+"Create I<baz.tar.xz> with the preset B<-4e> (B<-4 --extreme>), which is "
+"slower than the default B<-6>, but needs less memory for compression and "
+"decompression (48\\ MiB and 5\\ MiB, respectively):"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2708
+#, no-wrap
+msgid "CW<tar cf - baz | xz -4e E<gt> baz.tar.xz>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2714
+msgid ""
+"A mix of compressed and uncompressed files can be decompressed to standard "
+"output with a single command:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2719
+#, no-wrap
+msgid "CW<xz -dcf a.txt b.txt.xz c.txt d.txt.lzma E<gt> abcd.txt>\n"
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2723
+#, no-wrap
+msgid "Parallel compression of many files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2729
+msgid ""
+"On GNU and *BSD, B<find>(1) and B<xargs>(1) can be used to parallelize "
+"compression of many files:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2735
+#, no-wrap
+msgid ""
+"CW<find . -type f \\e! -name '*.xz' -print0 \\e\n"
+" | xargs -0r -P4 -n16 xz -T1>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2757
+msgid ""
+"The B<-P> option to B<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 B<xargs>(1) "
+"will eventually create."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2765
+msgid ""
+"The option B<-T1> for B<xz> is there to force it to single-threaded mode, "
+"because B<xargs>(1) is used to control the amount of parallelization."
+msgstr ""
+
+#. type: SS
+#: ../src/xz/xz.1:2766
+#, no-wrap
+msgid "Robot mode"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2769
+msgid ""
+"Calculate how many bytes have been saved in total after compressing multiple "
+"files:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2774
+#, no-wrap
+msgid "CW<xz --robot --list *.xz | awk '/^totals/{print $5-$4}'>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2789
+msgid ""
+"A script may want to know that it is using new enough B<xz>. The following "
+"B<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:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2798
+#, no-wrap
+msgid ""
+"CW<if ! eval \"$(xz --robot --version 2E<gt> /dev/null)\" ||\n"
+" [ \"$XZ_VERSION\" -lt 50000002 ]; then\n"
+" echo \"Your xz is too old.\"\n"
+"fi\n"
+"unset XZ_VERSION LIBLZMA_VERSION>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2805
+msgid ""
+"Set a memory usage limit for decompression using B<XZ_OPT>, but if a limit "
+"has already been set, don't increase it:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2815
+#, no-wrap
+msgid ""
+"CW<NEWLIM=$((123 E<lt>E<lt> 20))\\ \\ # 123 MiB\n"
+"OLDLIM=$(xz --robot --info-memory | cut -f3)\n"
+"if [ $OLDLIM -eq 0 -o $OLDLIM -gt $NEWLIM ]; then\n"
+" XZ_OPT=\"$XZ_OPT --memlimit-decompress=$NEWLIM\"\n"
+" export XZ_OPT\n"
+"fi>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2825
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2833
+msgid ""
+"The CompCPU columns of the tables from the descriptions of the options B<-0> "
+"... B<-9> and B<--extreme> are useful when customizing LZMA2 presets. Here "
+"are the relevant parts collected from those two tables:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2858
+msgid ""
+"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:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2863
+#, no-wrap
+msgid "CW<xz --lzma2=preset=1,dict=32MiB foo.tar>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2879
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2886
+msgid ""
+"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:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2891
+#, no-wrap
+msgid "CW<xz -vv --lzma2=dict=192MiB big_foo.tar>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2904
+msgid ""
+"Using B<-vv> (B<--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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2916
+msgid ""
+"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> (B<-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 "
+"B<--check=crc32>) using about 100\\ KiB of memory."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2921
+#, no-wrap
+msgid "CW<xz --check=crc32 --lzma2=preset=6e,dict=64KiB foo>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2944
+msgid ""
+"If you want to squeeze out as many bytes as possible, adjusting the number "
+"of literal context bits (I<lc>) and number of position bits (I<pb>) can "
+"sometimes help. Adjusting the number of literal position bits (I<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 B<lc=4>):"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2949
+#, no-wrap
+msgid "CW<xz --lzma2=preset=6e,pb=0,lc=4 source_code.tar>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2957
+msgid ""
+"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:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2962
+#, no-wrap
+msgid "CW<xz --x86 --lzma2 libfoo.so>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2976
+msgid ""
+"Note that the order of the filter options is significant. If B<--x86> is "
+"specified after B<--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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2982
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2992
+msgid ""
+"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 B<dist=3>, and it is also good to pass B<pb=0> to LZMA2 to "
+"accommodate the three-byte alignment:"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:2997
+#, no-wrap
+msgid "CW<xz --delta=dist=3 --lzma2=pb=0 foo.tiff>\n"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:3005
+msgid ""
+"If multiple images have been put into a single archive (for example, "
+"B<.tar>), the Delta filter will work on that too as long as all images have "
+"the same number of bytes per pixel."
+msgstr ""
+
+#. type: SH
+#: ../src/xz/xz.1:3006 ../src/xzdec/xzdec.1:143 ../src/lzmainfo/lzmainfo.1:59
+#: ../src/scripts/xzdiff.1:65 ../src/scripts/xzgrep.1:106
+#: ../src/scripts/xzless.1:65 ../src/scripts/xzmore.1:51
+#, no-wrap
+msgid "SEE ALSO"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:3015
+msgid ""
+"B<xzdec>(1), B<xzdiff>(1), B<xzgrep>(1), B<xzless>(1), B<xzmore>(1), "
+"B<gzip>(1), B<bzip2>(1), B<7z>(1)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:3017
+msgid "XZ Utils: E<lt>https://tukaani.org/xz/E<gt>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:3019 ../src/xzdec/xzdec.1:146
+msgid "XZ Embedded: E<lt>https://tukaani.org/xz/embedded.htmlE<gt>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xz/xz.1:3020
+msgid "LZMA SDK: E<lt>https://7-zip.org/sdk.htmlE<gt>"
+msgstr ""
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "XZDEC"
+msgstr ""
+
+#. type: TH
+#: ../src/xzdec/xzdec.1:7
+#, no-wrap
+msgid "2017-04-19"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:10
+msgid "xzdec, lzmadec - Small .xz and .lzma decompressors"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:14
+msgid "B<xzdec> [I<option...>] [I<file...>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:18
+msgid "B<lzmadec> [I<option...>] [I<file...>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:44
+msgid ""
+"B<xzdec> is a liblzma-based decompression-only tool for B<.xz> (and only "
+"B<.xz>) files. B<xzdec> is intended to work as a drop-in replacement for "
+"B<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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:61
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:69
+msgid "Ignored for B<xz>(1) compatibility. B<xzdec> supports only decompression."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:76
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> never creates or removes any "
+"files."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:83
+msgid ""
+"Ignored for B<xz>(1) compatibility. B<xzdec> always writes the "
+"decompressed data to standard output."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:89
+msgid ""
+"Specifying this once does nothing since B<xzdec> never displays any warnings "
+"or notices. Specify this twice to suppress errors."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:96
+msgid "Ignored for B<xz>(1) compatibility. B<xzdec> never uses the exit status 2."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:99
+msgid "Display a help message and exit successfully."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:104
+msgid "Display the version number of B<xzdec> and liblzma."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:108
+msgid "All was good."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:117
+msgid ""
+"B<xzdec> doesn't have any warning messages like B<xz>(1) has, thus the exit "
+"status 2 is not used by B<xzdec>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:131
+msgid ""
+"Use B<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 B<xz>(1)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:143
+msgid ""
+"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."
+msgstr ""
+
+#. type: Plain text
+#: ../src/xzdec/xzdec.1:145 ../src/lzmainfo/lzmainfo.1:60
+msgid "B<xz>(1)"
+msgstr ""
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7
+#, no-wrap
+msgid "LZMAINFO"
+msgstr ""
+
+#. type: TH
+#: ../src/lzmainfo/lzmainfo.1:7 ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "2013-06-30"
+msgstr ""
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:10
+msgid "lzmainfo - show information stored in the .lzma file header"
+msgstr ""
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:15
+msgid "B<lzmainfo> [B<--help>] [B<--version>] [I<file...>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:31
+msgid ""
+"B<lzmainfo> shows information stored in the B<.lzma> file header. It reads "
+"the first 13 bytes from the specified I<file>, decodes the header, and "
+"prints it to standard output in human readable format. If no I<files> are "
+"given or I<file> is B<->, standard input is read."
+msgstr ""
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:40
+msgid ""
+"Usually the most interesting information is the uncompressed size and the "
+"dictionary size. Uncompressed size can be shown only if the file is in the "
+"non-streamed B<.lzma> format variant. The amount of memory required to "
+"decompress the file is a few dozen kilobytes plus the dictionary size."
+msgstr ""
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:44
+msgid ""
+"B<lzmainfo> is included in XZ Utils primarily for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+
+#. type: SH
+#: ../src/lzmainfo/lzmainfo.1:51 ../src/scripts/xzdiff.1:74
+#, no-wrap
+msgid "BUGS"
+msgstr ""
+
+#. type: Plain text
+#: ../src/lzmainfo/lzmainfo.1:59
+msgid ""
+"B<lzmainfo> uses B<MB> while the correct suffix would be B<MiB> (2^20 "
+"bytes). This is to keep the output compatible with LZMA Utils."
+msgstr ""
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "XZDIFF"
+msgstr ""
+
+#. type: TH
+#: ../src/scripts/xzdiff.1:9
+#, no-wrap
+msgid "2021-06-04"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:12
+msgid "xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:15
+msgid "B<xzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:18
+msgid "B<xzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:21
+msgid "B<lzcmp> [I<cmp_options>] I<file1> [I<file2>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:24
+msgid "B<lzdiff> [I<diff_options>] I<file1> [I<file2>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:59
+msgid ""
+"B<xzcmp> and B<xzdiff> invoke B<cmp>(1) or B<diff>(1) on files compressed "
+"with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), or "
+"B<zstd>(1). All options specified are passed directly to B<cmp>(1) or "
+"B<diff>(1). If only one file is specified, then the files compared are "
+"I<file1> (which must have a suffix of a supported compression format) and "
+"I<file1> from which the compression format suffix has been stripped. If two "
+"files are specified, then they are uncompressed if necessary and fed to "
+"B<cmp>(1) or B<diff>(1). The exit status from B<cmp>(1) or B<diff>(1) is "
+"preserved unless a decompression error occurs; then exit status is 2."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:65
+msgid ""
+"The names B<lzcmp> and B<lzdiff> are provided for backward compatibility "
+"with LZMA Utils."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:74
+msgid ""
+"B<cmp>(1), B<diff>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), "
+"B<zstd>(1), B<zdiff>(1)"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzdiff.1:79
+msgid ""
+"Messages from the B<cmp>(1) or B<diff>(1) programs refer to temporary "
+"filenames instead of those specified."
+msgstr ""
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "XZGREP"
+msgstr ""
+
+#. type: TH
+#: ../src/scripts/xzgrep.1:9
+#, no-wrap
+msgid "2022-07-19"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:12
+msgid "xzgrep - search compressed files for a regular expression"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:18
+msgid "B<xzgrep> [I<grep_options>] [B<-e>] I<pattern> [I<file...>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:21
+msgid "B<xzegrep> \\&..."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:24
+msgid "B<xzfgrep> \\&..."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:27
+msgid "B<lzgrep> \\&..."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:30
+msgid "B<lzegrep> \\&..."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:33
+msgid "B<lzfgrep> \\&..."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:49
+msgid ""
+"B<xzgrep> invokes B<grep>(1) on I<files> which may be either uncompressed "
+"or compressed with B<xz>(1), B<lzma>(1), B<gzip>(1), B<bzip2>(1), "
+"B<lzop>(1), or B<zstd>(1). All options specified are passed directly to "
+"B<grep>(1)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:62
+msgid ""
+"If no I<file> is specified, then standard input is decompressed if necessary "
+"and fed to B<grep>(1). When reading from standard input, B<gzip>(1), "
+"B<bzip2>(1), B<lzop>(1), and B<zstd>(1) compressed files are not supported."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:81
+msgid ""
+"If B<xzgrep> is invoked as B<xzegrep> or B<xzfgrep> then B<grep -E> or "
+"B<grep -F> is used instead of B<grep>(1). The same applies to names "
+"B<lzgrep>, B<lzegrep>, and B<lzfgrep>, which are provided for backward "
+"compatibility with LZMA Utils."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:86
+msgid ""
+"At least one match was found from at least one of the input files. No "
+"errors occurred."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:90
+msgid "No matches were found from any of the input files. No errors occurred."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:90
+#, no-wrap
+msgid "E<gt>1"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:94
+msgid "One or more errors occurred. It is unknown if matches were found."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzgrep.1:95
+#, no-wrap
+msgid "B<GREP>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:106
+msgid ""
+"If the B<GREP> environment variable is set, B<xzgrep> uses it instead of "
+"B<grep>(1), B<grep -E>, or B<grep -F>."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzgrep.1:113
+msgid ""
+"B<grep>(1), B<xz>(1), B<gzip>(1), B<bzip2>(1), B<lzop>(1), B<zstd>(1), "
+"B<zgrep>(1)"
+msgstr ""
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "XZLESS"
+msgstr ""
+
+#. type: TH
+#: ../src/scripts/xzless.1:10
+#, no-wrap
+msgid "2010-09-27"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:13
+msgid "xzless, lzless - view xz or lzma compressed (text) files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:16
+msgid "B<xzless> [I<file>...]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:19
+msgid "B<lzless> [I<file>...]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:31
+msgid ""
+"B<xzless> is a filter that displays text from compressed files to a "
+"terminal. It works on files compressed with B<xz>(1) or B<lzma>(1). If no "
+"I<files> are given, B<xzless> reads from standard input."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:48
+msgid ""
+"B<xzless> uses B<less>(1) to present its output. Unlike B<xzmore>, its "
+"choice of pager cannot be altered by setting an environment variable. "
+"Commands are based on both B<more>(1) and B<vi>(1) and allow back and "
+"forth movement and searching. See the B<less>(1) manual for more "
+"information."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:52
+msgid ""
+"The command named B<lzless> is provided for backward compatibility with LZMA "
+"Utils."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzless.1:53
+#, no-wrap
+msgid "B<LESSMETACHARS>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:59
+msgid ""
+"A list of characters special to the shell. Set by B<xzless> unless it is "
+"already set in the environment."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzless.1:59
+#, no-wrap
+msgid "B<LESSOPEN>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:65
+msgid ""
+"Set to a command line to invoke the B<xz>(1) decompressor for preprocessing "
+"the input files to B<less>(1)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzless.1:69
+msgid "B<less>(1), B<xz>(1), B<xzmore>(1), B<zless>(1)"
+msgstr ""
+
+#. type: TH
+#: ../src/scripts/xzmore.1:7
+#, no-wrap
+msgid "XZMORE"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:10
+msgid "xzmore, lzmore - view xz or lzma compressed (text) files"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:13
+msgid "B<xzmore> [I<file...>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:16
+msgid "B<lzmore> [I<file...>]"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:24
+msgid ""
+"B<xzmore> is a filter which allows examination of B<xz>(1) or B<lzma>(1) "
+"compressed text files one screenful at a time on a soft-copy terminal."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:33
+msgid ""
+"To use a pager other than the default B<more,> set environment variable "
+"B<PAGER> to the name of the desired program. The name B<lzmore> is provided "
+"for backward compatibility with LZMA Utils."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzmore.1:33
+#, no-wrap
+msgid "B<e> or B<q>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:40
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to exit."
+msgstr ""
+
+#. type: TP
+#: ../src/scripts/xzmore.1:40
+#, no-wrap
+msgid "B<s>"
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:47
+msgid ""
+"When the prompt --More--(Next file: I<file>) is printed, this command "
+"causes B<xzmore> to skip the next file and continue."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:51
+msgid ""
+"For list of keyboard commands supported while actually viewing the content "
+"of a file, refer to manual of the pager you use, usually B<more>(1)."
+msgstr ""
+
+#. type: Plain text
+#: ../src/scripts/xzmore.1:55
+msgid "B<more>(1), B<xz>(1), B<xzless>(1), B<zmore>(1)"
+msgstr ""
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..d199e85
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,42 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+SUBDIRS = liblzma xzdec
+
+if COND_XZ
+SUBDIRS += xz
+endif
+
+if COND_LZMAINFO
+SUBDIRS += lzmainfo
+endif
+
+if COND_SCRIPTS
+SUBDIRS += scripts
+endif
+
+EXTRA_DIST = \
+ common/common_w32res.rc \
+ common/mythread.h \
+ common/sysdefs.h \
+ common/tuklib_common.h \
+ common/tuklib_config.h \
+ common/tuklib_cpucores.c \
+ common/tuklib_cpucores.h \
+ common/tuklib_exit.c \
+ common/tuklib_exit.h \
+ common/tuklib_gettext.h \
+ common/tuklib_integer.h \
+ common/tuklib_mbstr_fw.c \
+ common/tuklib_mbstr.h \
+ common/tuklib_mbstr_width.c \
+ common/tuklib_open_stdxxx.c \
+ common/tuklib_open_stdxxx.h \
+ common/tuklib_physmem.c \
+ common/tuklib_physmem.h \
+ common/tuklib_progname.c \
+ common/tuklib_progname.h
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..d9827e9
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,696 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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_XZ_TRUE@am__append_1 = xz
+@COND_LZMAINFO_TRUE@am__append_2 = lzmainfo
+@COND_SCRIPTS_TRUE@am__append_3 = scripts
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 =
+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 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+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)`
+DIST_SUBDIRS = liblzma xzdec xz lzmainfo scripts
+am__DIST_COMMON = $(srcdir)/Makefile.in
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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@
+SUBDIRS = liblzma xzdec $(am__append_1) $(am__append_2) \
+ $(am__append_3)
+EXTRA_DIST = \
+ common/common_w32res.rc \
+ common/mythread.h \
+ common/sysdefs.h \
+ common/tuklib_common.h \
+ common/tuklib_config.h \
+ common/tuklib_cpucores.c \
+ common/tuklib_cpucores.h \
+ common/tuklib_exit.c \
+ common/tuklib_exit.h \
+ common/tuklib_gettext.h \
+ common/tuklib_integer.h \
+ common/tuklib_mbstr_fw.c \
+ common/tuklib_mbstr.h \
+ common/tuklib_mbstr_width.c \
+ common/tuklib_open_stdxxx.c \
+ common/tuklib_open_stdxxx.h \
+ common/tuklib_physmem.c \
+ common/tuklib_physmem.h \
+ common/tuklib_progname.c \
+ common/tuklib_progname.h
+
+all: all-recursive
+
+.SUFFIXES:
+$(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/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/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):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(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-recursive
+
+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-recursive
+
+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
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean 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 \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# 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:
diff --git a/src/common/common_w32res.rc b/src/common/common_w32res.rc
new file mode 100644
index 0000000..d05d22e
--- /dev/null
+++ b/src/common/common_w32res.rc
@@ -0,0 +1,52 @@
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#include <winresrc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#define LZMA_H_INTERNAL
+#define LZMA_H_INTERNAL_RC
+#include "lzma/version.h"
+
+#ifndef MY_BUILD
+# define MY_BUILD 0
+#endif
+#define MY_VERSION LZMA_VERSION_MAJOR,LZMA_VERSION_MINOR,LZMA_VERSION_PATCH,MY_BUILD
+
+#define MY_FILENAME MY_NAME MY_SUFFIX
+#define MY_COMPANY "The Tukaani Project <https://tukaani.org/>"
+#define MY_PRODUCT PACKAGE_NAME " <" PACKAGE_URL ">"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION MY_VERSION
+ PRODUCTVERSION MY_VERSION
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ FILEFLAGS 0
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE MY_TYPE
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", MY_COMPANY
+ VALUE "FileDescription", MY_DESC
+ VALUE "FileVersion", LZMA_VERSION_STRING
+ VALUE "InternalName", MY_NAME
+ VALUE "OriginalFilename", MY_FILENAME
+ VALUE "ProductName", MY_PRODUCT
+ VALUE "ProductVersion", LZMA_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
diff --git a/src/common/mythread.h b/src/common/mythread.h
new file mode 100644
index 0000000..4495e01
--- /dev/null
+++ b/src/common/mythread.h
@@ -0,0 +1,528 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file mythread.h
+/// \brief Some threading related helper macros and functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef MYTHREAD_H
+#define MYTHREAD_H
+
+#include "sysdefs.h"
+
+// If any type of threading is enabled, #define MYTHREAD_ENABLED.
+#if defined(MYTHREAD_POSIX) || defined(MYTHREAD_WIN95) \
+ || defined(MYTHREAD_VISTA)
+# define MYTHREAD_ENABLED 1
+#endif
+
+
+#ifdef MYTHREAD_ENABLED
+
+////////////////////////////////////////
+// Shared between all threading types //
+////////////////////////////////////////
+
+// Locks a mutex for a duration of a block.
+//
+// Perform mythread_mutex_lock(&mutex) in the beginning of a block
+// and mythread_mutex_unlock(&mutex) at the end of the block. "break"
+// may be used to unlock the mutex and jump out of the block.
+// mythread_sync blocks may be nested.
+//
+// Example:
+//
+// mythread_sync(mutex) {
+// foo();
+// if (some_error)
+// break; // Skips bar()
+// bar();
+// }
+//
+// At least GCC optimizes the loops completely away so it doesn't slow
+// things down at all compared to plain mythread_mutex_lock(&mutex)
+// and mythread_mutex_unlock(&mutex) calls.
+//
+#define mythread_sync(mutex) mythread_sync_helper1(mutex, __LINE__)
+#define mythread_sync_helper1(mutex, line) mythread_sync_helper2(mutex, line)
+#define mythread_sync_helper2(mutex, line) \
+ for (unsigned int mythread_i_ ## line = 0; \
+ mythread_i_ ## line \
+ ? (mythread_mutex_unlock(&(mutex)), 0) \
+ : (mythread_mutex_lock(&(mutex)), 1); \
+ mythread_i_ ## line = 1) \
+ for (unsigned int mythread_j_ ## line = 0; \
+ !mythread_j_ ## line; \
+ mythread_j_ ## line = 1)
+#endif
+
+
+#if !defined(MYTHREAD_ENABLED)
+
+//////////////////
+// No threading //
+//////////////////
+
+// Calls the given function once. This isn't thread safe.
+#define mythread_once(func) \
+do { \
+ static bool once_ = false; \
+ if (!once_) { \
+ func(); \
+ once_ = true; \
+ } \
+} while (0)
+
+
+#if !(defined(_WIN32) && !defined(__CYGWIN__)) && !defined(__wasm__)
+// Use sigprocmask() to set the signal mask in single-threaded programs.
+#include <signal.h>
+
+static inline void
+mythread_sigmask(int how, const sigset_t *restrict set,
+ sigset_t *restrict oset)
+{
+ int ret = sigprocmask(how, set, oset);
+ assert(ret == 0);
+ (void)ret;
+}
+#endif
+
+
+#elif defined(MYTHREAD_POSIX)
+
+////////////////////
+// Using pthreads //
+////////////////////
+
+#include <pthread.h>
+#include <signal.h>
+#include <time.h>
+#include <errno.h>
+
+// If clock_gettime() isn't available, use gettimeofday() from <sys/time.h>
+// as a fallback. gettimeofday() is in SUSv2 and thus is supported on all
+// relevant POSIX systems.
+#ifndef HAVE_CLOCK_GETTIME
+# include <sys/time.h>
+#endif
+
+#define MYTHREAD_RET_TYPE void *
+#define MYTHREAD_RET_VALUE NULL
+
+typedef pthread_t mythread;
+typedef pthread_mutex_t mythread_mutex;
+
+typedef struct {
+ pthread_cond_t cond;
+#ifdef HAVE_CLOCK_GETTIME
+ // Clock ID (CLOCK_REALTIME or CLOCK_MONOTONIC) associated with
+ // the condition variable.
+ clockid_t clk_id;
+#endif
+} mythread_cond;
+
+typedef struct timespec mythread_condtime;
+
+
+// Calls the given function once in a thread-safe way.
+#define mythread_once(func) \
+ do { \
+ static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
+ pthread_once(&once_, &func); \
+ } while (0)
+
+
+// Use pthread_sigmask() to set the signal mask in multi-threaded programs.
+// Do nothing on OpenVMS since it lacks pthread_sigmask().
+static inline void
+mythread_sigmask(int how, const sigset_t *restrict set,
+ sigset_t *restrict oset)
+{
+#ifdef __VMS
+ (void)how;
+ (void)set;
+ (void)oset;
+#else
+ int ret = pthread_sigmask(how, set, oset);
+ assert(ret == 0);
+ (void)ret;
+#endif
+}
+
+
+// Creates a new thread with all signals blocked. Returns zero on success
+// and non-zero on error.
+static inline int
+mythread_create(mythread *thread, void *(*func)(void *arg), void *arg)
+{
+ sigset_t old;
+ sigset_t all;
+ sigfillset(&all);
+
+ mythread_sigmask(SIG_SETMASK, &all, &old);
+ const int ret = pthread_create(thread, NULL, func, arg);
+ mythread_sigmask(SIG_SETMASK, &old, NULL);
+
+ return ret;
+}
+
+// Joins a thread. Returns zero on success and non-zero on error.
+static inline int
+mythread_join(mythread thread)
+{
+ return pthread_join(thread, NULL);
+}
+
+
+// Initiatlizes a mutex. Returns zero on success and non-zero on error.
+static inline int
+mythread_mutex_init(mythread_mutex *mutex)
+{
+ return pthread_mutex_init(mutex, NULL);
+}
+
+static inline void
+mythread_mutex_destroy(mythread_mutex *mutex)
+{
+ int ret = pthread_mutex_destroy(mutex);
+ assert(ret == 0);
+ (void)ret;
+}
+
+static inline void
+mythread_mutex_lock(mythread_mutex *mutex)
+{
+ int ret = pthread_mutex_lock(mutex);
+ assert(ret == 0);
+ (void)ret;
+}
+
+static inline void
+mythread_mutex_unlock(mythread_mutex *mutex)
+{
+ int ret = pthread_mutex_unlock(mutex);
+ assert(ret == 0);
+ (void)ret;
+}
+
+
+// Initializes a condition variable.
+//
+// Using CLOCK_MONOTONIC instead of the default CLOCK_REALTIME makes the
+// timeout in pthread_cond_timedwait() work correctly also if system time
+// is suddenly changed. Unfortunately CLOCK_MONOTONIC isn't available
+// everywhere while the default CLOCK_REALTIME is, so the default is
+// used if CLOCK_MONOTONIC isn't available.
+//
+// If clock_gettime() isn't available at all, gettimeofday() will be used.
+static inline int
+mythread_cond_init(mythread_cond *mycond)
+{
+#ifdef HAVE_CLOCK_GETTIME
+# if defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && \
+ defined(HAVE_CLOCK_MONOTONIC)
+ struct timespec ts;
+ pthread_condattr_t condattr;
+
+ // POSIX doesn't seem to *require* that pthread_condattr_setclock()
+ // will fail if given an unsupported clock ID. Test that
+ // CLOCK_MONOTONIC really is supported using clock_gettime().
+ if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0
+ && pthread_condattr_init(&condattr) == 0) {
+ int ret = pthread_condattr_setclock(
+ &condattr, CLOCK_MONOTONIC);
+ if (ret == 0)
+ ret = pthread_cond_init(&mycond->cond, &condattr);
+
+ pthread_condattr_destroy(&condattr);
+
+ if (ret == 0) {
+ mycond->clk_id = CLOCK_MONOTONIC;
+ return 0;
+ }
+ }
+
+ // If anything above fails, fall back to the default CLOCK_REALTIME.
+ // POSIX requires that all implementations of clock_gettime() must
+ // support at least CLOCK_REALTIME.
+# endif
+
+ mycond->clk_id = CLOCK_REALTIME;
+#endif
+
+ return pthread_cond_init(&mycond->cond, NULL);
+}
+
+static inline void
+mythread_cond_destroy(mythread_cond *cond)
+{
+ int ret = pthread_cond_destroy(&cond->cond);
+ assert(ret == 0);
+ (void)ret;
+}
+
+static inline void
+mythread_cond_signal(mythread_cond *cond)
+{
+ int ret = pthread_cond_signal(&cond->cond);
+ assert(ret == 0);
+ (void)ret;
+}
+
+static inline void
+mythread_cond_wait(mythread_cond *cond, mythread_mutex *mutex)
+{
+ int ret = pthread_cond_wait(&cond->cond, mutex);
+ assert(ret == 0);
+ (void)ret;
+}
+
+// Waits on a condition or until a timeout expires. If the timeout expires,
+// non-zero is returned, otherwise zero is returned.
+static inline int
+mythread_cond_timedwait(mythread_cond *cond, mythread_mutex *mutex,
+ const mythread_condtime *condtime)
+{
+ int ret = pthread_cond_timedwait(&cond->cond, mutex, condtime);
+ assert(ret == 0 || ret == ETIMEDOUT);
+ return ret;
+}
+
+// Sets condtime to the absolute time that is timeout_ms milliseconds
+// in the future. The type of the clock to use is taken from cond.
+static inline void
+mythread_condtime_set(mythread_condtime *condtime, const mythread_cond *cond,
+ uint32_t timeout_ms)
+{
+ condtime->tv_sec = (time_t)(timeout_ms / 1000);
+ condtime->tv_nsec = (long)((timeout_ms % 1000) * 1000000);
+
+#ifdef HAVE_CLOCK_GETTIME
+ struct timespec now;
+ int ret = clock_gettime(cond->clk_id, &now);
+ assert(ret == 0);
+ (void)ret;
+
+ condtime->tv_sec += now.tv_sec;
+ condtime->tv_nsec += now.tv_nsec;
+#else
+ (void)cond;
+
+ struct timeval now;
+ gettimeofday(&now, NULL);
+
+ condtime->tv_sec += now.tv_sec;
+ condtime->tv_nsec += now.tv_usec * 1000L;
+#endif
+
+ // tv_nsec must stay in the range [0, 999_999_999].
+ if (condtime->tv_nsec >= 1000000000L) {
+ condtime->tv_nsec -= 1000000000L;
+ ++condtime->tv_sec;
+ }
+}
+
+
+#elif defined(MYTHREAD_WIN95) || defined(MYTHREAD_VISTA)
+
+/////////////////////
+// Windows threads //
+/////////////////////
+
+#define WIN32_LEAN_AND_MEAN
+#ifdef MYTHREAD_VISTA
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x0600
+#endif
+#include <windows.h>
+#include <process.h>
+
+#define MYTHREAD_RET_TYPE unsigned int __stdcall
+#define MYTHREAD_RET_VALUE 0
+
+typedef HANDLE mythread;
+typedef CRITICAL_SECTION mythread_mutex;
+
+#ifdef MYTHREAD_WIN95
+typedef HANDLE mythread_cond;
+#else
+typedef CONDITION_VARIABLE mythread_cond;
+#endif
+
+typedef struct {
+ // Tick count (milliseconds) in the beginning of the timeout.
+ // NOTE: This is 32 bits so it wraps around after 49.7 days.
+ // Multi-day timeouts may not work as expected.
+ DWORD start;
+
+ // Length of the timeout in milliseconds. The timeout expires
+ // when the current tick count minus "start" is equal or greater
+ // than "timeout".
+ DWORD timeout;
+} mythread_condtime;
+
+
+// mythread_once() is only available with Vista threads.
+#ifdef MYTHREAD_VISTA
+#define mythread_once(func) \
+ do { \
+ static INIT_ONCE once_ = INIT_ONCE_STATIC_INIT; \
+ BOOL pending_; \
+ if (!InitOnceBeginInitialize(&once_, 0, &pending_, NULL)) \
+ abort(); \
+ if (pending_) { \
+ func(); \
+ if (!InitOnceComplete(&once_, 0, NULL)) \
+ abort(); \
+ } \
+ } while (0)
+#endif
+
+
+// mythread_sigmask() isn't available on Windows. Even a dummy version would
+// make no sense because the other POSIX signal functions are missing anyway.
+
+
+static inline int
+mythread_create(mythread *thread,
+ unsigned int (__stdcall *func)(void *arg), void *arg)
+{
+ uintptr_t ret = _beginthreadex(NULL, 0, func, arg, 0, NULL);
+ if (ret == 0)
+ return -1;
+
+ *thread = (HANDLE)ret;
+ return 0;
+}
+
+static inline int
+mythread_join(mythread thread)
+{
+ int ret = 0;
+
+ if (WaitForSingleObject(thread, INFINITE) != WAIT_OBJECT_0)
+ ret = -1;
+
+ if (!CloseHandle(thread))
+ ret = -1;
+
+ return ret;
+}
+
+
+static inline int
+mythread_mutex_init(mythread_mutex *mutex)
+{
+ InitializeCriticalSection(mutex);
+ return 0;
+}
+
+static inline void
+mythread_mutex_destroy(mythread_mutex *mutex)
+{
+ DeleteCriticalSection(mutex);
+}
+
+static inline void
+mythread_mutex_lock(mythread_mutex *mutex)
+{
+ EnterCriticalSection(mutex);
+}
+
+static inline void
+mythread_mutex_unlock(mythread_mutex *mutex)
+{
+ LeaveCriticalSection(mutex);
+}
+
+
+static inline int
+mythread_cond_init(mythread_cond *cond)
+{
+#ifdef MYTHREAD_WIN95
+ *cond = CreateEvent(NULL, FALSE, FALSE, NULL);
+ return *cond == NULL ? -1 : 0;
+#else
+ InitializeConditionVariable(cond);
+ return 0;
+#endif
+}
+
+static inline void
+mythread_cond_destroy(mythread_cond *cond)
+{
+#ifdef MYTHREAD_WIN95
+ CloseHandle(*cond);
+#else
+ (void)cond;
+#endif
+}
+
+static inline void
+mythread_cond_signal(mythread_cond *cond)
+{
+#ifdef MYTHREAD_WIN95
+ SetEvent(*cond);
+#else
+ WakeConditionVariable(cond);
+#endif
+}
+
+static inline void
+mythread_cond_wait(mythread_cond *cond, mythread_mutex *mutex)
+{
+#ifdef MYTHREAD_WIN95
+ LeaveCriticalSection(mutex);
+ WaitForSingleObject(*cond, INFINITE);
+ EnterCriticalSection(mutex);
+#else
+ BOOL ret = SleepConditionVariableCS(cond, mutex, INFINITE);
+ assert(ret);
+ (void)ret;
+#endif
+}
+
+static inline int
+mythread_cond_timedwait(mythread_cond *cond, mythread_mutex *mutex,
+ const mythread_condtime *condtime)
+{
+#ifdef MYTHREAD_WIN95
+ LeaveCriticalSection(mutex);
+#endif
+
+ DWORD elapsed = GetTickCount() - condtime->start;
+ DWORD timeout = elapsed >= condtime->timeout
+ ? 0 : condtime->timeout - elapsed;
+
+#ifdef MYTHREAD_WIN95
+ DWORD ret = WaitForSingleObject(*cond, timeout);
+ assert(ret == WAIT_OBJECT_0 || ret == WAIT_TIMEOUT);
+
+ EnterCriticalSection(mutex);
+
+ return ret == WAIT_TIMEOUT;
+#else
+ BOOL ret = SleepConditionVariableCS(cond, mutex, timeout);
+ assert(ret || GetLastError() == ERROR_TIMEOUT);
+ return !ret;
+#endif
+}
+
+static inline void
+mythread_condtime_set(mythread_condtime *condtime, const mythread_cond *cond,
+ uint32_t timeout)
+{
+ (void)cond;
+ condtime->start = GetTickCount();
+ condtime->timeout = timeout;
+}
+
+#endif
+
+#endif
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h
new file mode 100644
index 0000000..f04e45d
--- /dev/null
+++ b/src/common/sysdefs.h
@@ -0,0 +1,197 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file sysdefs.h
+/// \brief Common includes, definitions, system-specific things etc.
+///
+/// This file is used also by the lzma command line tool, that's why this
+/// file is separate from common.h.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SYSDEFS_H
+#define LZMA_SYSDEFS_H
+
+//////////////
+// Includes //
+//////////////
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+// This #define ensures that C99 and POSIX compliant stdio functions are
+// available with MinGW-w64 (both 32-bit and 64-bit). Modern MinGW-w64 adds
+// this automatically, for example, when the compiler is in C99 (or later)
+// mode when building against msvcrt.dll. It still doesn't hurt to be explicit
+// that we always want this and #define this unconditionally.
+//
+// With Universal CRT (UCRT) this is less important because UCRT contains
+// C99-compatible stdio functions. It's still nice to #define this as UCRT
+// doesn't support the POSIX thousand separator flag in printf (like "%'u").
+#ifdef __MINGW32__
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+
+// size_t and NULL
+#include <stddef.h>
+
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+// C99 says that inttypes.h always includes stdint.h, but some systems
+// don't do that, and require including stdint.h separately.
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+// Some pre-C99 systems have SIZE_MAX in limits.h instead of stdint.h. The
+// limits are also used to figure out some macros missing from pre-C99 systems.
+#include <limits.h>
+
+// Be more compatible with systems that have non-conforming inttypes.h.
+// We assume that int is 32-bit and that long is either 32-bit or 64-bit.
+// Full Autoconf test could be more correct, but this should work well enough.
+// Note that this duplicates some code from lzma.h, but this is better since
+// we can work without inttypes.h thanks to Autoconf tests.
+#ifndef UINT32_C
+# if UINT_MAX != 4294967295U
+# error UINT32_C is not defined and unsigned int is not 32-bit.
+# endif
+# define UINT32_C(n) n ## U
+#endif
+#ifndef UINT32_MAX
+# define UINT32_MAX UINT32_C(4294967295)
+#endif
+#ifndef PRIu32
+# define PRIu32 "u"
+#endif
+#ifndef PRIx32
+# define PRIx32 "x"
+#endif
+#ifndef PRIX32
+# define PRIX32 "X"
+#endif
+
+#if ULONG_MAX == 4294967295UL
+# ifndef UINT64_C
+# define UINT64_C(n) n ## ULL
+# endif
+# ifndef PRIu64
+# define PRIu64 "llu"
+# endif
+# ifndef PRIx64
+# define PRIx64 "llx"
+# endif
+# ifndef PRIX64
+# define PRIX64 "llX"
+# endif
+#else
+# ifndef UINT64_C
+# define UINT64_C(n) n ## UL
+# endif
+# ifndef PRIu64
+# define PRIu64 "lu"
+# endif
+# ifndef PRIx64
+# define PRIx64 "lx"
+# endif
+# ifndef PRIX64
+# define PRIX64 "lX"
+# endif
+#endif
+#ifndef UINT64_MAX
+# define UINT64_MAX UINT64_C(18446744073709551615)
+#endif
+
+// Incorrect(?) SIZE_MAX:
+// - Interix headers typedef size_t to unsigned long,
+// but a few lines later define SIZE_MAX to INT32_MAX.
+// - SCO OpenServer (x86) headers typedef size_t to unsigned int
+// but define SIZE_MAX to INT32_MAX.
+#if defined(__INTERIX) || defined(_SCO_DS)
+# undef SIZE_MAX
+#endif
+
+// The code currently assumes that size_t is either 32-bit or 64-bit.
+#ifndef SIZE_MAX
+# if SIZEOF_SIZE_T == 4
+# define SIZE_MAX UINT32_MAX
+# elif SIZEOF_SIZE_T == 8
+# define SIZE_MAX UINT64_MAX
+# else
+# error size_t is not 32-bit or 64-bit
+# endif
+#endif
+#if SIZE_MAX != UINT32_MAX && SIZE_MAX != UINT64_MAX
+# error size_t is not 32-bit or 64-bit
+#endif
+
+#include <stdlib.h>
+#include <assert.h>
+
+// Pre-C99 systems lack stdbool.h. All the code in XZ Utils must be written
+// so that it works with fake bool type, for example:
+//
+// bool foo = (flags & 0x100) != 0;
+// bool bar = !!(flags & 0x100);
+//
+// This works with the real C99 bool but breaks with fake bool:
+//
+// bool baz = (flags & 0x100);
+//
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+# if ! HAVE__BOOL
+typedef unsigned char _Bool;
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+#endif
+
+#include <string.h>
+
+// As of MSVC 2013, inline and restrict are supported with
+// non-standard keywords.
+#if defined(_WIN32) && defined(_MSC_VER)
+# ifndef inline
+# define inline __inline
+# endif
+# ifndef restrict
+# define restrict __restrict
+# endif
+#endif
+
+////////////
+// Macros //
+////////////
+
+#undef memzero
+#define memzero(s, n) memset(s, 0, n)
+
+// NOTE: Avoid using MIN() and MAX(), because even conditionally defining
+// those macros can cause some portability trouble, since on some systems
+// the system headers insist defining their own versions.
+#define my_min(x, y) ((x) < (y) ? (x) : (y))
+#define my_max(x, y) ((x) > (y) ? (x) : (y))
+
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+#endif
+
+#if defined(__GNUC__) \
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4)
+# define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x)))
+#else
+# define lzma_attr_alloc_size(x)
+#endif
+
+#endif
diff --git a/src/common/tuklib_common.h b/src/common/tuklib_common.h
new file mode 100644
index 0000000..b1f531e
--- /dev/null
+++ b/src/common/tuklib_common.h
@@ -0,0 +1,71 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_common.h
+/// \brief Common definitions for tuklib modules
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_COMMON_H
+#define TUKLIB_COMMON_H
+
+// The config file may be replaced by a package-specific file.
+// It should include at least stddef.h, stdbool.h, inttypes.h, and limits.h.
+#include "tuklib_config.h"
+
+// TUKLIB_SYMBOL_PREFIX is prefixed to all symbols exported by
+// the tuklib modules. If you use a tuklib module in a library,
+// you should use TUKLIB_SYMBOL_PREFIX to make sure that there
+// are no symbol conflicts in case someone links your library
+// into application that also uses the same tuklib module.
+#ifndef TUKLIB_SYMBOL_PREFIX
+# define TUKLIB_SYMBOL_PREFIX
+#endif
+
+#define TUKLIB_CAT_X(a, b) a ## b
+#define TUKLIB_CAT(a, b) TUKLIB_CAT_X(a, b)
+
+#ifndef TUKLIB_SYMBOL
+# define TUKLIB_SYMBOL(sym) TUKLIB_CAT(TUKLIB_SYMBOL_PREFIX, sym)
+#endif
+
+#ifndef TUKLIB_DECLS_BEGIN
+# ifdef __cplusplus
+# define TUKLIB_DECLS_BEGIN extern "C" {
+# else
+# define TUKLIB_DECLS_BEGIN
+# endif
+#endif
+
+#ifndef TUKLIB_DECLS_END
+# ifdef __cplusplus
+# define TUKLIB_DECLS_END }
+# else
+# define TUKLIB_DECLS_END
+# endif
+#endif
+
+#if defined(__GNUC__) && defined(__GNUC_MINOR__)
+# define TUKLIB_GNUC_REQ(major, minor) \
+ ((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \
+ || __GNUC__ > (major))
+#else
+# define TUKLIB_GNUC_REQ(major, minor) 0
+#endif
+
+#if TUKLIB_GNUC_REQ(2, 5)
+# define tuklib_attr_noreturn __attribute__((__noreturn__))
+#else
+# define tuklib_attr_noreturn
+#endif
+
+#if (defined(_WIN32) && !defined(__CYGWIN__)) \
+ || defined(__OS2__) || defined(__MSDOS__)
+# define TUKLIB_DOSLIKE 1
+#endif
+
+#endif
diff --git a/src/common/tuklib_config.h b/src/common/tuklib_config.h
new file mode 100644
index 0000000..9d470ba
--- /dev/null
+++ b/src/common/tuklib_config.h
@@ -0,0 +1,10 @@
+// If config.h isn't available, assume that the headers required by
+// tuklib_common.h are available. This is required by crc32_tablegen.c.
+#ifdef HAVE_CONFIG_H
+# include "sysdefs.h"
+#else
+# include <stddef.h>
+# include <stdbool.h>
+# include <inttypes.h>
+# include <limits.h>
+#endif
diff --git a/src/common/tuklib_cpucores.c b/src/common/tuklib_cpucores.c
new file mode 100644
index 0000000..bb3f2f7
--- /dev/null
+++ b/src/common/tuklib_cpucores.c
@@ -0,0 +1,109 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_cpucores.c
+/// \brief Get the number of CPU cores online
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_cpucores.h"
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+# ifndef _WIN32_WINNT
+# define _WIN32_WINNT 0x0500
+# endif
+# include <windows.h>
+
+// glibc >= 2.9
+#elif defined(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
+# include <sched.h>
+
+// FreeBSD
+#elif defined(TUKLIB_CPUCORES_CPUSET)
+# include <sys/param.h>
+# include <sys/cpuset.h>
+
+#elif defined(TUKLIB_CPUCORES_SYSCTL)
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# endif
+# include <sys/sysctl.h>
+
+#elif defined(TUKLIB_CPUCORES_SYSCONF)
+# include <unistd.h>
+
+// HP-UX
+#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+# include <sys/param.h>
+# include <sys/pstat.h>
+#endif
+
+
+extern uint32_t
+tuklib_cpucores(void)
+{
+ uint32_t ret = 0;
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+ SYSTEM_INFO sysinfo;
+ GetSystemInfo(&sysinfo);
+ ret = sysinfo.dwNumberOfProcessors;
+
+#elif defined(TUKLIB_CPUCORES_SCHED_GETAFFINITY)
+ cpu_set_t cpu_mask;
+ if (sched_getaffinity(0, sizeof(cpu_mask), &cpu_mask) == 0)
+ ret = (uint32_t)CPU_COUNT(&cpu_mask);
+
+#elif defined(TUKLIB_CPUCORES_CPUSET)
+ cpuset_t set;
+ if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1,
+ sizeof(set), &set) == 0) {
+# ifdef CPU_COUNT
+ ret = (uint32_t)CPU_COUNT(&set);
+# else
+ for (unsigned i = 0; i < CPU_SETSIZE; ++i)
+ if (CPU_ISSET(i, &set))
+ ++ret;
+# endif
+ }
+
+#elif defined(TUKLIB_CPUCORES_SYSCTL)
+ // On OpenBSD HW_NCPUONLINE tells the number of processor cores that
+ // are online so it is preferred over HW_NCPU which also counts cores
+ // that aren't currently available. The number of cores online is
+ // often less than HW_NCPU because OpenBSD disables simultaneous
+ // multi-threading (SMT) by default.
+# ifdef HW_NCPUONLINE
+ int name[2] = { CTL_HW, HW_NCPUONLINE };
+# else
+ int name[2] = { CTL_HW, HW_NCPU };
+# endif
+ int cpus;
+ size_t cpus_size = sizeof(cpus);
+ if (sysctl(name, 2, &cpus, &cpus_size, NULL, 0) != -1
+ && cpus_size == sizeof(cpus) && cpus > 0)
+ ret = (uint32_t)cpus;
+
+#elif defined(TUKLIB_CPUCORES_SYSCONF)
+# ifdef _SC_NPROCESSORS_ONLN
+ // Most systems
+ const long cpus = sysconf(_SC_NPROCESSORS_ONLN);
+# else
+ // IRIX
+ const long cpus = sysconf(_SC_NPROC_ONLN);
+# endif
+ if (cpus > 0)
+ ret = (uint32_t)cpus;
+
+#elif defined(TUKLIB_CPUCORES_PSTAT_GETDYNAMIC)
+ struct pst_dynamic pst;
+ if (pstat_getdynamic(&pst, sizeof(pst), 1, 0) != -1)
+ ret = (uint32_t)pst.psd_proc_cnt;
+#endif
+
+ return ret;
+}
diff --git a/src/common/tuklib_cpucores.h b/src/common/tuklib_cpucores.h
new file mode 100644
index 0000000..be1ce1c
--- /dev/null
+++ b/src/common/tuklib_cpucores.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_cpucores.h
+/// \brief Get the number of CPU cores online
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_CPUCORES_H
+#define TUKLIB_CPUCORES_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_cpucores TUKLIB_SYMBOL(tuklib_cpucores)
+extern uint32_t tuklib_cpucores(void);
+
+TUKLIB_DECLS_END
+#endif
diff --git a/src/common/tuklib_exit.c b/src/common/tuklib_exit.c
new file mode 100644
index 0000000..aa55620
--- /dev/null
+++ b/src/common/tuklib_exit.c
@@ -0,0 +1,58 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_exit.c
+/// \brief Close stdout and stderr, and exit
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_common.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "tuklib_gettext.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
+
+
+extern void
+tuklib_exit(int status, int err_status, int show_error)
+{
+ if (status != err_status) {
+ // Close stdout. If something goes wrong,
+ // print an error message to stderr.
+ const int ferror_err = ferror(stdout);
+ const int fclose_err = fclose(stdout);
+ if (ferror_err || fclose_err) {
+ status = err_status;
+
+ // If it was fclose() that failed, we have the reason
+ // in errno. If only ferror() indicated an error,
+ // we have no idea what the reason was.
+ if (show_error)
+ fprintf(stderr, "%s: %s: %s\n", progname,
+ _("Writing to standard "
+ "output failed"),
+ fclose_err ? strerror(errno)
+ : _("Unknown error"));
+ }
+ }
+
+ if (status != err_status) {
+ // Close stderr. If something goes wrong, there's
+ // nothing where we could print an error message.
+ // Just set the exit status.
+ const int ferror_err = ferror(stderr);
+ const int fclose_err = fclose(stderr);
+ if (fclose_err || ferror_err)
+ status = err_status;
+ }
+
+ exit(status);
+}
diff --git a/src/common/tuklib_exit.h b/src/common/tuklib_exit.h
new file mode 100644
index 0000000..b11776f
--- /dev/null
+++ b/src/common/tuklib_exit.h
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_exit.h
+/// \brief Close stdout and stderr, and exit
+/// \note Requires tuklib_progname and tuklib_gettext modules
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_EXIT_H
+#define TUKLIB_EXIT_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_exit TUKLIB_SYMBOL(tuklib_exit)
+extern void tuklib_exit(int status, int err_status, int show_error)
+ tuklib_attr_noreturn;
+
+TUKLIB_DECLS_END
+#endif
diff --git a/src/common/tuklib_gettext.h b/src/common/tuklib_gettext.h
new file mode 100644
index 0000000..ff18904
--- /dev/null
+++ b/src/common/tuklib_gettext.h
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_gettext.h
+/// \brief Wrapper for gettext and friends
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_GETTEXT_H
+#define TUKLIB_GETTEXT_H
+
+#include "tuklib_common.h"
+#include <locale.h>
+
+#ifndef TUKLIB_GETTEXT
+# ifdef ENABLE_NLS
+# define TUKLIB_GETTEXT 1
+# else
+# define TUKLIB_GETTEXT 0
+# endif
+#endif
+
+#if TUKLIB_GETTEXT
+# include <libintl.h>
+# define tuklib_gettext_init(package, localedir) \
+ do { \
+ setlocale(LC_ALL, ""); \
+ bindtextdomain(package, localedir); \
+ textdomain(package); \
+ } while (0)
+# define _(msgid) gettext(msgid)
+#else
+# define tuklib_gettext_init(package, localedir) \
+ setlocale(LC_ALL, "")
+# define _(msgid) (msgid)
+# define ngettext(msgid1, msgid2, n) ((n) == 1 ? (msgid1) : (msgid2))
+#endif
+#define N_(msgid) msgid
+
+#endif
diff --git a/src/common/tuklib_integer.h b/src/common/tuklib_integer.h
new file mode 100644
index 0000000..e22aa8a
--- /dev/null
+++ b/src/common/tuklib_integer.h
@@ -0,0 +1,946 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_integer.h
+/// \brief Various integer and bit operations
+///
+/// This file provides macros or functions to do some basic integer and bit
+/// operations.
+///
+/// Native endian inline functions (XX = 16, 32, or 64):
+/// - Unaligned native endian reads: readXXne(ptr)
+/// - Unaligned native endian writes: writeXXne(ptr, num)
+/// - Aligned native endian reads: aligned_readXXne(ptr)
+/// - Aligned native endian writes: aligned_writeXXne(ptr, num)
+///
+/// Endianness-converting integer operations (these can be macros!)
+/// (XX = 16, 32, or 64; Y = b or l):
+/// - Byte swapping: bswapXX(num)
+/// - Byte order conversions to/from native (byteswaps if Y isn't
+/// the native endianness): convXXYe(num)
+/// - Unaligned reads: readXXYe(ptr)
+/// - Unaligned writes: writeXXYe(ptr, num)
+/// - Aligned reads: aligned_readXXYe(ptr)
+/// - Aligned writes: aligned_writeXXYe(ptr, num)
+///
+/// Since the above can macros, the arguments should have no side effects
+/// because they may be evaluated more than once.
+///
+/// Bit scan operations for non-zero 32-bit integers (inline functions):
+/// - Bit scan reverse (find highest non-zero bit): bsr32(num)
+/// - Count leading zeros: clz32(num)
+/// - Count trailing zeros: ctz32(num)
+/// - Bit scan forward (simply an alias for ctz32()): bsf32(num)
+///
+/// The above bit scan operations return 0-31. If num is zero,
+/// the result is undefined.
+//
+// Authors: Lasse Collin
+// Joachim Henke
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_INTEGER_H
+#define TUKLIB_INTEGER_H
+
+#include "tuklib_common.h"
+#include <string.h>
+
+// Newer Intel C compilers require immintrin.h for _bit_scan_reverse()
+// and such functions.
+#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
+# include <immintrin.h>
+// Only include <intrin.h> when it is needed. GCC and Clang can both
+// use __builtin's, so we only need Windows instrincs when using MSVC.
+// GCC and Clang can set _MSC_VER on Windows, so we need to exclude these
+// cases explicitly.
+#elif defined(_MSC_VER) && !TUKLIB_GNUC_REQ(3, 4) && !defined(__clang__)
+# include <intrin.h>
+#endif
+
+
+///////////////////
+// Byte swapping //
+///////////////////
+
+#if defined(HAVE___BUILTIN_BSWAPXX)
+ // GCC >= 4.8 and Clang
+# define bswap16(n) __builtin_bswap16(n)
+# define bswap32(n) __builtin_bswap32(n)
+# define bswap64(n) __builtin_bswap64(n)
+
+#elif defined(HAVE_BYTESWAP_H)
+ // glibc, uClibc, dietlibc
+# include <byteswap.h>
+# ifdef HAVE_BSWAP_16
+# define bswap16(num) bswap_16(num)
+# endif
+# ifdef HAVE_BSWAP_32
+# define bswap32(num) bswap_32(num)
+# endif
+# ifdef HAVE_BSWAP_64
+# define bswap64(num) bswap_64(num)
+# endif
+
+#elif defined(HAVE_SYS_ENDIAN_H)
+ // *BSDs and Darwin
+# include <sys/endian.h>
+
+#elif defined(HAVE_SYS_BYTEORDER_H)
+ // Solaris
+# include <sys/byteorder.h>
+# ifdef BSWAP_16
+# define bswap16(num) BSWAP_16(num)
+# endif
+# ifdef BSWAP_32
+# define bswap32(num) BSWAP_32(num)
+# endif
+# ifdef BSWAP_64
+# define bswap64(num) BSWAP_64(num)
+# endif
+# ifdef BE_16
+# define conv16be(num) BE_16(num)
+# endif
+# ifdef BE_32
+# define conv32be(num) BE_32(num)
+# endif
+# ifdef BE_64
+# define conv64be(num) BE_64(num)
+# endif
+# ifdef LE_16
+# define conv16le(num) LE_16(num)
+# endif
+# ifdef LE_32
+# define conv32le(num) LE_32(num)
+# endif
+# ifdef LE_64
+# define conv64le(num) LE_64(num)
+# endif
+#endif
+
+#ifndef bswap16
+# define bswap16(n) (uint16_t)( \
+ (((n) & 0x00FFU) << 8) \
+ | (((n) & 0xFF00U) >> 8) \
+ )
+#endif
+
+#ifndef bswap32
+# define bswap32(n) (uint32_t)( \
+ (((n) & UINT32_C(0x000000FF)) << 24) \
+ | (((n) & UINT32_C(0x0000FF00)) << 8) \
+ | (((n) & UINT32_C(0x00FF0000)) >> 8) \
+ | (((n) & UINT32_C(0xFF000000)) >> 24) \
+ )
+#endif
+
+#ifndef bswap64
+# define bswap64(n) (uint64_t)( \
+ (((n) & UINT64_C(0x00000000000000FF)) << 56) \
+ | (((n) & UINT64_C(0x000000000000FF00)) << 40) \
+ | (((n) & UINT64_C(0x0000000000FF0000)) << 24) \
+ | (((n) & UINT64_C(0x00000000FF000000)) << 8) \
+ | (((n) & UINT64_C(0x000000FF00000000)) >> 8) \
+ | (((n) & UINT64_C(0x0000FF0000000000)) >> 24) \
+ | (((n) & UINT64_C(0x00FF000000000000)) >> 40) \
+ | (((n) & UINT64_C(0xFF00000000000000)) >> 56) \
+ )
+#endif
+
+// Define conversion macros using the basic byte swapping macros.
+#ifdef WORDS_BIGENDIAN
+# ifndef conv16be
+# define conv16be(num) ((uint16_t)(num))
+# endif
+# ifndef conv32be
+# define conv32be(num) ((uint32_t)(num))
+# endif
+# ifndef conv64be
+# define conv64be(num) ((uint64_t)(num))
+# endif
+# ifndef conv16le
+# define conv16le(num) bswap16(num)
+# endif
+# ifndef conv32le
+# define conv32le(num) bswap32(num)
+# endif
+# ifndef conv64le
+# define conv64le(num) bswap64(num)
+# endif
+#else
+# ifndef conv16be
+# define conv16be(num) bswap16(num)
+# endif
+# ifndef conv32be
+# define conv32be(num) bswap32(num)
+# endif
+# ifndef conv64be
+# define conv64be(num) bswap64(num)
+# endif
+# ifndef conv16le
+# define conv16le(num) ((uint16_t)(num))
+# endif
+# ifndef conv32le
+# define conv32le(num) ((uint32_t)(num))
+# endif
+# ifndef conv64le
+# define conv64le(num) ((uint64_t)(num))
+# endif
+#endif
+
+
+////////////////////////////////
+// Unaligned reads and writes //
+////////////////////////////////
+
+// No-strict-align archs like x86-64
+// ---------------------------------
+//
+// The traditional way of casting e.g. *(const uint16_t *)uint8_pointer
+// is bad even if the uint8_pointer is properly aligned because this kind
+// of casts break strict aliasing rules and result in undefined behavior.
+// With unaligned pointers it's even worse: compilers may emit vector
+// instructions that require aligned pointers even if non-vector
+// instructions work with unaligned pointers.
+//
+// Using memcpy() is the standard compliant way to do unaligned access.
+// Many modern compilers inline it so there is no function call overhead.
+// For those compilers that don't handle the memcpy() method well, the
+// old casting method (that violates strict aliasing) can be requested at
+// build time. A third method, casting to a packed struct, would also be
+// an option but isn't provided to keep things simpler (it's already a mess).
+// Hopefully this is flexible enough in practice.
+//
+// Some compilers on x86-64 like Clang >= 10 and GCC >= 5.1 detect that
+//
+// buf[0] | (buf[1] << 8)
+//
+// reads a 16-bit value and can emit a single 16-bit load and produce
+// identical code than with the memcpy() method. In other cases Clang and GCC
+// produce either the same or better code with memcpy(). For example, Clang 9
+// on x86-64 can detect 32-bit load but not 16-bit load.
+//
+// MSVC uses unaligned access with the memcpy() method but emits byte-by-byte
+// code for "buf[0] | (buf[1] << 8)".
+//
+// Conclusion: The memcpy() method is the best choice when unaligned access
+// is supported.
+//
+// Strict-align archs like SPARC
+// -----------------------------
+//
+// GCC versions from around 4.x to to at least 13.2.0 produce worse code
+// from the memcpy() method than from simple byte-by-byte shift-or code
+// when reading a 32-bit integer:
+//
+// (1) It may be constructed on stack using using four 8-bit loads,
+// four 8-bit stores to stack, and finally one 32-bit load from stack.
+//
+// (2) Especially with -Os, an actual memcpy() call may be emitted.
+//
+// This is true on at least on ARM, ARM64, SPARC, SPARC64, MIPS64EL, and
+// RISC-V. Of these, ARM, ARM64, and RISC-V support unaligned access in
+// some processors but not all so this is relevant only in the case when
+// GCC assumes that unaligned is not supported or -mstrict-align or
+// -mno-unaligned-access is used.
+//
+// For Clang it makes little difference. ARM64 with -O2 -mstrict-align
+// was one the very few with a minor difference: the memcpy() version
+// was one instruction longer.
+//
+// Conclusion: At least in case of GCC and Clang, byte-by-byte code is
+// the best choise for strict-align archs to do unaligned access.
+//
+// See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111502
+//
+// Thanks to <https://godbolt.org/> it was easy to test different compilers.
+// The following is for little endian targets:
+/*
+#include <stdint.h>
+#include <string.h>
+
+uint32_t bytes16(const uint8_t *b)
+{
+ return (uint32_t)b[0]
+ | ((uint32_t)b[1] << 8);
+}
+
+uint32_t copy16(const uint8_t *b)
+{
+ uint16_t v;
+ memcpy(&v, b, sizeof(v));
+ return v;
+}
+
+uint32_t bytes32(const uint8_t *b)
+{
+ return (uint32_t)b[0]
+ | ((uint32_t)b[1] << 8)
+ | ((uint32_t)b[2] << 16)
+ | ((uint32_t)b[3] << 24);
+}
+
+uint32_t copy32(const uint8_t *b)
+{
+ uint32_t v;
+ memcpy(&v, b, sizeof(v));
+ return v;
+}
+
+void wbytes16(uint8_t *b, uint16_t v)
+{
+ b[0] = (uint8_t)v;
+ b[1] = (uint8_t)(v >> 8);
+}
+
+void wcopy16(uint8_t *b, uint16_t v)
+{
+ memcpy(b, &v, sizeof(v));
+}
+
+void wbytes32(uint8_t *b, uint32_t v)
+{
+ b[0] = (uint8_t)v;
+ b[1] = (uint8_t)(v >> 8);
+ b[2] = (uint8_t)(v >> 16);
+ b[3] = (uint8_t)(v >> 24);
+}
+
+void wcopy32(uint8_t *b, uint32_t v)
+{
+ memcpy(b, &v, sizeof(v));
+}
+*/
+
+
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
+
+static inline uint16_t
+read16ne(const uint8_t *buf)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ return *(const uint16_t *)buf;
+#else
+ uint16_t num;
+ memcpy(&num, buf, sizeof(num));
+ return num;
+#endif
+}
+
+
+static inline uint32_t
+read32ne(const uint8_t *buf)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ return *(const uint32_t *)buf;
+#else
+ uint32_t num;
+ memcpy(&num, buf, sizeof(num));
+ return num;
+#endif
+}
+
+
+static inline uint64_t
+read64ne(const uint8_t *buf)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ return *(const uint64_t *)buf;
+#else
+ uint64_t num;
+ memcpy(&num, buf, sizeof(num));
+ return num;
+#endif
+}
+
+
+static inline void
+write16ne(uint8_t *buf, uint16_t num)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ *(uint16_t *)buf = num;
+#else
+ memcpy(buf, &num, sizeof(num));
+#endif
+ return;
+}
+
+
+static inline void
+write32ne(uint8_t *buf, uint32_t num)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ *(uint32_t *)buf = num;
+#else
+ memcpy(buf, &num, sizeof(num));
+#endif
+ return;
+}
+
+
+static inline void
+write64ne(uint8_t *buf, uint64_t num)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ *(uint64_t *)buf = num;
+#else
+ memcpy(buf, &num, sizeof(num));
+#endif
+ return;
+}
+
+
+static inline uint16_t
+read16be(const uint8_t *buf)
+{
+ uint16_t num = read16ne(buf);
+ return conv16be(num);
+}
+
+
+static inline uint16_t
+read16le(const uint8_t *buf)
+{
+ uint16_t num = read16ne(buf);
+ return conv16le(num);
+}
+
+
+static inline uint32_t
+read32be(const uint8_t *buf)
+{
+ uint32_t num = read32ne(buf);
+ return conv32be(num);
+}
+
+
+static inline uint32_t
+read32le(const uint8_t *buf)
+{
+ uint32_t num = read32ne(buf);
+ return conv32le(num);
+}
+
+
+static inline uint64_t
+read64be(const uint8_t *buf)
+{
+ uint64_t num = read64ne(buf);
+ return conv64be(num);
+}
+
+
+static inline uint64_t
+read64le(const uint8_t *buf)
+{
+ uint64_t num = read64ne(buf);
+ return conv64le(num);
+}
+
+
+// NOTE: Possible byte swapping must be done in a macro to allow the compiler
+// to optimize byte swapping of constants when using glibc's or *BSD's
+// byte swapping macros. The actual write is done in an inline function
+// to make type checking of the buf pointer possible.
+#define write16be(buf, num) write16ne(buf, conv16be(num))
+#define write32be(buf, num) write32ne(buf, conv32be(num))
+#define write64be(buf, num) write64ne(buf, conv64be(num))
+#define write16le(buf, num) write16ne(buf, conv16le(num))
+#define write32le(buf, num) write32ne(buf, conv32le(num))
+#define write64le(buf, num) write64ne(buf, conv64le(num))
+
+#else
+
+#ifdef WORDS_BIGENDIAN
+# define read16ne read16be
+# define read32ne read32be
+# define read64ne read64be
+# define write16ne write16be
+# define write32ne write32be
+# define write64ne write64be
+#else
+# define read16ne read16le
+# define read32ne read32le
+# define read64ne read64le
+# define write16ne write16le
+# define write32ne write32le
+# define write64ne write64le
+#endif
+
+
+static inline uint16_t
+read16be(const uint8_t *buf)
+{
+ uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
+ return num;
+}
+
+
+static inline uint16_t
+read16le(const uint8_t *buf)
+{
+ uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
+ return num;
+}
+
+
+static inline uint32_t
+read32be(const uint8_t *buf)
+{
+ uint32_t num = (uint32_t)buf[0] << 24;
+ num |= (uint32_t)buf[1] << 16;
+ num |= (uint32_t)buf[2] << 8;
+ num |= (uint32_t)buf[3];
+ return num;
+}
+
+
+static inline uint32_t
+read32le(const uint8_t *buf)
+{
+ uint32_t num = (uint32_t)buf[0];
+ num |= (uint32_t)buf[1] << 8;
+ num |= (uint32_t)buf[2] << 16;
+ num |= (uint32_t)buf[3] << 24;
+ return num;
+}
+
+
+static inline uint64_t
+read64be(const uint8_t *buf)
+{
+ uint64_t num = (uint64_t)buf[0] << 56;
+ num |= (uint64_t)buf[1] << 48;
+ num |= (uint64_t)buf[2] << 40;
+ num |= (uint64_t)buf[3] << 32;
+ num |= (uint64_t)buf[4] << 24;
+ num |= (uint64_t)buf[5] << 16;
+ num |= (uint64_t)buf[6] << 8;
+ num |= (uint64_t)buf[7];
+ return num;
+}
+
+
+static inline uint64_t
+read64le(const uint8_t *buf)
+{
+ uint64_t num = (uint64_t)buf[0];
+ num |= (uint64_t)buf[1] << 8;
+ num |= (uint64_t)buf[2] << 16;
+ num |= (uint64_t)buf[3] << 24;
+ num |= (uint64_t)buf[4] << 32;
+ num |= (uint64_t)buf[5] << 40;
+ num |= (uint64_t)buf[6] << 48;
+ num |= (uint64_t)buf[7] << 56;
+ return num;
+}
+
+
+static inline void
+write16be(uint8_t *buf, uint16_t num)
+{
+ buf[0] = (uint8_t)(num >> 8);
+ buf[1] = (uint8_t)num;
+ return;
+}
+
+
+static inline void
+write16le(uint8_t *buf, uint16_t num)
+{
+ buf[0] = (uint8_t)num;
+ buf[1] = (uint8_t)(num >> 8);
+ return;
+}
+
+
+static inline void
+write32be(uint8_t *buf, uint32_t num)
+{
+ buf[0] = (uint8_t)(num >> 24);
+ buf[1] = (uint8_t)(num >> 16);
+ buf[2] = (uint8_t)(num >> 8);
+ buf[3] = (uint8_t)num;
+ return;
+}
+
+
+static inline void
+write32le(uint8_t *buf, uint32_t num)
+{
+ buf[0] = (uint8_t)num;
+ buf[1] = (uint8_t)(num >> 8);
+ buf[2] = (uint8_t)(num >> 16);
+ buf[3] = (uint8_t)(num >> 24);
+ return;
+}
+
+
+static inline void
+write64be(uint8_t *buf, uint64_t num)
+{
+ buf[0] = (uint8_t)(num >> 56);
+ buf[1] = (uint8_t)(num >> 48);
+ buf[2] = (uint8_t)(num >> 40);
+ buf[3] = (uint8_t)(num >> 32);
+ buf[4] = (uint8_t)(num >> 24);
+ buf[5] = (uint8_t)(num >> 16);
+ buf[6] = (uint8_t)(num >> 8);
+ buf[7] = (uint8_t)num;
+ return;
+}
+
+
+static inline void
+write64le(uint8_t *buf, uint64_t num)
+{
+ buf[0] = (uint8_t)num;
+ buf[1] = (uint8_t)(num >> 8);
+ buf[2] = (uint8_t)(num >> 16);
+ buf[3] = (uint8_t)(num >> 24);
+ buf[4] = (uint8_t)(num >> 32);
+ buf[5] = (uint8_t)(num >> 40);
+ buf[6] = (uint8_t)(num >> 48);
+ buf[7] = (uint8_t)(num >> 56);
+ return;
+}
+
+#endif
+
+
+//////////////////////////////
+// Aligned reads and writes //
+//////////////////////////////
+
+// Separate functions for aligned reads and writes are provided since on
+// strict-align archs aligned access is much faster than unaligned access.
+//
+// Just like in the unaligned case, memcpy() is needed to avoid
+// strict aliasing violations. However, on archs that don't support
+// unaligned access the compiler cannot know that the pointers given
+// to memcpy() are aligned which results in slow code. As of C11 there is
+// no standard way to tell the compiler that we know that the address is
+// aligned but some compilers have language extensions to do that. With
+// such language extensions the memcpy() method gives excellent results.
+//
+// What to do on a strict-align system when no known language extentensions
+// are available? Falling back to byte-by-byte access would be safe but ruin
+// optimizations that have been made specifically with aligned access in mind.
+// As a compromise, aligned reads will fall back to non-compliant type punning
+// but aligned writes will be byte-by-byte, that is, fast reads are preferred
+// over fast writes. This obviously isn't great but hopefully it's a working
+// compromise for now.
+//
+// __builtin_assume_aligned is support by GCC >= 4.7 and clang >= 3.6.
+#ifdef HAVE___BUILTIN_ASSUME_ALIGNED
+# define tuklib_memcpy_aligned(dest, src, size) \
+ memcpy(dest, __builtin_assume_aligned(src, size), size)
+#else
+# define tuklib_memcpy_aligned(dest, src, size) \
+ memcpy(dest, src, size)
+# ifndef TUKLIB_FAST_UNALIGNED_ACCESS
+# define TUKLIB_USE_UNSAFE_ALIGNED_READS 1
+# endif
+#endif
+
+
+static inline uint16_t
+aligned_read16ne(const uint8_t *buf)
+{
+#if defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING) \
+ || defined(TUKLIB_USE_UNSAFE_ALIGNED_READS)
+ return *(const uint16_t *)buf;
+#else
+ uint16_t num;
+ tuklib_memcpy_aligned(&num, buf, sizeof(num));
+ return num;
+#endif
+}
+
+
+static inline uint32_t
+aligned_read32ne(const uint8_t *buf)
+{
+#if defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING) \
+ || defined(TUKLIB_USE_UNSAFE_ALIGNED_READS)
+ return *(const uint32_t *)buf;
+#else
+ uint32_t num;
+ tuklib_memcpy_aligned(&num, buf, sizeof(num));
+ return num;
+#endif
+}
+
+
+static inline uint64_t
+aligned_read64ne(const uint8_t *buf)
+{
+#if defined(TUKLIB_USE_UNSAFE_TYPE_PUNNING) \
+ || defined(TUKLIB_USE_UNSAFE_ALIGNED_READS)
+ return *(const uint64_t *)buf;
+#else
+ uint64_t num;
+ tuklib_memcpy_aligned(&num, buf, sizeof(num));
+ return num;
+#endif
+}
+
+
+static inline void
+aligned_write16ne(uint8_t *buf, uint16_t num)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ *(uint16_t *)buf = num;
+#else
+ tuklib_memcpy_aligned(buf, &num, sizeof(num));
+#endif
+ return;
+}
+
+
+static inline void
+aligned_write32ne(uint8_t *buf, uint32_t num)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ *(uint32_t *)buf = num;
+#else
+ tuklib_memcpy_aligned(buf, &num, sizeof(num));
+#endif
+ return;
+}
+
+
+static inline void
+aligned_write64ne(uint8_t *buf, uint64_t num)
+{
+#ifdef TUKLIB_USE_UNSAFE_TYPE_PUNNING
+ *(uint64_t *)buf = num;
+#else
+ tuklib_memcpy_aligned(buf, &num, sizeof(num));
+#endif
+ return;
+}
+
+
+static inline uint16_t
+aligned_read16be(const uint8_t *buf)
+{
+ uint16_t num = aligned_read16ne(buf);
+ return conv16be(num);
+}
+
+
+static inline uint16_t
+aligned_read16le(const uint8_t *buf)
+{
+ uint16_t num = aligned_read16ne(buf);
+ return conv16le(num);
+}
+
+
+static inline uint32_t
+aligned_read32be(const uint8_t *buf)
+{
+ uint32_t num = aligned_read32ne(buf);
+ return conv32be(num);
+}
+
+
+static inline uint32_t
+aligned_read32le(const uint8_t *buf)
+{
+ uint32_t num = aligned_read32ne(buf);
+ return conv32le(num);
+}
+
+
+static inline uint64_t
+aligned_read64be(const uint8_t *buf)
+{
+ uint64_t num = aligned_read64ne(buf);
+ return conv64be(num);
+}
+
+
+static inline uint64_t
+aligned_read64le(const uint8_t *buf)
+{
+ uint64_t num = aligned_read64ne(buf);
+ return conv64le(num);
+}
+
+
+// These need to be macros like in the unaligned case.
+#define aligned_write16be(buf, num) aligned_write16ne((buf), conv16be(num))
+#define aligned_write16le(buf, num) aligned_write16ne((buf), conv16le(num))
+#define aligned_write32be(buf, num) aligned_write32ne((buf), conv32be(num))
+#define aligned_write32le(buf, num) aligned_write32ne((buf), conv32le(num))
+#define aligned_write64be(buf, num) aligned_write64ne((buf), conv64be(num))
+#define aligned_write64le(buf, num) aligned_write64ne((buf), conv64le(num))
+
+
+////////////////////
+// Bit operations //
+////////////////////
+
+static inline uint32_t
+bsr32(uint32_t n)
+{
+ // Check for ICC first, since it tends to define __GNUC__ too.
+#if defined(__INTEL_COMPILER)
+ return _bit_scan_reverse(n);
+
+#elif (TUKLIB_GNUC_REQ(3, 4) || defined(__clang__)) && UINT_MAX == UINT32_MAX
+ // GCC >= 3.4 has __builtin_clz(), which gives good results on
+ // multiple architectures. On x86, __builtin_clz() ^ 31U becomes
+ // either plain BSR (so the XOR gets optimized away) or LZCNT and
+ // XOR (if -march indicates that SSE4a instructions are supported).
+ return (uint32_t)__builtin_clz(n) ^ 31U;
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ uint32_t i;
+ __asm__("bsrl %1, %0" : "=r" (i) : "rm" (n));
+ return i;
+
+#elif defined(_MSC_VER)
+ unsigned long i;
+ _BitScanReverse(&i, n);
+ return i;
+
+#else
+ uint32_t i = 31;
+
+ if ((n & 0xFFFF0000) == 0) {
+ n <<= 16;
+ i = 15;
+ }
+
+ if ((n & 0xFF000000) == 0) {
+ n <<= 8;
+ i -= 8;
+ }
+
+ if ((n & 0xF0000000) == 0) {
+ n <<= 4;
+ i -= 4;
+ }
+
+ if ((n & 0xC0000000) == 0) {
+ n <<= 2;
+ i -= 2;
+ }
+
+ if ((n & 0x80000000) == 0)
+ --i;
+
+ return i;
+#endif
+}
+
+
+static inline uint32_t
+clz32(uint32_t n)
+{
+#if defined(__INTEL_COMPILER)
+ return _bit_scan_reverse(n) ^ 31U;
+
+#elif (TUKLIB_GNUC_REQ(3, 4) || defined(__clang__)) && UINT_MAX == UINT32_MAX
+ return (uint32_t)__builtin_clz(n);
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ uint32_t i;
+ __asm__("bsrl %1, %0\n\t"
+ "xorl $31, %0"
+ : "=r" (i) : "rm" (n));
+ return i;
+
+#elif defined(_MSC_VER)
+ unsigned long i;
+ _BitScanReverse(&i, n);
+ return i ^ 31U;
+
+#else
+ uint32_t i = 0;
+
+ if ((n & 0xFFFF0000) == 0) {
+ n <<= 16;
+ i = 16;
+ }
+
+ if ((n & 0xFF000000) == 0) {
+ n <<= 8;
+ i += 8;
+ }
+
+ if ((n & 0xF0000000) == 0) {
+ n <<= 4;
+ i += 4;
+ }
+
+ if ((n & 0xC0000000) == 0) {
+ n <<= 2;
+ i += 2;
+ }
+
+ if ((n & 0x80000000) == 0)
+ ++i;
+
+ return i;
+#endif
+}
+
+
+static inline uint32_t
+ctz32(uint32_t n)
+{
+#if defined(__INTEL_COMPILER)
+ return _bit_scan_forward(n);
+
+#elif (TUKLIB_GNUC_REQ(3, 4) || defined(__clang__)) && UINT_MAX >= UINT32_MAX
+ return (uint32_t)__builtin_ctz(n);
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+ uint32_t i;
+ __asm__("bsfl %1, %0" : "=r" (i) : "rm" (n));
+ return i;
+
+#elif defined(_MSC_VER)
+ unsigned long i;
+ _BitScanForward(&i, n);
+ return i;
+
+#else
+ uint32_t i = 0;
+
+ if ((n & 0x0000FFFF) == 0) {
+ n >>= 16;
+ i = 16;
+ }
+
+ if ((n & 0x000000FF) == 0) {
+ n >>= 8;
+ i += 8;
+ }
+
+ if ((n & 0x0000000F) == 0) {
+ n >>= 4;
+ i += 4;
+ }
+
+ if ((n & 0x00000003) == 0) {
+ n >>= 2;
+ i += 2;
+ }
+
+ if ((n & 0x00000001) == 0)
+ ++i;
+
+ return i;
+#endif
+}
+
+#define bsf32 ctz32
+
+#endif
diff --git a/src/common/tuklib_mbstr.h b/src/common/tuklib_mbstr.h
new file mode 100644
index 0000000..dde9305
--- /dev/null
+++ b/src/common/tuklib_mbstr.h
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_mbstr.h
+/// \brief Utility functions for handling multibyte strings
+///
+/// If not enough multibyte string support is available in the C library,
+/// these functions keep working with the assumption that all strings
+/// are in a single-byte character set without combining characters, e.g.
+/// US-ASCII or ISO-8859-*.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_MBSTR_H
+#define TUKLIB_MBSTR_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_mbstr_width TUKLIB_SYMBOL(tuklib_mbstr_width)
+extern size_t tuklib_mbstr_width(const char *str, size_t *bytes);
+///<
+/// \brief Get the number of columns needed for the multibyte string
+///
+/// This is somewhat similar to wcswidth() but works on multibyte strings.
+///
+/// \param str String whose width is to be calculated. If the
+/// current locale uses a multibyte character set
+/// that has shift states, the string must begin
+/// and end in the initial shift state.
+/// \param bytes If this is not NULL, *bytes is set to the
+/// value returned by strlen(str) (even if an
+/// error occurs when calculating the width).
+///
+/// \return On success, the number of columns needed to display the
+/// string e.g. in a terminal emulator is returned. On error,
+/// (size_t)-1 is returned. Possible errors include invalid,
+/// partial, or non-printable multibyte character in str, or
+/// that str doesn't end in the initial shift state.
+
+#define tuklib_mbstr_fw TUKLIB_SYMBOL(tuklib_mbstr_fw)
+extern int tuklib_mbstr_fw(const char *str, int columns_min);
+///<
+/// \brief Get the field width for printf() e.g. to align table columns
+///
+/// Printing simple tables to a terminal can be done using the field field
+/// feature in the printf() format string, but it works only with single-byte
+/// character sets. To do the same with multibyte strings, tuklib_mbstr_fw()
+/// can be used to calculate appropriate field width.
+///
+/// The behavior of this function is undefined, if
+/// - str is NULL or not terminated with '\0';
+/// - columns_min <= 0; or
+/// - the calculated field width exceeds INT_MAX.
+///
+/// \return If tuklib_mbstr_width(str, NULL) fails, -1 is returned.
+/// If str needs more columns than columns_min, zero is returned.
+/// Otherwise a positive integer is returned, which can be
+/// used as the field width, e.g. printf("%*s", fw, str).
+
+TUKLIB_DECLS_END
+#endif
diff --git a/src/common/tuklib_mbstr_fw.c b/src/common/tuklib_mbstr_fw.c
new file mode 100644
index 0000000..64c9ad5
--- /dev/null
+++ b/src/common/tuklib_mbstr_fw.c
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_mbstr_fw.c
+/// \brief Get the field width for printf() e.g. to align table columns
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_mbstr.h"
+
+
+extern int
+tuklib_mbstr_fw(const char *str, int columns_min)
+{
+ size_t len;
+ const size_t width = tuklib_mbstr_width(str, &len);
+ if (width == (size_t)-1)
+ return -1;
+
+ if (width > (size_t)columns_min)
+ return 0;
+
+ if (width < (size_t)columns_min)
+ len += (size_t)columns_min - width;
+
+ return (int)len;
+}
diff --git a/src/common/tuklib_mbstr_width.c b/src/common/tuklib_mbstr_width.c
new file mode 100644
index 0000000..69d159e
--- /dev/null
+++ b/src/common/tuklib_mbstr_width.c
@@ -0,0 +1,65 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_mbstr_width.c
+/// \brief Calculate width of a multibyte string
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_mbstr.h"
+#include <string.h>
+
+#if defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH)
+# include <wchar.h>
+#endif
+
+
+extern size_t
+tuklib_mbstr_width(const char *str, size_t *bytes)
+{
+ const size_t len = strlen(str);
+ if (bytes != NULL)
+ *bytes = len;
+
+#if !(defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH))
+ // In single-byte mode, the width of the string is the same
+ // as its length.
+ return len;
+
+#else
+ mbstate_t state;
+ memset(&state, 0, sizeof(state));
+
+ size_t width = 0;
+ size_t i = 0;
+
+ // Convert one multibyte character at a time to wchar_t
+ // and get its width using wcwidth().
+ while (i < len) {
+ wchar_t wc;
+ const size_t ret = mbrtowc(&wc, str + i, len - i, &state);
+ if (ret < 1 || ret > len)
+ return (size_t)-1;
+
+ i += ret;
+
+ const int wc_width = wcwidth(wc);
+ if (wc_width < 0)
+ return (size_t)-1;
+
+ width += (size_t)wc_width;
+ }
+
+ // Require that the string ends in the initial shift state.
+ // This way the caller can be combine the string with other
+ // strings without needing to worry about the shift states.
+ if (!mbsinit(&state))
+ return (size_t)-1;
+
+ return width;
+#endif
+}
diff --git a/src/common/tuklib_open_stdxxx.c b/src/common/tuklib_open_stdxxx.c
new file mode 100644
index 0000000..26702a6
--- /dev/null
+++ b/src/common/tuklib_open_stdxxx.c
@@ -0,0 +1,57 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_open_stdxxx.c
+/// \brief Make sure that file descriptors 0, 1, and 2 are open
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_open_stdxxx.h"
+
+#ifndef TUKLIB_DOSLIKE
+# include <stdlib.h>
+# include <errno.h>
+# include <fcntl.h>
+# include <unistd.h>
+#endif
+
+
+extern void
+tuklib_open_stdxxx(int err_status)
+{
+#ifdef TUKLIB_DOSLIKE
+ // Do nothing, just silence warnings.
+ (void)err_status;
+
+#else
+ for (int i = 0; i <= 2; ++i) {
+ // We use fcntl() to check if the file descriptor is open.
+ if (fcntl(i, F_GETFD) == -1 && errno == EBADF) {
+ // With stdin, we could use /dev/full so that
+ // writing to stdin would fail. However, /dev/full
+ // is Linux specific, and if the program tries to
+ // write to stdin, there's already a problem anyway.
+ const int fd = open("/dev/null", O_NOCTTY
+ | (i == 0 ? O_WRONLY : O_RDONLY));
+
+ if (fd != i) {
+ if (fd != -1)
+ (void)close(fd);
+
+ // Something went wrong. Exit with the
+ // exit status we were given. Don't try
+ // to print an error message, since stderr
+ // may very well be non-existent. This
+ // error should be extremely rare.
+ exit(err_status);
+ }
+ }
+ }
+#endif
+
+ return;
+}
diff --git a/src/common/tuklib_open_stdxxx.h b/src/common/tuklib_open_stdxxx.h
new file mode 100644
index 0000000..b911616
--- /dev/null
+++ b/src/common/tuklib_open_stdxxx.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_open_stdxxx.h
+/// \brief Make sure that file descriptors 0, 1, and 2 are open
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_OPEN_STDXXX_H
+#define TUKLIB_OPEN_STDXXX_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_open_stdxx TUKLIB_SYMBOL(tuklib_open_stdxxx)
+extern void tuklib_open_stdxxx(int err_status);
+
+TUKLIB_DECLS_END
+#endif
diff --git a/src/common/tuklib_physmem.c b/src/common/tuklib_physmem.c
new file mode 100644
index 0000000..69f6fd4
--- /dev/null
+++ b/src/common/tuklib_physmem.c
@@ -0,0 +1,234 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_physmem.c
+/// \brief Get the amount of physical memory
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_physmem.h"
+
+// We want to use Windows-specific code on Cygwin, which also has memory
+// information available via sysconf(), but on Cygwin 1.5 and older it
+// gives wrong results (from our point of view).
+#if defined(_WIN32) || defined(__CYGWIN__)
+# ifndef _WIN32_WINNT
+# define _WIN32_WINNT 0x0500
+# endif
+# include <windows.h>
+
+#elif defined(__OS2__)
+# define INCL_DOSMISC
+# include <os2.h>
+
+#elif defined(__DJGPP__)
+# include <dpmi.h>
+
+#elif defined(__VMS)
+# include <lib$routines.h>
+# include <syidef.h>
+# include <ssdef.h>
+
+#elif defined(AMIGA) || defined(__AROS__)
+# define __USE_INLINE__
+# include <proto/exec.h>
+
+#elif defined(__QNX__)
+# include <sys/syspage.h>
+# include <string.h>
+
+#elif defined(TUKLIB_PHYSMEM_AIX)
+# include <sys/systemcfg.h>
+
+#elif defined(TUKLIB_PHYSMEM_SYSCONF)
+# include <unistd.h>
+
+#elif defined(TUKLIB_PHYSMEM_SYSCTL)
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# endif
+# include <sys/sysctl.h>
+
+// Tru64
+#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
+# include <sys/sysinfo.h>
+# include <machine/hal_sysinfo.h>
+
+// HP-UX
+#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
+# include <sys/param.h>
+# include <sys/pstat.h>
+
+// IRIX
+#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
+# include <invent.h>
+
+// This sysinfo() is Linux-specific.
+#elif defined(TUKLIB_PHYSMEM_SYSINFO)
+# include <sys/sysinfo.h>
+#endif
+
+
+// With GCC >= 8.1 with -Wextra and Clang >= 13 with -Wcast-function-type
+// will warn about the Windows-specific code.
+#if defined(__has_warning)
+# if __has_warning("-Wcast-function-type")
+# define CAN_DISABLE_WCAST_FUNCTION_TYPE 1
+# endif
+#elif TUKLIB_GNUC_REQ(8,1)
+# define CAN_DISABLE_WCAST_FUNCTION_TYPE 1
+#endif
+
+
+extern uint64_t
+tuklib_physmem(void)
+{
+ uint64_t ret = 0;
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+ if ((GetVersion() & 0xFF) >= 5) {
+ // Windows 2000 and later have GlobalMemoryStatusEx() which
+ // supports reporting values greater than 4 GiB. To keep the
+ // code working also on older Windows versions, use
+ // GlobalMemoryStatusEx() conditionally.
+ HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
+ if (kernel32 != NULL) {
+ typedef BOOL (WINAPI *gmse_type)(LPMEMORYSTATUSEX);
+#ifdef CAN_DISABLE_WCAST_FUNCTION_TYPE
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
+ gmse_type gmse = (gmse_type)GetProcAddress(
+ kernel32, "GlobalMemoryStatusEx");
+#ifdef CAN_DISABLE_WCAST_FUNCTION_TYPE
+# pragma GCC diagnostic pop
+#endif
+ if (gmse != NULL) {
+ MEMORYSTATUSEX meminfo;
+ meminfo.dwLength = sizeof(meminfo);
+ if (gmse(&meminfo))
+ ret = meminfo.ullTotalPhys;
+ }
+ }
+ }
+
+ if (ret == 0) {
+ // GlobalMemoryStatus() is supported by Windows 95 and later,
+ // so it is fine to link against it unconditionally. Note that
+ // GlobalMemoryStatus() has no return value.
+ MEMORYSTATUS meminfo;
+ meminfo.dwLength = sizeof(meminfo);
+ GlobalMemoryStatus(&meminfo);
+ ret = meminfo.dwTotalPhys;
+ }
+
+#elif defined(__OS2__)
+ unsigned long mem;
+ if (DosQuerySysInfo(QSV_TOTPHYSMEM, QSV_TOTPHYSMEM,
+ &mem, sizeof(mem)) == 0)
+ ret = mem;
+
+#elif defined(__DJGPP__)
+ __dpmi_free_mem_info meminfo;
+ if (__dpmi_get_free_memory_information(&meminfo) == 0
+ && meminfo.total_number_of_physical_pages
+ != (unsigned long)-1)
+ ret = (uint64_t)meminfo.total_number_of_physical_pages * 4096;
+
+#elif defined(__VMS)
+ int vms_mem;
+ int val = SYI$_MEMSIZE;
+ if (LIB$GETSYI(&val, &vms_mem, 0, 0, 0, 0) == SS$_NORMAL)
+ ret = (uint64_t)vms_mem * 8192;
+
+#elif defined(AMIGA) || defined(__AROS__)
+ ret = AvailMem(MEMF_TOTAL);
+
+#elif defined(__QNX__)
+ const struct asinfo_entry *entries = SYSPAGE_ENTRY(asinfo);
+ size_t count = SYSPAGE_ENTRY_SIZE(asinfo) / sizeof(struct asinfo_entry);
+ const char *strings = SYSPAGE_ENTRY(strings)->data;
+
+ for (size_t i = 0; i < count; ++i)
+ if (strcmp(strings + entries[i].name, "ram") == 0)
+ ret += entries[i].end - entries[i].start + 1;
+
+#elif defined(TUKLIB_PHYSMEM_AIX)
+ ret = _system_configuration.physmem;
+
+#elif defined(TUKLIB_PHYSMEM_SYSCONF)
+ const long pagesize = sysconf(_SC_PAGESIZE);
+ const long pages = sysconf(_SC_PHYS_PAGES);
+ if (pagesize != -1 && pages != -1)
+ // According to docs, pagesize * pages can overflow.
+ // Simple case is 32-bit box with 4 GiB or more RAM,
+ // which may report exactly 4 GiB of RAM, and "long"
+ // being 32-bit will overflow. Casting to uint64_t
+ // hopefully avoids overflows in the near future.
+ ret = (uint64_t)pagesize * (uint64_t)pages;
+
+#elif defined(TUKLIB_PHYSMEM_SYSCTL)
+ int name[2] = {
+ CTL_HW,
+#ifdef HW_PHYSMEM64
+ HW_PHYSMEM64
+#else
+ HW_PHYSMEM
+#endif
+ };
+ union {
+ uint32_t u32;
+ uint64_t u64;
+ } mem;
+ size_t mem_ptr_size = sizeof(mem.u64);
+ if (sysctl(name, 2, &mem.u64, &mem_ptr_size, NULL, 0) != -1) {
+ // IIRC, 64-bit "return value" is possible on some 64-bit
+ // BSD systems even with HW_PHYSMEM (instead of HW_PHYSMEM64),
+ // so support both.
+ if (mem_ptr_size == sizeof(mem.u64))
+ ret = mem.u64;
+ else if (mem_ptr_size == sizeof(mem.u32))
+ ret = mem.u32;
+ }
+
+#elif defined(TUKLIB_PHYSMEM_GETSYSINFO)
+ // Docs are unclear if "start" is needed, but it doesn't hurt
+ // much to have it.
+ int memkb;
+ int start = 0;
+ if (getsysinfo(GSI_PHYSMEM, (caddr_t)&memkb, sizeof(memkb), &start)
+ != -1)
+ ret = (uint64_t)memkb * 1024;
+
+#elif defined(TUKLIB_PHYSMEM_PSTAT_GETSTATIC)
+ struct pst_static pst;
+ if (pstat_getstatic(&pst, sizeof(pst), 1, 0) != -1)
+ ret = (uint64_t)pst.physical_memory * (uint64_t)pst.page_size;
+
+#elif defined(TUKLIB_PHYSMEM_GETINVENT_R)
+ inv_state_t *st = NULL;
+ if (setinvent_r(&st) != -1) {
+ inventory_t *i;
+ while ((i = getinvent_r(st)) != NULL) {
+ if (i->inv_class == INV_MEMORY
+ && i->inv_type == INV_MAIN_MB) {
+ ret = (uint64_t)i->inv_state << 20;
+ break;
+ }
+ }
+
+ endinvent_r(st);
+ }
+
+#elif defined(TUKLIB_PHYSMEM_SYSINFO)
+ struct sysinfo si;
+ if (sysinfo(&si) == 0)
+ ret = (uint64_t)si.totalram * si.mem_unit;
+#endif
+
+ return ret;
+}
diff --git a/src/common/tuklib_physmem.h b/src/common/tuklib_physmem.h
new file mode 100644
index 0000000..09e2a51
--- /dev/null
+++ b/src/common/tuklib_physmem.h
@@ -0,0 +1,28 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_physmem.h
+/// \brief Get the amount of physical memory
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_PHYSMEM_H
+#define TUKLIB_PHYSMEM_H
+
+#include "tuklib_common.h"
+TUKLIB_DECLS_BEGIN
+
+#define tuklib_physmem TUKLIB_SYMBOL(tuklib_physmem)
+extern uint64_t tuklib_physmem(void);
+///<
+/// \brief Get the amount of physical memory in bytes
+///
+/// \return Amount of physical memory in bytes. On error, zero is
+/// returned.
+
+TUKLIB_DECLS_END
+#endif
diff --git a/src/common/tuklib_progname.c b/src/common/tuklib_progname.c
new file mode 100644
index 0000000..e2ef4e5
--- /dev/null
+++ b/src/common/tuklib_progname.c
@@ -0,0 +1,50 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_progname.c
+/// \brief Program name to be displayed in messages
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "tuklib_progname.h"
+#include <string.h>
+
+
+#ifndef HAVE_PROGRAM_INVOCATION_NAME
+char *progname = NULL;
+#endif
+
+
+extern void
+tuklib_progname_init(char **argv)
+{
+#ifdef TUKLIB_DOSLIKE
+ // On these systems, argv[0] always has the full path and .exe
+ // suffix even if the user just types the plain program name.
+ // We modify argv[0] to make it nicer to read.
+
+ // Strip the leading path.
+ char *p = argv[0] + strlen(argv[0]);
+ while (argv[0] < p && p[-1] != '/' && p[-1] != '\\')
+ --p;
+
+ argv[0] = p;
+
+ // Strip the .exe suffix.
+ p = strrchr(p, '.');
+ if (p != NULL)
+ *p = '\0';
+
+ // Make it lowercase.
+ for (p = argv[0]; *p != '\0'; ++p)
+ if (*p >= 'A' && *p <= 'Z')
+ *p = *p - 'A' + 'a';
+#endif
+
+ progname = argv[0];
+ return;
+}
diff --git a/src/common/tuklib_progname.h b/src/common/tuklib_progname.h
new file mode 100644
index 0000000..bb80f25
--- /dev/null
+++ b/src/common/tuklib_progname.h
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuklib_progname.h
+/// \brief Program name to be displayed in messages
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKLIB_PROGNAME_H
+#define TUKLIB_PROGNAME_H
+
+#include "tuklib_common.h"
+#include <errno.h>
+
+TUKLIB_DECLS_BEGIN
+
+#ifdef HAVE_PROGRAM_INVOCATION_NAME
+# define progname program_invocation_name
+#else
+# define progname TUKLIB_SYMBOL(tuklib_progname)
+ extern char *progname;
+#endif
+
+#define tuklib_progname_init TUKLIB_SYMBOL(tuklib_progname_init)
+extern void tuklib_progname_init(char **argv);
+
+TUKLIB_DECLS_END
+#endif
diff --git a/src/liblzma/Makefile.am b/src/liblzma/Makefile.am
new file mode 100644
index 0000000..23d524f
--- /dev/null
+++ b/src/liblzma/Makefile.am
@@ -0,0 +1,130 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+SUBDIRS = api
+
+EXTRA_DIST =
+CLEANFILES =
+doc_DATA =
+
+lib_LTLIBRARIES = liblzma.la
+liblzma_la_SOURCES =
+liblzma_la_CPPFLAGS = \
+ -I$(top_srcdir)/src/liblzma/api \
+ -I$(top_srcdir)/src/liblzma/common \
+ -I$(top_srcdir)/src/liblzma/check \
+ -I$(top_srcdir)/src/liblzma/lz \
+ -I$(top_srcdir)/src/liblzma/rangecoder \
+ -I$(top_srcdir)/src/liblzma/lzma \
+ -I$(top_srcdir)/src/liblzma/delta \
+ -I$(top_srcdir)/src/liblzma/simple \
+ -I$(top_srcdir)/src/common \
+ -DTUKLIB_SYMBOL_PREFIX=lzma_
+liblzma_la_LDFLAGS = -no-undefined -version-info 9:5:4
+
+EXTRA_DIST += liblzma_generic.map liblzma_linux.map validate_map.sh
+if COND_SYMVERS_GENERIC
+liblzma_la_LDFLAGS += \
+ -Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_generic.map
+endif
+if COND_SYMVERS_LINUX
+liblzma_la_LDFLAGS += \
+ -Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_linux.map
+endif
+
+liblzma_la_SOURCES += ../common/tuklib_physmem.c
+
+if COND_THREADS
+liblzma_la_SOURCES += ../common/tuklib_cpucores.c
+endif
+
+include $(srcdir)/common/Makefile.inc
+include $(srcdir)/check/Makefile.inc
+
+if COND_FILTER_LZ
+include $(srcdir)/lz/Makefile.inc
+endif
+
+if COND_FILTER_LZMA1
+include $(srcdir)/lzma/Makefile.inc
+include $(srcdir)/rangecoder/Makefile.inc
+endif
+
+if COND_FILTER_DELTA
+include $(srcdir)/delta/Makefile.inc
+endif
+
+if COND_FILTER_SIMPLE
+include $(srcdir)/simple/Makefile.inc
+endif
+
+
+## Windows-specific stuff
+
+# Windows resource compiler support. libtool knows what to do with .rc
+# files, but Automake (<= 1.11 at least) doesn't know.
+#
+# We want the resource file only in shared liblzma. To avoid linking it into
+# static liblzma, we overwrite the static object file with an object file
+# compiled from empty input. Note that GNU-specific features are OK here,
+# because on Windows we are compiled with the GNU toolchain.
+#
+# The typedef in empty.c will prevent an empty translation unit, which is
+# not allowed by the C standard. It results in a warning with
+# -Wempty-translation-unit with Clang or -pedantic for GCC.
+.rc.lo:
+ $(LIBTOOL) --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) \
+ $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) \
+ -i $< -o $@
+ echo "typedef void empty;" > empty.c
+ $(COMPILE) -c empty.c -o $(*D)/$(*F).o
+
+# Remove ordinals from the generated .def file. People must link by name,
+# not by ordinal, because no one is going to track the ordinal numbers.
+liblzma.def: liblzma.la liblzma.def.in
+ sed 's/ \+@ *[0-9]\+//' liblzma.def.in > liblzma.def
+
+# Creating liblzma.def.in is a side effect of linking the library.
+liblzma.def.in: liblzma.la
+
+if COND_W32
+CLEANFILES += liblzma.def liblzma.def.in empty.c
+liblzma_la_SOURCES += liblzma_w32res.rc
+liblzma_la_LDFLAGS += -Xlinker --output-def -Xlinker liblzma.def.in
+
+## liblzma.def.in is created only when building shared liblzma, so don't
+## try to create liblzma.def when not building shared liblzma.
+if COND_SHARED
+doc_DATA += liblzma.def
+endif
+endif
+
+
+## pkg-config
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = liblzma.pc
+EXTRA_DIST += liblzma.pc.in
+
+pc_verbose = $(pc_verbose_@AM_V@)
+pc_verbose_ = $(pc_verbose_@AM_DEFAULT_V@)
+pc_verbose_0 = @echo " PC " $@;
+
+liblzma.pc: $(srcdir)/liblzma.pc.in
+ $(AM_V_at)rm -f $@
+ $(pc_verbose)sed \
+ -e 's,@prefix[@],$(prefix),g' \
+ -e 's,@exec_prefix[@],$(exec_prefix),g' \
+ -e 's,@libdir[@],$(libdir),g' \
+ -e 's,@includedir[@],$(includedir),g' \
+ -e 's,@PACKAGE_URL[@],$(PACKAGE_URL),g' \
+ -e 's,@PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
+ -e 's,@PTHREAD_CFLAGS[@],$(PTHREAD_CFLAGS),g' \
+ -e 's,@LIBS[@],$(LIBS),g' \
+ < $(srcdir)/liblzma.pc.in > $@ || { rm -f $@; exit 1; }
+
+clean-local:
+ rm -f liblzma.pc
diff --git a/src/liblzma/Makefile.in b/src/liblzma/Makefile.in
new file mode 100644
index 0000000..2689fc4
--- /dev/null
+++ b/src/liblzma/Makefile.in
@@ -0,0 +1,2236 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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_SYMVERS_GENERIC_TRUE@am__append_1 = \
+@COND_SYMVERS_GENERIC_TRUE@ -Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_generic.map
+
+@COND_SYMVERS_LINUX_TRUE@am__append_2 = \
+@COND_SYMVERS_LINUX_TRUE@ -Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma_linux.map
+
+@COND_THREADS_TRUE@am__append_3 = ../common/tuklib_cpucores.c
+@COND_THREADS_TRUE@am__append_4 = \
+@COND_THREADS_TRUE@ common/hardware_cputhreads.c \
+@COND_THREADS_TRUE@ common/outqueue.c \
+@COND_THREADS_TRUE@ common/outqueue.h
+
+@COND_MAIN_ENCODER_TRUE@am__append_5 = \
+@COND_MAIN_ENCODER_TRUE@ common/alone_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/block_buffer_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/block_buffer_encoder.h \
+@COND_MAIN_ENCODER_TRUE@ common/block_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/block_encoder.h \
+@COND_MAIN_ENCODER_TRUE@ common/block_header_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/easy_buffer_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/easy_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/easy_encoder_memusage.c \
+@COND_MAIN_ENCODER_TRUE@ common/filter_buffer_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/filter_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/filter_encoder.h \
+@COND_MAIN_ENCODER_TRUE@ common/filter_flags_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/index_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/index_encoder.h \
+@COND_MAIN_ENCODER_TRUE@ common/stream_buffer_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/stream_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/stream_flags_encoder.c \
+@COND_MAIN_ENCODER_TRUE@ common/vli_encoder.c
+
+@COND_MAIN_ENCODER_TRUE@@COND_THREADS_TRUE@am__append_6 = \
+@COND_MAIN_ENCODER_TRUE@@COND_THREADS_TRUE@ common/stream_encoder_mt.c
+
+@COND_MAIN_ENCODER_TRUE@@COND_MICROLZMA_TRUE@am__append_7 = \
+@COND_MAIN_ENCODER_TRUE@@COND_MICROLZMA_TRUE@ common/microlzma_encoder.c
+
+@COND_MAIN_DECODER_TRUE@am__append_8 = \
+@COND_MAIN_DECODER_TRUE@ common/alone_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/alone_decoder.h \
+@COND_MAIN_DECODER_TRUE@ common/auto_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/block_buffer_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/block_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/block_decoder.h \
+@COND_MAIN_DECODER_TRUE@ common/block_header_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/easy_decoder_memusage.c \
+@COND_MAIN_DECODER_TRUE@ common/file_info.c \
+@COND_MAIN_DECODER_TRUE@ common/filter_buffer_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/filter_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/filter_decoder.h \
+@COND_MAIN_DECODER_TRUE@ common/filter_flags_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/index_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/index_decoder.h \
+@COND_MAIN_DECODER_TRUE@ common/index_hash.c \
+@COND_MAIN_DECODER_TRUE@ common/stream_buffer_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/stream_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/stream_decoder.h \
+@COND_MAIN_DECODER_TRUE@ common/stream_flags_decoder.c \
+@COND_MAIN_DECODER_TRUE@ common/vli_decoder.c
+
+@COND_MAIN_DECODER_TRUE@@COND_THREADS_TRUE@am__append_9 = \
+@COND_MAIN_DECODER_TRUE@@COND_THREADS_TRUE@ common/stream_decoder_mt.c
+
+@COND_MAIN_DECODER_TRUE@@COND_MICROLZMA_TRUE@am__append_10 = \
+@COND_MAIN_DECODER_TRUE@@COND_MICROLZMA_TRUE@ common/microlzma_decoder.c
+
+@COND_LZIP_DECODER_TRUE@@COND_MAIN_DECODER_TRUE@am__append_11 = \
+@COND_LZIP_DECODER_TRUE@@COND_MAIN_DECODER_TRUE@ common/lzip_decoder.c \
+@COND_LZIP_DECODER_TRUE@@COND_MAIN_DECODER_TRUE@ common/lzip_decoder.h
+
+@COND_CHECK_CRC32_TRUE@@COND_SMALL_TRUE@am__append_12 = check/crc32_small.c
+@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@am__append_13 = \
+@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@ check/crc32_table.c \
+@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@ check/crc32_table_le.h \
+@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@ check/crc32_table_be.h
+
+@COND_ASM_X86_TRUE@@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@am__append_14 = check/crc32_x86.S
+@COND_ASM_X86_FALSE@@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@am__append_15 = check/crc32_fast.c
+@COND_CHECK_CRC64_TRUE@@COND_SMALL_TRUE@am__append_16 = check/crc64_small.c
+@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@am__append_17 = \
+@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@ check/crc64_table.c \
+@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@ check/crc64_table_le.h \
+@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@ check/crc64_table_be.h
+
+@COND_ASM_X86_TRUE@@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@am__append_18 = check/crc64_x86.S
+@COND_ASM_X86_FALSE@@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@am__append_19 = check/crc64_fast.c
+@COND_CHECK_SHA256_TRUE@@COND_INTERNAL_SHA256_TRUE@am__append_20 = check/sha256.c
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@am__append_21 = \
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder.c \
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder.h \
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder_hash.h \
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder_hash_table.h \
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_encoder_mf.c
+
+@COND_DECODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@am__append_22 = \
+@COND_DECODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_decoder.c \
+@COND_DECODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ lz/lz_decoder.h
+
+@COND_FILTER_LZMA1_TRUE@am__append_23 = lzma/fastpos_tablegen.c \
+@COND_FILTER_LZMA1_TRUE@ rangecoder/price_tablegen.c
+@COND_FILTER_LZMA1_TRUE@am__append_24 = \
+@COND_FILTER_LZMA1_TRUE@ lzma/lzma_common.h \
+@COND_FILTER_LZMA1_TRUE@ lzma/lzma_encoder_presets.c
+
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@am__append_25 = \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/fastpos.h \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma_encoder.h \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma_encoder.c \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma_encoder_private.h \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma_encoder_optimum_fast.c \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma_encoder_optimum_normal.c
+
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@@COND_SMALL_FALSE@am__append_26 = lzma/fastpos_table.c
+@COND_DECODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@am__append_27 = \
+@COND_DECODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma_decoder.c \
+@COND_DECODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma_decoder.h
+
+@COND_ENCODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@am__append_28 = \
+@COND_ENCODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma2_encoder.c \
+@COND_ENCODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma2_encoder.h
+
+@COND_DECODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@am__append_29 = \
+@COND_DECODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma2_decoder.c \
+@COND_DECODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@ lzma/lzma2_decoder.h
+
+@COND_FILTER_LZMA1_TRUE@am__append_30 = rangecoder/range_common.h
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@am__append_31 = \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ rangecoder/range_encoder.h \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ rangecoder/price.h \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ rangecoder/price_table.c
+
+@COND_DECODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@am__append_32 = rangecoder/range_decoder.h
+@COND_FILTER_DELTA_TRUE@am__append_33 = \
+@COND_FILTER_DELTA_TRUE@ delta/delta_common.c \
+@COND_FILTER_DELTA_TRUE@ delta/delta_common.h \
+@COND_FILTER_DELTA_TRUE@ delta/delta_private.h
+
+@COND_ENCODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@am__append_34 = \
+@COND_ENCODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@ delta/delta_encoder.c \
+@COND_ENCODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@ delta/delta_encoder.h
+
+@COND_DECODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@am__append_35 = \
+@COND_DECODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@ delta/delta_decoder.c \
+@COND_DECODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@ delta/delta_decoder.h
+
+@COND_FILTER_SIMPLE_TRUE@am__append_36 = \
+@COND_FILTER_SIMPLE_TRUE@ simple/simple_coder.c \
+@COND_FILTER_SIMPLE_TRUE@ simple/simple_coder.h \
+@COND_FILTER_SIMPLE_TRUE@ simple/simple_private.h
+
+@COND_ENCODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@am__append_37 = \
+@COND_ENCODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@ simple/simple_encoder.c \
+@COND_ENCODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@ simple/simple_encoder.h
+
+@COND_DECODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@am__append_38 = \
+@COND_DECODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@ simple/simple_decoder.c \
+@COND_DECODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@ simple/simple_decoder.h
+
+@COND_FILTER_SIMPLE_TRUE@@COND_FILTER_X86_TRUE@am__append_39 = simple/x86.c
+@COND_FILTER_POWERPC_TRUE@@COND_FILTER_SIMPLE_TRUE@am__append_40 = simple/powerpc.c
+@COND_FILTER_IA64_TRUE@@COND_FILTER_SIMPLE_TRUE@am__append_41 = simple/ia64.c
+@COND_FILTER_ARM_TRUE@@COND_FILTER_SIMPLE_TRUE@am__append_42 = simple/arm.c
+@COND_FILTER_ARMTHUMB_TRUE@@COND_FILTER_SIMPLE_TRUE@am__append_43 = simple/armthumb.c
+@COND_FILTER_ARM64_TRUE@@COND_FILTER_SIMPLE_TRUE@am__append_44 = simple/arm64.c
+@COND_FILTER_SIMPLE_TRUE@@COND_FILTER_SPARC_TRUE@am__append_45 = simple/sparc.c
+@COND_W32_TRUE@am__append_46 = liblzma.def liblzma.def.in empty.c
+@COND_W32_TRUE@am__append_47 = liblzma_w32res.rc
+@COND_W32_TRUE@am__append_48 = -Xlinker --output-def -Xlinker liblzma.def.in
+@COND_SHARED_TRUE@@COND_W32_TRUE@am__append_49 = liblzma.def
+subdir = src/liblzma
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 =
+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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" \
+ "$(DESTDIR)$(pkgconfigdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+liblzma_la_LIBADD =
+am__liblzma_la_SOURCES_DIST = ../common/tuklib_physmem.c \
+ ../common/tuklib_cpucores.c common/common.c common/common.h \
+ common/memcmplen.h common/block_util.c common/easy_preset.c \
+ common/easy_preset.h common/filter_common.c \
+ common/filter_common.h common/hardware_physmem.c \
+ common/index.c common/index.h common/stream_flags_common.c \
+ common/stream_flags_common.h common/string_conversion.c \
+ common/vli_size.c common/hardware_cputhreads.c \
+ common/outqueue.c common/outqueue.h common/alone_encoder.c \
+ common/block_buffer_encoder.c common/block_buffer_encoder.h \
+ common/block_encoder.c common/block_encoder.h \
+ common/block_header_encoder.c common/easy_buffer_encoder.c \
+ common/easy_encoder.c common/easy_encoder_memusage.c \
+ common/filter_buffer_encoder.c common/filter_encoder.c \
+ common/filter_encoder.h common/filter_flags_encoder.c \
+ common/index_encoder.c common/index_encoder.h \
+ common/stream_buffer_encoder.c common/stream_encoder.c \
+ common/stream_flags_encoder.c common/vli_encoder.c \
+ common/stream_encoder_mt.c common/microlzma_encoder.c \
+ common/alone_decoder.c common/alone_decoder.h \
+ common/auto_decoder.c common/block_buffer_decoder.c \
+ common/block_decoder.c common/block_decoder.h \
+ common/block_header_decoder.c common/easy_decoder_memusage.c \
+ common/file_info.c common/filter_buffer_decoder.c \
+ common/filter_decoder.c common/filter_decoder.h \
+ common/filter_flags_decoder.c common/index_decoder.c \
+ common/index_decoder.h common/index_hash.c \
+ common/stream_buffer_decoder.c common/stream_decoder.c \
+ common/stream_decoder.h common/stream_flags_decoder.c \
+ common/vli_decoder.c common/stream_decoder_mt.c \
+ common/microlzma_decoder.c common/lzip_decoder.c \
+ common/lzip_decoder.h check/check.c check/check.h \
+ check/crc_macros.h check/crc32_small.c check/crc32_table.c \
+ check/crc32_table_le.h check/crc32_table_be.h \
+ check/crc32_x86.S check/crc32_fast.c check/crc64_small.c \
+ check/crc64_table.c check/crc64_table_le.h \
+ check/crc64_table_be.h check/crc64_x86.S check/crc64_fast.c \
+ check/sha256.c lz/lz_encoder.c lz/lz_encoder.h \
+ lz/lz_encoder_hash.h lz/lz_encoder_hash_table.h \
+ lz/lz_encoder_mf.c lz/lz_decoder.c lz/lz_decoder.h \
+ lzma/lzma_common.h lzma/lzma_encoder_presets.c lzma/fastpos.h \
+ lzma/lzma_encoder.h lzma/lzma_encoder.c \
+ lzma/lzma_encoder_private.h lzma/lzma_encoder_optimum_fast.c \
+ lzma/lzma_encoder_optimum_normal.c lzma/fastpos_table.c \
+ lzma/lzma_decoder.c lzma/lzma_decoder.h lzma/lzma2_encoder.c \
+ lzma/lzma2_encoder.h lzma/lzma2_decoder.c lzma/lzma2_decoder.h \
+ rangecoder/range_common.h rangecoder/range_encoder.h \
+ rangecoder/price.h rangecoder/price_table.c \
+ rangecoder/range_decoder.h delta/delta_common.c \
+ delta/delta_common.h delta/delta_private.h \
+ delta/delta_encoder.c delta/delta_encoder.h \
+ delta/delta_decoder.c delta/delta_decoder.h \
+ simple/simple_coder.c simple/simple_coder.h \
+ simple/simple_private.h simple/simple_encoder.c \
+ simple/simple_encoder.h simple/simple_decoder.c \
+ simple/simple_decoder.h simple/x86.c simple/powerpc.c \
+ simple/ia64.c simple/arm.c simple/armthumb.c simple/arm64.c \
+ simple/sparc.c liblzma_w32res.rc
+@COND_THREADS_TRUE@am__objects_1 = liblzma_la-tuklib_cpucores.lo
+@COND_THREADS_TRUE@am__objects_2 = liblzma_la-hardware_cputhreads.lo \
+@COND_THREADS_TRUE@ liblzma_la-outqueue.lo
+@COND_MAIN_ENCODER_TRUE@am__objects_3 = liblzma_la-alone_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-block_buffer_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-block_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-block_header_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-easy_buffer_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-easy_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-easy_encoder_memusage.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-filter_buffer_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-filter_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-filter_flags_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-index_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-stream_buffer_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-stream_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-stream_flags_encoder.lo \
+@COND_MAIN_ENCODER_TRUE@ liblzma_la-vli_encoder.lo
+@COND_MAIN_ENCODER_TRUE@@COND_THREADS_TRUE@am__objects_4 = liblzma_la-stream_encoder_mt.lo
+@COND_MAIN_ENCODER_TRUE@@COND_MICROLZMA_TRUE@am__objects_5 = liblzma_la-microlzma_encoder.lo
+@COND_MAIN_DECODER_TRUE@am__objects_6 = liblzma_la-alone_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-auto_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-block_buffer_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-block_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-block_header_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-easy_decoder_memusage.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-file_info.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-filter_buffer_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-filter_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-filter_flags_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-index_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-index_hash.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-stream_buffer_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-stream_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-stream_flags_decoder.lo \
+@COND_MAIN_DECODER_TRUE@ liblzma_la-vli_decoder.lo
+@COND_MAIN_DECODER_TRUE@@COND_THREADS_TRUE@am__objects_7 = liblzma_la-stream_decoder_mt.lo
+@COND_MAIN_DECODER_TRUE@@COND_MICROLZMA_TRUE@am__objects_8 = liblzma_la-microlzma_decoder.lo
+@COND_LZIP_DECODER_TRUE@@COND_MAIN_DECODER_TRUE@am__objects_9 = liblzma_la-lzip_decoder.lo
+@COND_CHECK_CRC32_TRUE@@COND_SMALL_TRUE@am__objects_10 = liblzma_la-crc32_small.lo
+@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@am__objects_11 = liblzma_la-crc32_table.lo
+@COND_ASM_X86_TRUE@@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@am__objects_12 = liblzma_la-crc32_x86.lo
+@COND_ASM_X86_FALSE@@COND_CHECK_CRC32_TRUE@@COND_SMALL_FALSE@am__objects_13 = liblzma_la-crc32_fast.lo
+@COND_CHECK_CRC64_TRUE@@COND_SMALL_TRUE@am__objects_14 = liblzma_la-crc64_small.lo
+@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@am__objects_15 = liblzma_la-crc64_table.lo
+@COND_ASM_X86_TRUE@@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@am__objects_16 = liblzma_la-crc64_x86.lo
+@COND_ASM_X86_FALSE@@COND_CHECK_CRC64_TRUE@@COND_SMALL_FALSE@am__objects_17 = liblzma_la-crc64_fast.lo
+@COND_CHECK_SHA256_TRUE@@COND_INTERNAL_SHA256_TRUE@am__objects_18 = liblzma_la-sha256.lo
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@am__objects_19 = liblzma_la-lz_encoder.lo \
+@COND_ENCODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@ liblzma_la-lz_encoder_mf.lo
+@COND_DECODER_LZ_TRUE@@COND_FILTER_LZ_TRUE@am__objects_20 = liblzma_la-lz_decoder.lo
+@COND_FILTER_LZMA1_TRUE@am__objects_21 = \
+@COND_FILTER_LZMA1_TRUE@ liblzma_la-lzma_encoder_presets.lo
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@am__objects_22 = liblzma_la-lzma_encoder.lo \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ liblzma_la-lzma_encoder_optimum_fast.lo \
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@ liblzma_la-lzma_encoder_optimum_normal.lo
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@@COND_SMALL_FALSE@am__objects_23 = liblzma_la-fastpos_table.lo
+@COND_DECODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@am__objects_24 = liblzma_la-lzma_decoder.lo
+@COND_ENCODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@am__objects_25 = liblzma_la-lzma2_encoder.lo
+@COND_DECODER_LZMA2_TRUE@@COND_FILTER_LZMA1_TRUE@am__objects_26 = liblzma_la-lzma2_decoder.lo
+am__objects_27 =
+@COND_ENCODER_LZMA1_TRUE@@COND_FILTER_LZMA1_TRUE@am__objects_28 = liblzma_la-price_table.lo
+@COND_FILTER_DELTA_TRUE@am__objects_29 = liblzma_la-delta_common.lo
+@COND_ENCODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@am__objects_30 = liblzma_la-delta_encoder.lo
+@COND_DECODER_DELTA_TRUE@@COND_FILTER_DELTA_TRUE@am__objects_31 = liblzma_la-delta_decoder.lo
+@COND_FILTER_SIMPLE_TRUE@am__objects_32 = liblzma_la-simple_coder.lo
+@COND_ENCODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_33 = liblzma_la-simple_encoder.lo
+@COND_DECODER_SIMPLE_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_34 = liblzma_la-simple_decoder.lo
+@COND_FILTER_SIMPLE_TRUE@@COND_FILTER_X86_TRUE@am__objects_35 = liblzma_la-x86.lo
+@COND_FILTER_POWERPC_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_36 = liblzma_la-powerpc.lo
+@COND_FILTER_IA64_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_37 = liblzma_la-ia64.lo
+@COND_FILTER_ARM_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_38 = liblzma_la-arm.lo
+@COND_FILTER_ARMTHUMB_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_39 = liblzma_la-armthumb.lo
+@COND_FILTER_ARM64_TRUE@@COND_FILTER_SIMPLE_TRUE@am__objects_40 = liblzma_la-arm64.lo
+@COND_FILTER_SIMPLE_TRUE@@COND_FILTER_SPARC_TRUE@am__objects_41 = liblzma_la-sparc.lo
+@COND_W32_TRUE@am__objects_42 = liblzma_w32res.lo
+am_liblzma_la_OBJECTS = liblzma_la-tuklib_physmem.lo $(am__objects_1) \
+ liblzma_la-common.lo liblzma_la-block_util.lo \
+ liblzma_la-easy_preset.lo liblzma_la-filter_common.lo \
+ liblzma_la-hardware_physmem.lo liblzma_la-index.lo \
+ liblzma_la-stream_flags_common.lo \
+ liblzma_la-string_conversion.lo liblzma_la-vli_size.lo \
+ $(am__objects_2) $(am__objects_3) $(am__objects_4) \
+ $(am__objects_5) $(am__objects_6) $(am__objects_7) \
+ $(am__objects_8) $(am__objects_9) liblzma_la-check.lo \
+ $(am__objects_10) $(am__objects_11) $(am__objects_12) \
+ $(am__objects_13) $(am__objects_14) $(am__objects_15) \
+ $(am__objects_16) $(am__objects_17) $(am__objects_18) \
+ $(am__objects_19) $(am__objects_20) $(am__objects_21) \
+ $(am__objects_22) $(am__objects_23) $(am__objects_24) \
+ $(am__objects_25) $(am__objects_26) $(am__objects_27) \
+ $(am__objects_28) $(am__objects_27) $(am__objects_29) \
+ $(am__objects_30) $(am__objects_31) $(am__objects_32) \
+ $(am__objects_33) $(am__objects_34) $(am__objects_35) \
+ $(am__objects_36) $(am__objects_37) $(am__objects_38) \
+ $(am__objects_39) $(am__objects_40) $(am__objects_41) \
+ $(am__objects_42)
+liblzma_la_OBJECTS = $(am_liblzma_la_OBJECTS)
+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 =
+liblzma_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(liblzma_la_LDFLAGS) $(LDFLAGS) -o $@
+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)/liblzma_la-alone_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-alone_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-arm.Plo \
+ ./$(DEPDIR)/liblzma_la-arm64.Plo \
+ ./$(DEPDIR)/liblzma_la-armthumb.Plo \
+ ./$(DEPDIR)/liblzma_la-auto_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-block_buffer_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-block_buffer_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-block_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-block_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-block_header_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-block_header_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-block_util.Plo \
+ ./$(DEPDIR)/liblzma_la-check.Plo \
+ ./$(DEPDIR)/liblzma_la-common.Plo \
+ ./$(DEPDIR)/liblzma_la-crc32_fast.Plo \
+ ./$(DEPDIR)/liblzma_la-crc32_small.Plo \
+ ./$(DEPDIR)/liblzma_la-crc32_table.Plo \
+ ./$(DEPDIR)/liblzma_la-crc32_x86.Plo \
+ ./$(DEPDIR)/liblzma_la-crc64_fast.Plo \
+ ./$(DEPDIR)/liblzma_la-crc64_small.Plo \
+ ./$(DEPDIR)/liblzma_la-crc64_table.Plo \
+ ./$(DEPDIR)/liblzma_la-crc64_x86.Plo \
+ ./$(DEPDIR)/liblzma_la-delta_common.Plo \
+ ./$(DEPDIR)/liblzma_la-delta_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-delta_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-easy_buffer_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-easy_decoder_memusage.Plo \
+ ./$(DEPDIR)/liblzma_la-easy_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-easy_encoder_memusage.Plo \
+ ./$(DEPDIR)/liblzma_la-easy_preset.Plo \
+ ./$(DEPDIR)/liblzma_la-fastpos_table.Plo \
+ ./$(DEPDIR)/liblzma_la-file_info.Plo \
+ ./$(DEPDIR)/liblzma_la-filter_buffer_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-filter_buffer_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-filter_common.Plo \
+ ./$(DEPDIR)/liblzma_la-filter_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-filter_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-filter_flags_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-filter_flags_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-hardware_cputhreads.Plo \
+ ./$(DEPDIR)/liblzma_la-hardware_physmem.Plo \
+ ./$(DEPDIR)/liblzma_la-ia64.Plo \
+ ./$(DEPDIR)/liblzma_la-index.Plo \
+ ./$(DEPDIR)/liblzma_la-index_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-index_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-index_hash.Plo \
+ ./$(DEPDIR)/liblzma_la-lz_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-lz_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-lz_encoder_mf.Plo \
+ ./$(DEPDIR)/liblzma_la-lzip_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-lzma2_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-lzma2_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-lzma_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-lzma_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_fast.Plo \
+ ./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_normal.Plo \
+ ./$(DEPDIR)/liblzma_la-lzma_encoder_presets.Plo \
+ ./$(DEPDIR)/liblzma_la-microlzma_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-microlzma_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-outqueue.Plo \
+ ./$(DEPDIR)/liblzma_la-powerpc.Plo \
+ ./$(DEPDIR)/liblzma_la-price_table.Plo \
+ ./$(DEPDIR)/liblzma_la-sha256.Plo \
+ ./$(DEPDIR)/liblzma_la-simple_coder.Plo \
+ ./$(DEPDIR)/liblzma_la-simple_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-simple_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-sparc.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_buffer_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_buffer_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_decoder_mt.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_encoder_mt.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_flags_common.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_flags_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-stream_flags_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-string_conversion.Plo \
+ ./$(DEPDIR)/liblzma_la-tuklib_cpucores.Plo \
+ ./$(DEPDIR)/liblzma_la-tuklib_physmem.Plo \
+ ./$(DEPDIR)/liblzma_la-vli_decoder.Plo \
+ ./$(DEPDIR)/liblzma_la-vli_encoder.Plo \
+ ./$(DEPDIR)/liblzma_la-vli_size.Plo \
+ ./$(DEPDIR)/liblzma_la-x86.Plo
+am__mv = mv -f
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CCASFLAGS) $(CCASFLAGS)
+AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
+am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
+am__v_CPPAS_0 = @echo " CPPAS " $@;
+am__v_CPPAS_1 =
+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 = $(liblzma_la_SOURCES)
+DIST_SOURCES = $(am__liblzma_la_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DATA = $(doc_DATA) $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir distdir-am
+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)`
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/check/Makefile.inc \
+ $(srcdir)/common/Makefile.inc $(srcdir)/delta/Makefile.inc \
+ $(srcdir)/lz/Makefile.inc $(srcdir)/lzma/Makefile.inc \
+ $(srcdir)/rangecoder/Makefile.inc \
+ $(srcdir)/simple/Makefile.inc $(top_srcdir)/build-aux/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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@
+SUBDIRS = api
+EXTRA_DIST = liblzma_generic.map liblzma_linux.map validate_map.sh \
+ check/crc32_tablegen.c check/crc64_tablegen.c $(am__append_23) \
+ liblzma.pc.in
+CLEANFILES = $(am__append_46)
+doc_DATA = $(am__append_49)
+lib_LTLIBRARIES = liblzma.la
+liblzma_la_SOURCES = ../common/tuklib_physmem.c $(am__append_3) \
+ common/common.c common/common.h common/memcmplen.h \
+ common/block_util.c common/easy_preset.c common/easy_preset.h \
+ common/filter_common.c common/filter_common.h \
+ common/hardware_physmem.c common/index.c common/index.h \
+ common/stream_flags_common.c common/stream_flags_common.h \
+ common/string_conversion.c common/vli_size.c $(am__append_4) \
+ $(am__append_5) $(am__append_6) $(am__append_7) \
+ $(am__append_8) $(am__append_9) $(am__append_10) \
+ $(am__append_11) check/check.c check/check.h \
+ check/crc_macros.h $(am__append_12) $(am__append_13) \
+ $(am__append_14) $(am__append_15) $(am__append_16) \
+ $(am__append_17) $(am__append_18) $(am__append_19) \
+ $(am__append_20) $(am__append_21) $(am__append_22) \
+ $(am__append_24) $(am__append_25) $(am__append_26) \
+ $(am__append_27) $(am__append_28) $(am__append_29) \
+ $(am__append_30) $(am__append_31) $(am__append_32) \
+ $(am__append_33) $(am__append_34) $(am__append_35) \
+ $(am__append_36) $(am__append_37) $(am__append_38) \
+ $(am__append_39) $(am__append_40) $(am__append_41) \
+ $(am__append_42) $(am__append_43) $(am__append_44) \
+ $(am__append_45) $(am__append_47)
+liblzma_la_CPPFLAGS = \
+ -I$(top_srcdir)/src/liblzma/api \
+ -I$(top_srcdir)/src/liblzma/common \
+ -I$(top_srcdir)/src/liblzma/check \
+ -I$(top_srcdir)/src/liblzma/lz \
+ -I$(top_srcdir)/src/liblzma/rangecoder \
+ -I$(top_srcdir)/src/liblzma/lzma \
+ -I$(top_srcdir)/src/liblzma/delta \
+ -I$(top_srcdir)/src/liblzma/simple \
+ -I$(top_srcdir)/src/common \
+ -DTUKLIB_SYMBOL_PREFIX=lzma_
+
+liblzma_la_LDFLAGS = -no-undefined -version-info 9:5:4 $(am__append_1) \
+ $(am__append_2) $(am__append_48)
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = liblzma.pc
+pc_verbose = $(pc_verbose_@AM_V@)
+pc_verbose_ = $(pc_verbose_@AM_DEFAULT_V@)
+pc_verbose_0 = @echo " PC " $@;
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .obj .rc
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/common/Makefile.inc $(srcdir)/check/Makefile.inc $(srcdir)/lz/Makefile.inc $(srcdir)/lzma/Makefile.inc $(srcdir)/rangecoder/Makefile.inc $(srcdir)/delta/Makefile.inc $(srcdir)/simple/Makefile.inc $(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/liblzma/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/liblzma/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;
+$(srcdir)/common/Makefile.inc $(srcdir)/check/Makefile.inc $(srcdir)/lz/Makefile.inc $(srcdir)/lzma/Makefile.inc $(srcdir)/rangecoder/Makefile.inc $(srcdir)/delta/Makefile.inc $(srcdir)/simple/Makefile.inc $(am__empty):
+
+$(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-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+liblzma.la: $(liblzma_la_OBJECTS) $(liblzma_la_DEPENDENCIES) $(EXTRA_liblzma_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(liblzma_la_LINK) -rpath $(libdir) $(liblzma_la_OBJECTS) $(liblzma_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-alone_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-alone_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-arm.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-arm64.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-armthumb.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-auto_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-block_buffer_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-block_buffer_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-block_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-block_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-block_header_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-block_header_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-block_util.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-check.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-common.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc32_fast.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc32_small.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc32_table.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc32_x86.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc64_fast.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc64_small.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc64_table.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-crc64_x86.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-delta_common.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-delta_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-delta_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-easy_buffer_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-easy_decoder_memusage.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-easy_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-easy_encoder_memusage.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-easy_preset.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-fastpos_table.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-file_info.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_buffer_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_buffer_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_common.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_flags_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-filter_flags_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-hardware_cputhreads.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-hardware_physmem.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-ia64.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-index.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-index_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-index_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-index_hash.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lz_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lz_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lz_encoder_mf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzip_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzma2_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzma2_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzma_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzma_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_fast.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_normal.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-lzma_encoder_presets.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-microlzma_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-microlzma_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-outqueue.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-powerpc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-price_table.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-sha256.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-simple_coder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-simple_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-simple_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-sparc.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_buffer_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_buffer_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_decoder_mt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_encoder_mt.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_flags_common.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_flags_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-stream_flags_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-string_conversion.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-tuklib_cpucores.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-tuklib_physmem.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-vli_decoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-vli_encoder.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-vli_size.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblzma_la-x86.Plo@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.S.o:
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.S.lo:
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
+
+liblzma_la-crc32_x86.lo: check/crc32_x86.S
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT liblzma_la-crc32_x86.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc32_x86.Tpo -c -o liblzma_la-crc32_x86.lo `test -f 'check/crc32_x86.S' || echo '$(srcdir)/'`check/crc32_x86.S
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc32_x86.Tpo $(DEPDIR)/liblzma_la-crc32_x86.Plo
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='check/crc32_x86.S' object='liblzma_la-crc32_x86.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o liblzma_la-crc32_x86.lo `test -f 'check/crc32_x86.S' || echo '$(srcdir)/'`check/crc32_x86.S
+
+liblzma_la-crc64_x86.lo: check/crc64_x86.S
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -MT liblzma_la-crc64_x86.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc64_x86.Tpo -c -o liblzma_la-crc64_x86.lo `test -f 'check/crc64_x86.S' || echo '$(srcdir)/'`check/crc64_x86.S
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc64_x86.Tpo $(DEPDIR)/liblzma_la-crc64_x86.Plo
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='check/crc64_x86.S' object='liblzma_la-crc64_x86.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o liblzma_la-crc64_x86.lo `test -f 'check/crc64_x86.S' || echo '$(srcdir)/'`check/crc64_x86.S
+
+.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 $@ $<
+
+liblzma_la-tuklib_physmem.lo: ../common/tuklib_physmem.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-tuklib_physmem.lo -MD -MP -MF $(DEPDIR)/liblzma_la-tuklib_physmem.Tpo -c -o liblzma_la-tuklib_physmem.lo `test -f '../common/tuklib_physmem.c' || echo '$(srcdir)/'`../common/tuklib_physmem.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-tuklib_physmem.Tpo $(DEPDIR)/liblzma_la-tuklib_physmem.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_physmem.c' object='liblzma_la-tuklib_physmem.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-tuklib_physmem.lo `test -f '../common/tuklib_physmem.c' || echo '$(srcdir)/'`../common/tuklib_physmem.c
+
+liblzma_la-tuklib_cpucores.lo: ../common/tuklib_cpucores.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-tuklib_cpucores.lo -MD -MP -MF $(DEPDIR)/liblzma_la-tuklib_cpucores.Tpo -c -o liblzma_la-tuklib_cpucores.lo `test -f '../common/tuklib_cpucores.c' || echo '$(srcdir)/'`../common/tuklib_cpucores.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-tuklib_cpucores.Tpo $(DEPDIR)/liblzma_la-tuklib_cpucores.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_cpucores.c' object='liblzma_la-tuklib_cpucores.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-tuklib_cpucores.lo `test -f '../common/tuklib_cpucores.c' || echo '$(srcdir)/'`../common/tuklib_cpucores.c
+
+liblzma_la-common.lo: common/common.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-common.lo -MD -MP -MF $(DEPDIR)/liblzma_la-common.Tpo -c -o liblzma_la-common.lo `test -f 'common/common.c' || echo '$(srcdir)/'`common/common.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-common.Tpo $(DEPDIR)/liblzma_la-common.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/common.c' object='liblzma_la-common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-common.lo `test -f 'common/common.c' || echo '$(srcdir)/'`common/common.c
+
+liblzma_la-block_util.lo: common/block_util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-block_util.lo -MD -MP -MF $(DEPDIR)/liblzma_la-block_util.Tpo -c -o liblzma_la-block_util.lo `test -f 'common/block_util.c' || echo '$(srcdir)/'`common/block_util.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-block_util.Tpo $(DEPDIR)/liblzma_la-block_util.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/block_util.c' object='liblzma_la-block_util.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-block_util.lo `test -f 'common/block_util.c' || echo '$(srcdir)/'`common/block_util.c
+
+liblzma_la-easy_preset.lo: common/easy_preset.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-easy_preset.lo -MD -MP -MF $(DEPDIR)/liblzma_la-easy_preset.Tpo -c -o liblzma_la-easy_preset.lo `test -f 'common/easy_preset.c' || echo '$(srcdir)/'`common/easy_preset.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-easy_preset.Tpo $(DEPDIR)/liblzma_la-easy_preset.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/easy_preset.c' object='liblzma_la-easy_preset.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-easy_preset.lo `test -f 'common/easy_preset.c' || echo '$(srcdir)/'`common/easy_preset.c
+
+liblzma_la-filter_common.lo: common/filter_common.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-filter_common.lo -MD -MP -MF $(DEPDIR)/liblzma_la-filter_common.Tpo -c -o liblzma_la-filter_common.lo `test -f 'common/filter_common.c' || echo '$(srcdir)/'`common/filter_common.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-filter_common.Tpo $(DEPDIR)/liblzma_la-filter_common.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/filter_common.c' object='liblzma_la-filter_common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_common.lo `test -f 'common/filter_common.c' || echo '$(srcdir)/'`common/filter_common.c
+
+liblzma_la-hardware_physmem.lo: common/hardware_physmem.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-hardware_physmem.lo -MD -MP -MF $(DEPDIR)/liblzma_la-hardware_physmem.Tpo -c -o liblzma_la-hardware_physmem.lo `test -f 'common/hardware_physmem.c' || echo '$(srcdir)/'`common/hardware_physmem.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-hardware_physmem.Tpo $(DEPDIR)/liblzma_la-hardware_physmem.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/hardware_physmem.c' object='liblzma_la-hardware_physmem.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-hardware_physmem.lo `test -f 'common/hardware_physmem.c' || echo '$(srcdir)/'`common/hardware_physmem.c
+
+liblzma_la-index.lo: common/index.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-index.lo -MD -MP -MF $(DEPDIR)/liblzma_la-index.Tpo -c -o liblzma_la-index.lo `test -f 'common/index.c' || echo '$(srcdir)/'`common/index.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-index.Tpo $(DEPDIR)/liblzma_la-index.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/index.c' object='liblzma_la-index.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-index.lo `test -f 'common/index.c' || echo '$(srcdir)/'`common/index.c
+
+liblzma_la-stream_flags_common.lo: common/stream_flags_common.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_flags_common.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_flags_common.Tpo -c -o liblzma_la-stream_flags_common.lo `test -f 'common/stream_flags_common.c' || echo '$(srcdir)/'`common/stream_flags_common.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_flags_common.Tpo $(DEPDIR)/liblzma_la-stream_flags_common.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_flags_common.c' object='liblzma_la-stream_flags_common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_flags_common.lo `test -f 'common/stream_flags_common.c' || echo '$(srcdir)/'`common/stream_flags_common.c
+
+liblzma_la-string_conversion.lo: common/string_conversion.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-string_conversion.lo -MD -MP -MF $(DEPDIR)/liblzma_la-string_conversion.Tpo -c -o liblzma_la-string_conversion.lo `test -f 'common/string_conversion.c' || echo '$(srcdir)/'`common/string_conversion.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-string_conversion.Tpo $(DEPDIR)/liblzma_la-string_conversion.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/string_conversion.c' object='liblzma_la-string_conversion.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-string_conversion.lo `test -f 'common/string_conversion.c' || echo '$(srcdir)/'`common/string_conversion.c
+
+liblzma_la-vli_size.lo: common/vli_size.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-vli_size.lo -MD -MP -MF $(DEPDIR)/liblzma_la-vli_size.Tpo -c -o liblzma_la-vli_size.lo `test -f 'common/vli_size.c' || echo '$(srcdir)/'`common/vli_size.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-vli_size.Tpo $(DEPDIR)/liblzma_la-vli_size.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/vli_size.c' object='liblzma_la-vli_size.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-vli_size.lo `test -f 'common/vli_size.c' || echo '$(srcdir)/'`common/vli_size.c
+
+liblzma_la-hardware_cputhreads.lo: common/hardware_cputhreads.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-hardware_cputhreads.lo -MD -MP -MF $(DEPDIR)/liblzma_la-hardware_cputhreads.Tpo -c -o liblzma_la-hardware_cputhreads.lo `test -f 'common/hardware_cputhreads.c' || echo '$(srcdir)/'`common/hardware_cputhreads.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-hardware_cputhreads.Tpo $(DEPDIR)/liblzma_la-hardware_cputhreads.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/hardware_cputhreads.c' object='liblzma_la-hardware_cputhreads.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-hardware_cputhreads.lo `test -f 'common/hardware_cputhreads.c' || echo '$(srcdir)/'`common/hardware_cputhreads.c
+
+liblzma_la-outqueue.lo: common/outqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-outqueue.lo -MD -MP -MF $(DEPDIR)/liblzma_la-outqueue.Tpo -c -o liblzma_la-outqueue.lo `test -f 'common/outqueue.c' || echo '$(srcdir)/'`common/outqueue.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-outqueue.Tpo $(DEPDIR)/liblzma_la-outqueue.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/outqueue.c' object='liblzma_la-outqueue.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-outqueue.lo `test -f 'common/outqueue.c' || echo '$(srcdir)/'`common/outqueue.c
+
+liblzma_la-alone_encoder.lo: common/alone_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-alone_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-alone_encoder.Tpo -c -o liblzma_la-alone_encoder.lo `test -f 'common/alone_encoder.c' || echo '$(srcdir)/'`common/alone_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-alone_encoder.Tpo $(DEPDIR)/liblzma_la-alone_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/alone_encoder.c' object='liblzma_la-alone_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-alone_encoder.lo `test -f 'common/alone_encoder.c' || echo '$(srcdir)/'`common/alone_encoder.c
+
+liblzma_la-block_buffer_encoder.lo: common/block_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-block_buffer_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-block_buffer_encoder.Tpo -c -o liblzma_la-block_buffer_encoder.lo `test -f 'common/block_buffer_encoder.c' || echo '$(srcdir)/'`common/block_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-block_buffer_encoder.Tpo $(DEPDIR)/liblzma_la-block_buffer_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/block_buffer_encoder.c' object='liblzma_la-block_buffer_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-block_buffer_encoder.lo `test -f 'common/block_buffer_encoder.c' || echo '$(srcdir)/'`common/block_buffer_encoder.c
+
+liblzma_la-block_encoder.lo: common/block_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-block_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-block_encoder.Tpo -c -o liblzma_la-block_encoder.lo `test -f 'common/block_encoder.c' || echo '$(srcdir)/'`common/block_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-block_encoder.Tpo $(DEPDIR)/liblzma_la-block_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/block_encoder.c' object='liblzma_la-block_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-block_encoder.lo `test -f 'common/block_encoder.c' || echo '$(srcdir)/'`common/block_encoder.c
+
+liblzma_la-block_header_encoder.lo: common/block_header_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-block_header_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-block_header_encoder.Tpo -c -o liblzma_la-block_header_encoder.lo `test -f 'common/block_header_encoder.c' || echo '$(srcdir)/'`common/block_header_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-block_header_encoder.Tpo $(DEPDIR)/liblzma_la-block_header_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/block_header_encoder.c' object='liblzma_la-block_header_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-block_header_encoder.lo `test -f 'common/block_header_encoder.c' || echo '$(srcdir)/'`common/block_header_encoder.c
+
+liblzma_la-easy_buffer_encoder.lo: common/easy_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-easy_buffer_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-easy_buffer_encoder.Tpo -c -o liblzma_la-easy_buffer_encoder.lo `test -f 'common/easy_buffer_encoder.c' || echo '$(srcdir)/'`common/easy_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-easy_buffer_encoder.Tpo $(DEPDIR)/liblzma_la-easy_buffer_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/easy_buffer_encoder.c' object='liblzma_la-easy_buffer_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-easy_buffer_encoder.lo `test -f 'common/easy_buffer_encoder.c' || echo '$(srcdir)/'`common/easy_buffer_encoder.c
+
+liblzma_la-easy_encoder.lo: common/easy_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-easy_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-easy_encoder.Tpo -c -o liblzma_la-easy_encoder.lo `test -f 'common/easy_encoder.c' || echo '$(srcdir)/'`common/easy_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-easy_encoder.Tpo $(DEPDIR)/liblzma_la-easy_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/easy_encoder.c' object='liblzma_la-easy_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-easy_encoder.lo `test -f 'common/easy_encoder.c' || echo '$(srcdir)/'`common/easy_encoder.c
+
+liblzma_la-easy_encoder_memusage.lo: common/easy_encoder_memusage.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-easy_encoder_memusage.lo -MD -MP -MF $(DEPDIR)/liblzma_la-easy_encoder_memusage.Tpo -c -o liblzma_la-easy_encoder_memusage.lo `test -f 'common/easy_encoder_memusage.c' || echo '$(srcdir)/'`common/easy_encoder_memusage.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-easy_encoder_memusage.Tpo $(DEPDIR)/liblzma_la-easy_encoder_memusage.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/easy_encoder_memusage.c' object='liblzma_la-easy_encoder_memusage.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-easy_encoder_memusage.lo `test -f 'common/easy_encoder_memusage.c' || echo '$(srcdir)/'`common/easy_encoder_memusage.c
+
+liblzma_la-filter_buffer_encoder.lo: common/filter_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-filter_buffer_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-filter_buffer_encoder.Tpo -c -o liblzma_la-filter_buffer_encoder.lo `test -f 'common/filter_buffer_encoder.c' || echo '$(srcdir)/'`common/filter_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-filter_buffer_encoder.Tpo $(DEPDIR)/liblzma_la-filter_buffer_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/filter_buffer_encoder.c' object='liblzma_la-filter_buffer_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_buffer_encoder.lo `test -f 'common/filter_buffer_encoder.c' || echo '$(srcdir)/'`common/filter_buffer_encoder.c
+
+liblzma_la-filter_encoder.lo: common/filter_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-filter_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-filter_encoder.Tpo -c -o liblzma_la-filter_encoder.lo `test -f 'common/filter_encoder.c' || echo '$(srcdir)/'`common/filter_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-filter_encoder.Tpo $(DEPDIR)/liblzma_la-filter_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/filter_encoder.c' object='liblzma_la-filter_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_encoder.lo `test -f 'common/filter_encoder.c' || echo '$(srcdir)/'`common/filter_encoder.c
+
+liblzma_la-filter_flags_encoder.lo: common/filter_flags_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-filter_flags_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-filter_flags_encoder.Tpo -c -o liblzma_la-filter_flags_encoder.lo `test -f 'common/filter_flags_encoder.c' || echo '$(srcdir)/'`common/filter_flags_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-filter_flags_encoder.Tpo $(DEPDIR)/liblzma_la-filter_flags_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/filter_flags_encoder.c' object='liblzma_la-filter_flags_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_flags_encoder.lo `test -f 'common/filter_flags_encoder.c' || echo '$(srcdir)/'`common/filter_flags_encoder.c
+
+liblzma_la-index_encoder.lo: common/index_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-index_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-index_encoder.Tpo -c -o liblzma_la-index_encoder.lo `test -f 'common/index_encoder.c' || echo '$(srcdir)/'`common/index_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-index_encoder.Tpo $(DEPDIR)/liblzma_la-index_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/index_encoder.c' object='liblzma_la-index_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-index_encoder.lo `test -f 'common/index_encoder.c' || echo '$(srcdir)/'`common/index_encoder.c
+
+liblzma_la-stream_buffer_encoder.lo: common/stream_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_buffer_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_buffer_encoder.Tpo -c -o liblzma_la-stream_buffer_encoder.lo `test -f 'common/stream_buffer_encoder.c' || echo '$(srcdir)/'`common/stream_buffer_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_buffer_encoder.Tpo $(DEPDIR)/liblzma_la-stream_buffer_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_buffer_encoder.c' object='liblzma_la-stream_buffer_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_buffer_encoder.lo `test -f 'common/stream_buffer_encoder.c' || echo '$(srcdir)/'`common/stream_buffer_encoder.c
+
+liblzma_la-stream_encoder.lo: common/stream_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_encoder.Tpo -c -o liblzma_la-stream_encoder.lo `test -f 'common/stream_encoder.c' || echo '$(srcdir)/'`common/stream_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_encoder.Tpo $(DEPDIR)/liblzma_la-stream_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_encoder.c' object='liblzma_la-stream_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_encoder.lo `test -f 'common/stream_encoder.c' || echo '$(srcdir)/'`common/stream_encoder.c
+
+liblzma_la-stream_flags_encoder.lo: common/stream_flags_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_flags_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_flags_encoder.Tpo -c -o liblzma_la-stream_flags_encoder.lo `test -f 'common/stream_flags_encoder.c' || echo '$(srcdir)/'`common/stream_flags_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_flags_encoder.Tpo $(DEPDIR)/liblzma_la-stream_flags_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_flags_encoder.c' object='liblzma_la-stream_flags_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_flags_encoder.lo `test -f 'common/stream_flags_encoder.c' || echo '$(srcdir)/'`common/stream_flags_encoder.c
+
+liblzma_la-vli_encoder.lo: common/vli_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-vli_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-vli_encoder.Tpo -c -o liblzma_la-vli_encoder.lo `test -f 'common/vli_encoder.c' || echo '$(srcdir)/'`common/vli_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-vli_encoder.Tpo $(DEPDIR)/liblzma_la-vli_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/vli_encoder.c' object='liblzma_la-vli_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-vli_encoder.lo `test -f 'common/vli_encoder.c' || echo '$(srcdir)/'`common/vli_encoder.c
+
+liblzma_la-stream_encoder_mt.lo: common/stream_encoder_mt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_encoder_mt.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_encoder_mt.Tpo -c -o liblzma_la-stream_encoder_mt.lo `test -f 'common/stream_encoder_mt.c' || echo '$(srcdir)/'`common/stream_encoder_mt.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_encoder_mt.Tpo $(DEPDIR)/liblzma_la-stream_encoder_mt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_encoder_mt.c' object='liblzma_la-stream_encoder_mt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_encoder_mt.lo `test -f 'common/stream_encoder_mt.c' || echo '$(srcdir)/'`common/stream_encoder_mt.c
+
+liblzma_la-microlzma_encoder.lo: common/microlzma_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-microlzma_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-microlzma_encoder.Tpo -c -o liblzma_la-microlzma_encoder.lo `test -f 'common/microlzma_encoder.c' || echo '$(srcdir)/'`common/microlzma_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-microlzma_encoder.Tpo $(DEPDIR)/liblzma_la-microlzma_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/microlzma_encoder.c' object='liblzma_la-microlzma_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-microlzma_encoder.lo `test -f 'common/microlzma_encoder.c' || echo '$(srcdir)/'`common/microlzma_encoder.c
+
+liblzma_la-alone_decoder.lo: common/alone_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-alone_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-alone_decoder.Tpo -c -o liblzma_la-alone_decoder.lo `test -f 'common/alone_decoder.c' || echo '$(srcdir)/'`common/alone_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-alone_decoder.Tpo $(DEPDIR)/liblzma_la-alone_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/alone_decoder.c' object='liblzma_la-alone_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-alone_decoder.lo `test -f 'common/alone_decoder.c' || echo '$(srcdir)/'`common/alone_decoder.c
+
+liblzma_la-auto_decoder.lo: common/auto_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-auto_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-auto_decoder.Tpo -c -o liblzma_la-auto_decoder.lo `test -f 'common/auto_decoder.c' || echo '$(srcdir)/'`common/auto_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-auto_decoder.Tpo $(DEPDIR)/liblzma_la-auto_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/auto_decoder.c' object='liblzma_la-auto_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-auto_decoder.lo `test -f 'common/auto_decoder.c' || echo '$(srcdir)/'`common/auto_decoder.c
+
+liblzma_la-block_buffer_decoder.lo: common/block_buffer_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-block_buffer_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-block_buffer_decoder.Tpo -c -o liblzma_la-block_buffer_decoder.lo `test -f 'common/block_buffer_decoder.c' || echo '$(srcdir)/'`common/block_buffer_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-block_buffer_decoder.Tpo $(DEPDIR)/liblzma_la-block_buffer_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/block_buffer_decoder.c' object='liblzma_la-block_buffer_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-block_buffer_decoder.lo `test -f 'common/block_buffer_decoder.c' || echo '$(srcdir)/'`common/block_buffer_decoder.c
+
+liblzma_la-block_decoder.lo: common/block_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-block_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-block_decoder.Tpo -c -o liblzma_la-block_decoder.lo `test -f 'common/block_decoder.c' || echo '$(srcdir)/'`common/block_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-block_decoder.Tpo $(DEPDIR)/liblzma_la-block_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/block_decoder.c' object='liblzma_la-block_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-block_decoder.lo `test -f 'common/block_decoder.c' || echo '$(srcdir)/'`common/block_decoder.c
+
+liblzma_la-block_header_decoder.lo: common/block_header_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-block_header_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-block_header_decoder.Tpo -c -o liblzma_la-block_header_decoder.lo `test -f 'common/block_header_decoder.c' || echo '$(srcdir)/'`common/block_header_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-block_header_decoder.Tpo $(DEPDIR)/liblzma_la-block_header_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/block_header_decoder.c' object='liblzma_la-block_header_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-block_header_decoder.lo `test -f 'common/block_header_decoder.c' || echo '$(srcdir)/'`common/block_header_decoder.c
+
+liblzma_la-easy_decoder_memusage.lo: common/easy_decoder_memusage.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-easy_decoder_memusage.lo -MD -MP -MF $(DEPDIR)/liblzma_la-easy_decoder_memusage.Tpo -c -o liblzma_la-easy_decoder_memusage.lo `test -f 'common/easy_decoder_memusage.c' || echo '$(srcdir)/'`common/easy_decoder_memusage.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-easy_decoder_memusage.Tpo $(DEPDIR)/liblzma_la-easy_decoder_memusage.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/easy_decoder_memusage.c' object='liblzma_la-easy_decoder_memusage.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-easy_decoder_memusage.lo `test -f 'common/easy_decoder_memusage.c' || echo '$(srcdir)/'`common/easy_decoder_memusage.c
+
+liblzma_la-file_info.lo: common/file_info.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-file_info.lo -MD -MP -MF $(DEPDIR)/liblzma_la-file_info.Tpo -c -o liblzma_la-file_info.lo `test -f 'common/file_info.c' || echo '$(srcdir)/'`common/file_info.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-file_info.Tpo $(DEPDIR)/liblzma_la-file_info.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/file_info.c' object='liblzma_la-file_info.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-file_info.lo `test -f 'common/file_info.c' || echo '$(srcdir)/'`common/file_info.c
+
+liblzma_la-filter_buffer_decoder.lo: common/filter_buffer_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-filter_buffer_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-filter_buffer_decoder.Tpo -c -o liblzma_la-filter_buffer_decoder.lo `test -f 'common/filter_buffer_decoder.c' || echo '$(srcdir)/'`common/filter_buffer_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-filter_buffer_decoder.Tpo $(DEPDIR)/liblzma_la-filter_buffer_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/filter_buffer_decoder.c' object='liblzma_la-filter_buffer_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_buffer_decoder.lo `test -f 'common/filter_buffer_decoder.c' || echo '$(srcdir)/'`common/filter_buffer_decoder.c
+
+liblzma_la-filter_decoder.lo: common/filter_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-filter_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-filter_decoder.Tpo -c -o liblzma_la-filter_decoder.lo `test -f 'common/filter_decoder.c' || echo '$(srcdir)/'`common/filter_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-filter_decoder.Tpo $(DEPDIR)/liblzma_la-filter_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/filter_decoder.c' object='liblzma_la-filter_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_decoder.lo `test -f 'common/filter_decoder.c' || echo '$(srcdir)/'`common/filter_decoder.c
+
+liblzma_la-filter_flags_decoder.lo: common/filter_flags_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-filter_flags_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-filter_flags_decoder.Tpo -c -o liblzma_la-filter_flags_decoder.lo `test -f 'common/filter_flags_decoder.c' || echo '$(srcdir)/'`common/filter_flags_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-filter_flags_decoder.Tpo $(DEPDIR)/liblzma_la-filter_flags_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/filter_flags_decoder.c' object='liblzma_la-filter_flags_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-filter_flags_decoder.lo `test -f 'common/filter_flags_decoder.c' || echo '$(srcdir)/'`common/filter_flags_decoder.c
+
+liblzma_la-index_decoder.lo: common/index_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-index_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-index_decoder.Tpo -c -o liblzma_la-index_decoder.lo `test -f 'common/index_decoder.c' || echo '$(srcdir)/'`common/index_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-index_decoder.Tpo $(DEPDIR)/liblzma_la-index_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/index_decoder.c' object='liblzma_la-index_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-index_decoder.lo `test -f 'common/index_decoder.c' || echo '$(srcdir)/'`common/index_decoder.c
+
+liblzma_la-index_hash.lo: common/index_hash.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-index_hash.lo -MD -MP -MF $(DEPDIR)/liblzma_la-index_hash.Tpo -c -o liblzma_la-index_hash.lo `test -f 'common/index_hash.c' || echo '$(srcdir)/'`common/index_hash.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-index_hash.Tpo $(DEPDIR)/liblzma_la-index_hash.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/index_hash.c' object='liblzma_la-index_hash.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-index_hash.lo `test -f 'common/index_hash.c' || echo '$(srcdir)/'`common/index_hash.c
+
+liblzma_la-stream_buffer_decoder.lo: common/stream_buffer_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_buffer_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_buffer_decoder.Tpo -c -o liblzma_la-stream_buffer_decoder.lo `test -f 'common/stream_buffer_decoder.c' || echo '$(srcdir)/'`common/stream_buffer_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_buffer_decoder.Tpo $(DEPDIR)/liblzma_la-stream_buffer_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_buffer_decoder.c' object='liblzma_la-stream_buffer_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_buffer_decoder.lo `test -f 'common/stream_buffer_decoder.c' || echo '$(srcdir)/'`common/stream_buffer_decoder.c
+
+liblzma_la-stream_decoder.lo: common/stream_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_decoder.Tpo -c -o liblzma_la-stream_decoder.lo `test -f 'common/stream_decoder.c' || echo '$(srcdir)/'`common/stream_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_decoder.Tpo $(DEPDIR)/liblzma_la-stream_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_decoder.c' object='liblzma_la-stream_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_decoder.lo `test -f 'common/stream_decoder.c' || echo '$(srcdir)/'`common/stream_decoder.c
+
+liblzma_la-stream_flags_decoder.lo: common/stream_flags_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_flags_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_flags_decoder.Tpo -c -o liblzma_la-stream_flags_decoder.lo `test -f 'common/stream_flags_decoder.c' || echo '$(srcdir)/'`common/stream_flags_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_flags_decoder.Tpo $(DEPDIR)/liblzma_la-stream_flags_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_flags_decoder.c' object='liblzma_la-stream_flags_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_flags_decoder.lo `test -f 'common/stream_flags_decoder.c' || echo '$(srcdir)/'`common/stream_flags_decoder.c
+
+liblzma_la-vli_decoder.lo: common/vli_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-vli_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-vli_decoder.Tpo -c -o liblzma_la-vli_decoder.lo `test -f 'common/vli_decoder.c' || echo '$(srcdir)/'`common/vli_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-vli_decoder.Tpo $(DEPDIR)/liblzma_la-vli_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/vli_decoder.c' object='liblzma_la-vli_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-vli_decoder.lo `test -f 'common/vli_decoder.c' || echo '$(srcdir)/'`common/vli_decoder.c
+
+liblzma_la-stream_decoder_mt.lo: common/stream_decoder_mt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-stream_decoder_mt.lo -MD -MP -MF $(DEPDIR)/liblzma_la-stream_decoder_mt.Tpo -c -o liblzma_la-stream_decoder_mt.lo `test -f 'common/stream_decoder_mt.c' || echo '$(srcdir)/'`common/stream_decoder_mt.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-stream_decoder_mt.Tpo $(DEPDIR)/liblzma_la-stream_decoder_mt.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/stream_decoder_mt.c' object='liblzma_la-stream_decoder_mt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-stream_decoder_mt.lo `test -f 'common/stream_decoder_mt.c' || echo '$(srcdir)/'`common/stream_decoder_mt.c
+
+liblzma_la-microlzma_decoder.lo: common/microlzma_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-microlzma_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-microlzma_decoder.Tpo -c -o liblzma_la-microlzma_decoder.lo `test -f 'common/microlzma_decoder.c' || echo '$(srcdir)/'`common/microlzma_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-microlzma_decoder.Tpo $(DEPDIR)/liblzma_la-microlzma_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/microlzma_decoder.c' object='liblzma_la-microlzma_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-microlzma_decoder.lo `test -f 'common/microlzma_decoder.c' || echo '$(srcdir)/'`common/microlzma_decoder.c
+
+liblzma_la-lzip_decoder.lo: common/lzip_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzip_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzip_decoder.Tpo -c -o liblzma_la-lzip_decoder.lo `test -f 'common/lzip_decoder.c' || echo '$(srcdir)/'`common/lzip_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzip_decoder.Tpo $(DEPDIR)/liblzma_la-lzip_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='common/lzip_decoder.c' object='liblzma_la-lzip_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzip_decoder.lo `test -f 'common/lzip_decoder.c' || echo '$(srcdir)/'`common/lzip_decoder.c
+
+liblzma_la-check.lo: check/check.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-check.lo -MD -MP -MF $(DEPDIR)/liblzma_la-check.Tpo -c -o liblzma_la-check.lo `test -f 'check/check.c' || echo '$(srcdir)/'`check/check.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-check.Tpo $(DEPDIR)/liblzma_la-check.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/check.c' object='liblzma_la-check.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-check.lo `test -f 'check/check.c' || echo '$(srcdir)/'`check/check.c
+
+liblzma_la-crc32_small.lo: check/crc32_small.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-crc32_small.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc32_small.Tpo -c -o liblzma_la-crc32_small.lo `test -f 'check/crc32_small.c' || echo '$(srcdir)/'`check/crc32_small.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc32_small.Tpo $(DEPDIR)/liblzma_la-crc32_small.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/crc32_small.c' object='liblzma_la-crc32_small.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-crc32_small.lo `test -f 'check/crc32_small.c' || echo '$(srcdir)/'`check/crc32_small.c
+
+liblzma_la-crc32_table.lo: check/crc32_table.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-crc32_table.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc32_table.Tpo -c -o liblzma_la-crc32_table.lo `test -f 'check/crc32_table.c' || echo '$(srcdir)/'`check/crc32_table.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc32_table.Tpo $(DEPDIR)/liblzma_la-crc32_table.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/crc32_table.c' object='liblzma_la-crc32_table.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-crc32_table.lo `test -f 'check/crc32_table.c' || echo '$(srcdir)/'`check/crc32_table.c
+
+liblzma_la-crc32_fast.lo: check/crc32_fast.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-crc32_fast.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc32_fast.Tpo -c -o liblzma_la-crc32_fast.lo `test -f 'check/crc32_fast.c' || echo '$(srcdir)/'`check/crc32_fast.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc32_fast.Tpo $(DEPDIR)/liblzma_la-crc32_fast.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/crc32_fast.c' object='liblzma_la-crc32_fast.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-crc32_fast.lo `test -f 'check/crc32_fast.c' || echo '$(srcdir)/'`check/crc32_fast.c
+
+liblzma_la-crc64_small.lo: check/crc64_small.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-crc64_small.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc64_small.Tpo -c -o liblzma_la-crc64_small.lo `test -f 'check/crc64_small.c' || echo '$(srcdir)/'`check/crc64_small.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc64_small.Tpo $(DEPDIR)/liblzma_la-crc64_small.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/crc64_small.c' object='liblzma_la-crc64_small.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-crc64_small.lo `test -f 'check/crc64_small.c' || echo '$(srcdir)/'`check/crc64_small.c
+
+liblzma_la-crc64_table.lo: check/crc64_table.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-crc64_table.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc64_table.Tpo -c -o liblzma_la-crc64_table.lo `test -f 'check/crc64_table.c' || echo '$(srcdir)/'`check/crc64_table.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc64_table.Tpo $(DEPDIR)/liblzma_la-crc64_table.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/crc64_table.c' object='liblzma_la-crc64_table.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-crc64_table.lo `test -f 'check/crc64_table.c' || echo '$(srcdir)/'`check/crc64_table.c
+
+liblzma_la-crc64_fast.lo: check/crc64_fast.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-crc64_fast.lo -MD -MP -MF $(DEPDIR)/liblzma_la-crc64_fast.Tpo -c -o liblzma_la-crc64_fast.lo `test -f 'check/crc64_fast.c' || echo '$(srcdir)/'`check/crc64_fast.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-crc64_fast.Tpo $(DEPDIR)/liblzma_la-crc64_fast.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/crc64_fast.c' object='liblzma_la-crc64_fast.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-crc64_fast.lo `test -f 'check/crc64_fast.c' || echo '$(srcdir)/'`check/crc64_fast.c
+
+liblzma_la-sha256.lo: check/sha256.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-sha256.lo -MD -MP -MF $(DEPDIR)/liblzma_la-sha256.Tpo -c -o liblzma_la-sha256.lo `test -f 'check/sha256.c' || echo '$(srcdir)/'`check/sha256.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-sha256.Tpo $(DEPDIR)/liblzma_la-sha256.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='check/sha256.c' object='liblzma_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-sha256.lo `test -f 'check/sha256.c' || echo '$(srcdir)/'`check/sha256.c
+
+liblzma_la-lz_encoder.lo: lz/lz_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lz_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lz_encoder.Tpo -c -o liblzma_la-lz_encoder.lo `test -f 'lz/lz_encoder.c' || echo '$(srcdir)/'`lz/lz_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lz_encoder.Tpo $(DEPDIR)/liblzma_la-lz_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lz/lz_encoder.c' object='liblzma_la-lz_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lz_encoder.lo `test -f 'lz/lz_encoder.c' || echo '$(srcdir)/'`lz/lz_encoder.c
+
+liblzma_la-lz_encoder_mf.lo: lz/lz_encoder_mf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lz_encoder_mf.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lz_encoder_mf.Tpo -c -o liblzma_la-lz_encoder_mf.lo `test -f 'lz/lz_encoder_mf.c' || echo '$(srcdir)/'`lz/lz_encoder_mf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lz_encoder_mf.Tpo $(DEPDIR)/liblzma_la-lz_encoder_mf.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lz/lz_encoder_mf.c' object='liblzma_la-lz_encoder_mf.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lz_encoder_mf.lo `test -f 'lz/lz_encoder_mf.c' || echo '$(srcdir)/'`lz/lz_encoder_mf.c
+
+liblzma_la-lz_decoder.lo: lz/lz_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lz_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lz_decoder.Tpo -c -o liblzma_la-lz_decoder.lo `test -f 'lz/lz_decoder.c' || echo '$(srcdir)/'`lz/lz_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lz_decoder.Tpo $(DEPDIR)/liblzma_la-lz_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lz/lz_decoder.c' object='liblzma_la-lz_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lz_decoder.lo `test -f 'lz/lz_decoder.c' || echo '$(srcdir)/'`lz/lz_decoder.c
+
+liblzma_la-lzma_encoder_presets.lo: lzma/lzma_encoder_presets.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzma_encoder_presets.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzma_encoder_presets.Tpo -c -o liblzma_la-lzma_encoder_presets.lo `test -f 'lzma/lzma_encoder_presets.c' || echo '$(srcdir)/'`lzma/lzma_encoder_presets.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzma_encoder_presets.Tpo $(DEPDIR)/liblzma_la-lzma_encoder_presets.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/lzma_encoder_presets.c' object='liblzma_la-lzma_encoder_presets.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzma_encoder_presets.lo `test -f 'lzma/lzma_encoder_presets.c' || echo '$(srcdir)/'`lzma/lzma_encoder_presets.c
+
+liblzma_la-lzma_encoder.lo: lzma/lzma_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzma_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzma_encoder.Tpo -c -o liblzma_la-lzma_encoder.lo `test -f 'lzma/lzma_encoder.c' || echo '$(srcdir)/'`lzma/lzma_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzma_encoder.Tpo $(DEPDIR)/liblzma_la-lzma_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/lzma_encoder.c' object='liblzma_la-lzma_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzma_encoder.lo `test -f 'lzma/lzma_encoder.c' || echo '$(srcdir)/'`lzma/lzma_encoder.c
+
+liblzma_la-lzma_encoder_optimum_fast.lo: lzma/lzma_encoder_optimum_fast.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzma_encoder_optimum_fast.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzma_encoder_optimum_fast.Tpo -c -o liblzma_la-lzma_encoder_optimum_fast.lo `test -f 'lzma/lzma_encoder_optimum_fast.c' || echo '$(srcdir)/'`lzma/lzma_encoder_optimum_fast.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzma_encoder_optimum_fast.Tpo $(DEPDIR)/liblzma_la-lzma_encoder_optimum_fast.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/lzma_encoder_optimum_fast.c' object='liblzma_la-lzma_encoder_optimum_fast.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzma_encoder_optimum_fast.lo `test -f 'lzma/lzma_encoder_optimum_fast.c' || echo '$(srcdir)/'`lzma/lzma_encoder_optimum_fast.c
+
+liblzma_la-lzma_encoder_optimum_normal.lo: lzma/lzma_encoder_optimum_normal.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzma_encoder_optimum_normal.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzma_encoder_optimum_normal.Tpo -c -o liblzma_la-lzma_encoder_optimum_normal.lo `test -f 'lzma/lzma_encoder_optimum_normal.c' || echo '$(srcdir)/'`lzma/lzma_encoder_optimum_normal.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzma_encoder_optimum_normal.Tpo $(DEPDIR)/liblzma_la-lzma_encoder_optimum_normal.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/lzma_encoder_optimum_normal.c' object='liblzma_la-lzma_encoder_optimum_normal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzma_encoder_optimum_normal.lo `test -f 'lzma/lzma_encoder_optimum_normal.c' || echo '$(srcdir)/'`lzma/lzma_encoder_optimum_normal.c
+
+liblzma_la-fastpos_table.lo: lzma/fastpos_table.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-fastpos_table.lo -MD -MP -MF $(DEPDIR)/liblzma_la-fastpos_table.Tpo -c -o liblzma_la-fastpos_table.lo `test -f 'lzma/fastpos_table.c' || echo '$(srcdir)/'`lzma/fastpos_table.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-fastpos_table.Tpo $(DEPDIR)/liblzma_la-fastpos_table.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/fastpos_table.c' object='liblzma_la-fastpos_table.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-fastpos_table.lo `test -f 'lzma/fastpos_table.c' || echo '$(srcdir)/'`lzma/fastpos_table.c
+
+liblzma_la-lzma_decoder.lo: lzma/lzma_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzma_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzma_decoder.Tpo -c -o liblzma_la-lzma_decoder.lo `test -f 'lzma/lzma_decoder.c' || echo '$(srcdir)/'`lzma/lzma_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzma_decoder.Tpo $(DEPDIR)/liblzma_la-lzma_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/lzma_decoder.c' object='liblzma_la-lzma_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzma_decoder.lo `test -f 'lzma/lzma_decoder.c' || echo '$(srcdir)/'`lzma/lzma_decoder.c
+
+liblzma_la-lzma2_encoder.lo: lzma/lzma2_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzma2_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzma2_encoder.Tpo -c -o liblzma_la-lzma2_encoder.lo `test -f 'lzma/lzma2_encoder.c' || echo '$(srcdir)/'`lzma/lzma2_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzma2_encoder.Tpo $(DEPDIR)/liblzma_la-lzma2_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/lzma2_encoder.c' object='liblzma_la-lzma2_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzma2_encoder.lo `test -f 'lzma/lzma2_encoder.c' || echo '$(srcdir)/'`lzma/lzma2_encoder.c
+
+liblzma_la-lzma2_decoder.lo: lzma/lzma2_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-lzma2_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-lzma2_decoder.Tpo -c -o liblzma_la-lzma2_decoder.lo `test -f 'lzma/lzma2_decoder.c' || echo '$(srcdir)/'`lzma/lzma2_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-lzma2_decoder.Tpo $(DEPDIR)/liblzma_la-lzma2_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma/lzma2_decoder.c' object='liblzma_la-lzma2_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-lzma2_decoder.lo `test -f 'lzma/lzma2_decoder.c' || echo '$(srcdir)/'`lzma/lzma2_decoder.c
+
+liblzma_la-price_table.lo: rangecoder/price_table.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-price_table.lo -MD -MP -MF $(DEPDIR)/liblzma_la-price_table.Tpo -c -o liblzma_la-price_table.lo `test -f 'rangecoder/price_table.c' || echo '$(srcdir)/'`rangecoder/price_table.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-price_table.Tpo $(DEPDIR)/liblzma_la-price_table.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rangecoder/price_table.c' object='liblzma_la-price_table.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-price_table.lo `test -f 'rangecoder/price_table.c' || echo '$(srcdir)/'`rangecoder/price_table.c
+
+liblzma_la-delta_common.lo: delta/delta_common.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-delta_common.lo -MD -MP -MF $(DEPDIR)/liblzma_la-delta_common.Tpo -c -o liblzma_la-delta_common.lo `test -f 'delta/delta_common.c' || echo '$(srcdir)/'`delta/delta_common.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-delta_common.Tpo $(DEPDIR)/liblzma_la-delta_common.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='delta/delta_common.c' object='liblzma_la-delta_common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-delta_common.lo `test -f 'delta/delta_common.c' || echo '$(srcdir)/'`delta/delta_common.c
+
+liblzma_la-delta_encoder.lo: delta/delta_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-delta_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-delta_encoder.Tpo -c -o liblzma_la-delta_encoder.lo `test -f 'delta/delta_encoder.c' || echo '$(srcdir)/'`delta/delta_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-delta_encoder.Tpo $(DEPDIR)/liblzma_la-delta_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='delta/delta_encoder.c' object='liblzma_la-delta_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-delta_encoder.lo `test -f 'delta/delta_encoder.c' || echo '$(srcdir)/'`delta/delta_encoder.c
+
+liblzma_la-delta_decoder.lo: delta/delta_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-delta_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-delta_decoder.Tpo -c -o liblzma_la-delta_decoder.lo `test -f 'delta/delta_decoder.c' || echo '$(srcdir)/'`delta/delta_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-delta_decoder.Tpo $(DEPDIR)/liblzma_la-delta_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='delta/delta_decoder.c' object='liblzma_la-delta_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-delta_decoder.lo `test -f 'delta/delta_decoder.c' || echo '$(srcdir)/'`delta/delta_decoder.c
+
+liblzma_la-simple_coder.lo: simple/simple_coder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-simple_coder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-simple_coder.Tpo -c -o liblzma_la-simple_coder.lo `test -f 'simple/simple_coder.c' || echo '$(srcdir)/'`simple/simple_coder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-simple_coder.Tpo $(DEPDIR)/liblzma_la-simple_coder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/simple_coder.c' object='liblzma_la-simple_coder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-simple_coder.lo `test -f 'simple/simple_coder.c' || echo '$(srcdir)/'`simple/simple_coder.c
+
+liblzma_la-simple_encoder.lo: simple/simple_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-simple_encoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-simple_encoder.Tpo -c -o liblzma_la-simple_encoder.lo `test -f 'simple/simple_encoder.c' || echo '$(srcdir)/'`simple/simple_encoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-simple_encoder.Tpo $(DEPDIR)/liblzma_la-simple_encoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/simple_encoder.c' object='liblzma_la-simple_encoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-simple_encoder.lo `test -f 'simple/simple_encoder.c' || echo '$(srcdir)/'`simple/simple_encoder.c
+
+liblzma_la-simple_decoder.lo: simple/simple_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-simple_decoder.lo -MD -MP -MF $(DEPDIR)/liblzma_la-simple_decoder.Tpo -c -o liblzma_la-simple_decoder.lo `test -f 'simple/simple_decoder.c' || echo '$(srcdir)/'`simple/simple_decoder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-simple_decoder.Tpo $(DEPDIR)/liblzma_la-simple_decoder.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/simple_decoder.c' object='liblzma_la-simple_decoder.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-simple_decoder.lo `test -f 'simple/simple_decoder.c' || echo '$(srcdir)/'`simple/simple_decoder.c
+
+liblzma_la-x86.lo: simple/x86.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-x86.lo -MD -MP -MF $(DEPDIR)/liblzma_la-x86.Tpo -c -o liblzma_la-x86.lo `test -f 'simple/x86.c' || echo '$(srcdir)/'`simple/x86.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-x86.Tpo $(DEPDIR)/liblzma_la-x86.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/x86.c' object='liblzma_la-x86.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-x86.lo `test -f 'simple/x86.c' || echo '$(srcdir)/'`simple/x86.c
+
+liblzma_la-powerpc.lo: simple/powerpc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-powerpc.lo -MD -MP -MF $(DEPDIR)/liblzma_la-powerpc.Tpo -c -o liblzma_la-powerpc.lo `test -f 'simple/powerpc.c' || echo '$(srcdir)/'`simple/powerpc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-powerpc.Tpo $(DEPDIR)/liblzma_la-powerpc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/powerpc.c' object='liblzma_la-powerpc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-powerpc.lo `test -f 'simple/powerpc.c' || echo '$(srcdir)/'`simple/powerpc.c
+
+liblzma_la-ia64.lo: simple/ia64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-ia64.lo -MD -MP -MF $(DEPDIR)/liblzma_la-ia64.Tpo -c -o liblzma_la-ia64.lo `test -f 'simple/ia64.c' || echo '$(srcdir)/'`simple/ia64.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-ia64.Tpo $(DEPDIR)/liblzma_la-ia64.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/ia64.c' object='liblzma_la-ia64.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-ia64.lo `test -f 'simple/ia64.c' || echo '$(srcdir)/'`simple/ia64.c
+
+liblzma_la-arm.lo: simple/arm.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-arm.lo -MD -MP -MF $(DEPDIR)/liblzma_la-arm.Tpo -c -o liblzma_la-arm.lo `test -f 'simple/arm.c' || echo '$(srcdir)/'`simple/arm.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-arm.Tpo $(DEPDIR)/liblzma_la-arm.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/arm.c' object='liblzma_la-arm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-arm.lo `test -f 'simple/arm.c' || echo '$(srcdir)/'`simple/arm.c
+
+liblzma_la-armthumb.lo: simple/armthumb.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-armthumb.lo -MD -MP -MF $(DEPDIR)/liblzma_la-armthumb.Tpo -c -o liblzma_la-armthumb.lo `test -f 'simple/armthumb.c' || echo '$(srcdir)/'`simple/armthumb.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-armthumb.Tpo $(DEPDIR)/liblzma_la-armthumb.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/armthumb.c' object='liblzma_la-armthumb.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-armthumb.lo `test -f 'simple/armthumb.c' || echo '$(srcdir)/'`simple/armthumb.c
+
+liblzma_la-arm64.lo: simple/arm64.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-arm64.lo -MD -MP -MF $(DEPDIR)/liblzma_la-arm64.Tpo -c -o liblzma_la-arm64.lo `test -f 'simple/arm64.c' || echo '$(srcdir)/'`simple/arm64.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-arm64.Tpo $(DEPDIR)/liblzma_la-arm64.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/arm64.c' object='liblzma_la-arm64.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-arm64.lo `test -f 'simple/arm64.c' || echo '$(srcdir)/'`simple/arm64.c
+
+liblzma_la-sparc.lo: simple/sparc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT liblzma_la-sparc.lo -MD -MP -MF $(DEPDIR)/liblzma_la-sparc.Tpo -c -o liblzma_la-sparc.lo `test -f 'simple/sparc.c' || echo '$(srcdir)/'`simple/sparc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblzma_la-sparc.Tpo $(DEPDIR)/liblzma_la-sparc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='simple/sparc.c' object='liblzma_la-sparc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o liblzma_la-sparc.lo `test -f 'simple/sparc.c' || echo '$(srcdir)/'`simple/sparc.c
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-docDATA: $(doc_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+ done
+
+uninstall-docDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(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-recursive
+
+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-recursive
+
+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
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(LTLIBRARIES) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-recursive
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f ./$(DEPDIR)/liblzma_la-alone_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-alone_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-arm.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-arm64.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-armthumb.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-auto_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_buffer_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_header_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_header_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_util.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-check.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_fast.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_small.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_x86.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_fast.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_small.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_x86.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-delta_common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-delta_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-delta_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_decoder_memusage.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_encoder_memusage.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_preset.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-fastpos_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-file_info.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_buffer_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_flags_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_flags_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-hardware_cputhreads.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-hardware_physmem.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-ia64.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index_hash.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lz_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lz_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lz_encoder_mf.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzip_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma2_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma2_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_fast.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_normal.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder_presets.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-microlzma_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-microlzma_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-outqueue.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-powerpc.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-price_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-sha256.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-simple_coder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-simple_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-simple_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-sparc.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_buffer_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_decoder_mt.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_encoder_mt.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_flags_common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_flags_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_flags_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-string_conversion.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-tuklib_cpucores.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-tuklib_physmem.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-vli_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-vli_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-vli_size.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-x86.Plo
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-docDATA install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f ./$(DEPDIR)/liblzma_la-alone_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-alone_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-arm.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-arm64.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-armthumb.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-auto_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_buffer_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_header_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_header_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-block_util.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-check.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_fast.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_small.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc32_x86.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_fast.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_small.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-crc64_x86.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-delta_common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-delta_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-delta_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_decoder_memusage.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_encoder_memusage.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-easy_preset.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-fastpos_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-file_info.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_buffer_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_flags_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-filter_flags_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-hardware_cputhreads.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-hardware_physmem.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-ia64.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-index_hash.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lz_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lz_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lz_encoder_mf.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzip_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma2_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma2_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_fast.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder_optimum_normal.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-lzma_encoder_presets.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-microlzma_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-microlzma_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-outqueue.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-powerpc.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-price_table.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-sha256.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-simple_coder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-simple_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-simple_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-sparc.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_buffer_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_buffer_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_decoder_mt.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_encoder_mt.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_flags_common.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_flags_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-stream_flags_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-string_conversion.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-tuklib_cpucores.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-tuklib_physmem.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-vli_decoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-vli_encoder.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-vli_size.Plo
+ -rm -f ./$(DEPDIR)/liblzma_la-x86.Plo
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-docDATA uninstall-libLTLIBRARIES \
+ uninstall-pkgconfigDATA
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--depfiles check check-am clean clean-generic \
+ clean-libLTLIBRARIES 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-docDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libLTLIBRARIES \
+ install-man install-pdf install-pdf-am install-pkgconfigDATA \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am 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-docDATA \
+ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA
+
+.PRECIOUS: Makefile
+
+
+# Windows resource compiler support. libtool knows what to do with .rc
+# files, but Automake (<= 1.11 at least) doesn't know.
+#
+# We want the resource file only in shared liblzma. To avoid linking it into
+# static liblzma, we overwrite the static object file with an object file
+# compiled from empty input. Note that GNU-specific features are OK here,
+# because on Windows we are compiled with the GNU toolchain.
+#
+# The typedef in empty.c will prevent an empty translation unit, which is
+# not allowed by the C standard. It results in a warning with
+# -Wempty-translation-unit with Clang or -pedantic for GCC.
+.rc.lo:
+ $(LIBTOOL) --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) \
+ $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) \
+ -i $< -o $@
+ echo "typedef void empty;" > empty.c
+ $(COMPILE) -c empty.c -o $(*D)/$(*F).o
+
+# Remove ordinals from the generated .def file. People must link by name,
+# not by ordinal, because no one is going to track the ordinal numbers.
+liblzma.def: liblzma.la liblzma.def.in
+ sed 's/ \+@ *[0-9]\+//' liblzma.def.in > liblzma.def
+
+# Creating liblzma.def.in is a side effect of linking the library.
+liblzma.def.in: liblzma.la
+
+liblzma.pc: $(srcdir)/liblzma.pc.in
+ $(AM_V_at)rm -f $@
+ $(pc_verbose)sed \
+ -e 's,@prefix[@],$(prefix),g' \
+ -e 's,@exec_prefix[@],$(exec_prefix),g' \
+ -e 's,@libdir[@],$(libdir),g' \
+ -e 's,@includedir[@],$(includedir),g' \
+ -e 's,@PACKAGE_URL[@],$(PACKAGE_URL),g' \
+ -e 's,@PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
+ -e 's,@PTHREAD_CFLAGS[@],$(PTHREAD_CFLAGS),g' \
+ -e 's,@LIBS[@],$(LIBS),g' \
+ < $(srcdir)/liblzma.pc.in > $@ || { rm -f $@; exit 1; }
+
+clean-local:
+ rm -f liblzma.pc
+
+# 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:
diff --git a/src/liblzma/api/Makefile.am b/src/liblzma/api/Makefile.am
new file mode 100644
index 0000000..db24600
--- /dev/null
+++ b/src/liblzma/api/Makefile.am
@@ -0,0 +1,23 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+nobase_include_HEADERS = \
+ lzma.h \
+ lzma/base.h \
+ lzma/bcj.h \
+ lzma/block.h \
+ lzma/check.h \
+ lzma/container.h \
+ lzma/delta.h \
+ lzma/filter.h \
+ lzma/hardware.h \
+ lzma/index.h \
+ lzma/index_hash.h \
+ lzma/lzma12.h \
+ lzma/stream_flags.h \
+ lzma/version.h \
+ lzma/vli.h
diff --git a/src/liblzma/api/Makefile.in b/src/liblzma/api/Makefile.in
new file mode 100644
index 0000000..ea5cfd6
--- /dev/null
+++ b/src/liblzma/api/Makefile.in
@@ -0,0 +1,630 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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 = src/liblzma/api
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 $(nobase_include_HEADERS) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+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 =
+SOURCES =
+DIST_SOURCES =
+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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(includedir)"
+HEADERS = $(nobase_include_HEADERS)
+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 = $(srcdir)/Makefile.in
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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@
+nobase_include_HEADERS = \
+ lzma.h \
+ lzma/base.h \
+ lzma/bcj.h \
+ lzma/block.h \
+ lzma/check.h \
+ lzma/container.h \
+ lzma/delta.h \
+ lzma/filter.h \
+ lzma/hardware.h \
+ lzma/index.h \
+ lzma/index_hash.h \
+ lzma/lzma12.h \
+ lzma/stream_flags.h \
+ lzma/version.h \
+ lzma/vli.h
+
+all: all-am
+
+.SUFFIXES:
+$(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/liblzma/api/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/liblzma/api/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):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-nobase_includeHEADERS: $(nobase_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+ fi; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \
+ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \
+ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ dir='$(DESTDIR)$(includedir)'; $(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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(includedir)"; 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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_includeHEADERS
+
+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 Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-nobase_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool cscopelist-am ctags ctags-am distclean \
+ 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-nobase_includeHEADERS install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-nobase_includeHEADERS
+
+.PRECIOUS: Makefile
+
+
+# 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:
diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h
new file mode 100644
index 0000000..de12f22
--- /dev/null
+++ b/src/liblzma/api/lzma.h
@@ -0,0 +1,328 @@
+/**
+ * \file api/lzma.h
+ * \brief The public API of liblzma data compression library
+ * \mainpage
+ *
+ * liblzma is a public domain general-purpose data compression library with
+ * a zlib-like API. The native file format is .xz, but also the old .lzma
+ * format and raw (no headers) streams are supported. Multiple compression
+ * algorithms (filters) are supported. Currently LZMA2 is the primary filter.
+ *
+ * liblzma is part of XZ Utils <https://tukaani.org/xz/>. XZ Utils includes
+ * a gzip-like command line tool named xz and some other tools. XZ Utils
+ * is developed and maintained by Lasse Collin and Jia Tan.
+ *
+ * Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
+ * <https://7-zip.org/sdk.html>.
+ *
+ * The SHA-256 implementation is based on the public domain code found from
+ * 7-Zip <https://7-zip.org/>, which has a modified version of the public
+ * domain SHA-256 code found from Crypto++ <https://www.cryptopp.com/>.
+ * The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H
+#define LZMA_H
+
+/*****************************
+ * Required standard headers *
+ *****************************/
+
+/*
+ * liblzma API headers need some standard types and macros. To allow
+ * including lzma.h without requiring the application to include other
+ * headers first, lzma.h includes the required standard headers unless
+ * they already seem to be included already or if LZMA_MANUAL_HEADERS
+ * has been defined.
+ *
+ * Here's what types and macros are needed and from which headers:
+ * - stddef.h: size_t, NULL
+ * - stdint.h: uint8_t, uint32_t, uint64_t, UINT32_C(n), uint64_C(n),
+ * UINT32_MAX, UINT64_MAX
+ *
+ * However, inttypes.h is a little more portable than stdint.h, although
+ * inttypes.h declares some unneeded things compared to plain stdint.h.
+ *
+ * The hacks below aren't perfect, specifically they assume that inttypes.h
+ * exists and that it typedefs at least uint8_t, uint32_t, and uint64_t,
+ * and that, in case of incomplete inttypes.h, unsigned int is 32-bit.
+ * If the application already takes care of setting up all the types and
+ * macros properly (for example by using gnulib's stdint.h or inttypes.h),
+ * we try to detect that the macros are already defined and don't include
+ * inttypes.h here again. However, you may define LZMA_MANUAL_HEADERS to
+ * force this file to never include any system headers.
+ *
+ * Some could argue that liblzma API should provide all the required types,
+ * for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was
+ * seen as an unnecessary mess, since most systems already provide all the
+ * necessary types and macros in the standard headers.
+ *
+ * Note that liblzma API still has lzma_bool, because using stdbool.h would
+ * break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't
+ * necessarily the same as sizeof(bool) in C++.
+ */
+
+#ifndef LZMA_MANUAL_HEADERS
+ /*
+ * I suppose this works portably also in C++. Note that in C++,
+ * we need to get size_t into the global namespace.
+ */
+# include <stddef.h>
+
+ /*
+ * Skip inttypes.h if we already have all the required macros. If we
+ * have the macros, we assume that we have the matching typedefs too.
+ */
+# if !defined(UINT32_C) || !defined(UINT64_C) \
+ || !defined(UINT32_MAX) || !defined(UINT64_MAX)
+ /*
+ * MSVC versions older than 2013 have no C99 support, and
+ * thus they cannot be used to compile liblzma. Using an
+ * existing liblzma.dll with old MSVC can work though(*),
+ * but we need to define the required standard integer
+ * types here in a MSVC-specific way.
+ *
+ * (*) If you do this, the existing liblzma.dll probably uses
+ * a different runtime library than your MSVC-built
+ * application. Mixing runtimes is generally bad, but
+ * in this case it should work as long as you avoid
+ * the few rarely-needed liblzma functions that allocate
+ * memory and expect the caller to free it using free().
+ */
+# if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int32 uint32_t;
+ typedef unsigned __int64 uint64_t;
+# else
+ /* Use the standard inttypes.h. */
+# ifdef __cplusplus
+ /*
+ * C99 sections 7.18.2 and 7.18.4 specify
+ * that C++ implementations define the limit
+ * and constant macros only if specifically
+ * requested. Note that if you want the
+ * format macros (PRIu64 etc.) too, you need
+ * to define __STDC_FORMAT_MACROS before
+ * including lzma.h, since re-including
+ * inttypes.h with __STDC_FORMAT_MACROS
+ * defined doesn't necessarily work.
+ */
+# ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+# endif
+# ifndef __STDC_CONSTANT_MACROS
+# define __STDC_CONSTANT_MACROS 1
+# endif
+# endif
+
+# include <inttypes.h>
+# endif
+
+ /*
+ * Some old systems have only the typedefs in inttypes.h, and
+ * lack all the macros. For those systems, we need a few more
+ * hacks. We assume that unsigned int is 32-bit and unsigned
+ * long is either 32-bit or 64-bit. If these hacks aren't
+ * enough, the application has to setup the types manually
+ * before including lzma.h.
+ */
+# ifndef UINT32_C
+# if defined(_WIN32) && defined(_MSC_VER)
+# define UINT32_C(n) n ## UI32
+# else
+# define UINT32_C(n) n ## U
+# endif
+# endif
+
+# ifndef UINT64_C
+# if defined(_WIN32) && defined(_MSC_VER)
+# define UINT64_C(n) n ## UI64
+# else
+ /* Get ULONG_MAX. */
+# include <limits.h>
+# if ULONG_MAX == 4294967295UL
+# define UINT64_C(n) n ## ULL
+# else
+# define UINT64_C(n) n ## UL
+# endif
+# endif
+# endif
+
+# ifndef UINT32_MAX
+# define UINT32_MAX (UINT32_C(4294967295))
+# endif
+
+# ifndef UINT64_MAX
+# define UINT64_MAX (UINT64_C(18446744073709551615))
+# endif
+# endif
+#endif /* ifdef LZMA_MANUAL_HEADERS */
+
+
+/******************
+ * LZMA_API macro *
+ ******************/
+
+/*
+ * Some systems require that the functions and function pointers are
+ * declared specially in the headers. LZMA_API_IMPORT is for importing
+ * symbols and LZMA_API_CALL is to specify the calling convention.
+ *
+ * By default it is assumed that the application will link dynamically
+ * against liblzma. #define LZMA_API_STATIC in your application if you
+ * want to link against static liblzma. If you don't care about portability
+ * to operating systems like Windows, or at least don't care about linking
+ * against static liblzma on them, don't worry about LZMA_API_STATIC. That
+ * is, most developers will never need to use LZMA_API_STATIC.
+ *
+ * The GCC variants are a special case on Windows (Cygwin and MinGW-w64).
+ * We rely on GCC doing the right thing with its auto-import feature,
+ * and thus don't use __declspec(dllimport). This way developers don't
+ * need to worry about LZMA_API_STATIC. Also the calling convention is
+ * omitted on Cygwin but not on MinGW-w64.
+ */
+#ifndef LZMA_API_IMPORT
+# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
+# define LZMA_API_IMPORT __declspec(dllimport)
+# else
+# define LZMA_API_IMPORT
+# endif
+#endif
+
+#ifndef LZMA_API_CALL
+# if defined(_WIN32) && !defined(__CYGWIN__)
+# define LZMA_API_CALL __cdecl
+# else
+# define LZMA_API_CALL
+# endif
+#endif
+
+#ifndef LZMA_API
+# define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
+#endif
+
+
+/***********
+ * nothrow *
+ ***********/
+
+/*
+ * None of the functions in liblzma may throw an exception. Even
+ * the functions that use callback functions won't throw exceptions,
+ * because liblzma would break if a callback function threw an exception.
+ */
+#ifndef lzma_nothrow
+# if defined(__cplusplus)
+# if __cplusplus >= 201103L || (defined(_MSVC_LANG) \
+ && _MSVC_LANG >= 201103L)
+# define lzma_nothrow noexcept
+# else
+# define lzma_nothrow throw()
+# endif
+# elif defined(__GNUC__) && (__GNUC__ > 3 \
+ || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
+# define lzma_nothrow __attribute__((__nothrow__))
+# else
+# define lzma_nothrow
+# endif
+#endif
+
+
+/********************
+ * GNU C extensions *
+ ********************/
+
+/*
+ * GNU C extensions are used conditionally in the public API. It doesn't
+ * break anything if these are sometimes enabled and sometimes not, only
+ * affects warnings and optimizations.
+ */
+#if defined(__GNUC__) && __GNUC__ >= 3
+# ifndef lzma_attribute
+# define lzma_attribute(attr) __attribute__(attr)
+# endif
+
+ /* warn_unused_result was added in GCC 3.4. */
+# ifndef lzma_attr_warn_unused_result
+# if __GNUC__ == 3 && __GNUC_MINOR__ < 4
+# define lzma_attr_warn_unused_result
+# endif
+# endif
+
+#else
+# ifndef lzma_attribute
+# define lzma_attribute(attr)
+# endif
+#endif
+
+
+#ifndef lzma_attr_pure
+# define lzma_attr_pure lzma_attribute((__pure__))
+#endif
+
+#ifndef lzma_attr_const
+# define lzma_attr_const lzma_attribute((__const__))
+#endif
+
+#ifndef lzma_attr_warn_unused_result
+# define lzma_attr_warn_unused_result \
+ lzma_attribute((__warn_unused_result__))
+#endif
+
+
+/**************
+ * Subheaders *
+ **************/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Subheaders check that this is defined. It is to prevent including
+ * them directly from applications.
+ */
+#define LZMA_H_INTERNAL 1
+
+/* Basic features */
+#include "lzma/version.h"
+#include "lzma/base.h"
+#include "lzma/vli.h"
+#include "lzma/check.h"
+
+/* Filters */
+#include "lzma/filter.h"
+#include "lzma/bcj.h"
+#include "lzma/delta.h"
+#include "lzma/lzma12.h"
+
+/* Container formats */
+#include "lzma/container.h"
+
+/* Advanced features */
+#include "lzma/stream_flags.h"
+#include "lzma/block.h"
+#include "lzma/index.h"
+#include "lzma/index_hash.h"
+
+/* Hardware information */
+#include "lzma/hardware.h"
+
+/*
+ * All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
+ * re-including the subheaders.
+ */
+#undef LZMA_H_INTERNAL
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ifndef LZMA_H */
diff --git a/src/liblzma/api/lzma/base.h b/src/liblzma/api/lzma/base.h
new file mode 100644
index 0000000..75cdd72
--- /dev/null
+++ b/src/liblzma/api/lzma/base.h
@@ -0,0 +1,748 @@
+/**
+ * \file lzma/base.h
+ * \brief Data types and functions used in many places in liblzma API
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Boolean
+ *
+ * This is here because C89 doesn't have stdbool.h. To set a value for
+ * variables having type lzma_bool, you can use
+ * - C99's `true' and `false' from stdbool.h;
+ * - C++'s internal `true' and `false'; or
+ * - integers one (true) and zero (false).
+ */
+typedef unsigned char lzma_bool;
+
+
+/**
+ * \brief Type of reserved enumeration variable in structures
+ *
+ * To avoid breaking library ABI when new features are added, several
+ * structures contain extra variables that may be used in future. Since
+ * sizeof(enum) can be different than sizeof(int), and sizeof(enum) may
+ * even vary depending on the range of enumeration constants, we specify
+ * a separate type to be used for reserved enumeration variables. All
+ * enumeration constants in liblzma API will be non-negative and less
+ * than 128, which should guarantee that the ABI won't break even when
+ * new constants are added to existing enumerations.
+ */
+typedef enum {
+ LZMA_RESERVED_ENUM = 0
+} lzma_reserved_enum;
+
+
+/**
+ * \brief Return values used by several functions in liblzma
+ *
+ * Check the descriptions of specific functions to find out which return
+ * values they can return. With some functions the return values may have
+ * more specific meanings than described here; those differences are
+ * described per-function basis.
+ */
+typedef enum {
+ LZMA_OK = 0,
+ /**<
+ * \brief Operation completed successfully
+ */
+
+ LZMA_STREAM_END = 1,
+ /**<
+ * \brief End of stream was reached
+ *
+ * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
+ * LZMA_FINISH was finished. In decoder, this indicates
+ * that all the data was successfully decoded.
+ *
+ * In all cases, when LZMA_STREAM_END is returned, the last
+ * output bytes should be picked from strm->next_out.
+ */
+
+ LZMA_NO_CHECK = 2,
+ /**<
+ * \brief Input stream has no integrity check
+ *
+ * This return value can be returned only if the
+ * LZMA_TELL_NO_CHECK flag was used when initializing
+ * the decoder. LZMA_NO_CHECK is just a warning, and
+ * the decoding can be continued normally.
+ *
+ * It is possible to call lzma_get_check() immediately after
+ * lzma_code has returned LZMA_NO_CHECK. The result will
+ * naturally be LZMA_CHECK_NONE, but the possibility to call
+ * lzma_get_check() may be convenient in some applications.
+ */
+
+ LZMA_UNSUPPORTED_CHECK = 3,
+ /**<
+ * \brief Cannot calculate the integrity check
+ *
+ * The usage of this return value is different in encoders
+ * and decoders.
+ *
+ * Encoders can return this value only from the initialization
+ * function. If initialization fails with this value, the
+ * encoding cannot be done, because there's no way to produce
+ * output with the correct integrity check.
+ *
+ * Decoders can return this value only from lzma_code() and
+ * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
+ * initializing the decoder. The decoding can still be
+ * continued normally even if the check type is unsupported,
+ * but naturally the check will not be validated, and possible
+ * errors may go undetected.
+ *
+ * With decoder, it is possible to call lzma_get_check()
+ * immediately after lzma_code() has returned
+ * LZMA_UNSUPPORTED_CHECK. This way it is possible to find
+ * out what the unsupported Check ID was.
+ */
+
+ LZMA_GET_CHECK = 4,
+ /**<
+ * \brief Integrity check type is now available
+ *
+ * This value can be returned only by the lzma_code() function
+ * and only if the decoder was initialized with the
+ * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
+ * application that it may now call lzma_get_check() to find
+ * out the Check ID. This can be used, for example, to
+ * implement a decoder that accepts only files that have
+ * strong enough integrity check.
+ */
+
+ LZMA_MEM_ERROR = 5,
+ /**<
+ * \brief Cannot allocate memory
+ *
+ * Memory allocation failed, or the size of the allocation
+ * would be greater than SIZE_MAX.
+ *
+ * Due to internal implementation reasons, the coding cannot
+ * be continued even if more memory were made available after
+ * LZMA_MEM_ERROR.
+ */
+
+ LZMA_MEMLIMIT_ERROR = 6,
+ /**<
+ * \brief Memory usage limit was reached
+ *
+ * Decoder would need more memory than allowed by the
+ * specified memory usage limit. To continue decoding,
+ * the memory usage limit has to be increased with
+ * lzma_memlimit_set().
+ *
+ * liblzma 5.2.6 and earlier had a bug in single-threaded .xz
+ * decoder (lzma_stream_decoder()) which made it impossible
+ * to continue decoding after LZMA_MEMLIMIT_ERROR even if
+ * the limit was increased using lzma_memlimit_set().
+ * Other decoders worked correctly.
+ */
+
+ LZMA_FORMAT_ERROR = 7,
+ /**<
+ * \brief File format not recognized
+ *
+ * The decoder did not recognize the input as supported file
+ * format. This error can occur, for example, when trying to
+ * decode .lzma format file with lzma_stream_decoder,
+ * because lzma_stream_decoder accepts only the .xz format.
+ */
+
+ LZMA_OPTIONS_ERROR = 8,
+ /**<
+ * \brief Invalid or unsupported options
+ *
+ * Invalid or unsupported options, for example
+ * - unsupported filter(s) or filter options; or
+ * - reserved bits set in headers (decoder only).
+ *
+ * Rebuilding liblzma with more features enabled, or
+ * upgrading to a newer version of liblzma may help.
+ */
+
+ LZMA_DATA_ERROR = 9,
+ /**<
+ * \brief Data is corrupt
+ *
+ * The usage of this return value is different in encoders
+ * and decoders. In both encoder and decoder, the coding
+ * cannot continue after this error.
+ *
+ * Encoders return this if size limits of the target file
+ * format would be exceeded. These limits are huge, thus
+ * getting this error from an encoder is mostly theoretical.
+ * For example, the maximum compressed and uncompressed
+ * size of a .xz Stream is roughly 8 EiB (2^63 bytes).
+ *
+ * Decoders return this error if the input data is corrupt.
+ * This can mean, for example, invalid CRC32 in headers
+ * or invalid check of uncompressed data.
+ */
+
+ LZMA_BUF_ERROR = 10,
+ /**<
+ * \brief No progress is possible
+ *
+ * This error code is returned when the coder cannot consume
+ * any new input and produce any new output. The most common
+ * reason for this error is that the input stream being
+ * decoded is truncated or corrupt.
+ *
+ * This error is not fatal. Coding can be continued normally
+ * by providing more input and/or more output space, if
+ * possible.
+ *
+ * Typically the first call to lzma_code() that can do no
+ * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
+ * the second consecutive call doing no progress will return
+ * LZMA_BUF_ERROR. This is intentional.
+ *
+ * With zlib, Z_BUF_ERROR may be returned even if the
+ * application is doing nothing wrong, so apps will need
+ * to handle Z_BUF_ERROR specially. The above hack
+ * guarantees that liblzma never returns LZMA_BUF_ERROR
+ * to properly written applications unless the input file
+ * is truncated or corrupt. This should simplify the
+ * applications a little.
+ */
+
+ LZMA_PROG_ERROR = 11,
+ /**<
+ * \brief Programming error
+ *
+ * This indicates that the arguments given to the function are
+ * invalid or the internal state of the decoder is corrupt.
+ * - Function arguments are invalid or the structures
+ * pointed by the argument pointers are invalid
+ * e.g. if strm->next_out has been set to NULL and
+ * strm->avail_out > 0 when calling lzma_code().
+ * - lzma_* functions have been called in wrong order
+ * e.g. lzma_code() was called right after lzma_end().
+ * - If errors occur randomly, the reason might be flaky
+ * hardware.
+ *
+ * If you think that your code is correct, this error code
+ * can be a sign of a bug in liblzma. See the documentation
+ * how to report bugs.
+ */
+
+ LZMA_SEEK_NEEDED = 12,
+ /**<
+ * \brief Request to change the input file position
+ *
+ * Some coders can do random access in the input file. The
+ * initialization functions of these coders take the file size
+ * as an argument. No other coders can return LZMA_SEEK_NEEDED.
+ *
+ * When this value is returned, the application must seek to
+ * the file position given in lzma_stream.seek_pos. This value
+ * is guaranteed to never exceed the file size that was
+ * specified at the coder initialization.
+ *
+ * After seeking the application should read new input and
+ * pass it normally via lzma_stream.next_in and .avail_in.
+ */
+
+ /*
+ * These eumerations may be used internally by liblzma
+ * but they will never be returned to applications.
+ */
+ LZMA_RET_INTERNAL1 = 101,
+ LZMA_RET_INTERNAL2 = 102,
+ LZMA_RET_INTERNAL3 = 103,
+ LZMA_RET_INTERNAL4 = 104,
+ LZMA_RET_INTERNAL5 = 105,
+ LZMA_RET_INTERNAL6 = 106,
+ LZMA_RET_INTERNAL7 = 107,
+ LZMA_RET_INTERNAL8 = 108
+} lzma_ret;
+
+
+/**
+ * \brief The `action' argument for lzma_code()
+ *
+ * After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, LZMA_FULL_BARRIER,
+ * or LZMA_FINISH, the same `action' must be used until lzma_code() returns
+ * LZMA_STREAM_END. Also, the amount of input (that is, strm->avail_in) must
+ * not be modified by the application until lzma_code() returns
+ * LZMA_STREAM_END. Changing the `action' or modifying the amount of input
+ * will make lzma_code() return LZMA_PROG_ERROR.
+ */
+typedef enum {
+ LZMA_RUN = 0,
+ /**<
+ * \brief Continue coding
+ *
+ * Encoder: Encode as much input as possible. Some internal
+ * buffering will probably be done (depends on the filter
+ * chain in use), which causes latency: the input used won't
+ * usually be decodeable from the output of the same
+ * lzma_code() call.
+ *
+ * Decoder: Decode as much input as possible and produce as
+ * much output as possible.
+ */
+
+ LZMA_SYNC_FLUSH = 1,
+ /**<
+ * \brief Make all the input available at output
+ *
+ * Normally the encoder introduces some latency.
+ * LZMA_SYNC_FLUSH forces all the buffered data to be
+ * available at output without resetting the internal
+ * state of the encoder. This way it is possible to use
+ * compressed stream for example for communication over
+ * network.
+ *
+ * Only some filters support LZMA_SYNC_FLUSH. Trying to use
+ * LZMA_SYNC_FLUSH with filters that don't support it will
+ * make lzma_code() return LZMA_OPTIONS_ERROR. For example,
+ * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
+ *
+ * Using LZMA_SYNC_FLUSH very often can dramatically reduce
+ * the compression ratio. With some filters (for example,
+ * LZMA2), fine-tuning the compression options may help
+ * mitigate this problem significantly (for example,
+ * match finder with LZMA2).
+ *
+ * Decoders don't support LZMA_SYNC_FLUSH.
+ */
+
+ LZMA_FULL_FLUSH = 2,
+ /**<
+ * \brief Finish encoding of the current Block
+ *
+ * All the input data going to the current Block must have
+ * been given to the encoder (the last bytes can still be
+ * pending in *next_in). Call lzma_code() with LZMA_FULL_FLUSH
+ * until it returns LZMA_STREAM_END. Then continue normally
+ * with LZMA_RUN or finish the Stream with LZMA_FINISH.
+ *
+ * This action is currently supported only by Stream encoder
+ * and easy encoder (which uses Stream encoder). If there is
+ * no unfinished Block, no empty Block is created.
+ */
+
+ LZMA_FULL_BARRIER = 4,
+ /**<
+ * \brief Finish encoding of the current Block
+ *
+ * This is like LZMA_FULL_FLUSH except that this doesn't
+ * necessarily wait until all the input has been made
+ * available via the output buffer. That is, lzma_code()
+ * might return LZMA_STREAM_END as soon as all the input
+ * has been consumed (avail_in == 0).
+ *
+ * LZMA_FULL_BARRIER is useful with a threaded encoder if
+ * one wants to split the .xz Stream into Blocks at specific
+ * offsets but doesn't care if the output isn't flushed
+ * immediately. Using LZMA_FULL_BARRIER allows keeping
+ * the threads busy while LZMA_FULL_FLUSH would make
+ * lzma_code() wait until all the threads have finished
+ * until more data could be passed to the encoder.
+ *
+ * With a lzma_stream initialized with the single-threaded
+ * lzma_stream_encoder() or lzma_easy_encoder(),
+ * LZMA_FULL_BARRIER is an alias for LZMA_FULL_FLUSH.
+ */
+
+ LZMA_FINISH = 3
+ /**<
+ * \brief Finish the coding operation
+ *
+ * All the input data must have been given to the encoder
+ * (the last bytes can still be pending in next_in).
+ * Call lzma_code() with LZMA_FINISH until it returns
+ * LZMA_STREAM_END. Once LZMA_FINISH has been used,
+ * the amount of input must no longer be changed by
+ * the application.
+ *
+ * When decoding, using LZMA_FINISH is optional unless the
+ * LZMA_CONCATENATED flag was used when the decoder was
+ * initialized. When LZMA_CONCATENATED was not used, the only
+ * effect of LZMA_FINISH is that the amount of input must not
+ * be changed just like in the encoder.
+ */
+} lzma_action;
+
+
+/**
+ * \brief Custom functions for memory handling
+ *
+ * A pointer to lzma_allocator may be passed via lzma_stream structure
+ * to liblzma, and some advanced functions take a pointer to lzma_allocator
+ * as a separate function argument. The library will use the functions
+ * specified in lzma_allocator for memory handling instead of the default
+ * malloc() and free(). C++ users should note that the custom memory
+ * handling functions must not throw exceptions.
+ *
+ * Single-threaded mode only: liblzma doesn't make an internal copy of
+ * lzma_allocator. Thus, it is OK to change these function pointers in
+ * the middle of the coding process, but obviously it must be done
+ * carefully to make sure that the replacement `free' can deallocate
+ * memory allocated by the earlier `alloc' function(s).
+ *
+ * Multithreaded mode: liblzma might internally store pointers to the
+ * lzma_allocator given via the lzma_stream structure. The application
+ * must not change the allocator pointer in lzma_stream or the contents
+ * of the pointed lzma_allocator structure until lzma_end() has been used
+ * to free the memory associated with that lzma_stream. The allocation
+ * functions might be called simultaneously from multiple threads, and
+ * thus they must be thread safe.
+ */
+typedef struct {
+ /**
+ * \brief Pointer to a custom memory allocation function
+ *
+ * If you don't want a custom allocator, but still want
+ * custom free(), set this to NULL and liblzma will use
+ * the standard malloc().
+ *
+ * \param opaque lzma_allocator.opaque (see below)
+ * \param nmemb Number of elements like in calloc(). liblzma
+ * will always set nmemb to 1, so it is safe to
+ * ignore nmemb in a custom allocator if you like.
+ * The nmemb argument exists only for
+ * compatibility with zlib and libbzip2.
+ * \param size Size of an element in bytes.
+ * liblzma never sets this to zero.
+ *
+ * \return Pointer to the beginning of a memory block of
+ * `size' bytes, or NULL if allocation fails
+ * for some reason. When allocation fails, functions
+ * of liblzma return LZMA_MEM_ERROR.
+ *
+ * The allocator should not waste time zeroing the allocated buffers.
+ * This is not only about speed, but also memory usage, since the
+ * operating system kernel doesn't necessarily allocate the requested
+ * memory in physical memory until it is actually used. With small
+ * input files, liblzma may actually need only a fraction of the
+ * memory that it requested for allocation.
+ *
+ * \note LZMA_MEM_ERROR is also used when the size of the
+ * allocation would be greater than SIZE_MAX. Thus,
+ * don't assume that the custom allocator must have
+ * returned NULL if some function from liblzma
+ * returns LZMA_MEM_ERROR.
+ */
+ void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
+
+ /**
+ * \brief Pointer to a custom memory freeing function
+ *
+ * If you don't want a custom freeing function, but still
+ * want a custom allocator, set this to NULL and liblzma
+ * will use the standard free().
+ *
+ * \param opaque lzma_allocator.opaque (see below)
+ * \param ptr Pointer returned by lzma_allocator.alloc(),
+ * or when it is set to NULL, a pointer returned
+ * by the standard malloc().
+ */
+ void (LZMA_API_CALL *free)(void *opaque, void *ptr);
+
+ /**
+ * \brief Pointer passed to .alloc() and .free()
+ *
+ * opaque is passed as the first argument to lzma_allocator.alloc()
+ * and lzma_allocator.free(). This intended to ease implementing
+ * custom memory allocation functions for use with liblzma.
+ *
+ * If you don't need this, you should set this to NULL.
+ */
+ void *opaque;
+
+} lzma_allocator;
+
+
+/**
+ * \brief Internal data structure
+ *
+ * The contents of this structure is not visible outside the library.
+ */
+typedef struct lzma_internal_s lzma_internal;
+
+
+/**
+ * \brief Passing data to and from liblzma
+ *
+ * The lzma_stream structure is used for
+ * - passing pointers to input and output buffers to liblzma;
+ * - defining custom memory handler functions; and
+ * - holding a pointer to coder-specific internal data structures.
+ *
+ * Typical usage:
+ *
+ * - After allocating lzma_stream (on stack or with malloc()), it must be
+ * initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).
+ *
+ * - Initialize a coder to the lzma_stream, for example by using
+ * lzma_easy_encoder() or lzma_auto_decoder(). Some notes:
+ * - In contrast to zlib, strm->next_in and strm->next_out are
+ * ignored by all initialization functions, thus it is safe
+ * to not initialize them yet.
+ * - The initialization functions always set strm->total_in and
+ * strm->total_out to zero.
+ * - If the initialization function fails, no memory is left allocated
+ * that would require freeing with lzma_end() even if some memory was
+ * associated with the lzma_stream structure when the initialization
+ * function was called.
+ *
+ * - Use lzma_code() to do the actual work.
+ *
+ * - Once the coding has been finished, the existing lzma_stream can be
+ * reused. It is OK to reuse lzma_stream with different initialization
+ * function without calling lzma_end() first. Old allocations are
+ * automatically freed.
+ *
+ * - Finally, use lzma_end() to free the allocated memory. lzma_end() never
+ * frees the lzma_stream structure itself.
+ *
+ * Application may modify the values of total_in and total_out as it wants.
+ * They are updated by liblzma to match the amount of data read and
+ * written but aren't used for anything else except as a possible return
+ * values from lzma_get_progress().
+ */
+typedef struct {
+ const uint8_t *next_in; /**< Pointer to the next input byte. */
+ size_t avail_in; /**< Number of available input bytes in next_in. */
+ uint64_t total_in; /**< Total number of bytes read by liblzma. */
+
+ uint8_t *next_out; /**< Pointer to the next output position. */
+ size_t avail_out; /**< Amount of free space in next_out. */
+ uint64_t total_out; /**< Total number of bytes written by liblzma. */
+
+ /**
+ * \brief Custom memory allocation functions
+ *
+ * In most cases this is NULL which makes liblzma use
+ * the standard malloc() and free().
+ *
+ * \note In 5.0.x this is not a const pointer.
+ */
+ const lzma_allocator *allocator;
+
+ /** Internal state is not visible to applications. */
+ lzma_internal *internal;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. Excluding the initialization of this structure,
+ * you should not touch these, because the names of these variables
+ * may change.
+ */
+
+ /** \private Reserved member. */
+ void *reserved_ptr1;
+
+ /** \private Reserved member. */
+ void *reserved_ptr2;
+
+ /** \private Reserved member. */
+ void *reserved_ptr3;
+
+ /** \private Reserved member. */
+ void *reserved_ptr4;
+
+ /**
+ * \brief New seek input position for LZMA_SEEK_NEEDED
+ *
+ * When lzma_code() returns LZMA_SEEK_NEEDED, the new input position
+ * needed by liblzma will be available seek_pos. The value is
+ * guaranteed to not exceed the file size that was specified when
+ * this lzma_stream was initialized.
+ *
+ * In all other situations the value of this variable is undefined.
+ */
+ uint64_t seek_pos;
+
+ /** \private Reserved member. */
+ uint64_t reserved_int2;
+
+ /** \private Reserved member. */
+ size_t reserved_int3;
+
+ /** \private Reserved member. */
+ size_t reserved_int4;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum1;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum2;
+
+} lzma_stream;
+
+
+/**
+ * \brief Initialization for lzma_stream
+ *
+ * When you declare an instance of lzma_stream, you can immediately
+ * initialize it so that initialization functions know that no memory
+ * has been allocated yet:
+ *
+ * lzma_stream strm = LZMA_STREAM_INIT;
+ *
+ * If you need to initialize a dynamically allocated lzma_stream, you can use
+ * memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this
+ * violates the C standard since NULL may have different internal
+ * representation than zero, but it should be portable enough in practice.
+ * Anyway, for maximum portability, you can use something like this:
+ *
+ * lzma_stream tmp = LZMA_STREAM_INIT;
+ * *strm = tmp;
+ */
+#define LZMA_STREAM_INIT \
+ { NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
+ NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
+ LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
+
+
+/**
+ * \brief Encode or decode data
+ *
+ * Once the lzma_stream has been successfully initialized (e.g. with
+ * lzma_stream_encoder()), the actual encoding or decoding is done
+ * using this function. The application has to update strm->next_in,
+ * strm->avail_in, strm->next_out, and strm->avail_out to pass input
+ * to and get output from liblzma.
+ *
+ * See the description of the coder-specific initialization function to find
+ * out what `action' values are supported by the coder.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param action Action for this function to take. Must be a valid
+ * lzma_action enum value.
+ *
+ * \return Any valid lzma_ret. See the lzma_ret enum description for more
+ * information.
+ */
+extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Free memory allocated for the coder data structures
+ *
+ * After lzma_end(strm), strm->internal is guaranteed to be NULL. No other
+ * members of the lzma_stream structure are touched.
+ *
+ * \note zlib indicates an error if application end()s unfinished
+ * stream structure. liblzma doesn't do this, and assumes that
+ * application knows what it is doing.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ */
+extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
+
+
+/**
+ * \brief Get progress information
+ *
+ * In single-threaded mode, applications can get progress information from
+ * strm->total_in and strm->total_out. In multi-threaded mode this is less
+ * useful because a significant amount of both input and output data gets
+ * buffered internally by liblzma. This makes total_in and total_out give
+ * misleading information and also makes the progress indicator updates
+ * non-smooth.
+ *
+ * This function gives realistic progress information also in multi-threaded
+ * mode by taking into account the progress made by each thread. In
+ * single-threaded mode *progress_in and *progress_out are set to
+ * strm->total_in and strm->total_out, respectively.
+ *
+ * \param strm Pointer to lzma_stream that is at least
+ * initialized with LZMA_STREAM_INIT.
+ * \param[out] progress_in Pointer to the number of input bytes processed.
+ * \param[out] progress_out Pointer to the number of output bytes processed.
+ */
+extern LZMA_API(void) lzma_get_progress(lzma_stream *strm,
+ uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
+
+
+/**
+ * \brief Get the memory usage of decoder filter chain
+ *
+ * This function is currently supported only when *strm has been initialized
+ * with a function that takes a memlimit argument. With other functions, you
+ * should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage()
+ * to estimate the memory requirements.
+ *
+ * This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big
+ * the memory usage limit should have been to decode the input. Note that
+ * this may give misleading information if decoding .xz Streams that have
+ * multiple Blocks, because each Block can have different memory requirements.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ *
+ * \return How much memory is currently allocated for the filter
+ * decoders. If no filter chain is currently allocated,
+ * some non-zero value is still returned, which is less than
+ * or equal to what any filter chain would indicate as its
+ * memory requirement.
+ *
+ * If this function isn't supported by *strm or some other error
+ * occurs, zero is returned.
+ */
+extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the current memory usage limit
+ *
+ * This function is supported only when *strm has been initialized with
+ * a function that takes a memlimit argument.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ *
+ * \return On success, the current memory usage limit is returned
+ * (always non-zero). On error, zero is returned.
+ */
+extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Set the memory usage limit
+ *
+ * This function is supported only when *strm has been initialized with
+ * a function that takes a memlimit argument.
+ *
+ * liblzma 5.2.3 and earlier has a bug where memlimit value of 0 causes
+ * this function to do nothing (leaving the limit unchanged) and still
+ * return LZMA_OK. Later versions treat 0 as if 1 had been specified (so
+ * lzma_memlimit_get() will return 1 even if you specify 0 here).
+ *
+ * liblzma 5.2.6 and earlier had a bug in single-threaded .xz decoder
+ * (lzma_stream_decoder()) which made it impossible to continue decoding
+ * after LZMA_MEMLIMIT_ERROR even if the limit was increased using
+ * lzma_memlimit_set(). Other decoders worked correctly.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: New memory usage limit successfully set.
+ * - LZMA_MEMLIMIT_ERROR: The new limit is too small.
+ * The limit was not changed.
+ * - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
+ * support memory usage limit.
+ */
+extern LZMA_API(lzma_ret) lzma_memlimit_set(
+ lzma_stream *strm, uint64_t memlimit) lzma_nothrow;
diff --git a/src/liblzma/api/lzma/bcj.h b/src/liblzma/api/lzma/bcj.h
new file mode 100644
index 0000000..0c84e0c
--- /dev/null
+++ b/src/liblzma/api/lzma/bcj.h
@@ -0,0 +1,94 @@
+/**
+ * \file lzma/bcj.h
+ * \brief Branch/Call/Jump conversion filters
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/* Filter IDs for lzma_filter.id */
+
+/**
+ * \brief Filter for x86 binaries
+ */
+#define LZMA_FILTER_X86 LZMA_VLI_C(0x04)
+
+/**
+ * \brief Filter for Big endian PowerPC binaries
+ */
+#define LZMA_FILTER_POWERPC LZMA_VLI_C(0x05)
+
+/**
+ * \brief Filter for IA-64 (Itanium) binaries
+ */
+#define LZMA_FILTER_IA64 LZMA_VLI_C(0x06)
+
+/**
+ * \brief Filter for ARM binaries
+ */
+#define LZMA_FILTER_ARM LZMA_VLI_C(0x07)
+
+/**
+ * \brief Filter for ARM-Thumb binaries
+ */
+#define LZMA_FILTER_ARMTHUMB LZMA_VLI_C(0x08)
+
+/**
+ * \brief Filter for SPARC binaries
+ */
+#define LZMA_FILTER_SPARC LZMA_VLI_C(0x09)
+
+/**
+ * \brief Filter for ARM64 binaries
+ */
+#define LZMA_FILTER_ARM64 LZMA_VLI_C(0x0A)
+
+
+/**
+ * \brief Options for BCJ filters
+ *
+ * The BCJ filters never change the size of the data. Specifying options
+ * for them is optional: if pointer to options is NULL, default value is
+ * used. You probably never need to specify options to BCJ filters, so just
+ * set the options pointer to NULL and be happy.
+ *
+ * If options with non-default values have been specified when encoding,
+ * the same options must also be specified when decoding.
+ *
+ * \note At the moment, none of the BCJ filters support
+ * LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified,
+ * LZMA_OPTIONS_ERROR will be returned. If there is need,
+ * partial support for LZMA_SYNC_FLUSH can be added in future.
+ * Partial means that flushing would be possible only at
+ * offsets that are multiple of 2, 4, or 16 depending on
+ * the filter, except x86 which cannot be made to support
+ * LZMA_SYNC_FLUSH predictably.
+ */
+typedef struct {
+ /**
+ * \brief Start offset for conversions
+ *
+ * This setting is useful only when the same filter is used
+ * _separately_ for multiple sections of the same executable file,
+ * and the sections contain cross-section branch/call/jump
+ * instructions. In that case it is beneficial to set the start
+ * offset of the non-first sections so that the relative addresses
+ * of the cross-section branch/call/jump instructions will use the
+ * same absolute addresses as in the first section.
+ *
+ * When the pointer to options is NULL, the default value (zero)
+ * is used.
+ */
+ uint32_t start_offset;
+
+} lzma_options_bcj;
diff --git a/src/liblzma/api/lzma/block.h b/src/liblzma/api/lzma/block.h
new file mode 100644
index 0000000..ec5e77a
--- /dev/null
+++ b/src/liblzma/api/lzma/block.h
@@ -0,0 +1,695 @@
+/**
+ * \file lzma/block.h
+ * \brief .xz Block handling
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Options for the Block and Block Header encoders and decoders
+ *
+ * Different Block handling functions use different parts of this structure.
+ * Some read some members, other functions write, and some do both. Only the
+ * members listed for reading need to be initialized when the specified
+ * functions are called. The members marked for writing will be assigned
+ * new values at some point either by calling the given function or by
+ * later calls to lzma_code().
+ */
+typedef struct {
+ /**
+ * \brief Block format version
+ *
+ * To prevent API and ABI breakages when new features are needed,
+ * a version number is used to indicate which members in this
+ * structure are in use:
+ * - liblzma >= 5.0.0: version = 0 is supported.
+ * - liblzma >= 5.1.4beta: Support for version = 1 was added,
+ * which adds the ignore_check member.
+ *
+ * If version is greater than one, most Block related functions
+ * will return LZMA_OPTIONS_ERROR (lzma_block_header_decode() works
+ * with any version value).
+ *
+ * Read by:
+ * - lzma_block_header_size()
+ * - lzma_block_header_encode()
+ * - lzma_block_header_decode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_unpadded_size()
+ * - lzma_block_total_size()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_uncomp_encode()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_decode()
+ */
+ uint32_t version;
+
+ /**
+ * \brief Size of the Block Header field in bytes
+ *
+ * This is always a multiple of four.
+ *
+ * Read by:
+ * - lzma_block_header_encode()
+ * - lzma_block_header_decode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_unpadded_size()
+ * - lzma_block_total_size()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_size()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_uncomp_encode()
+ */
+ uint32_t header_size;
+# define LZMA_BLOCK_HEADER_SIZE_MIN 8
+# define LZMA_BLOCK_HEADER_SIZE_MAX 1024
+
+ /**
+ * \brief Type of integrity Check
+ *
+ * The Check ID is not stored into the Block Header, thus its value
+ * must be provided also when decoding.
+ *
+ * Read by:
+ * - lzma_block_header_encode()
+ * - lzma_block_header_decode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_unpadded_size()
+ * - lzma_block_total_size()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_buffer_decode()
+ */
+ lzma_check check;
+
+ /**
+ * \brief Size of the Compressed Data in bytes
+ *
+ * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder
+ * will store this value to the Block Header. Block encoder doesn't
+ * care about this value, but will set it once the encoding has been
+ * finished.
+ *
+ * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will
+ * verify that the size of the Compressed Data field matches
+ * compressed_size.
+ *
+ * Usually you don't know this value when encoding in streamed mode,
+ * and thus cannot write this field into the Block Header.
+ *
+ * In non-streamed mode you can reserve space for this field before
+ * encoding the actual Block. After encoding the data, finish the
+ * Block by encoding the Block Header. Steps in detail:
+ *
+ * - Set compressed_size to some big enough value. If you don't know
+ * better, use LZMA_VLI_MAX, but remember that bigger values take
+ * more space in Block Header.
+ *
+ * - Call lzma_block_header_size() to see how much space you need to
+ * reserve for the Block Header.
+ *
+ * - Encode the Block using lzma_block_encoder() and lzma_code().
+ * It sets compressed_size to the correct value.
+ *
+ * - Use lzma_block_header_encode() to encode the Block Header.
+ * Because space was reserved in the first step, you don't need
+ * to call lzma_block_header_size() anymore, because due to
+ * reserving, header_size has to be big enough. If it is "too big",
+ * lzma_block_header_encode() will add enough Header Padding to
+ * make Block Header to match the size specified by header_size.
+ *
+ * Read by:
+ * - lzma_block_header_size()
+ * - lzma_block_header_encode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_unpadded_size()
+ * - lzma_block_total_size()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_decode()
+ * - lzma_block_compressed_size()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_uncomp_encode()
+ * - lzma_block_buffer_decode()
+ */
+ lzma_vli compressed_size;
+
+ /**
+ * \brief Uncompressed Size in bytes
+ *
+ * This is handled very similarly to compressed_size above.
+ *
+ * uncompressed_size is needed by fewer functions than
+ * compressed_size. This is because uncompressed_size isn't
+ * needed to validate that Block stays within proper limits.
+ *
+ * Read by:
+ * - lzma_block_header_size()
+ * - lzma_block_header_encode()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_decode()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_uncomp_encode()
+ * - lzma_block_buffer_decode()
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Array of filters
+ *
+ * There can be 1-4 filters. The end of the array is marked with
+ * .id = LZMA_VLI_UNKNOWN.
+ *
+ * Read by:
+ * - lzma_block_header_size()
+ * - lzma_block_header_encode()
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by:
+ * - lzma_block_header_decode(): Note that this does NOT free()
+ * the old filter options structures. All unused filters[] will
+ * have .id == LZMA_VLI_UNKNOWN and .options == NULL. If
+ * decoding fails, all filters[] are guaranteed to be
+ * LZMA_VLI_UNKNOWN and NULL.
+ *
+ * \note Because of the array is terminated with
+ * .id = LZMA_VLI_UNKNOWN, the actual array must
+ * have LZMA_FILTERS_MAX + 1 members or the Block
+ * Header decoder will overflow the buffer.
+ */
+ lzma_filter *filters;
+
+ /**
+ * \brief Raw value stored in the Check field
+ *
+ * After successful coding, the first lzma_check_size(check) bytes
+ * of this array contain the raw value stored in the Check field.
+ *
+ * Note that CRC32 and CRC64 are stored in little endian byte order.
+ * Take it into account if you display the Check values to the user.
+ *
+ * Written by:
+ * - lzma_block_encoder()
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_encode()
+ * - lzma_block_uncomp_encode()
+ * - lzma_block_buffer_decode()
+ */
+ uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * with the currently supported options, so it is safe to leave these
+ * uninitialized.
+ */
+
+ /** \private Reserved member. */
+ void *reserved_ptr1;
+
+ /** \private Reserved member. */
+ void *reserved_ptr2;
+
+ /** \private Reserved member. */
+ void *reserved_ptr3;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int1;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int2;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_int3;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_int4;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_int5;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_int6;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_int7;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_int8;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum1;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum2;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum3;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum4;
+
+ /**
+ * \brief A flag to Block decoder to not verify the Check field
+ *
+ * This member is supported by liblzma >= 5.1.4beta if .version >= 1.
+ *
+ * If this is set to true, the integrity check won't be calculated
+ * and verified. Unless you know what you are doing, you should
+ * leave this to false. (A reason to set this to true is when the
+ * file integrity is verified externally anyway and you want to
+ * speed up the decompression, which matters mostly when using
+ * SHA-256 as the integrity check.)
+ *
+ * If .version >= 1, read by:
+ * - lzma_block_decoder()
+ * - lzma_block_buffer_decode()
+ *
+ * Written by (.version is ignored):
+ * - lzma_block_header_decode() always sets this to false
+ */
+ lzma_bool ignore_check;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool2;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool3;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool4;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool5;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool6;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool7;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool8;
+
+} lzma_block;
+
+
+/**
+ * \brief Decode the Block Header Size field
+ *
+ * To decode Block Header using lzma_block_header_decode(), the size of the
+ * Block Header has to be known and stored into lzma_block.header_size.
+ * The size can be calculated from the first byte of a Block using this macro.
+ * Note that if the first byte is 0x00, it indicates beginning of Index; use
+ * this macro only when the byte is not 0x00.
+ *
+ * There is no encoding macro because lzma_block_header_size() and
+ * lzma_block_header_encode() should be used.
+ */
+#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4)
+
+
+/**
+ * \brief Calculate Block Header Size
+ *
+ * Calculate the minimum size needed for the Block Header field using the
+ * settings specified in the lzma_block structure. Note that it is OK to
+ * increase the calculated header_size value as long as it is a multiple of
+ * four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size
+ * just means that lzma_block_header_encode() will add Header Padding.
+ *
+ * \note This doesn't check that all the options are valid i.e. this
+ * may return LZMA_OK even if lzma_block_header_encode() or
+ * lzma_block_encoder() would fail. If you want to validate the
+ * filter chain, consider using lzma_memlimit_encoder() which as
+ * a side-effect validates the filter chain.
+ *
+ * \param block Block options
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Size calculated successfully and stored to
+ * block->header_size.
+ * - LZMA_OPTIONS_ERROR: Unsupported version, filters or
+ * filter options.
+ * - LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
+ */
+extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Encode Block Header
+ *
+ * The caller must have calculated the size of the Block Header already with
+ * lzma_block_header_size(). If a value larger than the one calculated by
+ * lzma_block_header_size() is used, the Block Header will be padded to the
+ * specified size.
+ *
+ * \param block Block options to be encoded.
+ * \param[out] out Beginning of the output buffer. This must be
+ * at least block->header_size bytes.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful. block->header_size
+ * bytes were written to output buffer.
+ * - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
+ * - LZMA_PROG_ERROR: Invalid arguments, for example
+ * block->header_size is invalid or block->filters is NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_block_header_encode(
+ const lzma_block *block, uint8_t *out)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Decode Block Header
+ *
+ * block->version should (usually) be set to the highest value supported
+ * by the application. If the application sets block->version to a value
+ * higher than supported by the current liblzma version, this function will
+ * downgrade block->version to the highest value supported by it. Thus one
+ * should check the value of block->version after calling this function if
+ * block->version was set to a non-zero value and the application doesn't
+ * otherwise know that the liblzma version being used is new enough to
+ * support the specified block->version.
+ *
+ * The size of the Block Header must have already been decoded with
+ * lzma_block_header_size_decode() macro and stored to block->header_size.
+ *
+ * The integrity check type from Stream Header must have been stored
+ * to block->check.
+ *
+ * block->filters must have been allocated, but they don't need to be
+ * initialized (possible existing filter options are not freed).
+ *
+ * \param[out] block Destination for Block options
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() (and also free()
+ * if an error occurs).
+ * \param in Beginning of the input buffer. This must be
+ * at least block->header_size bytes.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Decoding was successful. block->header_size
+ * bytes were read from the input buffer.
+ * - LZMA_OPTIONS_ERROR: The Block Header specifies some
+ * unsupported options such as unsupported filters. This can
+ * happen also if block->version was set to a too low value
+ * compared to what would be required to properly represent
+ * the information stored in the Block Header.
+ * - LZMA_DATA_ERROR: Block Header is corrupt, for example,
+ * the CRC32 doesn't match.
+ * - LZMA_PROG_ERROR: Invalid arguments, for example
+ * block->header_size is invalid or block->filters is NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
+ const lzma_allocator *allocator, const uint8_t *in)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Validate and set Compressed Size according to Unpadded Size
+ *
+ * Block Header stores Compressed Size, but Index has Unpadded Size. If the
+ * application has already parsed the Index and is now decoding Blocks,
+ * it can calculate Compressed Size from Unpadded Size. This function does
+ * exactly that with error checking:
+ *
+ * - Compressed Size calculated from Unpadded Size must be positive integer,
+ * that is, Unpadded Size must be big enough that after Block Header and
+ * Check fields there's still at least one byte for Compressed Size.
+ *
+ * - If Compressed Size was present in Block Header, the new value
+ * calculated from Unpadded Size is compared against the value
+ * from Block Header.
+ *
+ * \note This function must be called _after_ decoding the Block Header
+ * field so that it can properly validate Compressed Size if it
+ * was present in Block Header.
+ *
+ * \param block Block options: block->header_size must
+ * already be set with lzma_block_header_size().
+ * \param unpadded_size Unpadded Size from the Index field in bytes
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: block->compressed_size was set successfully.
+ * - LZMA_DATA_ERROR: unpadded_size is too small compared to
+ * block->header_size and lzma_check_size(block->check).
+ * - LZMA_PROG_ERROR: Some values are invalid. For example,
+ * block->header_size must be a multiple of four and
+ * between 8 and 1024 inclusive.
+ */
+extern LZMA_API(lzma_ret) lzma_block_compressed_size(
+ lzma_block *block, lzma_vli unpadded_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Calculate Unpadded Size
+ *
+ * The Index field stores Unpadded Size and Uncompressed Size. The latter
+ * can be taken directly from the lzma_block structure after coding a Block,
+ * but Unpadded Size needs to be calculated from Block Header Size,
+ * Compressed Size, and size of the Check field. This is where this function
+ * is needed.
+ *
+ * \param block Block options: block->header_size must already be
+ * set with lzma_block_header_size().
+ *
+ * \return Unpadded Size on success, or zero on error.
+ */
+extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Calculate the total encoded size of a Block
+ *
+ * This is equivalent to lzma_block_unpadded_size() except that the returned
+ * value includes the size of the Block Padding field.
+ *
+ * \param block Block options: block->header_size must already be
+ * set with lzma_block_header_size().
+ *
+ * \return On success, total encoded size of the Block. On error,
+ * zero is returned.
+ */
+extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Initialize .xz Block encoder
+ *
+ * Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the
+ * filter chain supports it), and LZMA_FINISH.
+ *
+ * The Block encoder encodes the Block Data, Block Padding, and Check value.
+ * It does NOT encode the Block Header which can be encoded with
+ * lzma_block_header_encode().
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param block Block options: block->version, block->check,
+ * and block->filters must have been initialized.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: All good, continue with lzma_code().
+ * - LZMA_MEM_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
+ * that is not supported by this build of liblzma. Initializing
+ * the encoder failed.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_encoder(
+ lzma_stream *strm, lzma_block *block)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .xz Block decoder
+ *
+ * Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using
+ * LZMA_FINISH is not required. It is supported only for convenience.
+ *
+ * The Block decoder decodes the Block Data, Block Padding, and Check value.
+ * It does NOT decode the Block Header which can be decoded with
+ * lzma_block_header_decode().
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param block Block options
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: All good, continue with lzma_code().
+ * - LZMA_PROG_ERROR
+ * - LZMA_MEM_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_decoder(
+ lzma_stream *strm, lzma_block *block)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Calculate maximum output size for single-call Block encoding
+ *
+ * This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks.
+ * See the documentation of lzma_stream_buffer_bound().
+ *
+ * \param uncompressed_size Size of the data to be encoded with the
+ * single-call Block encoder.
+ *
+ * \return Maximum output size in bytes for single-call Block encoding.
+ */
+extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
+ lzma_nothrow;
+
+
+/**
+ * \brief Single-call .xz Block encoder
+ *
+ * In contrast to the multi-call encoder initialized with
+ * lzma_block_encoder(), this function encodes also the Block Header. This
+ * is required to make it possible to write appropriate Block Header also
+ * in case the data isn't compressible, and different filter chain has to be
+ * used to encode the data in uncompressed form using uncompressed chunks
+ * of the LZMA2 filter.
+ *
+ * When the data isn't compressible, header_size, compressed_size, and
+ * uncompressed_size are set just like when the data was compressible, but
+ * it is possible that header_size is too small to hold the filter chain
+ * specified in block->filters, because that isn't necessarily the filter
+ * chain that was actually used to encode the data. lzma_block_unpadded_size()
+ * still works normally, because it doesn't read the filters array.
+ *
+ * \param block Block options: block->version, block->check,
+ * and block->filters must have been initialized.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_size Size of the input buffer
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_BUF_ERROR: Not enough output buffer space.
+ * - LZMA_UNSUPPORTED_CHECK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
+ lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Single-call uncompressed .xz Block encoder
+ *
+ * This is like lzma_block_buffer_encode() except this doesn't try to
+ * compress the data and instead encodes the data using LZMA2 uncompressed
+ * chunks. The required output buffer size can be determined with
+ * lzma_block_buffer_bound().
+ *
+ * Since the data won't be compressed, this function ignores block->filters.
+ * This function doesn't take lzma_allocator because this function doesn't
+ * allocate any memory from the heap.
+ *
+ * \param block Block options: block->version, block->check,
+ * and block->filters must have been initialized.
+ * \param in Beginning of the input buffer
+ * \param in_size Size of the input buffer
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_BUF_ERROR: Not enough output buffer space.
+ * - LZMA_UNSUPPORTED_CHECK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_uncomp_encode(lzma_block *block,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Single-call .xz Block decoder
+ *
+ * This is single-call equivalent of lzma_block_decoder(), and requires that
+ * the caller has already decoded Block Header and checked its memory usage.
+ *
+ * \param block Block options
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_pos The next byte will be read from in[*in_pos].
+ * *in_pos is updated only if decoding succeeds.
+ * \param in_size Size of the input buffer; the first byte that
+ * won't be read is in[in_size].
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Decoding was successful.
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_BUF_ERROR: Output buffer was too small.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
+ lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow;
diff --git a/src/liblzma/api/lzma/check.h b/src/liblzma/api/lzma/check.h
new file mode 100644
index 0000000..b37197d
--- /dev/null
+++ b/src/liblzma/api/lzma/check.h
@@ -0,0 +1,164 @@
+/**
+ * \file lzma/check.h
+ * \brief Integrity checks
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Type of the integrity check (Check ID)
+ *
+ * The .xz format supports multiple types of checks that are calculated
+ * from the uncompressed data. They vary in both speed and ability to
+ * detect errors.
+ */
+typedef enum {
+ LZMA_CHECK_NONE = 0,
+ /**<
+ * No Check is calculated.
+ *
+ * Size of the Check field: 0 bytes
+ */
+
+ LZMA_CHECK_CRC32 = 1,
+ /**<
+ * CRC32 using the polynomial from the IEEE 802.3 standard
+ *
+ * Size of the Check field: 4 bytes
+ */
+
+ LZMA_CHECK_CRC64 = 4,
+ /**<
+ * CRC64 using the polynomial from the ECMA-182 standard
+ *
+ * Size of the Check field: 8 bytes
+ */
+
+ LZMA_CHECK_SHA256 = 10
+ /**<
+ * SHA-256
+ *
+ * Size of the Check field: 32 bytes
+ */
+} lzma_check;
+
+
+/**
+ * \brief Maximum valid Check ID
+ *
+ * The .xz file format specification specifies 16 Check IDs (0-15). Some
+ * of them are only reserved, that is, no actual Check algorithm has been
+ * assigned. When decoding, liblzma still accepts unknown Check IDs for
+ * future compatibility. If a valid but unsupported Check ID is detected,
+ * liblzma can indicate a warning; see the flags LZMA_TELL_NO_CHECK,
+ * LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_TELL_ANY_CHECK in container.h.
+ */
+#define LZMA_CHECK_ID_MAX 15
+
+
+/**
+ * \brief Test if the given Check ID is supported
+ *
+ * LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always supported (even if
+ * liblzma is built with limited features).
+ *
+ * \note It is safe to call this with a value that is not in the
+ * range [0, 15]; in that case the return value is always false.
+ *
+ * \param check Check ID
+ *
+ * \return lzma_bool:
+ * - true if Check ID is supported by this liblzma build.
+ * - false otherwise.
+ */
+extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check)
+ lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief Get the size of the Check field with the given Check ID
+ *
+ * Although not all Check IDs have a check algorithm associated, the size of
+ * every Check is already frozen. This function returns the size (in bytes) of
+ * the Check field with the specified Check ID. The values are:
+ * { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 }
+ *
+ * \param check Check ID
+ *
+ * \return Size of the Check field in bytes. If the argument is not in
+ * the range [0, 15], UINT32_MAX is returned.
+ */
+extern LZMA_API(uint32_t) lzma_check_size(lzma_check check)
+ lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief Maximum size of a Check field
+ */
+#define LZMA_CHECK_SIZE_MAX 64
+
+
+/**
+ * \brief Calculate CRC32
+ *
+ * Calculate CRC32 using the polynomial from the IEEE 802.3 standard.
+ *
+ * \param buf Pointer to the input buffer
+ * \param size Size of the input buffer
+ * \param crc Previously returned CRC value. This is used to
+ * calculate the CRC of a big buffer in smaller chunks.
+ * Set to zero when starting a new calculation.
+ *
+ * \return Updated CRC value, which can be passed to this function
+ * again to continue CRC calculation.
+ */
+extern LZMA_API(uint32_t) lzma_crc32(
+ const uint8_t *buf, size_t size, uint32_t crc)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Calculate CRC64
+ *
+ * Calculate CRC64 using the polynomial from the ECMA-182 standard.
+ *
+ * This function is used similarly to lzma_crc32().
+ *
+ * \param buf Pointer to the input buffer
+ * \param size Size of the input buffer
+ * \param crc Previously returned CRC value. This is used to
+ * calculate the CRC of a big buffer in smaller chunks.
+ * Set to zero when starting a new calculation.
+ *
+ * \return Updated CRC value, which can be passed to this function
+ * again to continue CRC calculation.
+ */
+extern LZMA_API(uint64_t) lzma_crc64(
+ const uint8_t *buf, size_t size, uint64_t crc)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the type of the integrity check
+ *
+ * This function can be called only immediately after lzma_code() has
+ * returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK.
+ * Calling this function in any other situation has undefined behavior.
+ *
+ * \param strm Pointer to lzma_stream meeting the above conditions.
+ *
+ * \return Check ID in the lzma_stream, or undefined if called improperly.
+ */
+extern LZMA_API(lzma_check) lzma_get_check(const lzma_stream *strm)
+ lzma_nothrow;
diff --git a/src/liblzma/api/lzma/container.h b/src/liblzma/api/lzma/container.h
new file mode 100644
index 0000000..2849fbf
--- /dev/null
+++ b/src/liblzma/api/lzma/container.h
@@ -0,0 +1,968 @@
+/**
+ * \file lzma/container.h
+ * \brief File formats
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/************
+ * Encoding *
+ ************/
+
+/**
+ * \brief Default compression preset
+ *
+ * It's not straightforward to recommend a default preset, because in some
+ * cases keeping the resource usage relatively low is more important that
+ * getting the maximum compression ratio.
+ */
+#define LZMA_PRESET_DEFAULT UINT32_C(6)
+
+
+/**
+ * \brief Mask for preset level
+ *
+ * This is useful only if you need to extract the level from the preset
+ * variable. That should be rare.
+ */
+#define LZMA_PRESET_LEVEL_MASK UINT32_C(0x1F)
+
+
+/*
+ * Preset flags
+ *
+ * Currently only one flag is defined.
+ */
+
+/**
+ * \brief Extreme compression preset
+ *
+ * This flag modifies the preset to make the encoding significantly slower
+ * while improving the compression ratio only marginally. This is useful
+ * when you don't mind spending time to get as small result as possible.
+ *
+ * This flag doesn't affect the memory usage requirements of the decoder (at
+ * least not significantly). The memory usage of the encoder may be increased
+ * a little but only at the lowest preset levels (0-3).
+ */
+#define LZMA_PRESET_EXTREME (UINT32_C(1) << 31)
+
+
+/**
+ * \brief Multithreading options
+ */
+typedef struct {
+ /**
+ * \brief Flags
+ *
+ * Set this to zero if no flags are wanted.
+ *
+ * Encoder: No flags are currently supported.
+ *
+ * Decoder: Bitwise-or of zero or more of the decoder flags:
+ * - LZMA_TELL_NO_CHECK
+ * - LZMA_TELL_UNSUPPORTED_CHECK
+ * - LZMA_TELL_ANY_CHECK
+ * - LZMA_IGNORE_CHECK
+ * - LZMA_CONCATENATED
+ * - LZMA_FAIL_FAST
+ */
+ uint32_t flags;
+
+ /**
+ * \brief Number of worker threads to use
+ */
+ uint32_t threads;
+
+ /**
+ * \brief Encoder only: Maximum uncompressed size of a Block
+ *
+ * The encoder will start a new .xz Block every block_size bytes.
+ * Using LZMA_FULL_FLUSH or LZMA_FULL_BARRIER with lzma_code()
+ * the caller may tell liblzma to start a new Block earlier.
+ *
+ * With LZMA2, a recommended block size is 2-4 times the LZMA2
+ * dictionary size. With very small dictionaries, it is recommended
+ * to use at least 1 MiB block size for good compression ratio, even
+ * if this is more than four times the dictionary size. Note that
+ * these are only recommendations for typical use cases; feel free
+ * to use other values. Just keep in mind that using a block size
+ * less than the LZMA2 dictionary size is waste of RAM.
+ *
+ * Set this to 0 to let liblzma choose the block size depending
+ * on the compression options. For LZMA2 it will be 3*dict_size
+ * or 1 MiB, whichever is more.
+ *
+ * For each thread, about 3 * block_size bytes of memory will be
+ * allocated. This may change in later liblzma versions. If so,
+ * the memory usage will probably be reduced, not increased.
+ */
+ uint64_t block_size;
+
+ /**
+ * \brief Timeout to allow lzma_code() to return early
+ *
+ * Multithreading can make liblzma consume input and produce
+ * output in a very bursty way: it may first read a lot of input
+ * to fill internal buffers, then no input or output occurs for
+ * a while.
+ *
+ * In single-threaded mode, lzma_code() won't return until it has
+ * either consumed all the input or filled the output buffer. If
+ * this is done in multithreaded mode, it may cause a call
+ * lzma_code() to take even tens of seconds, which isn't acceptable
+ * in all applications.
+ *
+ * To avoid very long blocking times in lzma_code(), a timeout
+ * (in milliseconds) may be set here. If lzma_code() would block
+ * longer than this number of milliseconds, it will return with
+ * LZMA_OK. Reasonable values are 100 ms or more. The xz command
+ * line tool uses 300 ms.
+ *
+ * If long blocking times are acceptable, set timeout to a special
+ * value of 0. This will disable the timeout mechanism and will make
+ * lzma_code() block until all the input is consumed or the output
+ * buffer has been filled.
+ *
+ * \note Even with a timeout, lzma_code() might sometimes take
+ * a long time to return. No timing guarantees are made.
+ */
+ uint32_t timeout;
+
+ /**
+ * \brief Encoder only: Compression preset
+ *
+ * The preset is set just like with lzma_easy_encoder().
+ * The preset is ignored if filters below is non-NULL.
+ */
+ uint32_t preset;
+
+ /**
+ * \brief Encoder only: Filter chain (alternative to a preset)
+ *
+ * If this is NULL, the preset above is used. Otherwise the preset
+ * is ignored and the filter chain specified here is used.
+ */
+ const lzma_filter *filters;
+
+ /**
+ * \brief Encoder only: Integrity check type
+ *
+ * See check.h for available checks. The xz command line tool
+ * defaults to LZMA_CHECK_CRC64, which is a good choice if you
+ * are unsure.
+ */
+ lzma_check check;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * with the currently supported options, so it is safe to leave these
+ * uninitialized.
+ */
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum1;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum2;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum3;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int1;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int2;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int3;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int4;
+
+ /**
+ * \brief Memory usage limit to reduce the number of threads
+ *
+ * Encoder: Ignored.
+ *
+ * Decoder:
+ *
+ * If the number of threads has been set so high that more than
+ * memlimit_threading bytes of memory would be needed, the number
+ * of threads will be reduced so that the memory usage will not exceed
+ * memlimit_threading bytes. However, if memlimit_threading cannot
+ * be met even in single-threaded mode, then decoding will continue
+ * in single-threaded mode and memlimit_threading may be exceeded
+ * even by a large amount. That is, memlimit_threading will never make
+ * lzma_code() return LZMA_MEMLIMIT_ERROR. To truly cap the memory
+ * usage, see memlimit_stop below.
+ *
+ * Setting memlimit_threading to UINT64_MAX or a similar huge value
+ * means that liblzma is allowed to keep the whole compressed file
+ * and the whole uncompressed file in memory in addition to the memory
+ * needed by the decompressor data structures used by each thread!
+ * In other words, a reasonable value limit must be set here or it
+ * will cause problems sooner or later. If you have no idea what
+ * a reasonable value could be, try lzma_physmem() / 4 as a starting
+ * point. Setting this limit will never prevent decompression of
+ * a file; this will only reduce the number of threads.
+ *
+ * If memlimit_threading is greater than memlimit_stop, then the value
+ * of memlimit_stop will be used for both.
+ */
+ uint64_t memlimit_threading;
+
+ /**
+ * \brief Memory usage limit that should never be exceeded
+ *
+ * Encoder: Ignored.
+ *
+ * Decoder: If decompressing will need more than this amount of
+ * memory even in the single-threaded mode, then lzma_code() will
+ * return LZMA_MEMLIMIT_ERROR.
+ */
+ uint64_t memlimit_stop;
+
+ /** \private Reserved member. */
+ uint64_t reserved_int7;
+
+ /** \private Reserved member. */
+ uint64_t reserved_int8;
+
+ /** \private Reserved member. */
+ void *reserved_ptr1;
+
+ /** \private Reserved member. */
+ void *reserved_ptr2;
+
+ /** \private Reserved member. */
+ void *reserved_ptr3;
+
+ /** \private Reserved member. */
+ void *reserved_ptr4;
+
+} lzma_mt;
+
+
+/**
+ * \brief Calculate approximate memory usage of easy encoder
+ *
+ * This function is a wrapper for lzma_raw_encoder_memusage().
+ *
+ * \param preset Compression preset (level and possible flags)
+ *
+ * \return Number of bytes of memory required for the given
+ * preset when encoding or UINT64_MAX on error.
+ */
+extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Calculate approximate decoder memory usage of a preset
+ *
+ * This function is a wrapper for lzma_raw_decoder_memusage().
+ *
+ * \param preset Compression preset (level and possible flags)
+ *
+ * \return Number of bytes of memory required to decompress a file
+ * that was compressed using the given preset or UINT64_MAX
+ * on error.
+ */
+extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Initialize .xz Stream encoder using a preset number
+ *
+ * This function is intended for those who just want to use the basic features
+ * of liblzma (that is, most developers out there).
+ *
+ * If initialization fails (return value is not LZMA_OK), all the memory
+ * allocated for *strm by liblzma is always freed. Thus, there is no need
+ * to call lzma_end() after failed initialization.
+ *
+ * If initialization succeeds, use lzma_code() to do the actual encoding.
+ * Valid values for `action' (the second argument of lzma_code()) are
+ * LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
+ * there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param preset Compression preset to use. A preset consist of level
+ * number and zero or more flags. Usually flags aren't
+ * used, so preset is simply a number [0, 9] which match
+ * the options -0 ... -9 of the xz command line tool.
+ * Additional flags can be be set using bitwise-or with
+ * the preset level number, e.g. 6 | LZMA_PRESET_EXTREME.
+ * \param check Integrity check type to use. See check.h for available
+ * checks. The xz command line tool defaults to
+ * LZMA_CHECK_CRC64, which is a good choice if you are
+ * unsure. LZMA_CHECK_CRC32 is good too as long as the
+ * uncompressed file is not many gigabytes.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization succeeded. Use lzma_code() to
+ * encode your data.
+ * - LZMA_MEM_ERROR: Memory allocation failed.
+ * - LZMA_OPTIONS_ERROR: The given compression preset is not
+ * supported by this build of liblzma.
+ * - LZMA_UNSUPPORTED_CHECK: The given check type is not
+ * supported by this liblzma build.
+ * - LZMA_PROG_ERROR: One or more of the parameters have values
+ * that will never be valid. For example, strm == NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_easy_encoder(
+ lzma_stream *strm, uint32_t preset, lzma_check check)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Single-call .xz Stream encoding using a preset number
+ *
+ * The maximum required output buffer size can be calculated with
+ * lzma_stream_buffer_bound().
+ *
+ * \param preset Compression preset to use. See the description
+ * in lzma_easy_encoder().
+ * \param check Type of the integrity check to calculate from
+ * uncompressed data.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_size Size of the input buffer
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_BUF_ERROR: Not enough output buffer space.
+ * - LZMA_UNSUPPORTED_CHECK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
+ uint32_t preset, lzma_check check,
+ const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief Initialize .xz Stream encoder using a custom filter chain
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN. See filters.h for more
+ * information.
+ * \param check Type of the integrity check to calculate from
+ * uncompressed data.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization was successful.
+ * - LZMA_MEM_ERROR
+ * - LZMA_UNSUPPORTED_CHECK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
+ const lzma_filter *filters, lzma_check check)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Calculate approximate memory usage of multithreaded .xz encoder
+ *
+ * Since doing the encoding in threaded mode doesn't affect the memory
+ * requirements of single-threaded decompressor, you can use
+ * lzma_easy_decoder_memusage(options->preset) or
+ * lzma_raw_decoder_memusage(options->filters) to calculate
+ * the decompressor memory requirements.
+ *
+ * \param options Compression options
+ *
+ * \return Number of bytes of memory required for encoding with the
+ * given options. If an error occurs, for example due to
+ * unsupported preset or filter chain, UINT64_MAX is returned.
+ */
+extern LZMA_API(uint64_t) lzma_stream_encoder_mt_memusage(
+ const lzma_mt *options) lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Initialize multithreaded .xz Stream encoder
+ *
+ * This provides the functionality of lzma_easy_encoder() and
+ * lzma_stream_encoder() as a single function for multithreaded use.
+ *
+ * The supported actions for lzma_code() are LZMA_RUN, LZMA_FULL_FLUSH,
+ * LZMA_FULL_BARRIER, and LZMA_FINISH. Support for LZMA_SYNC_FLUSH might be
+ * added in the future.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param options Pointer to multithreaded compression options
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_UNSUPPORTED_CHECK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_encoder_mt(
+ lzma_stream *strm, const lzma_mt *options)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .lzma encoder (legacy file format)
+ *
+ * The .lzma format is sometimes called the LZMA_Alone format, which is the
+ * reason for the name of this function. The .lzma format supports only the
+ * LZMA1 filter. There is no support for integrity checks like CRC32.
+ *
+ * Use this function if and only if you need to create files readable by
+ * legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format
+ * is strongly recommended.
+ *
+ * The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * No kind of flushing is supported, because the file format doesn't make
+ * it possible.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param options Pointer to encoder options
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_alone_encoder(
+ lzma_stream *strm, const lzma_options_lzma *options)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Calculate output buffer size for single-call Stream encoder
+ *
+ * When trying to compress incompressible data, the encoded size will be
+ * slightly bigger than the input data. This function calculates how much
+ * output buffer space is required to be sure that lzma_stream_buffer_encode()
+ * doesn't return LZMA_BUF_ERROR.
+ *
+ * The calculated value is not exact, but it is guaranteed to be big enough.
+ * The actual maximum output space required may be slightly smaller (up to
+ * about 100 bytes). This should not be a problem in practice.
+ *
+ * If the calculated maximum size doesn't fit into size_t or would make the
+ * Stream grow past LZMA_VLI_MAX (which should never happen in practice),
+ * zero is returned to indicate the error.
+ *
+ * \note The limit calculated by this function applies only to
+ * single-call encoding. Multi-call encoding may (and probably
+ * will) have larger maximum expansion when encoding
+ * incompressible data. Currently there is no function to
+ * calculate the maximum expansion of multi-call encoding.
+ *
+ * \param uncompressed_size Size in bytes of the uncompressed
+ * input data
+ *
+ * \return Maximum number of bytes needed to store the compressed data.
+ */
+extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
+ lzma_nothrow;
+
+
+/**
+ * \brief Single-call .xz Stream encoder
+ *
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN. See filters.h for more
+ * information.
+ * \param check Type of the integrity check to calculate from
+ * uncompressed data.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_size Size of the input buffer
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_BUF_ERROR: Not enough output buffer space.
+ * - LZMA_UNSUPPORTED_CHECK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
+ lzma_filter *filters, lzma_check check,
+ const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief MicroLZMA encoder
+ *
+ * The MicroLZMA format is a raw LZMA stream whose first byte (always 0x00)
+ * has been replaced with bitwise-negation of the LZMA properties (lc/lp/pb).
+ * This encoding ensures that the first byte of MicroLZMA stream is never
+ * 0x00. There is no end of payload marker and thus the uncompressed size
+ * must be stored separately. For the best error detection the dictionary
+ * size should be stored separately as well but alternatively one may use
+ * the uncompressed size as the dictionary size when decoding.
+ *
+ * With the MicroLZMA encoder, lzma_code() behaves slightly unusually.
+ * The action argument must be LZMA_FINISH and the return value will never be
+ * LZMA_OK. Thus the encoding is always done with a single lzma_code() after
+ * the initialization. The benefit of the combination of initialization
+ * function and lzma_code() is that memory allocations can be re-used for
+ * better performance.
+ *
+ * lzma_code() will try to encode as much input as is possible to fit into
+ * the given output buffer. If not all input can be encoded, the stream will
+ * be finished without encoding all the input. The caller must check both
+ * input and output buffer usage after lzma_code() (total_in and total_out
+ * in lzma_stream can be convenient). Often lzma_code() can fill the output
+ * buffer completely if there is a lot of input, but sometimes a few bytes
+ * may remain unused because the next LZMA symbol would require more space.
+ *
+ * lzma_stream.avail_out must be at least 6. Otherwise LZMA_PROG_ERROR
+ * will be returned.
+ *
+ * The LZMA dictionary should be reasonably low to speed up the encoder
+ * re-initialization. A good value is bigger than the resulting
+ * uncompressed size of most of the output chunks. For example, if output
+ * size is 4 KiB, dictionary size of 32 KiB or 64 KiB is good. If the
+ * data compresses extremely well, even 128 KiB may be useful.
+ *
+ * The MicroLZMA format and this encoder variant were made with the EROFS
+ * file system in mind. This format may be convenient in other embedded
+ * uses too where many small streams are needed. XZ Embedded includes a
+ * decoder for this format.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param options Pointer to encoder options
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_STREAM_END: All good. Check the amounts of input used
+ * and output produced. Store the amount of input used
+ * (uncompressed size) as it needs to be known to decompress
+ * the data.
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR: In addition to the generic reasons for this
+ * error code, this may also be returned if there isn't enough
+ * output space (6 bytes) to create a valid MicroLZMA stream.
+ */
+extern LZMA_API(lzma_ret) lzma_microlzma_encoder(
+ lzma_stream *strm, const lzma_options_lzma *options)
+ lzma_nothrow;
+
+
+/************
+ * Decoding *
+ ************/
+
+/**
+ * This flag makes lzma_code() return LZMA_NO_CHECK if the input stream
+ * being decoded has no integrity check. Note that when used with
+ * lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK
+ * if LZMA_TELL_NO_CHECK is used.
+ */
+#define LZMA_TELL_NO_CHECK UINT32_C(0x01)
+
+
+/**
+ * This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input
+ * stream has an integrity check, but the type of the integrity check is not
+ * supported by this liblzma version or build. Such files can still be
+ * decoded, but the integrity check cannot be verified.
+ */
+#define LZMA_TELL_UNSUPPORTED_CHECK UINT32_C(0x02)
+
+
+/**
+ * This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type
+ * of the integrity check is known. The type can then be got with
+ * lzma_get_check().
+ */
+#define LZMA_TELL_ANY_CHECK UINT32_C(0x04)
+
+
+/**
+ * This flag makes lzma_code() not calculate and verify the integrity check
+ * of the compressed data in .xz files. This means that invalid integrity
+ * check values won't be detected and LZMA_DATA_ERROR won't be returned in
+ * such cases.
+ *
+ * This flag only affects the checks of the compressed data itself; the CRC32
+ * values in the .xz headers will still be verified normally.
+ *
+ * Don't use this flag unless you know what you are doing. Possible reasons
+ * to use this flag:
+ *
+ * - Trying to recover data from a corrupt .xz file.
+ *
+ * - Speeding up decompression, which matters mostly with SHA-256
+ * or with files that have compressed extremely well. It's recommended
+ * to not use this flag for this purpose unless the file integrity is
+ * verified externally in some other way.
+ *
+ * Support for this flag was added in liblzma 5.1.4beta.
+ */
+#define LZMA_IGNORE_CHECK UINT32_C(0x10)
+
+
+/**
+ * This flag enables decoding of concatenated files with file formats that
+ * allow concatenating compressed files as is. From the formats currently
+ * supported by liblzma, only the .xz and .lz formats allow concatenated
+ * files. Concatenated files are not allowed with the legacy .lzma format.
+ *
+ * This flag also affects the usage of the `action' argument for lzma_code().
+ * When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END
+ * unless LZMA_FINISH is used as `action'. Thus, the application has to set
+ * LZMA_FINISH in the same way as it does when encoding.
+ *
+ * If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH
+ * as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required.
+ */
+#define LZMA_CONCATENATED UINT32_C(0x08)
+
+
+/**
+ * This flag makes the threaded decoder report errors (like LZMA_DATA_ERROR)
+ * as soon as they are detected. This saves time when the application has no
+ * interest in a partially decompressed truncated or corrupt file. Note that
+ * due to timing randomness, if the same truncated or corrupt input is
+ * decompressed multiple times with this flag, a different amount of output
+ * may be produced by different runs, and even the error code might vary.
+ *
+ * When using LZMA_FAIL_FAST, it is recommended to use LZMA_FINISH to tell
+ * the decoder when no more input will be coming because it can help fast
+ * detection and reporting of truncated files. Note that in this situation
+ * truncated files might be diagnosed with LZMA_DATA_ERROR instead of
+ * LZMA_OK or LZMA_BUF_ERROR!
+ *
+ * Without this flag the threaded decoder will provide as much output as
+ * possible at first and then report the pending error. This default behavior
+ * matches the single-threaded decoder and provides repeatable behavior
+ * with truncated or corrupt input. There are a few special cases where the
+ * behavior can still differ like memory allocation failures (LZMA_MEM_ERROR).
+ *
+ * Single-threaded decoders currently ignore this flag.
+ *
+ * Support for this flag was added in liblzma 5.3.3alpha. Note that in older
+ * versions this flag isn't supported (LZMA_OPTIONS_ERROR) even by functions
+ * that ignore this flag in newer liblzma versions.
+ */
+#define LZMA_FAIL_FAST UINT32_C(0x20)
+
+
+/**
+ * \brief Initialize .xz Stream decoder
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param memlimit Memory usage limit as bytes. Use UINT64_MAX
+ * to effectively disable the limiter. liblzma
+ * 5.2.3 and earlier don't allow 0 here and return
+ * LZMA_PROG_ERROR; later versions treat 0 as if 1
+ * had been specified.
+ * \param flags Bitwise-or of zero or more of the decoder flags:
+ * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
+ * LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK,
+ * LZMA_CONCATENATED, LZMA_FAIL_FAST
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization was successful.
+ * - LZMA_MEM_ERROR: Cannot allocate memory.
+ * - LZMA_OPTIONS_ERROR: Unsupported flags
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_decoder(
+ lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize multithreaded .xz Stream decoder
+ *
+ * The decoder can decode multiple Blocks in parallel. This requires that each
+ * Block Header contains the Compressed Size and Uncompressed size fields
+ * which are added by the multi-threaded encoder, see lzma_stream_encoder_mt().
+ *
+ * A Stream with one Block will only utilize one thread. A Stream with multiple
+ * Blocks but without size information in Block Headers will be processed in
+ * single-threaded mode in the same way as done by lzma_stream_decoder().
+ * Concatenated Streams are processed one Stream at a time; no inter-Stream
+ * parallelization is done.
+ *
+ * This function behaves like lzma_stream_decoder() when options->threads == 1
+ * and options->memlimit_threading <= 1.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param options Pointer to multithreaded compression options
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization was successful.
+ * - LZMA_MEM_ERROR: Cannot allocate memory.
+ * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
+ * - LZMA_OPTIONS_ERROR: Unsupported flags.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_decoder_mt(
+ lzma_stream *strm, const lzma_mt *options)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Decode .xz, .lzma, and .lz (lzip) files with autodetection
+ *
+ * This decoder autodetects between the .xz, .lzma, and .lz file formats,
+ * and calls lzma_stream_decoder(), lzma_alone_decoder(), or
+ * lzma_lzip_decoder() once the type of the input file has been detected.
+ *
+ * Support for .lz was added in 5.4.0.
+ *
+ * If the flag LZMA_CONCATENATED is used and the input is a .lzma file:
+ * For historical reasons concatenated .lzma files aren't supported.
+ * If there is trailing data after one .lzma stream, lzma_code() will
+ * return LZMA_DATA_ERROR. (lzma_alone_decoder() doesn't have such a check
+ * as it doesn't support any decoder flags. It will return LZMA_STREAM_END
+ * after one .lzma stream.)
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param memlimit Memory usage limit as bytes. Use UINT64_MAX
+ * to effectively disable the limiter. liblzma
+ * 5.2.3 and earlier don't allow 0 here and return
+ * LZMA_PROG_ERROR; later versions treat 0 as if 1
+ * had been specified.
+ * \param flags Bitwise-or of zero or more of the decoder flags:
+ * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
+ * LZMA_TELL_ANY_CHECK, LZMA_IGNORE_CHECK,
+ * LZMA_CONCATENATED, LZMA_FAIL_FAST
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization was successful.
+ * - LZMA_MEM_ERROR: Cannot allocate memory.
+ * - LZMA_OPTIONS_ERROR: Unsupported flags
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_auto_decoder(
+ lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .lzma decoder (legacy file format)
+ *
+ * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * There is no need to use LZMA_FINISH, but it's allowed because it may
+ * simplify certain types of applications.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param memlimit Memory usage limit as bytes. Use UINT64_MAX
+ * to effectively disable the limiter. liblzma
+ * 5.2.3 and earlier don't allow 0 here and return
+ * LZMA_PROG_ERROR; later versions treat 0 as if 1
+ * had been specified.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_alone_decoder(
+ lzma_stream *strm, uint64_t memlimit)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .lz (lzip) decoder (a foreign file format)
+ *
+ * This decoder supports the .lz format version 0 and the unextended .lz
+ * format version 1:
+ *
+ * - Files in the format version 0 were produced by lzip 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 lzip 1.18.
+ *
+ * - lzip 1.3 added decompression support for .lz format version 1 files.
+ * Compression support was added in lzip 1.4. In lzip 1.6 the .lz format
+ * version 1 was extended to support the Sync Flush marker. This extension
+ * is not supported by liblzma. lzma_code() will return LZMA_DATA_ERROR
+ * at the location of the Sync Flush marker. In practice files with
+ * the Sync Flush marker are very rare and thus liblzma can decompress
+ * almost all .lz files.
+ *
+ * Just like with lzma_stream_decoder() for .xz files, LZMA_CONCATENATED
+ * should be used when decompressing normal standalone .lz files.
+ *
+ * The .lz format allows putting non-.lz data at the end of a file after at
+ * least one valid .lz member. That is, one can append custom data at the end
+ * of a .lz file and the decoder is required to ignore it. In liblzma this
+ * is relevant only when LZMA_CONCATENATED is used. In that case lzma_code()
+ * will return LZMA_STREAM_END and leave lzma_stream.next_in pointing to
+ * the first byte of the non-.lz data. An exception to this is if the first
+ * 1-3 bytes of the non-.lz data are identical to the .lz magic bytes
+ * (0x4C, 0x5A, 0x49, 0x50; "LZIP" in US-ASCII). In such a case the 1-3 bytes
+ * will have been ignored by lzma_code(). If one wishes to locate the non-.lz
+ * data reliably, one must ensure that the first byte isn't 0x4C. Actually
+ * one should ensure that none of the first four bytes of trailing data are
+ * equal to the magic bytes because lzip >= 1.20 requires it by default.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param memlimit Memory usage limit as bytes. Use UINT64_MAX
+ * to effectively disable the limiter.
+ * \param flags Bitwise-or of flags, or zero for no flags.
+ * All decoder flags listed above are supported
+ * although only LZMA_CONCATENATED and (in very rare
+ * cases) LZMA_IGNORE_CHECK are actually useful.
+ * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
+ * and LZMA_FAIL_FAST do nothing. LZMA_TELL_ANY_CHECK
+ * is supported for consistency only as CRC32 is
+ * always used in the .lz format.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization was successful.
+ * - LZMA_MEM_ERROR: Cannot allocate memory.
+ * - LZMA_OPTIONS_ERROR: Unsupported flags
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_lzip_decoder(
+ lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Single-call .xz Stream decoder
+ *
+ * \param memlimit Pointer to how much memory the decoder is allowed
+ * to allocate. The value pointed by this pointer is
+ * modified if and only if LZMA_MEMLIMIT_ERROR is
+ * returned.
+ * \param flags Bitwise-or of zero or more of the decoder flags:
+ * LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
+ * LZMA_IGNORE_CHECK, LZMA_CONCATENATED,
+ * LZMA_FAIL_FAST. Note that LZMA_TELL_ANY_CHECK
+ * is not allowed and will return LZMA_PROG_ERROR.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_pos The next byte will be read from in[*in_pos].
+ * *in_pos is updated only if decoding succeeds.
+ * \param in_size Size of the input buffer; the first byte that
+ * won't be read is in[in_size].
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if decoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Decoding was successful.
+ * - LZMA_FORMAT_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_NO_CHECK: This can be returned only if using
+ * the LZMA_TELL_NO_CHECK flag.
+ * - LZMA_UNSUPPORTED_CHECK: This can be returned only if using
+ * the LZMA_TELL_UNSUPPORTED_CHECK flag.
+ * - LZMA_MEM_ERROR
+ * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
+ * The minimum required memlimit value was stored to *memlimit.
+ * - LZMA_BUF_ERROR: Output buffer was too small.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
+ uint64_t *memlimit, uint32_t flags,
+ const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief MicroLZMA decoder
+ *
+ * See lzma_microlzma_encoder() for more information.
+ *
+ * The lzma_code() usage with this decoder is completely normal. The
+ * special behavior of lzma_code() applies to lzma_microlzma_encoder() only.
+ *
+ * \param strm Pointer to lzma_stream that is at least initialized
+ * with LZMA_STREAM_INIT.
+ * \param comp_size Compressed size of the MicroLZMA stream.
+ * The caller must somehow know this exactly.
+ * \param uncomp_size Uncompressed size of the MicroLZMA stream.
+ * If the exact uncompressed size isn't known, this
+ * can be set to a value that is at most as big as
+ * the exact uncompressed size would be, but then the
+ * next argument uncomp_size_is_exact must be false.
+ * \param uncomp_size_is_exact
+ * If true, uncomp_size must be exactly correct.
+ * This will improve error detection at the end of
+ * the stream. If the exact uncompressed size isn't
+ * known, this must be false. uncomp_size must still
+ * be at most as big as the exact uncompressed size
+ * is. Setting this to false when the exact size is
+ * known will work but error detection at the end of
+ * the stream will be weaker.
+ * \param dict_size LZMA dictionary size that was used when
+ * compressing the data. It is OK to use a bigger
+ * value too but liblzma will then allocate more
+ * memory than would actually be required and error
+ * detection will be slightly worse. (Note that with
+ * the implementation in XZ Embedded it doesn't
+ * affect the memory usage if one specifies bigger
+ * dictionary than actually required.)
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_microlzma_decoder(
+ lzma_stream *strm, uint64_t comp_size,
+ uint64_t uncomp_size, lzma_bool uncomp_size_is_exact,
+ uint32_t dict_size) lzma_nothrow;
diff --git a/src/liblzma/api/lzma/delta.h b/src/liblzma/api/lzma/delta.h
new file mode 100644
index 0000000..7a725bc
--- /dev/null
+++ b/src/liblzma/api/lzma/delta.h
@@ -0,0 +1,96 @@
+/**
+ * \file lzma/delta.h
+ * \brief Delta filter
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Filter ID
+ *
+ * Filter ID of the Delta filter. This is used as lzma_filter.id.
+ */
+#define LZMA_FILTER_DELTA LZMA_VLI_C(0x03)
+
+
+/**
+ * \brief Type of the delta calculation
+ *
+ * Currently only byte-wise delta is supported. Other possible types could
+ * be, for example, delta of 16/32/64-bit little/big endian integers, but
+ * these are not currently planned since byte-wise delta is almost as good.
+ */
+typedef enum {
+ LZMA_DELTA_TYPE_BYTE
+} lzma_delta_type;
+
+
+/**
+ * \brief Options for the Delta filter
+ *
+ * These options are needed by both encoder and decoder.
+ */
+typedef struct {
+ /** For now, this must always be LZMA_DELTA_TYPE_BYTE. */
+ lzma_delta_type type;
+
+ /**
+ * \brief Delta distance
+ *
+ * With the only currently supported type, LZMA_DELTA_TYPE_BYTE,
+ * the distance is as bytes.
+ *
+ * Examples:
+ * - 16-bit stereo audio: distance = 4 bytes
+ * - 24-bit RGB image data: distance = 3 bytes
+ */
+ uint32_t dist;
+
+ /**
+ * \brief Minimum value for lzma_options_delta.dist.
+ */
+# define LZMA_DELTA_DIST_MIN 1
+
+ /**
+ * \brief Maximum value for lzma_options_delta.dist.
+ */
+# define LZMA_DELTA_DIST_MAX 256
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these
+ * uninitialized.
+ */
+
+ /** \private Reserved member. */
+ uint32_t reserved_int1;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int2;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int3;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int4;
+
+ /** \private Reserved member. */
+ void *reserved_ptr1;
+
+ /** \private Reserved member. */
+ void *reserved_ptr2;
+
+} lzma_options_delta;
diff --git a/src/liblzma/api/lzma/filter.h b/src/liblzma/api/lzma/filter.h
new file mode 100644
index 0000000..1d887b4
--- /dev/null
+++ b/src/liblzma/api/lzma/filter.h
@@ -0,0 +1,770 @@
+/**
+ * \file lzma/filter.h
+ * \brief Common filter related types and functions
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Maximum number of filters in a chain
+ *
+ * A filter chain can have 1-4 filters, of which three are allowed to change
+ * the size of the data. Usually only one or two filters are needed.
+ */
+#define LZMA_FILTERS_MAX 4
+
+
+/**
+ * \brief Filter options
+ *
+ * This structure is used to pass a Filter ID and a pointer to the filter's
+ * options to liblzma. A few functions work with a single lzma_filter
+ * structure, while most functions expect a filter chain.
+ *
+ * A filter chain is indicated with an array of lzma_filter structures.
+ * The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter
+ * array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to
+ * be able to hold any arbitrary filter chain. This is important when
+ * using lzma_block_header_decode() from block.h, because a filter array
+ * that is too small would make liblzma write past the end of the array.
+ */
+typedef struct {
+ /**
+ * \brief Filter ID
+ *
+ * Use constants whose name begin with `LZMA_FILTER_' to specify
+ * different filters. In an array of lzma_filter structures, use
+ * LZMA_VLI_UNKNOWN to indicate end of filters.
+ *
+ * \note This is not an enum, because on some systems enums
+ * cannot be 64-bit.
+ */
+ lzma_vli id;
+
+ /**
+ * \brief Pointer to filter-specific options structure
+ *
+ * If the filter doesn't need options, set this to NULL. If id is
+ * set to LZMA_VLI_UNKNOWN, options is ignored, and thus
+ * doesn't need be initialized.
+ */
+ void *options;
+
+} lzma_filter;
+
+
+/**
+ * \brief Test if the given Filter ID is supported for encoding
+ *
+ * \param id Filter ID
+ *
+ * \return lzma_bool:
+ * - true if the Filter ID is supported for encoding by this
+ * liblzma build.
+ * - false otherwise.
+ */
+extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
+ lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief Test if the given Filter ID is supported for decoding
+ *
+ * \param id Filter ID
+ *
+ * \return lzma_bool:
+ * - true if the Filter ID is supported for decoding by this
+ * liblzma build.
+ * - false otherwise.
+ */
+extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
+ lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief Copy the filters array
+ *
+ * Copy the Filter IDs and filter-specific options from src to dest.
+ * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating
+ * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least
+ * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that
+ * src is smaller than that.
+ *
+ * Unless the filter-specific options is NULL, the Filter ID has to be
+ * supported by liblzma, because liblzma needs to know the size of every
+ * filter-specific options structure. The filter-specific options are not
+ * validated. If options is NULL, any unsupported Filter IDs are copied
+ * without returning an error.
+ *
+ * Old filter-specific options in dest are not freed, so dest doesn't
+ * need to be initialized by the caller in any way.
+ *
+ * If an error occurs, memory possibly already allocated by this function
+ * is always freed. liblzma versions older than 5.2.7 may modify the dest
+ * array and leave its contents in an undefined state if an error occurs.
+ * liblzma 5.2.7 and newer only modify the dest array when returning LZMA_OK.
+ *
+ * \param src Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ * \param[out] dest Destination filter array
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options
+ * is not NULL.
+ * - LZMA_PROG_ERROR: src or dest is NULL.
+ */
+extern LZMA_API(lzma_ret) lzma_filters_copy(
+ const lzma_filter *src, lzma_filter *dest,
+ const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Free the options in the array of lzma_filter structures
+ *
+ * This frees the filter chain options. The filters array itself is not freed.
+ *
+ * The filters array must have at most LZMA_FILTERS_MAX + 1 elements
+ * including the terminating element which must have .id = LZMA_VLI_UNKNOWN.
+ * For all elements before the terminating element:
+ * - options will be freed using the given lzma_allocator or,
+ * if allocator is NULL, using free().
+ * - options will be set to NULL.
+ * - id will be set to LZMA_VLI_UNKNOWN.
+ *
+ * If filters is NULL, this does nothing. Again, this never frees the
+ * filters array itself.
+ *
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ */
+extern LZMA_API(void) lzma_filters_free(
+ lzma_filter *filters, const lzma_allocator *allocator)
+ lzma_nothrow;
+
+
+/**
+ * \brief Calculate approximate memory requirements for raw encoder
+ *
+ * This function can be used to calculate the memory requirements for
+ * Block and Stream encoders too because Block and Stream encoders don't
+ * need significantly more memory than raw encoder.
+ *
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ *
+ * \return Number of bytes of memory required for the given
+ * filter chain when encoding or UINT64_MAX on error.
+ */
+extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Calculate approximate memory requirements for raw decoder
+ *
+ * This function can be used to calculate the memory requirements for
+ * Block and Stream decoders too because Block and Stream decoders don't
+ * need significantly more memory than raw decoder.
+ *
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ *
+ * \return Number of bytes of memory required for the given
+ * filter chain when decoding or UINT64_MAX on error.
+ */
+extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Initialize raw encoder
+ *
+ * This function may be useful when implementing custom file formats.
+ *
+ * The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the
+ * filter chain supports it), or LZMA_FINISH.
+ *
+ * \param strm Pointer to lzma_stream that is at least
+ * initialized with LZMA_STREAM_INIT.
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_raw_encoder(
+ lzma_stream *strm, const lzma_filter *filters)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize raw decoder
+ *
+ * The initialization of raw decoder goes similarly to raw encoder.
+ *
+ * The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using
+ * LZMA_FINISH is not required, it is supported just for convenience.
+ *
+ * \param strm Pointer to lzma_stream that is at least
+ * initialized with LZMA_STREAM_INIT.
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_raw_decoder(
+ lzma_stream *strm, const lzma_filter *filters)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Update the filter chain in the encoder
+ *
+ * This function may be called after lzma_code() has returned LZMA_STREAM_END
+ * when LZMA_FULL_BARRIER, LZMA_FULL_FLUSH, or LZMA_SYNC_FLUSH was used:
+ *
+ * - After LZMA_FULL_BARRIER or LZMA_FULL_FLUSH: Single-threaded .xz Stream
+ * encoder (lzma_stream_encoder()) and (since liblzma 5.4.0) multi-threaded
+ * Stream encoder (lzma_stream_encoder_mt()) allow setting a new filter
+ * chain to be used for the next Block(s).
+ *
+ * - After LZMA_SYNC_FLUSH: Raw encoder (lzma_raw_encoder()),
+ * Block encoder (lzma_block_encoder()), and single-threaded .xz Stream
+ * encoder (lzma_stream_encoder()) allow changing certain filter-specific
+ * options in the middle of encoding. The actual filters in the chain
+ * (Filter IDs) must not be changed! Currently only the lc, lp, and pb
+ * options of LZMA2 (not LZMA1) can be changed this way.
+ *
+ * - In the future some filters might allow changing some of their options
+ * without any barrier or flushing but currently such filters don't exist.
+ *
+ * This function may also be called when no data has been compressed yet
+ * although this is rarely useful. In that case, this function will behave
+ * as if LZMA_FULL_FLUSH (Stream encoders) or LZMA_SYNC_FLUSH (Raw or Block
+ * encoder) had been used right before calling this function.
+ *
+ * \param strm Pointer to lzma_stream that is at least
+ * initialized with LZMA_STREAM_INIT.
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_MEMLIMIT_ERROR
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_filters_update(
+ lzma_stream *strm, const lzma_filter *filters) lzma_nothrow;
+
+
+/**
+ * \brief Single-call raw encoder
+ *
+ * \note There is no function to calculate how big output buffer
+ * would surely be big enough. (lzma_stream_buffer_bound()
+ * works only for lzma_stream_buffer_encode(); raw encoder
+ * won't necessarily meet that bound.)
+ *
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_size Size of the input buffer
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_BUF_ERROR: Not enough output buffer space.
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
+ const lzma_filter *filters, const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size, uint8_t *out,
+ size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief Single-call raw decoder
+ *
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_pos The next byte will be read from in[*in_pos].
+ * *in_pos is updated only if decoding succeeds.
+ * \param in_size Size of the input buffer; the first byte that
+ * won't be read is in[in_size].
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Decoding was successful.
+ * - LZMA_BUF_ERROR: Not enough output buffer space.
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
+ const lzma_filter *filters, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief Get the size of the Filter Properties field
+ *
+ * This function may be useful when implementing custom file formats
+ * using the raw encoder and decoder.
+ *
+ * \note This function validates the Filter ID, but does not
+ * necessarily validate the options. Thus, it is possible
+ * that this returns LZMA_OK while the following call to
+ * lzma_properties_encode() returns LZMA_OPTIONS_ERROR.
+ *
+ * \param[out] size Pointer to uint32_t to hold the size of the properties
+ * \param filter Filter ID and options (the size of the properties may
+ * vary depending on the options)
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_properties_size(
+ uint32_t *size, const lzma_filter *filter) lzma_nothrow;
+
+
+/**
+ * \brief Encode the Filter Properties field
+ *
+ * \note Even this function won't validate more options than actually
+ * necessary. Thus, it is possible that encoding the properties
+ * succeeds but using the same options to initialize the encoder
+ * will fail.
+ *
+ * \note If lzma_properties_size() indicated that the size
+ * of the Filter Properties field is zero, calling
+ * lzma_properties_encode() is not required, but it
+ * won't do any harm either.
+ *
+ * \param filter Filter ID and options
+ * \param[out] props Buffer to hold the encoded options. The size of
+ * the buffer must have been already determined with
+ * lzma_properties_size().
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_properties_encode(
+ const lzma_filter *filter, uint8_t *props) lzma_nothrow;
+
+
+/**
+ * \brief Decode the Filter Properties field
+ *
+ * \param filter filter->id must have been set to the correct
+ * Filter ID. filter->options doesn't need to be
+ * initialized (it's not freed by this function). The
+ * decoded options will be stored in filter->options;
+ * it's application's responsibility to free it when
+ * appropriate. filter->options is set to NULL if
+ * there are no properties or if an error occurs.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * and in case of an error, also free().
+ * \param props Input buffer containing the properties.
+ * \param props_size Size of the properties. This must be the exact
+ * size; giving too much or too little input will
+ * return LZMA_OPTIONS_ERROR.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_properties_decode(
+ lzma_filter *filter, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size) lzma_nothrow;
+
+
+/**
+ * \brief Calculate encoded size of a Filter Flags field
+ *
+ * Knowing the size of Filter Flags is useful to know when allocating
+ * memory to hold the encoded Filter Flags.
+ *
+ * \note If you need to calculate size of List of Filter Flags,
+ * you need to loop over every lzma_filter entry.
+ *
+ * \param[out] size Pointer to integer to hold the calculated size
+ * \param filter Filter ID and associated options whose encoded
+ * size is to be calculated
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: *size set successfully. Note that this doesn't
+ * guarantee that filter->options is valid, thus
+ * lzma_filter_flags_encode() may still fail.
+ * - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.
+ * - LZMA_PROG_ERROR: Invalid options
+ */
+extern LZMA_API(lzma_ret) lzma_filter_flags_size(
+ uint32_t *size, const lzma_filter *filter)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Encode Filter Flags into given buffer
+ *
+ * In contrast to some functions, this doesn't allocate the needed buffer.
+ * This is due to how this function is used internally by liblzma.
+ *
+ * \param filter Filter ID and options to be encoded
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos out[*out_pos] is the next write position. This
+ * is updated by the encoder.
+ * \param out_size out[out_size] is the first byte to not write.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
+ * - LZMA_PROG_ERROR: Invalid options or not enough output
+ * buffer space (you should have checked it with
+ * lzma_filter_flags_size()).
+ */
+extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Decode Filter Flags from given buffer
+ *
+ * The decoded result is stored into *filter. The old value of
+ * filter->options is not free()d. If anything other than LZMA_OK
+ * is returned, filter->options is set to NULL.
+ *
+ * \param[out] filter Destination filter. The decoded Filter ID will
+ * be stored in filter->id. If options are needed
+ * they will be allocated and the pointer will be
+ * stored in filter->options.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param[out] in_pos The next byte will be read from in[*in_pos].
+ * *in_pos is updated only if decoding succeeds.
+ * \param in_size Size of the input buffer; the first byte that
+ * won't be read is in[in_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_OPTIONS_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
+ lzma_filter *filter, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/***********
+ * Strings *
+ ***********/
+
+/**
+ * \brief Allow or show all filters
+ *
+ * By default only the filters supported in the .xz format are accept by
+ * lzma_str_to_filters() or shown by lzma_str_list_filters().
+ */
+#define LZMA_STR_ALL_FILTERS UINT32_C(0x01)
+
+
+/**
+ * \brief Do not validate the filter chain in lzma_str_to_filters()
+ *
+ * By default lzma_str_to_filters() can return an error if the filter chain
+ * as a whole isn't usable in the .xz format or in the raw encoder or decoder.
+ * With this flag, this validation is skipped. This flag doesn't affect the
+ * handling of the individual filter options. To allow non-.xz filters also
+ * LZMA_STR_ALL_FILTERS is needed.
+ */
+#define LZMA_STR_NO_VALIDATION UINT32_C(0x02)
+
+
+/**
+ * \brief Stringify encoder options
+ *
+ * Show the filter-specific options that the encoder will use.
+ * This may be useful for verbose diagnostic messages.
+ *
+ * Note that if options were decoded from .xz headers then the encoder options
+ * may be undefined. This flag shouldn't be used in such a situation.
+ */
+#define LZMA_STR_ENCODER UINT32_C(0x10)
+
+
+/**
+ * \brief Stringify decoder options
+ *
+ * Show the filter-specific options that the decoder will use.
+ * This may be useful for showing what filter options were decoded
+ * from file headers.
+ */
+#define LZMA_STR_DECODER UINT32_C(0x20)
+
+
+/**
+ * \brief Produce xz-compatible getopt_long() syntax
+ *
+ * That is, "delta:dist=2 lzma2:dict=4MiB,pb=1,lp=1" becomes
+ * "--delta=dist=2 --lzma2=dict=4MiB,pb=1,lp=1".
+ *
+ * This syntax is compatible with xz 5.0.0 as long as the filters and
+ * their options are supported too.
+ */
+#define LZMA_STR_GETOPT_LONG UINT32_C(0x40)
+
+
+/**
+ * \brief Use two dashes "--" instead of a space to separate filters
+ *
+ * That is, "delta:dist=2 lzma2:pb=1,lp=1" becomes
+ * "delta:dist=2--lzma2:pb=1,lp=1". This looks slightly odd but this
+ * kind of strings should be usable on the command line without quoting.
+ * However, it is possible that future versions with new filter options
+ * might produce strings that require shell quoting anyway as the exact
+ * set of possible characters isn't frozen for now.
+ *
+ * It is guaranteed that the single quote (') will never be used in
+ * filter chain strings (even if LZMA_STR_NO_SPACES isn't used).
+ */
+#define LZMA_STR_NO_SPACES UINT32_C(0x80)
+
+
+/**
+ * \brief Convert a string to a filter chain
+ *
+ * This tries to make it easier to write applications that allow users
+ * to set custom compression options. This only handles the filter
+ * configuration (including presets) but not the number of threads,
+ * block size, check type, or memory limits.
+ *
+ * The input string can be either a preset or a filter chain. Presets
+ * begin with a digit 0-9 and may be followed by zero or more flags
+ * which are lower-case letters. Currently only "e" is supported, matching
+ * LZMA_PRESET_EXTREME. For partial xz command line syntax compatibility,
+ * a preset string may start with a single dash "-".
+ *
+ * A filter chain consists of one or more "filtername:opt1=value1,opt2=value2"
+ * strings separated by one or more spaces. Leading and trailing spaces are
+ * ignored. All names and values must be lower-case. Extra commas in the
+ * option list are ignored. The order of filters is significant: when
+ * encoding, the uncompressed input data goes to the leftmost filter first.
+ * Normally "lzma2" is the last filter in the chain.
+ *
+ * If one wishes to avoid spaces, for example, to avoid shell quoting,
+ * it is possible to use two dashes "--" instead of spaces to separate
+ * the filters.
+ *
+ * For xz command line compatibility, each filter may be prefixed with
+ * two dashes "--" and the colon ":" separating the filter name from
+ * the options may be replaced with an equals sign "=".
+ *
+ * By default, only filters that can be used in the .xz format are accepted.
+ * To allow all filters (LZMA1) use the flag LZMA_STR_ALL_FILTERS.
+ *
+ * By default, very basic validation is done for the filter chain as a whole,
+ * for example, that LZMA2 is only used as the last filter in the chain.
+ * The validation isn't perfect though and it's possible that this function
+ * succeeds but using the filter chain for encoding or decoding will still
+ * result in LZMA_OPTIONS_ERROR. To disable this validation, use the flag
+ * LZMA_STR_NO_VALIDATION.
+ *
+ * The available filter names and their options are available via
+ * lzma_str_list_filters(). See the xz man page for the description
+ * of filter names and options.
+ *
+ * For command line applications, below is an example how an error message
+ * can be displayed. Note the use of an empty string for the field width.
+ * If "^" was used there it would create an off-by-one error except at
+ * the very beginning of the line.
+ *
+ * \code{.c}
+ * const char *str = ...; // From user
+ * lzma_filter filters[LZMA_FILTERS_MAX + 1];
+ * int pos;
+ * const char *msg = lzma_str_to_filters(str, &pos, filters, 0, NULL);
+ * if (msg != NULL) {
+ * printf("%s: Error in XZ compression options:\n", argv[0]);
+ * printf("%s: %s\n", argv[0], str);
+ * printf("%s: %*s^\n", argv[0], errpos, "");
+ * printf("%s: %s\n", argv[0], msg);
+ * }
+ * \endcode
+ *
+ * \param str User-supplied string describing a preset or
+ * a filter chain. If a default value is needed and
+ * you don't know what would be good, use "6" since
+ * that is the default preset in xz too.
+ * \param[out] error_pos If this isn't NULL, this value will be set on
+ * both success and on all errors. This tells the
+ * location of the error in the string. This is
+ * an int to make it straightforward to use this
+ * as printf() field width. The value is guaranteed
+ * to be in the range [0, INT_MAX] even if strlen(str)
+ * somehow was greater than INT_MAX.
+ * \param[out] filters An array of lzma_filter structures. There must
+ * be LZMA_FILTERS_MAX + 1 (that is, five) elements
+ * in the array. The old contents are ignored so it
+ * doesn't need to be initialized. This array is
+ * modified only if this function returns NULL.
+ * Once the allocated filter options are no longer
+ * needed, lzma_filters_free() can be used to free the
+ * options (it doesn't free the filters array itself).
+ * \param flags Bitwise-or of zero or more of the flags
+ * LZMA_STR_ALL_FILTERS and LZMA_STR_NO_VALIDATION.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return On success, NULL is returned. On error, a statically-allocated
+ * error message is returned which together with the error_pos
+ * should give some idea what is wrong.
+ */
+extern LZMA_API(const char *) lzma_str_to_filters(
+ const char *str, int *error_pos, lzma_filter *filters,
+ uint32_t flags, const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Convert a filter chain to a string
+ *
+ * Use cases:
+ *
+ * - Verbose output showing the full encoder options to the user
+ * (use LZMA_STR_ENCODER in flags)
+ *
+ * - Showing the filters and options that are required to decode a file
+ * (use LZMA_STR_DECODER in flags)
+ *
+ * - Showing the filter names without any options in informational messages
+ * where the technical details aren't important (no flags). In this case
+ * the .options in the filters array are ignored and may be NULL even if
+ * a filter has a mandatory options structure.
+ *
+ * Note that even if the filter chain was specified using a preset,
+ * the resulting filter chain isn't reversed to a preset. So if you
+ * specify "6" to lzma_str_to_filters() then lzma_str_from_filters()
+ * will produce a string containing "lzma2".
+ *
+ * \param[out] str On success *str will be set to point to an
+ * allocated string describing the given filter
+ * chain. Old value is ignored. On error *str is
+ * always set to NULL.
+ * \param filters Array of filters terminated with
+ * .id == LZMA_VLI_UNKNOWN.
+ * \param flags Bitwise-or of zero or more of the flags
+ * LZMA_STR_ENCODER, LZMA_STR_DECODER,
+ * LZMA_STR_GETOPT_LONG, and LZMA_STR_NO_SPACES.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_OPTIONS_ERROR: Empty filter chain
+ * (filters[0].id == LZMA_VLI_UNKNOWN) or the filter chain
+ * includes a Filter ID that is not supported by this function.
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_str_from_filters(
+ char **str, const lzma_filter *filters, uint32_t flags,
+ const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief List available filters and/or their options (for help message)
+ *
+ * If a filter_id is given then only one line is created which contains the
+ * filter name. If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then the
+ * options read by the encoder or decoder are printed on the same line.
+ *
+ * If filter_id is LZMA_VLI_UNKNOWN then all supported .xz-compatible filters
+ * are listed:
+ *
+ * - If neither LZMA_STR_ENCODER nor LZMA_STR_DECODER is used then
+ * the supported filter names are listed on a single line separated
+ * by spaces.
+ *
+ * - If LZMA_STR_ENCODER or LZMA_STR_DECODER is used then filters and
+ * the supported options are listed one filter per line. There won't
+ * be a newline after the last filter.
+ *
+ * - If LZMA_STR_ALL_FILTERS is used then the list will include also
+ * those filters that cannot be used in the .xz format (LZMA1).
+ *
+ * \param str On success *str will be set to point to an
+ * allocated string listing the filters and options.
+ * Old value is ignored. On error *str is always set
+ * to NULL.
+ * \param filter_id Filter ID or LZMA_VLI_UNKNOWN.
+ * \param flags Bitwise-or of zero or more of the flags
+ * LZMA_STR_ALL_FILTERS, LZMA_STR_ENCODER,
+ * LZMA_STR_DECODER, and LZMA_STR_GETOPT_LONG.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_OPTIONS_ERROR: Unsupported filter_id or flags
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_str_list_filters(
+ char **str, lzma_vli filter_id, uint32_t flags,
+ const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
diff --git a/src/liblzma/api/lzma/hardware.h b/src/liblzma/api/lzma/hardware.h
new file mode 100644
index 0000000..f34897d
--- /dev/null
+++ b/src/liblzma/api/lzma/hardware.h
@@ -0,0 +1,63 @@
+/**
+ * \file lzma/hardware.h
+ * \brief Hardware information
+ * \note Never include this file directly. Use <lzma.h> instead.
+ *
+ * Since liblzma can consume a lot of system resources, it also provides
+ * ways to limit the resource usage. Applications linking against liblzma
+ * need to do the actual decisions how much resources to let liblzma to use.
+ * To ease making these decisions, liblzma provides functions to find out
+ * the relevant capabilities of the underlying hardware. Currently there
+ * is only a function to find out the amount of RAM, but in the future there
+ * will be also a function to detect how many concurrent threads the system
+ * can run.
+ *
+ * \note On some operating systems, these function may temporarily
+ * load a shared library or open file descriptor(s) to find out
+ * the requested hardware information. Unless the application
+ * assumes that specific file descriptors are not touched by
+ * other threads, this should have no effect on thread safety.
+ * Possible operations involving file descriptors will restart
+ * the syscalls if they return EINTR.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Get the total amount of physical memory (RAM) in bytes
+ *
+ * This function may be useful when determining a reasonable memory
+ * usage limit for decompressing or how much memory it is OK to use
+ * for compressing.
+ *
+ * \return On success, the total amount of physical memory in bytes
+ * is returned. If the amount of RAM cannot be determined,
+ * zero is returned. This can happen if an error occurs
+ * or if there is no code in liblzma to detect the amount
+ * of RAM on the specific operating system.
+ */
+extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;
+
+
+/**
+ * \brief Get the number of processor cores or threads
+ *
+ * This function may be useful when determining how many threads to use.
+ * If the hardware supports more than one thread per CPU core, the number
+ * of hardware threads is returned if that information is available.
+ *
+ * \return On success, the number of available CPU threads or cores is
+ * returned. If this information isn't available or an error
+ * occurs, zero is returned.
+ */
+extern LZMA_API(uint32_t) lzma_cputhreads(void) lzma_nothrow;
diff --git a/src/liblzma/api/lzma/index.h b/src/liblzma/api/lzma/index.h
new file mode 100644
index 0000000..6eee4d6
--- /dev/null
+++ b/src/liblzma/api/lzma/index.h
@@ -0,0 +1,860 @@
+/**
+ * \file lzma/index.h
+ * \brief Handling of .xz Index and related information
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Opaque data type to hold the Index(es) and other information
+ *
+ * lzma_index often holds just one .xz Index and possibly the Stream Flags
+ * of the same Stream and size of the Stream Padding field. However,
+ * multiple lzma_indexes can be concatenated with lzma_index_cat() and then
+ * there may be information about multiple Streams in the same lzma_index.
+ *
+ * Notes about thread safety: Only one thread may modify lzma_index at
+ * a time. All functions that take non-const pointer to lzma_index
+ * modify it. As long as no thread is modifying the lzma_index, getting
+ * information from the same lzma_index can be done from multiple threads
+ * at the same time with functions that take a const pointer to
+ * lzma_index or use lzma_index_iter. The same iterator must be used
+ * only by one thread at a time, of course, but there can be as many
+ * iterators for the same lzma_index as needed.
+ */
+typedef struct lzma_index_s lzma_index;
+
+
+/**
+ * \brief Iterator to get information about Blocks and Streams
+ */
+typedef struct {
+ struct {
+ /**
+ * \brief Pointer to Stream Flags
+ *
+ * This is NULL if Stream Flags have not been set for
+ * this Stream with lzma_index_stream_flags().
+ */
+ const lzma_stream_flags *flags;
+
+ /** \private Reserved member. */
+ const void *reserved_ptr1;
+
+ /** \private Reserved member. */
+ const void *reserved_ptr2;
+
+ /** \private Reserved member. */
+ const void *reserved_ptr3;
+
+ /**
+ * \brief Stream number in the lzma_index
+ *
+ * The first Stream is 1.
+ */
+ lzma_vli number;
+
+ /**
+ * \brief Number of Blocks in the Stream
+ *
+ * If this is zero, the block structure below has
+ * undefined values.
+ */
+ lzma_vli block_count;
+
+ /**
+ * \brief Compressed start offset of this Stream
+ *
+ * The offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ */
+ lzma_vli compressed_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Stream
+ *
+ * The offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ */
+ lzma_vli uncompressed_offset;
+
+ /**
+ * \brief Compressed size of this Stream
+ *
+ * This includes all headers except the possible
+ * Stream Padding after this Stream.
+ */
+ lzma_vli compressed_size;
+
+ /**
+ * \brief Uncompressed size of this Stream
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Size of Stream Padding after this Stream
+ *
+ * If it hasn't been set with lzma_index_stream_padding(),
+ * this defaults to zero. Stream Padding is always
+ * a multiple of four bytes.
+ */
+ lzma_vli padding;
+
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli1;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli2;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli3;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli4;
+ } stream;
+
+ struct {
+ /**
+ * \brief Block number in the file
+ *
+ * The first Block is 1.
+ */
+ lzma_vli number_in_file;
+
+ /**
+ * \brief Compressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the
+ * lzma_index (i.e. usually the beginning of the .xz file).
+ * Normally this is where you should seek in the .xz file
+ * to start decompressing this Block.
+ */
+ lzma_vli compressed_file_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the lzma_index
+ * (i.e. usually the beginning of the .xz file).
+ *
+ * When doing random-access reading, it is possible that
+ * the target offset is not exactly at Block boundary. One
+ * will need to compare the target offset against
+ * uncompressed_file_offset or uncompressed_stream_offset,
+ * and possibly decode and throw away some amount of data
+ * before reaching the target offset.
+ */
+ lzma_vli uncompressed_file_offset;
+
+ /**
+ * \brief Block number in this Stream
+ *
+ * The first Block is 1.
+ */
+ lzma_vli number_in_stream;
+
+ /**
+ * \brief Compressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the Stream
+ * containing this Block.
+ */
+ lzma_vli compressed_stream_offset;
+
+ /**
+ * \brief Uncompressed start offset of this Block
+ *
+ * This offset is relative to the beginning of the Stream
+ * containing this Block.
+ */
+ lzma_vli uncompressed_stream_offset;
+
+ /**
+ * \brief Uncompressed size of this Block
+ *
+ * You should pass this to the Block decoder if you will
+ * decode this Block. It will allow the Block decoder to
+ * validate the uncompressed size.
+ */
+ lzma_vli uncompressed_size;
+
+ /**
+ * \brief Unpadded size of this Block
+ *
+ * You should pass this to the Block decoder if you will
+ * decode this Block. It will allow the Block decoder to
+ * validate the unpadded size.
+ */
+ lzma_vli unpadded_size;
+
+ /**
+ * \brief Total compressed size
+ *
+ * This includes all headers and padding in this Block.
+ * This is useful if you need to know how many bytes
+ * the Block decoder will actually read.
+ */
+ lzma_vli total_size;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli1;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli2;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli3;
+
+ /** \private Reserved member. */
+ lzma_vli reserved_vli4;
+
+ /** \private Reserved member. */
+ const void *reserved_ptr1;
+
+ /** \private Reserved member. */
+ const void *reserved_ptr2;
+
+ /** \private Reserved member. */
+ const void *reserved_ptr3;
+
+ /** \private Reserved member. */
+ const void *reserved_ptr4;
+ } block;
+
+ /**
+ * \private Internal struct.
+ *
+ * Internal data which is used to store the state of the iterator.
+ * The exact format may vary between liblzma versions, so don't
+ * touch these in any way.
+ */
+ union {
+ /** \private Internal member. */
+ const void *p;
+
+ /** \private Internal member. */
+ size_t s;
+
+ /** \private Internal member. */
+ lzma_vli v;
+ } internal[6];
+} lzma_index_iter;
+
+
+/**
+ * \brief Operation mode for lzma_index_iter_next()
+ */
+typedef enum {
+ LZMA_INDEX_ITER_ANY = 0,
+ /**<
+ * \brief Get the next Block or Stream
+ *
+ * Go to the next Block if the current Stream has at least
+ * one Block left. Otherwise go to the next Stream even if
+ * it has no Blocks. If the Stream has no Blocks
+ * (lzma_index_iter.stream.block_count == 0),
+ * lzma_index_iter.block will have undefined values.
+ */
+
+ LZMA_INDEX_ITER_STREAM = 1,
+ /**<
+ * \brief Get the next Stream
+ *
+ * Go to the next Stream even if the current Stream has
+ * unread Blocks left. If the next Stream has at least one
+ * Block, the iterator will point to the first Block.
+ * If there are no Blocks, lzma_index_iter.block will have
+ * undefined values.
+ */
+
+ LZMA_INDEX_ITER_BLOCK = 2,
+ /**<
+ * \brief Get the next Block
+ *
+ * Go to the next Block if the current Stream has at least
+ * one Block left. If the current Stream has no Blocks left,
+ * the next Stream with at least one Block is located and
+ * the iterator will be made to point to the first Block of
+ * that Stream.
+ */
+
+ LZMA_INDEX_ITER_NONEMPTY_BLOCK = 3
+ /**<
+ * \brief Get the next non-empty Block
+ *
+ * This is like LZMA_INDEX_ITER_BLOCK except that it will
+ * skip Blocks whose Uncompressed Size is zero.
+ */
+
+} lzma_index_iter_mode;
+
+
+/**
+ * \brief Calculate memory usage of lzma_index
+ *
+ * On disk, the size of the Index field depends on both the number of Records
+ * stored and the size of the Records (due to variable-length integer
+ * encoding). When the Index is kept in lzma_index structure, the memory usage
+ * depends only on the number of Records/Blocks stored in the Index(es), and
+ * in case of concatenated lzma_indexes, the number of Streams. The size in
+ * RAM is almost always significantly bigger than in the encoded form on disk.
+ *
+ * This function calculates an approximate amount of memory needed to hold
+ * the given number of Streams and Blocks in lzma_index structure. This
+ * value may vary between CPU architectures and also between liblzma versions
+ * if the internal implementation is modified.
+ *
+ * \param streams Number of Streams
+ * \param blocks Number of Blocks
+ *
+ * \return Approximate memory in bytes needed in a lzma_index structure.
+ */
+extern LZMA_API(uint64_t) lzma_index_memusage(
+ lzma_vli streams, lzma_vli blocks) lzma_nothrow;
+
+
+/**
+ * \brief Calculate the memory usage of an existing lzma_index
+ *
+ * This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i),
+ * lzma_index_block_count(i)).
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Approximate memory in bytes used by the lzma_index structure.
+ */
+extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
+ lzma_nothrow;
+
+
+/**
+ * \brief Allocate and initialize a new lzma_index structure
+ *
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return On success, a pointer to an empty initialized lzma_index is
+ * returned. If allocation fails, NULL is returned.
+ */
+extern LZMA_API(lzma_index *) lzma_index_init(const lzma_allocator *allocator)
+ lzma_nothrow;
+
+
+/**
+ * \brief Deallocate lzma_index
+ *
+ * If i is NULL, this does nothing.
+ *
+ * \param i Pointer to lzma_index structure to deallocate
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ */
+extern LZMA_API(void) lzma_index_end(
+ lzma_index *i, const lzma_allocator *allocator) lzma_nothrow;
+
+
+/**
+ * \brief Add a new Block to lzma_index
+ *
+ * \param i Pointer to a lzma_index structure
+ * \param allocator lzma_allocator for custom allocator
+ * functions. Set to NULL to use malloc()
+ * and free().
+ * \param unpadded_size Unpadded Size of a Block. This can be
+ * calculated with lzma_block_unpadded_size()
+ * after encoding or decoding the Block.
+ * \param uncompressed_size Uncompressed Size of a Block. This can be
+ * taken directly from lzma_block structure
+ * after encoding or decoding the Block.
+ *
+ * Appending a new Block does not invalidate iterators. For example,
+ * if an iterator was pointing to the end of the lzma_index, after
+ * lzma_index_append() it is possible to read the next Block with
+ * an existing iterator.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_DATA_ERROR: Compressed or uncompressed size of the
+ * Stream or size of the Index field would grow too big.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_append(
+ lzma_index *i, const lzma_allocator *allocator,
+ lzma_vli unpadded_size, lzma_vli uncompressed_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Set the Stream Flags
+ *
+ * Set the Stream Flags of the last (and typically the only) Stream
+ * in lzma_index. This can be useful when reading information from the
+ * lzma_index, because to decode Blocks, knowing the integrity check type
+ * is needed.
+ *
+ * \param i Pointer to lzma_index structure
+ * \param stream_flags Pointer to lzma_stream_flags structure. This
+ * is copied into the internal preallocated
+ * structure, so the caller doesn't need to keep
+ * the flags' data available after calling this
+ * function.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_stream_flags(
+ lzma_index *i, const lzma_stream_flags *stream_flags)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Get the types of integrity Checks
+ *
+ * If lzma_index_stream_flags() is used to set the Stream Flags for
+ * every Stream, lzma_index_checks() can be used to get a bitmask to
+ * indicate which Check types have been used. It can be useful e.g. if
+ * showing the Check types to the user.
+ *
+ * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10.
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Bitmask indicating which Check types are used in the lzma_index
+ */
+extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Set the amount of Stream Padding
+ *
+ * Set the amount of Stream Padding of the last (and typically the only)
+ * Stream in the lzma_index. This is needed when planning to do random-access
+ * reading within multiple concatenated Streams.
+ *
+ * By default, the amount of Stream Padding is assumed to be zero bytes.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_DATA_ERROR: The file size would grow too big.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_stream_padding(
+ lzma_index *i, lzma_vli stream_padding)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Get the number of Streams
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Number of Streams in the lzma_index
+ */
+extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the number of Blocks
+ *
+ * This returns the total number of Blocks in lzma_index. To get number
+ * of Blocks in individual Streams, use lzma_index_iter.
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Number of blocks in the lzma_index
+ */
+extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the size of the Index field as bytes
+ *
+ * This is needed to verify the Backward Size field in the Stream Footer.
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Size in bytes of the Index
+ */
+extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the total size of the Stream
+ *
+ * If multiple lzma_indexes have been combined, this works as if the Blocks
+ * were in a single Stream. This is useful if you are going to combine
+ * Blocks from multiple Streams into a single new Stream.
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Size in bytes of the Stream (if all Blocks are combined
+ * into one Stream).
+ */
+extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the total size of the Blocks
+ *
+ * This doesn't include the Stream Header, Stream Footer, Stream Padding,
+ * or Index fields.
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Size in bytes of all Blocks in the Stream(s)
+ */
+extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the total size of the file
+ *
+ * When no lzma_indexes have been combined with lzma_index_cat() and there is
+ * no Stream Padding, this function is identical to lzma_index_stream_size().
+ * If multiple lzma_indexes have been combined, this includes also the headers
+ * of each separate Stream and the possible Stream Padding fields.
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Total size of the .xz file in bytes
+ */
+extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Get the uncompressed size of the file
+ *
+ * \param i Pointer to lzma_index structure
+ *
+ * \return Size in bytes of the uncompressed data in the file
+ */
+extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
+ lzma_nothrow lzma_attr_pure;
+
+
+/**
+ * \brief Initialize an iterator
+ *
+ * This function associates the iterator with the given lzma_index, and calls
+ * lzma_index_iter_rewind() on the iterator.
+ *
+ * This function doesn't allocate any memory, thus there is no
+ * lzma_index_iter_end(). The iterator is valid as long as the
+ * associated lzma_index is valid, that is, until lzma_index_end() or
+ * using it as source in lzma_index_cat(). Specifically, lzma_index doesn't
+ * become invalid if new Blocks are added to it with lzma_index_append() or
+ * if it is used as the destination in lzma_index_cat().
+ *
+ * It is safe to make copies of an initialized lzma_index_iter, for example,
+ * to easily restart reading at some particular position.
+ *
+ * \param iter Pointer to a lzma_index_iter structure
+ * \param i lzma_index to which the iterator will be associated
+ */
+extern LZMA_API(void) lzma_index_iter_init(
+ lzma_index_iter *iter, const lzma_index *i) lzma_nothrow;
+
+
+/**
+ * \brief Rewind the iterator
+ *
+ * Rewind the iterator so that next call to lzma_index_iter_next() will
+ * return the first Block or Stream.
+ *
+ * \param iter Pointer to a lzma_index_iter structure
+ */
+extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
+ lzma_nothrow;
+
+
+/**
+ * \brief Get the next Block or Stream
+ *
+ * \param iter Iterator initialized with lzma_index_iter_init()
+ * \param mode Specify what kind of information the caller wants
+ * to get. See lzma_index_iter_mode for details.
+ *
+ * \return lzma_bool:
+ * - true if no Block or Stream matching the mode is found.
+ * *iter is not updated (failure).
+ * - false if the next Block or Stream matching the mode was
+ * found. *iter is updated (success).
+ */
+extern LZMA_API(lzma_bool) lzma_index_iter_next(
+ lzma_index_iter *iter, lzma_index_iter_mode mode)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Locate a Block
+ *
+ * If it is possible to seek in the .xz file, it is possible to parse
+ * the Index field(s) and use lzma_index_iter_locate() to do random-access
+ * reading with granularity of Block size.
+ *
+ * If the target is smaller than the uncompressed size of the Stream (can be
+ * checked with lzma_index_uncompressed_size()):
+ * - Information about the Stream and Block containing the requested
+ * uncompressed offset is stored into *iter.
+ * - Internal state of the iterator is adjusted so that
+ * lzma_index_iter_next() can be used to read subsequent Blocks or Streams.
+ *
+ * If the target is greater than the uncompressed size of the Stream, *iter
+ * is not modified.
+ *
+ * \param iter Iterator that was earlier initialized with
+ * lzma_index_iter_init().
+ * \param target Uncompressed target offset which the caller would
+ * like to locate from the Stream
+ *
+ * \return lzma_bool:
+ * - true if the target is greater than or equal to the
+ * uncompressed size of the Stream (failure)
+ * - false if the target is smaller than the uncompressed size
+ * of the Stream (success)
+ */
+extern LZMA_API(lzma_bool) lzma_index_iter_locate(
+ lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
+
+
+/**
+ * \brief Concatenate lzma_indexes
+ *
+ * Concatenating lzma_indexes is useful when doing random-access reading in
+ * multi-Stream .xz file, or when combining multiple Streams into single
+ * Stream.
+ *
+ * \param[out] dest lzma_index after which src is appended
+ * \param src lzma_index to be appended after dest. If this
+ * function succeeds, the memory allocated for src
+ * is freed or moved to be part of dest, and all
+ * iterators pointing to src will become invalid.
+* \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: lzma_indexes were concatenated successfully.
+ * src is now a dangling pointer.
+ * - LZMA_DATA_ERROR: *dest would grow too big.
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_cat(lzma_index *dest, lzma_index *src,
+ const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Duplicate lzma_index
+ *
+ * \param i Pointer to lzma_index structure to be duplicated
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return A copy of the lzma_index, or NULL if memory allocation failed.
+ */
+extern LZMA_API(lzma_index *) lzma_index_dup(
+ const lzma_index *i, const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .xz Index encoder
+ *
+ * \param strm Pointer to properly prepared lzma_stream
+ * \param i Pointer to lzma_index which should be encoded.
+ *
+ * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * It is enough to use only one of them (you can choose freely).
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization succeeded, continue with lzma_code().
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_encoder(
+ lzma_stream *strm, const lzma_index *i)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Initialize .xz Index decoder
+ *
+ * \param strm Pointer to properly prepared lzma_stream
+ * \param[out] i The decoded Index will be made available via
+ * this pointer. Initially this function will
+ * set *i to NULL (the old value is ignored). If
+ * decoding succeeds (lzma_code() returns
+ * LZMA_STREAM_END), *i will be set to point
+ * to a new lzma_index, which the application
+ * has to later free with lzma_index_end().
+ * \param memlimit How much memory the resulting lzma_index is
+ * allowed to require. liblzma 5.2.3 and earlier
+ * don't allow 0 here and return LZMA_PROG_ERROR;
+ * later versions treat 0 as if 1 had been specified.
+ *
+ * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * There is no need to use LZMA_FINISH, but it's allowed because it may
+ * simplify certain types of applications.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Initialization succeeded, continue with lzma_code().
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ *
+ * \note liblzma 5.2.3 and older list also LZMA_MEMLIMIT_ERROR here
+ * but that error code has never been possible from this
+ * initialization function.
+ */
+extern LZMA_API(lzma_ret) lzma_index_decoder(
+ lzma_stream *strm, lzma_index **i, uint64_t memlimit)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Single-call .xz Index encoder
+ *
+ * \note This function doesn't take allocator argument since all
+ * the internal data is allocated on stack.
+ *
+ * \param i lzma_index to be encoded
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * *out_pos is updated only if encoding succeeds.
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_BUF_ERROR: Output buffer is too small. Use
+ * lzma_index_size() to find out how much output
+ * space is needed.
+ * - LZMA_PROG_ERROR
+ *
+ */
+extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
+ uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief Single-call .xz Index decoder
+ *
+ * \param[out] i If decoding succeeds, *i will point to a new
+ * lzma_index, which the application has to
+ * later free with lzma_index_end(). If an error
+ * occurs, *i will be NULL. The old value of *i
+ * is always ignored and thus doesn't need to be
+ * initialized by the caller.
+ * \param[out] memlimit Pointer to how much memory the resulting
+ * lzma_index is allowed to require. The value
+ * pointed by this pointer is modified if and only
+ * if LZMA_MEMLIMIT_ERROR is returned.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ * \param in Beginning of the input buffer
+ * \param in_pos The next byte will be read from in[*in_pos].
+ * *in_pos is updated only if decoding succeeds.
+ * \param in_size Size of the input buffer; the first byte that
+ * won't be read is in[in_size].
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Decoding was successful.
+ * - LZMA_MEM_ERROR
+ * - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
+ * The minimum required memlimit value was stored to *memlimit.
+ * - LZMA_DATA_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
+ uint64_t *memlimit, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+ lzma_nothrow;
+
+
+/**
+ * \brief Initialize a .xz file information decoder
+ *
+ * This decoder decodes the Stream Header, Stream Footer, Index, and
+ * Stream Padding field(s) from the input .xz file and stores the resulting
+ * combined index in *dest_index. This information can be used to get the
+ * uncompressed file size with lzma_index_uncompressed_size(*dest_index) or,
+ * for example, to implement random access reading by locating the Blocks
+ * in the Streams.
+ *
+ * To get the required information from the .xz file, lzma_code() may ask
+ * the application to seek in the input file by returning LZMA_SEEK_NEEDED
+ * and having the target file position specified in lzma_stream.seek_pos.
+ * The number of seeks required depends on the input file and how big buffers
+ * the application provides. When possible, the decoder will seek backward
+ * and forward in the given buffer to avoid useless seek requests. Thus, if
+ * the application provides the whole file at once, no external seeking will
+ * be required (that is, lzma_code() won't return LZMA_SEEK_NEEDED).
+ *
+ * The value in lzma_stream.total_in can be used to estimate how much data
+ * liblzma had to read to get the file information. However, due to seeking
+ * and the way total_in is updated, the value of total_in will be somewhat
+ * inaccurate (a little too big). Thus, total_in is a good estimate but don't
+ * expect to see the same exact value for the same file if you change the
+ * input buffer size or switch to a different liblzma version.
+ *
+ * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
+ * You only need to use LZMA_RUN; LZMA_FINISH is only supported because it
+ * might be convenient for some applications. If you use LZMA_FINISH and if
+ * lzma_code() asks the application to seek, remember to reset `action' back
+ * to LZMA_RUN unless you hit the end of the file again.
+ *
+ * Possible return values from lzma_code():
+ * - LZMA_OK: All OK so far, more input needed
+ * - LZMA_SEEK_NEEDED: Provide more input starting from the absolute
+ * file position strm->seek_pos
+ * - LZMA_STREAM_END: Decoding was successful, *dest_index has been set
+ * - LZMA_FORMAT_ERROR: The input file is not in the .xz format (the
+ * expected magic bytes were not found from the beginning of the file)
+ * - LZMA_OPTIONS_ERROR: File looks valid but contains headers that aren't
+ * supported by this version of liblzma
+ * - LZMA_DATA_ERROR: File is corrupt
+ * - LZMA_BUF_ERROR
+ * - LZMA_MEM_ERROR
+ * - LZMA_MEMLIMIT_ERROR
+ * - LZMA_PROG_ERROR
+ *
+ * \param strm Pointer to a properly prepared lzma_stream
+ * \param[out] dest_index Pointer to a pointer where the decoder will put
+ * the decoded lzma_index. The old value
+ * of *dest_index is ignored (not freed).
+ * \param memlimit How much memory the resulting lzma_index is
+ * allowed to require. Use UINT64_MAX to
+ * effectively disable the limiter.
+ * \param file_size Size of the input .xz file
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_MEM_ERROR
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_file_info_decoder(
+ lzma_stream *strm, lzma_index **dest_index,
+ uint64_t memlimit, uint64_t file_size)
+ lzma_nothrow;
diff --git a/src/liblzma/api/lzma/index_hash.h b/src/liblzma/api/lzma/index_hash.h
new file mode 100644
index 0000000..a2d4c48
--- /dev/null
+++ b/src/liblzma/api/lzma/index_hash.h
@@ -0,0 +1,124 @@
+/**
+ * \file lzma/index_hash.h
+ * \brief Validate Index by using a hash function
+ * \note Never include this file directly. Use <lzma.h> instead.
+ *
+ * Hashing makes it possible to use constant amount of memory to validate
+ * Index of arbitrary size.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+/**
+ * \brief Opaque data type to hold the Index hash
+ */
+typedef struct lzma_index_hash_s lzma_index_hash;
+
+
+/**
+ * \brief Allocate and initialize a new lzma_index_hash structure
+ *
+ * If index_hash is NULL, this function allocates and initializes a new
+ * lzma_index_hash structure and returns a pointer to it. If allocation
+ * fails, NULL is returned.
+ *
+ * If index_hash is non-NULL, this function reinitializes the lzma_index_hash
+ * structure and returns the same pointer. In this case, return value cannot
+ * be NULL or a different pointer than the index_hash that was given as
+ * an argument.
+ *
+ * \param index_hash Pointer to a lzma_index_hash structure or NULL.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ *
+ * \return Initialized lzma_index_hash structure on success or
+ * NULL on failure.
+ */
+extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
+ lzma_index_hash *index_hash, const lzma_allocator *allocator)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Deallocate lzma_index_hash structure
+ *
+ * \param index_hash Pointer to a lzma_index_hash structure to free.
+ * \param allocator lzma_allocator for custom allocator functions.
+ * Set to NULL to use malloc() and free().
+ */
+extern LZMA_API(void) lzma_index_hash_end(
+ lzma_index_hash *index_hash, const lzma_allocator *allocator)
+ lzma_nothrow;
+
+
+/**
+ * \brief Add a new Record to an Index hash
+ *
+ * \param index_hash Pointer to a lzma_index_hash structure
+ * \param unpadded_size Unpadded Size of a Block
+ * \param uncompressed_size Uncompressed Size of a Block
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK
+ * - LZMA_DATA_ERROR: Compressed or uncompressed size of the
+ * Stream or size of the Index field would grow too big.
+ * - LZMA_PROG_ERROR: Invalid arguments or this function is being
+ * used when lzma_index_hash_decode() has already been used.
+ */
+extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
+ lzma_vli unpadded_size, lzma_vli uncompressed_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Decode and validate the Index field
+ *
+ * After telling the sizes of all Blocks with lzma_index_hash_append(),
+ * the actual Index field is decoded with this function. Specifically,
+ * once decoding of the Index field has been started, no more Records
+ * can be added using lzma_index_hash_append().
+ *
+ * This function doesn't use lzma_stream structure to pass the input data.
+ * Instead, the input buffer is specified using three arguments. This is
+ * because it matches better the internal APIs of liblzma.
+ *
+ * \param index_hash Pointer to a lzma_index_hash structure
+ * \param in Pointer to the beginning of the input buffer
+ * \param[out] in_pos in[*in_pos] is the next byte to process
+ * \param in_size in[in_size] is the first byte not to process
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: So far good, but more input is needed.
+ * - LZMA_STREAM_END: Index decoded successfully and it matches
+ * the Records given with lzma_index_hash_append().
+ * - LZMA_DATA_ERROR: Index is corrupt or doesn't match the
+ * information given with lzma_index_hash_append().
+ * - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
+ * - LZMA_PROG_ERROR
+ */
+extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Get the size of the Index field as bytes
+ *
+ * This is needed to verify the Backward Size field in the Stream Footer.
+ *
+ * \param index_hash Pointer to a lzma_index_hash structure
+ *
+ * \return Size of the Index field in bytes.
+ */
+extern LZMA_API(lzma_vli) lzma_index_hash_size(
+ const lzma_index_hash *index_hash)
+ lzma_nothrow lzma_attr_pure;
diff --git a/src/liblzma/api/lzma/lzma12.h b/src/liblzma/api/lzma/lzma12.h
new file mode 100644
index 0000000..8ef6ea5
--- /dev/null
+++ b/src/liblzma/api/lzma/lzma12.h
@@ -0,0 +1,569 @@
+/**
+ * \file lzma/lzma12.h
+ * \brief LZMA1 and LZMA2 filters
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief LZMA1 Filter ID (for raw encoder/decoder only, not in .xz)
+ *
+ * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils,
+ * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from
+ * accidentally using LZMA when they actually want LZMA2.
+ */
+#define LZMA_FILTER_LZMA1 LZMA_VLI_C(0x4000000000000001)
+
+/**
+ * \brief LZMA1 Filter ID with extended options (for raw encoder/decoder)
+ *
+ * This is like LZMA_FILTER_LZMA1 but with this ID a few extra options
+ * are supported in the lzma_options_lzma structure:
+ *
+ * - A flag to tell the encoder if the end of payload marker (EOPM) alias
+ * end of stream (EOS) marker must be written at the end of the stream.
+ * In contrast, LZMA_FILTER_LZMA1 always writes the end marker.
+ *
+ * - Decoder needs to be told the uncompressed size of the stream
+ * or that it is unknown (using the special value UINT64_MAX).
+ * If the size is known, a flag can be set to allow the presence of
+ * the end marker anyway. In contrast, LZMA_FILTER_LZMA1 always
+ * behaves as if the uncompressed size was unknown.
+ *
+ * This allows handling file formats where LZMA1 streams are used but where
+ * the end marker isn't allowed or where it might not (always) be present.
+ * This extended LZMA1 functionality is provided as a Filter ID for raw
+ * encoder and decoder instead of adding new encoder and decoder initialization
+ * functions because this way it is possible to also use extra filters,
+ * for example, LZMA_FILTER_X86 in a filter chain with LZMA_FILTER_LZMA1EXT,
+ * which might be needed to handle some file formats.
+ */
+#define LZMA_FILTER_LZMA1EXT LZMA_VLI_C(0x4000000000000002)
+
+/**
+ * \brief LZMA2 Filter ID
+ *
+ * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
+ * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
+ * when trying to compress incompressible data), possibility to change
+ * lc/lp/pb in the middle of encoding, and some other internal improvements.
+ */
+#define LZMA_FILTER_LZMA2 LZMA_VLI_C(0x21)
+
+
+/**
+ * \brief Match finders
+ *
+ * Match finder has major effect on both speed and compression ratio.
+ * Usually hash chains are faster than binary trees.
+ *
+ * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
+ * choice, because binary trees get much higher compression ratio penalty
+ * with LZMA_SYNC_FLUSH.
+ *
+ * The memory usage formulas are only rough estimates, which are closest to
+ * reality when dict_size is a power of two. The formulas are more complex
+ * in reality, and can also change a little between liblzma versions. Use
+ * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
+ */
+typedef enum {
+ LZMA_MF_HC3 = 0x03,
+ /**<
+ * \brief Hash Chain with 2- and 3-byte hashing
+ *
+ * Minimum nice_len: 3
+ *
+ * Memory usage:
+ * - dict_size <= 16 MiB: dict_size * 7.5
+ * - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
+ */
+
+ LZMA_MF_HC4 = 0x04,
+ /**<
+ * \brief Hash Chain with 2-, 3-, and 4-byte hashing
+ *
+ * Minimum nice_len: 4
+ *
+ * Memory usage:
+ * - dict_size <= 32 MiB: dict_size * 7.5
+ * - dict_size > 32 MiB: dict_size * 6.5
+ */
+
+ LZMA_MF_BT2 = 0x12,
+ /**<
+ * \brief Binary Tree with 2-byte hashing
+ *
+ * Minimum nice_len: 2
+ *
+ * Memory usage: dict_size * 9.5
+ */
+
+ LZMA_MF_BT3 = 0x13,
+ /**<
+ * \brief Binary Tree with 2- and 3-byte hashing
+ *
+ * Minimum nice_len: 3
+ *
+ * Memory usage:
+ * - dict_size <= 16 MiB: dict_size * 11.5
+ * - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
+ */
+
+ LZMA_MF_BT4 = 0x14
+ /**<
+ * \brief Binary Tree with 2-, 3-, and 4-byte hashing
+ *
+ * Minimum nice_len: 4
+ *
+ * Memory usage:
+ * - dict_size <= 32 MiB: dict_size * 11.5
+ * - dict_size > 32 MiB: dict_size * 10.5
+ */
+} lzma_match_finder;
+
+
+/**
+ * \brief Test if given match finder is supported
+ *
+ * It is safe to call this with a value that isn't listed in
+ * lzma_match_finder enumeration; the return value will be false.
+ *
+ * There is no way to list which match finders are available in this
+ * particular liblzma version and build. It would be useless, because
+ * a new match finder, which the application developer wasn't aware,
+ * could require giving additional options to the encoder that the older
+ * match finders don't need.
+ *
+ * \param match_finder Match finder ID
+ *
+ * \return lzma_bool:
+ * - true if the match finder is supported by this liblzma build.
+ * - false otherwise.
+ */
+extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
+ lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief Compression modes
+ *
+ * This selects the function used to analyze the data produced by the match
+ * finder.
+ */
+typedef enum {
+ LZMA_MODE_FAST = 1,
+ /**<
+ * \brief Fast compression
+ *
+ * Fast mode is usually at its best when combined with
+ * a hash chain match finder.
+ */
+
+ LZMA_MODE_NORMAL = 2
+ /**<
+ * \brief Normal compression
+ *
+ * This is usually notably slower than fast mode. Use this
+ * together with binary tree match finders to expose the
+ * full potential of the LZMA1 or LZMA2 encoder.
+ */
+} lzma_mode;
+
+
+/**
+ * \brief Test if given compression mode is supported
+ *
+ * It is safe to call this with a value that isn't listed in lzma_mode
+ * enumeration; the return value will be false.
+ *
+ * There is no way to list which modes are available in this particular
+ * liblzma version and build. It would be useless, because a new compression
+ * mode, which the application developer wasn't aware, could require giving
+ * additional options to the encoder that the older modes don't need.
+ *
+ * \param mode Mode ID.
+ *
+ * \return lzma_bool:
+ * - true if the compression mode is supported by this liblzma
+ * build.
+ * - false otherwise.
+ */
+extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
+ lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief Options specific to the LZMA1 and LZMA2 filters
+ *
+ * Since LZMA1 and LZMA2 share most of the code, it's simplest to share
+ * the options structure too. For encoding, all but the reserved variables
+ * need to be initialized unless specifically mentioned otherwise.
+ * lzma_lzma_preset() can be used to get a good starting point.
+ *
+ * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
+ * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
+ */
+typedef struct {
+ /**
+ * \brief Dictionary size in bytes
+ *
+ * Dictionary size indicates how many bytes of the recently processed
+ * uncompressed data is kept in memory. One method to reduce size of
+ * the uncompressed data is to store distance-length pairs, which
+ * indicate what data to repeat from the dictionary buffer. Thus,
+ * the bigger the dictionary, the better the compression ratio
+ * usually is.
+ *
+ * Maximum size of the dictionary depends on multiple things:
+ * - Memory usage limit
+ * - Available address space (not a problem on 64-bit systems)
+ * - Selected match finder (encoder only)
+ *
+ * Currently the maximum dictionary size for encoding is 1.5 GiB
+ * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
+ * systems for certain match finder implementation reasons. In the
+ * future, there may be match finders that support bigger
+ * dictionaries.
+ *
+ * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
+ * UINT32_MAX), so increasing the maximum dictionary size of the
+ * encoder won't cause problems for old decoders.
+ *
+ * Because extremely small dictionaries sizes would have unneeded
+ * overhead in the decoder, the minimum dictionary size is 4096 bytes.
+ *
+ * \note When decoding, too big dictionary does no other harm
+ * than wasting memory.
+ */
+ uint32_t dict_size;
+# define LZMA_DICT_SIZE_MIN UINT32_C(4096)
+# define LZMA_DICT_SIZE_DEFAULT (UINT32_C(1) << 23)
+
+ /**
+ * \brief Pointer to an initial dictionary
+ *
+ * It is possible to initialize the LZ77 history window using
+ * a preset dictionary. It is useful when compressing many
+ * similar, relatively small chunks of data independently from
+ * each other. The preset dictionary should contain typical
+ * strings that occur in the files being compressed. The most
+ * probable strings should be near the end of the preset dictionary.
+ *
+ * This feature should be used only in special situations. For
+ * now, it works correctly only with raw encoding and decoding.
+ * Currently none of the container formats supported by
+ * liblzma allow preset dictionary when decoding, thus if
+ * you create a .xz or .lzma file with preset dictionary, it
+ * cannot be decoded with the regular decoder functions. In the
+ * future, the .xz format will likely get support for preset
+ * dictionary though.
+ */
+ const uint8_t *preset_dict;
+
+ /**
+ * \brief Size of the preset dictionary
+ *
+ * Specifies the size of the preset dictionary. If the size is
+ * bigger than dict_size, only the last dict_size bytes are
+ * processed.
+ *
+ * This variable is read only when preset_dict is not NULL.
+ * If preset_dict is not NULL but preset_dict_size is zero,
+ * no preset dictionary is used (identical to only setting
+ * preset_dict to NULL).
+ */
+ uint32_t preset_dict_size;
+
+ /**
+ * \brief Number of literal context bits
+ *
+ * How many of the highest bits of the previous uncompressed
+ * eight-bit byte (also known as `literal') are taken into
+ * account when predicting the bits of the next literal.
+ *
+ * E.g. 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 lc is at least 3, the literal coding can take advantage of
+ * this property in the uncompressed data.
+ *
+ * There is a limit that applies to literal context bits and literal
+ * position bits together: lc + lp <= 4. Without this limit the
+ * decoding could become very slow, which could have security related
+ * results in some cases like email servers doing virus scanning.
+ * This limit also simplifies the internal implementation in liblzma.
+ *
+ * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
+ * lc would be 8). It is not possible to decode such streams with
+ * liblzma.
+ */
+ uint32_t lc;
+# define LZMA_LCLP_MIN 0
+# define LZMA_LCLP_MAX 4
+# define LZMA_LC_DEFAULT 3
+
+ /**
+ * \brief Number of literal position bits
+ *
+ * lp affects what kind of alignment in the uncompressed data is
+ * assumed when encoding literals. A literal is a single 8-bit byte.
+ * See pb below for more information about alignment.
+ */
+ uint32_t lp;
+# define LZMA_LP_DEFAULT 0
+
+ /**
+ * \brief Number of position bits
+ *
+ * pb affects what kind of alignment in the uncompressed data is
+ * assumed in general. The default means four-byte alignment
+ * (2^ pb =2^2=4), which is often a good choice when there's
+ * no better guess.
+ *
+ * When the alignment is known, setting pb accordingly may reduce
+ * the file size a little. E.g. with text files having one-byte
+ * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
+ * improve compression slightly. For UTF-16 text, pb=1 is a good
+ * choice. If the alignment is an odd number like 3 bytes, pb=0
+ * might be the best choice.
+ *
+ * Even though the assumed alignment can be adjusted with pb and
+ * lp, 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.
+ */
+ uint32_t pb;
+# define LZMA_PB_MIN 0
+# define LZMA_PB_MAX 4
+# define LZMA_PB_DEFAULT 2
+
+ /** Compression mode */
+ lzma_mode mode;
+
+ /**
+ * \brief Nice length of a match
+ *
+ * This determines how many bytes the encoder compares from the match
+ * candidates when looking for the best match. Once a match of at
+ * least nice_len bytes long is found, the encoder stops looking for
+ * better candidates and encodes the match. (Naturally, if the found
+ * match is actually longer than nice_len, the actual length is
+ * encoded; it's not truncated to nice_len.)
+ *
+ * Bigger values usually increase the compression ratio and
+ * compression time. For most files, 32 to 128 is a good value,
+ * which gives very good compression ratio at good speed.
+ *
+ * The exact minimum value depends on the match finder. The maximum
+ * is 273, which is the maximum length of a match that LZMA1 and
+ * LZMA2 can encode.
+ */
+ uint32_t nice_len;
+
+ /** Match finder ID */
+ lzma_match_finder mf;
+
+ /**
+ * \brief Maximum search depth in the match finder
+ *
+ * For every input byte, match finder searches through the hash chain
+ * or binary tree in a loop, each iteration going one step deeper in
+ * the chain or tree. The searching stops if
+ * - a match of at least nice_len bytes long is found;
+ * - all match candidates from the hash chain or binary tree have
+ * been checked; or
+ * - maximum search depth is reached.
+ *
+ * Maximum search depth is needed to prevent the match finder from
+ * wasting too much time in case there are lots of short match
+ * candidates. On the other hand, stopping the search before all
+ * candidates have been checked can reduce compression ratio.
+ *
+ * Setting depth to zero tells liblzma to use an automatic default
+ * value, that depends on the selected match finder and nice_len.
+ * The default is in the range [4, 200] or so (it may vary between
+ * liblzma versions).
+ *
+ * Using a bigger depth value than the default can increase
+ * compression ratio in some cases. There is no strict maximum value,
+ * but high values (thousands or millions) should be used with care:
+ * the encoder could remain fast enough with typical input, but
+ * malicious input could cause the match finder to slow down
+ * dramatically, possibly creating a denial of service attack.
+ */
+ uint32_t depth;
+
+ /**
+ * \brief For LZMA_FILTER_LZMA1EXT: Extended flags
+ *
+ * This is used only with LZMA_FILTER_LZMA1EXT.
+ *
+ * Currently only one flag is supported, LZMA_LZMA1EXT_ALLOW_EOPM:
+ *
+ * - Encoder: If the flag is set, then end marker is written just
+ * like it is with LZMA_FILTER_LZMA1. Without this flag the
+ * end marker isn't written and the application has to store
+ * the uncompressed size somewhere outside the compressed stream.
+ * To decompress streams without the end marker, the application
+ * has to set the correct uncompressed size in ext_size_low and
+ * ext_size_high.
+ *
+ * - Decoder: If the uncompressed size in ext_size_low and
+ * ext_size_high is set to the special value UINT64_MAX
+ * (indicating unknown uncompressed size) then this flag is
+ * ignored and the end marker must always be present, that is,
+ * the behavior is identical to LZMA_FILTER_LZMA1.
+ *
+ * Otherwise, if this flag isn't set, then the input stream
+ * must not have the end marker; if the end marker is detected
+ * then it will result in LZMA_DATA_ERROR. This is useful when
+ * it is known that the stream must not have the end marker and
+ * strict validation is wanted.
+ *
+ * If this flag is set, then it is autodetected if the end marker
+ * is present after the specified number of uncompressed bytes
+ * has been decompressed (ext_size_low and ext_size_high). The
+ * end marker isn't allowed in any other position. This behavior
+ * is useful when uncompressed size is known but the end marker
+ * may or may not be present. This is the case, for example,
+ * in .7z files (valid .7z files that have the end marker in
+ * LZMA1 streams are rare but they do exist).
+ */
+ uint32_t ext_flags;
+# define LZMA_LZMA1EXT_ALLOW_EOPM UINT32_C(0x01)
+
+ /**
+ * \brief For LZMA_FILTER_LZMA1EXT: Uncompressed size (low bits)
+ *
+ * The 64-bit uncompressed size is needed for decompression with
+ * LZMA_FILTER_LZMA1EXT. The size is ignored by the encoder.
+ *
+ * The special value UINT64_MAX indicates that the uncompressed size
+ * is unknown and that the end of payload marker (also known as
+ * end of stream marker) must be present to indicate the end of
+ * the LZMA1 stream. Any other value indicates the expected
+ * uncompressed size of the LZMA1 stream. (If LZMA1 was used together
+ * with filters that change the size of the data then the uncompressed
+ * size of the LZMA1 stream could be different than the final
+ * uncompressed size of the filtered stream.)
+ *
+ * ext_size_low holds the least significant 32 bits of the
+ * uncompressed size. The most significant 32 bits must be set
+ * in ext_size_high. The macro lzma_ext_size_set(opt_lzma, u64size)
+ * can be used to set these members.
+ *
+ * The 64-bit uncompressed size is split into two uint32_t variables
+ * because there were no reserved uint64_t members and using the
+ * same options structure for LZMA_FILTER_LZMA1, LZMA_FILTER_LZMA1EXT,
+ * and LZMA_FILTER_LZMA2 was otherwise more convenient than having
+ * a new options structure for LZMA_FILTER_LZMA1EXT. (Replacing two
+ * uint32_t members with one uint64_t changes the ABI on some systems
+ * as the alignment of this struct can increase from 4 bytes to 8.)
+ */
+ uint32_t ext_size_low;
+
+ /**
+ * \brief For LZMA_FILTER_LZMA1EXT: Uncompressed size (high bits)
+ *
+ * This holds the most significant 32 bits of the uncompressed size.
+ */
+ uint32_t ext_size_high;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the names
+ * of these variables may change. These are and will never be used
+ * with the currently supported options, so it is safe to leave these
+ * uninitialized.
+ */
+
+ /** \private Reserved member. */
+ uint32_t reserved_int4;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int5;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int6;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int7;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int8;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum1;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum2;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum3;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum4;
+
+ /** \private Reserved member. */
+ void *reserved_ptr1;
+
+ /** \private Reserved member. */
+ void *reserved_ptr2;
+
+} lzma_options_lzma;
+
+
+/**
+ * \brief Macro to set the 64-bit uncompressed size in ext_size_*
+ *
+ * This might be convenient when decoding using LZMA_FILTER_LZMA1EXT.
+ * This isn't used with LZMA_FILTER_LZMA1 or LZMA_FILTER_LZMA2.
+ */
+#define lzma_set_ext_size(opt_lzma2, u64size) \
+do { \
+ (opt_lzma2).ext_size_low = (uint32_t)(u64size); \
+ (opt_lzma2).ext_size_high = (uint32_t)((uint64_t)(u64size) >> 32); \
+} while (0)
+
+
+/**
+ * \brief Set a compression preset to lzma_options_lzma structure
+ *
+ * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9
+ * of the xz command line tool. In addition, it is possible to bitwise-or
+ * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported.
+ * The flags are defined in container.h, because the flags are used also
+ * with lzma_easy_encoder().
+ *
+ * The preset levels are subject to changes between liblzma versions.
+ *
+ * This function is available only if LZMA1 or LZMA2 encoder has been enabled
+ * when building liblzma.
+ *
+ * If features (like certain match finders) have been disabled at build time,
+ * then the function may return success (false) even though the resulting
+ * LZMA1/LZMA2 options may not be usable for encoder initialization
+ * (LZMA_OPTIONS_ERROR).
+ *
+ * \param[out] options Pointer to LZMA1 or LZMA2 options to be filled
+ * \param preset Preset level bitwse-ORed with preset flags
+ *
+ * \return lzma_bool:
+ * - true if the preset is not supported (failure).
+ * - false otherwise (success).
+ */
+extern LZMA_API(lzma_bool) lzma_lzma_preset(
+ lzma_options_lzma *options, uint32_t preset) lzma_nothrow;
diff --git a/src/liblzma/api/lzma/stream_flags.h b/src/liblzma/api/lzma/stream_flags.h
new file mode 100644
index 0000000..7622a62
--- /dev/null
+++ b/src/liblzma/api/lzma/stream_flags.h
@@ -0,0 +1,266 @@
+/**
+ * \file lzma/stream_flags.h
+ * \brief .xz Stream Header and Stream Footer encoder and decoder
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Size of Stream Header and Stream Footer
+ *
+ * Stream Header and Stream Footer have the same size and they are not
+ * going to change even if a newer version of the .xz file format is
+ * developed in future.
+ */
+#define LZMA_STREAM_HEADER_SIZE 12
+
+
+/**
+ * \brief Options for encoding/decoding Stream Header and Stream Footer
+ */
+typedef struct {
+ /**
+ * \brief Stream Flags format version
+ *
+ * To prevent API and ABI breakages if new features are needed in
+ * Stream Header or Stream Footer, a version number is used to
+ * indicate which members in this structure are in use. For now,
+ * version must always be zero. With non-zero version, the
+ * lzma_stream_header_encode() and lzma_stream_footer_encode()
+ * will return LZMA_OPTIONS_ERROR.
+ *
+ * lzma_stream_header_decode() and lzma_stream_footer_decode()
+ * will always set this to the lowest value that supports all the
+ * features indicated by the Stream Flags field. The application
+ * must check that the version number set by the decoding functions
+ * is supported by the application. Otherwise it is possible that
+ * the application will decode the Stream incorrectly.
+ */
+ uint32_t version;
+
+ /**
+ * \brief Backward Size
+ *
+ * Backward Size must be a multiple of four bytes. In this Stream
+ * format version, Backward Size is the size of the Index field.
+ *
+ * Backward Size isn't actually part of the Stream Flags field, but
+ * it is convenient to include in this structure anyway. Backward
+ * Size is present only in the Stream Footer. There is no need to
+ * initialize backward_size when encoding Stream Header.
+ *
+ * lzma_stream_header_decode() always sets backward_size to
+ * LZMA_VLI_UNKNOWN so that it is convenient to use
+ * lzma_stream_flags_compare() when both Stream Header and Stream
+ * Footer have been decoded.
+ */
+ lzma_vli backward_size;
+
+ /**
+ * \brief Minimum value for lzma_stream_flags.backward_size
+ */
+# define LZMA_BACKWARD_SIZE_MIN 4
+
+ /**
+ * \brief Maximum value for lzma_stream_flags.backward_size
+ */
+# define LZMA_BACKWARD_SIZE_MAX (LZMA_VLI_C(1) << 34)
+
+ /**
+ * \brief Check ID
+ *
+ * This indicates the type of the integrity check calculated from
+ * uncompressed data.
+ */
+ lzma_check check;
+
+ /*
+ * Reserved space to allow possible future extensions without
+ * breaking the ABI. You should not touch these, because the
+ * names of these variables may change.
+ *
+ * (We will never be able to use all of these since Stream Flags
+ * is just two bytes plus Backward Size of four bytes. But it's
+ * nice to have the proper types when they are needed.)
+ */
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum1;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum2;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum3;
+
+ /** \private Reserved member. */
+ lzma_reserved_enum reserved_enum4;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool1;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool2;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool3;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool4;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool5;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool6;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool7;
+
+ /** \private Reserved member. */
+ lzma_bool reserved_bool8;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int1;
+
+ /** \private Reserved member. */
+ uint32_t reserved_int2;
+
+} lzma_stream_flags;
+
+
+/**
+ * \brief Encode Stream Header
+ *
+ * \param options Stream Header options to be encoded.
+ * options->backward_size is ignored and doesn't
+ * need to be initialized.
+ * \param[out] out Beginning of the output buffer of
+ * LZMA_STREAM_HEADER_SIZE bytes.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_OPTIONS_ERROR: options->version is not supported by
+ * this liblzma version.
+ * - LZMA_PROG_ERROR: Invalid options.
+ */
+extern LZMA_API(lzma_ret) lzma_stream_header_encode(
+ const lzma_stream_flags *options, uint8_t *out)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Encode Stream Footer
+ *
+ * \param options Stream Footer options to be encoded.
+ * \param[out] out Beginning of the output buffer of
+ * LZMA_STREAM_HEADER_SIZE bytes.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Encoding was successful.
+ * - LZMA_OPTIONS_ERROR: options->version is not supported by
+ * this liblzma version.
+ * - LZMA_PROG_ERROR: Invalid options.
+ */
+extern LZMA_API(lzma_ret) lzma_stream_footer_encode(
+ const lzma_stream_flags *options, uint8_t *out)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Decode Stream Header
+ *
+ * options->backward_size is always set to LZMA_VLI_UNKNOWN. This is to
+ * help comparing Stream Flags from Stream Header and Stream Footer with
+ * lzma_stream_flags_compare().
+ *
+ * \note When decoding .xz files that contain multiple Streams, it may
+ * make sense to print "file format not recognized" only if
+ * decoding of the Stream Header of the \a first Stream gives
+ * LZMA_FORMAT_ERROR. If non-first Stream Header gives
+ * LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is
+ * probably more appropriate.
+ * For example, the Stream decoder in liblzma uses
+ * LZMA_DATA_ERROR if LZMA_FORMAT_ERROR is returned by
+ * lzma_stream_header_decode() when decoding non-first Stream.
+ *
+ * \param[out] options Target for the decoded Stream Header options.
+ * \param in Beginning of the input buffer of
+ * LZMA_STREAM_HEADER_SIZE bytes.
+ *
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Decoding was successful.
+ * - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given
+ * buffer cannot be Stream Header.
+ * - LZMA_DATA_ERROR: CRC32 doesn't match, thus the header
+ * is corrupt.
+ * - LZMA_OPTIONS_ERROR: Unsupported options are present
+ * in the header.
+ */
+extern LZMA_API(lzma_ret) lzma_stream_header_decode(
+ lzma_stream_flags *options, const uint8_t *in)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Decode Stream Footer
+ *
+ * \note If Stream Header was already decoded successfully, but
+ * decoding Stream Footer returns LZMA_FORMAT_ERROR, the
+ * application should probably report some other error message
+ * than "file format not recognized". The file likely
+ * is corrupt (possibly truncated). The Stream decoder in liblzma
+ * uses LZMA_DATA_ERROR in this situation.
+ *
+ * \param[out] options Target for the decoded Stream Footer options.
+ * \param in Beginning of the input buffer of
+ * LZMA_STREAM_HEADER_SIZE bytes.
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Decoding was successful.
+ * - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given
+ * buffer cannot be Stream Footer.
+ * - LZMA_DATA_ERROR: CRC32 doesn't match, thus the Stream Footer
+ * is corrupt.
+ * - LZMA_OPTIONS_ERROR: Unsupported options are present
+ * in Stream Footer.
+ */
+extern LZMA_API(lzma_ret) lzma_stream_footer_decode(
+ lzma_stream_flags *options, const uint8_t *in)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+
+/**
+ * \brief Compare two lzma_stream_flags structures
+ *
+ * backward_size values are compared only if both are not
+ * LZMA_VLI_UNKNOWN.
+ *
+ * \param a Pointer to lzma_stream_flags structure
+ * \param b Pointer to lzma_stream_flags structure
+ *
+ * \return Possible lzma_ret values:
+ * - LZMA_OK: Both are equal. If either had backward_size set
+ * to LZMA_VLI_UNKNOWN, backward_size values were not
+ * compared or validated.
+ * - LZMA_DATA_ERROR: The structures differ.
+ * - LZMA_OPTIONS_ERROR: version in either structure is greater
+ * than the maximum supported version (currently zero).
+ * - LZMA_PROG_ERROR: Invalid value, e.g. invalid check or
+ * backward_size.
+ */
+extern LZMA_API(lzma_ret) lzma_stream_flags_compare(
+ const lzma_stream_flags *a, const lzma_stream_flags *b)
+ lzma_nothrow lzma_attr_pure;
diff --git a/src/liblzma/api/lzma/version.h b/src/liblzma/api/lzma/version.h
new file mode 100644
index 0000000..8dac382
--- /dev/null
+++ b/src/liblzma/api/lzma/version.h
@@ -0,0 +1,135 @@
+/**
+ * \file lzma/version.h
+ * \brief Version number
+ * \note Never include this file directly. Use <lzma.h> instead.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/** \brief Major version number of the liblzma release. */
+#define LZMA_VERSION_MAJOR 5
+
+/** \brief Minor version number of the liblzma release. */
+#define LZMA_VERSION_MINOR 4
+
+/** \brief Patch version number of the liblzma release. */
+#define LZMA_VERSION_PATCH 5
+
+/**
+ * \brief Version stability marker
+ *
+ * This will always be one of three values:
+ * - LZMA_VERSION_STABILITY_ALPHA
+ * - LZMA_VERSION_STABILITY_BETA
+ * - LZMA_VERSION_STABILITY_STABLE
+ */
+#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
+
+/** \brief Commit version number of the liblzma release */
+#ifndef LZMA_VERSION_COMMIT
+# define LZMA_VERSION_COMMIT ""
+#endif
+
+
+/*
+ * Map symbolic stability levels to integers.
+ */
+#define LZMA_VERSION_STABILITY_ALPHA 0
+#define LZMA_VERSION_STABILITY_BETA 1
+#define LZMA_VERSION_STABILITY_STABLE 2
+
+
+/**
+ * \brief Compile-time version number
+ *
+ * The version number is of format xyyyzzzs where
+ * - x = major
+ * - yyy = minor
+ * - zzz = revision
+ * - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
+ *
+ * The same xyyyzzz triplet is never reused with different stability levels.
+ * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
+ * or 5.1.0 stable.
+ *
+ * \note The version number of liblzma has nothing to with
+ * the version number of Igor Pavlov's LZMA SDK.
+ */
+#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
+ + LZMA_VERSION_MINOR * UINT32_C(10000) \
+ + LZMA_VERSION_PATCH * UINT32_C(10) \
+ + LZMA_VERSION_STABILITY)
+
+
+/*
+ * Macros to construct the compile-time version string
+ */
+#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
+# define LZMA_VERSION_STABILITY_STRING "alpha"
+#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
+# define LZMA_VERSION_STABILITY_STRING "beta"
+#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
+# define LZMA_VERSION_STABILITY_STRING ""
+#else
+# error Incorrect LZMA_VERSION_STABILITY
+#endif
+
+#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
+ #major "." #minor "." #patch stability commit
+
+#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
+ LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
+
+
+/**
+ * \brief Compile-time version as a string
+ *
+ * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
+ * versions don't have any "stable" suffix). In future, a snapshot built
+ * from source code repository may include an additional suffix, for example
+ * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
+ * in LZMA_VERSION macro.
+ */
+#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
+ LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
+ LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
+ LZMA_VERSION_COMMIT)
+
+
+/* #ifndef is needed for use with windres (MinGW-w64 or Cygwin). */
+#ifndef LZMA_H_INTERNAL_RC
+
+/**
+ * \brief Run-time version number as an integer
+ *
+ * This allows an application to compare if it was built against the same,
+ * older, or newer version of liblzma that is currently running.
+ *
+ * \return The value of LZMA_VERSION macro at the compile time of liblzma
+ */
+extern LZMA_API(uint32_t) lzma_version_number(void)
+ lzma_nothrow lzma_attr_const;
+
+
+/**
+ * \brief Run-time version as a string
+ *
+ * This function may be useful to display which version of liblzma an
+ * application is currently using.
+ *
+ * \return Run-time version of liblzma
+ */
+extern LZMA_API(const char *) lzma_version_string(void)
+ lzma_nothrow lzma_attr_const;
+
+#endif
diff --git a/src/liblzma/api/lzma/vli.h b/src/liblzma/api/lzma/vli.h
new file mode 100644
index 0000000..f9ad155
--- /dev/null
+++ b/src/liblzma/api/lzma/vli.h
@@ -0,0 +1,168 @@
+/**
+ * \file lzma/vli.h
+ * \brief Variable-length integer handling
+ * \note Never include this file directly. Use <lzma.h> instead.
+ *
+ * In the .xz format, most integers are encoded in a variable-length
+ * representation, which is sometimes called little endian base-128 encoding.
+ * This saves space when smaller values are more likely than bigger values.
+ *
+ * The encoding scheme encodes seven bits to every byte, using minimum
+ * number of bytes required to represent the given value. Encodings that use
+ * non-minimum number of bytes are invalid, thus every integer has exactly
+ * one encoded representation. The maximum number of bits in a VLI is 63,
+ * thus the vli argument must be less than or equal to UINT64_MAX / 2. You
+ * should use LZMA_VLI_MAX for clarity.
+ */
+
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#ifndef LZMA_H_INTERNAL
+# error Never include this file directly. Use <lzma.h> instead.
+#endif
+
+
+/**
+ * \brief Maximum supported value of a variable-length integer
+ */
+#define LZMA_VLI_MAX (UINT64_MAX / 2)
+
+/**
+ * \brief VLI value to denote that the value is unknown
+ */
+#define LZMA_VLI_UNKNOWN UINT64_MAX
+
+/**
+ * \brief Maximum supported encoded length of variable length integers
+ */
+#define LZMA_VLI_BYTES_MAX 9
+
+/**
+ * \brief VLI constant suffix
+ */
+#define LZMA_VLI_C(n) UINT64_C(n)
+
+
+/**
+ * \brief Variable-length integer type
+ *
+ * Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is
+ * indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the
+ * underlying integer type.
+ *
+ * lzma_vli will be uint64_t for the foreseeable future. If a bigger size
+ * is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will
+ * not overflow lzma_vli. This simplifies integer overflow detection.
+ */
+typedef uint64_t lzma_vli;
+
+
+/**
+ * \brief Validate a variable-length integer
+ *
+ * This is useful to test that application has given acceptable values
+ * for example in the uncompressed_size and compressed_size variables.
+ *
+ * \return True if the integer is representable as VLI or if it
+ * indicates unknown value. False if the integer cannot be
+ * represented as VLI.
+ */
+#define lzma_vli_is_valid(vli) \
+ ((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
+
+
+/**
+ * \brief Encode a variable-length integer
+ *
+ * This function has two modes: single-call and multi-call. Single-call mode
+ * encodes the whole integer at once; it is an error if the output buffer is
+ * too small. Multi-call mode saves the position in *vli_pos, and thus it is
+ * possible to continue encoding if the buffer becomes full before the whole
+ * integer has been encoded.
+ *
+ * \param vli Integer to be encoded
+ * \param[out] vli_pos How many VLI-encoded bytes have already been written
+ * out. When starting to encode a new integer in
+ * multi-call mode, *vli_pos must be set to zero.
+ * To use single-call encoding, set vli_pos to NULL.
+ * \param[out] out Beginning of the output buffer
+ * \param[out] out_pos The next byte will be written to out[*out_pos].
+ * \param out_size Size of the out buffer; the first byte into
+ * which no data is written to is out[out_size].
+ *
+ * \return Slightly different return values are used in multi-call and
+ * single-call modes.
+ *
+ * Single-call (vli_pos == NULL):
+ * - LZMA_OK: Integer successfully encoded.
+ * - LZMA_PROG_ERROR: Arguments are not sane. This can be due
+ * to too little output space; single-call mode doesn't use
+ * LZMA_BUF_ERROR, since the application should have checked
+ * the encoded size with lzma_vli_size().
+ *
+ * Multi-call (vli_pos != NULL):
+ * - LZMA_OK: So far all OK, but the integer is not
+ * completely written out yet.
+ * - LZMA_STREAM_END: Integer successfully encoded.
+ * - LZMA_BUF_ERROR: No output space was provided.
+ * - LZMA_PROG_ERROR: Arguments are not sane.
+ */
+extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
+ uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
+
+
+/**
+ * \brief Decode a variable-length integer
+ *
+ * Like lzma_vli_encode(), this function has single-call and multi-call modes.
+ *
+ * \param[out] vli Pointer to decoded integer. The decoder will
+ * initialize it to zero when *vli_pos == 0, so
+ * application isn't required to initialize *vli.
+ * \param[out] vli_pos How many bytes have already been decoded. When
+ * starting to decode a new integer in multi-call
+ * mode, *vli_pos must be initialized to zero. To
+ * use single-call decoding, set vli_pos to NULL.
+ * \param in Beginning of the input buffer
+ * \param[out] in_pos The next byte will be read from in[*in_pos].
+ * \param in_size Size of the input buffer; the first byte that
+ * won't be read is in[in_size].
+ *
+ * \return Slightly different return values are used in multi-call and
+ * single-call modes.
+ *
+ * Single-call (vli_pos == NULL):
+ * - LZMA_OK: Integer successfully decoded.
+ * - LZMA_DATA_ERROR: Integer is corrupt. This includes hitting
+ * the end of the input buffer before the whole integer was
+ * decoded; providing no input at all will use LZMA_DATA_ERROR.
+ * - LZMA_PROG_ERROR: Arguments are not sane.
+ *
+ * Multi-call (vli_pos != NULL):
+ * - LZMA_OK: So far all OK, but the integer is not
+ * completely decoded yet.
+ * - LZMA_STREAM_END: Integer successfully decoded.
+ * - LZMA_DATA_ERROR: Integer is corrupt.
+ * - LZMA_BUF_ERROR: No input was provided.
+ * - LZMA_PROG_ERROR: Arguments are not sane.
+ */
+extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+ lzma_nothrow;
+
+
+/**
+ * \brief Get the number of bytes required to encode a VLI
+ *
+ * \param vli Integer whose encoded size is to be determined
+ *
+ * \return Number of bytes on success (1-9). If vli isn't valid,
+ * zero is returned.
+ */
+extern LZMA_API(uint32_t) lzma_vli_size(lzma_vli vli)
+ lzma_nothrow lzma_attr_pure;
diff --git a/src/liblzma/check/Makefile.inc b/src/liblzma/check/Makefile.inc
new file mode 100644
index 0000000..dc011a3
--- /dev/null
+++ b/src/liblzma/check/Makefile.inc
@@ -0,0 +1,53 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+EXTRA_DIST += \
+ check/crc32_tablegen.c \
+ check/crc64_tablegen.c
+
+liblzma_la_SOURCES += \
+ check/check.c \
+ check/check.h \
+ check/crc_macros.h
+
+if COND_CHECK_CRC32
+if COND_SMALL
+liblzma_la_SOURCES += check/crc32_small.c
+else
+liblzma_la_SOURCES += \
+ check/crc32_table.c \
+ check/crc32_table_le.h \
+ check/crc32_table_be.h
+if COND_ASM_X86
+liblzma_la_SOURCES += check/crc32_x86.S
+else
+liblzma_la_SOURCES += check/crc32_fast.c
+endif
+endif
+endif
+
+if COND_CHECK_CRC64
+if COND_SMALL
+liblzma_la_SOURCES += check/crc64_small.c
+else
+liblzma_la_SOURCES += \
+ check/crc64_table.c \
+ check/crc64_table_le.h \
+ check/crc64_table_be.h
+if COND_ASM_X86
+liblzma_la_SOURCES += check/crc64_x86.S
+else
+liblzma_la_SOURCES += check/crc64_fast.c
+endif
+endif
+endif
+
+if COND_CHECK_SHA256
+if COND_INTERNAL_SHA256
+liblzma_la_SOURCES += check/sha256.c
+endif
+endif
diff --git a/src/liblzma/check/check.c b/src/liblzma/check/check.c
new file mode 100644
index 0000000..428ddae
--- /dev/null
+++ b/src/liblzma/check/check.c
@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file check.c
+/// \brief Single API to access different integrity checks
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "check.h"
+
+
+extern LZMA_API(lzma_bool)
+lzma_check_is_supported(lzma_check type)
+{
+ if ((unsigned int)(type) > LZMA_CHECK_ID_MAX)
+ return false;
+
+ static const lzma_bool available_checks[LZMA_CHECK_ID_MAX + 1] = {
+ true, // LZMA_CHECK_NONE
+
+#ifdef HAVE_CHECK_CRC32
+ true,
+#else
+ false,
+#endif
+
+ false, // Reserved
+ false, // Reserved
+
+#ifdef HAVE_CHECK_CRC64
+ true,
+#else
+ false,
+#endif
+
+ false, // Reserved
+ false, // Reserved
+ false, // Reserved
+ false, // Reserved
+ false, // Reserved
+
+#ifdef HAVE_CHECK_SHA256
+ true,
+#else
+ false,
+#endif
+
+ false, // Reserved
+ false, // Reserved
+ false, // Reserved
+ false, // Reserved
+ false, // Reserved
+ };
+
+ return available_checks[(unsigned int)(type)];
+}
+
+
+extern LZMA_API(uint32_t)
+lzma_check_size(lzma_check type)
+{
+ if ((unsigned int)(type) > LZMA_CHECK_ID_MAX)
+ return UINT32_MAX;
+
+ // See file-format.txt section 2.1.1.2.
+ static const uint8_t check_sizes[LZMA_CHECK_ID_MAX + 1] = {
+ 0,
+ 4, 4, 4,
+ 8, 8, 8,
+ 16, 16, 16,
+ 32, 32, 32,
+ 64, 64, 64
+ };
+
+ return check_sizes[(unsigned int)(type)];
+}
+
+
+extern void
+lzma_check_init(lzma_check_state *check, lzma_check type)
+{
+ switch (type) {
+ case LZMA_CHECK_NONE:
+ break;
+
+#ifdef HAVE_CHECK_CRC32
+ case LZMA_CHECK_CRC32:
+ check->state.crc32 = 0;
+ break;
+#endif
+
+#ifdef HAVE_CHECK_CRC64
+ case LZMA_CHECK_CRC64:
+ check->state.crc64 = 0;
+ break;
+#endif
+
+#ifdef HAVE_CHECK_SHA256
+ case LZMA_CHECK_SHA256:
+ lzma_sha256_init(check);
+ break;
+#endif
+
+ default:
+ break;
+ }
+
+ return;
+}
+
+
+extern void
+lzma_check_update(lzma_check_state *check, lzma_check type,
+ const uint8_t *buf, size_t size)
+{
+ switch (type) {
+#ifdef HAVE_CHECK_CRC32
+ case LZMA_CHECK_CRC32:
+ check->state.crc32 = lzma_crc32(buf, size, check->state.crc32);
+ break;
+#endif
+
+#ifdef HAVE_CHECK_CRC64
+ case LZMA_CHECK_CRC64:
+ check->state.crc64 = lzma_crc64(buf, size, check->state.crc64);
+ break;
+#endif
+
+#ifdef HAVE_CHECK_SHA256
+ case LZMA_CHECK_SHA256:
+ lzma_sha256_update(buf, size, check);
+ break;
+#endif
+
+ default:
+ break;
+ }
+
+ return;
+}
+
+
+extern void
+lzma_check_finish(lzma_check_state *check, lzma_check type)
+{
+ switch (type) {
+#ifdef HAVE_CHECK_CRC32
+ case LZMA_CHECK_CRC32:
+ check->buffer.u32[0] = conv32le(check->state.crc32);
+ break;
+#endif
+
+#ifdef HAVE_CHECK_CRC64
+ case LZMA_CHECK_CRC64:
+ check->buffer.u64[0] = conv64le(check->state.crc64);
+ break;
+#endif
+
+#ifdef HAVE_CHECK_SHA256
+ case LZMA_CHECK_SHA256:
+ lzma_sha256_finish(check);
+ break;
+#endif
+
+ default:
+ break;
+ }
+
+ return;
+}
diff --git a/src/liblzma/check/check.h b/src/liblzma/check/check.h
new file mode 100644
index 0000000..8ae95d5
--- /dev/null
+++ b/src/liblzma/check/check.h
@@ -0,0 +1,175 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file check.h
+/// \brief Internal API to different integrity check functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_CHECK_H
+#define LZMA_CHECK_H
+
+#include "common.h"
+
+// If the function for external SHA-256 is missing, use the internal SHA-256
+// code. Due to how configure works, these defines can only get defined when
+// both a usable header and a type have already been found.
+#if !(defined(HAVE_CC_SHA256_INIT) \
+ || defined(HAVE_SHA256_INIT) \
+ || defined(HAVE_SHA256INIT))
+# define HAVE_INTERNAL_SHA256 1
+#endif
+
+#if defined(HAVE_INTERNAL_SHA256)
+// Nothing
+#elif defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
+# include <CommonCrypto/CommonDigest.h>
+#elif defined(HAVE_SHA256_H)
+# include <sys/types.h>
+# include <sha256.h>
+#elif defined(HAVE_SHA2_H)
+# include <sys/types.h>
+# include <sha2.h>
+#endif
+
+#if defined(HAVE_INTERNAL_SHA256)
+/// State for the internal SHA-256 implementation
+typedef struct {
+ /// Internal state
+ uint32_t state[8];
+
+ /// Size of the message excluding padding
+ uint64_t size;
+} lzma_sha256_state;
+#elif defined(HAVE_CC_SHA256_CTX)
+typedef CC_SHA256_CTX lzma_sha256_state;
+#elif defined(HAVE_SHA256_CTX)
+typedef SHA256_CTX lzma_sha256_state;
+#elif defined(HAVE_SHA2_CTX)
+typedef SHA2_CTX lzma_sha256_state;
+#endif
+
+#if defined(HAVE_INTERNAL_SHA256)
+// Nothing
+#elif defined(HAVE_CC_SHA256_INIT)
+# define LZMA_SHA256FUNC(x) CC_SHA256_ ## x
+#elif defined(HAVE_SHA256_INIT)
+# define LZMA_SHA256FUNC(x) SHA256_ ## x
+#elif defined(HAVE_SHA256INIT)
+# define LZMA_SHA256FUNC(x) SHA256 ## x
+#endif
+
+// Index hashing needs the best possible hash function (preferably
+// a cryptographic hash) for maximum reliability.
+#if defined(HAVE_CHECK_SHA256)
+# define LZMA_CHECK_BEST LZMA_CHECK_SHA256
+#elif defined(HAVE_CHECK_CRC64)
+# define LZMA_CHECK_BEST LZMA_CHECK_CRC64
+#else
+# define LZMA_CHECK_BEST LZMA_CHECK_CRC32
+#endif
+
+
+/// \brief Structure to hold internal state of the check being calculated
+///
+/// \note This is not in the public API because this structure may
+/// change in future if new integrity check algorithms are added.
+typedef struct {
+ /// Buffer to hold the final result and a temporary buffer for SHA256.
+ union {
+ uint8_t u8[64];
+ uint32_t u32[16];
+ uint64_t u64[8];
+ } buffer;
+
+ /// Check-specific data
+ union {
+ uint32_t crc32;
+ uint64_t crc64;
+ lzma_sha256_state sha256;
+ } state;
+
+} lzma_check_state;
+
+
+/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
+/// the array two-dimensional.
+#ifdef HAVE_SMALL
+lzma_attr_visibility_hidden
+extern uint32_t lzma_crc32_table[1][256];
+
+extern void lzma_crc32_init(void);
+
+#else
+
+lzma_attr_visibility_hidden
+extern const uint32_t lzma_crc32_table[8][256];
+
+lzma_attr_visibility_hidden
+extern const uint64_t lzma_crc64_table[4][256];
+#endif
+
+
+/// \brief Initialize *check depending on type
+extern void lzma_check_init(lzma_check_state *check, lzma_check type);
+
+/// Update the check state
+extern void lzma_check_update(lzma_check_state *check, lzma_check type,
+ const uint8_t *buf, size_t size);
+
+/// Finish the check calculation and store the result to check->buffer.u8.
+extern void lzma_check_finish(lzma_check_state *check, lzma_check type);
+
+
+#ifndef LZMA_SHA256FUNC
+
+/// Prepare SHA-256 state for new input.
+extern void lzma_sha256_init(lzma_check_state *check);
+
+/// Update the SHA-256 hash state
+extern void lzma_sha256_update(
+ const uint8_t *buf, size_t size, lzma_check_state *check);
+
+/// Finish the SHA-256 calculation and store the result to check->buffer.u8.
+extern void lzma_sha256_finish(lzma_check_state *check);
+
+
+#else
+
+static inline void
+lzma_sha256_init(lzma_check_state *check)
+{
+ LZMA_SHA256FUNC(Init)(&check->state.sha256);
+}
+
+
+static inline void
+lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
+{
+#if defined(HAVE_CC_SHA256_INIT) && SIZE_MAX > UINT32_MAX
+ // Darwin's CC_SHA256_Update takes uint32_t as the buffer size,
+ // so use a loop to support size_t.
+ while (size > UINT32_MAX) {
+ LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, UINT32_MAX);
+ buf += UINT32_MAX;
+ size -= UINT32_MAX;
+ }
+#endif
+
+ LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, size);
+}
+
+
+static inline void
+lzma_sha256_finish(lzma_check_state *check)
+{
+ LZMA_SHA256FUNC(Final)(check->buffer.u8, &check->state.sha256);
+}
+
+#endif
+
+#endif
diff --git a/src/liblzma/check/crc32_fast.c b/src/liblzma/check/crc32_fast.c
new file mode 100644
index 0000000..eed7350
--- /dev/null
+++ b/src/liblzma/check/crc32_fast.c
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc32.c
+/// \brief CRC32 calculation
+///
+/// Calculate the CRC32 using the slice-by-eight algorithm.
+/// It is explained in this document:
+/// http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf
+/// The code in this file is not the same as in Intel's paper, but
+/// the basic principle is identical.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "check.h"
+#include "crc_macros.h"
+
+
+// If you make any changes, do some benchmarking! Seemingly unrelated
+// changes can very easily ruin the performance (and very probably is
+// very compiler dependent).
+extern LZMA_API(uint32_t)
+lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
+{
+ crc = ~crc;
+
+#ifdef WORDS_BIGENDIAN
+ crc = bswap32(crc);
+#endif
+
+ if (size > 8) {
+ // Fix the alignment, if needed. The if statement above
+ // ensures that this won't read past the end of buf[].
+ while ((uintptr_t)(buf) & 7) {
+ crc = lzma_crc32_table[0][*buf++ ^ A(crc)] ^ S8(crc);
+ --size;
+ }
+
+ // Calculate the position where to stop.
+ const uint8_t *const limit = buf + (size & ~(size_t)(7));
+
+ // Calculate how many bytes must be calculated separately
+ // before returning the result.
+ size &= (size_t)(7);
+
+ // Calculate the CRC32 using the slice-by-eight algorithm.
+ while (buf < limit) {
+ crc ^= aligned_read32ne(buf);
+ buf += 4;
+
+ crc = lzma_crc32_table[7][A(crc)]
+ ^ lzma_crc32_table[6][B(crc)]
+ ^ lzma_crc32_table[5][C(crc)]
+ ^ lzma_crc32_table[4][D(crc)];
+
+ const uint32_t tmp = aligned_read32ne(buf);
+ buf += 4;
+
+ // At least with some compilers, it is critical for
+ // performance, that the crc variable is XORed
+ // between the two table-lookup pairs.
+ crc = lzma_crc32_table[3][A(tmp)]
+ ^ lzma_crc32_table[2][B(tmp)]
+ ^ crc
+ ^ lzma_crc32_table[1][C(tmp)]
+ ^ lzma_crc32_table[0][D(tmp)];
+ }
+ }
+
+ while (size-- != 0)
+ crc = lzma_crc32_table[0][*buf++ ^ A(crc)] ^ S8(crc);
+
+#ifdef WORDS_BIGENDIAN
+ crc = bswap32(crc);
+#endif
+
+ return ~crc;
+}
diff --git a/src/liblzma/check/crc32_small.c b/src/liblzma/check/crc32_small.c
new file mode 100644
index 0000000..186966e
--- /dev/null
+++ b/src/liblzma/check/crc32_small.c
@@ -0,0 +1,68 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc32_small.c
+/// \brief CRC32 calculation (size-optimized)
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "check.h"
+
+
+uint32_t lzma_crc32_table[1][256];
+
+
+#ifdef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+__attribute__((__constructor__))
+#endif
+static void
+crc32_init(void)
+{
+ static const uint32_t poly32 = UINT32_C(0xEDB88320);
+
+ for (size_t b = 0; b < 256; ++b) {
+ uint32_t r = b;
+ for (size_t i = 0; i < 8; ++i) {
+ if (r & 1)
+ r = (r >> 1) ^ poly32;
+ else
+ r >>= 1;
+ }
+
+ lzma_crc32_table[0][b] = r;
+ }
+
+ return;
+}
+
+
+#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+extern void
+lzma_crc32_init(void)
+{
+ mythread_once(crc32_init);
+ return;
+}
+#endif
+
+
+extern LZMA_API(uint32_t)
+lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
+{
+#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+ lzma_crc32_init();
+#endif
+
+ crc = ~crc;
+
+ while (size != 0) {
+ crc = lzma_crc32_table[0][*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);
+ --size;
+ }
+
+ return ~crc;
+}
diff --git a/src/liblzma/check/crc32_table.c b/src/liblzma/check/crc32_table.c
new file mode 100644
index 0000000..b11762a
--- /dev/null
+++ b/src/liblzma/check/crc32_table.c
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc32_table.c
+/// \brief Precalculated CRC32 table with correct endianness
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+// Having the declaration here silences clang -Wmissing-variable-declarations.
+extern const uint32_t lzma_crc32_table[8][256];
+
+#ifdef WORDS_BIGENDIAN
+# include "crc32_table_be.h"
+#else
+# include "crc32_table_le.h"
+#endif
diff --git a/src/liblzma/check/crc32_table_be.h b/src/liblzma/check/crc32_table_be.h
new file mode 100644
index 0000000..c483cb6
--- /dev/null
+++ b/src/liblzma/check/crc32_table_be.h
@@ -0,0 +1,525 @@
+/* This file has been automatically generated by crc32_tablegen.c. */
+
+const uint32_t lzma_crc32_table[8][256] = {
+ {
+ 0x00000000, 0x96300777, 0x2C610EEE, 0xBA510999,
+ 0x19C46D07, 0x8FF46A70, 0x35A563E9, 0xA395649E,
+ 0x3288DB0E, 0xA4B8DC79, 0x1EE9D5E0, 0x88D9D297,
+ 0x2B4CB609, 0xBD7CB17E, 0x072DB8E7, 0x911DBF90,
+ 0x6410B71D, 0xF220B06A, 0x4871B9F3, 0xDE41BE84,
+ 0x7DD4DA1A, 0xEBE4DD6D, 0x51B5D4F4, 0xC785D383,
+ 0x56986C13, 0xC0A86B64, 0x7AF962FD, 0xECC9658A,
+ 0x4F5C0114, 0xD96C0663, 0x633D0FFA, 0xF50D088D,
+ 0xC8206E3B, 0x5E10694C, 0xE44160D5, 0x727167A2,
+ 0xD1E4033C, 0x47D4044B, 0xFD850DD2, 0x6BB50AA5,
+ 0xFAA8B535, 0x6C98B242, 0xD6C9BBDB, 0x40F9BCAC,
+ 0xE36CD832, 0x755CDF45, 0xCF0DD6DC, 0x593DD1AB,
+ 0xAC30D926, 0x3A00DE51, 0x8051D7C8, 0x1661D0BF,
+ 0xB5F4B421, 0x23C4B356, 0x9995BACF, 0x0FA5BDB8,
+ 0x9EB80228, 0x0888055F, 0xB2D90CC6, 0x24E90BB1,
+ 0x877C6F2F, 0x114C6858, 0xAB1D61C1, 0x3D2D66B6,
+ 0x9041DC76, 0x0671DB01, 0xBC20D298, 0x2A10D5EF,
+ 0x8985B171, 0x1FB5B606, 0xA5E4BF9F, 0x33D4B8E8,
+ 0xA2C90778, 0x34F9000F, 0x8EA80996, 0x18980EE1,
+ 0xBB0D6A7F, 0x2D3D6D08, 0x976C6491, 0x015C63E6,
+ 0xF4516B6B, 0x62616C1C, 0xD8306585, 0x4E0062F2,
+ 0xED95066C, 0x7BA5011B, 0xC1F40882, 0x57C40FF5,
+ 0xC6D9B065, 0x50E9B712, 0xEAB8BE8B, 0x7C88B9FC,
+ 0xDF1DDD62, 0x492DDA15, 0xF37CD38C, 0x654CD4FB,
+ 0x5861B24D, 0xCE51B53A, 0x7400BCA3, 0xE230BBD4,
+ 0x41A5DF4A, 0xD795D83D, 0x6DC4D1A4, 0xFBF4D6D3,
+ 0x6AE96943, 0xFCD96E34, 0x468867AD, 0xD0B860DA,
+ 0x732D0444, 0xE51D0333, 0x5F4C0AAA, 0xC97C0DDD,
+ 0x3C710550, 0xAA410227, 0x10100BBE, 0x86200CC9,
+ 0x25B56857, 0xB3856F20, 0x09D466B9, 0x9FE461CE,
+ 0x0EF9DE5E, 0x98C9D929, 0x2298D0B0, 0xB4A8D7C7,
+ 0x173DB359, 0x810DB42E, 0x3B5CBDB7, 0xAD6CBAC0,
+ 0x2083B8ED, 0xB6B3BF9A, 0x0CE2B603, 0x9AD2B174,
+ 0x3947D5EA, 0xAF77D29D, 0x1526DB04, 0x8316DC73,
+ 0x120B63E3, 0x843B6494, 0x3E6A6D0D, 0xA85A6A7A,
+ 0x0BCF0EE4, 0x9DFF0993, 0x27AE000A, 0xB19E077D,
+ 0x44930FF0, 0xD2A30887, 0x68F2011E, 0xFEC20669,
+ 0x5D5762F7, 0xCB676580, 0x71366C19, 0xE7066B6E,
+ 0x761BD4FE, 0xE02BD389, 0x5A7ADA10, 0xCC4ADD67,
+ 0x6FDFB9F9, 0xF9EFBE8E, 0x43BEB717, 0xD58EB060,
+ 0xE8A3D6D6, 0x7E93D1A1, 0xC4C2D838, 0x52F2DF4F,
+ 0xF167BBD1, 0x6757BCA6, 0xDD06B53F, 0x4B36B248,
+ 0xDA2B0DD8, 0x4C1B0AAF, 0xF64A0336, 0x607A0441,
+ 0xC3EF60DF, 0x55DF67A8, 0xEF8E6E31, 0x79BE6946,
+ 0x8CB361CB, 0x1A8366BC, 0xA0D26F25, 0x36E26852,
+ 0x95770CCC, 0x03470BBB, 0xB9160222, 0x2F260555,
+ 0xBE3BBAC5, 0x280BBDB2, 0x925AB42B, 0x046AB35C,
+ 0xA7FFD7C2, 0x31CFD0B5, 0x8B9ED92C, 0x1DAEDE5B,
+ 0xB0C2649B, 0x26F263EC, 0x9CA36A75, 0x0A936D02,
+ 0xA906099C, 0x3F360EEB, 0x85670772, 0x13570005,
+ 0x824ABF95, 0x147AB8E2, 0xAE2BB17B, 0x381BB60C,
+ 0x9B8ED292, 0x0DBED5E5, 0xB7EFDC7C, 0x21DFDB0B,
+ 0xD4D2D386, 0x42E2D4F1, 0xF8B3DD68, 0x6E83DA1F,
+ 0xCD16BE81, 0x5B26B9F6, 0xE177B06F, 0x7747B718,
+ 0xE65A0888, 0x706A0FFF, 0xCA3B0666, 0x5C0B0111,
+ 0xFF9E658F, 0x69AE62F8, 0xD3FF6B61, 0x45CF6C16,
+ 0x78E20AA0, 0xEED20DD7, 0x5483044E, 0xC2B30339,
+ 0x612667A7, 0xF71660D0, 0x4D476949, 0xDB776E3E,
+ 0x4A6AD1AE, 0xDC5AD6D9, 0x660BDF40, 0xF03BD837,
+ 0x53AEBCA9, 0xC59EBBDE, 0x7FCFB247, 0xE9FFB530,
+ 0x1CF2BDBD, 0x8AC2BACA, 0x3093B353, 0xA6A3B424,
+ 0x0536D0BA, 0x9306D7CD, 0x2957DE54, 0xBF67D923,
+ 0x2E7A66B3, 0xB84A61C4, 0x021B685D, 0x942B6F2A,
+ 0x37BE0BB4, 0xA18E0CC3, 0x1BDF055A, 0x8DEF022D
+ }, {
+ 0x00000000, 0x41311B19, 0x82623632, 0xC3532D2B,
+ 0x04C56C64, 0x45F4777D, 0x86A75A56, 0xC796414F,
+ 0x088AD9C8, 0x49BBC2D1, 0x8AE8EFFA, 0xCBD9F4E3,
+ 0x0C4FB5AC, 0x4D7EAEB5, 0x8E2D839E, 0xCF1C9887,
+ 0x5112C24A, 0x1023D953, 0xD370F478, 0x9241EF61,
+ 0x55D7AE2E, 0x14E6B537, 0xD7B5981C, 0x96848305,
+ 0x59981B82, 0x18A9009B, 0xDBFA2DB0, 0x9ACB36A9,
+ 0x5D5D77E6, 0x1C6C6CFF, 0xDF3F41D4, 0x9E0E5ACD,
+ 0xA2248495, 0xE3159F8C, 0x2046B2A7, 0x6177A9BE,
+ 0xA6E1E8F1, 0xE7D0F3E8, 0x2483DEC3, 0x65B2C5DA,
+ 0xAAAE5D5D, 0xEB9F4644, 0x28CC6B6F, 0x69FD7076,
+ 0xAE6B3139, 0xEF5A2A20, 0x2C09070B, 0x6D381C12,
+ 0xF33646DF, 0xB2075DC6, 0x715470ED, 0x30656BF4,
+ 0xF7F32ABB, 0xB6C231A2, 0x75911C89, 0x34A00790,
+ 0xFBBC9F17, 0xBA8D840E, 0x79DEA925, 0x38EFB23C,
+ 0xFF79F373, 0xBE48E86A, 0x7D1BC541, 0x3C2ADE58,
+ 0x054F79F0, 0x447E62E9, 0x872D4FC2, 0xC61C54DB,
+ 0x018A1594, 0x40BB0E8D, 0x83E823A6, 0xC2D938BF,
+ 0x0DC5A038, 0x4CF4BB21, 0x8FA7960A, 0xCE968D13,
+ 0x0900CC5C, 0x4831D745, 0x8B62FA6E, 0xCA53E177,
+ 0x545DBBBA, 0x156CA0A3, 0xD63F8D88, 0x970E9691,
+ 0x5098D7DE, 0x11A9CCC7, 0xD2FAE1EC, 0x93CBFAF5,
+ 0x5CD76272, 0x1DE6796B, 0xDEB55440, 0x9F844F59,
+ 0x58120E16, 0x1923150F, 0xDA703824, 0x9B41233D,
+ 0xA76BFD65, 0xE65AE67C, 0x2509CB57, 0x6438D04E,
+ 0xA3AE9101, 0xE29F8A18, 0x21CCA733, 0x60FDBC2A,
+ 0xAFE124AD, 0xEED03FB4, 0x2D83129F, 0x6CB20986,
+ 0xAB2448C9, 0xEA1553D0, 0x29467EFB, 0x687765E2,
+ 0xF6793F2F, 0xB7482436, 0x741B091D, 0x352A1204,
+ 0xF2BC534B, 0xB38D4852, 0x70DE6579, 0x31EF7E60,
+ 0xFEF3E6E7, 0xBFC2FDFE, 0x7C91D0D5, 0x3DA0CBCC,
+ 0xFA368A83, 0xBB07919A, 0x7854BCB1, 0x3965A7A8,
+ 0x4B98833B, 0x0AA99822, 0xC9FAB509, 0x88CBAE10,
+ 0x4F5DEF5F, 0x0E6CF446, 0xCD3FD96D, 0x8C0EC274,
+ 0x43125AF3, 0x022341EA, 0xC1706CC1, 0x804177D8,
+ 0x47D73697, 0x06E62D8E, 0xC5B500A5, 0x84841BBC,
+ 0x1A8A4171, 0x5BBB5A68, 0x98E87743, 0xD9D96C5A,
+ 0x1E4F2D15, 0x5F7E360C, 0x9C2D1B27, 0xDD1C003E,
+ 0x120098B9, 0x533183A0, 0x9062AE8B, 0xD153B592,
+ 0x16C5F4DD, 0x57F4EFC4, 0x94A7C2EF, 0xD596D9F6,
+ 0xE9BC07AE, 0xA88D1CB7, 0x6BDE319C, 0x2AEF2A85,
+ 0xED796BCA, 0xAC4870D3, 0x6F1B5DF8, 0x2E2A46E1,
+ 0xE136DE66, 0xA007C57F, 0x6354E854, 0x2265F34D,
+ 0xE5F3B202, 0xA4C2A91B, 0x67918430, 0x26A09F29,
+ 0xB8AEC5E4, 0xF99FDEFD, 0x3ACCF3D6, 0x7BFDE8CF,
+ 0xBC6BA980, 0xFD5AB299, 0x3E099FB2, 0x7F3884AB,
+ 0xB0241C2C, 0xF1150735, 0x32462A1E, 0x73773107,
+ 0xB4E17048, 0xF5D06B51, 0x3683467A, 0x77B25D63,
+ 0x4ED7FACB, 0x0FE6E1D2, 0xCCB5CCF9, 0x8D84D7E0,
+ 0x4A1296AF, 0x0B238DB6, 0xC870A09D, 0x8941BB84,
+ 0x465D2303, 0x076C381A, 0xC43F1531, 0x850E0E28,
+ 0x42984F67, 0x03A9547E, 0xC0FA7955, 0x81CB624C,
+ 0x1FC53881, 0x5EF42398, 0x9DA70EB3, 0xDC9615AA,
+ 0x1B0054E5, 0x5A314FFC, 0x996262D7, 0xD85379CE,
+ 0x174FE149, 0x567EFA50, 0x952DD77B, 0xD41CCC62,
+ 0x138A8D2D, 0x52BB9634, 0x91E8BB1F, 0xD0D9A006,
+ 0xECF37E5E, 0xADC26547, 0x6E91486C, 0x2FA05375,
+ 0xE836123A, 0xA9070923, 0x6A542408, 0x2B653F11,
+ 0xE479A796, 0xA548BC8F, 0x661B91A4, 0x272A8ABD,
+ 0xE0BCCBF2, 0xA18DD0EB, 0x62DEFDC0, 0x23EFE6D9,
+ 0xBDE1BC14, 0xFCD0A70D, 0x3F838A26, 0x7EB2913F,
+ 0xB924D070, 0xF815CB69, 0x3B46E642, 0x7A77FD5B,
+ 0xB56B65DC, 0xF45A7EC5, 0x370953EE, 0x763848F7,
+ 0xB1AE09B8, 0xF09F12A1, 0x33CC3F8A, 0x72FD2493
+ }, {
+ 0x00000000, 0x376AC201, 0x6ED48403, 0x59BE4602,
+ 0xDCA80907, 0xEBC2CB06, 0xB27C8D04, 0x85164F05,
+ 0xB851130E, 0x8F3BD10F, 0xD685970D, 0xE1EF550C,
+ 0x64F91A09, 0x5393D808, 0x0A2D9E0A, 0x3D475C0B,
+ 0x70A3261C, 0x47C9E41D, 0x1E77A21F, 0x291D601E,
+ 0xAC0B2F1B, 0x9B61ED1A, 0xC2DFAB18, 0xF5B56919,
+ 0xC8F23512, 0xFF98F713, 0xA626B111, 0x914C7310,
+ 0x145A3C15, 0x2330FE14, 0x7A8EB816, 0x4DE47A17,
+ 0xE0464D38, 0xD72C8F39, 0x8E92C93B, 0xB9F80B3A,
+ 0x3CEE443F, 0x0B84863E, 0x523AC03C, 0x6550023D,
+ 0x58175E36, 0x6F7D9C37, 0x36C3DA35, 0x01A91834,
+ 0x84BF5731, 0xB3D59530, 0xEA6BD332, 0xDD011133,
+ 0x90E56B24, 0xA78FA925, 0xFE31EF27, 0xC95B2D26,
+ 0x4C4D6223, 0x7B27A022, 0x2299E620, 0x15F32421,
+ 0x28B4782A, 0x1FDEBA2B, 0x4660FC29, 0x710A3E28,
+ 0xF41C712D, 0xC376B32C, 0x9AC8F52E, 0xADA2372F,
+ 0xC08D9A70, 0xF7E75871, 0xAE591E73, 0x9933DC72,
+ 0x1C259377, 0x2B4F5176, 0x72F11774, 0x459BD575,
+ 0x78DC897E, 0x4FB64B7F, 0x16080D7D, 0x2162CF7C,
+ 0xA4748079, 0x931E4278, 0xCAA0047A, 0xFDCAC67B,
+ 0xB02EBC6C, 0x87447E6D, 0xDEFA386F, 0xE990FA6E,
+ 0x6C86B56B, 0x5BEC776A, 0x02523168, 0x3538F369,
+ 0x087FAF62, 0x3F156D63, 0x66AB2B61, 0x51C1E960,
+ 0xD4D7A665, 0xE3BD6464, 0xBA032266, 0x8D69E067,
+ 0x20CBD748, 0x17A11549, 0x4E1F534B, 0x7975914A,
+ 0xFC63DE4F, 0xCB091C4E, 0x92B75A4C, 0xA5DD984D,
+ 0x989AC446, 0xAFF00647, 0xF64E4045, 0xC1248244,
+ 0x4432CD41, 0x73580F40, 0x2AE64942, 0x1D8C8B43,
+ 0x5068F154, 0x67023355, 0x3EBC7557, 0x09D6B756,
+ 0x8CC0F853, 0xBBAA3A52, 0xE2147C50, 0xD57EBE51,
+ 0xE839E25A, 0xDF53205B, 0x86ED6659, 0xB187A458,
+ 0x3491EB5D, 0x03FB295C, 0x5A456F5E, 0x6D2FAD5F,
+ 0x801B35E1, 0xB771F7E0, 0xEECFB1E2, 0xD9A573E3,
+ 0x5CB33CE6, 0x6BD9FEE7, 0x3267B8E5, 0x050D7AE4,
+ 0x384A26EF, 0x0F20E4EE, 0x569EA2EC, 0x61F460ED,
+ 0xE4E22FE8, 0xD388EDE9, 0x8A36ABEB, 0xBD5C69EA,
+ 0xF0B813FD, 0xC7D2D1FC, 0x9E6C97FE, 0xA90655FF,
+ 0x2C101AFA, 0x1B7AD8FB, 0x42C49EF9, 0x75AE5CF8,
+ 0x48E900F3, 0x7F83C2F2, 0x263D84F0, 0x115746F1,
+ 0x944109F4, 0xA32BCBF5, 0xFA958DF7, 0xCDFF4FF6,
+ 0x605D78D9, 0x5737BAD8, 0x0E89FCDA, 0x39E33EDB,
+ 0xBCF571DE, 0x8B9FB3DF, 0xD221F5DD, 0xE54B37DC,
+ 0xD80C6BD7, 0xEF66A9D6, 0xB6D8EFD4, 0x81B22DD5,
+ 0x04A462D0, 0x33CEA0D1, 0x6A70E6D3, 0x5D1A24D2,
+ 0x10FE5EC5, 0x27949CC4, 0x7E2ADAC6, 0x494018C7,
+ 0xCC5657C2, 0xFB3C95C3, 0xA282D3C1, 0x95E811C0,
+ 0xA8AF4DCB, 0x9FC58FCA, 0xC67BC9C8, 0xF1110BC9,
+ 0x740744CC, 0x436D86CD, 0x1AD3C0CF, 0x2DB902CE,
+ 0x4096AF91, 0x77FC6D90, 0x2E422B92, 0x1928E993,
+ 0x9C3EA696, 0xAB546497, 0xF2EA2295, 0xC580E094,
+ 0xF8C7BC9F, 0xCFAD7E9E, 0x9613389C, 0xA179FA9D,
+ 0x246FB598, 0x13057799, 0x4ABB319B, 0x7DD1F39A,
+ 0x3035898D, 0x075F4B8C, 0x5EE10D8E, 0x698BCF8F,
+ 0xEC9D808A, 0xDBF7428B, 0x82490489, 0xB523C688,
+ 0x88649A83, 0xBF0E5882, 0xE6B01E80, 0xD1DADC81,
+ 0x54CC9384, 0x63A65185, 0x3A181787, 0x0D72D586,
+ 0xA0D0E2A9, 0x97BA20A8, 0xCE0466AA, 0xF96EA4AB,
+ 0x7C78EBAE, 0x4B1229AF, 0x12AC6FAD, 0x25C6ADAC,
+ 0x1881F1A7, 0x2FEB33A6, 0x765575A4, 0x413FB7A5,
+ 0xC429F8A0, 0xF3433AA1, 0xAAFD7CA3, 0x9D97BEA2,
+ 0xD073C4B5, 0xE71906B4, 0xBEA740B6, 0x89CD82B7,
+ 0x0CDBCDB2, 0x3BB10FB3, 0x620F49B1, 0x55658BB0,
+ 0x6822D7BB, 0x5F4815BA, 0x06F653B8, 0x319C91B9,
+ 0xB48ADEBC, 0x83E01CBD, 0xDA5E5ABF, 0xED3498BE
+ }, {
+ 0x00000000, 0x6567BCB8, 0x8BC809AA, 0xEEAFB512,
+ 0x5797628F, 0x32F0DE37, 0xDC5F6B25, 0xB938D79D,
+ 0xEF28B4C5, 0x8A4F087D, 0x64E0BD6F, 0x018701D7,
+ 0xB8BFD64A, 0xDDD86AF2, 0x3377DFE0, 0x56106358,
+ 0x9F571950, 0xFA30A5E8, 0x149F10FA, 0x71F8AC42,
+ 0xC8C07BDF, 0xADA7C767, 0x43087275, 0x266FCECD,
+ 0x707FAD95, 0x1518112D, 0xFBB7A43F, 0x9ED01887,
+ 0x27E8CF1A, 0x428F73A2, 0xAC20C6B0, 0xC9477A08,
+ 0x3EAF32A0, 0x5BC88E18, 0xB5673B0A, 0xD00087B2,
+ 0x6938502F, 0x0C5FEC97, 0xE2F05985, 0x8797E53D,
+ 0xD1878665, 0xB4E03ADD, 0x5A4F8FCF, 0x3F283377,
+ 0x8610E4EA, 0xE3775852, 0x0DD8ED40, 0x68BF51F8,
+ 0xA1F82BF0, 0xC49F9748, 0x2A30225A, 0x4F579EE2,
+ 0xF66F497F, 0x9308F5C7, 0x7DA740D5, 0x18C0FC6D,
+ 0x4ED09F35, 0x2BB7238D, 0xC518969F, 0xA07F2A27,
+ 0x1947FDBA, 0x7C204102, 0x928FF410, 0xF7E848A8,
+ 0x3D58149B, 0x583FA823, 0xB6901D31, 0xD3F7A189,
+ 0x6ACF7614, 0x0FA8CAAC, 0xE1077FBE, 0x8460C306,
+ 0xD270A05E, 0xB7171CE6, 0x59B8A9F4, 0x3CDF154C,
+ 0x85E7C2D1, 0xE0807E69, 0x0E2FCB7B, 0x6B4877C3,
+ 0xA20F0DCB, 0xC768B173, 0x29C70461, 0x4CA0B8D9,
+ 0xF5986F44, 0x90FFD3FC, 0x7E5066EE, 0x1B37DA56,
+ 0x4D27B90E, 0x284005B6, 0xC6EFB0A4, 0xA3880C1C,
+ 0x1AB0DB81, 0x7FD76739, 0x9178D22B, 0xF41F6E93,
+ 0x03F7263B, 0x66909A83, 0x883F2F91, 0xED589329,
+ 0x546044B4, 0x3107F80C, 0xDFA84D1E, 0xBACFF1A6,
+ 0xECDF92FE, 0x89B82E46, 0x67179B54, 0x027027EC,
+ 0xBB48F071, 0xDE2F4CC9, 0x3080F9DB, 0x55E74563,
+ 0x9CA03F6B, 0xF9C783D3, 0x176836C1, 0x720F8A79,
+ 0xCB375DE4, 0xAE50E15C, 0x40FF544E, 0x2598E8F6,
+ 0x73888BAE, 0x16EF3716, 0xF8408204, 0x9D273EBC,
+ 0x241FE921, 0x41785599, 0xAFD7E08B, 0xCAB05C33,
+ 0x3BB659ED, 0x5ED1E555, 0xB07E5047, 0xD519ECFF,
+ 0x6C213B62, 0x094687DA, 0xE7E932C8, 0x828E8E70,
+ 0xD49EED28, 0xB1F95190, 0x5F56E482, 0x3A31583A,
+ 0x83098FA7, 0xE66E331F, 0x08C1860D, 0x6DA63AB5,
+ 0xA4E140BD, 0xC186FC05, 0x2F294917, 0x4A4EF5AF,
+ 0xF3762232, 0x96119E8A, 0x78BE2B98, 0x1DD99720,
+ 0x4BC9F478, 0x2EAE48C0, 0xC001FDD2, 0xA566416A,
+ 0x1C5E96F7, 0x79392A4F, 0x97969F5D, 0xF2F123E5,
+ 0x05196B4D, 0x607ED7F5, 0x8ED162E7, 0xEBB6DE5F,
+ 0x528E09C2, 0x37E9B57A, 0xD9460068, 0xBC21BCD0,
+ 0xEA31DF88, 0x8F566330, 0x61F9D622, 0x049E6A9A,
+ 0xBDA6BD07, 0xD8C101BF, 0x366EB4AD, 0x53090815,
+ 0x9A4E721D, 0xFF29CEA5, 0x11867BB7, 0x74E1C70F,
+ 0xCDD91092, 0xA8BEAC2A, 0x46111938, 0x2376A580,
+ 0x7566C6D8, 0x10017A60, 0xFEAECF72, 0x9BC973CA,
+ 0x22F1A457, 0x479618EF, 0xA939ADFD, 0xCC5E1145,
+ 0x06EE4D76, 0x6389F1CE, 0x8D2644DC, 0xE841F864,
+ 0x51792FF9, 0x341E9341, 0xDAB12653, 0xBFD69AEB,
+ 0xE9C6F9B3, 0x8CA1450B, 0x620EF019, 0x07694CA1,
+ 0xBE519B3C, 0xDB362784, 0x35999296, 0x50FE2E2E,
+ 0x99B95426, 0xFCDEE89E, 0x12715D8C, 0x7716E134,
+ 0xCE2E36A9, 0xAB498A11, 0x45E63F03, 0x208183BB,
+ 0x7691E0E3, 0x13F65C5B, 0xFD59E949, 0x983E55F1,
+ 0x2106826C, 0x44613ED4, 0xAACE8BC6, 0xCFA9377E,
+ 0x38417FD6, 0x5D26C36E, 0xB389767C, 0xD6EECAC4,
+ 0x6FD61D59, 0x0AB1A1E1, 0xE41E14F3, 0x8179A84B,
+ 0xD769CB13, 0xB20E77AB, 0x5CA1C2B9, 0x39C67E01,
+ 0x80FEA99C, 0xE5991524, 0x0B36A036, 0x6E511C8E,
+ 0xA7166686, 0xC271DA3E, 0x2CDE6F2C, 0x49B9D394,
+ 0xF0810409, 0x95E6B8B1, 0x7B490DA3, 0x1E2EB11B,
+ 0x483ED243, 0x2D596EFB, 0xC3F6DBE9, 0xA6916751,
+ 0x1FA9B0CC, 0x7ACE0C74, 0x9461B966, 0xF10605DE
+ }, {
+ 0x00000000, 0xB029603D, 0x6053C07A, 0xD07AA047,
+ 0xC0A680F5, 0x708FE0C8, 0xA0F5408F, 0x10DC20B2,
+ 0xC14B7030, 0x7162100D, 0xA118B04A, 0x1131D077,
+ 0x01EDF0C5, 0xB1C490F8, 0x61BE30BF, 0xD1975082,
+ 0x8297E060, 0x32BE805D, 0xE2C4201A, 0x52ED4027,
+ 0x42316095, 0xF21800A8, 0x2262A0EF, 0x924BC0D2,
+ 0x43DC9050, 0xF3F5F06D, 0x238F502A, 0x93A63017,
+ 0x837A10A5, 0x33537098, 0xE329D0DF, 0x5300B0E2,
+ 0x042FC1C1, 0xB406A1FC, 0x647C01BB, 0xD4556186,
+ 0xC4894134, 0x74A02109, 0xA4DA814E, 0x14F3E173,
+ 0xC564B1F1, 0x754DD1CC, 0xA537718B, 0x151E11B6,
+ 0x05C23104, 0xB5EB5139, 0x6591F17E, 0xD5B89143,
+ 0x86B821A1, 0x3691419C, 0xE6EBE1DB, 0x56C281E6,
+ 0x461EA154, 0xF637C169, 0x264D612E, 0x96640113,
+ 0x47F35191, 0xF7DA31AC, 0x27A091EB, 0x9789F1D6,
+ 0x8755D164, 0x377CB159, 0xE706111E, 0x572F7123,
+ 0x4958F358, 0xF9719365, 0x290B3322, 0x9922531F,
+ 0x89FE73AD, 0x39D71390, 0xE9ADB3D7, 0x5984D3EA,
+ 0x88138368, 0x383AE355, 0xE8404312, 0x5869232F,
+ 0x48B5039D, 0xF89C63A0, 0x28E6C3E7, 0x98CFA3DA,
+ 0xCBCF1338, 0x7BE67305, 0xAB9CD342, 0x1BB5B37F,
+ 0x0B6993CD, 0xBB40F3F0, 0x6B3A53B7, 0xDB13338A,
+ 0x0A846308, 0xBAAD0335, 0x6AD7A372, 0xDAFEC34F,
+ 0xCA22E3FD, 0x7A0B83C0, 0xAA712387, 0x1A5843BA,
+ 0x4D773299, 0xFD5E52A4, 0x2D24F2E3, 0x9D0D92DE,
+ 0x8DD1B26C, 0x3DF8D251, 0xED827216, 0x5DAB122B,
+ 0x8C3C42A9, 0x3C152294, 0xEC6F82D3, 0x5C46E2EE,
+ 0x4C9AC25C, 0xFCB3A261, 0x2CC90226, 0x9CE0621B,
+ 0xCFE0D2F9, 0x7FC9B2C4, 0xAFB31283, 0x1F9A72BE,
+ 0x0F46520C, 0xBF6F3231, 0x6F159276, 0xDF3CF24B,
+ 0x0EABA2C9, 0xBE82C2F4, 0x6EF862B3, 0xDED1028E,
+ 0xCE0D223C, 0x7E244201, 0xAE5EE246, 0x1E77827B,
+ 0x92B0E6B1, 0x2299868C, 0xF2E326CB, 0x42CA46F6,
+ 0x52166644, 0xE23F0679, 0x3245A63E, 0x826CC603,
+ 0x53FB9681, 0xE3D2F6BC, 0x33A856FB, 0x838136C6,
+ 0x935D1674, 0x23747649, 0xF30ED60E, 0x4327B633,
+ 0x102706D1, 0xA00E66EC, 0x7074C6AB, 0xC05DA696,
+ 0xD0818624, 0x60A8E619, 0xB0D2465E, 0x00FB2663,
+ 0xD16C76E1, 0x614516DC, 0xB13FB69B, 0x0116D6A6,
+ 0x11CAF614, 0xA1E39629, 0x7199366E, 0xC1B05653,
+ 0x969F2770, 0x26B6474D, 0xF6CCE70A, 0x46E58737,
+ 0x5639A785, 0xE610C7B8, 0x366A67FF, 0x864307C2,
+ 0x57D45740, 0xE7FD377D, 0x3787973A, 0x87AEF707,
+ 0x9772D7B5, 0x275BB788, 0xF72117CF, 0x470877F2,
+ 0x1408C710, 0xA421A72D, 0x745B076A, 0xC4726757,
+ 0xD4AE47E5, 0x648727D8, 0xB4FD879F, 0x04D4E7A2,
+ 0xD543B720, 0x656AD71D, 0xB510775A, 0x05391767,
+ 0x15E537D5, 0xA5CC57E8, 0x75B6F7AF, 0xC59F9792,
+ 0xDBE815E9, 0x6BC175D4, 0xBBBBD593, 0x0B92B5AE,
+ 0x1B4E951C, 0xAB67F521, 0x7B1D5566, 0xCB34355B,
+ 0x1AA365D9, 0xAA8A05E4, 0x7AF0A5A3, 0xCAD9C59E,
+ 0xDA05E52C, 0x6A2C8511, 0xBA562556, 0x0A7F456B,
+ 0x597FF589, 0xE95695B4, 0x392C35F3, 0x890555CE,
+ 0x99D9757C, 0x29F01541, 0xF98AB506, 0x49A3D53B,
+ 0x983485B9, 0x281DE584, 0xF86745C3, 0x484E25FE,
+ 0x5892054C, 0xE8BB6571, 0x38C1C536, 0x88E8A50B,
+ 0xDFC7D428, 0x6FEEB415, 0xBF941452, 0x0FBD746F,
+ 0x1F6154DD, 0xAF4834E0, 0x7F3294A7, 0xCF1BF49A,
+ 0x1E8CA418, 0xAEA5C425, 0x7EDF6462, 0xCEF6045F,
+ 0xDE2A24ED, 0x6E0344D0, 0xBE79E497, 0x0E5084AA,
+ 0x5D503448, 0xED795475, 0x3D03F432, 0x8D2A940F,
+ 0x9DF6B4BD, 0x2DDFD480, 0xFDA574C7, 0x4D8C14FA,
+ 0x9C1B4478, 0x2C322445, 0xFC488402, 0x4C61E43F,
+ 0x5CBDC48D, 0xEC94A4B0, 0x3CEE04F7, 0x8CC764CA
+ }, {
+ 0x00000000, 0xA5D35CCB, 0x0BA1C84D, 0xAE729486,
+ 0x1642919B, 0xB391CD50, 0x1DE359D6, 0xB830051D,
+ 0x6D8253EC, 0xC8510F27, 0x66239BA1, 0xC3F0C76A,
+ 0x7BC0C277, 0xDE139EBC, 0x70610A3A, 0xD5B256F1,
+ 0x9B02D603, 0x3ED18AC8, 0x90A31E4E, 0x35704285,
+ 0x8D404798, 0x28931B53, 0x86E18FD5, 0x2332D31E,
+ 0xF68085EF, 0x5353D924, 0xFD214DA2, 0x58F21169,
+ 0xE0C21474, 0x451148BF, 0xEB63DC39, 0x4EB080F2,
+ 0x3605AC07, 0x93D6F0CC, 0x3DA4644A, 0x98773881,
+ 0x20473D9C, 0x85946157, 0x2BE6F5D1, 0x8E35A91A,
+ 0x5B87FFEB, 0xFE54A320, 0x502637A6, 0xF5F56B6D,
+ 0x4DC56E70, 0xE81632BB, 0x4664A63D, 0xE3B7FAF6,
+ 0xAD077A04, 0x08D426CF, 0xA6A6B249, 0x0375EE82,
+ 0xBB45EB9F, 0x1E96B754, 0xB0E423D2, 0x15377F19,
+ 0xC08529E8, 0x65567523, 0xCB24E1A5, 0x6EF7BD6E,
+ 0xD6C7B873, 0x7314E4B8, 0xDD66703E, 0x78B52CF5,
+ 0x6C0A580F, 0xC9D904C4, 0x67AB9042, 0xC278CC89,
+ 0x7A48C994, 0xDF9B955F, 0x71E901D9, 0xD43A5D12,
+ 0x01880BE3, 0xA45B5728, 0x0A29C3AE, 0xAFFA9F65,
+ 0x17CA9A78, 0xB219C6B3, 0x1C6B5235, 0xB9B80EFE,
+ 0xF7088E0C, 0x52DBD2C7, 0xFCA94641, 0x597A1A8A,
+ 0xE14A1F97, 0x4499435C, 0xEAEBD7DA, 0x4F388B11,
+ 0x9A8ADDE0, 0x3F59812B, 0x912B15AD, 0x34F84966,
+ 0x8CC84C7B, 0x291B10B0, 0x87698436, 0x22BAD8FD,
+ 0x5A0FF408, 0xFFDCA8C3, 0x51AE3C45, 0xF47D608E,
+ 0x4C4D6593, 0xE99E3958, 0x47ECADDE, 0xE23FF115,
+ 0x378DA7E4, 0x925EFB2F, 0x3C2C6FA9, 0x99FF3362,
+ 0x21CF367F, 0x841C6AB4, 0x2A6EFE32, 0x8FBDA2F9,
+ 0xC10D220B, 0x64DE7EC0, 0xCAACEA46, 0x6F7FB68D,
+ 0xD74FB390, 0x729CEF5B, 0xDCEE7BDD, 0x793D2716,
+ 0xAC8F71E7, 0x095C2D2C, 0xA72EB9AA, 0x02FDE561,
+ 0xBACDE07C, 0x1F1EBCB7, 0xB16C2831, 0x14BF74FA,
+ 0xD814B01E, 0x7DC7ECD5, 0xD3B57853, 0x76662498,
+ 0xCE562185, 0x6B857D4E, 0xC5F7E9C8, 0x6024B503,
+ 0xB596E3F2, 0x1045BF39, 0xBE372BBF, 0x1BE47774,
+ 0xA3D47269, 0x06072EA2, 0xA875BA24, 0x0DA6E6EF,
+ 0x4316661D, 0xE6C53AD6, 0x48B7AE50, 0xED64F29B,
+ 0x5554F786, 0xF087AB4D, 0x5EF53FCB, 0xFB266300,
+ 0x2E9435F1, 0x8B47693A, 0x2535FDBC, 0x80E6A177,
+ 0x38D6A46A, 0x9D05F8A1, 0x33776C27, 0x96A430EC,
+ 0xEE111C19, 0x4BC240D2, 0xE5B0D454, 0x4063889F,
+ 0xF8538D82, 0x5D80D149, 0xF3F245CF, 0x56211904,
+ 0x83934FF5, 0x2640133E, 0x883287B8, 0x2DE1DB73,
+ 0x95D1DE6E, 0x300282A5, 0x9E701623, 0x3BA34AE8,
+ 0x7513CA1A, 0xD0C096D1, 0x7EB20257, 0xDB615E9C,
+ 0x63515B81, 0xC682074A, 0x68F093CC, 0xCD23CF07,
+ 0x189199F6, 0xBD42C53D, 0x133051BB, 0xB6E30D70,
+ 0x0ED3086D, 0xAB0054A6, 0x0572C020, 0xA0A19CEB,
+ 0xB41EE811, 0x11CDB4DA, 0xBFBF205C, 0x1A6C7C97,
+ 0xA25C798A, 0x078F2541, 0xA9FDB1C7, 0x0C2EED0C,
+ 0xD99CBBFD, 0x7C4FE736, 0xD23D73B0, 0x77EE2F7B,
+ 0xCFDE2A66, 0x6A0D76AD, 0xC47FE22B, 0x61ACBEE0,
+ 0x2F1C3E12, 0x8ACF62D9, 0x24BDF65F, 0x816EAA94,
+ 0x395EAF89, 0x9C8DF342, 0x32FF67C4, 0x972C3B0F,
+ 0x429E6DFE, 0xE74D3135, 0x493FA5B3, 0xECECF978,
+ 0x54DCFC65, 0xF10FA0AE, 0x5F7D3428, 0xFAAE68E3,
+ 0x821B4416, 0x27C818DD, 0x89BA8C5B, 0x2C69D090,
+ 0x9459D58D, 0x318A8946, 0x9FF81DC0, 0x3A2B410B,
+ 0xEF9917FA, 0x4A4A4B31, 0xE438DFB7, 0x41EB837C,
+ 0xF9DB8661, 0x5C08DAAA, 0xF27A4E2C, 0x57A912E7,
+ 0x19199215, 0xBCCACEDE, 0x12B85A58, 0xB76B0693,
+ 0x0F5B038E, 0xAA885F45, 0x04FACBC3, 0xA1299708,
+ 0x749BC1F9, 0xD1489D32, 0x7F3A09B4, 0xDAE9557F,
+ 0x62D95062, 0xC70A0CA9, 0x6978982F, 0xCCABC4E4
+ }, {
+ 0x00000000, 0xB40B77A6, 0x29119F97, 0x9D1AE831,
+ 0x13244FF4, 0xA72F3852, 0x3A35D063, 0x8E3EA7C5,
+ 0x674EEF33, 0xD3459895, 0x4E5F70A4, 0xFA540702,
+ 0x746AA0C7, 0xC061D761, 0x5D7B3F50, 0xE97048F6,
+ 0xCE9CDE67, 0x7A97A9C1, 0xE78D41F0, 0x53863656,
+ 0xDDB89193, 0x69B3E635, 0xF4A90E04, 0x40A279A2,
+ 0xA9D23154, 0x1DD946F2, 0x80C3AEC3, 0x34C8D965,
+ 0xBAF67EA0, 0x0EFD0906, 0x93E7E137, 0x27EC9691,
+ 0x9C39BDCF, 0x2832CA69, 0xB5282258, 0x012355FE,
+ 0x8F1DF23B, 0x3B16859D, 0xA60C6DAC, 0x12071A0A,
+ 0xFB7752FC, 0x4F7C255A, 0xD266CD6B, 0x666DBACD,
+ 0xE8531D08, 0x5C586AAE, 0xC142829F, 0x7549F539,
+ 0x52A563A8, 0xE6AE140E, 0x7BB4FC3F, 0xCFBF8B99,
+ 0x41812C5C, 0xF58A5BFA, 0x6890B3CB, 0xDC9BC46D,
+ 0x35EB8C9B, 0x81E0FB3D, 0x1CFA130C, 0xA8F164AA,
+ 0x26CFC36F, 0x92C4B4C9, 0x0FDE5CF8, 0xBBD52B5E,
+ 0x79750B44, 0xCD7E7CE2, 0x506494D3, 0xE46FE375,
+ 0x6A5144B0, 0xDE5A3316, 0x4340DB27, 0xF74BAC81,
+ 0x1E3BE477, 0xAA3093D1, 0x372A7BE0, 0x83210C46,
+ 0x0D1FAB83, 0xB914DC25, 0x240E3414, 0x900543B2,
+ 0xB7E9D523, 0x03E2A285, 0x9EF84AB4, 0x2AF33D12,
+ 0xA4CD9AD7, 0x10C6ED71, 0x8DDC0540, 0x39D772E6,
+ 0xD0A73A10, 0x64AC4DB6, 0xF9B6A587, 0x4DBDD221,
+ 0xC38375E4, 0x77880242, 0xEA92EA73, 0x5E999DD5,
+ 0xE54CB68B, 0x5147C12D, 0xCC5D291C, 0x78565EBA,
+ 0xF668F97F, 0x42638ED9, 0xDF7966E8, 0x6B72114E,
+ 0x820259B8, 0x36092E1E, 0xAB13C62F, 0x1F18B189,
+ 0x9126164C, 0x252D61EA, 0xB83789DB, 0x0C3CFE7D,
+ 0x2BD068EC, 0x9FDB1F4A, 0x02C1F77B, 0xB6CA80DD,
+ 0x38F42718, 0x8CFF50BE, 0x11E5B88F, 0xA5EECF29,
+ 0x4C9E87DF, 0xF895F079, 0x658F1848, 0xD1846FEE,
+ 0x5FBAC82B, 0xEBB1BF8D, 0x76AB57BC, 0xC2A0201A,
+ 0xF2EA1688, 0x46E1612E, 0xDBFB891F, 0x6FF0FEB9,
+ 0xE1CE597C, 0x55C52EDA, 0xC8DFC6EB, 0x7CD4B14D,
+ 0x95A4F9BB, 0x21AF8E1D, 0xBCB5662C, 0x08BE118A,
+ 0x8680B64F, 0x328BC1E9, 0xAF9129D8, 0x1B9A5E7E,
+ 0x3C76C8EF, 0x887DBF49, 0x15675778, 0xA16C20DE,
+ 0x2F52871B, 0x9B59F0BD, 0x0643188C, 0xB2486F2A,
+ 0x5B3827DC, 0xEF33507A, 0x7229B84B, 0xC622CFED,
+ 0x481C6828, 0xFC171F8E, 0x610DF7BF, 0xD5068019,
+ 0x6ED3AB47, 0xDAD8DCE1, 0x47C234D0, 0xF3C94376,
+ 0x7DF7E4B3, 0xC9FC9315, 0x54E67B24, 0xE0ED0C82,
+ 0x099D4474, 0xBD9633D2, 0x208CDBE3, 0x9487AC45,
+ 0x1AB90B80, 0xAEB27C26, 0x33A89417, 0x87A3E3B1,
+ 0xA04F7520, 0x14440286, 0x895EEAB7, 0x3D559D11,
+ 0xB36B3AD4, 0x07604D72, 0x9A7AA543, 0x2E71D2E5,
+ 0xC7019A13, 0x730AEDB5, 0xEE100584, 0x5A1B7222,
+ 0xD425D5E7, 0x602EA241, 0xFD344A70, 0x493F3DD6,
+ 0x8B9F1DCC, 0x3F946A6A, 0xA28E825B, 0x1685F5FD,
+ 0x98BB5238, 0x2CB0259E, 0xB1AACDAF, 0x05A1BA09,
+ 0xECD1F2FF, 0x58DA8559, 0xC5C06D68, 0x71CB1ACE,
+ 0xFFF5BD0B, 0x4BFECAAD, 0xD6E4229C, 0x62EF553A,
+ 0x4503C3AB, 0xF108B40D, 0x6C125C3C, 0xD8192B9A,
+ 0x56278C5F, 0xE22CFBF9, 0x7F3613C8, 0xCB3D646E,
+ 0x224D2C98, 0x96465B3E, 0x0B5CB30F, 0xBF57C4A9,
+ 0x3169636C, 0x856214CA, 0x1878FCFB, 0xAC738B5D,
+ 0x17A6A003, 0xA3ADD7A5, 0x3EB73F94, 0x8ABC4832,
+ 0x0482EFF7, 0xB0899851, 0x2D937060, 0x999807C6,
+ 0x70E84F30, 0xC4E33896, 0x59F9D0A7, 0xEDF2A701,
+ 0x63CC00C4, 0xD7C77762, 0x4ADD9F53, 0xFED6E8F5,
+ 0xD93A7E64, 0x6D3109C2, 0xF02BE1F3, 0x44209655,
+ 0xCA1E3190, 0x7E154636, 0xE30FAE07, 0x5704D9A1,
+ 0xBE749157, 0x0A7FE6F1, 0x97650EC0, 0x236E7966,
+ 0xAD50DEA3, 0x195BA905, 0x84414134, 0x304A3692
+ }, {
+ 0x00000000, 0x9E00AACC, 0x7D072542, 0xE3078F8E,
+ 0xFA0E4A84, 0x640EE048, 0x87096FC6, 0x1909C50A,
+ 0xB51BE5D3, 0x2B1B4F1F, 0xC81CC091, 0x561C6A5D,
+ 0x4F15AF57, 0xD115059B, 0x32128A15, 0xAC1220D9,
+ 0x2B31BB7C, 0xB53111B0, 0x56369E3E, 0xC83634F2,
+ 0xD13FF1F8, 0x4F3F5B34, 0xAC38D4BA, 0x32387E76,
+ 0x9E2A5EAF, 0x002AF463, 0xE32D7BED, 0x7D2DD121,
+ 0x6424142B, 0xFA24BEE7, 0x19233169, 0x87239BA5,
+ 0x566276F9, 0xC862DC35, 0x2B6553BB, 0xB565F977,
+ 0xAC6C3C7D, 0x326C96B1, 0xD16B193F, 0x4F6BB3F3,
+ 0xE379932A, 0x7D7939E6, 0x9E7EB668, 0x007E1CA4,
+ 0x1977D9AE, 0x87777362, 0x6470FCEC, 0xFA705620,
+ 0x7D53CD85, 0xE3536749, 0x0054E8C7, 0x9E54420B,
+ 0x875D8701, 0x195D2DCD, 0xFA5AA243, 0x645A088F,
+ 0xC8482856, 0x5648829A, 0xB54F0D14, 0x2B4FA7D8,
+ 0x324662D2, 0xAC46C81E, 0x4F414790, 0xD141ED5C,
+ 0xEDC29D29, 0x73C237E5, 0x90C5B86B, 0x0EC512A7,
+ 0x17CCD7AD, 0x89CC7D61, 0x6ACBF2EF, 0xF4CB5823,
+ 0x58D978FA, 0xC6D9D236, 0x25DE5DB8, 0xBBDEF774,
+ 0xA2D7327E, 0x3CD798B2, 0xDFD0173C, 0x41D0BDF0,
+ 0xC6F32655, 0x58F38C99, 0xBBF40317, 0x25F4A9DB,
+ 0x3CFD6CD1, 0xA2FDC61D, 0x41FA4993, 0xDFFAE35F,
+ 0x73E8C386, 0xEDE8694A, 0x0EEFE6C4, 0x90EF4C08,
+ 0x89E68902, 0x17E623CE, 0xF4E1AC40, 0x6AE1068C,
+ 0xBBA0EBD0, 0x25A0411C, 0xC6A7CE92, 0x58A7645E,
+ 0x41AEA154, 0xDFAE0B98, 0x3CA98416, 0xA2A92EDA,
+ 0x0EBB0E03, 0x90BBA4CF, 0x73BC2B41, 0xEDBC818D,
+ 0xF4B54487, 0x6AB5EE4B, 0x89B261C5, 0x17B2CB09,
+ 0x909150AC, 0x0E91FA60, 0xED9675EE, 0x7396DF22,
+ 0x6A9F1A28, 0xF49FB0E4, 0x17983F6A, 0x899895A6,
+ 0x258AB57F, 0xBB8A1FB3, 0x588D903D, 0xC68D3AF1,
+ 0xDF84FFFB, 0x41845537, 0xA283DAB9, 0x3C837075,
+ 0xDA853B53, 0x4485919F, 0xA7821E11, 0x3982B4DD,
+ 0x208B71D7, 0xBE8BDB1B, 0x5D8C5495, 0xC38CFE59,
+ 0x6F9EDE80, 0xF19E744C, 0x1299FBC2, 0x8C99510E,
+ 0x95909404, 0x0B903EC8, 0xE897B146, 0x76971B8A,
+ 0xF1B4802F, 0x6FB42AE3, 0x8CB3A56D, 0x12B30FA1,
+ 0x0BBACAAB, 0x95BA6067, 0x76BDEFE9, 0xE8BD4525,
+ 0x44AF65FC, 0xDAAFCF30, 0x39A840BE, 0xA7A8EA72,
+ 0xBEA12F78, 0x20A185B4, 0xC3A60A3A, 0x5DA6A0F6,
+ 0x8CE74DAA, 0x12E7E766, 0xF1E068E8, 0x6FE0C224,
+ 0x76E9072E, 0xE8E9ADE2, 0x0BEE226C, 0x95EE88A0,
+ 0x39FCA879, 0xA7FC02B5, 0x44FB8D3B, 0xDAFB27F7,
+ 0xC3F2E2FD, 0x5DF24831, 0xBEF5C7BF, 0x20F56D73,
+ 0xA7D6F6D6, 0x39D65C1A, 0xDAD1D394, 0x44D17958,
+ 0x5DD8BC52, 0xC3D8169E, 0x20DF9910, 0xBEDF33DC,
+ 0x12CD1305, 0x8CCDB9C9, 0x6FCA3647, 0xF1CA9C8B,
+ 0xE8C35981, 0x76C3F34D, 0x95C47CC3, 0x0BC4D60F,
+ 0x3747A67A, 0xA9470CB6, 0x4A408338, 0xD44029F4,
+ 0xCD49ECFE, 0x53494632, 0xB04EC9BC, 0x2E4E6370,
+ 0x825C43A9, 0x1C5CE965, 0xFF5B66EB, 0x615BCC27,
+ 0x7852092D, 0xE652A3E1, 0x05552C6F, 0x9B5586A3,
+ 0x1C761D06, 0x8276B7CA, 0x61713844, 0xFF719288,
+ 0xE6785782, 0x7878FD4E, 0x9B7F72C0, 0x057FD80C,
+ 0xA96DF8D5, 0x376D5219, 0xD46ADD97, 0x4A6A775B,
+ 0x5363B251, 0xCD63189D, 0x2E649713, 0xB0643DDF,
+ 0x6125D083, 0xFF257A4F, 0x1C22F5C1, 0x82225F0D,
+ 0x9B2B9A07, 0x052B30CB, 0xE62CBF45, 0x782C1589,
+ 0xD43E3550, 0x4A3E9F9C, 0xA9391012, 0x3739BADE,
+ 0x2E307FD4, 0xB030D518, 0x53375A96, 0xCD37F05A,
+ 0x4A146BFF, 0xD414C133, 0x37134EBD, 0xA913E471,
+ 0xB01A217B, 0x2E1A8BB7, 0xCD1D0439, 0x531DAEF5,
+ 0xFF0F8E2C, 0x610F24E0, 0x8208AB6E, 0x1C0801A2,
+ 0x0501C4A8, 0x9B016E64, 0x7806E1EA, 0xE6064B26
+ }
+};
diff --git a/src/liblzma/check/crc32_table_le.h b/src/liblzma/check/crc32_table_le.h
new file mode 100644
index 0000000..25f4fc4
--- /dev/null
+++ b/src/liblzma/check/crc32_table_le.h
@@ -0,0 +1,525 @@
+/* This file has been automatically generated by crc32_tablegen.c. */
+
+const uint32_t lzma_crc32_table[8][256] = {
+ {
+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+ }, {
+ 0x00000000, 0x191B3141, 0x32366282, 0x2B2D53C3,
+ 0x646CC504, 0x7D77F445, 0x565AA786, 0x4F4196C7,
+ 0xC8D98A08, 0xD1C2BB49, 0xFAEFE88A, 0xE3F4D9CB,
+ 0xACB54F0C, 0xB5AE7E4D, 0x9E832D8E, 0x87981CCF,
+ 0x4AC21251, 0x53D92310, 0x78F470D3, 0x61EF4192,
+ 0x2EAED755, 0x37B5E614, 0x1C98B5D7, 0x05838496,
+ 0x821B9859, 0x9B00A918, 0xB02DFADB, 0xA936CB9A,
+ 0xE6775D5D, 0xFF6C6C1C, 0xD4413FDF, 0xCD5A0E9E,
+ 0x958424A2, 0x8C9F15E3, 0xA7B24620, 0xBEA97761,
+ 0xF1E8E1A6, 0xE8F3D0E7, 0xC3DE8324, 0xDAC5B265,
+ 0x5D5DAEAA, 0x44469FEB, 0x6F6BCC28, 0x7670FD69,
+ 0x39316BAE, 0x202A5AEF, 0x0B07092C, 0x121C386D,
+ 0xDF4636F3, 0xC65D07B2, 0xED705471, 0xF46B6530,
+ 0xBB2AF3F7, 0xA231C2B6, 0x891C9175, 0x9007A034,
+ 0x179FBCFB, 0x0E848DBA, 0x25A9DE79, 0x3CB2EF38,
+ 0x73F379FF, 0x6AE848BE, 0x41C51B7D, 0x58DE2A3C,
+ 0xF0794F05, 0xE9627E44, 0xC24F2D87, 0xDB541CC6,
+ 0x94158A01, 0x8D0EBB40, 0xA623E883, 0xBF38D9C2,
+ 0x38A0C50D, 0x21BBF44C, 0x0A96A78F, 0x138D96CE,
+ 0x5CCC0009, 0x45D73148, 0x6EFA628B, 0x77E153CA,
+ 0xBABB5D54, 0xA3A06C15, 0x888D3FD6, 0x91960E97,
+ 0xDED79850, 0xC7CCA911, 0xECE1FAD2, 0xF5FACB93,
+ 0x7262D75C, 0x6B79E61D, 0x4054B5DE, 0x594F849F,
+ 0x160E1258, 0x0F152319, 0x243870DA, 0x3D23419B,
+ 0x65FD6BA7, 0x7CE65AE6, 0x57CB0925, 0x4ED03864,
+ 0x0191AEA3, 0x188A9FE2, 0x33A7CC21, 0x2ABCFD60,
+ 0xAD24E1AF, 0xB43FD0EE, 0x9F12832D, 0x8609B26C,
+ 0xC94824AB, 0xD05315EA, 0xFB7E4629, 0xE2657768,
+ 0x2F3F79F6, 0x362448B7, 0x1D091B74, 0x04122A35,
+ 0x4B53BCF2, 0x52488DB3, 0x7965DE70, 0x607EEF31,
+ 0xE7E6F3FE, 0xFEFDC2BF, 0xD5D0917C, 0xCCCBA03D,
+ 0x838A36FA, 0x9A9107BB, 0xB1BC5478, 0xA8A76539,
+ 0x3B83984B, 0x2298A90A, 0x09B5FAC9, 0x10AECB88,
+ 0x5FEF5D4F, 0x46F46C0E, 0x6DD93FCD, 0x74C20E8C,
+ 0xF35A1243, 0xEA412302, 0xC16C70C1, 0xD8774180,
+ 0x9736D747, 0x8E2DE606, 0xA500B5C5, 0xBC1B8484,
+ 0x71418A1A, 0x685ABB5B, 0x4377E898, 0x5A6CD9D9,
+ 0x152D4F1E, 0x0C367E5F, 0x271B2D9C, 0x3E001CDD,
+ 0xB9980012, 0xA0833153, 0x8BAE6290, 0x92B553D1,
+ 0xDDF4C516, 0xC4EFF457, 0xEFC2A794, 0xF6D996D5,
+ 0xAE07BCE9, 0xB71C8DA8, 0x9C31DE6B, 0x852AEF2A,
+ 0xCA6B79ED, 0xD37048AC, 0xF85D1B6F, 0xE1462A2E,
+ 0x66DE36E1, 0x7FC507A0, 0x54E85463, 0x4DF36522,
+ 0x02B2F3E5, 0x1BA9C2A4, 0x30849167, 0x299FA026,
+ 0xE4C5AEB8, 0xFDDE9FF9, 0xD6F3CC3A, 0xCFE8FD7B,
+ 0x80A96BBC, 0x99B25AFD, 0xB29F093E, 0xAB84387F,
+ 0x2C1C24B0, 0x350715F1, 0x1E2A4632, 0x07317773,
+ 0x4870E1B4, 0x516BD0F5, 0x7A468336, 0x635DB277,
+ 0xCBFAD74E, 0xD2E1E60F, 0xF9CCB5CC, 0xE0D7848D,
+ 0xAF96124A, 0xB68D230B, 0x9DA070C8, 0x84BB4189,
+ 0x03235D46, 0x1A386C07, 0x31153FC4, 0x280E0E85,
+ 0x674F9842, 0x7E54A903, 0x5579FAC0, 0x4C62CB81,
+ 0x8138C51F, 0x9823F45E, 0xB30EA79D, 0xAA1596DC,
+ 0xE554001B, 0xFC4F315A, 0xD7626299, 0xCE7953D8,
+ 0x49E14F17, 0x50FA7E56, 0x7BD72D95, 0x62CC1CD4,
+ 0x2D8D8A13, 0x3496BB52, 0x1FBBE891, 0x06A0D9D0,
+ 0x5E7EF3EC, 0x4765C2AD, 0x6C48916E, 0x7553A02F,
+ 0x3A1236E8, 0x230907A9, 0x0824546A, 0x113F652B,
+ 0x96A779E4, 0x8FBC48A5, 0xA4911B66, 0xBD8A2A27,
+ 0xF2CBBCE0, 0xEBD08DA1, 0xC0FDDE62, 0xD9E6EF23,
+ 0x14BCE1BD, 0x0DA7D0FC, 0x268A833F, 0x3F91B27E,
+ 0x70D024B9, 0x69CB15F8, 0x42E6463B, 0x5BFD777A,
+ 0xDC656BB5, 0xC57E5AF4, 0xEE530937, 0xF7483876,
+ 0xB809AEB1, 0xA1129FF0, 0x8A3FCC33, 0x9324FD72
+ }, {
+ 0x00000000, 0x01C26A37, 0x0384D46E, 0x0246BE59,
+ 0x0709A8DC, 0x06CBC2EB, 0x048D7CB2, 0x054F1685,
+ 0x0E1351B8, 0x0FD13B8F, 0x0D9785D6, 0x0C55EFE1,
+ 0x091AF964, 0x08D89353, 0x0A9E2D0A, 0x0B5C473D,
+ 0x1C26A370, 0x1DE4C947, 0x1FA2771E, 0x1E601D29,
+ 0x1B2F0BAC, 0x1AED619B, 0x18ABDFC2, 0x1969B5F5,
+ 0x1235F2C8, 0x13F798FF, 0x11B126A6, 0x10734C91,
+ 0x153C5A14, 0x14FE3023, 0x16B88E7A, 0x177AE44D,
+ 0x384D46E0, 0x398F2CD7, 0x3BC9928E, 0x3A0BF8B9,
+ 0x3F44EE3C, 0x3E86840B, 0x3CC03A52, 0x3D025065,
+ 0x365E1758, 0x379C7D6F, 0x35DAC336, 0x3418A901,
+ 0x3157BF84, 0x3095D5B3, 0x32D36BEA, 0x331101DD,
+ 0x246BE590, 0x25A98FA7, 0x27EF31FE, 0x262D5BC9,
+ 0x23624D4C, 0x22A0277B, 0x20E69922, 0x2124F315,
+ 0x2A78B428, 0x2BBADE1F, 0x29FC6046, 0x283E0A71,
+ 0x2D711CF4, 0x2CB376C3, 0x2EF5C89A, 0x2F37A2AD,
+ 0x709A8DC0, 0x7158E7F7, 0x731E59AE, 0x72DC3399,
+ 0x7793251C, 0x76514F2B, 0x7417F172, 0x75D59B45,
+ 0x7E89DC78, 0x7F4BB64F, 0x7D0D0816, 0x7CCF6221,
+ 0x798074A4, 0x78421E93, 0x7A04A0CA, 0x7BC6CAFD,
+ 0x6CBC2EB0, 0x6D7E4487, 0x6F38FADE, 0x6EFA90E9,
+ 0x6BB5866C, 0x6A77EC5B, 0x68315202, 0x69F33835,
+ 0x62AF7F08, 0x636D153F, 0x612BAB66, 0x60E9C151,
+ 0x65A6D7D4, 0x6464BDE3, 0x662203BA, 0x67E0698D,
+ 0x48D7CB20, 0x4915A117, 0x4B531F4E, 0x4A917579,
+ 0x4FDE63FC, 0x4E1C09CB, 0x4C5AB792, 0x4D98DDA5,
+ 0x46C49A98, 0x4706F0AF, 0x45404EF6, 0x448224C1,
+ 0x41CD3244, 0x400F5873, 0x4249E62A, 0x438B8C1D,
+ 0x54F16850, 0x55330267, 0x5775BC3E, 0x56B7D609,
+ 0x53F8C08C, 0x523AAABB, 0x507C14E2, 0x51BE7ED5,
+ 0x5AE239E8, 0x5B2053DF, 0x5966ED86, 0x58A487B1,
+ 0x5DEB9134, 0x5C29FB03, 0x5E6F455A, 0x5FAD2F6D,
+ 0xE1351B80, 0xE0F771B7, 0xE2B1CFEE, 0xE373A5D9,
+ 0xE63CB35C, 0xE7FED96B, 0xE5B86732, 0xE47A0D05,
+ 0xEF264A38, 0xEEE4200F, 0xECA29E56, 0xED60F461,
+ 0xE82FE2E4, 0xE9ED88D3, 0xEBAB368A, 0xEA695CBD,
+ 0xFD13B8F0, 0xFCD1D2C7, 0xFE976C9E, 0xFF5506A9,
+ 0xFA1A102C, 0xFBD87A1B, 0xF99EC442, 0xF85CAE75,
+ 0xF300E948, 0xF2C2837F, 0xF0843D26, 0xF1465711,
+ 0xF4094194, 0xF5CB2BA3, 0xF78D95FA, 0xF64FFFCD,
+ 0xD9785D60, 0xD8BA3757, 0xDAFC890E, 0xDB3EE339,
+ 0xDE71F5BC, 0xDFB39F8B, 0xDDF521D2, 0xDC374BE5,
+ 0xD76B0CD8, 0xD6A966EF, 0xD4EFD8B6, 0xD52DB281,
+ 0xD062A404, 0xD1A0CE33, 0xD3E6706A, 0xD2241A5D,
+ 0xC55EFE10, 0xC49C9427, 0xC6DA2A7E, 0xC7184049,
+ 0xC25756CC, 0xC3953CFB, 0xC1D382A2, 0xC011E895,
+ 0xCB4DAFA8, 0xCA8FC59F, 0xC8C97BC6, 0xC90B11F1,
+ 0xCC440774, 0xCD866D43, 0xCFC0D31A, 0xCE02B92D,
+ 0x91AF9640, 0x906DFC77, 0x922B422E, 0x93E92819,
+ 0x96A63E9C, 0x976454AB, 0x9522EAF2, 0x94E080C5,
+ 0x9FBCC7F8, 0x9E7EADCF, 0x9C381396, 0x9DFA79A1,
+ 0x98B56F24, 0x99770513, 0x9B31BB4A, 0x9AF3D17D,
+ 0x8D893530, 0x8C4B5F07, 0x8E0DE15E, 0x8FCF8B69,
+ 0x8A809DEC, 0x8B42F7DB, 0x89044982, 0x88C623B5,
+ 0x839A6488, 0x82580EBF, 0x801EB0E6, 0x81DCDAD1,
+ 0x8493CC54, 0x8551A663, 0x8717183A, 0x86D5720D,
+ 0xA9E2D0A0, 0xA820BA97, 0xAA6604CE, 0xABA46EF9,
+ 0xAEEB787C, 0xAF29124B, 0xAD6FAC12, 0xACADC625,
+ 0xA7F18118, 0xA633EB2F, 0xA4755576, 0xA5B73F41,
+ 0xA0F829C4, 0xA13A43F3, 0xA37CFDAA, 0xA2BE979D,
+ 0xB5C473D0, 0xB40619E7, 0xB640A7BE, 0xB782CD89,
+ 0xB2CDDB0C, 0xB30FB13B, 0xB1490F62, 0xB08B6555,
+ 0xBBD72268, 0xBA15485F, 0xB853F606, 0xB9919C31,
+ 0xBCDE8AB4, 0xBD1CE083, 0xBF5A5EDA, 0xBE9834ED
+ }, {
+ 0x00000000, 0xB8BC6765, 0xAA09C88B, 0x12B5AFEE,
+ 0x8F629757, 0x37DEF032, 0x256B5FDC, 0x9DD738B9,
+ 0xC5B428EF, 0x7D084F8A, 0x6FBDE064, 0xD7018701,
+ 0x4AD6BFB8, 0xF26AD8DD, 0xE0DF7733, 0x58631056,
+ 0x5019579F, 0xE8A530FA, 0xFA109F14, 0x42ACF871,
+ 0xDF7BC0C8, 0x67C7A7AD, 0x75720843, 0xCDCE6F26,
+ 0x95AD7F70, 0x2D111815, 0x3FA4B7FB, 0x8718D09E,
+ 0x1ACFE827, 0xA2738F42, 0xB0C620AC, 0x087A47C9,
+ 0xA032AF3E, 0x188EC85B, 0x0A3B67B5, 0xB28700D0,
+ 0x2F503869, 0x97EC5F0C, 0x8559F0E2, 0x3DE59787,
+ 0x658687D1, 0xDD3AE0B4, 0xCF8F4F5A, 0x7733283F,
+ 0xEAE41086, 0x525877E3, 0x40EDD80D, 0xF851BF68,
+ 0xF02BF8A1, 0x48979FC4, 0x5A22302A, 0xE29E574F,
+ 0x7F496FF6, 0xC7F50893, 0xD540A77D, 0x6DFCC018,
+ 0x359FD04E, 0x8D23B72B, 0x9F9618C5, 0x272A7FA0,
+ 0xBAFD4719, 0x0241207C, 0x10F48F92, 0xA848E8F7,
+ 0x9B14583D, 0x23A83F58, 0x311D90B6, 0x89A1F7D3,
+ 0x1476CF6A, 0xACCAA80F, 0xBE7F07E1, 0x06C36084,
+ 0x5EA070D2, 0xE61C17B7, 0xF4A9B859, 0x4C15DF3C,
+ 0xD1C2E785, 0x697E80E0, 0x7BCB2F0E, 0xC377486B,
+ 0xCB0D0FA2, 0x73B168C7, 0x6104C729, 0xD9B8A04C,
+ 0x446F98F5, 0xFCD3FF90, 0xEE66507E, 0x56DA371B,
+ 0x0EB9274D, 0xB6054028, 0xA4B0EFC6, 0x1C0C88A3,
+ 0x81DBB01A, 0x3967D77F, 0x2BD27891, 0x936E1FF4,
+ 0x3B26F703, 0x839A9066, 0x912F3F88, 0x299358ED,
+ 0xB4446054, 0x0CF80731, 0x1E4DA8DF, 0xA6F1CFBA,
+ 0xFE92DFEC, 0x462EB889, 0x549B1767, 0xEC277002,
+ 0x71F048BB, 0xC94C2FDE, 0xDBF98030, 0x6345E755,
+ 0x6B3FA09C, 0xD383C7F9, 0xC1366817, 0x798A0F72,
+ 0xE45D37CB, 0x5CE150AE, 0x4E54FF40, 0xF6E89825,
+ 0xAE8B8873, 0x1637EF16, 0x048240F8, 0xBC3E279D,
+ 0x21E91F24, 0x99557841, 0x8BE0D7AF, 0x335CB0CA,
+ 0xED59B63B, 0x55E5D15E, 0x47507EB0, 0xFFEC19D5,
+ 0x623B216C, 0xDA874609, 0xC832E9E7, 0x708E8E82,
+ 0x28ED9ED4, 0x9051F9B1, 0x82E4565F, 0x3A58313A,
+ 0xA78F0983, 0x1F336EE6, 0x0D86C108, 0xB53AA66D,
+ 0xBD40E1A4, 0x05FC86C1, 0x1749292F, 0xAFF54E4A,
+ 0x322276F3, 0x8A9E1196, 0x982BBE78, 0x2097D91D,
+ 0x78F4C94B, 0xC048AE2E, 0xD2FD01C0, 0x6A4166A5,
+ 0xF7965E1C, 0x4F2A3979, 0x5D9F9697, 0xE523F1F2,
+ 0x4D6B1905, 0xF5D77E60, 0xE762D18E, 0x5FDEB6EB,
+ 0xC2098E52, 0x7AB5E937, 0x680046D9, 0xD0BC21BC,
+ 0x88DF31EA, 0x3063568F, 0x22D6F961, 0x9A6A9E04,
+ 0x07BDA6BD, 0xBF01C1D8, 0xADB46E36, 0x15080953,
+ 0x1D724E9A, 0xA5CE29FF, 0xB77B8611, 0x0FC7E174,
+ 0x9210D9CD, 0x2AACBEA8, 0x38191146, 0x80A57623,
+ 0xD8C66675, 0x607A0110, 0x72CFAEFE, 0xCA73C99B,
+ 0x57A4F122, 0xEF189647, 0xFDAD39A9, 0x45115ECC,
+ 0x764DEE06, 0xCEF18963, 0xDC44268D, 0x64F841E8,
+ 0xF92F7951, 0x41931E34, 0x5326B1DA, 0xEB9AD6BF,
+ 0xB3F9C6E9, 0x0B45A18C, 0x19F00E62, 0xA14C6907,
+ 0x3C9B51BE, 0x842736DB, 0x96929935, 0x2E2EFE50,
+ 0x2654B999, 0x9EE8DEFC, 0x8C5D7112, 0x34E11677,
+ 0xA9362ECE, 0x118A49AB, 0x033FE645, 0xBB838120,
+ 0xE3E09176, 0x5B5CF613, 0x49E959FD, 0xF1553E98,
+ 0x6C820621, 0xD43E6144, 0xC68BCEAA, 0x7E37A9CF,
+ 0xD67F4138, 0x6EC3265D, 0x7C7689B3, 0xC4CAEED6,
+ 0x591DD66F, 0xE1A1B10A, 0xF3141EE4, 0x4BA87981,
+ 0x13CB69D7, 0xAB770EB2, 0xB9C2A15C, 0x017EC639,
+ 0x9CA9FE80, 0x241599E5, 0x36A0360B, 0x8E1C516E,
+ 0x866616A7, 0x3EDA71C2, 0x2C6FDE2C, 0x94D3B949,
+ 0x090481F0, 0xB1B8E695, 0xA30D497B, 0x1BB12E1E,
+ 0x43D23E48, 0xFB6E592D, 0xE9DBF6C3, 0x516791A6,
+ 0xCCB0A91F, 0x740CCE7A, 0x66B96194, 0xDE0506F1
+ }, {
+ 0x00000000, 0x3D6029B0, 0x7AC05360, 0x47A07AD0,
+ 0xF580A6C0, 0xC8E08F70, 0x8F40F5A0, 0xB220DC10,
+ 0x30704BC1, 0x0D106271, 0x4AB018A1, 0x77D03111,
+ 0xC5F0ED01, 0xF890C4B1, 0xBF30BE61, 0x825097D1,
+ 0x60E09782, 0x5D80BE32, 0x1A20C4E2, 0x2740ED52,
+ 0x95603142, 0xA80018F2, 0xEFA06222, 0xD2C04B92,
+ 0x5090DC43, 0x6DF0F5F3, 0x2A508F23, 0x1730A693,
+ 0xA5107A83, 0x98705333, 0xDFD029E3, 0xE2B00053,
+ 0xC1C12F04, 0xFCA106B4, 0xBB017C64, 0x866155D4,
+ 0x344189C4, 0x0921A074, 0x4E81DAA4, 0x73E1F314,
+ 0xF1B164C5, 0xCCD14D75, 0x8B7137A5, 0xB6111E15,
+ 0x0431C205, 0x3951EBB5, 0x7EF19165, 0x4391B8D5,
+ 0xA121B886, 0x9C419136, 0xDBE1EBE6, 0xE681C256,
+ 0x54A11E46, 0x69C137F6, 0x2E614D26, 0x13016496,
+ 0x9151F347, 0xAC31DAF7, 0xEB91A027, 0xD6F18997,
+ 0x64D15587, 0x59B17C37, 0x1E1106E7, 0x23712F57,
+ 0x58F35849, 0x659371F9, 0x22330B29, 0x1F532299,
+ 0xAD73FE89, 0x9013D739, 0xD7B3ADE9, 0xEAD38459,
+ 0x68831388, 0x55E33A38, 0x124340E8, 0x2F236958,
+ 0x9D03B548, 0xA0639CF8, 0xE7C3E628, 0xDAA3CF98,
+ 0x3813CFCB, 0x0573E67B, 0x42D39CAB, 0x7FB3B51B,
+ 0xCD93690B, 0xF0F340BB, 0xB7533A6B, 0x8A3313DB,
+ 0x0863840A, 0x3503ADBA, 0x72A3D76A, 0x4FC3FEDA,
+ 0xFDE322CA, 0xC0830B7A, 0x872371AA, 0xBA43581A,
+ 0x9932774D, 0xA4525EFD, 0xE3F2242D, 0xDE920D9D,
+ 0x6CB2D18D, 0x51D2F83D, 0x167282ED, 0x2B12AB5D,
+ 0xA9423C8C, 0x9422153C, 0xD3826FEC, 0xEEE2465C,
+ 0x5CC29A4C, 0x61A2B3FC, 0x2602C92C, 0x1B62E09C,
+ 0xF9D2E0CF, 0xC4B2C97F, 0x8312B3AF, 0xBE729A1F,
+ 0x0C52460F, 0x31326FBF, 0x7692156F, 0x4BF23CDF,
+ 0xC9A2AB0E, 0xF4C282BE, 0xB362F86E, 0x8E02D1DE,
+ 0x3C220DCE, 0x0142247E, 0x46E25EAE, 0x7B82771E,
+ 0xB1E6B092, 0x8C869922, 0xCB26E3F2, 0xF646CA42,
+ 0x44661652, 0x79063FE2, 0x3EA64532, 0x03C66C82,
+ 0x8196FB53, 0xBCF6D2E3, 0xFB56A833, 0xC6368183,
+ 0x74165D93, 0x49767423, 0x0ED60EF3, 0x33B62743,
+ 0xD1062710, 0xEC660EA0, 0xABC67470, 0x96A65DC0,
+ 0x248681D0, 0x19E6A860, 0x5E46D2B0, 0x6326FB00,
+ 0xE1766CD1, 0xDC164561, 0x9BB63FB1, 0xA6D61601,
+ 0x14F6CA11, 0x2996E3A1, 0x6E369971, 0x5356B0C1,
+ 0x70279F96, 0x4D47B626, 0x0AE7CCF6, 0x3787E546,
+ 0x85A73956, 0xB8C710E6, 0xFF676A36, 0xC2074386,
+ 0x4057D457, 0x7D37FDE7, 0x3A978737, 0x07F7AE87,
+ 0xB5D77297, 0x88B75B27, 0xCF1721F7, 0xF2770847,
+ 0x10C70814, 0x2DA721A4, 0x6A075B74, 0x576772C4,
+ 0xE547AED4, 0xD8278764, 0x9F87FDB4, 0xA2E7D404,
+ 0x20B743D5, 0x1DD76A65, 0x5A7710B5, 0x67173905,
+ 0xD537E515, 0xE857CCA5, 0xAFF7B675, 0x92979FC5,
+ 0xE915E8DB, 0xD475C16B, 0x93D5BBBB, 0xAEB5920B,
+ 0x1C954E1B, 0x21F567AB, 0x66551D7B, 0x5B3534CB,
+ 0xD965A31A, 0xE4058AAA, 0xA3A5F07A, 0x9EC5D9CA,
+ 0x2CE505DA, 0x11852C6A, 0x562556BA, 0x6B457F0A,
+ 0x89F57F59, 0xB49556E9, 0xF3352C39, 0xCE550589,
+ 0x7C75D999, 0x4115F029, 0x06B58AF9, 0x3BD5A349,
+ 0xB9853498, 0x84E51D28, 0xC34567F8, 0xFE254E48,
+ 0x4C059258, 0x7165BBE8, 0x36C5C138, 0x0BA5E888,
+ 0x28D4C7DF, 0x15B4EE6F, 0x521494BF, 0x6F74BD0F,
+ 0xDD54611F, 0xE03448AF, 0xA794327F, 0x9AF41BCF,
+ 0x18A48C1E, 0x25C4A5AE, 0x6264DF7E, 0x5F04F6CE,
+ 0xED242ADE, 0xD044036E, 0x97E479BE, 0xAA84500E,
+ 0x4834505D, 0x755479ED, 0x32F4033D, 0x0F942A8D,
+ 0xBDB4F69D, 0x80D4DF2D, 0xC774A5FD, 0xFA148C4D,
+ 0x78441B9C, 0x4524322C, 0x028448FC, 0x3FE4614C,
+ 0x8DC4BD5C, 0xB0A494EC, 0xF704EE3C, 0xCA64C78C
+ }, {
+ 0x00000000, 0xCB5CD3A5, 0x4DC8A10B, 0x869472AE,
+ 0x9B914216, 0x50CD91B3, 0xD659E31D, 0x1D0530B8,
+ 0xEC53826D, 0x270F51C8, 0xA19B2366, 0x6AC7F0C3,
+ 0x77C2C07B, 0xBC9E13DE, 0x3A0A6170, 0xF156B2D5,
+ 0x03D6029B, 0xC88AD13E, 0x4E1EA390, 0x85427035,
+ 0x9847408D, 0x531B9328, 0xD58FE186, 0x1ED33223,
+ 0xEF8580F6, 0x24D95353, 0xA24D21FD, 0x6911F258,
+ 0x7414C2E0, 0xBF481145, 0x39DC63EB, 0xF280B04E,
+ 0x07AC0536, 0xCCF0D693, 0x4A64A43D, 0x81387798,
+ 0x9C3D4720, 0x57619485, 0xD1F5E62B, 0x1AA9358E,
+ 0xEBFF875B, 0x20A354FE, 0xA6372650, 0x6D6BF5F5,
+ 0x706EC54D, 0xBB3216E8, 0x3DA66446, 0xF6FAB7E3,
+ 0x047A07AD, 0xCF26D408, 0x49B2A6A6, 0x82EE7503,
+ 0x9FEB45BB, 0x54B7961E, 0xD223E4B0, 0x197F3715,
+ 0xE82985C0, 0x23755665, 0xA5E124CB, 0x6EBDF76E,
+ 0x73B8C7D6, 0xB8E41473, 0x3E7066DD, 0xF52CB578,
+ 0x0F580A6C, 0xC404D9C9, 0x4290AB67, 0x89CC78C2,
+ 0x94C9487A, 0x5F959BDF, 0xD901E971, 0x125D3AD4,
+ 0xE30B8801, 0x28575BA4, 0xAEC3290A, 0x659FFAAF,
+ 0x789ACA17, 0xB3C619B2, 0x35526B1C, 0xFE0EB8B9,
+ 0x0C8E08F7, 0xC7D2DB52, 0x4146A9FC, 0x8A1A7A59,
+ 0x971F4AE1, 0x5C439944, 0xDAD7EBEA, 0x118B384F,
+ 0xE0DD8A9A, 0x2B81593F, 0xAD152B91, 0x6649F834,
+ 0x7B4CC88C, 0xB0101B29, 0x36846987, 0xFDD8BA22,
+ 0x08F40F5A, 0xC3A8DCFF, 0x453CAE51, 0x8E607DF4,
+ 0x93654D4C, 0x58399EE9, 0xDEADEC47, 0x15F13FE2,
+ 0xE4A78D37, 0x2FFB5E92, 0xA96F2C3C, 0x6233FF99,
+ 0x7F36CF21, 0xB46A1C84, 0x32FE6E2A, 0xF9A2BD8F,
+ 0x0B220DC1, 0xC07EDE64, 0x46EAACCA, 0x8DB67F6F,
+ 0x90B34FD7, 0x5BEF9C72, 0xDD7BEEDC, 0x16273D79,
+ 0xE7718FAC, 0x2C2D5C09, 0xAAB92EA7, 0x61E5FD02,
+ 0x7CE0CDBA, 0xB7BC1E1F, 0x31286CB1, 0xFA74BF14,
+ 0x1EB014D8, 0xD5ECC77D, 0x5378B5D3, 0x98246676,
+ 0x852156CE, 0x4E7D856B, 0xC8E9F7C5, 0x03B52460,
+ 0xF2E396B5, 0x39BF4510, 0xBF2B37BE, 0x7477E41B,
+ 0x6972D4A3, 0xA22E0706, 0x24BA75A8, 0xEFE6A60D,
+ 0x1D661643, 0xD63AC5E6, 0x50AEB748, 0x9BF264ED,
+ 0x86F75455, 0x4DAB87F0, 0xCB3FF55E, 0x006326FB,
+ 0xF135942E, 0x3A69478B, 0xBCFD3525, 0x77A1E680,
+ 0x6AA4D638, 0xA1F8059D, 0x276C7733, 0xEC30A496,
+ 0x191C11EE, 0xD240C24B, 0x54D4B0E5, 0x9F886340,
+ 0x828D53F8, 0x49D1805D, 0xCF45F2F3, 0x04192156,
+ 0xF54F9383, 0x3E134026, 0xB8873288, 0x73DBE12D,
+ 0x6EDED195, 0xA5820230, 0x2316709E, 0xE84AA33B,
+ 0x1ACA1375, 0xD196C0D0, 0x5702B27E, 0x9C5E61DB,
+ 0x815B5163, 0x4A0782C6, 0xCC93F068, 0x07CF23CD,
+ 0xF6999118, 0x3DC542BD, 0xBB513013, 0x700DE3B6,
+ 0x6D08D30E, 0xA65400AB, 0x20C07205, 0xEB9CA1A0,
+ 0x11E81EB4, 0xDAB4CD11, 0x5C20BFBF, 0x977C6C1A,
+ 0x8A795CA2, 0x41258F07, 0xC7B1FDA9, 0x0CED2E0C,
+ 0xFDBB9CD9, 0x36E74F7C, 0xB0733DD2, 0x7B2FEE77,
+ 0x662ADECF, 0xAD760D6A, 0x2BE27FC4, 0xE0BEAC61,
+ 0x123E1C2F, 0xD962CF8A, 0x5FF6BD24, 0x94AA6E81,
+ 0x89AF5E39, 0x42F38D9C, 0xC467FF32, 0x0F3B2C97,
+ 0xFE6D9E42, 0x35314DE7, 0xB3A53F49, 0x78F9ECEC,
+ 0x65FCDC54, 0xAEA00FF1, 0x28347D5F, 0xE368AEFA,
+ 0x16441B82, 0xDD18C827, 0x5B8CBA89, 0x90D0692C,
+ 0x8DD55994, 0x46898A31, 0xC01DF89F, 0x0B412B3A,
+ 0xFA1799EF, 0x314B4A4A, 0xB7DF38E4, 0x7C83EB41,
+ 0x6186DBF9, 0xAADA085C, 0x2C4E7AF2, 0xE712A957,
+ 0x15921919, 0xDECECABC, 0x585AB812, 0x93066BB7,
+ 0x8E035B0F, 0x455F88AA, 0xC3CBFA04, 0x089729A1,
+ 0xF9C19B74, 0x329D48D1, 0xB4093A7F, 0x7F55E9DA,
+ 0x6250D962, 0xA90C0AC7, 0x2F987869, 0xE4C4ABCC
+ }, {
+ 0x00000000, 0xA6770BB4, 0x979F1129, 0x31E81A9D,
+ 0xF44F2413, 0x52382FA7, 0x63D0353A, 0xC5A73E8E,
+ 0x33EF4E67, 0x959845D3, 0xA4705F4E, 0x020754FA,
+ 0xC7A06A74, 0x61D761C0, 0x503F7B5D, 0xF64870E9,
+ 0x67DE9CCE, 0xC1A9977A, 0xF0418DE7, 0x56368653,
+ 0x9391B8DD, 0x35E6B369, 0x040EA9F4, 0xA279A240,
+ 0x5431D2A9, 0xF246D91D, 0xC3AEC380, 0x65D9C834,
+ 0xA07EF6BA, 0x0609FD0E, 0x37E1E793, 0x9196EC27,
+ 0xCFBD399C, 0x69CA3228, 0x582228B5, 0xFE552301,
+ 0x3BF21D8F, 0x9D85163B, 0xAC6D0CA6, 0x0A1A0712,
+ 0xFC5277FB, 0x5A257C4F, 0x6BCD66D2, 0xCDBA6D66,
+ 0x081D53E8, 0xAE6A585C, 0x9F8242C1, 0x39F54975,
+ 0xA863A552, 0x0E14AEE6, 0x3FFCB47B, 0x998BBFCF,
+ 0x5C2C8141, 0xFA5B8AF5, 0xCBB39068, 0x6DC49BDC,
+ 0x9B8CEB35, 0x3DFBE081, 0x0C13FA1C, 0xAA64F1A8,
+ 0x6FC3CF26, 0xC9B4C492, 0xF85CDE0F, 0x5E2BD5BB,
+ 0x440B7579, 0xE27C7ECD, 0xD3946450, 0x75E36FE4,
+ 0xB044516A, 0x16335ADE, 0x27DB4043, 0x81AC4BF7,
+ 0x77E43B1E, 0xD19330AA, 0xE07B2A37, 0x460C2183,
+ 0x83AB1F0D, 0x25DC14B9, 0x14340E24, 0xB2430590,
+ 0x23D5E9B7, 0x85A2E203, 0xB44AF89E, 0x123DF32A,
+ 0xD79ACDA4, 0x71EDC610, 0x4005DC8D, 0xE672D739,
+ 0x103AA7D0, 0xB64DAC64, 0x87A5B6F9, 0x21D2BD4D,
+ 0xE47583C3, 0x42028877, 0x73EA92EA, 0xD59D995E,
+ 0x8BB64CE5, 0x2DC14751, 0x1C295DCC, 0xBA5E5678,
+ 0x7FF968F6, 0xD98E6342, 0xE86679DF, 0x4E11726B,
+ 0xB8590282, 0x1E2E0936, 0x2FC613AB, 0x89B1181F,
+ 0x4C162691, 0xEA612D25, 0xDB8937B8, 0x7DFE3C0C,
+ 0xEC68D02B, 0x4A1FDB9F, 0x7BF7C102, 0xDD80CAB6,
+ 0x1827F438, 0xBE50FF8C, 0x8FB8E511, 0x29CFEEA5,
+ 0xDF879E4C, 0x79F095F8, 0x48188F65, 0xEE6F84D1,
+ 0x2BC8BA5F, 0x8DBFB1EB, 0xBC57AB76, 0x1A20A0C2,
+ 0x8816EAF2, 0x2E61E146, 0x1F89FBDB, 0xB9FEF06F,
+ 0x7C59CEE1, 0xDA2EC555, 0xEBC6DFC8, 0x4DB1D47C,
+ 0xBBF9A495, 0x1D8EAF21, 0x2C66B5BC, 0x8A11BE08,
+ 0x4FB68086, 0xE9C18B32, 0xD82991AF, 0x7E5E9A1B,
+ 0xEFC8763C, 0x49BF7D88, 0x78576715, 0xDE206CA1,
+ 0x1B87522F, 0xBDF0599B, 0x8C184306, 0x2A6F48B2,
+ 0xDC27385B, 0x7A5033EF, 0x4BB82972, 0xEDCF22C6,
+ 0x28681C48, 0x8E1F17FC, 0xBFF70D61, 0x198006D5,
+ 0x47ABD36E, 0xE1DCD8DA, 0xD034C247, 0x7643C9F3,
+ 0xB3E4F77D, 0x1593FCC9, 0x247BE654, 0x820CEDE0,
+ 0x74449D09, 0xD23396BD, 0xE3DB8C20, 0x45AC8794,
+ 0x800BB91A, 0x267CB2AE, 0x1794A833, 0xB1E3A387,
+ 0x20754FA0, 0x86024414, 0xB7EA5E89, 0x119D553D,
+ 0xD43A6BB3, 0x724D6007, 0x43A57A9A, 0xE5D2712E,
+ 0x139A01C7, 0xB5ED0A73, 0x840510EE, 0x22721B5A,
+ 0xE7D525D4, 0x41A22E60, 0x704A34FD, 0xD63D3F49,
+ 0xCC1D9F8B, 0x6A6A943F, 0x5B828EA2, 0xFDF58516,
+ 0x3852BB98, 0x9E25B02C, 0xAFCDAAB1, 0x09BAA105,
+ 0xFFF2D1EC, 0x5985DA58, 0x686DC0C5, 0xCE1ACB71,
+ 0x0BBDF5FF, 0xADCAFE4B, 0x9C22E4D6, 0x3A55EF62,
+ 0xABC30345, 0x0DB408F1, 0x3C5C126C, 0x9A2B19D8,
+ 0x5F8C2756, 0xF9FB2CE2, 0xC813367F, 0x6E643DCB,
+ 0x982C4D22, 0x3E5B4696, 0x0FB35C0B, 0xA9C457BF,
+ 0x6C636931, 0xCA146285, 0xFBFC7818, 0x5D8B73AC,
+ 0x03A0A617, 0xA5D7ADA3, 0x943FB73E, 0x3248BC8A,
+ 0xF7EF8204, 0x519889B0, 0x6070932D, 0xC6079899,
+ 0x304FE870, 0x9638E3C4, 0xA7D0F959, 0x01A7F2ED,
+ 0xC400CC63, 0x6277C7D7, 0x539FDD4A, 0xF5E8D6FE,
+ 0x647E3AD9, 0xC209316D, 0xF3E12BF0, 0x55962044,
+ 0x90311ECA, 0x3646157E, 0x07AE0FE3, 0xA1D90457,
+ 0x579174BE, 0xF1E67F0A, 0xC00E6597, 0x66796E23,
+ 0xA3DE50AD, 0x05A95B19, 0x34414184, 0x92364A30
+ }, {
+ 0x00000000, 0xCCAA009E, 0x4225077D, 0x8E8F07E3,
+ 0x844A0EFA, 0x48E00E64, 0xC66F0987, 0x0AC50919,
+ 0xD3E51BB5, 0x1F4F1B2B, 0x91C01CC8, 0x5D6A1C56,
+ 0x57AF154F, 0x9B0515D1, 0x158A1232, 0xD92012AC,
+ 0x7CBB312B, 0xB01131B5, 0x3E9E3656, 0xF23436C8,
+ 0xF8F13FD1, 0x345B3F4F, 0xBAD438AC, 0x767E3832,
+ 0xAF5E2A9E, 0x63F42A00, 0xED7B2DE3, 0x21D12D7D,
+ 0x2B142464, 0xE7BE24FA, 0x69312319, 0xA59B2387,
+ 0xF9766256, 0x35DC62C8, 0xBB53652B, 0x77F965B5,
+ 0x7D3C6CAC, 0xB1966C32, 0x3F196BD1, 0xF3B36B4F,
+ 0x2A9379E3, 0xE639797D, 0x68B67E9E, 0xA41C7E00,
+ 0xAED97719, 0x62737787, 0xECFC7064, 0x205670FA,
+ 0x85CD537D, 0x496753E3, 0xC7E85400, 0x0B42549E,
+ 0x01875D87, 0xCD2D5D19, 0x43A25AFA, 0x8F085A64,
+ 0x562848C8, 0x9A824856, 0x140D4FB5, 0xD8A74F2B,
+ 0xD2624632, 0x1EC846AC, 0x9047414F, 0x5CED41D1,
+ 0x299DC2ED, 0xE537C273, 0x6BB8C590, 0xA712C50E,
+ 0xADD7CC17, 0x617DCC89, 0xEFF2CB6A, 0x2358CBF4,
+ 0xFA78D958, 0x36D2D9C6, 0xB85DDE25, 0x74F7DEBB,
+ 0x7E32D7A2, 0xB298D73C, 0x3C17D0DF, 0xF0BDD041,
+ 0x5526F3C6, 0x998CF358, 0x1703F4BB, 0xDBA9F425,
+ 0xD16CFD3C, 0x1DC6FDA2, 0x9349FA41, 0x5FE3FADF,
+ 0x86C3E873, 0x4A69E8ED, 0xC4E6EF0E, 0x084CEF90,
+ 0x0289E689, 0xCE23E617, 0x40ACE1F4, 0x8C06E16A,
+ 0xD0EBA0BB, 0x1C41A025, 0x92CEA7C6, 0x5E64A758,
+ 0x54A1AE41, 0x980BAEDF, 0x1684A93C, 0xDA2EA9A2,
+ 0x030EBB0E, 0xCFA4BB90, 0x412BBC73, 0x8D81BCED,
+ 0x8744B5F4, 0x4BEEB56A, 0xC561B289, 0x09CBB217,
+ 0xAC509190, 0x60FA910E, 0xEE7596ED, 0x22DF9673,
+ 0x281A9F6A, 0xE4B09FF4, 0x6A3F9817, 0xA6959889,
+ 0x7FB58A25, 0xB31F8ABB, 0x3D908D58, 0xF13A8DC6,
+ 0xFBFF84DF, 0x37558441, 0xB9DA83A2, 0x7570833C,
+ 0x533B85DA, 0x9F918544, 0x111E82A7, 0xDDB48239,
+ 0xD7718B20, 0x1BDB8BBE, 0x95548C5D, 0x59FE8CC3,
+ 0x80DE9E6F, 0x4C749EF1, 0xC2FB9912, 0x0E51998C,
+ 0x04949095, 0xC83E900B, 0x46B197E8, 0x8A1B9776,
+ 0x2F80B4F1, 0xE32AB46F, 0x6DA5B38C, 0xA10FB312,
+ 0xABCABA0B, 0x6760BA95, 0xE9EFBD76, 0x2545BDE8,
+ 0xFC65AF44, 0x30CFAFDA, 0xBE40A839, 0x72EAA8A7,
+ 0x782FA1BE, 0xB485A120, 0x3A0AA6C3, 0xF6A0A65D,
+ 0xAA4DE78C, 0x66E7E712, 0xE868E0F1, 0x24C2E06F,
+ 0x2E07E976, 0xE2ADE9E8, 0x6C22EE0B, 0xA088EE95,
+ 0x79A8FC39, 0xB502FCA7, 0x3B8DFB44, 0xF727FBDA,
+ 0xFDE2F2C3, 0x3148F25D, 0xBFC7F5BE, 0x736DF520,
+ 0xD6F6D6A7, 0x1A5CD639, 0x94D3D1DA, 0x5879D144,
+ 0x52BCD85D, 0x9E16D8C3, 0x1099DF20, 0xDC33DFBE,
+ 0x0513CD12, 0xC9B9CD8C, 0x4736CA6F, 0x8B9CCAF1,
+ 0x8159C3E8, 0x4DF3C376, 0xC37CC495, 0x0FD6C40B,
+ 0x7AA64737, 0xB60C47A9, 0x3883404A, 0xF42940D4,
+ 0xFEEC49CD, 0x32464953, 0xBCC94EB0, 0x70634E2E,
+ 0xA9435C82, 0x65E95C1C, 0xEB665BFF, 0x27CC5B61,
+ 0x2D095278, 0xE1A352E6, 0x6F2C5505, 0xA386559B,
+ 0x061D761C, 0xCAB77682, 0x44387161, 0x889271FF,
+ 0x825778E6, 0x4EFD7878, 0xC0727F9B, 0x0CD87F05,
+ 0xD5F86DA9, 0x19526D37, 0x97DD6AD4, 0x5B776A4A,
+ 0x51B26353, 0x9D1863CD, 0x1397642E, 0xDF3D64B0,
+ 0x83D02561, 0x4F7A25FF, 0xC1F5221C, 0x0D5F2282,
+ 0x079A2B9B, 0xCB302B05, 0x45BF2CE6, 0x89152C78,
+ 0x50353ED4, 0x9C9F3E4A, 0x121039A9, 0xDEBA3937,
+ 0xD47F302E, 0x18D530B0, 0x965A3753, 0x5AF037CD,
+ 0xFF6B144A, 0x33C114D4, 0xBD4E1337, 0x71E413A9,
+ 0x7B211AB0, 0xB78B1A2E, 0x39041DCD, 0xF5AE1D53,
+ 0x2C8E0FFF, 0xE0240F61, 0x6EAB0882, 0xA201081C,
+ 0xA8C40105, 0x646E019B, 0xEAE10678, 0x264B06E6
+ }
+};
diff --git a/src/liblzma/check/crc32_tablegen.c b/src/liblzma/check/crc32_tablegen.c
new file mode 100644
index 0000000..31a4d27
--- /dev/null
+++ b/src/liblzma/check/crc32_tablegen.c
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc32_tablegen.c
+/// \brief Generate crc32_table_le.h and crc32_table_be.h
+///
+/// Compiling: gcc -std=c99 -o crc32_tablegen crc32_tablegen.c
+/// Add -DWORDS_BIGENDIAN to generate big endian table.
+/// Add -DLZ_HASH_TABLE to generate lz_encoder_hash_table.h (little endian).
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdio.h>
+#include "../../common/tuklib_integer.h"
+
+
+static uint32_t crc32_table[8][256];
+
+
+static void
+init_crc32_table(void)
+{
+ static const uint32_t poly32 = UINT32_C(0xEDB88320);
+
+ for (size_t s = 0; s < 8; ++s) {
+ for (size_t b = 0; b < 256; ++b) {
+ uint32_t r = s == 0 ? b : crc32_table[s - 1][b];
+
+ for (size_t i = 0; i < 8; ++i) {
+ if (r & 1)
+ r = (r >> 1) ^ poly32;
+ else
+ r >>= 1;
+ }
+
+ crc32_table[s][b] = r;
+ }
+ }
+
+#ifdef WORDS_BIGENDIAN
+ for (size_t s = 0; s < 8; ++s)
+ for (size_t b = 0; b < 256; ++b)
+ crc32_table[s][b] = bswap32(crc32_table[s][b]);
+#endif
+
+ return;
+}
+
+
+static void
+print_crc32_table(void)
+{
+ printf("/* This file has been automatically generated by "
+ "crc32_tablegen.c. */\n\n"
+ "const uint32_t lzma_crc32_table[8][256] = {\n\t{");
+
+ for (size_t s = 0; s < 8; ++s) {
+ for (size_t b = 0; b < 256; ++b) {
+ if ((b % 4) == 0)
+ printf("\n\t\t");
+
+ printf("0x%08" PRIX32, crc32_table[s][b]);
+
+ if (b != 255)
+ printf(",%s", (b+1) % 4 == 0 ? "" : " ");
+ }
+
+ if (s == 7)
+ printf("\n\t}\n};\n");
+ else
+ printf("\n\t}, {");
+ }
+
+ return;
+}
+
+
+static void
+print_lz_table(void)
+{
+ printf("/* This file has been automatically generated by "
+ "crc32_tablegen.c. */\n\n"
+ "const uint32_t lzma_lz_hash_table[256] = {");
+
+ for (size_t b = 0; b < 256; ++b) {
+ if ((b % 4) == 0)
+ printf("\n\t");
+
+ printf("0x%08" PRIX32, crc32_table[0][b]);
+
+ if (b != 255)
+ printf(",%s", (b+1) % 4 == 0 ? "" : " ");
+ }
+
+ printf("\n};\n");
+
+ return;
+}
+
+
+int
+main(void)
+{
+ init_crc32_table();
+
+#ifdef LZ_HASH_TABLE
+ print_lz_table();
+#else
+ print_crc32_table();
+#endif
+
+ return 0;
+}
diff --git a/src/liblzma/check/crc32_x86.S b/src/liblzma/check/crc32_x86.S
new file mode 100644
index 0000000..4f395df
--- /dev/null
+++ b/src/liblzma/check/crc32_x86.S
@@ -0,0 +1,313 @@
+/*
+ * Speed-optimized CRC32 using slicing-by-eight algorithm
+ *
+ * This uses only i386 instructions, but it is optimized for i686 and later
+ * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2). For i586
+ * (e.g. Pentium), slicing-by-four would be better, and even the C version
+ * of slicing-by-eight built with gcc -march=i586 tends to be a little bit
+ * better than this. Very few probably run this code on i586 or older x86
+ * so this shouldn't be a problem in practice.
+ *
+ * Authors: Igor Pavlov (original version)
+ * Lasse Collin (AT&T syntax, PIC support, better portability)
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * This code needs lzma_crc32_table, which can be created using the
+ * following C code:
+
+uint32_t lzma_crc32_table[8][256];
+
+void
+init_table(void)
+{
+ // IEEE-802.3
+ static const uint32_t poly32 = UINT32_C(0xEDB88320);
+
+ // Castagnoli
+ // static const uint32_t poly32 = UINT32_C(0x82F63B78);
+
+ // Koopman
+ // static const uint32_t poly32 = UINT32_C(0xEB31D82E);
+
+ for (size_t s = 0; s < 8; ++s) {
+ for (size_t b = 0; b < 256; ++b) {
+ uint32_t r = s == 0 ? b : lzma_crc32_table[s - 1][b];
+
+ for (size_t i = 0; i < 8; ++i) {
+ if (r & 1)
+ r = (r >> 1) ^ poly32;
+ else
+ r >>= 1;
+ }
+
+ lzma_crc32_table[s][b] = r;
+ }
+ }
+}
+
+ * The prototype of the CRC32 function:
+ * extern uint32_t lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc);
+ */
+
+/* When Intel CET is enabled, include <cet.h> in assembly code to mark
+ Intel CET support. */
+#ifdef __CET__
+# include <cet.h>
+#else
+# define _CET_ENDBR
+#endif
+
+/*
+ * On some systems, the functions need to be prefixed. The prefix is
+ * usually an underscore.
+ */
+#ifndef __USER_LABEL_PREFIX__
+# define __USER_LABEL_PREFIX__
+#endif
+#define MAKE_SYM_CAT(prefix, sym) prefix ## sym
+#define MAKE_SYM(prefix, sym) MAKE_SYM_CAT(prefix, sym)
+#define LZMA_CRC32 MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc32)
+#define LZMA_CRC32_TABLE MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc32_table)
+
+/*
+ * Solaris assembler doesn't have .p2align, and Darwin uses .align
+ * differently than GNU/Linux and Solaris.
+ */
+#if defined(__APPLE__) || defined(__MSDOS__)
+# define ALIGN(pow2, abs) .align pow2
+#else
+# define ALIGN(pow2, abs) .align abs
+#endif
+
+ .text
+ .globl LZMA_CRC32
+
+#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) \
+ && !defined(__MSDOS__)
+ .type LZMA_CRC32, @function
+#endif
+
+ ALIGN(4, 16)
+LZMA_CRC32:
+ _CET_ENDBR
+ /*
+ * Register usage:
+ * %eax crc
+ * %esi buf
+ * %edi size or buf + size
+ * %ebx lzma_crc32_table
+ * %ebp Table index
+ * %ecx Temporary
+ * %edx Temporary
+ */
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+ pushl %ebp
+ movl 0x14(%esp), %esi /* buf */
+ movl 0x18(%esp), %edi /* size */
+ movl 0x1C(%esp), %eax /* crc */
+
+ /*
+ * Store the address of lzma_crc32_table to %ebx. This is needed to
+ * get position-independent code (PIC).
+ *
+ * The PIC macro is defined by libtool, while __PIC__ is defined
+ * by GCC but only on some systems. Testing for both makes it simpler
+ * to test this code without libtool, and keeps the code working also
+ * when built with libtool but using something else than GCC.
+ *
+ * I understood that libtool may define PIC on Windows even though
+ * the code in Windows DLLs is not PIC in sense that it is in ELF
+ * binaries, so we need a separate check to always use the non-PIC
+ * code on Windows.
+ */
+#if (!defined(PIC) && !defined(__PIC__)) \
+ || (defined(_WIN32) || defined(__CYGWIN__))
+ /* Not PIC */
+ movl $ LZMA_CRC32_TABLE, %ebx
+#elif defined(__APPLE__)
+ /* Mach-O */
+ call .L_get_pc
+.L_pic:
+ leal .L_lzma_crc32_table$non_lazy_ptr-.L_pic(%ebx), %ebx
+ movl (%ebx), %ebx
+#else
+ /* ELF */
+ call .L_get_pc
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ movl LZMA_CRC32_TABLE@GOT(%ebx), %ebx
+#endif
+
+ /* Complement the initial value. */
+ notl %eax
+
+ ALIGN(4, 16)
+.L_align:
+ /*
+ * Check if there is enough input to use slicing-by-eight.
+ * We need 16 bytes, because the loop pre-reads eight bytes.
+ */
+ cmpl $16, %edi
+ jb .L_rest
+
+ /* Check if we have reached alignment of eight bytes. */
+ testl $7, %esi
+ jz .L_slice
+
+ /* Calculate CRC of the next input byte. */
+ movzbl (%esi), %ebp
+ incl %esi
+ movzbl %al, %ecx
+ xorl %ecx, %ebp
+ shrl $8, %eax
+ xorl (%ebx, %ebp, 4), %eax
+ decl %edi
+ jmp .L_align
+
+ ALIGN(2, 4)
+.L_slice:
+ /*
+ * If we get here, there's at least 16 bytes of aligned input
+ * available. Make %edi multiple of eight bytes. Store the possible
+ * remainder over the "size" variable in the argument stack.
+ */
+ movl %edi, 0x18(%esp)
+ andl $-8, %edi
+ subl %edi, 0x18(%esp)
+
+ /*
+ * Let %edi be buf + size - 8 while running the main loop. This way
+ * we can compare for equality to determine when exit the loop.
+ */
+ addl %esi, %edi
+ subl $8, %edi
+
+ /* Read in the first eight aligned bytes. */
+ xorl (%esi), %eax
+ movl 4(%esi), %ecx
+ movzbl %cl, %ebp
+
+.L_loop:
+ movl 0x0C00(%ebx, %ebp, 4), %edx
+ movzbl %ch, %ebp
+ xorl 0x0800(%ebx, %ebp, 4), %edx
+ shrl $16, %ecx
+ xorl 8(%esi), %edx
+ movzbl %cl, %ebp
+ xorl 0x0400(%ebx, %ebp, 4), %edx
+ movzbl %ch, %ebp
+ xorl (%ebx, %ebp, 4), %edx
+ movzbl %al, %ebp
+
+ /*
+ * Read the next four bytes, for which the CRC is calculated
+ * on the next iteration of the loop.
+ */
+ movl 12(%esi), %ecx
+
+ xorl 0x1C00(%ebx, %ebp, 4), %edx
+ movzbl %ah, %ebp
+ shrl $16, %eax
+ xorl 0x1800(%ebx, %ebp, 4), %edx
+ movzbl %ah, %ebp
+ movzbl %al, %eax
+ movl 0x1400(%ebx, %eax, 4), %eax
+ addl $8, %esi
+ xorl %edx, %eax
+ xorl 0x1000(%ebx, %ebp, 4), %eax
+
+ /* Check for end of aligned input. */
+ cmpl %edi, %esi
+ movzbl %cl, %ebp
+ jne .L_loop
+
+ /*
+ * Process the remaining eight bytes, which we have already
+ * copied to %ecx and %edx.
+ */
+ movl 0x0C00(%ebx, %ebp, 4), %edx
+ movzbl %ch, %ebp
+ xorl 0x0800(%ebx, %ebp, 4), %edx
+ shrl $16, %ecx
+ movzbl %cl, %ebp
+ xorl 0x0400(%ebx, %ebp, 4), %edx
+ movzbl %ch, %ebp
+ xorl (%ebx, %ebp, 4), %edx
+ movzbl %al, %ebp
+
+ xorl 0x1C00(%ebx, %ebp, 4), %edx
+ movzbl %ah, %ebp
+ shrl $16, %eax
+ xorl 0x1800(%ebx, %ebp, 4), %edx
+ movzbl %ah, %ebp
+ movzbl %al, %eax
+ movl 0x1400(%ebx, %eax, 4), %eax
+ addl $8, %esi
+ xorl %edx, %eax
+ xorl 0x1000(%ebx, %ebp, 4), %eax
+
+ /* Copy the number of remaining bytes to %edi. */
+ movl 0x18(%esp), %edi
+
+.L_rest:
+ /* Check for end of input. */
+ testl %edi, %edi
+ jz .L_return
+
+ /* Calculate CRC of the next input byte. */
+ movzbl (%esi), %ebp
+ incl %esi
+ movzbl %al, %ecx
+ xorl %ecx, %ebp
+ shrl $8, %eax
+ xorl (%ebx, %ebp, 4), %eax
+ decl %edi
+ jmp .L_rest
+
+.L_return:
+ /* Complement the final value. */
+ notl %eax
+
+ popl %ebp
+ popl %edi
+ popl %esi
+ popl %ebx
+ ret
+
+#if defined(PIC) || defined(__PIC__)
+ ALIGN(4, 16)
+.L_get_pc:
+ movl (%esp), %ebx
+ ret
+#endif
+
+#if defined(__APPLE__) && (defined(PIC) || defined(__PIC__))
+ /* Mach-O PIC */
+ .section __IMPORT,__pointers,non_lazy_symbol_pointers
+.L_lzma_crc32_table$non_lazy_ptr:
+ .indirect_symbol LZMA_CRC32_TABLE
+ .long 0
+
+#elif defined(_WIN32) || defined(__CYGWIN__)
+# ifdef DLL_EXPORT
+ /* This is equivalent of __declspec(dllexport). */
+ .section .drectve
+ .ascii " -export:lzma_crc32"
+# endif
+
+#elif !defined(__MSDOS__)
+ /* ELF */
+ .size LZMA_CRC32, .-LZMA_CRC32
+#endif
+
+/*
+ * This is needed to support non-executable stack. It's ugly to
+ * use __FreeBSD__ and __linux__ here, but I don't know a way to detect when
+ * we are using GNU assembler.
+ */
+#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__))
+ .section .note.GNU-stack,"",@progbits
+#endif
diff --git a/src/liblzma/check/crc64_fast.c b/src/liblzma/check/crc64_fast.c
new file mode 100644
index 0000000..0c8622a
--- /dev/null
+++ b/src/liblzma/check/crc64_fast.c
@@ -0,0 +1,538 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc64.c
+/// \brief CRC64 calculation
+///
+/// There are two methods in this file. crc64_generic uses the
+/// the slice-by-four algorithm. This is the same idea that is
+/// used in crc32_fast.c, but for CRC64 we use only four tables
+/// instead of eight to avoid increasing CPU cache usage.
+///
+/// crc64_clmul uses 32/64-bit x86 SSSE3, SSE4.1, and CLMUL instructions.
+/// It was derived from
+/// https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf
+/// and the public domain code from https://github.com/rawrunprotected/crc
+/// (URLs were checked on 2022-11-07).
+///
+/// FIXME: Builds for 32-bit x86 use crc64_x86.S by default instead
+/// of this file and thus CLMUL version isn't available on 32-bit x86
+/// unless configured with --disable-assembler. Even then the lookup table
+/// isn't omitted in crc64_table.c since it doesn't know that assembly
+/// code has been disabled.
+//
+// Authors: Lasse Collin
+// Ilya Kurdyukov
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "check.h"
+
+#undef CRC_GENERIC
+#undef CRC_CLMUL
+#undef CRC_USE_GENERIC_FOR_SMALL_INPUTS
+
+// If CLMUL cannot be used then only the generic slice-by-four is built.
+#if !defined(HAVE_USABLE_CLMUL)
+# define CRC_GENERIC 1
+
+// If CLMUL is allowed unconditionally in the compiler options then the
+// generic version can be omitted. Note that this doesn't work with MSVC
+// as I don't know how to detect the features here.
+//
+// NOTE: Keep this this in sync with crc64_table.c.
+#elif (defined(__SSSE3__) && defined(__SSE4_1__) && defined(__PCLMUL__)) \
+ || (defined(__e2k__) && __iset__ >= 6)
+# define CRC_CLMUL 1
+
+// Otherwise build both and detect at runtime which version to use.
+#else
+# define CRC_GENERIC 1
+# define CRC_CLMUL 1
+
+/*
+ // The generic code is much faster with 1-8-byte inputs and has
+ // similar performance up to 16 bytes at least in microbenchmarks
+ // (it depends on input buffer alignment too). If both versions are
+ // built, this #define will use the generic version for inputs up to
+ // 16 bytes and CLMUL for bigger inputs. It saves a little in code
+ // size since the special cases for 0-16-byte inputs will be omitted
+ // from the CLMUL code.
+# define CRC_USE_GENERIC_FOR_SMALL_INPUTS 1
+*/
+
+# if defined(_MSC_VER)
+# include <intrin.h>
+# elif defined(HAVE_CPUID_H)
+# include <cpuid.h>
+# endif
+#endif
+
+
+/////////////////////////////////
+// Generic slice-by-four CRC64 //
+/////////////////////////////////
+
+#ifdef CRC_GENERIC
+
+#include "crc_macros.h"
+
+
+#ifdef WORDS_BIGENDIAN
+# define A1(x) ((x) >> 56)
+#else
+# define A1 A
+#endif
+
+
+// See the comments in crc32_fast.c. They aren't duplicated here.
+static uint64_t
+crc64_generic(const uint8_t *buf, size_t size, uint64_t crc)
+{
+ crc = ~crc;
+
+#ifdef WORDS_BIGENDIAN
+ crc = bswap64(crc);
+#endif
+
+ if (size > 4) {
+ while ((uintptr_t)(buf) & 3) {
+ crc = lzma_crc64_table[0][*buf++ ^ A1(crc)] ^ S8(crc);
+ --size;
+ }
+
+ const uint8_t *const limit = buf + (size & ~(size_t)(3));
+ size &= (size_t)(3);
+
+ while (buf < limit) {
+#ifdef WORDS_BIGENDIAN
+ const uint32_t tmp = (uint32_t)(crc >> 32)
+ ^ aligned_read32ne(buf);
+#else
+ const uint32_t tmp = (uint32_t)crc
+ ^ aligned_read32ne(buf);
+#endif
+ buf += 4;
+
+ crc = lzma_crc64_table[3][A(tmp)]
+ ^ lzma_crc64_table[2][B(tmp)]
+ ^ S32(crc)
+ ^ lzma_crc64_table[1][C(tmp)]
+ ^ lzma_crc64_table[0][D(tmp)];
+ }
+ }
+
+ while (size-- != 0)
+ crc = lzma_crc64_table[0][*buf++ ^ A1(crc)] ^ S8(crc);
+
+#ifdef WORDS_BIGENDIAN
+ crc = bswap64(crc);
+#endif
+
+ return ~crc;
+}
+#endif
+
+
+/////////////////////
+// x86 CLMUL CRC64 //
+/////////////////////
+
+#ifdef CRC_CLMUL
+
+#include <immintrin.h>
+
+
+/*
+// These functions were used to generate the constants
+// at the top of crc64_clmul().
+static uint64_t
+calc_lo(uint64_t poly)
+{
+ uint64_t a = poly;
+ uint64_t b = 0;
+
+ for (unsigned i = 0; i < 64; ++i) {
+ b = (b >> 1) | (a << 63);
+ a = (a >> 1) ^ (a & 1 ? poly : 0);
+ }
+
+ return b;
+}
+
+static uint64_t
+calc_hi(uint64_t poly, uint64_t a)
+{
+ for (unsigned i = 0; i < 64; ++i)
+ a = (a >> 1) ^ (a & 1 ? poly : 0);
+
+ return a;
+}
+*/
+
+
+#define MASK_L(in, mask, r) \
+ r = _mm_shuffle_epi8(in, mask)
+
+#define MASK_H(in, mask, r) \
+ r = _mm_shuffle_epi8(in, _mm_xor_si128(mask, vsign))
+
+#define MASK_LH(in, mask, low, high) \
+ MASK_L(in, mask, low); \
+ MASK_H(in, mask, high)
+
+
+// MSVC (VS2015 - VS2022) produces bad 32-bit x86 code from the CLMUL CRC
+// code when optimizations are enabled (release build). According to the bug
+// report, the ebx register is corrupted and the calculated result is wrong.
+// Trying to workaround the problem with "__asm mov ebx, ebx" didn't help.
+// The following pragma works and performance is still good. x86-64 builds
+// aren't affected by this problem.
+//
+// NOTE: Another pragma after the function restores the optimizations.
+// If the #if condition here is updated, the other one must be updated too.
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__clang__) \
+ && defined(_M_IX86)
+# pragma optimize("g", off)
+#endif
+
+// EDG-based compilers (Intel's classic compiler and compiler for E2K) can
+// define __GNUC__ but the attribute must not be used with them.
+// The new Clang-based ICX needs the attribute.
+//
+// NOTE: Build systems check for this too, keep them in sync with this.
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(__EDG__)
+__attribute__((__target__("ssse3,sse4.1,pclmul")))
+#endif
+// The intrinsics use 16-byte-aligned reads from buf, thus they may read
+// up to 15 bytes before or after the buffer (depending on the alignment
+// of the buf argument). The values of the extra bytes are ignored.
+// This unavoidably trips -fsanitize=address so address sanitizier has
+// to be disabled for this function.
+#if lzma_has_attribute(__no_sanitize_address__)
+__attribute__((__no_sanitize_address__))
+#endif
+static uint64_t
+crc64_clmul(const uint8_t *buf, size_t size, uint64_t crc)
+{
+ // The prototypes of the intrinsics use signed types while most of
+ // the values are treated as unsigned here. These warnings in this
+ // function have been checked and found to be harmless so silence them.
+#if TUKLIB_GNUC_REQ(4, 6) || defined(__clang__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wsign-conversion"
+# pragma GCC diagnostic ignored "-Wconversion"
+#endif
+
+#ifndef CRC_USE_GENERIC_FOR_SMALL_INPUTS
+ // The code assumes that there is at least one byte of input.
+ if (size == 0)
+ return crc;
+#endif
+
+ // const uint64_t poly = 0xc96c5795d7870f42; // CRC polynomial
+ const uint64_t p = 0x92d8af2baf0e1e85; // (poly << 1) | 1
+ const uint64_t mu = 0x9c3e466c172963d5; // (calc_lo(poly) << 1) | 1
+ const uint64_t k2 = 0xdabe95afc7875f40; // calc_hi(poly, 1)
+ const uint64_t k1 = 0xe05dd497ca393ae4; // calc_hi(poly, k2)
+ const __m128i vfold0 = _mm_set_epi64x(p, mu);
+ const __m128i vfold1 = _mm_set_epi64x(k2, k1);
+
+ // Create a vector with 8-bit values 0 to 15. This is used to
+ // construct control masks for _mm_blendv_epi8 and _mm_shuffle_epi8.
+ const __m128i vramp = _mm_setr_epi32(
+ 0x03020100, 0x07060504, 0x0b0a0908, 0x0f0e0d0c);
+
+ // This is used to inverse the control mask of _mm_shuffle_epi8
+ // so that bytes that wouldn't be picked with the original mask
+ // will be picked and vice versa.
+ const __m128i vsign = _mm_set1_epi8(0x80);
+
+ // Memory addresses A to D and the distances between them:
+ //
+ // A B C D
+ // [skip_start][size][skip_end]
+ // [ size2 ]
+ //
+ // A and D are 16-byte aligned. B and C are 1-byte aligned.
+ // skip_start and skip_end are 0-15 bytes. size is at least 1 byte.
+ //
+ // A = aligned_buf will initially point to this address.
+ // B = The address pointed by the caller-supplied buf.
+ // C = buf + size == aligned_buf + size2
+ // D = buf + size + skip_end == aligned_buf + size2 + skip_end
+ const size_t skip_start = (size_t)((uintptr_t)buf & 15);
+ const size_t skip_end = (size_t)((0U - (uintptr_t)(buf + size)) & 15);
+ const __m128i *aligned_buf = (const __m128i *)(
+ (uintptr_t)buf & ~(uintptr_t)15);
+
+ // If size2 <= 16 then the whole input fits into a single 16-byte
+ // vector. If size2 > 16 then at least two 16-byte vectors must
+ // be processed. If size2 > 16 && size <= 16 then there is only
+ // one 16-byte vector's worth of input but it is unaligned in memory.
+ //
+ // NOTE: There is no integer overflow here if the arguments are valid.
+ // If this overflowed, buf + size would too.
+ size_t size2 = skip_start + size;
+
+ // Masks to be used with _mm_blendv_epi8 and _mm_shuffle_epi8:
+ // The first skip_start or skip_end bytes in the vectors will have
+ // the high bit (0x80) set. _mm_blendv_epi8 and _mm_shuffle_epi8
+ // will produce zeros for these positions. (Bitwise-xor of these
+ // masks with vsign will produce the opposite behavior.)
+ const __m128i mask_start
+ = _mm_sub_epi8(vramp, _mm_set1_epi8(skip_start));
+ const __m128i mask_end = _mm_sub_epi8(vramp, _mm_set1_epi8(skip_end));
+
+ // Get the first 1-16 bytes into data0. If loading less than 16 bytes,
+ // the bytes are loaded to the high bits of the vector and the least
+ // significant positions are filled with zeros.
+ const __m128i data0 = _mm_blendv_epi8(_mm_load_si128(aligned_buf),
+ _mm_setzero_si128(), mask_start);
+ ++aligned_buf;
+
+#if defined(__i386__) || defined(_M_IX86)
+ const __m128i initial_crc = _mm_set_epi64x(0, ~crc);
+#else
+ // GCC and Clang would produce good code with _mm_set_epi64x
+ // but MSVC needs _mm_cvtsi64_si128 on x86-64.
+ const __m128i initial_crc = _mm_cvtsi64_si128(~crc);
+#endif
+
+ __m128i v0, v1, v2, v3;
+
+#ifndef CRC_USE_GENERIC_FOR_SMALL_INPUTS
+ if (size <= 16) {
+ // Right-shift initial_crc by 1-16 bytes based on "size"
+ // and store the result in v1 (high bytes) and v0 (low bytes).
+ //
+ // NOTE: The highest 8 bytes of initial_crc are zeros so
+ // v1 will be filled with zeros if size >= 8. The highest 8
+ // bytes of v1 will always become zeros.
+ //
+ // [ v1 ][ v0 ]
+ // [ initial_crc ] size == 1
+ // [ initial_crc ] size == 2
+ // [ initial_crc ] size == 15
+ // [ initial_crc ] size == 16 (all in v0)
+ const __m128i mask_low = _mm_add_epi8(
+ vramp, _mm_set1_epi8(size - 16));
+ MASK_LH(initial_crc, mask_low, v0, v1);
+
+ if (size2 <= 16) {
+ // There are 1-16 bytes of input and it is all
+ // in data0. Copy the input bytes to v3. If there
+ // are fewer than 16 bytes, the low bytes in v3
+ // will be filled with zeros. That is, the input
+ // bytes are stored to the same position as
+ // (part of) initial_crc is in v0.
+ MASK_L(data0, mask_end, v3);
+ } else {
+ // There are 2-16 bytes of input but not all bytes
+ // are in data0.
+ const __m128i data1 = _mm_load_si128(aligned_buf);
+
+ // Collect the 2-16 input bytes from data0 and data1
+ // to v2 and v3, and bitwise-xor them with the
+ // low bits of initial_crc in v0. Note that the
+ // the second xor is below this else-block as it
+ // is shared with the other branch.
+ MASK_H(data0, mask_end, v2);
+ MASK_L(data1, mask_end, v3);
+ v0 = _mm_xor_si128(v0, v2);
+ }
+
+ v0 = _mm_xor_si128(v0, v3);
+ v1 = _mm_alignr_epi8(v1, v0, 8);
+ } else
+#endif
+ {
+ const __m128i data1 = _mm_load_si128(aligned_buf);
+ MASK_LH(initial_crc, mask_start, v0, v1);
+ v0 = _mm_xor_si128(v0, data0);
+ v1 = _mm_xor_si128(v1, data1);
+
+#define FOLD \
+ v1 = _mm_xor_si128(v1, _mm_clmulepi64_si128(v0, vfold1, 0x00)); \
+ v0 = _mm_xor_si128(v1, _mm_clmulepi64_si128(v0, vfold1, 0x11));
+
+ while (size2 > 32) {
+ ++aligned_buf;
+ size2 -= 16;
+ FOLD
+ v1 = _mm_load_si128(aligned_buf);
+ }
+
+ if (size2 < 32) {
+ MASK_H(v0, mask_end, v2);
+ MASK_L(v0, mask_end, v0);
+ MASK_L(v1, mask_end, v3);
+ v1 = _mm_or_si128(v2, v3);
+ }
+
+ FOLD
+ v1 = _mm_srli_si128(v0, 8);
+#undef FOLD
+ }
+
+ v1 = _mm_xor_si128(_mm_clmulepi64_si128(v0, vfold1, 0x10), v1);
+ v0 = _mm_clmulepi64_si128(v1, vfold0, 0x00);
+ v2 = _mm_clmulepi64_si128(v0, vfold0, 0x10);
+ v0 = _mm_xor_si128(_mm_xor_si128(v2, _mm_slli_si128(v0, 8)), v1);
+
+#if defined(__i386__) || defined(_M_IX86)
+ return ~(((uint64_t)(uint32_t)_mm_extract_epi32(v0, 3) << 32) |
+ (uint64_t)(uint32_t)_mm_extract_epi32(v0, 2));
+#else
+ return ~(uint64_t)_mm_extract_epi64(v0, 1);
+#endif
+
+#if TUKLIB_GNUC_REQ(4, 6) || defined(__clang__)
+# pragma GCC diagnostic pop
+#endif
+}
+#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__clang__) \
+ && defined(_M_IX86)
+# pragma optimize("", on)
+#endif
+#endif
+
+
+////////////////////////
+// Detect CPU support //
+////////////////////////
+
+#if defined(CRC_GENERIC) && defined(CRC_CLMUL)
+static inline bool
+is_clmul_supported(void)
+{
+ int success = 1;
+ uint32_t r[4]; // eax, ebx, ecx, edx
+
+#if defined(_MSC_VER)
+ // This needs <intrin.h> with MSVC. ICC has it as a built-in
+ // on all platforms.
+ __cpuid(r, 1);
+#elif defined(HAVE_CPUID_H)
+ // Compared to just using __asm__ to run CPUID, this also checks
+ // that CPUID is supported and saves and restores ebx as that is
+ // needed with GCC < 5 with position-independent code (PIC).
+ success = __get_cpuid(1, &r[0], &r[1], &r[2], &r[3]);
+#else
+ // Just a fallback that shouldn't be needed.
+ __asm__("cpuid\n\t"
+ : "=a"(r[0]), "=b"(r[1]), "=c"(r[2]), "=d"(r[3])
+ : "a"(1), "c"(0));
+#endif
+
+ // Returns true if these are supported:
+ // CLMUL (bit 1 in ecx)
+ // SSSE3 (bit 9 in ecx)
+ // SSE4.1 (bit 19 in ecx)
+ const uint32_t ecx_mask = (1 << 1) | (1 << 9) | (1 << 19);
+ return success && (r[2] & ecx_mask) == ecx_mask;
+
+ // Alternative methods that weren't used:
+ // - ICC's _may_i_use_cpu_feature: the other methods should work too.
+ // - GCC >= 6 / Clang / ICX __builtin_cpu_supports("pclmul")
+ //
+ // CPUID decding is needed with MSVC anyway and older GCC. This keeps
+ // the feature checks in the build system simpler too. The nice thing
+ // about __builtin_cpu_supports would be that it generates very short
+ // code as is it only reads a variable set at startup but a few bytes
+ // doesn't matter here.
+}
+
+
+#ifdef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+# define CRC64_FUNC_INIT
+# define CRC64_SET_FUNC_ATTR __attribute__((__constructor__))
+#else
+# define CRC64_FUNC_INIT = &crc64_dispatch
+# define CRC64_SET_FUNC_ATTR
+static uint64_t crc64_dispatch(const uint8_t *buf, size_t size, uint64_t crc);
+#endif
+
+
+// Pointer to the the selected CRC64 method.
+static uint64_t (*crc64_func)(const uint8_t *buf, size_t size, uint64_t crc)
+ CRC64_FUNC_INIT;
+
+
+CRC64_SET_FUNC_ATTR
+static void
+crc64_set_func(void)
+{
+ crc64_func = is_clmul_supported() ? &crc64_clmul : &crc64_generic;
+ return;
+}
+
+
+#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+static uint64_t
+crc64_dispatch(const uint8_t *buf, size_t size, uint64_t crc)
+{
+ // When __attribute__((__constructor__)) isn't supported, set the
+ // function pointer without any locking. If multiple threads run
+ // the detection code in parallel, they will all end up setting
+ // the pointer to the same value. This avoids the use of
+ // mythread_once() on every call to lzma_crc64() but this likely
+ // isn't strictly standards compliant. Let's change it if it breaks.
+ crc64_set_func();
+ return crc64_func(buf, size, crc);
+}
+#endif
+#endif
+
+
+extern LZMA_API(uint64_t)
+lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
+{
+#if defined(CRC_GENERIC) && defined(CRC_CLMUL)
+ // If CLMUL is available, it is the best for non-tiny inputs,
+ // being over twice as fast as the generic slice-by-four version.
+ // However, for size <= 16 it's different. In the extreme case
+ // of size == 1 the generic version can be five times faster.
+ // At size >= 8 the CLMUL starts to become reasonable. It
+ // varies depending on the alignment of buf too.
+ //
+ // The above doesn't include the overhead of mythread_once().
+ // At least on x86-64 GNU/Linux, pthread_once() is very fast but
+ // it still makes lzma_crc64(buf, 1, crc) 50-100 % slower. When
+ // size reaches 12-16 bytes the overhead becomes negligible.
+ //
+ // So using the generic version for size <= 16 may give better
+ // performance with tiny inputs but if such inputs happen rarely
+ // it's not so obvious because then the lookup table of the
+ // generic version may not be in the processor cache.
+#ifdef CRC_USE_GENERIC_FOR_SMALL_INPUTS
+ if (size <= 16)
+ return crc64_generic(buf, size, crc);
+#endif
+
+/*
+#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+ // See crc64_dispatch(). This would be the alternative which uses
+ // locking and doesn't use crc64_dispatch(). Note that on Windows
+ // this method needs Vista threads.
+ mythread_once(crc64_set_func);
+#endif
+*/
+
+ return crc64_func(buf, size, crc);
+
+#elif defined(CRC_CLMUL)
+ // If CLMUL is used unconditionally without runtime CPU detection
+ // then omitting the generic version and its 8 KiB lookup table
+ // makes the library smaller.
+ //
+ // FIXME: Lookup table isn't currently omitted on 32-bit x86,
+ // see crc64_table.c.
+ return crc64_clmul(buf, size, crc);
+
+#else
+ return crc64_generic(buf, size, crc);
+#endif
+}
diff --git a/src/liblzma/check/crc64_small.c b/src/liblzma/check/crc64_small.c
new file mode 100644
index 0000000..420f7cf
--- /dev/null
+++ b/src/liblzma/check/crc64_small.c
@@ -0,0 +1,58 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc64_small.c
+/// \brief CRC64 calculation (size-optimized)
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "check.h"
+
+
+static uint64_t crc64_table[256];
+
+
+#ifdef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+__attribute__((__constructor__))
+#endif
+static void
+crc64_init(void)
+{
+ static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42);
+
+ for (size_t b = 0; b < 256; ++b) {
+ uint64_t r = b;
+ for (size_t i = 0; i < 8; ++i) {
+ if (r & 1)
+ r = (r >> 1) ^ poly64;
+ else
+ r >>= 1;
+ }
+
+ crc64_table[b] = r;
+ }
+
+ return;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
+{
+#ifndef HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR
+ mythread_once(crc64_init);
+#endif
+
+ crc = ~crc;
+
+ while (size != 0) {
+ crc = crc64_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);
+ --size;
+ }
+
+ return ~crc;
+}
diff --git a/src/liblzma/check/crc64_table.c b/src/liblzma/check/crc64_table.c
new file mode 100644
index 0000000..688e527
--- /dev/null
+++ b/src/liblzma/check/crc64_table.c
@@ -0,0 +1,33 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc64_table.c
+/// \brief Precalculated CRC64 table with correct endianness
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+// FIXME: Compared to crc64_fast.c this has to check for __x86_64__ too
+// so that in 32-bit builds crc64_x86.S won't break due to a missing table.
+#if (defined(__x86_64__) && defined(__SSSE3__) \
+ && defined(__SSE4_1__) && defined(__PCLMUL__)) \
+ || (defined(__e2k__) && __iset__ >= 6)
+// No table needed. Use a typedef to avoid an empty translation unit.
+typedef void lzma_crc64_dummy;
+
+#else
+// Having the declaration here silences clang -Wmissing-variable-declarations.
+extern const uint64_t lzma_crc64_table[4][256];
+
+# if defined(WORDS_BIGENDIAN)
+# include "crc64_table_be.h"
+# else
+# include "crc64_table_le.h"
+# endif
+#endif
diff --git a/src/liblzma/check/crc64_table_be.h b/src/liblzma/check/crc64_table_be.h
new file mode 100644
index 0000000..ea074f3
--- /dev/null
+++ b/src/liblzma/check/crc64_table_be.h
@@ -0,0 +1,521 @@
+/* This file has been automatically generated by crc64_tablegen.c. */
+
+const uint64_t lzma_crc64_table[4][256] = {
+ {
+ UINT64_C(0x0000000000000000), UINT64_C(0x6F5FA703BE4C2EB3),
+ UINT64_C(0x5BA040A8573684F4), UINT64_C(0x34FFE7ABE97AAA47),
+ UINT64_C(0x335E8FFF84C3D07B), UINT64_C(0x5C0128FC3A8FFEC8),
+ UINT64_C(0x68FECF57D3F5548F), UINT64_C(0x07A168546DB97A3C),
+ UINT64_C(0x66BC1EFF0987A1F7), UINT64_C(0x09E3B9FCB7CB8F44),
+ UINT64_C(0x3D1C5E575EB12503), UINT64_C(0x5243F954E0FD0BB0),
+ UINT64_C(0x55E291008D44718C), UINT64_C(0x3ABD360333085F3F),
+ UINT64_C(0x0E42D1A8DA72F578), UINT64_C(0x611D76AB643EDBCB),
+ UINT64_C(0x4966335138A19B7D), UINT64_C(0x2639945286EDB5CE),
+ UINT64_C(0x12C673F96F971F89), UINT64_C(0x7D99D4FAD1DB313A),
+ UINT64_C(0x7A38BCAEBC624B06), UINT64_C(0x15671BAD022E65B5),
+ UINT64_C(0x2198FC06EB54CFF2), UINT64_C(0x4EC75B055518E141),
+ UINT64_C(0x2FDA2DAE31263A8A), UINT64_C(0x40858AAD8F6A1439),
+ UINT64_C(0x747A6D066610BE7E), UINT64_C(0x1B25CA05D85C90CD),
+ UINT64_C(0x1C84A251B5E5EAF1), UINT64_C(0x73DB05520BA9C442),
+ UINT64_C(0x4724E2F9E2D36E05), UINT64_C(0x287B45FA5C9F40B6),
+ UINT64_C(0x92CC66A2704237FB), UINT64_C(0xFD93C1A1CE0E1948),
+ UINT64_C(0xC96C260A2774B30F), UINT64_C(0xA633810999389DBC),
+ UINT64_C(0xA192E95DF481E780), UINT64_C(0xCECD4E5E4ACDC933),
+ UINT64_C(0xFA32A9F5A3B76374), UINT64_C(0x956D0EF61DFB4DC7),
+ UINT64_C(0xF470785D79C5960C), UINT64_C(0x9B2FDF5EC789B8BF),
+ UINT64_C(0xAFD038F52EF312F8), UINT64_C(0xC08F9FF690BF3C4B),
+ UINT64_C(0xC72EF7A2FD064677), UINT64_C(0xA87150A1434A68C4),
+ UINT64_C(0x9C8EB70AAA30C283), UINT64_C(0xF3D11009147CEC30),
+ UINT64_C(0xDBAA55F348E3AC86), UINT64_C(0xB4F5F2F0F6AF8235),
+ UINT64_C(0x800A155B1FD52872), UINT64_C(0xEF55B258A19906C1),
+ UINT64_C(0xE8F4DA0CCC207CFD), UINT64_C(0x87AB7D0F726C524E),
+ UINT64_C(0xB3549AA49B16F809), UINT64_C(0xDC0B3DA7255AD6BA),
+ UINT64_C(0xBD164B0C41640D71), UINT64_C(0xD249EC0FFF2823C2),
+ UINT64_C(0xE6B60BA416528985), UINT64_C(0x89E9ACA7A81EA736),
+ UINT64_C(0x8E48C4F3C5A7DD0A), UINT64_C(0xE11763F07BEBF3B9),
+ UINT64_C(0xD5E8845B929159FE), UINT64_C(0xBAB723582CDD774D),
+ UINT64_C(0xA187C3EBCA2BB664), UINT64_C(0xCED864E8746798D7),
+ UINT64_C(0xFA2783439D1D3290), UINT64_C(0x9578244023511C23),
+ UINT64_C(0x92D94C144EE8661F), UINT64_C(0xFD86EB17F0A448AC),
+ UINT64_C(0xC9790CBC19DEE2EB), UINT64_C(0xA626ABBFA792CC58),
+ UINT64_C(0xC73BDD14C3AC1793), UINT64_C(0xA8647A177DE03920),
+ UINT64_C(0x9C9B9DBC949A9367), UINT64_C(0xF3C43ABF2AD6BDD4),
+ UINT64_C(0xF46552EB476FC7E8), UINT64_C(0x9B3AF5E8F923E95B),
+ UINT64_C(0xAFC512431059431C), UINT64_C(0xC09AB540AE156DAF),
+ UINT64_C(0xE8E1F0BAF28A2D19), UINT64_C(0x87BE57B94CC603AA),
+ UINT64_C(0xB341B012A5BCA9ED), UINT64_C(0xDC1E17111BF0875E),
+ UINT64_C(0xDBBF7F457649FD62), UINT64_C(0xB4E0D846C805D3D1),
+ UINT64_C(0x801F3FED217F7996), UINT64_C(0xEF4098EE9F335725),
+ UINT64_C(0x8E5DEE45FB0D8CEE), UINT64_C(0xE10249464541A25D),
+ UINT64_C(0xD5FDAEEDAC3B081A), UINT64_C(0xBAA209EE127726A9),
+ UINT64_C(0xBD0361BA7FCE5C95), UINT64_C(0xD25CC6B9C1827226),
+ UINT64_C(0xE6A3211228F8D861), UINT64_C(0x89FC861196B4F6D2),
+ UINT64_C(0x334BA549BA69819F), UINT64_C(0x5C14024A0425AF2C),
+ UINT64_C(0x68EBE5E1ED5F056B), UINT64_C(0x07B442E253132BD8),
+ UINT64_C(0x00152AB63EAA51E4), UINT64_C(0x6F4A8DB580E67F57),
+ UINT64_C(0x5BB56A1E699CD510), UINT64_C(0x34EACD1DD7D0FBA3),
+ UINT64_C(0x55F7BBB6B3EE2068), UINT64_C(0x3AA81CB50DA20EDB),
+ UINT64_C(0x0E57FB1EE4D8A49C), UINT64_C(0x61085C1D5A948A2F),
+ UINT64_C(0x66A93449372DF013), UINT64_C(0x09F6934A8961DEA0),
+ UINT64_C(0x3D0974E1601B74E7), UINT64_C(0x5256D3E2DE575A54),
+ UINT64_C(0x7A2D961882C81AE2), UINT64_C(0x1572311B3C843451),
+ UINT64_C(0x218DD6B0D5FE9E16), UINT64_C(0x4ED271B36BB2B0A5),
+ UINT64_C(0x497319E7060BCA99), UINT64_C(0x262CBEE4B847E42A),
+ UINT64_C(0x12D3594F513D4E6D), UINT64_C(0x7D8CFE4CEF7160DE),
+ UINT64_C(0x1C9188E78B4FBB15), UINT64_C(0x73CE2FE4350395A6),
+ UINT64_C(0x4731C84FDC793FE1), UINT64_C(0x286E6F4C62351152),
+ UINT64_C(0x2FCF07180F8C6B6E), UINT64_C(0x4090A01BB1C045DD),
+ UINT64_C(0x746F47B058BAEF9A), UINT64_C(0x1B30E0B3E6F6C129),
+ UINT64_C(0x420F87D795576CC9), UINT64_C(0x2D5020D42B1B427A),
+ UINT64_C(0x19AFC77FC261E83D), UINT64_C(0x76F0607C7C2DC68E),
+ UINT64_C(0x715108281194BCB2), UINT64_C(0x1E0EAF2BAFD89201),
+ UINT64_C(0x2AF1488046A23846), UINT64_C(0x45AEEF83F8EE16F5),
+ UINT64_C(0x24B399289CD0CD3E), UINT64_C(0x4BEC3E2B229CE38D),
+ UINT64_C(0x7F13D980CBE649CA), UINT64_C(0x104C7E8375AA6779),
+ UINT64_C(0x17ED16D718131D45), UINT64_C(0x78B2B1D4A65F33F6),
+ UINT64_C(0x4C4D567F4F2599B1), UINT64_C(0x2312F17CF169B702),
+ UINT64_C(0x0B69B486ADF6F7B4), UINT64_C(0x6436138513BAD907),
+ UINT64_C(0x50C9F42EFAC07340), UINT64_C(0x3F96532D448C5DF3),
+ UINT64_C(0x38373B79293527CF), UINT64_C(0x57689C7A9779097C),
+ UINT64_C(0x63977BD17E03A33B), UINT64_C(0x0CC8DCD2C04F8D88),
+ UINT64_C(0x6DD5AA79A4715643), UINT64_C(0x028A0D7A1A3D78F0),
+ UINT64_C(0x3675EAD1F347D2B7), UINT64_C(0x592A4DD24D0BFC04),
+ UINT64_C(0x5E8B258620B28638), UINT64_C(0x31D482859EFEA88B),
+ UINT64_C(0x052B652E778402CC), UINT64_C(0x6A74C22DC9C82C7F),
+ UINT64_C(0xD0C3E175E5155B32), UINT64_C(0xBF9C46765B597581),
+ UINT64_C(0x8B63A1DDB223DFC6), UINT64_C(0xE43C06DE0C6FF175),
+ UINT64_C(0xE39D6E8A61D68B49), UINT64_C(0x8CC2C989DF9AA5FA),
+ UINT64_C(0xB83D2E2236E00FBD), UINT64_C(0xD762892188AC210E),
+ UINT64_C(0xB67FFF8AEC92FAC5), UINT64_C(0xD920588952DED476),
+ UINT64_C(0xEDDFBF22BBA47E31), UINT64_C(0x8280182105E85082),
+ UINT64_C(0x8521707568512ABE), UINT64_C(0xEA7ED776D61D040D),
+ UINT64_C(0xDE8130DD3F67AE4A), UINT64_C(0xB1DE97DE812B80F9),
+ UINT64_C(0x99A5D224DDB4C04F), UINT64_C(0xF6FA752763F8EEFC),
+ UINT64_C(0xC205928C8A8244BB), UINT64_C(0xAD5A358F34CE6A08),
+ UINT64_C(0xAAFB5DDB59771034), UINT64_C(0xC5A4FAD8E73B3E87),
+ UINT64_C(0xF15B1D730E4194C0), UINT64_C(0x9E04BA70B00DBA73),
+ UINT64_C(0xFF19CCDBD43361B8), UINT64_C(0x90466BD86A7F4F0B),
+ UINT64_C(0xA4B98C738305E54C), UINT64_C(0xCBE62B703D49CBFF),
+ UINT64_C(0xCC47432450F0B1C3), UINT64_C(0xA318E427EEBC9F70),
+ UINT64_C(0x97E7038C07C63537), UINT64_C(0xF8B8A48FB98A1B84),
+ UINT64_C(0xE388443C5F7CDAAD), UINT64_C(0x8CD7E33FE130F41E),
+ UINT64_C(0xB8280494084A5E59), UINT64_C(0xD777A397B60670EA),
+ UINT64_C(0xD0D6CBC3DBBF0AD6), UINT64_C(0xBF896CC065F32465),
+ UINT64_C(0x8B768B6B8C898E22), UINT64_C(0xE4292C6832C5A091),
+ UINT64_C(0x85345AC356FB7B5A), UINT64_C(0xEA6BFDC0E8B755E9),
+ UINT64_C(0xDE941A6B01CDFFAE), UINT64_C(0xB1CBBD68BF81D11D),
+ UINT64_C(0xB66AD53CD238AB21), UINT64_C(0xD935723F6C748592),
+ UINT64_C(0xEDCA9594850E2FD5), UINT64_C(0x829532973B420166),
+ UINT64_C(0xAAEE776D67DD41D0), UINT64_C(0xC5B1D06ED9916F63),
+ UINT64_C(0xF14E37C530EBC524), UINT64_C(0x9E1190C68EA7EB97),
+ UINT64_C(0x99B0F892E31E91AB), UINT64_C(0xF6EF5F915D52BF18),
+ UINT64_C(0xC210B83AB428155F), UINT64_C(0xAD4F1F390A643BEC),
+ UINT64_C(0xCC5269926E5AE027), UINT64_C(0xA30DCE91D016CE94),
+ UINT64_C(0x97F2293A396C64D3), UINT64_C(0xF8AD8E3987204A60),
+ UINT64_C(0xFF0CE66DEA99305C), UINT64_C(0x9053416E54D51EEF),
+ UINT64_C(0xA4ACA6C5BDAFB4A8), UINT64_C(0xCBF301C603E39A1B),
+ UINT64_C(0x7144229E2F3EED56), UINT64_C(0x1E1B859D9172C3E5),
+ UINT64_C(0x2AE46236780869A2), UINT64_C(0x45BBC535C6444711),
+ UINT64_C(0x421AAD61ABFD3D2D), UINT64_C(0x2D450A6215B1139E),
+ UINT64_C(0x19BAEDC9FCCBB9D9), UINT64_C(0x76E54ACA4287976A),
+ UINT64_C(0x17F83C6126B94CA1), UINT64_C(0x78A79B6298F56212),
+ UINT64_C(0x4C587CC9718FC855), UINT64_C(0x2307DBCACFC3E6E6),
+ UINT64_C(0x24A6B39EA27A9CDA), UINT64_C(0x4BF9149D1C36B269),
+ UINT64_C(0x7F06F336F54C182E), UINT64_C(0x105954354B00369D),
+ UINT64_C(0x382211CF179F762B), UINT64_C(0x577DB6CCA9D35898),
+ UINT64_C(0x6382516740A9F2DF), UINT64_C(0x0CDDF664FEE5DC6C),
+ UINT64_C(0x0B7C9E30935CA650), UINT64_C(0x642339332D1088E3),
+ UINT64_C(0x50DCDE98C46A22A4), UINT64_C(0x3F83799B7A260C17),
+ UINT64_C(0x5E9E0F301E18D7DC), UINT64_C(0x31C1A833A054F96F),
+ UINT64_C(0x053E4F98492E5328), UINT64_C(0x6A61E89BF7627D9B),
+ UINT64_C(0x6DC080CF9ADB07A7), UINT64_C(0x029F27CC24972914),
+ UINT64_C(0x3660C067CDED8353), UINT64_C(0x593F676473A1ADE0)
+ }, {
+ UINT64_C(0x0000000000000000), UINT64_C(0x0DF1D05C9279E954),
+ UINT64_C(0x1AE2A1B924F3D2A9), UINT64_C(0x171371E5B68A3BFD),
+ UINT64_C(0xB1DA4DDC62497DC1), UINT64_C(0xBC2B9D80F0309495),
+ UINT64_C(0xAB38EC6546BAAF68), UINT64_C(0xA6C93C39D4C3463C),
+ UINT64_C(0xE7AB9517EE3D2210), UINT64_C(0xEA5A454B7C44CB44),
+ UINT64_C(0xFD4934AECACEF0B9), UINT64_C(0xF0B8E4F258B719ED),
+ UINT64_C(0x5671D8CB8C745FD1), UINT64_C(0x5B8008971E0DB685),
+ UINT64_C(0x4C937972A8878D78), UINT64_C(0x4162A92E3AFE642C),
+ UINT64_C(0xCE572B2FDC7B4420), UINT64_C(0xC3A6FB734E02AD74),
+ UINT64_C(0xD4B58A96F8889689), UINT64_C(0xD9445ACA6AF17FDD),
+ UINT64_C(0x7F8D66F3BE3239E1), UINT64_C(0x727CB6AF2C4BD0B5),
+ UINT64_C(0x656FC74A9AC1EB48), UINT64_C(0x689E171608B8021C),
+ UINT64_C(0x29FCBE3832466630), UINT64_C(0x240D6E64A03F8F64),
+ UINT64_C(0x331E1F8116B5B499), UINT64_C(0x3EEFCFDD84CC5DCD),
+ UINT64_C(0x9826F3E4500F1BF1), UINT64_C(0x95D723B8C276F2A5),
+ UINT64_C(0x82C4525D74FCC958), UINT64_C(0x8F358201E685200C),
+ UINT64_C(0x9CAF565EB8F78840), UINT64_C(0x915E86022A8E6114),
+ UINT64_C(0x864DF7E79C045AE9), UINT64_C(0x8BBC27BB0E7DB3BD),
+ UINT64_C(0x2D751B82DABEF581), UINT64_C(0x2084CBDE48C71CD5),
+ UINT64_C(0x3797BA3BFE4D2728), UINT64_C(0x3A666A676C34CE7C),
+ UINT64_C(0x7B04C34956CAAA50), UINT64_C(0x76F51315C4B34304),
+ UINT64_C(0x61E662F0723978F9), UINT64_C(0x6C17B2ACE04091AD),
+ UINT64_C(0xCADE8E953483D791), UINT64_C(0xC72F5EC9A6FA3EC5),
+ UINT64_C(0xD03C2F2C10700538), UINT64_C(0xDDCDFF708209EC6C),
+ UINT64_C(0x52F87D71648CCC60), UINT64_C(0x5F09AD2DF6F52534),
+ UINT64_C(0x481ADCC8407F1EC9), UINT64_C(0x45EB0C94D206F79D),
+ UINT64_C(0xE32230AD06C5B1A1), UINT64_C(0xEED3E0F194BC58F5),
+ UINT64_C(0xF9C0911422366308), UINT64_C(0xF4314148B04F8A5C),
+ UINT64_C(0xB553E8668AB1EE70), UINT64_C(0xB8A2383A18C80724),
+ UINT64_C(0xAFB149DFAE423CD9), UINT64_C(0xA24099833C3BD58D),
+ UINT64_C(0x0489A5BAE8F893B1), UINT64_C(0x097875E67A817AE5),
+ UINT64_C(0x1E6B0403CC0B4118), UINT64_C(0x139AD45F5E72A84C),
+ UINT64_C(0x385FADBC70EF1181), UINT64_C(0x35AE7DE0E296F8D5),
+ UINT64_C(0x22BD0C05541CC328), UINT64_C(0x2F4CDC59C6652A7C),
+ UINT64_C(0x8985E06012A66C40), UINT64_C(0x8474303C80DF8514),
+ UINT64_C(0x936741D93655BEE9), UINT64_C(0x9E969185A42C57BD),
+ UINT64_C(0xDFF438AB9ED23391), UINT64_C(0xD205E8F70CABDAC5),
+ UINT64_C(0xC5169912BA21E138), UINT64_C(0xC8E7494E2858086C),
+ UINT64_C(0x6E2E7577FC9B4E50), UINT64_C(0x63DFA52B6EE2A704),
+ UINT64_C(0x74CCD4CED8689CF9), UINT64_C(0x793D04924A1175AD),
+ UINT64_C(0xF6088693AC9455A1), UINT64_C(0xFBF956CF3EEDBCF5),
+ UINT64_C(0xECEA272A88678708), UINT64_C(0xE11BF7761A1E6E5C),
+ UINT64_C(0x47D2CB4FCEDD2860), UINT64_C(0x4A231B135CA4C134),
+ UINT64_C(0x5D306AF6EA2EFAC9), UINT64_C(0x50C1BAAA7857139D),
+ UINT64_C(0x11A3138442A977B1), UINT64_C(0x1C52C3D8D0D09EE5),
+ UINT64_C(0x0B41B23D665AA518), UINT64_C(0x06B06261F4234C4C),
+ UINT64_C(0xA0795E5820E00A70), UINT64_C(0xAD888E04B299E324),
+ UINT64_C(0xBA9BFFE10413D8D9), UINT64_C(0xB76A2FBD966A318D),
+ UINT64_C(0xA4F0FBE2C81899C1), UINT64_C(0xA9012BBE5A617095),
+ UINT64_C(0xBE125A5BECEB4B68), UINT64_C(0xB3E38A077E92A23C),
+ UINT64_C(0x152AB63EAA51E400), UINT64_C(0x18DB666238280D54),
+ UINT64_C(0x0FC817878EA236A9), UINT64_C(0x0239C7DB1CDBDFFD),
+ UINT64_C(0x435B6EF52625BBD1), UINT64_C(0x4EAABEA9B45C5285),
+ UINT64_C(0x59B9CF4C02D66978), UINT64_C(0x54481F1090AF802C),
+ UINT64_C(0xF2812329446CC610), UINT64_C(0xFF70F375D6152F44),
+ UINT64_C(0xE8638290609F14B9), UINT64_C(0xE59252CCF2E6FDED),
+ UINT64_C(0x6AA7D0CD1463DDE1), UINT64_C(0x67560091861A34B5),
+ UINT64_C(0x7045717430900F48), UINT64_C(0x7DB4A128A2E9E61C),
+ UINT64_C(0xDB7D9D11762AA020), UINT64_C(0xD68C4D4DE4534974),
+ UINT64_C(0xC19F3CA852D97289), UINT64_C(0xCC6EECF4C0A09BDD),
+ UINT64_C(0x8D0C45DAFA5EFFF1), UINT64_C(0x80FD9586682716A5),
+ UINT64_C(0x97EEE463DEAD2D58), UINT64_C(0x9A1F343F4CD4C40C),
+ UINT64_C(0x3CD6080698178230), UINT64_C(0x3127D85A0A6E6B64),
+ UINT64_C(0x2634A9BFBCE45099), UINT64_C(0x2BC579E32E9DB9CD),
+ UINT64_C(0xF5A054D6CA71FB90), UINT64_C(0xF851848A580812C4),
+ UINT64_C(0xEF42F56FEE822939), UINT64_C(0xE2B325337CFBC06D),
+ UINT64_C(0x447A190AA8388651), UINT64_C(0x498BC9563A416F05),
+ UINT64_C(0x5E98B8B38CCB54F8), UINT64_C(0x536968EF1EB2BDAC),
+ UINT64_C(0x120BC1C1244CD980), UINT64_C(0x1FFA119DB63530D4),
+ UINT64_C(0x08E9607800BF0B29), UINT64_C(0x0518B02492C6E27D),
+ UINT64_C(0xA3D18C1D4605A441), UINT64_C(0xAE205C41D47C4D15),
+ UINT64_C(0xB9332DA462F676E8), UINT64_C(0xB4C2FDF8F08F9FBC),
+ UINT64_C(0x3BF77FF9160ABFB0), UINT64_C(0x3606AFA5847356E4),
+ UINT64_C(0x2115DE4032F96D19), UINT64_C(0x2CE40E1CA080844D),
+ UINT64_C(0x8A2D32257443C271), UINT64_C(0x87DCE279E63A2B25),
+ UINT64_C(0x90CF939C50B010D8), UINT64_C(0x9D3E43C0C2C9F98C),
+ UINT64_C(0xDC5CEAEEF8379DA0), UINT64_C(0xD1AD3AB26A4E74F4),
+ UINT64_C(0xC6BE4B57DCC44F09), UINT64_C(0xCB4F9B0B4EBDA65D),
+ UINT64_C(0x6D86A7329A7EE061), UINT64_C(0x6077776E08070935),
+ UINT64_C(0x7764068BBE8D32C8), UINT64_C(0x7A95D6D72CF4DB9C),
+ UINT64_C(0x690F0288728673D0), UINT64_C(0x64FED2D4E0FF9A84),
+ UINT64_C(0x73EDA3315675A179), UINT64_C(0x7E1C736DC40C482D),
+ UINT64_C(0xD8D54F5410CF0E11), UINT64_C(0xD5249F0882B6E745),
+ UINT64_C(0xC237EEED343CDCB8), UINT64_C(0xCFC63EB1A64535EC),
+ UINT64_C(0x8EA4979F9CBB51C0), UINT64_C(0x835547C30EC2B894),
+ UINT64_C(0x94463626B8488369), UINT64_C(0x99B7E67A2A316A3D),
+ UINT64_C(0x3F7EDA43FEF22C01), UINT64_C(0x328F0A1F6C8BC555),
+ UINT64_C(0x259C7BFADA01FEA8), UINT64_C(0x286DABA6487817FC),
+ UINT64_C(0xA75829A7AEFD37F0), UINT64_C(0xAAA9F9FB3C84DEA4),
+ UINT64_C(0xBDBA881E8A0EE559), UINT64_C(0xB04B584218770C0D),
+ UINT64_C(0x1682647BCCB44A31), UINT64_C(0x1B73B4275ECDA365),
+ UINT64_C(0x0C60C5C2E8479898), UINT64_C(0x0191159E7A3E71CC),
+ UINT64_C(0x40F3BCB040C015E0), UINT64_C(0x4D026CECD2B9FCB4),
+ UINT64_C(0x5A111D096433C749), UINT64_C(0x57E0CD55F64A2E1D),
+ UINT64_C(0xF129F16C22896821), UINT64_C(0xFCD82130B0F08175),
+ UINT64_C(0xEBCB50D5067ABA88), UINT64_C(0xE63A8089940353DC),
+ UINT64_C(0xCDFFF96ABA9EEA11), UINT64_C(0xC00E293628E70345),
+ UINT64_C(0xD71D58D39E6D38B8), UINT64_C(0xDAEC888F0C14D1EC),
+ UINT64_C(0x7C25B4B6D8D797D0), UINT64_C(0x71D464EA4AAE7E84),
+ UINT64_C(0x66C7150FFC244579), UINT64_C(0x6B36C5536E5DAC2D),
+ UINT64_C(0x2A546C7D54A3C801), UINT64_C(0x27A5BC21C6DA2155),
+ UINT64_C(0x30B6CDC470501AA8), UINT64_C(0x3D471D98E229F3FC),
+ UINT64_C(0x9B8E21A136EAB5C0), UINT64_C(0x967FF1FDA4935C94),
+ UINT64_C(0x816C801812196769), UINT64_C(0x8C9D504480608E3D),
+ UINT64_C(0x03A8D24566E5AE31), UINT64_C(0x0E590219F49C4765),
+ UINT64_C(0x194A73FC42167C98), UINT64_C(0x14BBA3A0D06F95CC),
+ UINT64_C(0xB2729F9904ACD3F0), UINT64_C(0xBF834FC596D53AA4),
+ UINT64_C(0xA8903E20205F0159), UINT64_C(0xA561EE7CB226E80D),
+ UINT64_C(0xE403475288D88C21), UINT64_C(0xE9F2970E1AA16575),
+ UINT64_C(0xFEE1E6EBAC2B5E88), UINT64_C(0xF31036B73E52B7DC),
+ UINT64_C(0x55D90A8EEA91F1E0), UINT64_C(0x5828DAD278E818B4),
+ UINT64_C(0x4F3BAB37CE622349), UINT64_C(0x42CA7B6B5C1BCA1D),
+ UINT64_C(0x5150AF3402696251), UINT64_C(0x5CA17F6890108B05),
+ UINT64_C(0x4BB20E8D269AB0F8), UINT64_C(0x4643DED1B4E359AC),
+ UINT64_C(0xE08AE2E860201F90), UINT64_C(0xED7B32B4F259F6C4),
+ UINT64_C(0xFA68435144D3CD39), UINT64_C(0xF799930DD6AA246D),
+ UINT64_C(0xB6FB3A23EC544041), UINT64_C(0xBB0AEA7F7E2DA915),
+ UINT64_C(0xAC199B9AC8A792E8), UINT64_C(0xA1E84BC65ADE7BBC),
+ UINT64_C(0x072177FF8E1D3D80), UINT64_C(0x0AD0A7A31C64D4D4),
+ UINT64_C(0x1DC3D646AAEEEF29), UINT64_C(0x1032061A3897067D),
+ UINT64_C(0x9F07841BDE122671), UINT64_C(0x92F654474C6BCF25),
+ UINT64_C(0x85E525A2FAE1F4D8), UINT64_C(0x8814F5FE68981D8C),
+ UINT64_C(0x2EDDC9C7BC5B5BB0), UINT64_C(0x232C199B2E22B2E4),
+ UINT64_C(0x343F687E98A88919), UINT64_C(0x39CEB8220AD1604D),
+ UINT64_C(0x78AC110C302F0461), UINT64_C(0x755DC150A256ED35),
+ UINT64_C(0x624EB0B514DCD6C8), UINT64_C(0x6FBF60E986A53F9C),
+ UINT64_C(0xC9765CD0526679A0), UINT64_C(0xC4878C8CC01F90F4),
+ UINT64_C(0xD394FD697695AB09), UINT64_C(0xDE652D35E4EC425D)
+ }, {
+ UINT64_C(0x0000000000000000), UINT64_C(0xCB6D6A914AE10B3F),
+ UINT64_C(0x96DBD42295C2177E), UINT64_C(0x5DB6BEB3DF231C41),
+ UINT64_C(0x2CB7A9452A852FFC), UINT64_C(0xE7DAC3D4606424C3),
+ UINT64_C(0xBA6C7D67BF473882), UINT64_C(0x710117F6F5A633BD),
+ UINT64_C(0xDD705D247FA5876A), UINT64_C(0x161D37B535448C55),
+ UINT64_C(0x4BAB8906EA679014), UINT64_C(0x80C6E397A0869B2B),
+ UINT64_C(0xF1C7F4615520A896), UINT64_C(0x3AAA9EF01FC1A3A9),
+ UINT64_C(0x671C2043C0E2BFE8), UINT64_C(0xAC714AD28A03B4D7),
+ UINT64_C(0xBAE1BA48FE4A0FD5), UINT64_C(0x718CD0D9B4AB04EA),
+ UINT64_C(0x2C3A6E6A6B8818AB), UINT64_C(0xE75704FB21691394),
+ UINT64_C(0x9656130DD4CF2029), UINT64_C(0x5D3B799C9E2E2B16),
+ UINT64_C(0x008DC72F410D3757), UINT64_C(0xCBE0ADBE0BEC3C68),
+ UINT64_C(0x6791E76C81EF88BF), UINT64_C(0xACFC8DFDCB0E8380),
+ UINT64_C(0xF14A334E142D9FC1), UINT64_C(0x3A2759DF5ECC94FE),
+ UINT64_C(0x4B264E29AB6AA743), UINT64_C(0x804B24B8E18BAC7C),
+ UINT64_C(0xDDFD9A0B3EA8B03D), UINT64_C(0x1690F09A7449BB02),
+ UINT64_C(0xF1DD7B3ED73AC638), UINT64_C(0x3AB011AF9DDBCD07),
+ UINT64_C(0x6706AF1C42F8D146), UINT64_C(0xAC6BC58D0819DA79),
+ UINT64_C(0xDD6AD27BFDBFE9C4), UINT64_C(0x1607B8EAB75EE2FB),
+ UINT64_C(0x4BB10659687DFEBA), UINT64_C(0x80DC6CC8229CF585),
+ UINT64_C(0x2CAD261AA89F4152), UINT64_C(0xE7C04C8BE27E4A6D),
+ UINT64_C(0xBA76F2383D5D562C), UINT64_C(0x711B98A977BC5D13),
+ UINT64_C(0x001A8F5F821A6EAE), UINT64_C(0xCB77E5CEC8FB6591),
+ UINT64_C(0x96C15B7D17D879D0), UINT64_C(0x5DAC31EC5D3972EF),
+ UINT64_C(0x4B3CC1762970C9ED), UINT64_C(0x8051ABE76391C2D2),
+ UINT64_C(0xDDE71554BCB2DE93), UINT64_C(0x168A7FC5F653D5AC),
+ UINT64_C(0x678B683303F5E611), UINT64_C(0xACE602A24914ED2E),
+ UINT64_C(0xF150BC119637F16F), UINT64_C(0x3A3DD680DCD6FA50),
+ UINT64_C(0x964C9C5256D54E87), UINT64_C(0x5D21F6C31C3445B8),
+ UINT64_C(0x00974870C31759F9), UINT64_C(0xCBFA22E189F652C6),
+ UINT64_C(0xBAFB35177C50617B), UINT64_C(0x71965F8636B16A44),
+ UINT64_C(0x2C20E135E9927605), UINT64_C(0xE74D8BA4A3737D3A),
+ UINT64_C(0xE2BBF77CAE758C71), UINT64_C(0x29D69DEDE494874E),
+ UINT64_C(0x7460235E3BB79B0F), UINT64_C(0xBF0D49CF71569030),
+ UINT64_C(0xCE0C5E3984F0A38D), UINT64_C(0x056134A8CE11A8B2),
+ UINT64_C(0x58D78A1B1132B4F3), UINT64_C(0x93BAE08A5BD3BFCC),
+ UINT64_C(0x3FCBAA58D1D00B1B), UINT64_C(0xF4A6C0C99B310024),
+ UINT64_C(0xA9107E7A44121C65), UINT64_C(0x627D14EB0EF3175A),
+ UINT64_C(0x137C031DFB5524E7), UINT64_C(0xD811698CB1B42FD8),
+ UINT64_C(0x85A7D73F6E973399), UINT64_C(0x4ECABDAE247638A6),
+ UINT64_C(0x585A4D34503F83A4), UINT64_C(0x933727A51ADE889B),
+ UINT64_C(0xCE819916C5FD94DA), UINT64_C(0x05ECF3878F1C9FE5),
+ UINT64_C(0x74EDE4717ABAAC58), UINT64_C(0xBF808EE0305BA767),
+ UINT64_C(0xE2363053EF78BB26), UINT64_C(0x295B5AC2A599B019),
+ UINT64_C(0x852A10102F9A04CE), UINT64_C(0x4E477A81657B0FF1),
+ UINT64_C(0x13F1C432BA5813B0), UINT64_C(0xD89CAEA3F0B9188F),
+ UINT64_C(0xA99DB955051F2B32), UINT64_C(0x62F0D3C44FFE200D),
+ UINT64_C(0x3F466D7790DD3C4C), UINT64_C(0xF42B07E6DA3C3773),
+ UINT64_C(0x13668C42794F4A49), UINT64_C(0xD80BE6D333AE4176),
+ UINT64_C(0x85BD5860EC8D5D37), UINT64_C(0x4ED032F1A66C5608),
+ UINT64_C(0x3FD1250753CA65B5), UINT64_C(0xF4BC4F96192B6E8A),
+ UINT64_C(0xA90AF125C60872CB), UINT64_C(0x62679BB48CE979F4),
+ UINT64_C(0xCE16D16606EACD23), UINT64_C(0x057BBBF74C0BC61C),
+ UINT64_C(0x58CD05449328DA5D), UINT64_C(0x93A06FD5D9C9D162),
+ UINT64_C(0xE2A178232C6FE2DF), UINT64_C(0x29CC12B2668EE9E0),
+ UINT64_C(0x747AAC01B9ADF5A1), UINT64_C(0xBF17C690F34CFE9E),
+ UINT64_C(0xA987360A8705459C), UINT64_C(0x62EA5C9BCDE44EA3),
+ UINT64_C(0x3F5CE22812C752E2), UINT64_C(0xF43188B9582659DD),
+ UINT64_C(0x85309F4FAD806A60), UINT64_C(0x4E5DF5DEE761615F),
+ UINT64_C(0x13EB4B6D38427D1E), UINT64_C(0xD88621FC72A37621),
+ UINT64_C(0x74F76B2EF8A0C2F6), UINT64_C(0xBF9A01BFB241C9C9),
+ UINT64_C(0xE22CBF0C6D62D588), UINT64_C(0x2941D59D2783DEB7),
+ UINT64_C(0x5840C26BD225ED0A), UINT64_C(0x932DA8FA98C4E635),
+ UINT64_C(0xCE9B164947E7FA74), UINT64_C(0x05F67CD80D06F14B),
+ UINT64_C(0xC477EFF95CEB18E3), UINT64_C(0x0F1A8568160A13DC),
+ UINT64_C(0x52AC3BDBC9290F9D), UINT64_C(0x99C1514A83C804A2),
+ UINT64_C(0xE8C046BC766E371F), UINT64_C(0x23AD2C2D3C8F3C20),
+ UINT64_C(0x7E1B929EE3AC2061), UINT64_C(0xB576F80FA94D2B5E),
+ UINT64_C(0x1907B2DD234E9F89), UINT64_C(0xD26AD84C69AF94B6),
+ UINT64_C(0x8FDC66FFB68C88F7), UINT64_C(0x44B10C6EFC6D83C8),
+ UINT64_C(0x35B01B9809CBB075), UINT64_C(0xFEDD7109432ABB4A),
+ UINT64_C(0xA36BCFBA9C09A70B), UINT64_C(0x6806A52BD6E8AC34),
+ UINT64_C(0x7E9655B1A2A11736), UINT64_C(0xB5FB3F20E8401C09),
+ UINT64_C(0xE84D819337630048), UINT64_C(0x2320EB027D820B77),
+ UINT64_C(0x5221FCF4882438CA), UINT64_C(0x994C9665C2C533F5),
+ UINT64_C(0xC4FA28D61DE62FB4), UINT64_C(0x0F9742475707248B),
+ UINT64_C(0xA3E60895DD04905C), UINT64_C(0x688B620497E59B63),
+ UINT64_C(0x353DDCB748C68722), UINT64_C(0xFE50B62602278C1D),
+ UINT64_C(0x8F51A1D0F781BFA0), UINT64_C(0x443CCB41BD60B49F),
+ UINT64_C(0x198A75F26243A8DE), UINT64_C(0xD2E71F6328A2A3E1),
+ UINT64_C(0x35AA94C78BD1DEDB), UINT64_C(0xFEC7FE56C130D5E4),
+ UINT64_C(0xA37140E51E13C9A5), UINT64_C(0x681C2A7454F2C29A),
+ UINT64_C(0x191D3D82A154F127), UINT64_C(0xD2705713EBB5FA18),
+ UINT64_C(0x8FC6E9A03496E659), UINT64_C(0x44AB83317E77ED66),
+ UINT64_C(0xE8DAC9E3F47459B1), UINT64_C(0x23B7A372BE95528E),
+ UINT64_C(0x7E011DC161B64ECF), UINT64_C(0xB56C77502B5745F0),
+ UINT64_C(0xC46D60A6DEF1764D), UINT64_C(0x0F000A3794107D72),
+ UINT64_C(0x52B6B4844B336133), UINT64_C(0x99DBDE1501D26A0C),
+ UINT64_C(0x8F4B2E8F759BD10E), UINT64_C(0x4426441E3F7ADA31),
+ UINT64_C(0x1990FAADE059C670), UINT64_C(0xD2FD903CAAB8CD4F),
+ UINT64_C(0xA3FC87CA5F1EFEF2), UINT64_C(0x6891ED5B15FFF5CD),
+ UINT64_C(0x352753E8CADCE98C), UINT64_C(0xFE4A3979803DE2B3),
+ UINT64_C(0x523B73AB0A3E5664), UINT64_C(0x9956193A40DF5D5B),
+ UINT64_C(0xC4E0A7899FFC411A), UINT64_C(0x0F8DCD18D51D4A25),
+ UINT64_C(0x7E8CDAEE20BB7998), UINT64_C(0xB5E1B07F6A5A72A7),
+ UINT64_C(0xE8570ECCB5796EE6), UINT64_C(0x233A645DFF9865D9),
+ UINT64_C(0x26CC1885F29E9492), UINT64_C(0xEDA17214B87F9FAD),
+ UINT64_C(0xB017CCA7675C83EC), UINT64_C(0x7B7AA6362DBD88D3),
+ UINT64_C(0x0A7BB1C0D81BBB6E), UINT64_C(0xC116DB5192FAB051),
+ UINT64_C(0x9CA065E24DD9AC10), UINT64_C(0x57CD0F730738A72F),
+ UINT64_C(0xFBBC45A18D3B13F8), UINT64_C(0x30D12F30C7DA18C7),
+ UINT64_C(0x6D67918318F90486), UINT64_C(0xA60AFB1252180FB9),
+ UINT64_C(0xD70BECE4A7BE3C04), UINT64_C(0x1C668675ED5F373B),
+ UINT64_C(0x41D038C6327C2B7A), UINT64_C(0x8ABD5257789D2045),
+ UINT64_C(0x9C2DA2CD0CD49B47), UINT64_C(0x5740C85C46359078),
+ UINT64_C(0x0AF676EF99168C39), UINT64_C(0xC19B1C7ED3F78706),
+ UINT64_C(0xB09A0B882651B4BB), UINT64_C(0x7BF761196CB0BF84),
+ UINT64_C(0x2641DFAAB393A3C5), UINT64_C(0xED2CB53BF972A8FA),
+ UINT64_C(0x415DFFE973711C2D), UINT64_C(0x8A30957839901712),
+ UINT64_C(0xD7862BCBE6B30B53), UINT64_C(0x1CEB415AAC52006C),
+ UINT64_C(0x6DEA56AC59F433D1), UINT64_C(0xA6873C3D131538EE),
+ UINT64_C(0xFB31828ECC3624AF), UINT64_C(0x305CE81F86D72F90),
+ UINT64_C(0xD71163BB25A452AA), UINT64_C(0x1C7C092A6F455995),
+ UINT64_C(0x41CAB799B06645D4), UINT64_C(0x8AA7DD08FA874EEB),
+ UINT64_C(0xFBA6CAFE0F217D56), UINT64_C(0x30CBA06F45C07669),
+ UINT64_C(0x6D7D1EDC9AE36A28), UINT64_C(0xA610744DD0026117),
+ UINT64_C(0x0A613E9F5A01D5C0), UINT64_C(0xC10C540E10E0DEFF),
+ UINT64_C(0x9CBAEABDCFC3C2BE), UINT64_C(0x57D7802C8522C981),
+ UINT64_C(0x26D697DA7084FA3C), UINT64_C(0xEDBBFD4B3A65F103),
+ UINT64_C(0xB00D43F8E546ED42), UINT64_C(0x7B602969AFA7E67D),
+ UINT64_C(0x6DF0D9F3DBEE5D7F), UINT64_C(0xA69DB362910F5640),
+ UINT64_C(0xFB2B0DD14E2C4A01), UINT64_C(0x3046674004CD413E),
+ UINT64_C(0x414770B6F16B7283), UINT64_C(0x8A2A1A27BB8A79BC),
+ UINT64_C(0xD79CA49464A965FD), UINT64_C(0x1CF1CE052E486EC2),
+ UINT64_C(0xB08084D7A44BDA15), UINT64_C(0x7BEDEE46EEAAD12A),
+ UINT64_C(0x265B50F53189CD6B), UINT64_C(0xED363A647B68C654),
+ UINT64_C(0x9C372D928ECEF5E9), UINT64_C(0x575A4703C42FFED6),
+ UINT64_C(0x0AECF9B01B0CE297), UINT64_C(0xC181932151EDE9A8)
+ }, {
+ UINT64_C(0x0000000000000000), UINT64_C(0xDCA12C225E8AEE1D),
+ UINT64_C(0xB8435944BC14DD3B), UINT64_C(0x64E27566E29E3326),
+ UINT64_C(0x7087B2887829BA77), UINT64_C(0xAC269EAA26A3546A),
+ UINT64_C(0xC8C4EBCCC43D674C), UINT64_C(0x1465C7EE9AB78951),
+ UINT64_C(0xE00E6511F15274EF), UINT64_C(0x3CAF4933AFD89AF2),
+ UINT64_C(0x584D3C554D46A9D4), UINT64_C(0x84EC107713CC47C9),
+ UINT64_C(0x9089D799897BCE98), UINT64_C(0x4C28FBBBD7F12085),
+ UINT64_C(0x28CA8EDD356F13A3), UINT64_C(0xF46BA2FF6BE5FDBE),
+ UINT64_C(0x4503C48DC90A304C), UINT64_C(0x99A2E8AF9780DE51),
+ UINT64_C(0xFD409DC9751EED77), UINT64_C(0x21E1B1EB2B94036A),
+ UINT64_C(0x35847605B1238A3B), UINT64_C(0xE9255A27EFA96426),
+ UINT64_C(0x8DC72F410D375700), UINT64_C(0x5166036353BDB91D),
+ UINT64_C(0xA50DA19C385844A3), UINT64_C(0x79AC8DBE66D2AABE),
+ UINT64_C(0x1D4EF8D8844C9998), UINT64_C(0xC1EFD4FADAC67785),
+ UINT64_C(0xD58A13144071FED4), UINT64_C(0x092B3F361EFB10C9),
+ UINT64_C(0x6DC94A50FC6523EF), UINT64_C(0xB1686672A2EFCDF2),
+ UINT64_C(0x8A06881B93156098), UINT64_C(0x56A7A439CD9F8E85),
+ UINT64_C(0x3245D15F2F01BDA3), UINT64_C(0xEEE4FD7D718B53BE),
+ UINT64_C(0xFA813A93EB3CDAEF), UINT64_C(0x262016B1B5B634F2),
+ UINT64_C(0x42C263D7572807D4), UINT64_C(0x9E634FF509A2E9C9),
+ UINT64_C(0x6A08ED0A62471477), UINT64_C(0xB6A9C1283CCDFA6A),
+ UINT64_C(0xD24BB44EDE53C94C), UINT64_C(0x0EEA986C80D92751),
+ UINT64_C(0x1A8F5F821A6EAE00), UINT64_C(0xC62E73A044E4401D),
+ UINT64_C(0xA2CC06C6A67A733B), UINT64_C(0x7E6D2AE4F8F09D26),
+ UINT64_C(0xCF054C965A1F50D4), UINT64_C(0x13A460B40495BEC9),
+ UINT64_C(0x774615D2E60B8DEF), UINT64_C(0xABE739F0B88163F2),
+ UINT64_C(0xBF82FE1E2236EAA3), UINT64_C(0x6323D23C7CBC04BE),
+ UINT64_C(0x07C1A75A9E223798), UINT64_C(0xDB608B78C0A8D985),
+ UINT64_C(0x2F0B2987AB4D243B), UINT64_C(0xF3AA05A5F5C7CA26),
+ UINT64_C(0x974870C31759F900), UINT64_C(0x4BE95CE149D3171D),
+ UINT64_C(0x5F8C9B0FD3649E4C), UINT64_C(0x832DB72D8DEE7051),
+ UINT64_C(0xE7CFC24B6F704377), UINT64_C(0x3B6EEE6931FAAD6A),
+ UINT64_C(0x91131E980D8418A2), UINT64_C(0x4DB232BA530EF6BF),
+ UINT64_C(0x295047DCB190C599), UINT64_C(0xF5F16BFEEF1A2B84),
+ UINT64_C(0xE194AC1075ADA2D5), UINT64_C(0x3D3580322B274CC8),
+ UINT64_C(0x59D7F554C9B97FEE), UINT64_C(0x8576D976973391F3),
+ UINT64_C(0x711D7B89FCD66C4D), UINT64_C(0xADBC57ABA25C8250),
+ UINT64_C(0xC95E22CD40C2B176), UINT64_C(0x15FF0EEF1E485F6B),
+ UINT64_C(0x019AC90184FFD63A), UINT64_C(0xDD3BE523DA753827),
+ UINT64_C(0xB9D9904538EB0B01), UINT64_C(0x6578BC676661E51C),
+ UINT64_C(0xD410DA15C48E28EE), UINT64_C(0x08B1F6379A04C6F3),
+ UINT64_C(0x6C538351789AF5D5), UINT64_C(0xB0F2AF7326101BC8),
+ UINT64_C(0xA497689DBCA79299), UINT64_C(0x783644BFE22D7C84),
+ UINT64_C(0x1CD431D900B34FA2), UINT64_C(0xC0751DFB5E39A1BF),
+ UINT64_C(0x341EBF0435DC5C01), UINT64_C(0xE8BF93266B56B21C),
+ UINT64_C(0x8C5DE64089C8813A), UINT64_C(0x50FCCA62D7426F27),
+ UINT64_C(0x44990D8C4DF5E676), UINT64_C(0x983821AE137F086B),
+ UINT64_C(0xFCDA54C8F1E13B4D), UINT64_C(0x207B78EAAF6BD550),
+ UINT64_C(0x1B1596839E91783A), UINT64_C(0xC7B4BAA1C01B9627),
+ UINT64_C(0xA356CFC72285A501), UINT64_C(0x7FF7E3E57C0F4B1C),
+ UINT64_C(0x6B92240BE6B8C24D), UINT64_C(0xB7330829B8322C50),
+ UINT64_C(0xD3D17D4F5AAC1F76), UINT64_C(0x0F70516D0426F16B),
+ UINT64_C(0xFB1BF3926FC30CD5), UINT64_C(0x27BADFB03149E2C8),
+ UINT64_C(0x4358AAD6D3D7D1EE), UINT64_C(0x9FF986F48D5D3FF3),
+ UINT64_C(0x8B9C411A17EAB6A2), UINT64_C(0x573D6D38496058BF),
+ UINT64_C(0x33DF185EABFE6B99), UINT64_C(0xEF7E347CF5748584),
+ UINT64_C(0x5E16520E579B4876), UINT64_C(0x82B77E2C0911A66B),
+ UINT64_C(0xE6550B4AEB8F954D), UINT64_C(0x3AF42768B5057B50),
+ UINT64_C(0x2E91E0862FB2F201), UINT64_C(0xF230CCA471381C1C),
+ UINT64_C(0x96D2B9C293A62F3A), UINT64_C(0x4A7395E0CD2CC127),
+ UINT64_C(0xBE18371FA6C93C99), UINT64_C(0x62B91B3DF843D284),
+ UINT64_C(0x065B6E5B1ADDE1A2), UINT64_C(0xDAFA427944570FBF),
+ UINT64_C(0xCE9F8597DEE086EE), UINT64_C(0x123EA9B5806A68F3),
+ UINT64_C(0x76DCDCD362F45BD5), UINT64_C(0xAA7DF0F13C7EB5C8),
+ UINT64_C(0xA739329F30A7E9D6), UINT64_C(0x7B981EBD6E2D07CB),
+ UINT64_C(0x1F7A6BDB8CB334ED), UINT64_C(0xC3DB47F9D239DAF0),
+ UINT64_C(0xD7BE8017488E53A1), UINT64_C(0x0B1FAC351604BDBC),
+ UINT64_C(0x6FFDD953F49A8E9A), UINT64_C(0xB35CF571AA106087),
+ UINT64_C(0x4737578EC1F59D39), UINT64_C(0x9B967BAC9F7F7324),
+ UINT64_C(0xFF740ECA7DE14002), UINT64_C(0x23D522E8236BAE1F),
+ UINT64_C(0x37B0E506B9DC274E), UINT64_C(0xEB11C924E756C953),
+ UINT64_C(0x8FF3BC4205C8FA75), UINT64_C(0x535290605B421468),
+ UINT64_C(0xE23AF612F9ADD99A), UINT64_C(0x3E9BDA30A7273787),
+ UINT64_C(0x5A79AF5645B904A1), UINT64_C(0x86D883741B33EABC),
+ UINT64_C(0x92BD449A818463ED), UINT64_C(0x4E1C68B8DF0E8DF0),
+ UINT64_C(0x2AFE1DDE3D90BED6), UINT64_C(0xF65F31FC631A50CB),
+ UINT64_C(0x0234930308FFAD75), UINT64_C(0xDE95BF2156754368),
+ UINT64_C(0xBA77CA47B4EB704E), UINT64_C(0x66D6E665EA619E53),
+ UINT64_C(0x72B3218B70D61702), UINT64_C(0xAE120DA92E5CF91F),
+ UINT64_C(0xCAF078CFCCC2CA39), UINT64_C(0x165154ED92482424),
+ UINT64_C(0x2D3FBA84A3B2894E), UINT64_C(0xF19E96A6FD386753),
+ UINT64_C(0x957CE3C01FA65475), UINT64_C(0x49DDCFE2412CBA68),
+ UINT64_C(0x5DB8080CDB9B3339), UINT64_C(0x8119242E8511DD24),
+ UINT64_C(0xE5FB5148678FEE02), UINT64_C(0x395A7D6A3905001F),
+ UINT64_C(0xCD31DF9552E0FDA1), UINT64_C(0x1190F3B70C6A13BC),
+ UINT64_C(0x757286D1EEF4209A), UINT64_C(0xA9D3AAF3B07ECE87),
+ UINT64_C(0xBDB66D1D2AC947D6), UINT64_C(0x6117413F7443A9CB),
+ UINT64_C(0x05F5345996DD9AED), UINT64_C(0xD954187BC85774F0),
+ UINT64_C(0x683C7E096AB8B902), UINT64_C(0xB49D522B3432571F),
+ UINT64_C(0xD07F274DD6AC6439), UINT64_C(0x0CDE0B6F88268A24),
+ UINT64_C(0x18BBCC8112910375), UINT64_C(0xC41AE0A34C1BED68),
+ UINT64_C(0xA0F895C5AE85DE4E), UINT64_C(0x7C59B9E7F00F3053),
+ UINT64_C(0x88321B189BEACDED), UINT64_C(0x5493373AC56023F0),
+ UINT64_C(0x3071425C27FE10D6), UINT64_C(0xECD06E7E7974FECB),
+ UINT64_C(0xF8B5A990E3C3779A), UINT64_C(0x241485B2BD499987),
+ UINT64_C(0x40F6F0D45FD7AAA1), UINT64_C(0x9C57DCF6015D44BC),
+ UINT64_C(0x362A2C073D23F174), UINT64_C(0xEA8B002563A91F69),
+ UINT64_C(0x8E69754381372C4F), UINT64_C(0x52C85961DFBDC252),
+ UINT64_C(0x46AD9E8F450A4B03), UINT64_C(0x9A0CB2AD1B80A51E),
+ UINT64_C(0xFEEEC7CBF91E9638), UINT64_C(0x224FEBE9A7947825),
+ UINT64_C(0xD6244916CC71859B), UINT64_C(0x0A85653492FB6B86),
+ UINT64_C(0x6E671052706558A0), UINT64_C(0xB2C63C702EEFB6BD),
+ UINT64_C(0xA6A3FB9EB4583FEC), UINT64_C(0x7A02D7BCEAD2D1F1),
+ UINT64_C(0x1EE0A2DA084CE2D7), UINT64_C(0xC2418EF856C60CCA),
+ UINT64_C(0x7329E88AF429C138), UINT64_C(0xAF88C4A8AAA32F25),
+ UINT64_C(0xCB6AB1CE483D1C03), UINT64_C(0x17CB9DEC16B7F21E),
+ UINT64_C(0x03AE5A028C007B4F), UINT64_C(0xDF0F7620D28A9552),
+ UINT64_C(0xBBED03463014A674), UINT64_C(0x674C2F646E9E4869),
+ UINT64_C(0x93278D9B057BB5D7), UINT64_C(0x4F86A1B95BF15BCA),
+ UINT64_C(0x2B64D4DFB96F68EC), UINT64_C(0xF7C5F8FDE7E586F1),
+ UINT64_C(0xE3A03F137D520FA0), UINT64_C(0x3F01133123D8E1BD),
+ UINT64_C(0x5BE36657C146D29B), UINT64_C(0x87424A759FCC3C86),
+ UINT64_C(0xBC2CA41CAE3691EC), UINT64_C(0x608D883EF0BC7FF1),
+ UINT64_C(0x046FFD5812224CD7), UINT64_C(0xD8CED17A4CA8A2CA),
+ UINT64_C(0xCCAB1694D61F2B9B), UINT64_C(0x100A3AB68895C586),
+ UINT64_C(0x74E84FD06A0BF6A0), UINT64_C(0xA84963F2348118BD),
+ UINT64_C(0x5C22C10D5F64E503), UINT64_C(0x8083ED2F01EE0B1E),
+ UINT64_C(0xE4619849E3703838), UINT64_C(0x38C0B46BBDFAD625),
+ UINT64_C(0x2CA57385274D5F74), UINT64_C(0xF0045FA779C7B169),
+ UINT64_C(0x94E62AC19B59824F), UINT64_C(0x484706E3C5D36C52),
+ UINT64_C(0xF92F6091673CA1A0), UINT64_C(0x258E4CB339B64FBD),
+ UINT64_C(0x416C39D5DB287C9B), UINT64_C(0x9DCD15F785A29286),
+ UINT64_C(0x89A8D2191F151BD7), UINT64_C(0x5509FE3B419FF5CA),
+ UINT64_C(0x31EB8B5DA301C6EC), UINT64_C(0xED4AA77FFD8B28F1),
+ UINT64_C(0x19210580966ED54F), UINT64_C(0xC58029A2C8E43B52),
+ UINT64_C(0xA1625CC42A7A0874), UINT64_C(0x7DC370E674F0E669),
+ UINT64_C(0x69A6B708EE476F38), UINT64_C(0xB5079B2AB0CD8125),
+ UINT64_C(0xD1E5EE4C5253B203), UINT64_C(0x0D44C26E0CD95C1E)
+ }
+};
diff --git a/src/liblzma/check/crc64_table_le.h b/src/liblzma/check/crc64_table_le.h
new file mode 100644
index 0000000..1196b31
--- /dev/null
+++ b/src/liblzma/check/crc64_table_le.h
@@ -0,0 +1,521 @@
+/* This file has been automatically generated by crc64_tablegen.c. */
+
+const uint64_t lzma_crc64_table[4][256] = {
+ {
+ UINT64_C(0x0000000000000000), UINT64_C(0xB32E4CBE03A75F6F),
+ UINT64_C(0xF4843657A840A05B), UINT64_C(0x47AA7AE9ABE7FF34),
+ UINT64_C(0x7BD0C384FF8F5E33), UINT64_C(0xC8FE8F3AFC28015C),
+ UINT64_C(0x8F54F5D357CFFE68), UINT64_C(0x3C7AB96D5468A107),
+ UINT64_C(0xF7A18709FF1EBC66), UINT64_C(0x448FCBB7FCB9E309),
+ UINT64_C(0x0325B15E575E1C3D), UINT64_C(0xB00BFDE054F94352),
+ UINT64_C(0x8C71448D0091E255), UINT64_C(0x3F5F08330336BD3A),
+ UINT64_C(0x78F572DAA8D1420E), UINT64_C(0xCBDB3E64AB761D61),
+ UINT64_C(0x7D9BA13851336649), UINT64_C(0xCEB5ED8652943926),
+ UINT64_C(0x891F976FF973C612), UINT64_C(0x3A31DBD1FAD4997D),
+ UINT64_C(0x064B62BCAEBC387A), UINT64_C(0xB5652E02AD1B6715),
+ UINT64_C(0xF2CF54EB06FC9821), UINT64_C(0x41E11855055BC74E),
+ UINT64_C(0x8A3A2631AE2DDA2F), UINT64_C(0x39146A8FAD8A8540),
+ UINT64_C(0x7EBE1066066D7A74), UINT64_C(0xCD905CD805CA251B),
+ UINT64_C(0xF1EAE5B551A2841C), UINT64_C(0x42C4A90B5205DB73),
+ UINT64_C(0x056ED3E2F9E22447), UINT64_C(0xB6409F5CFA457B28),
+ UINT64_C(0xFB374270A266CC92), UINT64_C(0x48190ECEA1C193FD),
+ UINT64_C(0x0FB374270A266CC9), UINT64_C(0xBC9D3899098133A6),
+ UINT64_C(0x80E781F45DE992A1), UINT64_C(0x33C9CD4A5E4ECDCE),
+ UINT64_C(0x7463B7A3F5A932FA), UINT64_C(0xC74DFB1DF60E6D95),
+ UINT64_C(0x0C96C5795D7870F4), UINT64_C(0xBFB889C75EDF2F9B),
+ UINT64_C(0xF812F32EF538D0AF), UINT64_C(0x4B3CBF90F69F8FC0),
+ UINT64_C(0x774606FDA2F72EC7), UINT64_C(0xC4684A43A15071A8),
+ UINT64_C(0x83C230AA0AB78E9C), UINT64_C(0x30EC7C140910D1F3),
+ UINT64_C(0x86ACE348F355AADB), UINT64_C(0x3582AFF6F0F2F5B4),
+ UINT64_C(0x7228D51F5B150A80), UINT64_C(0xC10699A158B255EF),
+ UINT64_C(0xFD7C20CC0CDAF4E8), UINT64_C(0x4E526C720F7DAB87),
+ UINT64_C(0x09F8169BA49A54B3), UINT64_C(0xBAD65A25A73D0BDC),
+ UINT64_C(0x710D64410C4B16BD), UINT64_C(0xC22328FF0FEC49D2),
+ UINT64_C(0x85895216A40BB6E6), UINT64_C(0x36A71EA8A7ACE989),
+ UINT64_C(0x0ADDA7C5F3C4488E), UINT64_C(0xB9F3EB7BF06317E1),
+ UINT64_C(0xFE5991925B84E8D5), UINT64_C(0x4D77DD2C5823B7BA),
+ UINT64_C(0x64B62BCAEBC387A1), UINT64_C(0xD7986774E864D8CE),
+ UINT64_C(0x90321D9D438327FA), UINT64_C(0x231C512340247895),
+ UINT64_C(0x1F66E84E144CD992), UINT64_C(0xAC48A4F017EB86FD),
+ UINT64_C(0xEBE2DE19BC0C79C9), UINT64_C(0x58CC92A7BFAB26A6),
+ UINT64_C(0x9317ACC314DD3BC7), UINT64_C(0x2039E07D177A64A8),
+ UINT64_C(0x67939A94BC9D9B9C), UINT64_C(0xD4BDD62ABF3AC4F3),
+ UINT64_C(0xE8C76F47EB5265F4), UINT64_C(0x5BE923F9E8F53A9B),
+ UINT64_C(0x1C4359104312C5AF), UINT64_C(0xAF6D15AE40B59AC0),
+ UINT64_C(0x192D8AF2BAF0E1E8), UINT64_C(0xAA03C64CB957BE87),
+ UINT64_C(0xEDA9BCA512B041B3), UINT64_C(0x5E87F01B11171EDC),
+ UINT64_C(0x62FD4976457FBFDB), UINT64_C(0xD1D305C846D8E0B4),
+ UINT64_C(0x96797F21ED3F1F80), UINT64_C(0x2557339FEE9840EF),
+ UINT64_C(0xEE8C0DFB45EE5D8E), UINT64_C(0x5DA24145464902E1),
+ UINT64_C(0x1A083BACEDAEFDD5), UINT64_C(0xA9267712EE09A2BA),
+ UINT64_C(0x955CCE7FBA6103BD), UINT64_C(0x267282C1B9C65CD2),
+ UINT64_C(0x61D8F8281221A3E6), UINT64_C(0xD2F6B4961186FC89),
+ UINT64_C(0x9F8169BA49A54B33), UINT64_C(0x2CAF25044A02145C),
+ UINT64_C(0x6B055FEDE1E5EB68), UINT64_C(0xD82B1353E242B407),
+ UINT64_C(0xE451AA3EB62A1500), UINT64_C(0x577FE680B58D4A6F),
+ UINT64_C(0x10D59C691E6AB55B), UINT64_C(0xA3FBD0D71DCDEA34),
+ UINT64_C(0x6820EEB3B6BBF755), UINT64_C(0xDB0EA20DB51CA83A),
+ UINT64_C(0x9CA4D8E41EFB570E), UINT64_C(0x2F8A945A1D5C0861),
+ UINT64_C(0x13F02D374934A966), UINT64_C(0xA0DE61894A93F609),
+ UINT64_C(0xE7741B60E174093D), UINT64_C(0x545A57DEE2D35652),
+ UINT64_C(0xE21AC88218962D7A), UINT64_C(0x5134843C1B317215),
+ UINT64_C(0x169EFED5B0D68D21), UINT64_C(0xA5B0B26BB371D24E),
+ UINT64_C(0x99CA0B06E7197349), UINT64_C(0x2AE447B8E4BE2C26),
+ UINT64_C(0x6D4E3D514F59D312), UINT64_C(0xDE6071EF4CFE8C7D),
+ UINT64_C(0x15BB4F8BE788911C), UINT64_C(0xA6950335E42FCE73),
+ UINT64_C(0xE13F79DC4FC83147), UINT64_C(0x521135624C6F6E28),
+ UINT64_C(0x6E6B8C0F1807CF2F), UINT64_C(0xDD45C0B11BA09040),
+ UINT64_C(0x9AEFBA58B0476F74), UINT64_C(0x29C1F6E6B3E0301B),
+ UINT64_C(0xC96C5795D7870F42), UINT64_C(0x7A421B2BD420502D),
+ UINT64_C(0x3DE861C27FC7AF19), UINT64_C(0x8EC62D7C7C60F076),
+ UINT64_C(0xB2BC941128085171), UINT64_C(0x0192D8AF2BAF0E1E),
+ UINT64_C(0x4638A2468048F12A), UINT64_C(0xF516EEF883EFAE45),
+ UINT64_C(0x3ECDD09C2899B324), UINT64_C(0x8DE39C222B3EEC4B),
+ UINT64_C(0xCA49E6CB80D9137F), UINT64_C(0x7967AA75837E4C10),
+ UINT64_C(0x451D1318D716ED17), UINT64_C(0xF6335FA6D4B1B278),
+ UINT64_C(0xB199254F7F564D4C), UINT64_C(0x02B769F17CF11223),
+ UINT64_C(0xB4F7F6AD86B4690B), UINT64_C(0x07D9BA1385133664),
+ UINT64_C(0x4073C0FA2EF4C950), UINT64_C(0xF35D8C442D53963F),
+ UINT64_C(0xCF273529793B3738), UINT64_C(0x7C0979977A9C6857),
+ UINT64_C(0x3BA3037ED17B9763), UINT64_C(0x888D4FC0D2DCC80C),
+ UINT64_C(0x435671A479AAD56D), UINT64_C(0xF0783D1A7A0D8A02),
+ UINT64_C(0xB7D247F3D1EA7536), UINT64_C(0x04FC0B4DD24D2A59),
+ UINT64_C(0x3886B22086258B5E), UINT64_C(0x8BA8FE9E8582D431),
+ UINT64_C(0xCC0284772E652B05), UINT64_C(0x7F2CC8C92DC2746A),
+ UINT64_C(0x325B15E575E1C3D0), UINT64_C(0x8175595B76469CBF),
+ UINT64_C(0xC6DF23B2DDA1638B), UINT64_C(0x75F16F0CDE063CE4),
+ UINT64_C(0x498BD6618A6E9DE3), UINT64_C(0xFAA59ADF89C9C28C),
+ UINT64_C(0xBD0FE036222E3DB8), UINT64_C(0x0E21AC88218962D7),
+ UINT64_C(0xC5FA92EC8AFF7FB6), UINT64_C(0x76D4DE52895820D9),
+ UINT64_C(0x317EA4BB22BFDFED), UINT64_C(0x8250E80521188082),
+ UINT64_C(0xBE2A516875702185), UINT64_C(0x0D041DD676D77EEA),
+ UINT64_C(0x4AAE673FDD3081DE), UINT64_C(0xF9802B81DE97DEB1),
+ UINT64_C(0x4FC0B4DD24D2A599), UINT64_C(0xFCEEF8632775FAF6),
+ UINT64_C(0xBB44828A8C9205C2), UINT64_C(0x086ACE348F355AAD),
+ UINT64_C(0x34107759DB5DFBAA), UINT64_C(0x873E3BE7D8FAA4C5),
+ UINT64_C(0xC094410E731D5BF1), UINT64_C(0x73BA0DB070BA049E),
+ UINT64_C(0xB86133D4DBCC19FF), UINT64_C(0x0B4F7F6AD86B4690),
+ UINT64_C(0x4CE50583738CB9A4), UINT64_C(0xFFCB493D702BE6CB),
+ UINT64_C(0xC3B1F050244347CC), UINT64_C(0x709FBCEE27E418A3),
+ UINT64_C(0x3735C6078C03E797), UINT64_C(0x841B8AB98FA4B8F8),
+ UINT64_C(0xADDA7C5F3C4488E3), UINT64_C(0x1EF430E13FE3D78C),
+ UINT64_C(0x595E4A08940428B8), UINT64_C(0xEA7006B697A377D7),
+ UINT64_C(0xD60ABFDBC3CBD6D0), UINT64_C(0x6524F365C06C89BF),
+ UINT64_C(0x228E898C6B8B768B), UINT64_C(0x91A0C532682C29E4),
+ UINT64_C(0x5A7BFB56C35A3485), UINT64_C(0xE955B7E8C0FD6BEA),
+ UINT64_C(0xAEFFCD016B1A94DE), UINT64_C(0x1DD181BF68BDCBB1),
+ UINT64_C(0x21AB38D23CD56AB6), UINT64_C(0x9285746C3F7235D9),
+ UINT64_C(0xD52F0E859495CAED), UINT64_C(0x6601423B97329582),
+ UINT64_C(0xD041DD676D77EEAA), UINT64_C(0x636F91D96ED0B1C5),
+ UINT64_C(0x24C5EB30C5374EF1), UINT64_C(0x97EBA78EC690119E),
+ UINT64_C(0xAB911EE392F8B099), UINT64_C(0x18BF525D915FEFF6),
+ UINT64_C(0x5F1528B43AB810C2), UINT64_C(0xEC3B640A391F4FAD),
+ UINT64_C(0x27E05A6E926952CC), UINT64_C(0x94CE16D091CE0DA3),
+ UINT64_C(0xD3646C393A29F297), UINT64_C(0x604A2087398EADF8),
+ UINT64_C(0x5C3099EA6DE60CFF), UINT64_C(0xEF1ED5546E415390),
+ UINT64_C(0xA8B4AFBDC5A6ACA4), UINT64_C(0x1B9AE303C601F3CB),
+ UINT64_C(0x56ED3E2F9E224471), UINT64_C(0xE5C372919D851B1E),
+ UINT64_C(0xA26908783662E42A), UINT64_C(0x114744C635C5BB45),
+ UINT64_C(0x2D3DFDAB61AD1A42), UINT64_C(0x9E13B115620A452D),
+ UINT64_C(0xD9B9CBFCC9EDBA19), UINT64_C(0x6A978742CA4AE576),
+ UINT64_C(0xA14CB926613CF817), UINT64_C(0x1262F598629BA778),
+ UINT64_C(0x55C88F71C97C584C), UINT64_C(0xE6E6C3CFCADB0723),
+ UINT64_C(0xDA9C7AA29EB3A624), UINT64_C(0x69B2361C9D14F94B),
+ UINT64_C(0x2E184CF536F3067F), UINT64_C(0x9D36004B35545910),
+ UINT64_C(0x2B769F17CF112238), UINT64_C(0x9858D3A9CCB67D57),
+ UINT64_C(0xDFF2A94067518263), UINT64_C(0x6CDCE5FE64F6DD0C),
+ UINT64_C(0x50A65C93309E7C0B), UINT64_C(0xE388102D33392364),
+ UINT64_C(0xA4226AC498DEDC50), UINT64_C(0x170C267A9B79833F),
+ UINT64_C(0xDCD7181E300F9E5E), UINT64_C(0x6FF954A033A8C131),
+ UINT64_C(0x28532E49984F3E05), UINT64_C(0x9B7D62F79BE8616A),
+ UINT64_C(0xA707DB9ACF80C06D), UINT64_C(0x14299724CC279F02),
+ UINT64_C(0x5383EDCD67C06036), UINT64_C(0xE0ADA17364673F59)
+ }, {
+ UINT64_C(0x0000000000000000), UINT64_C(0x54E979925CD0F10D),
+ UINT64_C(0xA9D2F324B9A1E21A), UINT64_C(0xFD3B8AB6E5711317),
+ UINT64_C(0xC17D4962DC4DDAB1), UINT64_C(0x959430F0809D2BBC),
+ UINT64_C(0x68AFBA4665EC38AB), UINT64_C(0x3C46C3D4393CC9A6),
+ UINT64_C(0x10223DEE1795ABE7), UINT64_C(0x44CB447C4B455AEA),
+ UINT64_C(0xB9F0CECAAE3449FD), UINT64_C(0xED19B758F2E4B8F0),
+ UINT64_C(0xD15F748CCBD87156), UINT64_C(0x85B60D1E9708805B),
+ UINT64_C(0x788D87A87279934C), UINT64_C(0x2C64FE3A2EA96241),
+ UINT64_C(0x20447BDC2F2B57CE), UINT64_C(0x74AD024E73FBA6C3),
+ UINT64_C(0x899688F8968AB5D4), UINT64_C(0xDD7FF16ACA5A44D9),
+ UINT64_C(0xE13932BEF3668D7F), UINT64_C(0xB5D04B2CAFB67C72),
+ UINT64_C(0x48EBC19A4AC76F65), UINT64_C(0x1C02B80816179E68),
+ UINT64_C(0x3066463238BEFC29), UINT64_C(0x648F3FA0646E0D24),
+ UINT64_C(0x99B4B516811F1E33), UINT64_C(0xCD5DCC84DDCFEF3E),
+ UINT64_C(0xF11B0F50E4F32698), UINT64_C(0xA5F276C2B823D795),
+ UINT64_C(0x58C9FC745D52C482), UINT64_C(0x0C2085E60182358F),
+ UINT64_C(0x4088F7B85E56AF9C), UINT64_C(0x14618E2A02865E91),
+ UINT64_C(0xE95A049CE7F74D86), UINT64_C(0xBDB37D0EBB27BC8B),
+ UINT64_C(0x81F5BEDA821B752D), UINT64_C(0xD51CC748DECB8420),
+ UINT64_C(0x28274DFE3BBA9737), UINT64_C(0x7CCE346C676A663A),
+ UINT64_C(0x50AACA5649C3047B), UINT64_C(0x0443B3C41513F576),
+ UINT64_C(0xF9783972F062E661), UINT64_C(0xAD9140E0ACB2176C),
+ UINT64_C(0x91D78334958EDECA), UINT64_C(0xC53EFAA6C95E2FC7),
+ UINT64_C(0x380570102C2F3CD0), UINT64_C(0x6CEC098270FFCDDD),
+ UINT64_C(0x60CC8C64717DF852), UINT64_C(0x3425F5F62DAD095F),
+ UINT64_C(0xC91E7F40C8DC1A48), UINT64_C(0x9DF706D2940CEB45),
+ UINT64_C(0xA1B1C506AD3022E3), UINT64_C(0xF558BC94F1E0D3EE),
+ UINT64_C(0x086336221491C0F9), UINT64_C(0x5C8A4FB0484131F4),
+ UINT64_C(0x70EEB18A66E853B5), UINT64_C(0x2407C8183A38A2B8),
+ UINT64_C(0xD93C42AEDF49B1AF), UINT64_C(0x8DD53B3C839940A2),
+ UINT64_C(0xB193F8E8BAA58904), UINT64_C(0xE57A817AE6757809),
+ UINT64_C(0x18410BCC03046B1E), UINT64_C(0x4CA8725E5FD49A13),
+ UINT64_C(0x8111EF70BCAD5F38), UINT64_C(0xD5F896E2E07DAE35),
+ UINT64_C(0x28C31C54050CBD22), UINT64_C(0x7C2A65C659DC4C2F),
+ UINT64_C(0x406CA61260E08589), UINT64_C(0x1485DF803C307484),
+ UINT64_C(0xE9BE5536D9416793), UINT64_C(0xBD572CA48591969E),
+ UINT64_C(0x9133D29EAB38F4DF), UINT64_C(0xC5DAAB0CF7E805D2),
+ UINT64_C(0x38E121BA129916C5), UINT64_C(0x6C0858284E49E7C8),
+ UINT64_C(0x504E9BFC77752E6E), UINT64_C(0x04A7E26E2BA5DF63),
+ UINT64_C(0xF99C68D8CED4CC74), UINT64_C(0xAD75114A92043D79),
+ UINT64_C(0xA15594AC938608F6), UINT64_C(0xF5BCED3ECF56F9FB),
+ UINT64_C(0x088767882A27EAEC), UINT64_C(0x5C6E1E1A76F71BE1),
+ UINT64_C(0x6028DDCE4FCBD247), UINT64_C(0x34C1A45C131B234A),
+ UINT64_C(0xC9FA2EEAF66A305D), UINT64_C(0x9D135778AABAC150),
+ UINT64_C(0xB177A9428413A311), UINT64_C(0xE59ED0D0D8C3521C),
+ UINT64_C(0x18A55A663DB2410B), UINT64_C(0x4C4C23F46162B006),
+ UINT64_C(0x700AE020585E79A0), UINT64_C(0x24E399B2048E88AD),
+ UINT64_C(0xD9D81304E1FF9BBA), UINT64_C(0x8D316A96BD2F6AB7),
+ UINT64_C(0xC19918C8E2FBF0A4), UINT64_C(0x9570615ABE2B01A9),
+ UINT64_C(0x684BEBEC5B5A12BE), UINT64_C(0x3CA2927E078AE3B3),
+ UINT64_C(0x00E451AA3EB62A15), UINT64_C(0x540D28386266DB18),
+ UINT64_C(0xA936A28E8717C80F), UINT64_C(0xFDDFDB1CDBC73902),
+ UINT64_C(0xD1BB2526F56E5B43), UINT64_C(0x85525CB4A9BEAA4E),
+ UINT64_C(0x7869D6024CCFB959), UINT64_C(0x2C80AF90101F4854),
+ UINT64_C(0x10C66C44292381F2), UINT64_C(0x442F15D675F370FF),
+ UINT64_C(0xB9149F60908263E8), UINT64_C(0xEDFDE6F2CC5292E5),
+ UINT64_C(0xE1DD6314CDD0A76A), UINT64_C(0xB5341A8691005667),
+ UINT64_C(0x480F903074714570), UINT64_C(0x1CE6E9A228A1B47D),
+ UINT64_C(0x20A02A76119D7DDB), UINT64_C(0x744953E44D4D8CD6),
+ UINT64_C(0x8972D952A83C9FC1), UINT64_C(0xDD9BA0C0F4EC6ECC),
+ UINT64_C(0xF1FF5EFADA450C8D), UINT64_C(0xA51627688695FD80),
+ UINT64_C(0x582DADDE63E4EE97), UINT64_C(0x0CC4D44C3F341F9A),
+ UINT64_C(0x308217980608D63C), UINT64_C(0x646B6E0A5AD82731),
+ UINT64_C(0x9950E4BCBFA93426), UINT64_C(0xCDB99D2EE379C52B),
+ UINT64_C(0x90FB71CAD654A0F5), UINT64_C(0xC41208588A8451F8),
+ UINT64_C(0x392982EE6FF542EF), UINT64_C(0x6DC0FB7C3325B3E2),
+ UINT64_C(0x518638A80A197A44), UINT64_C(0x056F413A56C98B49),
+ UINT64_C(0xF854CB8CB3B8985E), UINT64_C(0xACBDB21EEF686953),
+ UINT64_C(0x80D94C24C1C10B12), UINT64_C(0xD43035B69D11FA1F),
+ UINT64_C(0x290BBF007860E908), UINT64_C(0x7DE2C69224B01805),
+ UINT64_C(0x41A405461D8CD1A3), UINT64_C(0x154D7CD4415C20AE),
+ UINT64_C(0xE876F662A42D33B9), UINT64_C(0xBC9F8FF0F8FDC2B4),
+ UINT64_C(0xB0BF0A16F97FF73B), UINT64_C(0xE4567384A5AF0636),
+ UINT64_C(0x196DF93240DE1521), UINT64_C(0x4D8480A01C0EE42C),
+ UINT64_C(0x71C2437425322D8A), UINT64_C(0x252B3AE679E2DC87),
+ UINT64_C(0xD810B0509C93CF90), UINT64_C(0x8CF9C9C2C0433E9D),
+ UINT64_C(0xA09D37F8EEEA5CDC), UINT64_C(0xF4744E6AB23AADD1),
+ UINT64_C(0x094FC4DC574BBEC6), UINT64_C(0x5DA6BD4E0B9B4FCB),
+ UINT64_C(0x61E07E9A32A7866D), UINT64_C(0x350907086E777760),
+ UINT64_C(0xC8328DBE8B066477), UINT64_C(0x9CDBF42CD7D6957A),
+ UINT64_C(0xD073867288020F69), UINT64_C(0x849AFFE0D4D2FE64),
+ UINT64_C(0x79A1755631A3ED73), UINT64_C(0x2D480CC46D731C7E),
+ UINT64_C(0x110ECF10544FD5D8), UINT64_C(0x45E7B682089F24D5),
+ UINT64_C(0xB8DC3C34EDEE37C2), UINT64_C(0xEC3545A6B13EC6CF),
+ UINT64_C(0xC051BB9C9F97A48E), UINT64_C(0x94B8C20EC3475583),
+ UINT64_C(0x698348B826364694), UINT64_C(0x3D6A312A7AE6B799),
+ UINT64_C(0x012CF2FE43DA7E3F), UINT64_C(0x55C58B6C1F0A8F32),
+ UINT64_C(0xA8FE01DAFA7B9C25), UINT64_C(0xFC177848A6AB6D28),
+ UINT64_C(0xF037FDAEA72958A7), UINT64_C(0xA4DE843CFBF9A9AA),
+ UINT64_C(0x59E50E8A1E88BABD), UINT64_C(0x0D0C771842584BB0),
+ UINT64_C(0x314AB4CC7B648216), UINT64_C(0x65A3CD5E27B4731B),
+ UINT64_C(0x989847E8C2C5600C), UINT64_C(0xCC713E7A9E159101),
+ UINT64_C(0xE015C040B0BCF340), UINT64_C(0xB4FCB9D2EC6C024D),
+ UINT64_C(0x49C73364091D115A), UINT64_C(0x1D2E4AF655CDE057),
+ UINT64_C(0x216889226CF129F1), UINT64_C(0x7581F0B03021D8FC),
+ UINT64_C(0x88BA7A06D550CBEB), UINT64_C(0xDC53039489803AE6),
+ UINT64_C(0x11EA9EBA6AF9FFCD), UINT64_C(0x4503E72836290EC0),
+ UINT64_C(0xB8386D9ED3581DD7), UINT64_C(0xECD1140C8F88ECDA),
+ UINT64_C(0xD097D7D8B6B4257C), UINT64_C(0x847EAE4AEA64D471),
+ UINT64_C(0x794524FC0F15C766), UINT64_C(0x2DAC5D6E53C5366B),
+ UINT64_C(0x01C8A3547D6C542A), UINT64_C(0x5521DAC621BCA527),
+ UINT64_C(0xA81A5070C4CDB630), UINT64_C(0xFCF329E2981D473D),
+ UINT64_C(0xC0B5EA36A1218E9B), UINT64_C(0x945C93A4FDF17F96),
+ UINT64_C(0x6967191218806C81), UINT64_C(0x3D8E608044509D8C),
+ UINT64_C(0x31AEE56645D2A803), UINT64_C(0x65479CF41902590E),
+ UINT64_C(0x987C1642FC734A19), UINT64_C(0xCC956FD0A0A3BB14),
+ UINT64_C(0xF0D3AC04999F72B2), UINT64_C(0xA43AD596C54F83BF),
+ UINT64_C(0x59015F20203E90A8), UINT64_C(0x0DE826B27CEE61A5),
+ UINT64_C(0x218CD888524703E4), UINT64_C(0x7565A11A0E97F2E9),
+ UINT64_C(0x885E2BACEBE6E1FE), UINT64_C(0xDCB7523EB73610F3),
+ UINT64_C(0xE0F191EA8E0AD955), UINT64_C(0xB418E878D2DA2858),
+ UINT64_C(0x492362CE37AB3B4F), UINT64_C(0x1DCA1B5C6B7BCA42),
+ UINT64_C(0x5162690234AF5051), UINT64_C(0x058B1090687FA15C),
+ UINT64_C(0xF8B09A268D0EB24B), UINT64_C(0xAC59E3B4D1DE4346),
+ UINT64_C(0x901F2060E8E28AE0), UINT64_C(0xC4F659F2B4327BED),
+ UINT64_C(0x39CDD344514368FA), UINT64_C(0x6D24AAD60D9399F7),
+ UINT64_C(0x414054EC233AFBB6), UINT64_C(0x15A92D7E7FEA0ABB),
+ UINT64_C(0xE892A7C89A9B19AC), UINT64_C(0xBC7BDE5AC64BE8A1),
+ UINT64_C(0x803D1D8EFF772107), UINT64_C(0xD4D4641CA3A7D00A),
+ UINT64_C(0x29EFEEAA46D6C31D), UINT64_C(0x7D0697381A063210),
+ UINT64_C(0x712612DE1B84079F), UINT64_C(0x25CF6B4C4754F692),
+ UINT64_C(0xD8F4E1FAA225E585), UINT64_C(0x8C1D9868FEF51488),
+ UINT64_C(0xB05B5BBCC7C9DD2E), UINT64_C(0xE4B2222E9B192C23),
+ UINT64_C(0x1989A8987E683F34), UINT64_C(0x4D60D10A22B8CE39),
+ UINT64_C(0x61042F300C11AC78), UINT64_C(0x35ED56A250C15D75),
+ UINT64_C(0xC8D6DC14B5B04E62), UINT64_C(0x9C3FA586E960BF6F),
+ UINT64_C(0xA0796652D05C76C9), UINT64_C(0xF4901FC08C8C87C4),
+ UINT64_C(0x09AB957669FD94D3), UINT64_C(0x5D42ECE4352D65DE)
+ }, {
+ UINT64_C(0x0000000000000000), UINT64_C(0x3F0BE14A916A6DCB),
+ UINT64_C(0x7E17C29522D4DB96), UINT64_C(0x411C23DFB3BEB65D),
+ UINT64_C(0xFC2F852A45A9B72C), UINT64_C(0xC3246460D4C3DAE7),
+ UINT64_C(0x823847BF677D6CBA), UINT64_C(0xBD33A6F5F6170171),
+ UINT64_C(0x6A87A57F245D70DD), UINT64_C(0x558C4435B5371D16),
+ UINT64_C(0x149067EA0689AB4B), UINT64_C(0x2B9B86A097E3C680),
+ UINT64_C(0x96A8205561F4C7F1), UINT64_C(0xA9A3C11FF09EAA3A),
+ UINT64_C(0xE8BFE2C043201C67), UINT64_C(0xD7B4038AD24A71AC),
+ UINT64_C(0xD50F4AFE48BAE1BA), UINT64_C(0xEA04ABB4D9D08C71),
+ UINT64_C(0xAB18886B6A6E3A2C), UINT64_C(0x94136921FB0457E7),
+ UINT64_C(0x2920CFD40D135696), UINT64_C(0x162B2E9E9C793B5D),
+ UINT64_C(0x57370D412FC78D00), UINT64_C(0x683CEC0BBEADE0CB),
+ UINT64_C(0xBF88EF816CE79167), UINT64_C(0x80830ECBFD8DFCAC),
+ UINT64_C(0xC19F2D144E334AF1), UINT64_C(0xFE94CC5EDF59273A),
+ UINT64_C(0x43A76AAB294E264B), UINT64_C(0x7CAC8BE1B8244B80),
+ UINT64_C(0x3DB0A83E0B9AFDDD), UINT64_C(0x02BB49749AF09016),
+ UINT64_C(0x38C63AD73E7BDDF1), UINT64_C(0x07CDDB9DAF11B03A),
+ UINT64_C(0x46D1F8421CAF0667), UINT64_C(0x79DA19088DC56BAC),
+ UINT64_C(0xC4E9BFFD7BD26ADD), UINT64_C(0xFBE25EB7EAB80716),
+ UINT64_C(0xBAFE7D685906B14B), UINT64_C(0x85F59C22C86CDC80),
+ UINT64_C(0x52419FA81A26AD2C), UINT64_C(0x6D4A7EE28B4CC0E7),
+ UINT64_C(0x2C565D3D38F276BA), UINT64_C(0x135DBC77A9981B71),
+ UINT64_C(0xAE6E1A825F8F1A00), UINT64_C(0x9165FBC8CEE577CB),
+ UINT64_C(0xD079D8177D5BC196), UINT64_C(0xEF72395DEC31AC5D),
+ UINT64_C(0xEDC9702976C13C4B), UINT64_C(0xD2C29163E7AB5180),
+ UINT64_C(0x93DEB2BC5415E7DD), UINT64_C(0xACD553F6C57F8A16),
+ UINT64_C(0x11E6F50333688B67), UINT64_C(0x2EED1449A202E6AC),
+ UINT64_C(0x6FF1379611BC50F1), UINT64_C(0x50FAD6DC80D63D3A),
+ UINT64_C(0x874ED556529C4C96), UINT64_C(0xB845341CC3F6215D),
+ UINT64_C(0xF95917C370489700), UINT64_C(0xC652F689E122FACB),
+ UINT64_C(0x7B61507C1735FBBA), UINT64_C(0x446AB136865F9671),
+ UINT64_C(0x057692E935E1202C), UINT64_C(0x3A7D73A3A48B4DE7),
+ UINT64_C(0x718C75AE7CF7BBE2), UINT64_C(0x4E8794E4ED9DD629),
+ UINT64_C(0x0F9BB73B5E236074), UINT64_C(0x30905671CF490DBF),
+ UINT64_C(0x8DA3F084395E0CCE), UINT64_C(0xB2A811CEA8346105),
+ UINT64_C(0xF3B432111B8AD758), UINT64_C(0xCCBFD35B8AE0BA93),
+ UINT64_C(0x1B0BD0D158AACB3F), UINT64_C(0x2400319BC9C0A6F4),
+ UINT64_C(0x651C12447A7E10A9), UINT64_C(0x5A17F30EEB147D62),
+ UINT64_C(0xE72455FB1D037C13), UINT64_C(0xD82FB4B18C6911D8),
+ UINT64_C(0x9933976E3FD7A785), UINT64_C(0xA6387624AEBDCA4E),
+ UINT64_C(0xA4833F50344D5A58), UINT64_C(0x9B88DE1AA5273793),
+ UINT64_C(0xDA94FDC5169981CE), UINT64_C(0xE59F1C8F87F3EC05),
+ UINT64_C(0x58ACBA7A71E4ED74), UINT64_C(0x67A75B30E08E80BF),
+ UINT64_C(0x26BB78EF533036E2), UINT64_C(0x19B099A5C25A5B29),
+ UINT64_C(0xCE049A2F10102A85), UINT64_C(0xF10F7B65817A474E),
+ UINT64_C(0xB01358BA32C4F113), UINT64_C(0x8F18B9F0A3AE9CD8),
+ UINT64_C(0x322B1F0555B99DA9), UINT64_C(0x0D20FE4FC4D3F062),
+ UINT64_C(0x4C3CDD90776D463F), UINT64_C(0x73373CDAE6072BF4),
+ UINT64_C(0x494A4F79428C6613), UINT64_C(0x7641AE33D3E60BD8),
+ UINT64_C(0x375D8DEC6058BD85), UINT64_C(0x08566CA6F132D04E),
+ UINT64_C(0xB565CA530725D13F), UINT64_C(0x8A6E2B19964FBCF4),
+ UINT64_C(0xCB7208C625F10AA9), UINT64_C(0xF479E98CB49B6762),
+ UINT64_C(0x23CDEA0666D116CE), UINT64_C(0x1CC60B4CF7BB7B05),
+ UINT64_C(0x5DDA28934405CD58), UINT64_C(0x62D1C9D9D56FA093),
+ UINT64_C(0xDFE26F2C2378A1E2), UINT64_C(0xE0E98E66B212CC29),
+ UINT64_C(0xA1F5ADB901AC7A74), UINT64_C(0x9EFE4CF390C617BF),
+ UINT64_C(0x9C4505870A3687A9), UINT64_C(0xA34EE4CD9B5CEA62),
+ UINT64_C(0xE252C71228E25C3F), UINT64_C(0xDD592658B98831F4),
+ UINT64_C(0x606A80AD4F9F3085), UINT64_C(0x5F6161E7DEF55D4E),
+ UINT64_C(0x1E7D42386D4BEB13), UINT64_C(0x2176A372FC2186D8),
+ UINT64_C(0xF6C2A0F82E6BF774), UINT64_C(0xC9C941B2BF019ABF),
+ UINT64_C(0x88D5626D0CBF2CE2), UINT64_C(0xB7DE83279DD54129),
+ UINT64_C(0x0AED25D26BC24058), UINT64_C(0x35E6C498FAA82D93),
+ UINT64_C(0x74FAE74749169BCE), UINT64_C(0x4BF1060DD87CF605),
+ UINT64_C(0xE318EB5CF9EF77C4), UINT64_C(0xDC130A1668851A0F),
+ UINT64_C(0x9D0F29C9DB3BAC52), UINT64_C(0xA204C8834A51C199),
+ UINT64_C(0x1F376E76BC46C0E8), UINT64_C(0x203C8F3C2D2CAD23),
+ UINT64_C(0x6120ACE39E921B7E), UINT64_C(0x5E2B4DA90FF876B5),
+ UINT64_C(0x899F4E23DDB20719), UINT64_C(0xB694AF694CD86AD2),
+ UINT64_C(0xF7888CB6FF66DC8F), UINT64_C(0xC8836DFC6E0CB144),
+ UINT64_C(0x75B0CB09981BB035), UINT64_C(0x4ABB2A430971DDFE),
+ UINT64_C(0x0BA7099CBACF6BA3), UINT64_C(0x34ACE8D62BA50668),
+ UINT64_C(0x3617A1A2B155967E), UINT64_C(0x091C40E8203FFBB5),
+ UINT64_C(0x4800633793814DE8), UINT64_C(0x770B827D02EB2023),
+ UINT64_C(0xCA382488F4FC2152), UINT64_C(0xF533C5C265964C99),
+ UINT64_C(0xB42FE61DD628FAC4), UINT64_C(0x8B2407574742970F),
+ UINT64_C(0x5C9004DD9508E6A3), UINT64_C(0x639BE59704628B68),
+ UINT64_C(0x2287C648B7DC3D35), UINT64_C(0x1D8C270226B650FE),
+ UINT64_C(0xA0BF81F7D0A1518F), UINT64_C(0x9FB460BD41CB3C44),
+ UINT64_C(0xDEA84362F2758A19), UINT64_C(0xE1A3A228631FE7D2),
+ UINT64_C(0xDBDED18BC794AA35), UINT64_C(0xE4D530C156FEC7FE),
+ UINT64_C(0xA5C9131EE54071A3), UINT64_C(0x9AC2F254742A1C68),
+ UINT64_C(0x27F154A1823D1D19), UINT64_C(0x18FAB5EB135770D2),
+ UINT64_C(0x59E69634A0E9C68F), UINT64_C(0x66ED777E3183AB44),
+ UINT64_C(0xB15974F4E3C9DAE8), UINT64_C(0x8E5295BE72A3B723),
+ UINT64_C(0xCF4EB661C11D017E), UINT64_C(0xF045572B50776CB5),
+ UINT64_C(0x4D76F1DEA6606DC4), UINT64_C(0x727D1094370A000F),
+ UINT64_C(0x3361334B84B4B652), UINT64_C(0x0C6AD20115DEDB99),
+ UINT64_C(0x0ED19B758F2E4B8F), UINT64_C(0x31DA7A3F1E442644),
+ UINT64_C(0x70C659E0ADFA9019), UINT64_C(0x4FCDB8AA3C90FDD2),
+ UINT64_C(0xF2FE1E5FCA87FCA3), UINT64_C(0xCDF5FF155BED9168),
+ UINT64_C(0x8CE9DCCAE8532735), UINT64_C(0xB3E23D8079394AFE),
+ UINT64_C(0x64563E0AAB733B52), UINT64_C(0x5B5DDF403A195699),
+ UINT64_C(0x1A41FC9F89A7E0C4), UINT64_C(0x254A1DD518CD8D0F),
+ UINT64_C(0x9879BB20EEDA8C7E), UINT64_C(0xA7725A6A7FB0E1B5),
+ UINT64_C(0xE66E79B5CC0E57E8), UINT64_C(0xD96598FF5D643A23),
+ UINT64_C(0x92949EF28518CC26), UINT64_C(0xAD9F7FB81472A1ED),
+ UINT64_C(0xEC835C67A7CC17B0), UINT64_C(0xD388BD2D36A67A7B),
+ UINT64_C(0x6EBB1BD8C0B17B0A), UINT64_C(0x51B0FA9251DB16C1),
+ UINT64_C(0x10ACD94DE265A09C), UINT64_C(0x2FA73807730FCD57),
+ UINT64_C(0xF8133B8DA145BCFB), UINT64_C(0xC718DAC7302FD130),
+ UINT64_C(0x8604F9188391676D), UINT64_C(0xB90F185212FB0AA6),
+ UINT64_C(0x043CBEA7E4EC0BD7), UINT64_C(0x3B375FED7586661C),
+ UINT64_C(0x7A2B7C32C638D041), UINT64_C(0x45209D785752BD8A),
+ UINT64_C(0x479BD40CCDA22D9C), UINT64_C(0x789035465CC84057),
+ UINT64_C(0x398C1699EF76F60A), UINT64_C(0x0687F7D37E1C9BC1),
+ UINT64_C(0xBBB45126880B9AB0), UINT64_C(0x84BFB06C1961F77B),
+ UINT64_C(0xC5A393B3AADF4126), UINT64_C(0xFAA872F93BB52CED),
+ UINT64_C(0x2D1C7173E9FF5D41), UINT64_C(0x121790397895308A),
+ UINT64_C(0x530BB3E6CB2B86D7), UINT64_C(0x6C0052AC5A41EB1C),
+ UINT64_C(0xD133F459AC56EA6D), UINT64_C(0xEE3815133D3C87A6),
+ UINT64_C(0xAF2436CC8E8231FB), UINT64_C(0x902FD7861FE85C30),
+ UINT64_C(0xAA52A425BB6311D7), UINT64_C(0x9559456F2A097C1C),
+ UINT64_C(0xD44566B099B7CA41), UINT64_C(0xEB4E87FA08DDA78A),
+ UINT64_C(0x567D210FFECAA6FB), UINT64_C(0x6976C0456FA0CB30),
+ UINT64_C(0x286AE39ADC1E7D6D), UINT64_C(0x176102D04D7410A6),
+ UINT64_C(0xC0D5015A9F3E610A), UINT64_C(0xFFDEE0100E540CC1),
+ UINT64_C(0xBEC2C3CFBDEABA9C), UINT64_C(0x81C922852C80D757),
+ UINT64_C(0x3CFA8470DA97D626), UINT64_C(0x03F1653A4BFDBBED),
+ UINT64_C(0x42ED46E5F8430DB0), UINT64_C(0x7DE6A7AF6929607B),
+ UINT64_C(0x7F5DEEDBF3D9F06D), UINT64_C(0x40560F9162B39DA6),
+ UINT64_C(0x014A2C4ED10D2BFB), UINT64_C(0x3E41CD0440674630),
+ UINT64_C(0x83726BF1B6704741), UINT64_C(0xBC798ABB271A2A8A),
+ UINT64_C(0xFD65A96494A49CD7), UINT64_C(0xC26E482E05CEF11C),
+ UINT64_C(0x15DA4BA4D78480B0), UINT64_C(0x2AD1AAEE46EEED7B),
+ UINT64_C(0x6BCD8931F5505B26), UINT64_C(0x54C6687B643A36ED),
+ UINT64_C(0xE9F5CE8E922D379C), UINT64_C(0xD6FE2FC403475A57),
+ UINT64_C(0x97E20C1BB0F9EC0A), UINT64_C(0xA8E9ED51219381C1)
+ }, {
+ UINT64_C(0x0000000000000000), UINT64_C(0x1DEE8A5E222CA1DC),
+ UINT64_C(0x3BDD14BC445943B8), UINT64_C(0x26339EE26675E264),
+ UINT64_C(0x77BA297888B28770), UINT64_C(0x6A54A326AA9E26AC),
+ UINT64_C(0x4C673DC4CCEBC4C8), UINT64_C(0x5189B79AEEC76514),
+ UINT64_C(0xEF7452F111650EE0), UINT64_C(0xF29AD8AF3349AF3C),
+ UINT64_C(0xD4A9464D553C4D58), UINT64_C(0xC947CC137710EC84),
+ UINT64_C(0x98CE7B8999D78990), UINT64_C(0x8520F1D7BBFB284C),
+ UINT64_C(0xA3136F35DD8ECA28), UINT64_C(0xBEFDE56BFFA26BF4),
+ UINT64_C(0x4C300AC98DC40345), UINT64_C(0x51DE8097AFE8A299),
+ UINT64_C(0x77ED1E75C99D40FD), UINT64_C(0x6A03942BEBB1E121),
+ UINT64_C(0x3B8A23B105768435), UINT64_C(0x2664A9EF275A25E9),
+ UINT64_C(0x0057370D412FC78D), UINT64_C(0x1DB9BD5363036651),
+ UINT64_C(0xA34458389CA10DA5), UINT64_C(0xBEAAD266BE8DAC79),
+ UINT64_C(0x98994C84D8F84E1D), UINT64_C(0x8577C6DAFAD4EFC1),
+ UINT64_C(0xD4FE714014138AD5), UINT64_C(0xC910FB1E363F2B09),
+ UINT64_C(0xEF2365FC504AC96D), UINT64_C(0xF2CDEFA2726668B1),
+ UINT64_C(0x986015931B88068A), UINT64_C(0x858E9FCD39A4A756),
+ UINT64_C(0xA3BD012F5FD14532), UINT64_C(0xBE538B717DFDE4EE),
+ UINT64_C(0xEFDA3CEB933A81FA), UINT64_C(0xF234B6B5B1162026),
+ UINT64_C(0xD4072857D763C242), UINT64_C(0xC9E9A209F54F639E),
+ UINT64_C(0x771447620AED086A), UINT64_C(0x6AFACD3C28C1A9B6),
+ UINT64_C(0x4CC953DE4EB44BD2), UINT64_C(0x5127D9806C98EA0E),
+ UINT64_C(0x00AE6E1A825F8F1A), UINT64_C(0x1D40E444A0732EC6),
+ UINT64_C(0x3B737AA6C606CCA2), UINT64_C(0x269DF0F8E42A6D7E),
+ UINT64_C(0xD4501F5A964C05CF), UINT64_C(0xC9BE9504B460A413),
+ UINT64_C(0xEF8D0BE6D2154677), UINT64_C(0xF26381B8F039E7AB),
+ UINT64_C(0xA3EA36221EFE82BF), UINT64_C(0xBE04BC7C3CD22363),
+ UINT64_C(0x9837229E5AA7C107), UINT64_C(0x85D9A8C0788B60DB),
+ UINT64_C(0x3B244DAB87290B2F), UINT64_C(0x26CAC7F5A505AAF3),
+ UINT64_C(0x00F95917C3704897), UINT64_C(0x1D17D349E15CE94B),
+ UINT64_C(0x4C9E64D30F9B8C5F), UINT64_C(0x5170EE8D2DB72D83),
+ UINT64_C(0x7743706F4BC2CFE7), UINT64_C(0x6AADFA3169EE6E3B),
+ UINT64_C(0xA218840D981E1391), UINT64_C(0xBFF60E53BA32B24D),
+ UINT64_C(0x99C590B1DC475029), UINT64_C(0x842B1AEFFE6BF1F5),
+ UINT64_C(0xD5A2AD7510AC94E1), UINT64_C(0xC84C272B3280353D),
+ UINT64_C(0xEE7FB9C954F5D759), UINT64_C(0xF391339776D97685),
+ UINT64_C(0x4D6CD6FC897B1D71), UINT64_C(0x50825CA2AB57BCAD),
+ UINT64_C(0x76B1C240CD225EC9), UINT64_C(0x6B5F481EEF0EFF15),
+ UINT64_C(0x3AD6FF8401C99A01), UINT64_C(0x273875DA23E53BDD),
+ UINT64_C(0x010BEB384590D9B9), UINT64_C(0x1CE5616667BC7865),
+ UINT64_C(0xEE288EC415DA10D4), UINT64_C(0xF3C6049A37F6B108),
+ UINT64_C(0xD5F59A785183536C), UINT64_C(0xC81B102673AFF2B0),
+ UINT64_C(0x9992A7BC9D6897A4), UINT64_C(0x847C2DE2BF443678),
+ UINT64_C(0xA24FB300D931D41C), UINT64_C(0xBFA1395EFB1D75C0),
+ UINT64_C(0x015CDC3504BF1E34), UINT64_C(0x1CB2566B2693BFE8),
+ UINT64_C(0x3A81C88940E65D8C), UINT64_C(0x276F42D762CAFC50),
+ UINT64_C(0x76E6F54D8C0D9944), UINT64_C(0x6B087F13AE213898),
+ UINT64_C(0x4D3BE1F1C854DAFC), UINT64_C(0x50D56BAFEA787B20),
+ UINT64_C(0x3A78919E8396151B), UINT64_C(0x27961BC0A1BAB4C7),
+ UINT64_C(0x01A58522C7CF56A3), UINT64_C(0x1C4B0F7CE5E3F77F),
+ UINT64_C(0x4DC2B8E60B24926B), UINT64_C(0x502C32B8290833B7),
+ UINT64_C(0x761FAC5A4F7DD1D3), UINT64_C(0x6BF126046D51700F),
+ UINT64_C(0xD50CC36F92F31BFB), UINT64_C(0xC8E24931B0DFBA27),
+ UINT64_C(0xEED1D7D3D6AA5843), UINT64_C(0xF33F5D8DF486F99F),
+ UINT64_C(0xA2B6EA171A419C8B), UINT64_C(0xBF586049386D3D57),
+ UINT64_C(0x996BFEAB5E18DF33), UINT64_C(0x848574F57C347EEF),
+ UINT64_C(0x76489B570E52165E), UINT64_C(0x6BA611092C7EB782),
+ UINT64_C(0x4D958FEB4A0B55E6), UINT64_C(0x507B05B56827F43A),
+ UINT64_C(0x01F2B22F86E0912E), UINT64_C(0x1C1C3871A4CC30F2),
+ UINT64_C(0x3A2FA693C2B9D296), UINT64_C(0x27C12CCDE095734A),
+ UINT64_C(0x993CC9A61F3718BE), UINT64_C(0x84D243F83D1BB962),
+ UINT64_C(0xA2E1DD1A5B6E5B06), UINT64_C(0xBF0F57447942FADA),
+ UINT64_C(0xEE86E0DE97859FCE), UINT64_C(0xF3686A80B5A93E12),
+ UINT64_C(0xD55BF462D3DCDC76), UINT64_C(0xC8B57E3CF1F07DAA),
+ UINT64_C(0xD6E9A7309F3239A7), UINT64_C(0xCB072D6EBD1E987B),
+ UINT64_C(0xED34B38CDB6B7A1F), UINT64_C(0xF0DA39D2F947DBC3),
+ UINT64_C(0xA1538E481780BED7), UINT64_C(0xBCBD041635AC1F0B),
+ UINT64_C(0x9A8E9AF453D9FD6F), UINT64_C(0x876010AA71F55CB3),
+ UINT64_C(0x399DF5C18E573747), UINT64_C(0x24737F9FAC7B969B),
+ UINT64_C(0x0240E17DCA0E74FF), UINT64_C(0x1FAE6B23E822D523),
+ UINT64_C(0x4E27DCB906E5B037), UINT64_C(0x53C956E724C911EB),
+ UINT64_C(0x75FAC80542BCF38F), UINT64_C(0x6814425B60905253),
+ UINT64_C(0x9AD9ADF912F63AE2), UINT64_C(0x873727A730DA9B3E),
+ UINT64_C(0xA104B94556AF795A), UINT64_C(0xBCEA331B7483D886),
+ UINT64_C(0xED6384819A44BD92), UINT64_C(0xF08D0EDFB8681C4E),
+ UINT64_C(0xD6BE903DDE1DFE2A), UINT64_C(0xCB501A63FC315FF6),
+ UINT64_C(0x75ADFF0803933402), UINT64_C(0x6843755621BF95DE),
+ UINT64_C(0x4E70EBB447CA77BA), UINT64_C(0x539E61EA65E6D666),
+ UINT64_C(0x0217D6708B21B372), UINT64_C(0x1FF95C2EA90D12AE),
+ UINT64_C(0x39CAC2CCCF78F0CA), UINT64_C(0x24244892ED545116),
+ UINT64_C(0x4E89B2A384BA3F2D), UINT64_C(0x536738FDA6969EF1),
+ UINT64_C(0x7554A61FC0E37C95), UINT64_C(0x68BA2C41E2CFDD49),
+ UINT64_C(0x39339BDB0C08B85D), UINT64_C(0x24DD11852E241981),
+ UINT64_C(0x02EE8F674851FBE5), UINT64_C(0x1F0005396A7D5A39),
+ UINT64_C(0xA1FDE05295DF31CD), UINT64_C(0xBC136A0CB7F39011),
+ UINT64_C(0x9A20F4EED1867275), UINT64_C(0x87CE7EB0F3AAD3A9),
+ UINT64_C(0xD647C92A1D6DB6BD), UINT64_C(0xCBA943743F411761),
+ UINT64_C(0xED9ADD965934F505), UINT64_C(0xF07457C87B1854D9),
+ UINT64_C(0x02B9B86A097E3C68), UINT64_C(0x1F5732342B529DB4),
+ UINT64_C(0x3964ACD64D277FD0), UINT64_C(0x248A26886F0BDE0C),
+ UINT64_C(0x7503911281CCBB18), UINT64_C(0x68ED1B4CA3E01AC4),
+ UINT64_C(0x4EDE85AEC595F8A0), UINT64_C(0x53300FF0E7B9597C),
+ UINT64_C(0xEDCDEA9B181B3288), UINT64_C(0xF02360C53A379354),
+ UINT64_C(0xD610FE275C427130), UINT64_C(0xCBFE74797E6ED0EC),
+ UINT64_C(0x9A77C3E390A9B5F8), UINT64_C(0x879949BDB2851424),
+ UINT64_C(0xA1AAD75FD4F0F640), UINT64_C(0xBC445D01F6DC579C),
+ UINT64_C(0x74F1233D072C2A36), UINT64_C(0x691FA96325008BEA),
+ UINT64_C(0x4F2C37814375698E), UINT64_C(0x52C2BDDF6159C852),
+ UINT64_C(0x034B0A458F9EAD46), UINT64_C(0x1EA5801BADB20C9A),
+ UINT64_C(0x38961EF9CBC7EEFE), UINT64_C(0x257894A7E9EB4F22),
+ UINT64_C(0x9B8571CC164924D6), UINT64_C(0x866BFB923465850A),
+ UINT64_C(0xA05865705210676E), UINT64_C(0xBDB6EF2E703CC6B2),
+ UINT64_C(0xEC3F58B49EFBA3A6), UINT64_C(0xF1D1D2EABCD7027A),
+ UINT64_C(0xD7E24C08DAA2E01E), UINT64_C(0xCA0CC656F88E41C2),
+ UINT64_C(0x38C129F48AE82973), UINT64_C(0x252FA3AAA8C488AF),
+ UINT64_C(0x031C3D48CEB16ACB), UINT64_C(0x1EF2B716EC9DCB17),
+ UINT64_C(0x4F7B008C025AAE03), UINT64_C(0x52958AD220760FDF),
+ UINT64_C(0x74A614304603EDBB), UINT64_C(0x69489E6E642F4C67),
+ UINT64_C(0xD7B57B059B8D2793), UINT64_C(0xCA5BF15BB9A1864F),
+ UINT64_C(0xEC686FB9DFD4642B), UINT64_C(0xF186E5E7FDF8C5F7),
+ UINT64_C(0xA00F527D133FA0E3), UINT64_C(0xBDE1D8233113013F),
+ UINT64_C(0x9BD246C15766E35B), UINT64_C(0x863CCC9F754A4287),
+ UINT64_C(0xEC9136AE1CA42CBC), UINT64_C(0xF17FBCF03E888D60),
+ UINT64_C(0xD74C221258FD6F04), UINT64_C(0xCAA2A84C7AD1CED8),
+ UINT64_C(0x9B2B1FD69416ABCC), UINT64_C(0x86C59588B63A0A10),
+ UINT64_C(0xA0F60B6AD04FE874), UINT64_C(0xBD188134F26349A8),
+ UINT64_C(0x03E5645F0DC1225C), UINT64_C(0x1E0BEE012FED8380),
+ UINT64_C(0x383870E3499861E4), UINT64_C(0x25D6FABD6BB4C038),
+ UINT64_C(0x745F4D278573A52C), UINT64_C(0x69B1C779A75F04F0),
+ UINT64_C(0x4F82599BC12AE694), UINT64_C(0x526CD3C5E3064748),
+ UINT64_C(0xA0A13C6791602FF9), UINT64_C(0xBD4FB639B34C8E25),
+ UINT64_C(0x9B7C28DBD5396C41), UINT64_C(0x8692A285F715CD9D),
+ UINT64_C(0xD71B151F19D2A889), UINT64_C(0xCAF59F413BFE0955),
+ UINT64_C(0xECC601A35D8BEB31), UINT64_C(0xF1288BFD7FA74AED),
+ UINT64_C(0x4FD56E9680052119), UINT64_C(0x523BE4C8A22980C5),
+ UINT64_C(0x74087A2AC45C62A1), UINT64_C(0x69E6F074E670C37D),
+ UINT64_C(0x386F47EE08B7A669), UINT64_C(0x2581CDB02A9B07B5),
+ UINT64_C(0x03B253524CEEE5D1), UINT64_C(0x1E5CD90C6EC2440D)
+ }
+};
diff --git a/src/liblzma/check/crc64_tablegen.c b/src/liblzma/check/crc64_tablegen.c
new file mode 100644
index 0000000..fddaa7e
--- /dev/null
+++ b/src/liblzma/check/crc64_tablegen.c
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc64_tablegen.c
+/// \brief Generate crc64_table_le.h and crc64_table_be.h
+///
+/// Compiling: gcc -std=c99 -o crc64_tablegen crc64_tablegen.c
+/// Add -DWORDS_BIGENDIAN to generate big endian table.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdio.h>
+#include "../../common/tuklib_integer.h"
+
+
+static uint64_t crc64_table[4][256];
+
+
+extern void
+init_crc64_table(void)
+{
+ static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42);
+
+ for (size_t s = 0; s < 4; ++s) {
+ for (size_t b = 0; b < 256; ++b) {
+ uint64_t r = s == 0 ? b : crc64_table[s - 1][b];
+
+ for (size_t i = 0; i < 8; ++i) {
+ if (r & 1)
+ r = (r >> 1) ^ poly64;
+ else
+ r >>= 1;
+ }
+
+ crc64_table[s][b] = r;
+ }
+ }
+
+#ifdef WORDS_BIGENDIAN
+ for (size_t s = 0; s < 4; ++s)
+ for (size_t b = 0; b < 256; ++b)
+ crc64_table[s][b] = bswap64(crc64_table[s][b]);
+#endif
+
+ return;
+}
+
+
+static void
+print_crc64_table(void)
+{
+ printf("/* This file has been automatically generated by "
+ "crc64_tablegen.c. */\n\n"
+ "const uint64_t lzma_crc64_table[4][256] = {\n\t{");
+
+ for (size_t s = 0; s < 4; ++s) {
+ for (size_t b = 0; b < 256; ++b) {
+ if ((b % 2) == 0)
+ printf("\n\t\t");
+
+ printf("UINT64_C(0x%016" PRIX64 ")",
+ crc64_table[s][b]);
+
+ if (b != 255)
+ printf(",%s", (b+1) % 2 == 0 ? "" : " ");
+ }
+
+ if (s == 3)
+ printf("\n\t}\n};\n");
+ else
+ printf("\n\t}, {");
+ }
+
+ return;
+}
+
+
+int
+main(void)
+{
+ init_crc64_table();
+ print_crc64_table();
+ return 0;
+}
diff --git a/src/liblzma/check/crc64_x86.S b/src/liblzma/check/crc64_x86.S
new file mode 100644
index 0000000..9aecf58
--- /dev/null
+++ b/src/liblzma/check/crc64_x86.S
@@ -0,0 +1,296 @@
+/*
+ * Speed-optimized CRC64 using slicing-by-four algorithm
+ *
+ * This uses only i386 instructions, but it is optimized for i686 and later
+ * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2).
+ *
+ * Authors: Igor Pavlov (original CRC32 assembly code)
+ * Lasse Collin (CRC64 adaptation of the modified CRC32 code)
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ *
+ * This code needs lzma_crc64_table, which can be created using the
+ * following C code:
+
+uint64_t lzma_crc64_table[4][256];
+
+void
+init_table(void)
+{
+ // ECMA-182
+ static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42);
+
+ for (size_t s = 0; s < 4; ++s) {
+ for (size_t b = 0; b < 256; ++b) {
+ uint64_t r = s == 0 ? b : lzma_crc64_table[s - 1][b];
+
+ for (size_t i = 0; i < 8; ++i) {
+ if (r & 1)
+ r = (r >> 1) ^ poly64;
+ else
+ r >>= 1;
+ }
+
+ lzma_crc64_table[s][b] = r;
+ }
+ }
+}
+
+ * The prototype of the CRC64 function:
+ * extern uint64_t lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc);
+ */
+
+/* When Intel CET is enabled, include <cet.h> in assembly code to mark
+ Intel CET support. */
+#ifdef __CET__
+# include <cet.h>
+#else
+# define _CET_ENDBR
+#endif
+
+/*
+ * On some systems, the functions need to be prefixed. The prefix is
+ * usually an underscore.
+ */
+#ifndef __USER_LABEL_PREFIX__
+# define __USER_LABEL_PREFIX__
+#endif
+#define MAKE_SYM_CAT(prefix, sym) prefix ## sym
+#define MAKE_SYM(prefix, sym) MAKE_SYM_CAT(prefix, sym)
+#define LZMA_CRC64 MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc64)
+#define LZMA_CRC64_TABLE MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc64_table)
+
+/*
+ * Solaris assembler doesn't have .p2align, and Darwin uses .align
+ * differently than GNU/Linux and Solaris.
+ */
+#if defined(__APPLE__) || defined(__MSDOS__)
+# define ALIGN(pow2, abs) .align pow2
+#else
+# define ALIGN(pow2, abs) .align abs
+#endif
+
+ .text
+ .globl LZMA_CRC64
+
+#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) \
+ && !defined(__MSDOS__)
+ .type LZMA_CRC64, @function
+#endif
+
+ ALIGN(4, 16)
+LZMA_CRC64:
+ _CET_ENDBR
+ /*
+ * Register usage:
+ * %eax crc LSB
+ * %edx crc MSB
+ * %esi buf
+ * %edi size or buf + size
+ * %ebx lzma_crc64_table
+ * %ebp Table index
+ * %ecx Temporary
+ */
+ pushl %ebx
+ pushl %esi
+ pushl %edi
+ pushl %ebp
+ movl 0x14(%esp), %esi /* buf */
+ movl 0x18(%esp), %edi /* size */
+ movl 0x1C(%esp), %eax /* crc LSB */
+ movl 0x20(%esp), %edx /* crc MSB */
+
+ /*
+ * Store the address of lzma_crc64_table to %ebx. This is needed to
+ * get position-independent code (PIC).
+ *
+ * The PIC macro is defined by libtool, while __PIC__ is defined
+ * by GCC but only on some systems. Testing for both makes it simpler
+ * to test this code without libtool, and keeps the code working also
+ * when built with libtool but using something else than GCC.
+ *
+ * I understood that libtool may define PIC on Windows even though
+ * the code in Windows DLLs is not PIC in sense that it is in ELF
+ * binaries, so we need a separate check to always use the non-PIC
+ * code on Windows.
+ */
+#if (!defined(PIC) && !defined(__PIC__)) \
+ || (defined(_WIN32) || defined(__CYGWIN__))
+ /* Not PIC */
+ movl $ LZMA_CRC64_TABLE, %ebx
+#elif defined(__APPLE__)
+ /* Mach-O */
+ call .L_get_pc
+.L_pic:
+ leal .L_lzma_crc64_table$non_lazy_ptr-.L_pic(%ebx), %ebx
+ movl (%ebx), %ebx
+#else
+ /* ELF */
+ call .L_get_pc
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ movl LZMA_CRC64_TABLE@GOT(%ebx), %ebx
+#endif
+
+ /* Complement the initial value. */
+ notl %eax
+ notl %edx
+
+.L_align:
+ /*
+ * Check if there is enough input to use slicing-by-four.
+ * We need eight bytes, because the loop pre-reads four bytes.
+ */
+ cmpl $8, %edi
+ jb .L_rest
+
+ /* Check if we have reached alignment of four bytes. */
+ testl $3, %esi
+ jz .L_slice
+
+ /* Calculate CRC of the next input byte. */
+ movzbl (%esi), %ebp
+ incl %esi
+ movzbl %al, %ecx
+ xorl %ecx, %ebp
+ shrdl $8, %edx, %eax
+ xorl (%ebx, %ebp, 8), %eax
+ shrl $8, %edx
+ xorl 4(%ebx, %ebp, 8), %edx
+ decl %edi
+ jmp .L_align
+
+.L_slice:
+ /*
+ * If we get here, there's at least eight bytes of aligned input
+ * available. Make %edi multiple of four bytes. Store the possible
+ * remainder over the "size" variable in the argument stack.
+ */
+ movl %edi, 0x18(%esp)
+ andl $-4, %edi
+ subl %edi, 0x18(%esp)
+
+ /*
+ * Let %edi be buf + size - 4 while running the main loop. This way
+ * we can compare for equality to determine when exit the loop.
+ */
+ addl %esi, %edi
+ subl $4, %edi
+
+ /* Read in the first four aligned bytes. */
+ movl (%esi), %ecx
+
+.L_loop:
+ xorl %eax, %ecx
+ movzbl %cl, %ebp
+ movl 0x1800(%ebx, %ebp, 8), %eax
+ xorl %edx, %eax
+ movl 0x1804(%ebx, %ebp, 8), %edx
+ movzbl %ch, %ebp
+ xorl 0x1000(%ebx, %ebp, 8), %eax
+ xorl 0x1004(%ebx, %ebp, 8), %edx
+ shrl $16, %ecx
+ movzbl %cl, %ebp
+ xorl 0x0800(%ebx, %ebp, 8), %eax
+ xorl 0x0804(%ebx, %ebp, 8), %edx
+ movzbl %ch, %ebp
+ addl $4, %esi
+ xorl (%ebx, %ebp, 8), %eax
+ xorl 4(%ebx, %ebp, 8), %edx
+
+ /* Check for end of aligned input. */
+ cmpl %edi, %esi
+
+ /*
+ * Copy the next input byte to %ecx. It is slightly faster to
+ * read it here than at the top of the loop.
+ */
+ movl (%esi), %ecx
+ jb .L_loop
+
+ /*
+ * Process the remaining four bytes, which we have already
+ * copied to %ecx.
+ */
+ xorl %eax, %ecx
+ movzbl %cl, %ebp
+ movl 0x1800(%ebx, %ebp, 8), %eax
+ xorl %edx, %eax
+ movl 0x1804(%ebx, %ebp, 8), %edx
+ movzbl %ch, %ebp
+ xorl 0x1000(%ebx, %ebp, 8), %eax
+ xorl 0x1004(%ebx, %ebp, 8), %edx
+ shrl $16, %ecx
+ movzbl %cl, %ebp
+ xorl 0x0800(%ebx, %ebp, 8), %eax
+ xorl 0x0804(%ebx, %ebp, 8), %edx
+ movzbl %ch, %ebp
+ addl $4, %esi
+ xorl (%ebx, %ebp, 8), %eax
+ xorl 4(%ebx, %ebp, 8), %edx
+
+ /* Copy the number of remaining bytes to %edi. */
+ movl 0x18(%esp), %edi
+
+.L_rest:
+ /* Check for end of input. */
+ testl %edi, %edi
+ jz .L_return
+
+ /* Calculate CRC of the next input byte. */
+ movzbl (%esi), %ebp
+ incl %esi
+ movzbl %al, %ecx
+ xorl %ecx, %ebp
+ shrdl $8, %edx, %eax
+ xorl (%ebx, %ebp, 8), %eax
+ shrl $8, %edx
+ xorl 4(%ebx, %ebp, 8), %edx
+ decl %edi
+ jmp .L_rest
+
+.L_return:
+ /* Complement the final value. */
+ notl %eax
+ notl %edx
+
+ popl %ebp
+ popl %edi
+ popl %esi
+ popl %ebx
+ ret
+
+#if defined(PIC) || defined(__PIC__)
+ ALIGN(4, 16)
+.L_get_pc:
+ movl (%esp), %ebx
+ ret
+#endif
+
+#if defined(__APPLE__) && (defined(PIC) || defined(__PIC__))
+ /* Mach-O PIC */
+ .section __IMPORT,__pointers,non_lazy_symbol_pointers
+.L_lzma_crc64_table$non_lazy_ptr:
+ .indirect_symbol LZMA_CRC64_TABLE
+ .long 0
+
+#elif defined(_WIN32) || defined(__CYGWIN__)
+# ifdef DLL_EXPORT
+ /* This is equivalent of __declspec(dllexport). */
+ .section .drectve
+ .ascii " -export:lzma_crc64"
+# endif
+
+#elif !defined(__MSDOS__)
+ /* ELF */
+ .size LZMA_CRC64, .-LZMA_CRC64
+#endif
+
+/*
+ * This is needed to support non-executable stack. It's ugly to
+ * use __FreeBSD__ and __linux__ here, but I don't know a way to detect when
+ * we are using GNU assembler.
+ */
+#if defined(__ELF__) && (defined(__FreeBSD__) || defined(__linux__))
+ .section .note.GNU-stack,"",@progbits
+#endif
diff --git a/src/liblzma/check/crc_macros.h b/src/liblzma/check/crc_macros.h
new file mode 100644
index 0000000..a7c21b7
--- /dev/null
+++ b/src/liblzma/check/crc_macros.h
@@ -0,0 +1,30 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file crc_macros.h
+/// \brief Some endian-dependent macros for CRC32 and CRC64
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifdef WORDS_BIGENDIAN
+# define A(x) ((x) >> 24)
+# define B(x) (((x) >> 16) & 0xFF)
+# define C(x) (((x) >> 8) & 0xFF)
+# define D(x) ((x) & 0xFF)
+
+# define S8(x) ((x) << 8)
+# define S32(x) ((x) << 32)
+
+#else
+# define A(x) ((x) & 0xFF)
+# define B(x) (((x) >> 8) & 0xFF)
+# define C(x) (((x) >> 16) & 0xFF)
+# define D(x) ((x) >> 24)
+
+# define S8(x) ((x) >> 8)
+# define S32(x) ((x) >> 32)
+#endif
diff --git a/src/liblzma/check/sha256.c b/src/liblzma/check/sha256.c
new file mode 100644
index 0000000..6feb342
--- /dev/null
+++ b/src/liblzma/check/sha256.c
@@ -0,0 +1,196 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file sha256.c
+/// \brief SHA-256
+///
+/// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they
+/// are imported to liblzma, SSE instructions need to be used
+/// conditionally to keep the code working on older boxes.
+//
+// This code is based on the code found from 7-Zip, which has a modified
+// version of the SHA-256 found from Crypto++ <https://www.cryptopp.com/>.
+// The code was modified a little to fit into liblzma.
+//
+// Authors: Kevin Springle
+// Wei Dai
+// Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "check.h"
+
+// Rotate a uint32_t. GCC can optimize this to a rotate instruction
+// at least on x86.
+static inline uint32_t
+rotr_32(uint32_t num, unsigned amount)
+{
+ return (num >> amount) | (num << (32 - amount));
+}
+
+#define blk0(i) (W[i] = conv32be(data[i]))
+#define blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] \
+ + s0(W[(i - 15) & 15]))
+
+#define Ch(x, y, z) (z ^ (x & (y ^ z)))
+#define Maj(x, y, z) ((x & (y ^ z)) + (y & z))
+
+#define a(i) T[(0 - i) & 7]
+#define b(i) T[(1 - i) & 7]
+#define c(i) T[(2 - i) & 7]
+#define d(i) T[(3 - i) & 7]
+#define e(i) T[(4 - i) & 7]
+#define f(i) T[(5 - i) & 7]
+#define g(i) T[(6 - i) & 7]
+#define h(i) T[(7 - i) & 7]
+
+#define R(i, j, blk) \
+ h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] + blk; \
+ d(i) += h(i); \
+ h(i) += S0(a(i)) + Maj(a(i), b(i), c(i))
+#define R0(i) R(i, 0, blk0(i))
+#define R2(i) R(i, j, blk2(i))
+
+#define S0(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 9), 11), 2)
+#define S1(x) rotr_32(x ^ rotr_32(x ^ rotr_32(x, 14), 5), 6)
+#define s0(x) (rotr_32(x ^ rotr_32(x, 11), 7) ^ (x >> 3))
+#define s1(x) (rotr_32(x ^ rotr_32(x, 2), 17) ^ (x >> 10))
+
+
+static const uint32_t SHA256_K[64] = {
+ 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
+ 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
+ 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
+ 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
+ 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
+ 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
+ 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
+ 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
+ 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
+ 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
+ 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
+ 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
+ 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
+ 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
+ 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
+ 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2,
+};
+
+
+static void
+transform(uint32_t state[8], const uint32_t data[16])
+{
+ uint32_t W[16];
+ uint32_t T[8];
+
+ // Copy state[] to working vars.
+ memcpy(T, state, sizeof(T));
+
+ // The first 16 operations unrolled
+ R0( 0); R0( 1); R0( 2); R0( 3);
+ R0( 4); R0( 5); R0( 6); R0( 7);
+ R0( 8); R0( 9); R0(10); R0(11);
+ R0(12); R0(13); R0(14); R0(15);
+
+ // The remaining 48 operations partially unrolled
+ for (unsigned int j = 16; j < 64; j += 16) {
+ R2( 0); R2( 1); R2( 2); R2( 3);
+ R2( 4); R2( 5); R2( 6); R2( 7);
+ R2( 8); R2( 9); R2(10); R2(11);
+ R2(12); R2(13); R2(14); R2(15);
+ }
+
+ // Add the working vars back into state[].
+ state[0] += a(0);
+ state[1] += b(0);
+ state[2] += c(0);
+ state[3] += d(0);
+ state[4] += e(0);
+ state[5] += f(0);
+ state[6] += g(0);
+ state[7] += h(0);
+}
+
+
+static void
+process(lzma_check_state *check)
+{
+ transform(check->state.sha256.state, check->buffer.u32);
+ return;
+}
+
+
+extern void
+lzma_sha256_init(lzma_check_state *check)
+{
+ static const uint32_t s[8] = {
+ 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
+ 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19,
+ };
+
+ memcpy(check->state.sha256.state, s, sizeof(s));
+ check->state.sha256.size = 0;
+
+ return;
+}
+
+
+extern void
+lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
+{
+ // Copy the input data into a properly aligned temporary buffer.
+ // This way we can be called with arbitrarily sized buffers
+ // (no need to be multiple of 64 bytes), and the code works also
+ // on architectures that don't allow unaligned memory access.
+ while (size > 0) {
+ const size_t copy_start = check->state.sha256.size & 0x3F;
+ size_t copy_size = 64 - copy_start;
+ if (copy_size > size)
+ copy_size = size;
+
+ memcpy(check->buffer.u8 + copy_start, buf, copy_size);
+
+ buf += copy_size;
+ size -= copy_size;
+ check->state.sha256.size += copy_size;
+
+ if ((check->state.sha256.size & 0x3F) == 0)
+ process(check);
+ }
+
+ return;
+}
+
+
+extern void
+lzma_sha256_finish(lzma_check_state *check)
+{
+ // Add padding as described in RFC 3174 (it describes SHA-1 but
+ // the same padding style is used for SHA-256 too).
+ size_t pos = check->state.sha256.size & 0x3F;
+ check->buffer.u8[pos++] = 0x80;
+
+ while (pos != 64 - 8) {
+ if (pos == 64) {
+ process(check);
+ pos = 0;
+ }
+
+ check->buffer.u8[pos++] = 0x00;
+ }
+
+ // Convert the message size from bytes to bits.
+ check->state.sha256.size *= 8;
+
+ check->buffer.u64[(64 - 8) / 8] = conv64be(check->state.sha256.size);
+
+ process(check);
+
+ for (size_t i = 0; i < 8; ++i)
+ check->buffer.u32[i] = conv32be(check->state.sha256.state[i]);
+
+ return;
+}
diff --git a/src/liblzma/common/Makefile.inc b/src/liblzma/common/Makefile.inc
new file mode 100644
index 0000000..f0276a2
--- /dev/null
+++ b/src/liblzma/common/Makefile.inc
@@ -0,0 +1,104 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+liblzma_la_SOURCES += \
+ common/common.c \
+ common/common.h \
+ common/memcmplen.h \
+ common/block_util.c \
+ common/easy_preset.c \
+ common/easy_preset.h \
+ common/filter_common.c \
+ common/filter_common.h \
+ common/hardware_physmem.c \
+ common/index.c \
+ common/index.h \
+ common/stream_flags_common.c \
+ common/stream_flags_common.h \
+ common/string_conversion.c \
+ common/vli_size.c
+
+if COND_THREADS
+liblzma_la_SOURCES += \
+ common/hardware_cputhreads.c \
+ common/outqueue.c \
+ common/outqueue.h
+endif
+
+if COND_MAIN_ENCODER
+liblzma_la_SOURCES += \
+ common/alone_encoder.c \
+ common/block_buffer_encoder.c \
+ common/block_buffer_encoder.h \
+ common/block_encoder.c \
+ common/block_encoder.h \
+ common/block_header_encoder.c \
+ common/easy_buffer_encoder.c \
+ common/easy_encoder.c \
+ common/easy_encoder_memusage.c \
+ common/filter_buffer_encoder.c \
+ common/filter_encoder.c \
+ common/filter_encoder.h \
+ common/filter_flags_encoder.c \
+ common/index_encoder.c \
+ common/index_encoder.h \
+ common/stream_buffer_encoder.c \
+ common/stream_encoder.c \
+ common/stream_flags_encoder.c \
+ common/vli_encoder.c
+
+if COND_THREADS
+liblzma_la_SOURCES += \
+ common/stream_encoder_mt.c
+endif
+
+if COND_MICROLZMA
+liblzma_la_SOURCES += \
+ common/microlzma_encoder.c
+endif
+endif
+
+if COND_MAIN_DECODER
+liblzma_la_SOURCES += \
+ common/alone_decoder.c \
+ common/alone_decoder.h \
+ common/auto_decoder.c \
+ common/block_buffer_decoder.c \
+ common/block_decoder.c \
+ common/block_decoder.h \
+ common/block_header_decoder.c \
+ common/easy_decoder_memusage.c \
+ common/file_info.c \
+ common/filter_buffer_decoder.c \
+ common/filter_decoder.c \
+ common/filter_decoder.h \
+ common/filter_flags_decoder.c \
+ common/index_decoder.c \
+ common/index_decoder.h \
+ common/index_hash.c \
+ common/stream_buffer_decoder.c \
+ common/stream_decoder.c \
+ common/stream_decoder.h \
+ common/stream_flags_decoder.c \
+ common/vli_decoder.c
+
+if COND_THREADS
+liblzma_la_SOURCES += \
+ common/stream_decoder_mt.c
+endif
+
+if COND_MICROLZMA
+liblzma_la_SOURCES += \
+ common/microlzma_decoder.c
+endif
+
+if COND_LZIP_DECODER
+liblzma_la_SOURCES += \
+ common/lzip_decoder.c \
+ common/lzip_decoder.h
+endif
+endif
diff --git a/src/liblzma/common/alone_decoder.c b/src/liblzma/common/alone_decoder.c
new file mode 100644
index 0000000..1dc85ba
--- /dev/null
+++ b/src/liblzma/common/alone_decoder.c
@@ -0,0 +1,249 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file alone_decoder.c
+/// \brief Decoder for LZMA_Alone files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "alone_decoder.h"
+#include "lzma_decoder.h"
+#include "lz_decoder.h"
+
+
+typedef struct {
+ lzma_next_coder next;
+
+ enum {
+ SEQ_PROPERTIES,
+ SEQ_DICTIONARY_SIZE,
+ SEQ_UNCOMPRESSED_SIZE,
+ SEQ_CODER_INIT,
+ SEQ_CODE,
+ } sequence;
+
+ /// If true, reject files that are unlikely to be .lzma files.
+ /// If false, more non-.lzma files get accepted and will give
+ /// LZMA_DATA_ERROR either immediately or after a few output bytes.
+ bool picky;
+
+ /// Position in the header fields
+ size_t pos;
+
+ /// Uncompressed size decoded from the header
+ lzma_vli uncompressed_size;
+
+ /// Memory usage limit
+ uint64_t memlimit;
+
+ /// Amount of memory actually needed (only an estimate)
+ uint64_t memusage;
+
+ /// Options decoded from the header needed to initialize
+ /// the LZMA decoder
+ lzma_options_lzma options;
+} lzma_alone_coder;
+
+
+static lzma_ret
+alone_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size,
+ lzma_action action)
+{
+ lzma_alone_coder *coder = coder_ptr;
+
+ while (*out_pos < out_size
+ && (coder->sequence == SEQ_CODE || *in_pos < in_size))
+ switch (coder->sequence) {
+ case SEQ_PROPERTIES:
+ if (lzma_lzma_lclppb_decode(&coder->options, in[*in_pos]))
+ return LZMA_FORMAT_ERROR;
+
+ coder->sequence = SEQ_DICTIONARY_SIZE;
+ ++*in_pos;
+ break;
+
+ case SEQ_DICTIONARY_SIZE:
+ coder->options.dict_size
+ |= (size_t)(in[*in_pos]) << (coder->pos * 8);
+
+ if (++coder->pos == 4) {
+ if (coder->picky && coder->options.dict_size
+ != UINT32_MAX) {
+ // A hack to ditch tons of false positives:
+ // We allow only dictionary sizes that are
+ // 2^n or 2^n + 2^(n-1). LZMA_Alone created
+ // only files with 2^n, but accepts any
+ // dictionary size.
+ uint32_t d = coder->options.dict_size - 1;
+ d |= d >> 2;
+ d |= d >> 3;
+ d |= d >> 4;
+ d |= d >> 8;
+ d |= d >> 16;
+ ++d;
+
+ if (d != coder->options.dict_size)
+ return LZMA_FORMAT_ERROR;
+ }
+
+ coder->pos = 0;
+ coder->sequence = SEQ_UNCOMPRESSED_SIZE;
+ }
+
+ ++*in_pos;
+ break;
+
+ case SEQ_UNCOMPRESSED_SIZE:
+ coder->uncompressed_size
+ |= (lzma_vli)(in[*in_pos]) << (coder->pos * 8);
+ ++*in_pos;
+ if (++coder->pos < 8)
+ break;
+
+ // Another hack to ditch false positives: Assume that
+ // if the uncompressed size is known, it must be less
+ // than 256 GiB.
+ //
+ // FIXME? Without picky we allow > LZMA_VLI_MAX which doesn't
+ // really matter in this specific situation (> LZMA_VLI_MAX is
+ // safe in the LZMA decoder) but it's somewhat weird still.
+ if (coder->picky
+ && coder->uncompressed_size != LZMA_VLI_UNKNOWN
+ && coder->uncompressed_size
+ >= (LZMA_VLI_C(1) << 38))
+ return LZMA_FORMAT_ERROR;
+
+ // Use LZMA_FILTER_LZMA1EXT features to specify the
+ // uncompressed size and that the end marker is allowed
+ // even when the uncompressed size is known. Both .lzma
+ // header and LZMA1EXT use UINT64_MAX indicate that size
+ // is unknown.
+ coder->options.ext_flags = LZMA_LZMA1EXT_ALLOW_EOPM;
+ lzma_set_ext_size(coder->options, coder->uncompressed_size);
+
+ // Calculate the memory usage so that it is ready
+ // for SEQ_CODER_INIT.
+ coder->memusage = lzma_lzma_decoder_memusage(&coder->options)
+ + LZMA_MEMUSAGE_BASE;
+
+ coder->pos = 0;
+ coder->sequence = SEQ_CODER_INIT;
+
+ // Fall through
+
+ case SEQ_CODER_INIT: {
+ if (coder->memusage > coder->memlimit)
+ return LZMA_MEMLIMIT_ERROR;
+
+ lzma_filter_info filters[2] = {
+ {
+ .id = LZMA_FILTER_LZMA1EXT,
+ .init = &lzma_lzma_decoder_init,
+ .options = &coder->options,
+ }, {
+ .init = NULL,
+ }
+ };
+
+ return_if_error(lzma_next_filter_init(&coder->next,
+ allocator, filters));
+
+ coder->sequence = SEQ_CODE;
+ break;
+ }
+
+ case SEQ_CODE: {
+ return coder->next.code(coder->next.coder,
+ allocator, in, in_pos, in_size,
+ out, out_pos, out_size, action);
+ }
+
+ default:
+ return LZMA_PROG_ERROR;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+alone_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_alone_coder *coder = coder_ptr;
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+alone_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+ lzma_alone_coder *coder = coder_ptr;
+
+ *memusage = coder->memusage;
+ *old_memlimit = coder->memlimit;
+
+ if (new_memlimit != 0) {
+ if (new_memlimit < coder->memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ coder->memlimit = new_memlimit;
+ }
+
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_alone_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t memlimit, bool picky)
+{
+ lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator);
+
+ lzma_alone_coder *coder = next->coder;
+
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_alone_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &alone_decode;
+ next->end = &alone_decoder_end;
+ next->memconfig = &alone_decoder_memconfig;
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ coder->sequence = SEQ_PROPERTIES;
+ coder->picky = picky;
+ coder->pos = 0;
+ coder->options.dict_size = 0;
+ coder->options.preset_dict = NULL;
+ coder->options.preset_dict_size = 0;
+ coder->uncompressed_size = 0;
+ coder->memlimit = my_max(1, memlimit);
+ coder->memusage = LZMA_MEMUSAGE_BASE;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
+{
+ lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit, false);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/alone_decoder.h b/src/liblzma/common/alone_decoder.h
new file mode 100644
index 0000000..dfa031a
--- /dev/null
+++ b/src/liblzma/common/alone_decoder.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file alone_decoder.h
+/// \brief Decoder for LZMA_Alone files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_ALONE_DECODER_H
+#define LZMA_ALONE_DECODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_alone_decoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t memlimit, bool picky);
+
+#endif
diff --git a/src/liblzma/common/alone_encoder.c b/src/liblzma/common/alone_encoder.c
new file mode 100644
index 0000000..7d3812f
--- /dev/null
+++ b/src/liblzma/common/alone_encoder.c
@@ -0,0 +1,152 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file alone_encoder.c
+/// \brief Encoder for LZMA_Alone files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "lzma_encoder.h"
+
+
+#define ALONE_HEADER_SIZE (1 + 4 + 8)
+
+
+typedef struct {
+ lzma_next_coder next;
+
+ enum {
+ SEQ_HEADER,
+ SEQ_CODE,
+ } sequence;
+
+ size_t header_pos;
+ uint8_t header[ALONE_HEADER_SIZE];
+} lzma_alone_coder;
+
+
+static lzma_ret
+alone_encode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size,
+ lzma_action action)
+{
+ lzma_alone_coder *coder = coder_ptr;
+
+ while (*out_pos < out_size)
+ switch (coder->sequence) {
+ case SEQ_HEADER:
+ lzma_bufcpy(coder->header, &coder->header_pos,
+ ALONE_HEADER_SIZE,
+ out, out_pos, out_size);
+ if (coder->header_pos < ALONE_HEADER_SIZE)
+ return LZMA_OK;
+
+ coder->sequence = SEQ_CODE;
+ break;
+
+ case SEQ_CODE:
+ return coder->next.code(coder->next.coder,
+ allocator, in, in_pos, in_size,
+ out, out_pos, out_size, action);
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+alone_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_alone_coder *coder = coder_ptr;
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+alone_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_options_lzma *options)
+{
+ lzma_next_coder_init(&alone_encoder_init, next, allocator);
+
+ lzma_alone_coder *coder = next->coder;
+
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_alone_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &alone_encode;
+ next->end = &alone_encoder_end;
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ // Basic initializations
+ coder->sequence = SEQ_HEADER;
+ coder->header_pos = 0;
+
+ // Encode the header:
+ // - Properties (1 byte)
+ if (lzma_lzma_lclppb_encode(options, coder->header))
+ return LZMA_OPTIONS_ERROR;
+
+ // - Dictionary size (4 bytes)
+ if (options->dict_size < LZMA_DICT_SIZE_MIN)
+ return LZMA_OPTIONS_ERROR;
+
+ // Round up to the next 2^n or 2^n + 2^(n - 1) depending on which
+ // one is the next unless it is UINT32_MAX. While the header would
+ // allow any 32-bit integer, we do this to keep the decoder of liblzma
+ // accepting the resulting files.
+ uint32_t d = options->dict_size - 1;
+ d |= d >> 2;
+ d |= d >> 3;
+ d |= d >> 4;
+ d |= d >> 8;
+ d |= d >> 16;
+ if (d != UINT32_MAX)
+ ++d;
+
+ write32le(coder->header + 1, d);
+
+ // - Uncompressed size (always unknown and using EOPM)
+ memset(coder->header + 1 + 4, 0xFF, 8);
+
+ // Initialize the LZMA encoder.
+ const lzma_filter_info filters[2] = {
+ {
+ .id = LZMA_FILTER_LZMA1,
+ .init = &lzma_lzma_encoder_init,
+ .options = (void *)(options),
+ }, {
+ .init = NULL,
+ }
+ };
+
+ return lzma_next_filter_init(&coder->next, allocator, filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_alone_encoder(lzma_stream *strm, const lzma_options_lzma *options)
+{
+ lzma_next_strm_init(alone_encoder_init, strm, options);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/auto_decoder.c b/src/liblzma/common/auto_decoder.c
new file mode 100644
index 0000000..2a5c089
--- /dev/null
+++ b/src/liblzma/common/auto_decoder.c
@@ -0,0 +1,206 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file auto_decoder.c
+/// \brief Autodetect between .xz, .lzma (LZMA_Alone), and .lz (lzip)
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_decoder.h"
+#include "alone_decoder.h"
+#ifdef HAVE_LZIP_DECODER
+# include "lzip_decoder.h"
+#endif
+
+
+typedef struct {
+ /// .xz Stream decoder, LZMA_Alone decoder, or lzip decoder
+ lzma_next_coder next;
+
+ uint64_t memlimit;
+ uint32_t flags;
+
+ enum {
+ SEQ_INIT,
+ SEQ_CODE,
+ SEQ_FINISH,
+ } sequence;
+} lzma_auto_coder;
+
+
+static lzma_ret
+auto_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_auto_coder *coder = coder_ptr;
+
+ switch (coder->sequence) {
+ case SEQ_INIT:
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ // Update the sequence now, because we want to continue from
+ // SEQ_CODE even if we return some LZMA_*_CHECK.
+ coder->sequence = SEQ_CODE;
+
+ // Detect the file format. .xz files start with 0xFD which
+ // cannot be the first byte of .lzma (LZMA_Alone) format.
+ // The .lz format starts with 0x4C which could be the
+ // first byte of a .lzma file but luckily it would mean
+ // lc/lp/pb being 4/3/1 which liblzma doesn't support because
+ // lc + lp > 4. So using just 0x4C to detect .lz is OK here.
+ if (in[*in_pos] == 0xFD) {
+ return_if_error(lzma_stream_decoder_init(
+ &coder->next, allocator,
+ coder->memlimit, coder->flags));
+#ifdef HAVE_LZIP_DECODER
+ } else if (in[*in_pos] == 0x4C) {
+ return_if_error(lzma_lzip_decoder_init(
+ &coder->next, allocator,
+ coder->memlimit, coder->flags));
+#endif
+ } else {
+ return_if_error(lzma_alone_decoder_init(&coder->next,
+ allocator, coder->memlimit, true));
+
+ // If the application wants to know about missing
+ // integrity check or about the check in general, we
+ // need to handle it here, because LZMA_Alone decoder
+ // doesn't accept any flags.
+ if (coder->flags & LZMA_TELL_NO_CHECK)
+ return LZMA_NO_CHECK;
+
+ if (coder->flags & LZMA_TELL_ANY_CHECK)
+ return LZMA_GET_CHECK;
+ }
+
+ // Fall through
+
+ case SEQ_CODE: {
+ const lzma_ret ret = coder->next.code(
+ coder->next.coder, allocator,
+ in, in_pos, in_size,
+ out, out_pos, out_size, action);
+ if (ret != LZMA_STREAM_END
+ || (coder->flags & LZMA_CONCATENATED) == 0)
+ return ret;
+
+ coder->sequence = SEQ_FINISH;
+ }
+
+ // Fall through
+
+ case SEQ_FINISH:
+ // When LZMA_CONCATENATED was used and we were decoding
+ // a LZMA_Alone file, we need to check that there is no
+ // trailing garbage and wait for LZMA_FINISH.
+ if (*in_pos < in_size)
+ return LZMA_DATA_ERROR;
+
+ return action == LZMA_FINISH ? LZMA_STREAM_END : LZMA_OK;
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+}
+
+
+static void
+auto_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_auto_coder *coder = coder_ptr;
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_check
+auto_decoder_get_check(const void *coder_ptr)
+{
+ const lzma_auto_coder *coder = coder_ptr;
+
+ // It is LZMA_Alone if get_check is NULL.
+ return coder->next.get_check == NULL ? LZMA_CHECK_NONE
+ : coder->next.get_check(coder->next.coder);
+}
+
+
+static lzma_ret
+auto_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+ lzma_auto_coder *coder = coder_ptr;
+
+ lzma_ret ret;
+
+ if (coder->next.memconfig != NULL) {
+ ret = coder->next.memconfig(coder->next.coder,
+ memusage, old_memlimit, new_memlimit);
+ assert(*old_memlimit == coder->memlimit);
+ } else {
+ // No coder is configured yet. Use the base value as
+ // the current memory usage.
+ *memusage = LZMA_MEMUSAGE_BASE;
+ *old_memlimit = coder->memlimit;
+
+ ret = LZMA_OK;
+ if (new_memlimit != 0 && new_memlimit < *memusage)
+ ret = LZMA_MEMLIMIT_ERROR;
+ }
+
+ if (ret == LZMA_OK && new_memlimit != 0)
+ coder->memlimit = new_memlimit;
+
+ return ret;
+}
+
+
+static lzma_ret
+auto_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t memlimit, uint32_t flags)
+{
+ lzma_next_coder_init(&auto_decoder_init, next, allocator);
+
+ if (flags & ~LZMA_SUPPORTED_FLAGS)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_auto_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_auto_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &auto_decode;
+ next->end = &auto_decoder_end;
+ next->get_check = &auto_decoder_get_check;
+ next->memconfig = &auto_decoder_memconfig;
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ coder->memlimit = my_max(1, memlimit);
+ coder->flags = flags;
+ coder->sequence = SEQ_INIT;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+{
+ lzma_next_strm_init(auto_decoder_init, strm, memlimit, flags);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/block_buffer_decoder.c b/src/liblzma/common/block_buffer_decoder.c
new file mode 100644
index 0000000..b0ded90
--- /dev/null
+++ b/src/liblzma/common/block_buffer_decoder.c
@@ -0,0 +1,80 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_buffer_decoder.c
+/// \brief Single-call .xz Block decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_buffer_decode(lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ if (in_pos == NULL || (in == NULL && *in_pos != in_size)
+ || *in_pos > in_size || out_pos == NULL
+ || (out == NULL && *out_pos != out_size)
+ || *out_pos > out_size)
+ return LZMA_PROG_ERROR;
+
+ // Initialize the Block decoder.
+ lzma_next_coder block_decoder = LZMA_NEXT_CODER_INIT;
+ lzma_ret ret = lzma_block_decoder_init(
+ &block_decoder, allocator, block);
+
+ if (ret == LZMA_OK) {
+ // Save the positions so that we can restore them in case
+ // an error occurs.
+ const size_t in_start = *in_pos;
+ const size_t out_start = *out_pos;
+
+ // Do the actual decoding.
+ ret = block_decoder.code(block_decoder.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size,
+ LZMA_FINISH);
+
+ if (ret == LZMA_STREAM_END) {
+ ret = LZMA_OK;
+ } else {
+ if (ret == LZMA_OK) {
+ // Either the input was truncated or the
+ // output buffer was too small.
+ assert(*in_pos == in_size
+ || *out_pos == out_size);
+
+ // If all the input was consumed, then the
+ // input is truncated, even if the output
+ // buffer is also full. This is because
+ // processing the last byte of the Block
+ // never produces output.
+ //
+ // NOTE: This assumption may break when new
+ // filters are added, if the end marker of
+ // the filter doesn't consume at least one
+ // complete byte.
+ if (*in_pos == in_size)
+ ret = LZMA_DATA_ERROR;
+ else
+ ret = LZMA_BUF_ERROR;
+ }
+
+ // Restore the positions.
+ *in_pos = in_start;
+ *out_pos = out_start;
+ }
+ }
+
+ // Free the decoder memory. This needs to be done even if
+ // initialization fails, because the internal API doesn't
+ // require the initialization function to free its memory on error.
+ lzma_next_end(&block_decoder, allocator);
+
+ return ret;
+}
diff --git a/src/liblzma/common/block_buffer_encoder.c b/src/liblzma/common/block_buffer_encoder.c
new file mode 100644
index 0000000..fdef02d
--- /dev/null
+++ b/src/liblzma/common/block_buffer_encoder.c
@@ -0,0 +1,355 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_buffer_encoder.c
+/// \brief Single-call .xz Block encoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_buffer_encoder.h"
+#include "block_encoder.h"
+#include "filter_encoder.h"
+#include "lzma2_encoder.h"
+#include "check.h"
+
+
+/// Estimate the maximum size of the Block Header and Check fields for
+/// a Block that uses LZMA2 uncompressed chunks. We could use
+/// lzma_block_header_size() but this is simpler.
+///
+/// Block Header Size + Block Flags + Compressed Size
+/// + Uncompressed Size + Filter Flags for LZMA2 + CRC32 + Check
+/// and round up to the next multiple of four to take Header Padding
+/// into account.
+#define HEADERS_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 3 + 4 \
+ + LZMA_CHECK_SIZE_MAX + 3) & ~3)
+
+
+static uint64_t
+lzma2_bound(uint64_t uncompressed_size)
+{
+ // Prevent integer overflow in overhead calculation.
+ if (uncompressed_size > COMPRESSED_SIZE_MAX)
+ return 0;
+
+ // Calculate the exact overhead of the LZMA2 headers: Round
+ // uncompressed_size up to the next multiple of LZMA2_CHUNK_MAX,
+ // multiply by the size of per-chunk header, and add one byte for
+ // the end marker.
+ const uint64_t overhead = ((uncompressed_size + LZMA2_CHUNK_MAX - 1)
+ / LZMA2_CHUNK_MAX)
+ * LZMA2_HEADER_UNCOMPRESSED + 1;
+
+ // Catch the possible integer overflow.
+ if (COMPRESSED_SIZE_MAX - overhead < uncompressed_size)
+ return 0;
+
+ return uncompressed_size + overhead;
+}
+
+
+extern uint64_t
+lzma_block_buffer_bound64(uint64_t uncompressed_size)
+{
+ // If the data doesn't compress, we always use uncompressed
+ // LZMA2 chunks.
+ uint64_t lzma2_size = lzma2_bound(uncompressed_size);
+ if (lzma2_size == 0)
+ return 0;
+
+ // Take Block Padding into account.
+ lzma2_size = (lzma2_size + 3) & ~UINT64_C(3);
+
+ // No risk of integer overflow because lzma2_bound() already takes
+ // into account the size of the headers in the Block.
+ return HEADERS_BOUND + lzma2_size;
+}
+
+
+extern LZMA_API(size_t)
+lzma_block_buffer_bound(size_t uncompressed_size)
+{
+ uint64_t ret = lzma_block_buffer_bound64(uncompressed_size);
+
+#if SIZE_MAX < UINT64_MAX
+ // Catch the possible integer overflow on 32-bit systems.
+ if (ret > SIZE_MAX)
+ return 0;
+#endif
+
+ return ret;
+}
+
+
+static lzma_ret
+block_encode_uncompressed(lzma_block *block, const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // Use LZMA2 uncompressed chunks. We wouldn't need a dictionary at
+ // all, but LZMA2 always requires a dictionary, so use the minimum
+ // value to minimize memory usage of the decoder.
+ lzma_options_lzma lzma2 = {
+ .dict_size = LZMA_DICT_SIZE_MIN,
+ };
+
+ lzma_filter filters[2];
+ filters[0].id = LZMA_FILTER_LZMA2;
+ filters[0].options = &lzma2;
+ filters[1].id = LZMA_VLI_UNKNOWN;
+
+ // Set the above filter options to *block temporarily so that we can
+ // encode the Block Header.
+ lzma_filter *filters_orig = block->filters;
+ block->filters = filters;
+
+ if (lzma_block_header_size(block) != LZMA_OK) {
+ block->filters = filters_orig;
+ return LZMA_PROG_ERROR;
+ }
+
+ // Check that there's enough output space. The caller has already
+ // set block->compressed_size to what lzma2_bound() has returned,
+ // so we can reuse that value. We know that compressed_size is a
+ // known valid VLI and header_size is a small value so their sum
+ // will never overflow.
+ assert(block->compressed_size == lzma2_bound(in_size));
+ if (out_size - *out_pos
+ < block->header_size + block->compressed_size) {
+ block->filters = filters_orig;
+ return LZMA_BUF_ERROR;
+ }
+
+ if (lzma_block_header_encode(block, out + *out_pos) != LZMA_OK) {
+ block->filters = filters_orig;
+ return LZMA_PROG_ERROR;
+ }
+
+ block->filters = filters_orig;
+ *out_pos += block->header_size;
+
+ // Encode the data using LZMA2 uncompressed chunks.
+ size_t in_pos = 0;
+ uint8_t control = 0x01; // Dictionary reset
+
+ while (in_pos < in_size) {
+ // Control byte: Indicate uncompressed chunk, of which
+ // the first resets the dictionary.
+ out[(*out_pos)++] = control;
+ control = 0x02; // No dictionary reset
+
+ // Size of the uncompressed chunk
+ const size_t copy_size
+ = my_min(in_size - in_pos, LZMA2_CHUNK_MAX);
+ out[(*out_pos)++] = (copy_size - 1) >> 8;
+ out[(*out_pos)++] = (copy_size - 1) & 0xFF;
+
+ // The actual data
+ assert(*out_pos + copy_size <= out_size);
+ memcpy(out + *out_pos, in + in_pos, copy_size);
+
+ in_pos += copy_size;
+ *out_pos += copy_size;
+ }
+
+ // End marker
+ out[(*out_pos)++] = 0x00;
+ assert(*out_pos <= out_size);
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
+block_encode_normal(lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // Find out the size of the Block Header.
+ return_if_error(lzma_block_header_size(block));
+
+ // Reserve space for the Block Header and skip it for now.
+ if (out_size - *out_pos <= block->header_size)
+ return LZMA_BUF_ERROR;
+
+ const size_t out_start = *out_pos;
+ *out_pos += block->header_size;
+
+ // Limit out_size so that we stop encoding if the output would grow
+ // bigger than what uncompressed Block would be.
+ if (out_size - *out_pos > block->compressed_size)
+ out_size = *out_pos + block->compressed_size;
+
+ // TODO: In many common cases this could be optimized to use
+ // significantly less memory.
+ lzma_next_coder raw_encoder = LZMA_NEXT_CODER_INIT;
+ lzma_ret ret = lzma_raw_encoder_init(
+ &raw_encoder, allocator, block->filters);
+
+ if (ret == LZMA_OK) {
+ size_t in_pos = 0;
+ ret = raw_encoder.code(raw_encoder.coder, allocator,
+ in, &in_pos, in_size, out, out_pos, out_size,
+ LZMA_FINISH);
+ }
+
+ // NOTE: This needs to be run even if lzma_raw_encoder_init() failed.
+ lzma_next_end(&raw_encoder, allocator);
+
+ if (ret == LZMA_STREAM_END) {
+ // Compression was successful. Write the Block Header.
+ block->compressed_size
+ = *out_pos - (out_start + block->header_size);
+ ret = lzma_block_header_encode(block, out + out_start);
+ if (ret != LZMA_OK)
+ ret = LZMA_PROG_ERROR;
+
+ } else if (ret == LZMA_OK) {
+ // Output buffer became full.
+ ret = LZMA_BUF_ERROR;
+ }
+
+ // Reset *out_pos if something went wrong.
+ if (ret != LZMA_OK)
+ *out_pos = out_start;
+
+ return ret;
+}
+
+
+static lzma_ret
+block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size,
+ bool try_to_compress)
+{
+ // Validate the arguments.
+ if (block == NULL || (in == NULL && in_size != 0) || out == NULL
+ || out_pos == NULL || *out_pos > out_size)
+ return LZMA_PROG_ERROR;
+
+ // The contents of the structure may depend on the version so
+ // check the version before validating the contents of *block.
+ if (block->version > 1)
+ return LZMA_OPTIONS_ERROR;
+
+ if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX
+ || (try_to_compress && block->filters == NULL))
+ return LZMA_PROG_ERROR;
+
+ if (!lzma_check_is_supported(block->check))
+ return LZMA_UNSUPPORTED_CHECK;
+
+ // Size of a Block has to be a multiple of four, so limit the size
+ // here already. This way we don't need to check it again when adding
+ // Block Padding.
+ out_size -= (out_size - *out_pos) & 3;
+
+ // Get the size of the Check field.
+ const size_t check_size = lzma_check_size(block->check);
+ assert(check_size != UINT32_MAX);
+
+ // Reserve space for the Check field.
+ if (out_size - *out_pos <= check_size)
+ return LZMA_BUF_ERROR;
+
+ out_size -= check_size;
+
+ // Initialize block->uncompressed_size and calculate the worst-case
+ // value for block->compressed_size.
+ block->uncompressed_size = in_size;
+ block->compressed_size = lzma2_bound(in_size);
+ if (block->compressed_size == 0)
+ return LZMA_DATA_ERROR;
+
+ // Do the actual compression.
+ lzma_ret ret = LZMA_BUF_ERROR;
+ if (try_to_compress)
+ ret = block_encode_normal(block, allocator,
+ in, in_size, out, out_pos, out_size);
+
+ if (ret != LZMA_OK) {
+ // If the error was something else than output buffer
+ // becoming full, return the error now.
+ if (ret != LZMA_BUF_ERROR)
+ return ret;
+
+ // The data was incompressible (at least with the options
+ // given to us) or the output buffer was too small. Use the
+ // uncompressed chunks of LZMA2 to wrap the data into a valid
+ // Block. If we haven't been given enough output space, even
+ // this may fail.
+ return_if_error(block_encode_uncompressed(block, in, in_size,
+ out, out_pos, out_size));
+ }
+
+ assert(*out_pos <= out_size);
+
+ // Block Padding. No buffer overflow here, because we already adjusted
+ // out_size so that (out_size - out_start) is a multiple of four.
+ // Thus, if the buffer is full, the loop body can never run.
+ for (size_t i = (size_t)(block->compressed_size); i & 3; ++i) {
+ assert(*out_pos < out_size);
+ out[(*out_pos)++] = 0x00;
+ }
+
+ // If there's no Check field, we are done now.
+ if (check_size > 0) {
+ // Calculate the integrity check. We reserved space for
+ // the Check field earlier so we don't need to check for
+ // available output space here.
+ lzma_check_state check;
+ lzma_check_init(&check, block->check);
+ lzma_check_update(&check, block->check, in, in_size);
+ lzma_check_finish(&check, block->check);
+
+ memcpy(block->raw_check, check.buffer.u8, check_size);
+ memcpy(out + *out_pos, check.buffer.u8, check_size);
+ *out_pos += check_size;
+ }
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_buffer_encode(lzma_block *block, const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ return block_buffer_encode(block, allocator,
+ in, in_size, out, out_pos, out_size, true);
+}
+
+
+#ifdef HAVE_SYMBOL_VERSIONS_LINUX
+// This is for compatibility with binaries linked against liblzma that
+// has been patched with xz-5.2.2-compat-libs.patch from RHEL/CentOS 7.
+LZMA_SYMVER_API("lzma_block_uncomp_encode@XZ_5.2.2",
+ lzma_ret, lzma_block_uncomp_encode_522)(lzma_block *block,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result
+ __attribute__((__alias__("lzma_block_uncomp_encode_52")));
+
+LZMA_SYMVER_API("lzma_block_uncomp_encode@@XZ_5.2",
+ lzma_ret, lzma_block_uncomp_encode_52)(lzma_block *block,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+#define lzma_block_uncomp_encode lzma_block_uncomp_encode_52
+#endif
+extern LZMA_API(lzma_ret)
+lzma_block_uncomp_encode(lzma_block *block,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // It won't allocate any memory from heap so no need
+ // for lzma_allocator.
+ return block_buffer_encode(block, NULL,
+ in, in_size, out, out_pos, out_size, false);
+}
diff --git a/src/liblzma/common/block_buffer_encoder.h b/src/liblzma/common/block_buffer_encoder.h
new file mode 100644
index 0000000..653207f
--- /dev/null
+++ b/src/liblzma/common/block_buffer_encoder.h
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_buffer_encoder.h
+/// \brief Single-call .xz Block encoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_BLOCK_BUFFER_ENCODER_H
+#define LZMA_BLOCK_BUFFER_ENCODER_H
+
+#include "common.h"
+
+
+/// uint64_t version of lzma_block_buffer_bound(). It is used by
+/// stream_encoder_mt.c. Probably the original lzma_block_buffer_bound()
+/// should have been 64-bit, but fixing it would break the ABI.
+extern uint64_t lzma_block_buffer_bound64(uint64_t uncompressed_size);
+
+#endif
diff --git a/src/liblzma/common/block_decoder.c b/src/liblzma/common/block_decoder.c
new file mode 100644
index 0000000..be647d4
--- /dev/null
+++ b/src/liblzma/common/block_decoder.c
@@ -0,0 +1,289 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_decoder.c
+/// \brief Decodes .xz Blocks
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_decoder.h"
+#include "filter_decoder.h"
+#include "check.h"
+
+
+typedef struct {
+ enum {
+ SEQ_CODE,
+ SEQ_PADDING,
+ SEQ_CHECK,
+ } sequence;
+
+ /// The filters in the chain; initialized with lzma_raw_decoder_init().
+ lzma_next_coder next;
+
+ /// Decoding options; we also write Compressed Size and Uncompressed
+ /// Size back to this structure when the decoding has been finished.
+ lzma_block *block;
+
+ /// Compressed Size calculated while decoding
+ lzma_vli compressed_size;
+
+ /// Uncompressed Size calculated while decoding
+ lzma_vli uncompressed_size;
+
+ /// Maximum allowed Compressed Size; this takes into account the
+ /// size of the Block Header and Check fields when Compressed Size
+ /// is unknown.
+ lzma_vli compressed_limit;
+
+ /// Maximum allowed Uncompressed Size.
+ lzma_vli uncompressed_limit;
+
+ /// Position when reading the Check field
+ size_t check_pos;
+
+ /// Check of the uncompressed data
+ lzma_check_state check;
+
+ /// True if the integrity check won't be calculated and verified.
+ bool ignore_check;
+} lzma_block_coder;
+
+
+static inline bool
+is_size_valid(lzma_vli size, lzma_vli reference)
+{
+ return reference == LZMA_VLI_UNKNOWN || reference == size;
+}
+
+
+static lzma_ret
+block_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_block_coder *coder = coder_ptr;
+
+ switch (coder->sequence) {
+ case SEQ_CODE: {
+ const size_t in_start = *in_pos;
+ const size_t out_start = *out_pos;
+
+ // Limit the amount of input and output space that we give
+ // to the raw decoder based on the information we have
+ // (or don't have) from Block Header.
+ const size_t in_stop = *in_pos + (size_t)my_min(
+ in_size - *in_pos,
+ coder->compressed_limit - coder->compressed_size);
+ const size_t out_stop = *out_pos + (size_t)my_min(
+ out_size - *out_pos,
+ coder->uncompressed_limit - coder->uncompressed_size);
+
+ const lzma_ret ret = coder->next.code(coder->next.coder,
+ allocator, in, in_pos, in_stop,
+ out, out_pos, out_stop, action);
+
+ const size_t in_used = *in_pos - in_start;
+ const size_t out_used = *out_pos - out_start;
+
+ // Because we have limited the input and output sizes,
+ // we know that these cannot grow too big or overflow.
+ coder->compressed_size += in_used;
+ coder->uncompressed_size += out_used;
+
+ if (ret == LZMA_OK) {
+ const bool comp_done = coder->compressed_size
+ == coder->block->compressed_size;
+ const bool uncomp_done = coder->uncompressed_size
+ == coder->block->uncompressed_size;
+
+ // If both input and output amounts match the sizes
+ // in Block Header but we still got LZMA_OK instead
+ // of LZMA_STREAM_END, the file is broken.
+ if (comp_done && uncomp_done)
+ return LZMA_DATA_ERROR;
+
+ // If the decoder has consumed all the input that it
+ // needs but it still couldn't fill the output buffer
+ // or return LZMA_STREAM_END, the file is broken.
+ if (comp_done && *out_pos < out_size)
+ return LZMA_DATA_ERROR;
+
+ // If the decoder has produced all the output but
+ // it still didn't return LZMA_STREAM_END or consume
+ // more input (for example, detecting an end of
+ // payload marker may need more input but produce
+ // no output) the file is broken.
+ if (uncomp_done && *in_pos < in_size)
+ return LZMA_DATA_ERROR;
+ }
+
+ // Don't waste time updating the integrity check if it will be
+ // ignored. Also skip it if no new output was produced. This
+ // avoids null pointer + 0 (undefined behavior) when out == 0.
+ if (!coder->ignore_check && out_used > 0)
+ lzma_check_update(&coder->check, coder->block->check,
+ out + out_start, out_used);
+
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ // Compressed and Uncompressed Sizes are now at their final
+ // values. Verify that they match the values given to us.
+ if (!is_size_valid(coder->compressed_size,
+ coder->block->compressed_size)
+ || !is_size_valid(coder->uncompressed_size,
+ coder->block->uncompressed_size))
+ return LZMA_DATA_ERROR;
+
+ // Copy the values into coder->block. The caller
+ // may use this information to construct Index.
+ coder->block->compressed_size = coder->compressed_size;
+ coder->block->uncompressed_size = coder->uncompressed_size;
+
+ coder->sequence = SEQ_PADDING;
+ }
+
+ // Fall through
+
+ case SEQ_PADDING:
+ // Compressed Data is padded to a multiple of four bytes.
+ while (coder->compressed_size & 3) {
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ // We use compressed_size here just get the Padding
+ // right. The actual Compressed Size was stored to
+ // coder->block already, and won't be modified by
+ // us anymore.
+ ++coder->compressed_size;
+
+ if (in[(*in_pos)++] != 0x00)
+ return LZMA_DATA_ERROR;
+ }
+
+ if (coder->block->check == LZMA_CHECK_NONE)
+ return LZMA_STREAM_END;
+
+ if (!coder->ignore_check)
+ lzma_check_finish(&coder->check, coder->block->check);
+
+ coder->sequence = SEQ_CHECK;
+
+ // Fall through
+
+ case SEQ_CHECK: {
+ const size_t check_size = lzma_check_size(coder->block->check);
+ lzma_bufcpy(in, in_pos, in_size, coder->block->raw_check,
+ &coder->check_pos, check_size);
+ if (coder->check_pos < check_size)
+ return LZMA_OK;
+
+ // Validate the Check only if we support it.
+ // coder->check.buffer may be uninitialized
+ // when the Check ID is not supported.
+ if (!coder->ignore_check
+ && lzma_check_is_supported(coder->block->check)
+ && memcmp(coder->block->raw_check,
+ coder->check.buffer.u8,
+ check_size) != 0)
+ return LZMA_DATA_ERROR;
+
+ return LZMA_STREAM_END;
+ }
+ }
+
+ return LZMA_PROG_ERROR;
+}
+
+
+static void
+block_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_block_coder *coder = coder_ptr;
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+extern lzma_ret
+lzma_block_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ lzma_block *block)
+{
+ lzma_next_coder_init(&lzma_block_decoder_init, next, allocator);
+
+ // Validate the options. lzma_block_unpadded_size() does that for us
+ // except for Uncompressed Size and filters. Filters are validated
+ // by the raw decoder.
+ if (lzma_block_unpadded_size(block) == 0
+ || !lzma_vli_is_valid(block->uncompressed_size))
+ return LZMA_PROG_ERROR;
+
+ // Allocate *next->coder if needed.
+ lzma_block_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_block_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &block_decode;
+ next->end = &block_decoder_end;
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ // Basic initializations
+ coder->sequence = SEQ_CODE;
+ coder->block = block;
+ coder->compressed_size = 0;
+ coder->uncompressed_size = 0;
+
+ // If Compressed Size is not known, we calculate the maximum allowed
+ // value so that encoded size of the Block (including Block Padding)
+ // is still a valid VLI and a multiple of four.
+ coder->compressed_limit
+ = block->compressed_size == LZMA_VLI_UNKNOWN
+ ? (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
+ - block->header_size
+ - lzma_check_size(block->check)
+ : block->compressed_size;
+
+ // With Uncompressed Size this is simpler. If Block Header lacks
+ // the size info, then LZMA_VLI_MAX is the maximum possible
+ // Uncompressed Size.
+ coder->uncompressed_limit
+ = block->uncompressed_size == LZMA_VLI_UNKNOWN
+ ? LZMA_VLI_MAX
+ : block->uncompressed_size;
+
+ // Initialize the check. It's caller's problem if the Check ID is not
+ // supported, and the Block decoder cannot verify the Check field.
+ // Caller can test lzma_check_is_supported(block->check).
+ coder->check_pos = 0;
+ lzma_check_init(&coder->check, block->check);
+
+ coder->ignore_check = block->version >= 1
+ ? block->ignore_check : false;
+
+ // Initialize the filter chain.
+ return lzma_raw_decoder_init(&coder->next, allocator,
+ block->filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_decoder(lzma_stream *strm, lzma_block *block)
+{
+ lzma_next_strm_init(lzma_block_decoder_init, strm, block);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/block_decoder.h b/src/liblzma/common/block_decoder.h
new file mode 100644
index 0000000..718c5ce
--- /dev/null
+++ b/src/liblzma/common/block_decoder.h
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_decoder.h
+/// \brief Decodes .xz Blocks
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_BLOCK_DECODER_H
+#define LZMA_BLOCK_DECODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_block_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator, lzma_block *block);
+
+#endif
diff --git a/src/liblzma/common/block_encoder.c b/src/liblzma/common/block_encoder.c
new file mode 100644
index 0000000..4a136ef
--- /dev/null
+++ b/src/liblzma/common/block_encoder.c
@@ -0,0 +1,227 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_encoder.c
+/// \brief Encodes .xz Blocks
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_encoder.h"
+#include "filter_encoder.h"
+#include "check.h"
+
+
+typedef struct {
+ /// The filters in the chain; initialized with lzma_raw_decoder_init().
+ lzma_next_coder next;
+
+ /// Encoding options; we also write Unpadded Size, Compressed Size,
+ /// and Uncompressed Size back to this structure when the encoding
+ /// has been finished.
+ lzma_block *block;
+
+ enum {
+ SEQ_CODE,
+ SEQ_PADDING,
+ SEQ_CHECK,
+ } sequence;
+
+ /// Compressed Size calculated while encoding
+ lzma_vli compressed_size;
+
+ /// Uncompressed Size calculated while encoding
+ lzma_vli uncompressed_size;
+
+ /// Position in the Check field
+ size_t pos;
+
+ /// Check of the uncompressed data
+ lzma_check_state check;
+} lzma_block_coder;
+
+
+static lzma_ret
+block_encode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_block_coder *coder = coder_ptr;
+
+ // Check that our amount of input stays in proper limits.
+ if (LZMA_VLI_MAX - coder->uncompressed_size < in_size - *in_pos)
+ return LZMA_DATA_ERROR;
+
+ switch (coder->sequence) {
+ case SEQ_CODE: {
+ const size_t in_start = *in_pos;
+ const size_t out_start = *out_pos;
+
+ const lzma_ret ret = coder->next.code(coder->next.coder,
+ allocator, in, in_pos, in_size,
+ out, out_pos, out_size, action);
+
+ const size_t in_used = *in_pos - in_start;
+ const size_t out_used = *out_pos - out_start;
+
+ if (COMPRESSED_SIZE_MAX - coder->compressed_size < out_used)
+ return LZMA_DATA_ERROR;
+
+ coder->compressed_size += out_used;
+
+ // No need to check for overflow because we have already
+ // checked it at the beginning of this function.
+ coder->uncompressed_size += in_used;
+
+ // Call lzma_check_update() only if input was consumed. This
+ // avoids null pointer + 0 (undefined behavior) when in == 0.
+ if (in_used > 0)
+ lzma_check_update(&coder->check, coder->block->check,
+ in + in_start, in_used);
+
+ if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
+ return ret;
+
+ assert(*in_pos == in_size);
+ assert(action == LZMA_FINISH);
+
+ // Copy the values into coder->block. The caller
+ // may use this information to construct Index.
+ coder->block->compressed_size = coder->compressed_size;
+ coder->block->uncompressed_size = coder->uncompressed_size;
+
+ coder->sequence = SEQ_PADDING;
+ }
+
+ // Fall through
+
+ case SEQ_PADDING:
+ // Pad Compressed Data to a multiple of four bytes. We can
+ // use coder->compressed_size for this since we don't need
+ // it for anything else anymore.
+ while (coder->compressed_size & 3) {
+ if (*out_pos >= out_size)
+ return LZMA_OK;
+
+ out[*out_pos] = 0x00;
+ ++*out_pos;
+ ++coder->compressed_size;
+ }
+
+ if (coder->block->check == LZMA_CHECK_NONE)
+ return LZMA_STREAM_END;
+
+ lzma_check_finish(&coder->check, coder->block->check);
+
+ coder->sequence = SEQ_CHECK;
+
+ // Fall through
+
+ case SEQ_CHECK: {
+ const size_t check_size = lzma_check_size(coder->block->check);
+ lzma_bufcpy(coder->check.buffer.u8, &coder->pos, check_size,
+ out, out_pos, out_size);
+ if (coder->pos < check_size)
+ return LZMA_OK;
+
+ memcpy(coder->block->raw_check, coder->check.buffer.u8,
+ check_size);
+ return LZMA_STREAM_END;
+ }
+ }
+
+ return LZMA_PROG_ERROR;
+}
+
+
+static void
+block_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_block_coder *coder = coder_ptr;
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+block_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+ const lzma_filter *filters lzma_attribute((__unused__)),
+ const lzma_filter *reversed_filters)
+{
+ lzma_block_coder *coder = coder_ptr;
+
+ if (coder->sequence != SEQ_CODE)
+ return LZMA_PROG_ERROR;
+
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters);
+}
+
+
+extern lzma_ret
+lzma_block_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ lzma_block *block)
+{
+ lzma_next_coder_init(&lzma_block_encoder_init, next, allocator);
+
+ if (block == NULL)
+ return LZMA_PROG_ERROR;
+
+ // The contents of the structure may depend on the version so
+ // check the version first.
+ if (block->version > 1)
+ return LZMA_OPTIONS_ERROR;
+
+ // If the Check ID is not supported, we cannot calculate the check and
+ // thus not create a proper Block.
+ if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
+ return LZMA_PROG_ERROR;
+
+ if (!lzma_check_is_supported(block->check))
+ return LZMA_UNSUPPORTED_CHECK;
+
+ // Allocate and initialize *next->coder if needed.
+ lzma_block_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_block_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &block_encode;
+ next->end = &block_encoder_end;
+ next->update = &block_encoder_update;
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ // Basic initializations
+ coder->sequence = SEQ_CODE;
+ coder->block = block;
+ coder->compressed_size = 0;
+ coder->uncompressed_size = 0;
+ coder->pos = 0;
+
+ // Initialize the check
+ lzma_check_init(&coder->check, block->check);
+
+ // Initialize the requested filters.
+ return lzma_raw_encoder_init(&coder->next, allocator, block->filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_encoder(lzma_stream *strm, lzma_block *block)
+{
+ lzma_next_strm_init(lzma_block_encoder_init, strm, block);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/block_encoder.h b/src/liblzma/common/block_encoder.h
new file mode 100644
index 0000000..bd97c18
--- /dev/null
+++ b/src/liblzma/common/block_encoder.h
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_encoder.h
+/// \brief Encodes .xz Blocks
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_BLOCK_ENCODER_H
+#define LZMA_BLOCK_ENCODER_H
+
+#include "common.h"
+
+
+/// \brief Biggest Compressed Size value that the Block encoder supports
+///
+/// The maximum size of a single Block is limited by the maximum size of
+/// a Stream, which in theory is 2^63 - 3 bytes (i.e. LZMA_VLI_MAX - 3).
+/// While the size is really big and no one should hit it in practice, we
+/// take it into account in some places anyway to catch some errors e.g. if
+/// application passes insanely big value to some function.
+///
+/// We could take into account the headers etc. to determine the exact
+/// maximum size of the Compressed Data field, but the complexity would give
+/// us nothing useful. Instead, limit the size of Compressed Data so that
+/// even with biggest possible Block Header and Check fields the total
+/// encoded size of the Block stays as a valid VLI. This doesn't guarantee
+/// that the size of the Stream doesn't grow too big, but that problem is
+/// taken care outside the Block handling code.
+///
+/// ~LZMA_VLI_C(3) is to guarantee that if we need padding at the end of
+/// the Compressed Data field, it will still stay in the proper limit.
+///
+/// This constant is in this file because it is needed in both
+/// block_encoder.c and block_buffer_encoder.c.
+#define COMPRESSED_SIZE_MAX ((LZMA_VLI_MAX - LZMA_BLOCK_HEADER_SIZE_MAX \
+ - LZMA_CHECK_SIZE_MAX) & ~LZMA_VLI_C(3))
+
+
+extern lzma_ret lzma_block_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator, lzma_block *block);
+
+#endif
diff --git a/src/liblzma/common/block_header_decoder.c b/src/liblzma/common/block_header_decoder.c
new file mode 100644
index 0000000..c4935dc
--- /dev/null
+++ b/src/liblzma/common/block_header_decoder.c
@@ -0,0 +1,115 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_header_decoder.c
+/// \brief Decodes Block Header from .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "check.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_header_decode(lzma_block *block,
+ const lzma_allocator *allocator, const uint8_t *in)
+{
+ // NOTE: We consider the header to be corrupt not only when the
+ // CRC32 doesn't match, but also when variable-length integers
+ // are invalid or over 63 bits, or if the header is too small
+ // to contain the claimed information.
+
+ // Catch unexpected NULL pointers.
+ if (block == NULL || block->filters == NULL || in == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Initialize the filter options array. This way the caller can
+ // safely free() the options even if an error occurs in this function.
+ for (size_t i = 0; i <= LZMA_FILTERS_MAX; ++i) {
+ block->filters[i].id = LZMA_VLI_UNKNOWN;
+ block->filters[i].options = NULL;
+ }
+
+ // Versions 0 and 1 are supported. If a newer version was specified,
+ // we need to downgrade it.
+ if (block->version > 1)
+ block->version = 1;
+
+ // This isn't a Block Header option, but since the decompressor will
+ // read it if version >= 1, it's better to initialize it here than
+ // to expect the caller to do it since in almost all cases this
+ // should be false.
+ block->ignore_check = false;
+
+ // Validate Block Header Size and Check type. The caller must have
+ // already set these, so it is a programming error if this test fails.
+ if (lzma_block_header_size_decode(in[0]) != block->header_size
+ || (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
+ return LZMA_PROG_ERROR;
+
+ // Exclude the CRC32 field.
+ const size_t in_size = block->header_size - 4;
+
+ // Verify CRC32
+ if (lzma_crc32(in, in_size, 0) != read32le(in + in_size)) {
+#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+ return LZMA_DATA_ERROR;
+#endif
+ }
+
+ // Check for unsupported flags.
+ if (in[1] & 0x3C)
+ return LZMA_OPTIONS_ERROR;
+
+ // Start after the Block Header Size and Block Flags fields.
+ size_t in_pos = 2;
+
+ // Compressed Size
+ if (in[1] & 0x40) {
+ return_if_error(lzma_vli_decode(&block->compressed_size,
+ NULL, in, &in_pos, in_size));
+
+ // Validate Compressed Size. This checks that it isn't zero
+ // and that the total size of the Block is a valid VLI.
+ if (lzma_block_unpadded_size(block) == 0)
+ return LZMA_DATA_ERROR;
+ } else {
+ block->compressed_size = LZMA_VLI_UNKNOWN;
+ }
+
+ // Uncompressed Size
+ if (in[1] & 0x80)
+ return_if_error(lzma_vli_decode(&block->uncompressed_size,
+ NULL, in, &in_pos, in_size));
+ else
+ block->uncompressed_size = LZMA_VLI_UNKNOWN;
+
+ // Filter Flags
+ const size_t filter_count = (in[1] & 3U) + 1;
+ for (size_t i = 0; i < filter_count; ++i) {
+ const lzma_ret ret = lzma_filter_flags_decode(
+ &block->filters[i], allocator,
+ in, &in_pos, in_size);
+ if (ret != LZMA_OK) {
+ lzma_filters_free(block->filters, allocator);
+ return ret;
+ }
+ }
+
+ // Padding
+ while (in_pos < in_size) {
+ if (in[in_pos++] != 0x00) {
+ lzma_filters_free(block->filters, allocator);
+
+ // Possibly some new field present so use
+ // LZMA_OPTIONS_ERROR instead of LZMA_DATA_ERROR.
+ return LZMA_OPTIONS_ERROR;
+ }
+ }
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/block_header_encoder.c b/src/liblzma/common/block_header_encoder.c
new file mode 100644
index 0000000..160425d
--- /dev/null
+++ b/src/liblzma/common/block_header_encoder.c
@@ -0,0 +1,132 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_header_encoder.c
+/// \brief Encodes Block Header for .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "check.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_header_size(lzma_block *block)
+{
+ if (block->version > 1)
+ return LZMA_OPTIONS_ERROR;
+
+ // Block Header Size + Block Flags + CRC32.
+ uint32_t size = 1 + 1 + 4;
+
+ // Compressed Size
+ if (block->compressed_size != LZMA_VLI_UNKNOWN) {
+ const uint32_t add = lzma_vli_size(block->compressed_size);
+ if (add == 0 || block->compressed_size == 0)
+ return LZMA_PROG_ERROR;
+
+ size += add;
+ }
+
+ // Uncompressed Size
+ if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
+ const uint32_t add = lzma_vli_size(block->uncompressed_size);
+ if (add == 0)
+ return LZMA_PROG_ERROR;
+
+ size += add;
+ }
+
+ // List of Filter Flags
+ if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
+ return LZMA_PROG_ERROR;
+
+ for (size_t i = 0; block->filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ // Don't allow too many filters.
+ if (i == LZMA_FILTERS_MAX)
+ return LZMA_PROG_ERROR;
+
+ uint32_t add;
+ return_if_error(lzma_filter_flags_size(&add,
+ block->filters + i));
+
+ size += add;
+ }
+
+ // Pad to a multiple of four bytes.
+ block->header_size = (size + 3) & ~UINT32_C(3);
+
+ // NOTE: We don't verify that the encoded size of the Block stays
+ // within limits. This is because it is possible that we are called
+ // with exaggerated Compressed Size (e.g. LZMA_VLI_MAX) to reserve
+ // space for Block Header, and later called again with lower,
+ // real values.
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_header_encode(const lzma_block *block, uint8_t *out)
+{
+ // Validate everything but filters.
+ if (lzma_block_unpadded_size(block) == 0
+ || !lzma_vli_is_valid(block->uncompressed_size))
+ return LZMA_PROG_ERROR;
+
+ // Indicate the size of the buffer _excluding_ the CRC32 field.
+ const size_t out_size = block->header_size - 4;
+
+ // Store the Block Header Size.
+ out[0] = out_size / 4;
+
+ // We write Block Flags in pieces.
+ out[1] = 0x00;
+ size_t out_pos = 2;
+
+ // Compressed Size
+ if (block->compressed_size != LZMA_VLI_UNKNOWN) {
+ return_if_error(lzma_vli_encode(block->compressed_size, NULL,
+ out, &out_pos, out_size));
+
+ out[1] |= 0x40;
+ }
+
+ // Uncompressed Size
+ if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
+ return_if_error(lzma_vli_encode(block->uncompressed_size, NULL,
+ out, &out_pos, out_size));
+
+ out[1] |= 0x80;
+ }
+
+ // Filter Flags
+ if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
+ return LZMA_PROG_ERROR;
+
+ size_t filter_count = 0;
+ do {
+ // There can be a maximum of four filters.
+ if (filter_count == LZMA_FILTERS_MAX)
+ return LZMA_PROG_ERROR;
+
+ return_if_error(lzma_filter_flags_encode(
+ block->filters + filter_count,
+ out, &out_pos, out_size));
+
+ } while (block->filters[++filter_count].id != LZMA_VLI_UNKNOWN);
+
+ out[1] |= filter_count - 1;
+
+ // Padding
+ memzero(out + out_pos, out_size - out_pos);
+
+ // CRC32
+ write32le(out + out_size, lzma_crc32(out, out_size, 0));
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/block_util.c b/src/liblzma/common/block_util.c
new file mode 100644
index 0000000..acb3111
--- /dev/null
+++ b/src/liblzma/common/block_util.c
@@ -0,0 +1,90 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file block_util.c
+/// \brief Utility functions to handle lzma_block
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "index.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_block_compressed_size(lzma_block *block, lzma_vli unpadded_size)
+{
+ // Validate everything but Uncompressed Size and filters.
+ if (lzma_block_unpadded_size(block) == 0)
+ return LZMA_PROG_ERROR;
+
+ const uint32_t container_size = block->header_size
+ + lzma_check_size(block->check);
+
+ // Validate that Compressed Size will be greater than zero.
+ if (unpadded_size <= container_size)
+ return LZMA_DATA_ERROR;
+
+ // Calculate what Compressed Size is supposed to be.
+ // If Compressed Size was present in Block Header,
+ // compare that the new value matches it.
+ const lzma_vli compressed_size = unpadded_size - container_size;
+ if (block->compressed_size != LZMA_VLI_UNKNOWN
+ && block->compressed_size != compressed_size)
+ return LZMA_DATA_ERROR;
+
+ block->compressed_size = compressed_size;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_block_unpadded_size(const lzma_block *block)
+{
+ // Validate the values that we are interested in i.e. all but
+ // Uncompressed Size and the filters.
+ //
+ // NOTE: This function is used for validation too, so it is
+ // essential that these checks are always done even if
+ // Compressed Size is unknown.
+ if (block == NULL || block->version > 1
+ || block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN
+ || block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX
+ || (block->header_size & 3)
+ || !lzma_vli_is_valid(block->compressed_size)
+ || block->compressed_size == 0
+ || (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
+ return 0;
+
+ // If Compressed Size is unknown, return that we cannot know
+ // size of the Block either.
+ if (block->compressed_size == LZMA_VLI_UNKNOWN)
+ return LZMA_VLI_UNKNOWN;
+
+ // Calculate Unpadded Size and validate it.
+ const lzma_vli unpadded_size = block->compressed_size
+ + block->header_size
+ + lzma_check_size(block->check);
+
+ assert(unpadded_size >= UNPADDED_SIZE_MIN);
+ if (unpadded_size > UNPADDED_SIZE_MAX)
+ return 0;
+
+ return unpadded_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_block_total_size(const lzma_block *block)
+{
+ lzma_vli unpadded_size = lzma_block_unpadded_size(block);
+
+ if (unpadded_size != LZMA_VLI_UNKNOWN)
+ unpadded_size = vli_ceil4(unpadded_size);
+
+ return unpadded_size;
+}
diff --git a/src/liblzma/common/common.c b/src/liblzma/common/common.c
new file mode 100644
index 0000000..adb50d7
--- /dev/null
+++ b/src/liblzma/common/common.c
@@ -0,0 +1,481 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file common.c
+/// \brief Common functions needed in many places in liblzma
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+/////////////
+// Version //
+/////////////
+
+extern LZMA_API(uint32_t)
+lzma_version_number(void)
+{
+ return LZMA_VERSION;
+}
+
+
+extern LZMA_API(const char *)
+lzma_version_string(void)
+{
+ return LZMA_VERSION_STRING;
+}
+
+
+///////////////////////
+// Memory allocation //
+///////////////////////
+
+lzma_attr_alloc_size(1)
+extern void *
+lzma_alloc(size_t size, const lzma_allocator *allocator)
+{
+ // Some malloc() variants return NULL if called with size == 0.
+ if (size == 0)
+ size = 1;
+
+ void *ptr;
+
+ if (allocator != NULL && allocator->alloc != NULL)
+ ptr = allocator->alloc(allocator->opaque, 1, size);
+ else
+ ptr = malloc(size);
+
+ return ptr;
+}
+
+
+lzma_attr_alloc_size(1)
+extern void *
+lzma_alloc_zero(size_t size, const lzma_allocator *allocator)
+{
+ // Some calloc() variants return NULL if called with size == 0.
+ if (size == 0)
+ size = 1;
+
+ void *ptr;
+
+ if (allocator != NULL && allocator->alloc != NULL) {
+ ptr = allocator->alloc(allocator->opaque, 1, size);
+ if (ptr != NULL)
+ memzero(ptr, size);
+ } else {
+ ptr = calloc(1, size);
+ }
+
+ return ptr;
+}
+
+
+extern void
+lzma_free(void *ptr, const lzma_allocator *allocator)
+{
+ if (allocator != NULL && allocator->free != NULL)
+ allocator->free(allocator->opaque, ptr);
+ else
+ free(ptr);
+
+ return;
+}
+
+
+//////////
+// Misc //
+//////////
+
+extern size_t
+lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size)
+{
+ const size_t in_avail = in_size - *in_pos;
+ const size_t out_avail = out_size - *out_pos;
+ const size_t copy_size = my_min(in_avail, out_avail);
+
+ // Call memcpy() only if there is something to copy. If there is
+ // nothing to copy, in or out might be NULL and then the memcpy()
+ // call would trigger undefined behavior.
+ if (copy_size > 0)
+ memcpy(out + *out_pos, in + *in_pos, copy_size);
+
+ *in_pos += copy_size;
+ *out_pos += copy_size;
+
+ return copy_size;
+}
+
+
+extern lzma_ret
+lzma_next_filter_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ lzma_next_coder_init(filters[0].init, next, allocator);
+ next->id = filters[0].id;
+ return filters[0].init == NULL
+ ? LZMA_OK : filters[0].init(next, allocator, filters);
+}
+
+
+extern lzma_ret
+lzma_next_filter_update(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *reversed_filters)
+{
+ // Check that the application isn't trying to change the Filter ID.
+ // End of filters is indicated with LZMA_VLI_UNKNOWN in both
+ // reversed_filters[0].id and next->id.
+ if (reversed_filters[0].id != next->id)
+ return LZMA_PROG_ERROR;
+
+ if (reversed_filters[0].id == LZMA_VLI_UNKNOWN)
+ return LZMA_OK;
+
+ assert(next->update != NULL);
+ return next->update(next->coder, allocator, NULL, reversed_filters);
+}
+
+
+extern void
+lzma_next_end(lzma_next_coder *next, const lzma_allocator *allocator)
+{
+ if (next->init != (uintptr_t)(NULL)) {
+ // To avoid tiny end functions that simply call
+ // lzma_free(coder, allocator), we allow leaving next->end
+ // NULL and call lzma_free() here.
+ if (next->end != NULL)
+ next->end(next->coder, allocator);
+ else
+ lzma_free(next->coder, allocator);
+
+ // Reset the variables so the we don't accidentally think
+ // that it is an already initialized coder.
+ *next = LZMA_NEXT_CODER_INIT;
+ }
+
+ return;
+}
+
+
+//////////////////////////////////////
+// External to internal API wrapper //
+//////////////////////////////////////
+
+extern lzma_ret
+lzma_strm_init(lzma_stream *strm)
+{
+ if (strm == NULL)
+ return LZMA_PROG_ERROR;
+
+ if (strm->internal == NULL) {
+ strm->internal = lzma_alloc(sizeof(lzma_internal),
+ strm->allocator);
+ if (strm->internal == NULL)
+ return LZMA_MEM_ERROR;
+
+ strm->internal->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ memzero(strm->internal->supported_actions,
+ sizeof(strm->internal->supported_actions));
+ strm->internal->sequence = ISEQ_RUN;
+ strm->internal->allow_buf_error = false;
+
+ strm->total_in = 0;
+ strm->total_out = 0;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_code(lzma_stream *strm, lzma_action action)
+{
+ // Sanity checks
+ if ((strm->next_in == NULL && strm->avail_in != 0)
+ || (strm->next_out == NULL && strm->avail_out != 0)
+ || strm->internal == NULL
+ || strm->internal->next.code == NULL
+ || (unsigned int)(action) > LZMA_ACTION_MAX
+ || !strm->internal->supported_actions[action])
+ return LZMA_PROG_ERROR;
+
+ // Check if unsupported members have been set to non-zero or non-NULL,
+ // which would indicate that some new feature is wanted.
+ if (strm->reserved_ptr1 != NULL
+ || strm->reserved_ptr2 != NULL
+ || strm->reserved_ptr3 != NULL
+ || strm->reserved_ptr4 != NULL
+ || strm->reserved_int2 != 0
+ || strm->reserved_int3 != 0
+ || strm->reserved_int4 != 0
+ || strm->reserved_enum1 != LZMA_RESERVED_ENUM
+ || strm->reserved_enum2 != LZMA_RESERVED_ENUM)
+ return LZMA_OPTIONS_ERROR;
+
+ switch (strm->internal->sequence) {
+ case ISEQ_RUN:
+ switch (action) {
+ case LZMA_RUN:
+ break;
+
+ case LZMA_SYNC_FLUSH:
+ strm->internal->sequence = ISEQ_SYNC_FLUSH;
+ break;
+
+ case LZMA_FULL_FLUSH:
+ strm->internal->sequence = ISEQ_FULL_FLUSH;
+ break;
+
+ case LZMA_FINISH:
+ strm->internal->sequence = ISEQ_FINISH;
+ break;
+
+ case LZMA_FULL_BARRIER:
+ strm->internal->sequence = ISEQ_FULL_BARRIER;
+ break;
+ }
+
+ break;
+
+ case ISEQ_SYNC_FLUSH:
+ // The same action must be used until we return
+ // LZMA_STREAM_END, and the amount of input must not change.
+ if (action != LZMA_SYNC_FLUSH
+ || strm->internal->avail_in != strm->avail_in)
+ return LZMA_PROG_ERROR;
+
+ break;
+
+ case ISEQ_FULL_FLUSH:
+ if (action != LZMA_FULL_FLUSH
+ || strm->internal->avail_in != strm->avail_in)
+ return LZMA_PROG_ERROR;
+
+ break;
+
+ case ISEQ_FINISH:
+ if (action != LZMA_FINISH
+ || strm->internal->avail_in != strm->avail_in)
+ return LZMA_PROG_ERROR;
+
+ break;
+
+ case ISEQ_FULL_BARRIER:
+ if (action != LZMA_FULL_BARRIER
+ || strm->internal->avail_in != strm->avail_in)
+ return LZMA_PROG_ERROR;
+
+ break;
+
+ case ISEQ_END:
+ return LZMA_STREAM_END;
+
+ case ISEQ_ERROR:
+ default:
+ return LZMA_PROG_ERROR;
+ }
+
+ size_t in_pos = 0;
+ size_t out_pos = 0;
+ lzma_ret ret = strm->internal->next.code(
+ strm->internal->next.coder, strm->allocator,
+ strm->next_in, &in_pos, strm->avail_in,
+ strm->next_out, &out_pos, strm->avail_out, action);
+
+ // Updating next_in and next_out has to be skipped when they are NULL
+ // to avoid null pointer + 0 (undefined behavior). Do this by checking
+ // in_pos > 0 and out_pos > 0 because this way NULL + non-zero (a bug)
+ // will get caught one way or other.
+ if (in_pos > 0) {
+ strm->next_in += in_pos;
+ strm->avail_in -= in_pos;
+ strm->total_in += in_pos;
+ }
+
+ if (out_pos > 0) {
+ strm->next_out += out_pos;
+ strm->avail_out -= out_pos;
+ strm->total_out += out_pos;
+ }
+
+ strm->internal->avail_in = strm->avail_in;
+
+ switch (ret) {
+ case LZMA_OK:
+ // Don't return LZMA_BUF_ERROR when it happens the first time.
+ // This is to avoid returning LZMA_BUF_ERROR when avail_out
+ // was zero but still there was no more data left to written
+ // to next_out.
+ if (out_pos == 0 && in_pos == 0) {
+ if (strm->internal->allow_buf_error)
+ ret = LZMA_BUF_ERROR;
+ else
+ strm->internal->allow_buf_error = true;
+ } else {
+ strm->internal->allow_buf_error = false;
+ }
+ break;
+
+ case LZMA_TIMED_OUT:
+ strm->internal->allow_buf_error = false;
+ ret = LZMA_OK;
+ break;
+
+ case LZMA_SEEK_NEEDED:
+ strm->internal->allow_buf_error = false;
+
+ // If LZMA_FINISH was used, reset it back to the
+ // LZMA_RUN-based state so that new input can be supplied
+ // by the application.
+ if (strm->internal->sequence == ISEQ_FINISH)
+ strm->internal->sequence = ISEQ_RUN;
+
+ break;
+
+ case LZMA_STREAM_END:
+ if (strm->internal->sequence == ISEQ_SYNC_FLUSH
+ || strm->internal->sequence == ISEQ_FULL_FLUSH
+ || strm->internal->sequence
+ == ISEQ_FULL_BARRIER)
+ strm->internal->sequence = ISEQ_RUN;
+ else
+ strm->internal->sequence = ISEQ_END;
+
+ // Fall through
+
+ case LZMA_NO_CHECK:
+ case LZMA_UNSUPPORTED_CHECK:
+ case LZMA_GET_CHECK:
+ case LZMA_MEMLIMIT_ERROR:
+ // Something else than LZMA_OK, but not a fatal error,
+ // that is, coding may be continued (except if ISEQ_END).
+ strm->internal->allow_buf_error = false;
+ break;
+
+ default:
+ // All the other errors are fatal; coding cannot be continued.
+ assert(ret != LZMA_BUF_ERROR);
+ strm->internal->sequence = ISEQ_ERROR;
+ break;
+ }
+
+ return ret;
+}
+
+
+extern LZMA_API(void)
+lzma_end(lzma_stream *strm)
+{
+ if (strm != NULL && strm->internal != NULL) {
+ lzma_next_end(&strm->internal->next, strm->allocator);
+ lzma_free(strm->internal, strm->allocator);
+ strm->internal = NULL;
+ }
+
+ return;
+}
+
+
+#ifdef HAVE_SYMBOL_VERSIONS_LINUX
+// This is for compatibility with binaries linked against liblzma that
+// has been patched with xz-5.2.2-compat-libs.patch from RHEL/CentOS 7.
+LZMA_SYMVER_API("lzma_get_progress@XZ_5.2.2",
+ void, lzma_get_progress_522)(lzma_stream *strm,
+ uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow
+ __attribute__((__alias__("lzma_get_progress_52")));
+
+LZMA_SYMVER_API("lzma_get_progress@@XZ_5.2",
+ void, lzma_get_progress_52)(lzma_stream *strm,
+ uint64_t *progress_in, uint64_t *progress_out) lzma_nothrow;
+
+#define lzma_get_progress lzma_get_progress_52
+#endif
+extern LZMA_API(void)
+lzma_get_progress(lzma_stream *strm,
+ uint64_t *progress_in, uint64_t *progress_out)
+{
+ if (strm->internal->next.get_progress != NULL) {
+ strm->internal->next.get_progress(strm->internal->next.coder,
+ progress_in, progress_out);
+ } else {
+ *progress_in = strm->total_in;
+ *progress_out = strm->total_out;
+ }
+
+ return;
+}
+
+
+extern LZMA_API(lzma_check)
+lzma_get_check(const lzma_stream *strm)
+{
+ // Return LZMA_CHECK_NONE if we cannot know the check type.
+ // It's a bug in the application if this happens.
+ if (strm->internal->next.get_check == NULL)
+ return LZMA_CHECK_NONE;
+
+ return strm->internal->next.get_check(strm->internal->next.coder);
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_memusage(const lzma_stream *strm)
+{
+ uint64_t memusage;
+ uint64_t old_memlimit;
+
+ if (strm == NULL || strm->internal == NULL
+ || strm->internal->next.memconfig == NULL
+ || strm->internal->next.memconfig(
+ strm->internal->next.coder,
+ &memusage, &old_memlimit, 0) != LZMA_OK)
+ return 0;
+
+ return memusage;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_memlimit_get(const lzma_stream *strm)
+{
+ uint64_t old_memlimit;
+ uint64_t memusage;
+
+ if (strm == NULL || strm->internal == NULL
+ || strm->internal->next.memconfig == NULL
+ || strm->internal->next.memconfig(
+ strm->internal->next.coder,
+ &memusage, &old_memlimit, 0) != LZMA_OK)
+ return 0;
+
+ return old_memlimit;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_memlimit_set(lzma_stream *strm, uint64_t new_memlimit)
+{
+ // Dummy variables to simplify memconfig functions
+ uint64_t old_memlimit;
+ uint64_t memusage;
+
+ if (strm == NULL || strm->internal == NULL
+ || strm->internal->next.memconfig == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Zero is a special value that cannot be used as an actual limit.
+ // If 0 was specified, use 1 instead.
+ if (new_memlimit == 0)
+ new_memlimit = 1;
+
+ return strm->internal->next.memconfig(strm->internal->next.coder,
+ &memusage, &old_memlimit, new_memlimit);
+}
diff --git a/src/liblzma/common/common.h b/src/liblzma/common/common.h
new file mode 100644
index 0000000..378923e
--- /dev/null
+++ b/src/liblzma/common/common.h
@@ -0,0 +1,413 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file common.h
+/// \brief Definitions common to the whole liblzma library
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_COMMON_H
+#define LZMA_COMMON_H
+
+#include "sysdefs.h"
+#include "mythread.h"
+#include "tuklib_integer.h"
+
+// LZMA_API_EXPORT is used to mark the exported API functions.
+// It's used to define the LZMA_API macro.
+//
+// lzma_attr_visibility_hidden is used for marking *declarations* of extern
+// variables that are internal to liblzma (-fvisibility=hidden alone is
+// enough to hide the *definitions*). Such markings allow slightly more
+// efficient code to accesses those variables in ELF shared libraries.
+#if defined(_WIN32) || defined(__CYGWIN__)
+# ifdef DLL_EXPORT
+# define LZMA_API_EXPORT __declspec(dllexport)
+# else
+# define LZMA_API_EXPORT
+# endif
+# define lzma_attr_visibility_hidden
+// Don't use ifdef or defined() below.
+#elif HAVE_VISIBILITY
+# define LZMA_API_EXPORT __attribute__((__visibility__("default")))
+# define lzma_attr_visibility_hidden \
+ __attribute__((__visibility__("hidden")))
+#else
+# define LZMA_API_EXPORT
+# define lzma_attr_visibility_hidden
+#endif
+
+#define LZMA_API(type) LZMA_API_EXPORT type LZMA_API_CALL
+
+#include "lzma.h"
+
+// This is for detecting modern GCC and Clang attributes
+// like __symver__ in GCC >= 10.
+#ifdef __has_attribute
+# define lzma_has_attribute(attr) __has_attribute(attr)
+#else
+# define lzma_has_attribute(attr) 0
+#endif
+
+// The extra symbol versioning in the C files may only be used when
+// building a shared library. If HAVE_SYMBOL_VERSIONS_LINUX is defined
+// to 2 then symbol versioning is done only if also PIC is defined.
+// By default Libtool defines PIC when building a shared library and
+// doesn't define it when building a static library but it can be
+// overridden with --with-pic and --without-pic. configure let's rely
+// on PIC if neither --with-pic or --without-pic was used.
+#if defined(HAVE_SYMBOL_VERSIONS_LINUX) \
+ && (HAVE_SYMBOL_VERSIONS_LINUX == 2 && !defined(PIC))
+# undef HAVE_SYMBOL_VERSIONS_LINUX
+#endif
+
+#ifdef HAVE_SYMBOL_VERSIONS_LINUX
+// To keep link-time optimization (LTO, -flto) working with GCC,
+// the __symver__ attribute must be used instead of __asm__(".symver ...").
+// Otherwise the symbol versions may be lost, resulting in broken liblzma
+// that has wrong default versions in the exported symbol list!
+// The attribute was added in GCC 10; LTO with older GCC is not supported.
+//
+// To keep -Wmissing-prototypes happy, use LZMA_SYMVER_API only with function
+// declarations (including those with __alias__ attribute) and LZMA_API with
+// the function definitions. This means a little bit of silly copy-and-paste
+// between declarations and definitions though.
+//
+// As of GCC 12.2, the __symver__ attribute supports only @ and @@ but the
+// very convenient @@@ isn't supported (it's supported by GNU assembler
+// since 2000). When using @@ instead of @@@, the internal name must not be
+// the same as the external name to avoid problems in some situations. This
+// is why "#define foo_52 foo" is needed for the default symbol versions.
+//
+// __has_attribute is supported before GCC 10 and it is supported in Clang 14
+// too (which doesn't support __symver__) so use it to detect if __symver__
+// is available. This should be far more reliable than looking at compiler
+// version macros as nowadays especially __GNUC__ is defined by many compilers.
+# if lzma_has_attribute(__symver__)
+# define LZMA_SYMVER_API(extnamever, type, intname) \
+ extern __attribute__((__symver__(extnamever))) \
+ LZMA_API(type) intname
+# else
+# define LZMA_SYMVER_API(extnamever, type, intname) \
+ __asm__(".symver " #intname "," extnamever); \
+ extern LZMA_API(type) intname
+# endif
+#endif
+
+// MSVC has __forceinline which shouldn't be combined with the inline keyword
+// (results in a warning).
+//
+// GCC 3.1 added always_inline attribute so we don't need to check
+// for __GNUC__ version. Similarly, all relevant Clang versions
+// support it (at least Clang 3.0.0 does already).
+// Other compilers might support too which also support __has_attribute
+// (Solaris Studio) so do that check too.
+#if defined(_MSC_VER)
+# define lzma_always_inline __forceinline
+#elif defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER) \
+ || lzma_has_attribute(__always_inline__)
+# define lzma_always_inline inline __attribute__((__always_inline__))
+#else
+# define lzma_always_inline inline
+#endif
+
+// These allow helping the compiler in some often-executed branches, whose
+// result is almost always the same.
+#ifdef __GNUC__
+# define likely(expr) __builtin_expect(expr, true)
+# define unlikely(expr) __builtin_expect(expr, false)
+#else
+# define likely(expr) (expr)
+# define unlikely(expr) (expr)
+#endif
+
+
+/// Size of temporary buffers needed in some filters
+#define LZMA_BUFFER_SIZE 4096
+
+
+/// Maximum number of worker threads within one multithreaded component.
+/// The limit exists solely to make it simpler to prevent integer overflows
+/// when allocating structures etc. This should be big enough for now...
+/// the code won't scale anywhere close to this number anyway.
+#define LZMA_THREADS_MAX 16384
+
+
+/// Starting value for memory usage estimates. Instead of calculating size
+/// of _every_ structure and taking into account malloc() overhead etc., we
+/// add a base size to all memory usage estimates. It's not very accurate
+/// but should be easily good enough.
+#define LZMA_MEMUSAGE_BASE (UINT64_C(1) << 15)
+
+/// Start of internal Filter ID space. These IDs must never be used
+/// in Streams.
+#define LZMA_FILTER_RESERVED_START (LZMA_VLI_C(1) << 62)
+
+
+/// Supported flags that can be passed to lzma_stream_decoder(),
+/// lzma_auto_decoder(), or lzma_stream_decoder_mt().
+#define LZMA_SUPPORTED_FLAGS \
+ ( LZMA_TELL_NO_CHECK \
+ | LZMA_TELL_UNSUPPORTED_CHECK \
+ | LZMA_TELL_ANY_CHECK \
+ | LZMA_IGNORE_CHECK \
+ | LZMA_CONCATENATED \
+ | LZMA_FAIL_FAST )
+
+
+/// Largest valid lzma_action value as unsigned integer.
+#define LZMA_ACTION_MAX ((unsigned int)(LZMA_FULL_BARRIER))
+
+
+/// Special return value (lzma_ret) to indicate that a timeout was reached
+/// and lzma_code() must not return LZMA_BUF_ERROR. This is converted to
+/// LZMA_OK in lzma_code().
+#define LZMA_TIMED_OUT LZMA_RET_INTERNAL1
+
+/// Special return value (lzma_ret) for use in stream_decoder_mt.c to
+/// indicate Index was detected instead of a Block Header.
+#define LZMA_INDEX_DETECTED LZMA_RET_INTERNAL2
+
+
+typedef struct lzma_next_coder_s lzma_next_coder;
+
+typedef struct lzma_filter_info_s lzma_filter_info;
+
+
+/// Type of a function used to initialize a filter encoder or decoder
+typedef lzma_ret (*lzma_init_function)(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+/// Type of a function to do some kind of coding work (filters, Stream,
+/// Block encoders/decoders etc.). Some special coders use don't use both
+/// input and output buffers, but for simplicity they still use this same
+/// function prototype.
+typedef lzma_ret (*lzma_code_function)(
+ void *coder, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size,
+ lzma_action action);
+
+/// Type of a function to free the memory allocated for the coder
+typedef void (*lzma_end_function)(
+ void *coder, const lzma_allocator *allocator);
+
+
+/// Raw coder validates and converts an array of lzma_filter structures to
+/// an array of lzma_filter_info structures. This array is used with
+/// lzma_next_filter_init to initialize the filter chain.
+struct lzma_filter_info_s {
+ /// Filter ID. This can be used to share the same initiazation
+ /// function *and* data structures with different Filter IDs
+ /// (LZMA_FILTER_LZMA1EXT does it), and also by the encoder
+ /// with lzma_filters_update() if filter chain is updated
+ /// in the middle of a raw stream or Block (LZMA_SYNC_FLUSH).
+ lzma_vli id;
+
+ /// Pointer to function used to initialize the filter.
+ /// This is NULL to indicate end of array.
+ lzma_init_function init;
+
+ /// Pointer to filter's options structure
+ void *options;
+};
+
+
+/// Hold data and function pointers of the next filter in the chain.
+struct lzma_next_coder_s {
+ /// Pointer to coder-specific data
+ void *coder;
+
+ /// Filter ID. This is LZMA_VLI_UNKNOWN when this structure doesn't
+ /// point to a filter coder.
+ lzma_vli id;
+
+ /// "Pointer" to init function. This is never called here.
+ /// We need only to detect if we are initializing a coder
+ /// that was allocated earlier. See lzma_next_coder_init and
+ /// lzma_next_strm_init macros in this file.
+ uintptr_t init;
+
+ /// Pointer to function to do the actual coding
+ lzma_code_function code;
+
+ /// Pointer to function to free lzma_next_coder.coder. This can
+ /// be NULL; in that case, lzma_free is called to free
+ /// lzma_next_coder.coder.
+ lzma_end_function end;
+
+ /// Pointer to a function to get progress information. If this is NULL,
+ /// lzma_stream.total_in and .total_out are used instead.
+ void (*get_progress)(void *coder,
+ uint64_t *progress_in, uint64_t *progress_out);
+
+ /// Pointer to function to return the type of the integrity check.
+ /// Most coders won't support this.
+ lzma_check (*get_check)(const void *coder);
+
+ /// Pointer to function to get and/or change the memory usage limit.
+ /// If new_memlimit == 0, the limit is not changed.
+ lzma_ret (*memconfig)(void *coder, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit);
+
+ /// Update the filter-specific options or the whole filter chain
+ /// in the encoder.
+ lzma_ret (*update)(void *coder, const lzma_allocator *allocator,
+ const lzma_filter *filters,
+ const lzma_filter *reversed_filters);
+
+ /// Set how many bytes of output this coder may produce at maximum.
+ /// On success LZMA_OK must be returned.
+ /// If the filter chain as a whole cannot support this feature,
+ /// this must return LZMA_OPTIONS_ERROR.
+ /// If no input has been given to the coder and the requested limit
+ /// is too small, this must return LZMA_BUF_ERROR. If input has been
+ /// seen, LZMA_OK is allowed too.
+ lzma_ret (*set_out_limit)(void *coder, uint64_t *uncomp_size,
+ uint64_t out_limit);
+};
+
+
+/// Macro to initialize lzma_next_coder structure
+#define LZMA_NEXT_CODER_INIT \
+ (lzma_next_coder){ \
+ .coder = NULL, \
+ .init = (uintptr_t)(NULL), \
+ .id = LZMA_VLI_UNKNOWN, \
+ .code = NULL, \
+ .end = NULL, \
+ .get_progress = NULL, \
+ .get_check = NULL, \
+ .memconfig = NULL, \
+ .update = NULL, \
+ .set_out_limit = NULL, \
+ }
+
+
+/// Internal data for lzma_strm_init, lzma_code, and lzma_end. A pointer to
+/// this is stored in lzma_stream.
+struct lzma_internal_s {
+ /// The actual coder that should do something useful
+ lzma_next_coder next;
+
+ /// Track the state of the coder. This is used to validate arguments
+ /// so that the actual coders can rely on e.g. that LZMA_SYNC_FLUSH
+ /// is used on every call to lzma_code until next.code has returned
+ /// LZMA_STREAM_END.
+ enum {
+ ISEQ_RUN,
+ ISEQ_SYNC_FLUSH,
+ ISEQ_FULL_FLUSH,
+ ISEQ_FINISH,
+ ISEQ_FULL_BARRIER,
+ ISEQ_END,
+ ISEQ_ERROR,
+ } sequence;
+
+ /// A copy of lzma_stream avail_in. This is used to verify that the
+ /// amount of input doesn't change once e.g. LZMA_FINISH has been
+ /// used.
+ size_t avail_in;
+
+ /// Indicates which lzma_action values are allowed by next.code.
+ bool supported_actions[LZMA_ACTION_MAX + 1];
+
+ /// If true, lzma_code will return LZMA_BUF_ERROR if no progress was
+ /// made (no input consumed and no output produced by next.code).
+ bool allow_buf_error;
+};
+
+
+/// Allocates memory
+lzma_attr_alloc_size(1)
+extern void *lzma_alloc(size_t size, const lzma_allocator *allocator);
+
+/// Allocates memory and zeroes it (like calloc()). This can be faster
+/// than lzma_alloc() + memzero() while being backward compatible with
+/// custom allocators.
+lzma_attr_alloc_size(1)
+extern void *lzma_alloc_zero(size_t size, const lzma_allocator *allocator);
+
+/// Frees memory
+extern void lzma_free(void *ptr, const lzma_allocator *allocator);
+
+
+/// Allocates strm->internal if it is NULL, and initializes *strm and
+/// strm->internal. This function is only called via lzma_next_strm_init macro.
+extern lzma_ret lzma_strm_init(lzma_stream *strm);
+
+/// Initializes the next filter in the chain, if any. This takes care of
+/// freeing the memory of previously initialized filter if it is different
+/// than the filter being initialized now. This way the actual filter
+/// initialization functions don't need to use lzma_next_coder_init macro.
+extern lzma_ret lzma_next_filter_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+/// Update the next filter in the chain, if any. This checks that
+/// the application is not trying to change the Filter IDs.
+extern lzma_ret lzma_next_filter_update(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *reversed_filters);
+
+/// Frees the memory allocated for next->coder either using next->end or,
+/// if next->end is NULL, using lzma_free.
+extern void lzma_next_end(lzma_next_coder *next,
+ const lzma_allocator *allocator);
+
+
+/// Copy as much data as possible from in[] to out[] and update *in_pos
+/// and *out_pos accordingly. Returns the number of bytes copied.
+extern size_t lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size);
+
+
+/// \brief Return if expression doesn't evaluate to LZMA_OK
+///
+/// There are several situations where we want to return immediately
+/// with the value of expr if it isn't LZMA_OK. This macro shortens
+/// the code a little.
+#define return_if_error(expr) \
+do { \
+ const lzma_ret ret_ = (expr); \
+ if (ret_ != LZMA_OK) \
+ return ret_; \
+} while (0)
+
+
+/// If next isn't already initialized, free the previous coder. Then mark
+/// that next is _possibly_ initialized for the coder using this macro.
+/// "Possibly" means that if e.g. allocation of next->coder fails, the
+/// structure isn't actually initialized for this coder, but leaving
+/// next->init to func is still OK.
+#define lzma_next_coder_init(func, next, allocator) \
+do { \
+ if ((uintptr_t)(func) != (next)->init) \
+ lzma_next_end(next, allocator); \
+ (next)->init = (uintptr_t)(func); \
+} while (0)
+
+
+/// Initializes lzma_strm and calls func() to initialize strm->internal->next.
+/// (The function being called will use lzma_next_coder_init()). If
+/// initialization fails, memory that wasn't freed by func() is freed
+/// along strm->internal.
+#define lzma_next_strm_init(func, strm, ...) \
+do { \
+ return_if_error(lzma_strm_init(strm)); \
+ const lzma_ret ret_ = func(&(strm)->internal->next, \
+ (strm)->allocator, __VA_ARGS__); \
+ if (ret_ != LZMA_OK) { \
+ lzma_end(strm); \
+ return ret_; \
+ } \
+} while (0)
+
+#endif
diff --git a/src/liblzma/common/easy_buffer_encoder.c b/src/liblzma/common/easy_buffer_encoder.c
new file mode 100644
index 0000000..48eb56f
--- /dev/null
+++ b/src/liblzma/common/easy_buffer_encoder.c
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file easy_buffer_encoder.c
+/// \brief Easy single-call .xz Stream encoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "easy_preset.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_easy_buffer_encode(uint32_t preset, lzma_check check,
+ const lzma_allocator *allocator, const uint8_t *in,
+ size_t in_size, uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ lzma_options_easy opt_easy;
+ if (lzma_easy_preset(&opt_easy, preset))
+ return LZMA_OPTIONS_ERROR;
+
+ return lzma_stream_buffer_encode(opt_easy.filters, check,
+ allocator, in, in_size, out, out_pos, out_size);
+}
diff --git a/src/liblzma/common/easy_decoder_memusage.c b/src/liblzma/common/easy_decoder_memusage.c
new file mode 100644
index 0000000..20bcd5b
--- /dev/null
+++ b/src/liblzma/common/easy_decoder_memusage.c
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file easy_decoder_memusage.c
+/// \brief Decoder memory usage calculation to match easy encoder presets
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "easy_preset.h"
+
+
+extern LZMA_API(uint64_t)
+lzma_easy_decoder_memusage(uint32_t preset)
+{
+ lzma_options_easy opt_easy;
+ if (lzma_easy_preset(&opt_easy, preset))
+ return UINT32_MAX;
+
+ return lzma_raw_decoder_memusage(opt_easy.filters);
+}
diff --git a/src/liblzma/common/easy_encoder.c b/src/liblzma/common/easy_encoder.c
new file mode 100644
index 0000000..5cb492d
--- /dev/null
+++ b/src/liblzma/common/easy_encoder.c
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file easy_encoder.c
+/// \brief Easy .xz Stream encoder initialization
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "easy_preset.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
+{
+ lzma_options_easy opt_easy;
+ if (lzma_easy_preset(&opt_easy, preset))
+ return LZMA_OPTIONS_ERROR;
+
+ return lzma_stream_encoder(strm, opt_easy.filters, check);
+}
diff --git a/src/liblzma/common/easy_encoder_memusage.c b/src/liblzma/common/easy_encoder_memusage.c
new file mode 100644
index 0000000..e910575
--- /dev/null
+++ b/src/liblzma/common/easy_encoder_memusage.c
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file easy_encoder_memusage.c
+/// \brief Easy .xz Stream encoder memory usage calculation
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "easy_preset.h"
+
+
+extern LZMA_API(uint64_t)
+lzma_easy_encoder_memusage(uint32_t preset)
+{
+ lzma_options_easy opt_easy;
+ if (lzma_easy_preset(&opt_easy, preset))
+ return UINT32_MAX;
+
+ return lzma_raw_encoder_memusage(opt_easy.filters);
+}
diff --git a/src/liblzma/common/easy_preset.c b/src/liblzma/common/easy_preset.c
new file mode 100644
index 0000000..2f98598
--- /dev/null
+++ b/src/liblzma/common/easy_preset.c
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file easy_preset.c
+/// \brief Preset handling for easy encoder and decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "easy_preset.h"
+
+
+extern bool
+lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset)
+{
+ if (lzma_lzma_preset(&opt_easy->opt_lzma, preset))
+ return true;
+
+ opt_easy->filters[0].id = LZMA_FILTER_LZMA2;
+ opt_easy->filters[0].options = &opt_easy->opt_lzma;
+ opt_easy->filters[1].id = LZMA_VLI_UNKNOWN;
+
+ return false;
+}
diff --git a/src/liblzma/common/easy_preset.h b/src/liblzma/common/easy_preset.h
new file mode 100644
index 0000000..382ade8
--- /dev/null
+++ b/src/liblzma/common/easy_preset.h
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file easy_preset.h
+/// \brief Preset handling for easy encoder and decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+typedef struct {
+ /// We need to keep the filters array available in case
+ /// LZMA_FULL_FLUSH is used.
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+ /// Options for LZMA2
+ lzma_options_lzma opt_lzma;
+
+ // Options for more filters can be added later, so this struct
+ // is not ready to be put into the public API.
+
+} lzma_options_easy;
+
+
+/// Set *easy to the settings given by the preset. Returns true on error,
+/// false on success.
+extern bool lzma_easy_preset(lzma_options_easy *easy, uint32_t preset);
diff --git a/src/liblzma/common/file_info.c b/src/liblzma/common/file_info.c
new file mode 100644
index 0000000..799bb02
--- /dev/null
+++ b/src/liblzma/common/file_info.c
@@ -0,0 +1,855 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file file_info.c
+/// \brief Decode .xz file information into a lzma_index structure
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "index_decoder.h"
+
+
+typedef struct {
+ enum {
+ SEQ_MAGIC_BYTES,
+ SEQ_PADDING_SEEK,
+ SEQ_PADDING_DECODE,
+ SEQ_FOOTER,
+ SEQ_INDEX_INIT,
+ SEQ_INDEX_DECODE,
+ SEQ_HEADER_DECODE,
+ SEQ_HEADER_COMPARE,
+ } sequence;
+
+ /// Absolute position of in[*in_pos] in the file. All code that
+ /// modifies *in_pos also updates this. seek_to_pos() needs this
+ /// to determine if we need to request the application to seek for
+ /// us or if we can do the seeking internally by adjusting *in_pos.
+ uint64_t file_cur_pos;
+
+ /// This refers to absolute positions of interesting parts of the
+ /// input file. Sometimes it points to the *beginning* of a specific
+ /// field and sometimes to the *end* of a field. The current target
+ /// position at each moment is explained in the comments.
+ uint64_t file_target_pos;
+
+ /// Size of the .xz file (from the application).
+ uint64_t file_size;
+
+ /// Index decoder
+ lzma_next_coder index_decoder;
+
+ /// Number of bytes remaining in the Index field that is currently
+ /// being decoded.
+ lzma_vli index_remaining;
+
+ /// The Index decoder will store the decoded Index in this pointer.
+ lzma_index *this_index;
+
+ /// Amount of Stream Padding in the current Stream.
+ lzma_vli stream_padding;
+
+ /// The final combined index is collected here.
+ lzma_index *combined_index;
+
+ /// Pointer from the application where to store the index information
+ /// after successful decoding.
+ lzma_index **dest_index;
+
+ /// Pointer to lzma_stream.seek_pos to be used when returning
+ /// LZMA_SEEK_NEEDED. This is set by seek_to_pos() when needed.
+ uint64_t *external_seek_pos;
+
+ /// Memory usage limit
+ uint64_t memlimit;
+
+ /// Stream Flags from the very beginning of the file.
+ lzma_stream_flags first_header_flags;
+
+ /// Stream Flags from Stream Header of the current Stream.
+ lzma_stream_flags header_flags;
+
+ /// Stream Flags from Stream Footer of the current Stream.
+ lzma_stream_flags footer_flags;
+
+ size_t temp_pos;
+ size_t temp_size;
+ uint8_t temp[8192];
+
+} lzma_file_info_coder;
+
+
+/// Copies data from in[*in_pos] into coder->temp until
+/// coder->temp_pos == coder->temp_size. This also keeps coder->file_cur_pos
+/// in sync with *in_pos. Returns true if more input is needed.
+static bool
+fill_temp(lzma_file_info_coder *coder, const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size)
+{
+ coder->file_cur_pos += lzma_bufcpy(in, in_pos, in_size,
+ coder->temp, &coder->temp_pos, coder->temp_size);
+ return coder->temp_pos < coder->temp_size;
+}
+
+
+/// Seeks to the absolute file position specified by target_pos.
+/// This tries to do the seeking by only modifying *in_pos, if possible.
+/// The main benefit of this is that if one passes the whole file at once
+/// to lzma_code(), the decoder will never need to return LZMA_SEEK_NEEDED
+/// as all the seeking can be done by adjusting *in_pos in this function.
+///
+/// Returns true if an external seek is needed and the caller must return
+/// LZMA_SEEK_NEEDED.
+static bool
+seek_to_pos(lzma_file_info_coder *coder, uint64_t target_pos,
+ size_t in_start, size_t *in_pos, size_t in_size)
+{
+ // The input buffer doesn't extend beyond the end of the file.
+ // This has been checked by file_info_decode() already.
+ assert(coder->file_size - coder->file_cur_pos >= in_size - *in_pos);
+
+ const uint64_t pos_min = coder->file_cur_pos - (*in_pos - in_start);
+ const uint64_t pos_max = coder->file_cur_pos + (in_size - *in_pos);
+
+ bool external_seek_needed;
+
+ if (target_pos >= pos_min && target_pos <= pos_max) {
+ // The requested position is available in the current input
+ // buffer or right after it. That is, in a corner case we
+ // end up setting *in_pos == in_size and thus will immediately
+ // need new input bytes from the application.
+ *in_pos += (size_t)(target_pos - coder->file_cur_pos);
+ external_seek_needed = false;
+ } else {
+ // Ask the application to seek the input file.
+ *coder->external_seek_pos = target_pos;
+ external_seek_needed = true;
+
+ // Mark the whole input buffer as used. This way
+ // lzma_stream.total_in will have a better estimate
+ // of the amount of data read. It still won't be perfect
+ // as the value will depend on the input buffer size that
+ // the application uses, but it should be good enough for
+ // those few who want an estimate.
+ *in_pos = in_size;
+ }
+
+ // After seeking (internal or external) the current position
+ // will match the requested target position.
+ coder->file_cur_pos = target_pos;
+
+ return external_seek_needed;
+}
+
+
+/// The caller sets coder->file_target_pos so that it points to the *end*
+/// of the desired file position. This function then determines how far
+/// backwards from that position we can seek. After seeking fill_temp()
+/// can be used to read data into coder->temp. When fill_temp() has finished,
+/// coder->temp[coder->temp_size] will match coder->file_target_pos.
+///
+/// This also validates that coder->target_file_pos is sane in sense that
+/// we aren't trying to seek too far backwards (too close or beyond the
+/// beginning of the file).
+static lzma_ret
+reverse_seek(lzma_file_info_coder *coder,
+ size_t in_start, size_t *in_pos, size_t in_size)
+{
+ // Check that there is enough data before the target position
+ // to contain at least Stream Header and Stream Footer. If there
+ // isn't, the file cannot be valid.
+ if (coder->file_target_pos < 2 * LZMA_STREAM_HEADER_SIZE)
+ return LZMA_DATA_ERROR;
+
+ coder->temp_pos = 0;
+
+ // The Stream Header at the very beginning of the file gets handled
+ // specially in SEQ_MAGIC_BYTES and thus we will never need to seek
+ // there. By not seeking to the first LZMA_STREAM_HEADER_SIZE bytes
+ // we avoid a useless external seek after SEQ_MAGIC_BYTES if the
+ // application uses an extremely small input buffer and the input
+ // file is very small.
+ if (coder->file_target_pos - LZMA_STREAM_HEADER_SIZE
+ < sizeof(coder->temp))
+ coder->temp_size = (size_t)(coder->file_target_pos
+ - LZMA_STREAM_HEADER_SIZE);
+ else
+ coder->temp_size = sizeof(coder->temp);
+
+ // The above if-statements guarantee this. This is important because
+ // the Stream Header/Footer decoders assume that there's at least
+ // LZMA_STREAM_HEADER_SIZE bytes in coder->temp.
+ assert(coder->temp_size >= LZMA_STREAM_HEADER_SIZE);
+
+ if (seek_to_pos(coder, coder->file_target_pos - coder->temp_size,
+ in_start, in_pos, in_size))
+ return LZMA_SEEK_NEEDED;
+
+ return LZMA_OK;
+}
+
+
+/// Gets the number of zero-bytes at the end of the buffer.
+static size_t
+get_padding_size(const uint8_t *buf, size_t buf_size)
+{
+ size_t padding = 0;
+ while (buf_size > 0 && buf[--buf_size] == 0x00)
+ ++padding;
+
+ return padding;
+}
+
+
+/// With the Stream Header at the very beginning of the file, LZMA_FORMAT_ERROR
+/// is used to tell the application that Magic Bytes didn't match. In other
+/// Stream Header/Footer fields (in the middle/end of the file) it could be
+/// a bit confusing to return LZMA_FORMAT_ERROR as we already know that there
+/// is a valid Stream Header at the beginning of the file. For those cases
+/// this function is used to convert LZMA_FORMAT_ERROR to LZMA_DATA_ERROR.
+static lzma_ret
+hide_format_error(lzma_ret ret)
+{
+ if (ret == LZMA_FORMAT_ERROR)
+ ret = LZMA_DATA_ERROR;
+
+ return ret;
+}
+
+
+/// Calls the Index decoder and updates coder->index_remaining.
+/// This is a separate function because the input can be either directly
+/// from the application or from coder->temp.
+static lzma_ret
+decode_index(lzma_file_info_coder *coder, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, bool update_file_cur_pos)
+{
+ const size_t in_start = *in_pos;
+
+ const lzma_ret ret = coder->index_decoder.code(
+ coder->index_decoder.coder,
+ allocator, in, in_pos, in_size,
+ NULL, NULL, 0, LZMA_RUN);
+
+ coder->index_remaining -= *in_pos - in_start;
+
+ if (update_file_cur_pos)
+ coder->file_cur_pos += *in_pos - in_start;
+
+ return ret;
+}
+
+
+static lzma_ret
+file_info_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size,
+ uint8_t *restrict out lzma_attribute((__unused__)),
+ size_t *restrict out_pos lzma_attribute((__unused__)),
+ size_t out_size lzma_attribute((__unused__)),
+ lzma_action action lzma_attribute((__unused__)))
+{
+ lzma_file_info_coder *coder = coder_ptr;
+ const size_t in_start = *in_pos;
+
+ // If the caller provides input past the end of the file, trim
+ // the extra bytes from the buffer so that we won't read too far.
+ assert(coder->file_size >= coder->file_cur_pos);
+ if (coder->file_size - coder->file_cur_pos < in_size - in_start)
+ in_size = in_start
+ + (size_t)(coder->file_size - coder->file_cur_pos);
+
+ while (true)
+ switch (coder->sequence) {
+ case SEQ_MAGIC_BYTES:
+ // Decode the Stream Header at the beginning of the file
+ // first to check if the Magic Bytes match. The flags
+ // are stored in coder->first_header_flags so that we
+ // don't need to seek to it again.
+ //
+ // Check that the file is big enough to contain at least
+ // Stream Header.
+ if (coder->file_size < LZMA_STREAM_HEADER_SIZE)
+ return LZMA_FORMAT_ERROR;
+
+ // Read the Stream Header field into coder->temp.
+ if (fill_temp(coder, in, in_pos, in_size))
+ return LZMA_OK;
+
+ // This is the only Stream Header/Footer decoding where we
+ // want to return LZMA_FORMAT_ERROR if the Magic Bytes don't
+ // match. Elsewhere it will be converted to LZMA_DATA_ERROR.
+ return_if_error(lzma_stream_header_decode(
+ &coder->first_header_flags, coder->temp));
+
+ // Now that we know that the Magic Bytes match, check the
+ // file size. It's better to do this here after checking the
+ // Magic Bytes since this way we can give LZMA_FORMAT_ERROR
+ // instead of LZMA_DATA_ERROR when the Magic Bytes don't
+ // match in a file that is too big or isn't a multiple of
+ // four bytes.
+ if (coder->file_size > LZMA_VLI_MAX || (coder->file_size & 3))
+ return LZMA_DATA_ERROR;
+
+ // Start looking for Stream Padding and Stream Footer
+ // at the end of the file.
+ coder->file_target_pos = coder->file_size;
+
+ // Fall through
+
+ case SEQ_PADDING_SEEK:
+ coder->sequence = SEQ_PADDING_DECODE;
+ return_if_error(reverse_seek(
+ coder, in_start, in_pos, in_size));
+
+ // Fall through
+
+ case SEQ_PADDING_DECODE: {
+ // Copy to coder->temp first. This keeps the code simpler if
+ // the application only provides input a few bytes at a time.
+ if (fill_temp(coder, in, in_pos, in_size))
+ return LZMA_OK;
+
+ // Scan the buffer backwards to get the size of the
+ // Stream Padding field (if any).
+ const size_t new_padding = get_padding_size(
+ coder->temp, coder->temp_size);
+ coder->stream_padding += new_padding;
+
+ // Set the target position to the beginning of Stream Padding
+ // that has been observed so far. If all Stream Padding has
+ // been seen, then the target position will be at the end
+ // of the Stream Footer field.
+ coder->file_target_pos -= new_padding;
+
+ if (new_padding == coder->temp_size) {
+ // The whole buffer was padding. Seek backwards in
+ // the file to get more input.
+ coder->sequence = SEQ_PADDING_SEEK;
+ break;
+ }
+
+ // Size of Stream Padding must be a multiple of 4 bytes.
+ if (coder->stream_padding & 3)
+ return LZMA_DATA_ERROR;
+
+ coder->sequence = SEQ_FOOTER;
+
+ // Calculate the amount of non-padding data in coder->temp.
+ coder->temp_size -= new_padding;
+ coder->temp_pos = coder->temp_size;
+
+ // We can avoid an external seek if the whole Stream Footer
+ // is already in coder->temp. In that case SEQ_FOOTER won't
+ // read more input and will find the Stream Footer from
+ // coder->temp[coder->temp_size - LZMA_STREAM_HEADER_SIZE].
+ //
+ // Otherwise we will need to seek. The seeking is done so
+ // that Stream Footer will be at the end of coder->temp.
+ // This way it's likely that we also get a complete Index
+ // field into coder->temp without needing a separate seek
+ // for that (unless the Index field is big).
+ if (coder->temp_size < LZMA_STREAM_HEADER_SIZE)
+ return_if_error(reverse_seek(
+ coder, in_start, in_pos, in_size));
+ }
+
+ // Fall through
+
+ case SEQ_FOOTER:
+ // Copy the Stream Footer field into coder->temp.
+ // If Stream Footer was already available in coder->temp
+ // in SEQ_PADDING_DECODE, then this does nothing.
+ if (fill_temp(coder, in, in_pos, in_size))
+ return LZMA_OK;
+
+ // Make coder->file_target_pos and coder->temp_size point
+ // to the beginning of Stream Footer and thus to the end
+ // of the Index field. coder->temp_pos will be updated
+ // a bit later.
+ coder->file_target_pos -= LZMA_STREAM_HEADER_SIZE;
+ coder->temp_size -= LZMA_STREAM_HEADER_SIZE;
+
+ // Decode Stream Footer.
+ return_if_error(hide_format_error(lzma_stream_footer_decode(
+ &coder->footer_flags,
+ coder->temp + coder->temp_size)));
+
+ // Check that we won't seek past the beginning of the file.
+ //
+ // LZMA_STREAM_HEADER_SIZE is added because there must be
+ // space for Stream Header too even though we won't seek
+ // there before decoding the Index field.
+ //
+ // There's no risk of integer overflow here because
+ // Backward Size cannot be greater than 2^34.
+ if (coder->file_target_pos < coder->footer_flags.backward_size
+ + LZMA_STREAM_HEADER_SIZE)
+ return LZMA_DATA_ERROR;
+
+ // Set the target position to the beginning of the Index field.
+ coder->file_target_pos -= coder->footer_flags.backward_size;
+ coder->sequence = SEQ_INDEX_INIT;
+
+ // We can avoid an external seek if the whole Index field is
+ // already available in coder->temp.
+ if (coder->temp_size >= coder->footer_flags.backward_size) {
+ // Set coder->temp_pos to point to the beginning
+ // of the Index.
+ coder->temp_pos = coder->temp_size
+ - coder->footer_flags.backward_size;
+ } else {
+ // These are set to zero to indicate that there's no
+ // useful data (Index or anything else) in coder->temp.
+ coder->temp_pos = 0;
+ coder->temp_size = 0;
+
+ // Seek to the beginning of the Index field.
+ if (seek_to_pos(coder, coder->file_target_pos,
+ in_start, in_pos, in_size))
+ return LZMA_SEEK_NEEDED;
+ }
+
+ // Fall through
+
+ case SEQ_INDEX_INIT: {
+ // Calculate the amount of memory already used by the earlier
+ // Indexes so that we know how big memory limit to pass to
+ // the Index decoder.
+ //
+ // NOTE: When there are multiple Streams, the separate
+ // lzma_index structures can use more RAM (as measured by
+ // lzma_index_memused()) than the final combined lzma_index.
+ // Thus memlimit may need to be slightly higher than the final
+ // calculated memory usage will be. This is perhaps a bit
+ // confusing to the application, but I think it shouldn't
+ // cause problems in practice.
+ uint64_t memused = 0;
+ if (coder->combined_index != NULL) {
+ memused = lzma_index_memused(coder->combined_index);
+ assert(memused <= coder->memlimit);
+ if (memused > coder->memlimit) // Extra sanity check
+ return LZMA_PROG_ERROR;
+ }
+
+ // Initialize the Index decoder.
+ return_if_error(lzma_index_decoder_init(
+ &coder->index_decoder, allocator,
+ &coder->this_index,
+ coder->memlimit - memused));
+
+ coder->index_remaining = coder->footer_flags.backward_size;
+ coder->sequence = SEQ_INDEX_DECODE;
+ }
+
+ // Fall through
+
+ case SEQ_INDEX_DECODE: {
+ // Decode (a part of) the Index. If the whole Index is already
+ // in coder->temp, read it from there. Otherwise read from
+ // in[*in_pos] onwards. Note that index_decode() updates
+ // coder->index_remaining and optionally coder->file_cur_pos.
+ lzma_ret ret;
+ if (coder->temp_size != 0) {
+ assert(coder->temp_size - coder->temp_pos
+ == coder->index_remaining);
+ ret = decode_index(coder, allocator, coder->temp,
+ &coder->temp_pos, coder->temp_size,
+ false);
+ } else {
+ // Don't give the decoder more input than the known
+ // remaining size of the Index field.
+ size_t in_stop = in_size;
+ if (in_size - *in_pos > coder->index_remaining)
+ in_stop = *in_pos
+ + (size_t)(coder->index_remaining);
+
+ ret = decode_index(coder, allocator,
+ in, in_pos, in_stop, true);
+ }
+
+ switch (ret) {
+ case LZMA_OK:
+ // If the Index docoder asks for more input when we
+ // have already given it as much input as Backward Size
+ // indicated, the file is invalid.
+ if (coder->index_remaining == 0)
+ return LZMA_DATA_ERROR;
+
+ // We cannot get here if we were reading Index from
+ // coder->temp because when reading from coder->temp
+ // we give the Index decoder exactly
+ // coder->index_remaining bytes of input.
+ assert(coder->temp_size == 0);
+
+ return LZMA_OK;
+
+ case LZMA_STREAM_END:
+ // If the decoding seems to be successful, check also
+ // that the Index decoder consumed as much input as
+ // indicated by the Backward Size field.
+ if (coder->index_remaining != 0)
+ return LZMA_DATA_ERROR;
+
+ break;
+
+ default:
+ return ret;
+ }
+
+ // Calculate how much the Index tells us to seek backwards
+ // (relative to the beginning of the Index): Total size of
+ // all Blocks plus the size of the Stream Header field.
+ // No integer overflow here because lzma_index_total_size()
+ // cannot return a value greater than LZMA_VLI_MAX.
+ const uint64_t seek_amount
+ = lzma_index_total_size(coder->this_index)
+ + LZMA_STREAM_HEADER_SIZE;
+
+ // Check that Index is sane in sense that seek_amount won't
+ // make us seek past the beginning of the file when locating
+ // the Stream Header.
+ //
+ // coder->file_target_pos still points to the beginning of
+ // the Index field.
+ if (coder->file_target_pos < seek_amount)
+ return LZMA_DATA_ERROR;
+
+ // Set the target to the beginning of Stream Header.
+ coder->file_target_pos -= seek_amount;
+
+ if (coder->file_target_pos == 0) {
+ // We would seek to the beginning of the file, but
+ // since we already decoded that Stream Header in
+ // SEQ_MAGIC_BYTES, we can use the cached value from
+ // coder->first_header_flags to avoid the seek.
+ coder->header_flags = coder->first_header_flags;
+ coder->sequence = SEQ_HEADER_COMPARE;
+ break;
+ }
+
+ coder->sequence = SEQ_HEADER_DECODE;
+
+ // Make coder->file_target_pos point to the end of
+ // the Stream Header field.
+ coder->file_target_pos += LZMA_STREAM_HEADER_SIZE;
+
+ // If coder->temp_size is non-zero, it points to the end
+ // of the Index field. Then the beginning of the Index
+ // field is at coder->temp[coder->temp_size
+ // - coder->footer_flags.backward_size].
+ assert(coder->temp_size == 0 || coder->temp_size
+ >= coder->footer_flags.backward_size);
+
+ // If coder->temp contained the whole Index, see if it has
+ // enough data to contain also the Stream Header. If so,
+ // we avoid an external seek.
+ //
+ // NOTE: This can happen only with small .xz files and only
+ // for the non-first Stream as the Stream Flags of the first
+ // Stream are cached and already handled a few lines above.
+ // So this isn't as useful as the other seek-avoidance cases.
+ if (coder->temp_size != 0 && coder->temp_size
+ - coder->footer_flags.backward_size
+ >= seek_amount) {
+ // Make temp_pos and temp_size point to the *end* of
+ // Stream Header so that SEQ_HEADER_DECODE will find
+ // the start of Stream Header from coder->temp[
+ // coder->temp_size - LZMA_STREAM_HEADER_SIZE].
+ coder->temp_pos = coder->temp_size
+ - coder->footer_flags.backward_size
+ - seek_amount
+ + LZMA_STREAM_HEADER_SIZE;
+ coder->temp_size = coder->temp_pos;
+ } else {
+ // Seek so that Stream Header will be at the end of
+ // coder->temp. With typical multi-Stream files we
+ // will usually also get the Stream Footer and Index
+ // of the *previous* Stream in coder->temp and thus
+ // won't need a separate seek for them.
+ return_if_error(reverse_seek(coder,
+ in_start, in_pos, in_size));
+ }
+ }
+
+ // Fall through
+
+ case SEQ_HEADER_DECODE:
+ // Copy the Stream Header field into coder->temp.
+ // If Stream Header was already available in coder->temp
+ // in SEQ_INDEX_DECODE, then this does nothing.
+ if (fill_temp(coder, in, in_pos, in_size))
+ return LZMA_OK;
+
+ // Make all these point to the beginning of Stream Header.
+ coder->file_target_pos -= LZMA_STREAM_HEADER_SIZE;
+ coder->temp_size -= LZMA_STREAM_HEADER_SIZE;
+ coder->temp_pos = coder->temp_size;
+
+ // Decode the Stream Header.
+ return_if_error(hide_format_error(lzma_stream_header_decode(
+ &coder->header_flags,
+ coder->temp + coder->temp_size)));
+
+ coder->sequence = SEQ_HEADER_COMPARE;
+
+ // Fall through
+
+ case SEQ_HEADER_COMPARE:
+ // Compare Stream Header against Stream Footer. They must
+ // match.
+ return_if_error(lzma_stream_flags_compare(
+ &coder->header_flags, &coder->footer_flags));
+
+ // Store the decoded Stream Flags into the Index. Use the
+ // Footer Flags because it contains Backward Size, although
+ // it shouldn't matter in practice.
+ if (lzma_index_stream_flags(coder->this_index,
+ &coder->footer_flags) != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ // Store also the size of the Stream Padding field. It is
+ // needed to calculate the offsets of the Streams correctly.
+ if (lzma_index_stream_padding(coder->this_index,
+ coder->stream_padding) != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ // Reset it so that it's ready for the next Stream.
+ coder->stream_padding = 0;
+
+ // Append the earlier decoded Indexes after this_index.
+ if (coder->combined_index != NULL)
+ return_if_error(lzma_index_cat(coder->this_index,
+ coder->combined_index, allocator));
+
+ coder->combined_index = coder->this_index;
+ coder->this_index = NULL;
+
+ // If the whole file was decoded, tell the caller that we
+ // are finished.
+ if (coder->file_target_pos == 0) {
+ // The combined index must indicate the same file
+ // size as was told to us at initialization.
+ assert(lzma_index_file_size(coder->combined_index)
+ == coder->file_size);
+
+ // Make the combined index available to
+ // the application.
+ *coder->dest_index = coder->combined_index;
+ coder->combined_index = NULL;
+
+ // Mark the input buffer as used since we may have
+ // done internal seeking and thus don't know how
+ // many input bytes were actually used. This way
+ // lzma_stream.total_in gets a slightly better
+ // estimate of the amount of input used.
+ *in_pos = in_size;
+ return LZMA_STREAM_END;
+ }
+
+ // We didn't hit the beginning of the file yet, so continue
+ // reading backwards in the file. If we have unprocessed
+ // data in coder->temp, use it before requesting more data
+ // from the application.
+ //
+ // coder->file_target_pos, coder->temp_size, and
+ // coder->temp_pos all point to the beginning of Stream Header
+ // and thus the end of the previous Stream in the file.
+ coder->sequence = coder->temp_size > 0
+ ? SEQ_PADDING_DECODE : SEQ_PADDING_SEEK;
+ break;
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+}
+
+
+static lzma_ret
+file_info_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+ lzma_file_info_coder *coder = coder_ptr;
+
+ // The memory usage calculation comes from three things:
+ //
+ // (1) The Indexes that have already been decoded and processed into
+ // coder->combined_index.
+ //
+ // (2) The latest Index in coder->this_index that has been decoded but
+ // not yet put into coder->combined_index.
+ //
+ // (3) The latest Index that we have started decoding but haven't
+ // finished and thus isn't available in coder->this_index yet.
+ // Memory usage and limit information needs to be communicated
+ // from/to coder->index_decoder.
+ //
+ // Care has to be taken to not do both (2) and (3) when calculating
+ // the memory usage.
+ uint64_t combined_index_memusage = 0;
+ uint64_t this_index_memusage = 0;
+
+ // (1) If we have already successfully decoded one or more Indexes,
+ // get their memory usage.
+ if (coder->combined_index != NULL)
+ combined_index_memusage = lzma_index_memused(
+ coder->combined_index);
+
+ // Choose between (2), (3), or neither.
+ if (coder->this_index != NULL) {
+ // (2) The latest Index is available. Use its memory usage.
+ this_index_memusage = lzma_index_memused(coder->this_index);
+
+ } else if (coder->sequence == SEQ_INDEX_DECODE) {
+ // (3) The Index decoder is activate and hasn't yet stored
+ // the new index in coder->this_index. Get the memory usage
+ // information from the Index decoder.
+ //
+ // NOTE: If the Index decoder doesn't yet know how much memory
+ // it will eventually need, it will return a tiny value here.
+ uint64_t dummy;
+ if (coder->index_decoder.memconfig(coder->index_decoder.coder,
+ &this_index_memusage, &dummy, 0)
+ != LZMA_OK) {
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+ }
+
+ // Now we know the total memory usage/requirement. If we had neither
+ // old Indexes nor a new Index, this will be zero which isn't
+ // acceptable as lzma_memusage() has to return non-zero on success
+ // and even with an empty .xz file we will end up with a lzma_index
+ // that takes some memory.
+ *memusage = combined_index_memusage + this_index_memusage;
+ if (*memusage == 0)
+ *memusage = lzma_index_memusage(1, 0);
+
+ *old_memlimit = coder->memlimit;
+
+ // If requested, set a new memory usage limit.
+ if (new_memlimit != 0) {
+ if (new_memlimit < *memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ // In the condition (3) we need to tell the Index decoder
+ // its new memory usage limit.
+ if (coder->this_index == NULL
+ && coder->sequence == SEQ_INDEX_DECODE) {
+ const uint64_t idec_new_memlimit = new_memlimit
+ - combined_index_memusage;
+
+ assert(this_index_memusage > 0);
+ assert(idec_new_memlimit > 0);
+
+ uint64_t dummy1;
+ uint64_t dummy2;
+
+ if (coder->index_decoder.memconfig(
+ coder->index_decoder.coder,
+ &dummy1, &dummy2, idec_new_memlimit)
+ != LZMA_OK) {
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+ }
+
+ coder->memlimit = new_memlimit;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+file_info_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_file_info_coder *coder = coder_ptr;
+
+ lzma_next_end(&coder->index_decoder, allocator);
+ lzma_index_end(coder->this_index, allocator);
+ lzma_index_end(coder->combined_index, allocator);
+
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+lzma_file_info_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator, uint64_t *seek_pos,
+ lzma_index **dest_index,
+ uint64_t memlimit, uint64_t file_size)
+{
+ lzma_next_coder_init(&lzma_file_info_decoder_init, next, allocator);
+
+ if (dest_index == NULL)
+ return LZMA_PROG_ERROR;
+
+ lzma_file_info_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_file_info_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &file_info_decode;
+ next->end = &file_info_decoder_end;
+ next->memconfig = &file_info_decoder_memconfig;
+
+ coder->index_decoder = LZMA_NEXT_CODER_INIT;
+ coder->this_index = NULL;
+ coder->combined_index = NULL;
+ }
+
+ coder->sequence = SEQ_MAGIC_BYTES;
+ coder->file_cur_pos = 0;
+ coder->file_target_pos = 0;
+ coder->file_size = file_size;
+
+ lzma_index_end(coder->this_index, allocator);
+ coder->this_index = NULL;
+
+ lzma_index_end(coder->combined_index, allocator);
+ coder->combined_index = NULL;
+
+ coder->stream_padding = 0;
+
+ coder->dest_index = dest_index;
+ coder->external_seek_pos = seek_pos;
+
+ // If memlimit is 0, make it 1 to ensure that lzma_memlimit_get()
+ // won't return 0 (which would indicate an error).
+ coder->memlimit = my_max(1, memlimit);
+
+ // Prepare these for reading the first Stream Header into coder->temp.
+ coder->temp_pos = 0;
+ coder->temp_size = LZMA_STREAM_HEADER_SIZE;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_file_info_decoder(lzma_stream *strm, lzma_index **dest_index,
+ uint64_t memlimit, uint64_t file_size)
+{
+ lzma_next_strm_init(lzma_file_info_decoder_init, strm, &strm->seek_pos,
+ dest_index, memlimit, file_size);
+
+ // We allow LZMA_FINISH in addition to LZMA_RUN for convenience.
+ // lzma_code() is able to handle the LZMA_FINISH + LZMA_SEEK_NEEDED
+ // combination in a sane way. Applications still need to be careful
+ // if they use LZMA_FINISH so that they remember to reset it back
+ // to LZMA_RUN after seeking if needed.
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/filter_buffer_decoder.c b/src/liblzma/common/filter_buffer_decoder.c
new file mode 100644
index 0000000..6620986
--- /dev/null
+++ b/src/liblzma/common/filter_buffer_decoder.c
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_buffer_decoder.c
+/// \brief Single-call raw decoding
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_buffer_decode(
+ const lzma_filter *filters, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // Validate what isn't validated later in filter_common.c.
+ if (in == NULL || in_pos == NULL || *in_pos > in_size || out == NULL
+ || out_pos == NULL || *out_pos > out_size)
+ return LZMA_PROG_ERROR;
+
+ // Initialize the decoer.
+ lzma_next_coder next = LZMA_NEXT_CODER_INIT;
+ return_if_error(lzma_raw_decoder_init(&next, allocator, filters));
+
+ // Store the positions so that we can restore them if something
+ // goes wrong.
+ const size_t in_start = *in_pos;
+ const size_t out_start = *out_pos;
+
+ // Do the actual decoding and free decoder's memory.
+ lzma_ret ret = next.code(next.coder, allocator, in, in_pos, in_size,
+ out, out_pos, out_size, LZMA_FINISH);
+
+ if (ret == LZMA_STREAM_END) {
+ ret = LZMA_OK;
+ } else {
+ if (ret == LZMA_OK) {
+ // Either the input was truncated or the
+ // output buffer was too small.
+ assert(*in_pos == in_size || *out_pos == out_size);
+
+ if (*in_pos != in_size) {
+ // Since input wasn't consumed completely,
+ // the output buffer became full and is
+ // too small.
+ ret = LZMA_BUF_ERROR;
+
+ } else if (*out_pos != out_size) {
+ // Since output didn't became full, the input
+ // has to be truncated.
+ ret = LZMA_DATA_ERROR;
+
+ } else {
+ // All the input was consumed and output
+ // buffer is full. Now we don't immediately
+ // know the reason for the error. Try
+ // decoding one more byte. If it succeeds,
+ // then the output buffer was too small. If
+ // we cannot get a new output byte, the input
+ // is truncated.
+ uint8_t tmp[1];
+ size_t tmp_pos = 0;
+ (void)next.code(next.coder, allocator,
+ in, in_pos, in_size,
+ tmp, &tmp_pos, 1, LZMA_FINISH);
+
+ if (tmp_pos == 1)
+ ret = LZMA_BUF_ERROR;
+ else
+ ret = LZMA_DATA_ERROR;
+ }
+ }
+
+ // Restore the positions.
+ *in_pos = in_start;
+ *out_pos = out_start;
+ }
+
+ lzma_next_end(&next, allocator);
+
+ return ret;
+}
diff --git a/src/liblzma/common/filter_buffer_encoder.c b/src/liblzma/common/filter_buffer_encoder.c
new file mode 100644
index 0000000..dda18e3
--- /dev/null
+++ b/src/liblzma/common/filter_buffer_encoder.c
@@ -0,0 +1,55 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_buffer_encoder.c
+/// \brief Single-call raw encoding
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_encoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_buffer_encode(
+ const lzma_filter *filters, const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // Validate what isn't validated later in filter_common.c.
+ if ((in == NULL && in_size != 0) || out == NULL
+ || out_pos == NULL || *out_pos > out_size)
+ return LZMA_PROG_ERROR;
+
+ // Initialize the encoder
+ lzma_next_coder next = LZMA_NEXT_CODER_INIT;
+ return_if_error(lzma_raw_encoder_init(&next, allocator, filters));
+
+ // Store the output position so that we can restore it if
+ // something goes wrong.
+ const size_t out_start = *out_pos;
+
+ // Do the actual encoding and free coder's memory.
+ size_t in_pos = 0;
+ lzma_ret ret = next.code(next.coder, allocator, in, &in_pos, in_size,
+ out, out_pos, out_size, LZMA_FINISH);
+ lzma_next_end(&next, allocator);
+
+ if (ret == LZMA_STREAM_END) {
+ ret = LZMA_OK;
+ } else {
+ if (ret == LZMA_OK) {
+ // Output buffer was too small.
+ assert(*out_pos == out_size);
+ ret = LZMA_BUF_ERROR;
+ }
+
+ // Restore the output position.
+ *out_pos = out_start;
+ }
+
+ return ret;
+}
diff --git a/src/liblzma/common/filter_common.c b/src/liblzma/common/filter_common.c
new file mode 100644
index 0000000..fa0927c
--- /dev/null
+++ b/src/liblzma/common/filter_common.c
@@ -0,0 +1,385 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_common.c
+/// \brief Filter-specific stuff common for both encoder and decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_common.h"
+
+
+static const struct {
+ /// Filter ID
+ lzma_vli id;
+
+ /// Size of the filter-specific options structure
+ size_t options_size;
+
+ /// True if it is OK to use this filter as non-last filter in
+ /// the chain.
+ bool non_last_ok;
+
+ /// True if it is OK to use this filter as the last filter in
+ /// the chain.
+ bool last_ok;
+
+ /// True if the filter may change the size of the data (that is, the
+ /// amount of encoded output can be different than the amount of
+ /// uncompressed input).
+ bool changes_size;
+
+} features[] = {
+#if defined (HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1)
+ {
+ .id = LZMA_FILTER_LZMA1,
+ .options_size = sizeof(lzma_options_lzma),
+ .non_last_ok = false,
+ .last_ok = true,
+ .changes_size = true,
+ },
+ {
+ .id = LZMA_FILTER_LZMA1EXT,
+ .options_size = sizeof(lzma_options_lzma),
+ .non_last_ok = false,
+ .last_ok = true,
+ .changes_size = true,
+ },
+#endif
+#if defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
+ {
+ .id = LZMA_FILTER_LZMA2,
+ .options_size = sizeof(lzma_options_lzma),
+ .non_last_ok = false,
+ .last_ok = true,
+ .changes_size = true,
+ },
+#endif
+#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86)
+ {
+ .id = LZMA_FILTER_X86,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC)
+ {
+ .id = LZMA_FILTER_POWERPC,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+#if defined(HAVE_ENCODER_IA64) || defined(HAVE_DECODER_IA64)
+ {
+ .id = LZMA_FILTER_IA64,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+#if defined(HAVE_ENCODER_ARM) || defined(HAVE_DECODER_ARM)
+ {
+ .id = LZMA_FILTER_ARM,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+#if defined(HAVE_ENCODER_ARMTHUMB) || defined(HAVE_DECODER_ARMTHUMB)
+ {
+ .id = LZMA_FILTER_ARMTHUMB,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+#if defined(HAVE_ENCODER_ARM64) || defined(HAVE_DECODER_ARM64)
+ {
+ .id = LZMA_FILTER_ARM64,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+#if defined(HAVE_ENCODER_SPARC) || defined(HAVE_DECODER_SPARC)
+ {
+ .id = LZMA_FILTER_SPARC,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
+ {
+ .id = LZMA_FILTER_DELTA,
+ .options_size = sizeof(lzma_options_delta),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
+ {
+ .id = LZMA_VLI_UNKNOWN
+ }
+};
+
+
+extern LZMA_API(lzma_ret)
+lzma_filters_copy(const lzma_filter *src, lzma_filter *real_dest,
+ const lzma_allocator *allocator)
+{
+ if (src == NULL || real_dest == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Use a temporary destination so that the real destination
+ // will never be modied if an error occurs.
+ lzma_filter dest[LZMA_FILTERS_MAX + 1];
+
+ lzma_ret ret;
+ size_t i;
+ for (i = 0; src[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ // There must be a maximum of four filters plus
+ // the array terminator.
+ if (i == LZMA_FILTERS_MAX) {
+ ret = LZMA_OPTIONS_ERROR;
+ goto error;
+ }
+
+ dest[i].id = src[i].id;
+
+ if (src[i].options == NULL) {
+ dest[i].options = NULL;
+ } else {
+ // See if the filter is supported only when the
+ // options is not NULL. This might be convenient
+ // sometimes if the app is actually copying only
+ // a partial filter chain with a place holder ID.
+ //
+ // When options is not NULL, the Filter ID must be
+ // supported by us, because otherwise we don't know
+ // how big the options are.
+ size_t j;
+ for (j = 0; src[i].id != features[j].id; ++j) {
+ if (features[j].id == LZMA_VLI_UNKNOWN) {
+ ret = LZMA_OPTIONS_ERROR;
+ goto error;
+ }
+ }
+
+ // Allocate and copy the options.
+ dest[i].options = lzma_alloc(features[j].options_size,
+ allocator);
+ if (dest[i].options == NULL) {
+ ret = LZMA_MEM_ERROR;
+ goto error;
+ }
+
+ memcpy(dest[i].options, src[i].options,
+ features[j].options_size);
+ }
+ }
+
+ // Terminate the filter array.
+ assert(i < LZMA_FILTERS_MAX + 1);
+ dest[i].id = LZMA_VLI_UNKNOWN;
+ dest[i].options = NULL;
+
+ // Copy it to the caller-supplied array now that we know that
+ // no errors occurred.
+ memcpy(real_dest, dest, (i + 1) * sizeof(lzma_filter));
+
+ return LZMA_OK;
+
+error:
+ // Free the options which we have already allocated.
+ while (i-- > 0)
+ lzma_free(dest[i].options, allocator);
+
+ return ret;
+}
+
+
+extern LZMA_API(void)
+lzma_filters_free(lzma_filter *filters, const lzma_allocator *allocator)
+{
+ if (filters == NULL)
+ return;
+
+ for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ if (i == LZMA_FILTERS_MAX) {
+ // The API says that LZMA_FILTERS_MAX + 1 is the
+ // maximum allowed size including the terminating
+ // element. Thus, we should never get here but in
+ // case there is a bug and we do anyway, don't go
+ // past the (probable) end of the array.
+ assert(0);
+ break;
+ }
+
+ lzma_free(filters[i].options, allocator);
+ filters[i].options = NULL;
+ filters[i].id = LZMA_VLI_UNKNOWN;
+ }
+
+ return;
+}
+
+
+extern lzma_ret
+lzma_validate_chain(const lzma_filter *filters, size_t *count)
+{
+ // There must be at least one filter.
+ if (filters == NULL || filters[0].id == LZMA_VLI_UNKNOWN)
+ return LZMA_PROG_ERROR;
+
+ // Number of non-last filters that may change the size of the data
+ // significantly (that is, more than 1-2 % or so).
+ size_t changes_size_count = 0;
+
+ // True if it is OK to add a new filter after the current filter.
+ bool non_last_ok = true;
+
+ // True if the last filter in the given chain is actually usable as
+ // the last filter. Only filters that support embedding End of Payload
+ // Marker can be used as the last filter in the chain.
+ bool last_ok = false;
+
+ size_t i = 0;
+ do {
+ size_t j;
+ for (j = 0; filters[i].id != features[j].id; ++j)
+ if (features[j].id == LZMA_VLI_UNKNOWN)
+ return LZMA_OPTIONS_ERROR;
+
+ // If the previous filter in the chain cannot be a non-last
+ // filter, the chain is invalid.
+ if (!non_last_ok)
+ return LZMA_OPTIONS_ERROR;
+
+ non_last_ok = features[j].non_last_ok;
+ last_ok = features[j].last_ok;
+ changes_size_count += features[j].changes_size;
+
+ } while (filters[++i].id != LZMA_VLI_UNKNOWN);
+
+ // There must be 1-4 filters. The last filter must be usable as
+ // the last filter in the chain. A maximum of three filters are
+ // allowed to change the size of the data.
+ if (i > LZMA_FILTERS_MAX || !last_ok || changes_size_count > 3)
+ return LZMA_OPTIONS_ERROR;
+
+ *count = i;
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_raw_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *options,
+ lzma_filter_find coder_find, bool is_encoder)
+{
+ // Do some basic validation and get the number of filters.
+ size_t count;
+ return_if_error(lzma_validate_chain(options, &count));
+
+ // Set the filter functions and copy the options pointer.
+ lzma_filter_info filters[LZMA_FILTERS_MAX + 1];
+ if (is_encoder) {
+ for (size_t i = 0; i < count; ++i) {
+ // The order of the filters is reversed in the
+ // encoder. It allows more efficient handling
+ // of the uncompressed data.
+ const size_t j = count - i - 1;
+
+ const lzma_filter_coder *const fc
+ = coder_find(options[i].id);
+ if (fc == NULL || fc->init == NULL)
+ return LZMA_OPTIONS_ERROR;
+
+ filters[j].id = options[i].id;
+ filters[j].init = fc->init;
+ filters[j].options = options[i].options;
+ }
+ } else {
+ for (size_t i = 0; i < count; ++i) {
+ const lzma_filter_coder *const fc
+ = coder_find(options[i].id);
+ if (fc == NULL || fc->init == NULL)
+ return LZMA_OPTIONS_ERROR;
+
+ filters[i].id = options[i].id;
+ filters[i].init = fc->init;
+ filters[i].options = options[i].options;
+ }
+ }
+
+ // Terminate the array.
+ filters[count].id = LZMA_VLI_UNKNOWN;
+ filters[count].init = NULL;
+
+ // Initialize the filters.
+ const lzma_ret ret = lzma_next_filter_init(next, allocator, filters);
+ if (ret != LZMA_OK)
+ lzma_next_end(next, allocator);
+
+ return ret;
+}
+
+
+extern uint64_t
+lzma_raw_coder_memusage(lzma_filter_find coder_find,
+ const lzma_filter *filters)
+{
+ // The chain has to have at least one filter.
+ {
+ size_t tmp;
+ if (lzma_validate_chain(filters, &tmp) != LZMA_OK)
+ return UINT64_MAX;
+ }
+
+ uint64_t total = 0;
+ size_t i = 0;
+
+ do {
+ const lzma_filter_coder *const fc
+ = coder_find(filters[i].id);
+ if (fc == NULL)
+ return UINT64_MAX; // Unsupported Filter ID
+
+ if (fc->memusage == NULL) {
+ // This filter doesn't have a function to calculate
+ // the memory usage and validate the options. Such
+ // filters need only little memory, so we use 1 KiB
+ // as a good estimate. They also accept all possible
+ // options, so there's no need to worry about lack
+ // of validation.
+ total += 1024;
+ } else {
+ // Call the filter-specific memory usage calculation
+ // function.
+ const uint64_t usage
+ = fc->memusage(filters[i].options);
+ if (usage == UINT64_MAX)
+ return UINT64_MAX; // Invalid options
+
+ total += usage;
+ }
+ } while (filters[++i].id != LZMA_VLI_UNKNOWN);
+
+ // Add some fixed amount of extra. It's to compensate memory usage
+ // of Stream, Block etc. coders, malloc() overhead, stack etc.
+ return total + LZMA_MEMUSAGE_BASE;
+}
diff --git a/src/liblzma/common/filter_common.h b/src/liblzma/common/filter_common.h
new file mode 100644
index 0000000..2e47bb6
--- /dev/null
+++ b/src/liblzma/common/filter_common.h
@@ -0,0 +1,51 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_common.h
+/// \brief Filter-specific stuff common for both encoder and decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FILTER_COMMON_H
+#define LZMA_FILTER_COMMON_H
+
+#include "common.h"
+
+
+/// Both lzma_filter_encoder and lzma_filter_decoder begin with these members.
+typedef struct {
+ /// Filter ID
+ lzma_vli id;
+
+ /// Initializes the filter encoder and calls lzma_next_filter_init()
+ /// for filters + 1.
+ lzma_init_function init;
+
+ /// Calculates memory usage of the encoder. If the options are
+ /// invalid, UINT64_MAX is returned.
+ uint64_t (*memusage)(const void *options);
+
+} lzma_filter_coder;
+
+
+typedef const lzma_filter_coder *(*lzma_filter_find)(lzma_vli id);
+
+
+extern lzma_ret lzma_validate_chain(const lzma_filter *filters, size_t *count);
+
+
+extern lzma_ret lzma_raw_coder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *filters,
+ lzma_filter_find coder_find, bool is_encoder);
+
+
+extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find,
+ const lzma_filter *filters);
+
+
+#endif
diff --git a/src/liblzma/common/filter_decoder.c b/src/liblzma/common/filter_decoder.c
new file mode 100644
index 0000000..fa53f5b
--- /dev/null
+++ b/src/liblzma/common/filter_decoder.c
@@ -0,0 +1,198 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_decoder.c
+/// \brief Filter ID mapping to filter-specific functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_decoder.h"
+#include "filter_common.h"
+#include "lzma_decoder.h"
+#include "lzma2_decoder.h"
+#include "simple_decoder.h"
+#include "delta_decoder.h"
+
+
+typedef struct {
+ /// Filter ID
+ lzma_vli id;
+
+ /// Initializes the filter encoder and calls lzma_next_filter_init()
+ /// for filters + 1.
+ lzma_init_function init;
+
+ /// Calculates memory usage of the encoder. If the options are
+ /// invalid, UINT64_MAX is returned.
+ uint64_t (*memusage)(const void *options);
+
+ /// Decodes Filter Properties.
+ ///
+ /// \return - LZMA_OK: Properties decoded successfully.
+ /// - LZMA_OPTIONS_ERROR: Unsupported properties
+ /// - LZMA_MEM_ERROR: Memory allocation failed.
+ lzma_ret (*props_decode)(
+ void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size);
+
+} lzma_filter_decoder;
+
+
+static const lzma_filter_decoder decoders[] = {
+#ifdef HAVE_DECODER_LZMA1
+ {
+ .id = LZMA_FILTER_LZMA1,
+ .init = &lzma_lzma_decoder_init,
+ .memusage = &lzma_lzma_decoder_memusage,
+ .props_decode = &lzma_lzma_props_decode,
+ },
+ {
+ .id = LZMA_FILTER_LZMA1EXT,
+ .init = &lzma_lzma_decoder_init,
+ .memusage = &lzma_lzma_decoder_memusage,
+ .props_decode = &lzma_lzma_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_LZMA2
+ {
+ .id = LZMA_FILTER_LZMA2,
+ .init = &lzma_lzma2_decoder_init,
+ .memusage = &lzma_lzma2_decoder_memusage,
+ .props_decode = &lzma_lzma2_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_X86
+ {
+ .id = LZMA_FILTER_X86,
+ .init = &lzma_simple_x86_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_POWERPC
+ {
+ .id = LZMA_FILTER_POWERPC,
+ .init = &lzma_simple_powerpc_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_IA64
+ {
+ .id = LZMA_FILTER_IA64,
+ .init = &lzma_simple_ia64_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_ARM
+ {
+ .id = LZMA_FILTER_ARM,
+ .init = &lzma_simple_arm_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_ARMTHUMB
+ {
+ .id = LZMA_FILTER_ARMTHUMB,
+ .init = &lzma_simple_armthumb_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_ARM64
+ {
+ .id = LZMA_FILTER_ARM64,
+ .init = &lzma_simple_arm64_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_SPARC
+ {
+ .id = LZMA_FILTER_SPARC,
+ .init = &lzma_simple_sparc_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
+#ifdef HAVE_DECODER_DELTA
+ {
+ .id = LZMA_FILTER_DELTA,
+ .init = &lzma_delta_decoder_init,
+ .memusage = &lzma_delta_coder_memusage,
+ .props_decode = &lzma_delta_props_decode,
+ },
+#endif
+};
+
+
+static const lzma_filter_decoder *
+decoder_find(lzma_vli id)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(decoders); ++i)
+ if (decoders[i].id == id)
+ return decoders + i;
+
+ return NULL;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_filter_decoder_is_supported(lzma_vli id)
+{
+ return decoder_find(id) != NULL;
+}
+
+
+extern lzma_ret
+lzma_raw_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *options)
+{
+ return lzma_raw_coder_init(next, allocator,
+ options, (lzma_filter_find)(&decoder_find), false);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
+{
+ lzma_next_strm_init(lzma_raw_decoder_init, strm, options);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_raw_decoder_memusage(const lzma_filter *filters)
+{
+ return lzma_raw_coder_memusage(
+ (lzma_filter_find)(&decoder_find), filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_properties_decode(lzma_filter *filter, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size)
+{
+ // Make it always NULL so that the caller can always safely free() it.
+ filter->options = NULL;
+
+ const lzma_filter_decoder *const fd = decoder_find(filter->id);
+ if (fd == NULL)
+ return LZMA_OPTIONS_ERROR;
+
+ if (fd->props_decode == NULL)
+ return props_size == 0 ? LZMA_OK : LZMA_OPTIONS_ERROR;
+
+ return fd->props_decode(
+ &filter->options, allocator, props, props_size);
+}
diff --git a/src/liblzma/common/filter_decoder.h b/src/liblzma/common/filter_decoder.h
new file mode 100644
index 0000000..2dac602
--- /dev/null
+++ b/src/liblzma/common/filter_decoder.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_decoder.h
+/// \brief Filter ID mapping to filter-specific functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FILTER_DECODER_H
+#define LZMA_FILTER_DECODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_raw_decoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *options);
+
+#endif
diff --git a/src/liblzma/common/filter_encoder.c b/src/liblzma/common/filter_encoder.c
new file mode 100644
index 0000000..46fe8af
--- /dev/null
+++ b/src/liblzma/common/filter_encoder.c
@@ -0,0 +1,308 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_decoder.c
+/// \brief Filter ID mapping to filter-specific functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_encoder.h"
+#include "filter_common.h"
+#include "lzma_encoder.h"
+#include "lzma2_encoder.h"
+#include "simple_encoder.h"
+#include "delta_encoder.h"
+
+
+typedef struct {
+ /// Filter ID
+ lzma_vli id;
+
+ /// Initializes the filter encoder and calls lzma_next_filter_init()
+ /// for filters + 1.
+ lzma_init_function init;
+
+ /// Calculates memory usage of the encoder. If the options are
+ /// invalid, UINT64_MAX is returned.
+ uint64_t (*memusage)(const void *options);
+
+ /// Calculates the recommended Uncompressed Size for .xz Blocks to
+ /// which the input data can be split to make multithreaded
+ /// encoding possible. If this is NULL, it is assumed that
+ /// the encoder is fast enough with single thread.
+ uint64_t (*block_size)(const void *options);
+
+ /// Tells the size of the Filter Properties field. If options are
+ /// invalid, LZMA_OPTIONS_ERROR is returned and size is set to
+ /// UINT32_MAX.
+ lzma_ret (*props_size_get)(uint32_t *size, const void *options);
+
+ /// Some filters will always have the same size Filter Properties
+ /// field. If props_size_get is NULL, this value is used.
+ uint32_t props_size_fixed;
+
+ /// Encodes Filter Properties.
+ ///
+ /// \return - LZMA_OK: Properties encoded successfully.
+ /// - LZMA_OPTIONS_ERROR: Unsupported options
+ /// - LZMA_PROG_ERROR: Invalid options or not enough
+ /// output space
+ lzma_ret (*props_encode)(const void *options, uint8_t *out);
+
+} lzma_filter_encoder;
+
+
+static const lzma_filter_encoder encoders[] = {
+#ifdef HAVE_ENCODER_LZMA1
+ {
+ .id = LZMA_FILTER_LZMA1,
+ .init = &lzma_lzma_encoder_init,
+ .memusage = &lzma_lzma_encoder_memusage,
+ .block_size = NULL, // Not needed for LZMA1
+ .props_size_get = NULL,
+ .props_size_fixed = 5,
+ .props_encode = &lzma_lzma_props_encode,
+ },
+ {
+ .id = LZMA_FILTER_LZMA1EXT,
+ .init = &lzma_lzma_encoder_init,
+ .memusage = &lzma_lzma_encoder_memusage,
+ .block_size = NULL, // Not needed for LZMA1
+ .props_size_get = NULL,
+ .props_size_fixed = 5,
+ .props_encode = &lzma_lzma_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_LZMA2
+ {
+ .id = LZMA_FILTER_LZMA2,
+ .init = &lzma_lzma2_encoder_init,
+ .memusage = &lzma_lzma2_encoder_memusage,
+ .block_size = &lzma_lzma2_block_size,
+ .props_size_get = NULL,
+ .props_size_fixed = 1,
+ .props_encode = &lzma_lzma2_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_X86
+ {
+ .id = LZMA_FILTER_X86,
+ .init = &lzma_simple_x86_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_POWERPC
+ {
+ .id = LZMA_FILTER_POWERPC,
+ .init = &lzma_simple_powerpc_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_IA64
+ {
+ .id = LZMA_FILTER_IA64,
+ .init = &lzma_simple_ia64_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_ARM
+ {
+ .id = LZMA_FILTER_ARM,
+ .init = &lzma_simple_arm_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_ARMTHUMB
+ {
+ .id = LZMA_FILTER_ARMTHUMB,
+ .init = &lzma_simple_armthumb_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_ARM64
+ {
+ .id = LZMA_FILTER_ARM64,
+ .init = &lzma_simple_arm64_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_SPARC
+ {
+ .id = LZMA_FILTER_SPARC,
+ .init = &lzma_simple_sparc_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
+#ifdef HAVE_ENCODER_DELTA
+ {
+ .id = LZMA_FILTER_DELTA,
+ .init = &lzma_delta_encoder_init,
+ .memusage = &lzma_delta_coder_memusage,
+ .block_size = NULL,
+ .props_size_get = NULL,
+ .props_size_fixed = 1,
+ .props_encode = &lzma_delta_props_encode,
+ },
+#endif
+};
+
+
+static const lzma_filter_encoder *
+encoder_find(lzma_vli id)
+{
+ for (size_t i = 0; i < ARRAY_SIZE(encoders); ++i)
+ if (encoders[i].id == id)
+ return encoders + i;
+
+ return NULL;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_filter_encoder_is_supported(lzma_vli id)
+{
+ return encoder_find(id) != NULL;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_filters_update(lzma_stream *strm, const lzma_filter *filters)
+{
+ if (strm->internal->next.update == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Validate the filter chain.
+ if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ // The actual filter chain in the encoder is reversed. Some things
+ // still want the normal order chain, so we provide both.
+ size_t count = 1;
+ while (filters[count].id != LZMA_VLI_UNKNOWN)
+ ++count;
+
+ lzma_filter reversed_filters[LZMA_FILTERS_MAX + 1];
+ for (size_t i = 0; i < count; ++i)
+ reversed_filters[count - i - 1] = filters[i];
+
+ reversed_filters[count].id = LZMA_VLI_UNKNOWN;
+
+ return strm->internal->next.update(strm->internal->next.coder,
+ strm->allocator, filters, reversed_filters);
+}
+
+
+extern lzma_ret
+lzma_raw_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *options)
+{
+ return lzma_raw_coder_init(next, allocator,
+ options, (lzma_filter_find)(&encoder_find), true);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
+{
+ lzma_next_strm_init(lzma_raw_coder_init, strm, options,
+ (lzma_filter_find)(&encoder_find), true);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_raw_encoder_memusage(const lzma_filter *filters)
+{
+ return lzma_raw_coder_memusage(
+ (lzma_filter_find)(&encoder_find), filters);
+}
+
+
+extern uint64_t
+lzma_mt_block_size(const lzma_filter *filters)
+{
+ uint64_t max = 0;
+
+ for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ const lzma_filter_encoder *const fe
+ = encoder_find(filters[i].id);
+ if (fe->block_size != NULL) {
+ const uint64_t size
+ = fe->block_size(filters[i].options);
+ if (size == 0)
+ return 0;
+
+ if (size > max)
+ max = size;
+ }
+ }
+
+ return max;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_properties_size(uint32_t *size, const lzma_filter *filter)
+{
+ const lzma_filter_encoder *const fe = encoder_find(filter->id);
+ if (fe == NULL) {
+ // Unknown filter - if the Filter ID is a proper VLI,
+ // return LZMA_OPTIONS_ERROR instead of LZMA_PROG_ERROR,
+ // because it's possible that we just don't have support
+ // compiled in for the requested filter.
+ return filter->id <= LZMA_VLI_MAX
+ ? LZMA_OPTIONS_ERROR : LZMA_PROG_ERROR;
+ }
+
+ if (fe->props_size_get == NULL) {
+ // No props_size_get() function, use props_size_fixed.
+ *size = fe->props_size_fixed;
+ return LZMA_OK;
+ }
+
+ return fe->props_size_get(size, filter->options);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_properties_encode(const lzma_filter *filter, uint8_t *props)
+{
+ const lzma_filter_encoder *const fe = encoder_find(filter->id);
+ if (fe == NULL)
+ return LZMA_PROG_ERROR;
+
+ if (fe->props_encode == NULL)
+ return LZMA_OK;
+
+ return fe->props_encode(filter->options, props);
+}
diff --git a/src/liblzma/common/filter_encoder.h b/src/liblzma/common/filter_encoder.h
new file mode 100644
index 0000000..f1d5683
--- /dev/null
+++ b/src/liblzma/common/filter_encoder.h
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_encoder.c
+/// \brief Filter ID mapping to filter-specific functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FILTER_ENCODER_H
+#define LZMA_FILTER_ENCODER_H
+
+#include "common.h"
+
+
+// FIXME: Might become a part of the public API.
+extern uint64_t lzma_mt_block_size(const lzma_filter *filters);
+
+
+extern lzma_ret lzma_raw_encoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *filters);
+
+#endif
diff --git a/src/liblzma/common/filter_flags_decoder.c b/src/liblzma/common/filter_flags_decoder.c
new file mode 100644
index 0000000..ddfb085
--- /dev/null
+++ b/src/liblzma/common/filter_flags_decoder.c
@@ -0,0 +1,46 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_flags_decoder.c
+/// \brief Decodes a Filter Flags field
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_filter_flags_decode(
+ lzma_filter *filter, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+{
+ // Set the pointer to NULL so the caller can always safely free it.
+ filter->options = NULL;
+
+ // Filter ID
+ return_if_error(lzma_vli_decode(&filter->id, NULL,
+ in, in_pos, in_size));
+
+ if (filter->id >= LZMA_FILTER_RESERVED_START)
+ return LZMA_DATA_ERROR;
+
+ // Size of Properties
+ lzma_vli props_size;
+ return_if_error(lzma_vli_decode(&props_size, NULL,
+ in, in_pos, in_size));
+
+ // Filter Properties
+ if (in_size - *in_pos < props_size)
+ return LZMA_DATA_ERROR;
+
+ const lzma_ret ret = lzma_properties_decode(
+ filter, allocator, in + *in_pos, props_size);
+
+ *in_pos += props_size;
+
+ return ret;
+}
diff --git a/src/liblzma/common/filter_flags_encoder.c b/src/liblzma/common/filter_flags_encoder.c
new file mode 100644
index 0000000..b57b9fd
--- /dev/null
+++ b/src/liblzma/common/filter_flags_encoder.c
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file filter_flags_encoder.c
+/// \brief Encodes a Filter Flags field
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_encoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_filter_flags_size(uint32_t *size, const lzma_filter *filter)
+{
+ if (filter->id >= LZMA_FILTER_RESERVED_START)
+ return LZMA_PROG_ERROR;
+
+ return_if_error(lzma_properties_size(size, filter));
+
+ *size += lzma_vli_size(filter->id) + lzma_vli_size(*size);
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_filter_flags_encode(const lzma_filter *filter,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // Filter ID
+ if (filter->id >= LZMA_FILTER_RESERVED_START)
+ return LZMA_PROG_ERROR;
+
+ return_if_error(lzma_vli_encode(filter->id, NULL,
+ out, out_pos, out_size));
+
+ // Size of Properties
+ uint32_t props_size;
+ return_if_error(lzma_properties_size(&props_size, filter));
+ return_if_error(lzma_vli_encode(props_size, NULL,
+ out, out_pos, out_size));
+
+ // Filter Properties
+ if (out_size - *out_pos < props_size)
+ return LZMA_PROG_ERROR;
+
+ return_if_error(lzma_properties_encode(filter, out + *out_pos));
+
+ *out_pos += props_size;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/hardware_cputhreads.c b/src/liblzma/common/hardware_cputhreads.c
new file mode 100644
index 0000000..5d246d2
--- /dev/null
+++ b/src/liblzma/common/hardware_cputhreads.c
@@ -0,0 +1,34 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file hardware_cputhreads.c
+/// \brief Get the number of CPU threads or cores
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+#include "tuklib_cpucores.h"
+
+
+#ifdef HAVE_SYMBOL_VERSIONS_LINUX
+// This is for compatibility with binaries linked against liblzma that
+// has been patched with xz-5.2.2-compat-libs.patch from RHEL/CentOS 7.
+LZMA_SYMVER_API("lzma_cputhreads@XZ_5.2.2",
+ uint32_t, lzma_cputhreads_522)(void) lzma_nothrow
+ __attribute__((__alias__("lzma_cputhreads_52")));
+
+LZMA_SYMVER_API("lzma_cputhreads@@XZ_5.2",
+ uint32_t, lzma_cputhreads_52)(void) lzma_nothrow;
+
+#define lzma_cputhreads lzma_cputhreads_52
+#endif
+extern LZMA_API(uint32_t)
+lzma_cputhreads(void)
+{
+ return tuklib_cpucores();
+}
diff --git a/src/liblzma/common/hardware_physmem.c b/src/liblzma/common/hardware_physmem.c
new file mode 100644
index 0000000..a2bbbe2
--- /dev/null
+++ b/src/liblzma/common/hardware_physmem.c
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file hardware_physmem.c
+/// \brief Get the total amount of physical memory (RAM)
+//
+// Author: Jonathan Nieder
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+#include "tuklib_physmem.h"
+
+
+extern LZMA_API(uint64_t)
+lzma_physmem(void)
+{
+ // It is simpler to make lzma_physmem() a wrapper for
+ // tuklib_physmem() than to hack appropriate symbol visibility
+ // support for the tuklib modules.
+ return tuklib_physmem();
+}
diff --git a/src/liblzma/common/index.c b/src/liblzma/common/index.c
new file mode 100644
index 0000000..8a35f43
--- /dev/null
+++ b/src/liblzma/common/index.c
@@ -0,0 +1,1269 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index.c
+/// \brief Handling of .xz Indexes and some other Stream information
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "index.h"
+#include "stream_flags_common.h"
+
+
+/// \brief How many Records to allocate at once
+///
+/// This should be big enough to avoid making lots of tiny allocations
+/// but small enough to avoid too much unused memory at once.
+#define INDEX_GROUP_SIZE 512
+
+
+/// \brief How many Records can be allocated at once at maximum
+#define PREALLOC_MAX ((SIZE_MAX - sizeof(index_group)) / sizeof(index_record))
+
+
+/// \brief Base structure for index_stream and index_group structures
+typedef struct index_tree_node_s index_tree_node;
+struct index_tree_node_s {
+ /// Uncompressed start offset of this Stream (relative to the
+ /// beginning of the file) or Block (relative to the beginning
+ /// of the Stream)
+ lzma_vli uncompressed_base;
+
+ /// Compressed start offset of this Stream or Block
+ lzma_vli compressed_base;
+
+ index_tree_node *parent;
+ index_tree_node *left;
+ index_tree_node *right;
+};
+
+
+/// \brief AVL tree to hold index_stream or index_group structures
+typedef struct {
+ /// Root node
+ index_tree_node *root;
+
+ /// Leftmost node. Since the tree will be filled sequentially,
+ /// this won't change after the first node has been added to
+ /// the tree.
+ index_tree_node *leftmost;
+
+ /// The rightmost node in the tree. Since the tree is filled
+ /// sequentially, this is always the node where to add the new data.
+ index_tree_node *rightmost;
+
+ /// Number of nodes in the tree
+ uint32_t count;
+
+} index_tree;
+
+
+typedef struct {
+ lzma_vli uncompressed_sum;
+ lzma_vli unpadded_sum;
+} index_record;
+
+
+typedef struct {
+ /// Every Record group is part of index_stream.groups tree.
+ index_tree_node node;
+
+ /// Number of Blocks in this Stream before this group.
+ lzma_vli number_base;
+
+ /// Number of Records that can be put in records[].
+ size_t allocated;
+
+ /// Index of the last Record in use.
+ size_t last;
+
+ /// The sizes in this array are stored as cumulative sums relative
+ /// to the beginning of the Stream. This makes it possible to
+ /// use binary search in lzma_index_locate().
+ ///
+ /// Note that the cumulative summing is done specially for
+ /// unpadded_sum: The previous value is rounded up to the next
+ /// multiple of four before adding the Unpadded Size of the new
+ /// Block. The total encoded size of the Blocks in the Stream
+ /// is records[last].unpadded_sum in the last Record group of
+ /// the Stream.
+ ///
+ /// For example, if the Unpadded Sizes are 39, 57, and 81, the
+ /// stored values are 39, 97 (40 + 57), and 181 (100 + 181).
+ /// The total encoded size of these Blocks is 184.
+ ///
+ /// This is a flexible array, because it makes easy to optimize
+ /// memory usage in case someone concatenates many Streams that
+ /// have only one or few Blocks.
+ index_record records[];
+
+} index_group;
+
+
+typedef struct {
+ /// Every index_stream is a node in the tree of Streams.
+ index_tree_node node;
+
+ /// Number of this Stream (first one is 1)
+ uint32_t number;
+
+ /// Total number of Blocks before this Stream
+ lzma_vli block_number_base;
+
+ /// Record groups of this Stream are stored in a tree.
+ /// It's a T-tree with AVL-tree balancing. There are
+ /// INDEX_GROUP_SIZE Records per node by default.
+ /// This keeps the number of memory allocations reasonable
+ /// and finding a Record is fast.
+ index_tree groups;
+
+ /// Number of Records in this Stream
+ lzma_vli record_count;
+
+ /// Size of the List of Records field in this Stream. This is used
+ /// together with record_count to calculate the size of the Index
+ /// field and thus the total size of the Stream.
+ lzma_vli index_list_size;
+
+ /// Stream Flags of this Stream. This is meaningful only if
+ /// the Stream Flags have been told us with lzma_index_stream_flags().
+ /// Initially stream_flags.version is set to UINT32_MAX to indicate
+ /// that the Stream Flags are unknown.
+ lzma_stream_flags stream_flags;
+
+ /// Amount of Stream Padding after this Stream. This defaults to
+ /// zero and can be set with lzma_index_stream_padding().
+ lzma_vli stream_padding;
+
+} index_stream;
+
+
+struct lzma_index_s {
+ /// AVL-tree containing the Stream(s). Often there is just one
+ /// Stream, but using a tree keeps lookups fast even when there
+ /// are many concatenated Streams.
+ index_tree streams;
+
+ /// Uncompressed size of all the Blocks in the Stream(s)
+ lzma_vli uncompressed_size;
+
+ /// Total size of all the Blocks in the Stream(s)
+ lzma_vli total_size;
+
+ /// Total number of Records in all Streams in this lzma_index
+ lzma_vli record_count;
+
+ /// Size of the List of Records field if all the Streams in this
+ /// lzma_index were packed into a single Stream (makes it simpler to
+ /// take many .xz files and combine them into a single Stream).
+ ///
+ /// This value together with record_count is needed to calculate
+ /// Backward Size that is stored into Stream Footer.
+ lzma_vli index_list_size;
+
+ /// How many Records to allocate at once in lzma_index_append().
+ /// This defaults to INDEX_GROUP_SIZE but can be overridden with
+ /// lzma_index_prealloc().
+ size_t prealloc;
+
+ /// Bitmask indicating what integrity check types have been used
+ /// as set by lzma_index_stream_flags(). The bit of the last Stream
+ /// is not included here, since it is possible to change it by
+ /// calling lzma_index_stream_flags() again.
+ uint32_t checks;
+};
+
+
+static void
+index_tree_init(index_tree *tree)
+{
+ tree->root = NULL;
+ tree->leftmost = NULL;
+ tree->rightmost = NULL;
+ tree->count = 0;
+ return;
+}
+
+
+/// Helper for index_tree_end()
+static void
+index_tree_node_end(index_tree_node *node, const lzma_allocator *allocator,
+ void (*free_func)(void *node, const lzma_allocator *allocator))
+{
+ // The tree won't ever be very huge, so recursion should be fine.
+ // 20 levels in the tree is likely quite a lot already in practice.
+ if (node->left != NULL)
+ index_tree_node_end(node->left, allocator, free_func);
+
+ if (node->right != NULL)
+ index_tree_node_end(node->right, allocator, free_func);
+
+ free_func(node, allocator);
+ return;
+}
+
+
+/// Free the memory allocated for a tree. Each node is freed using the
+/// given free_func which is either &lzma_free or &index_stream_end.
+/// The latter is used to free the Record groups from each index_stream
+/// before freeing the index_stream itself.
+static void
+index_tree_end(index_tree *tree, const lzma_allocator *allocator,
+ void (*free_func)(void *node, const lzma_allocator *allocator))
+{
+ assert(free_func != NULL);
+
+ if (tree->root != NULL)
+ index_tree_node_end(tree->root, allocator, free_func);
+
+ return;
+}
+
+
+/// Add a new node to the tree. node->uncompressed_base and
+/// node->compressed_base must have been set by the caller already.
+static void
+index_tree_append(index_tree *tree, index_tree_node *node)
+{
+ node->parent = tree->rightmost;
+ node->left = NULL;
+ node->right = NULL;
+
+ ++tree->count;
+
+ // Handle the special case of adding the first node.
+ if (tree->root == NULL) {
+ tree->root = node;
+ tree->leftmost = node;
+ tree->rightmost = node;
+ return;
+ }
+
+ // The tree is always filled sequentially.
+ assert(tree->rightmost->uncompressed_base <= node->uncompressed_base);
+ assert(tree->rightmost->compressed_base < node->compressed_base);
+
+ // Add the new node after the rightmost node. It's the correct
+ // place due to the reason above.
+ tree->rightmost->right = node;
+ tree->rightmost = node;
+
+ // Balance the AVL-tree if needed. We don't need to keep the balance
+ // factors in nodes, because we always fill the tree sequentially,
+ // and thus know the state of the tree just by looking at the node
+ // count. From the node count we can calculate how many steps to go
+ // up in the tree to find the rotation root.
+ uint32_t up = tree->count ^ (UINT32_C(1) << bsr32(tree->count));
+ if (up != 0) {
+ // Locate the root node for the rotation.
+ up = ctz32(tree->count) + 2;
+ do {
+ node = node->parent;
+ } while (--up > 0);
+
+ // Rotate left using node as the rotation root.
+ index_tree_node *pivot = node->right;
+
+ if (node->parent == NULL) {
+ tree->root = pivot;
+ } else {
+ assert(node->parent->right == node);
+ node->parent->right = pivot;
+ }
+
+ pivot->parent = node->parent;
+
+ node->right = pivot->left;
+ if (node->right != NULL)
+ node->right->parent = node;
+
+ pivot->left = node;
+ node->parent = pivot;
+ }
+
+ return;
+}
+
+
+/// Get the next node in the tree. Return NULL if there are no more nodes.
+static void *
+index_tree_next(const index_tree_node *node)
+{
+ if (node->right != NULL) {
+ node = node->right;
+ while (node->left != NULL)
+ node = node->left;
+
+ return (void *)(node);
+ }
+
+ while (node->parent != NULL && node->parent->right == node)
+ node = node->parent;
+
+ return (void *)(node->parent);
+}
+
+
+/// Locate a node that contains the given uncompressed offset. It is
+/// caller's job to check that target is not bigger than the uncompressed
+/// size of the tree (the last node would be returned in that case still).
+static void *
+index_tree_locate(const index_tree *tree, lzma_vli target)
+{
+ const index_tree_node *result = NULL;
+ const index_tree_node *node = tree->root;
+
+ assert(tree->leftmost == NULL
+ || tree->leftmost->uncompressed_base == 0);
+
+ // Consecutive nodes may have the same uncompressed_base.
+ // We must pick the rightmost one.
+ while (node != NULL) {
+ if (node->uncompressed_base > target) {
+ node = node->left;
+ } else {
+ result = node;
+ node = node->right;
+ }
+ }
+
+ return (void *)(result);
+}
+
+
+/// Allocate and initialize a new Stream using the given base offsets.
+static index_stream *
+index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
+ uint32_t stream_number, lzma_vli block_number_base,
+ const lzma_allocator *allocator)
+{
+ index_stream *s = lzma_alloc(sizeof(index_stream), allocator);
+ if (s == NULL)
+ return NULL;
+
+ s->node.uncompressed_base = uncompressed_base;
+ s->node.compressed_base = compressed_base;
+ s->node.parent = NULL;
+ s->node.left = NULL;
+ s->node.right = NULL;
+
+ s->number = stream_number;
+ s->block_number_base = block_number_base;
+
+ index_tree_init(&s->groups);
+
+ s->record_count = 0;
+ s->index_list_size = 0;
+ s->stream_flags.version = UINT32_MAX;
+ s->stream_padding = 0;
+
+ return s;
+}
+
+
+/// Free the memory allocated for a Stream and its Record groups.
+static void
+index_stream_end(void *node, const lzma_allocator *allocator)
+{
+ index_stream *s = node;
+ index_tree_end(&s->groups, allocator, &lzma_free);
+ lzma_free(s, allocator);
+ return;
+}
+
+
+static lzma_index *
+index_init_plain(const lzma_allocator *allocator)
+{
+ lzma_index *i = lzma_alloc(sizeof(lzma_index), allocator);
+ if (i != NULL) {
+ index_tree_init(&i->streams);
+ i->uncompressed_size = 0;
+ i->total_size = 0;
+ i->record_count = 0;
+ i->index_list_size = 0;
+ i->prealloc = INDEX_GROUP_SIZE;
+ i->checks = 0;
+ }
+
+ return i;
+}
+
+
+extern LZMA_API(lzma_index *)
+lzma_index_init(const lzma_allocator *allocator)
+{
+ lzma_index *i = index_init_plain(allocator);
+ if (i == NULL)
+ return NULL;
+
+ index_stream *s = index_stream_init(0, 0, 1, 0, allocator);
+ if (s == NULL) {
+ lzma_free(i, allocator);
+ return NULL;
+ }
+
+ index_tree_append(&i->streams, &s->node);
+
+ return i;
+}
+
+
+extern LZMA_API(void)
+lzma_index_end(lzma_index *i, const lzma_allocator *allocator)
+{
+ // NOTE: If you modify this function, check also the bottom
+ // of lzma_index_cat().
+ if (i != NULL) {
+ index_tree_end(&i->streams, allocator, &index_stream_end);
+ lzma_free(i, allocator);
+ }
+
+ return;
+}
+
+
+extern void
+lzma_index_prealloc(lzma_index *i, lzma_vli records)
+{
+ if (records > PREALLOC_MAX)
+ records = PREALLOC_MAX;
+
+ i->prealloc = (size_t)(records);
+ return;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_index_memusage(lzma_vli streams, lzma_vli blocks)
+{
+ // This calculates an upper bound that is only a little bit
+ // bigger than the exact maximum memory usage with the given
+ // parameters.
+
+ // Typical malloc() overhead is 2 * sizeof(void *) but we take
+ // a little bit extra just in case. Using LZMA_MEMUSAGE_BASE
+ // instead would give too inaccurate estimate.
+ const size_t alloc_overhead = 4 * sizeof(void *);
+
+ // Amount of memory needed for each Stream base structures.
+ // We assume that every Stream has at least one Block and
+ // thus at least one group.
+ const size_t stream_base = sizeof(index_stream)
+ + sizeof(index_group) + 2 * alloc_overhead;
+
+ // Amount of memory needed per group.
+ const size_t group_base = sizeof(index_group)
+ + INDEX_GROUP_SIZE * sizeof(index_record)
+ + alloc_overhead;
+
+ // Number of groups. There may actually be more, but that overhead
+ // has been taken into account in stream_base already.
+ const lzma_vli groups
+ = (blocks + INDEX_GROUP_SIZE - 1) / INDEX_GROUP_SIZE;
+
+ // Memory used by index_stream and index_group structures.
+ const uint64_t streams_mem = streams * stream_base;
+ const uint64_t groups_mem = groups * group_base;
+
+ // Memory used by the base structure.
+ const uint64_t index_base = sizeof(lzma_index) + alloc_overhead;
+
+ // Validate the arguments and catch integer overflows.
+ // Maximum number of Streams is "only" UINT32_MAX, because
+ // that limit is used by the tree containing the Streams.
+ const uint64_t limit = UINT64_MAX - index_base;
+ if (streams == 0 || streams > UINT32_MAX || blocks > LZMA_VLI_MAX
+ || streams > limit / stream_base
+ || groups > limit / group_base
+ || limit - streams_mem < groups_mem)
+ return UINT64_MAX;
+
+ return index_base + streams_mem + groups_mem;
+}
+
+
+extern LZMA_API(uint64_t)
+lzma_index_memused(const lzma_index *i)
+{
+ return lzma_index_memusage(i->streams.count, i->record_count);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_block_count(const lzma_index *i)
+{
+ return i->record_count;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_stream_count(const lzma_index *i)
+{
+ return i->streams.count;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_size(const lzma_index *i)
+{
+ return index_size(i->record_count, i->index_list_size);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_total_size(const lzma_index *i)
+{
+ return i->total_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_stream_size(const lzma_index *i)
+{
+ // Stream Header + Blocks + Index + Stream Footer
+ return LZMA_STREAM_HEADER_SIZE + i->total_size
+ + index_size(i->record_count, i->index_list_size)
+ + LZMA_STREAM_HEADER_SIZE;
+}
+
+
+static lzma_vli
+index_file_size(lzma_vli compressed_base, lzma_vli unpadded_sum,
+ lzma_vli record_count, lzma_vli index_list_size,
+ lzma_vli stream_padding)
+{
+ // Earlier Streams and Stream Paddings + Stream Header
+ // + Blocks + Index + Stream Footer + Stream Padding
+ //
+ // This might go over LZMA_VLI_MAX due to too big unpadded_sum
+ // when this function is used in lzma_index_append().
+ lzma_vli file_size = compressed_base + 2 * LZMA_STREAM_HEADER_SIZE
+ + stream_padding + vli_ceil4(unpadded_sum);
+ if (file_size > LZMA_VLI_MAX)
+ return LZMA_VLI_UNKNOWN;
+
+ // The same applies here.
+ file_size += index_size(record_count, index_list_size);
+ if (file_size > LZMA_VLI_MAX)
+ return LZMA_VLI_UNKNOWN;
+
+ return file_size;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_file_size(const lzma_index *i)
+{
+ const index_stream *s = (const index_stream *)(i->streams.rightmost);
+ const index_group *g = (const index_group *)(s->groups.rightmost);
+ return index_file_size(s->node.compressed_base,
+ g == NULL ? 0 : g->records[g->last].unpadded_sum,
+ s->record_count, s->index_list_size,
+ s->stream_padding);
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_uncompressed_size(const lzma_index *i)
+{
+ return i->uncompressed_size;
+}
+
+
+extern LZMA_API(uint32_t)
+lzma_index_checks(const lzma_index *i)
+{
+ uint32_t checks = i->checks;
+
+ // Get the type of the Check of the last Stream too.
+ const index_stream *s = (const index_stream *)(i->streams.rightmost);
+ if (s->stream_flags.version != UINT32_MAX)
+ checks |= UINT32_C(1) << s->stream_flags.check;
+
+ return checks;
+}
+
+
+extern uint32_t
+lzma_index_padding_size(const lzma_index *i)
+{
+ return (LZMA_VLI_C(4) - index_size_unpadded(
+ i->record_count, i->index_list_size)) & 3;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_stream_flags(lzma_index *i, const lzma_stream_flags *stream_flags)
+{
+ if (i == NULL || stream_flags == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Validate the Stream Flags.
+ return_if_error(lzma_stream_flags_compare(
+ stream_flags, stream_flags));
+
+ index_stream *s = (index_stream *)(i->streams.rightmost);
+ s->stream_flags = *stream_flags;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
+{
+ if (i == NULL || stream_padding > LZMA_VLI_MAX
+ || (stream_padding & 3) != 0)
+ return LZMA_PROG_ERROR;
+
+ index_stream *s = (index_stream *)(i->streams.rightmost);
+
+ // Check that the new value won't make the file grow too big.
+ const lzma_vli old_stream_padding = s->stream_padding;
+ s->stream_padding = 0;
+ if (lzma_index_file_size(i) + stream_padding > LZMA_VLI_MAX) {
+ s->stream_padding = old_stream_padding;
+ return LZMA_DATA_ERROR;
+ }
+
+ s->stream_padding = stream_padding;
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_append(lzma_index *i, const lzma_allocator *allocator,
+ lzma_vli unpadded_size, lzma_vli uncompressed_size)
+{
+ // Validate.
+ if (i == NULL || unpadded_size < UNPADDED_SIZE_MIN
+ || unpadded_size > UNPADDED_SIZE_MAX
+ || uncompressed_size > LZMA_VLI_MAX)
+ return LZMA_PROG_ERROR;
+
+ index_stream *s = (index_stream *)(i->streams.rightmost);
+ index_group *g = (index_group *)(s->groups.rightmost);
+
+ const lzma_vli compressed_base = g == NULL ? 0
+ : vli_ceil4(g->records[g->last].unpadded_sum);
+ const lzma_vli uncompressed_base = g == NULL ? 0
+ : g->records[g->last].uncompressed_sum;
+ const uint32_t index_list_size_add = lzma_vli_size(unpadded_size)
+ + lzma_vli_size(uncompressed_size);
+
+ // Check that uncompressed size will not overflow.
+ if (uncompressed_base + uncompressed_size > LZMA_VLI_MAX)
+ return LZMA_DATA_ERROR;
+
+ // Check that the new unpadded sum will not overflow. This is
+ // checked again in index_file_size(), but the unpadded sum is
+ // passed to vli_ceil4() which expects a valid lzma_vli value.
+ if (compressed_base + unpadded_size > UNPADDED_SIZE_MAX)
+ return LZMA_DATA_ERROR;
+
+ // Check that the file size will stay within limits.
+ if (index_file_size(s->node.compressed_base,
+ compressed_base + unpadded_size, s->record_count + 1,
+ s->index_list_size + index_list_size_add,
+ s->stream_padding) == LZMA_VLI_UNKNOWN)
+ return LZMA_DATA_ERROR;
+
+ // The size of the Index field must not exceed the maximum value
+ // that can be stored in the Backward Size field.
+ if (index_size(i->record_count + 1,
+ i->index_list_size + index_list_size_add)
+ > LZMA_BACKWARD_SIZE_MAX)
+ return LZMA_DATA_ERROR;
+
+ if (g != NULL && g->last + 1 < g->allocated) {
+ // There is space in the last group at least for one Record.
+ ++g->last;
+ } else {
+ // We need to allocate a new group.
+ g = lzma_alloc(sizeof(index_group)
+ + i->prealloc * sizeof(index_record),
+ allocator);
+ if (g == NULL)
+ return LZMA_MEM_ERROR;
+
+ g->last = 0;
+ g->allocated = i->prealloc;
+
+ // Reset prealloc so that if the application happens to
+ // add new Records, the allocation size will be sane.
+ i->prealloc = INDEX_GROUP_SIZE;
+
+ // Set the start offsets of this group.
+ g->node.uncompressed_base = uncompressed_base;
+ g->node.compressed_base = compressed_base;
+ g->number_base = s->record_count + 1;
+
+ // Add the new group to the Stream.
+ index_tree_append(&s->groups, &g->node);
+ }
+
+ // Add the new Record to the group.
+ g->records[g->last].uncompressed_sum
+ = uncompressed_base + uncompressed_size;
+ g->records[g->last].unpadded_sum
+ = compressed_base + unpadded_size;
+
+ // Update the totals.
+ ++s->record_count;
+ s->index_list_size += index_list_size_add;
+
+ i->total_size += vli_ceil4(unpadded_size);
+ i->uncompressed_size += uncompressed_size;
+ ++i->record_count;
+ i->index_list_size += index_list_size_add;
+
+ return LZMA_OK;
+}
+
+
+/// Structure to pass info to index_cat_helper()
+typedef struct {
+ /// Uncompressed size of the destination
+ lzma_vli uncompressed_size;
+
+ /// Compressed file size of the destination
+ lzma_vli file_size;
+
+ /// Same as above but for Block numbers
+ lzma_vli block_number_add;
+
+ /// Number of Streams that were in the destination index before we
+ /// started appending new Streams from the source index. This is
+ /// used to fix the Stream numbering.
+ uint32_t stream_number_add;
+
+ /// Destination index' Stream tree
+ index_tree *streams;
+
+} index_cat_info;
+
+
+/// Add the Stream nodes from the source index to dest using recursion.
+/// Simplest iterative traversal of the source tree wouldn't work, because
+/// we update the pointers in nodes when moving them to the destination tree.
+static void
+index_cat_helper(const index_cat_info *info, index_stream *this)
+{
+ index_stream *left = (index_stream *)(this->node.left);
+ index_stream *right = (index_stream *)(this->node.right);
+
+ if (left != NULL)
+ index_cat_helper(info, left);
+
+ this->node.uncompressed_base += info->uncompressed_size;
+ this->node.compressed_base += info->file_size;
+ this->number += info->stream_number_add;
+ this->block_number_base += info->block_number_add;
+ index_tree_append(info->streams, &this->node);
+
+ if (right != NULL)
+ index_cat_helper(info, right);
+
+ return;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
+ const lzma_allocator *allocator)
+{
+ if (dest == NULL || src == NULL)
+ return LZMA_PROG_ERROR;
+
+ const lzma_vli dest_file_size = lzma_index_file_size(dest);
+
+ // Check that we don't exceed the file size limits.
+ if (dest_file_size + lzma_index_file_size(src) > LZMA_VLI_MAX
+ || dest->uncompressed_size + src->uncompressed_size
+ > LZMA_VLI_MAX)
+ return LZMA_DATA_ERROR;
+
+ // Check that the encoded size of the combined lzma_indexes stays
+ // within limits. In theory, this should be done only if we know
+ // that the user plans to actually combine the Streams and thus
+ // construct a single Index (probably rare). However, exceeding
+ // this limit is quite theoretical, so we do this check always
+ // to simplify things elsewhere.
+ {
+ const lzma_vli dest_size = index_size_unpadded(
+ dest->record_count, dest->index_list_size);
+ const lzma_vli src_size = index_size_unpadded(
+ src->record_count, src->index_list_size);
+ if (vli_ceil4(dest_size + src_size) > LZMA_BACKWARD_SIZE_MAX)
+ return LZMA_DATA_ERROR;
+ }
+
+ // Optimize the last group to minimize memory usage. Allocation has
+ // to be done before modifying dest or src.
+ {
+ index_stream *s = (index_stream *)(dest->streams.rightmost);
+ index_group *g = (index_group *)(s->groups.rightmost);
+ if (g != NULL && g->last + 1 < g->allocated) {
+ assert(g->node.left == NULL);
+ assert(g->node.right == NULL);
+
+ index_group *newg = lzma_alloc(sizeof(index_group)
+ + (g->last + 1)
+ * sizeof(index_record),
+ allocator);
+ if (newg == NULL)
+ return LZMA_MEM_ERROR;
+
+ newg->node = g->node;
+ newg->allocated = g->last + 1;
+ newg->last = g->last;
+ newg->number_base = g->number_base;
+
+ memcpy(newg->records, g->records, newg->allocated
+ * sizeof(index_record));
+
+ if (g->node.parent != NULL) {
+ assert(g->node.parent->right == &g->node);
+ g->node.parent->right = &newg->node;
+ }
+
+ if (s->groups.leftmost == &g->node) {
+ assert(s->groups.root == &g->node);
+ s->groups.leftmost = &newg->node;
+ s->groups.root = &newg->node;
+ }
+
+ assert(s->groups.rightmost == &g->node);
+ s->groups.rightmost = &newg->node;
+
+ lzma_free(g, allocator);
+
+ // NOTE: newg isn't leaked here because
+ // newg == (void *)&newg->node.
+ }
+ }
+
+ // dest->checks includes the check types of all except the last Stream
+ // in dest. Set the bit for the check type of the last Stream now so
+ // that it won't get lost when Stream(s) from src are appended to dest.
+ dest->checks = lzma_index_checks(dest);
+
+ // Add all the Streams from src to dest. Update the base offsets
+ // of each Stream from src.
+ const index_cat_info info = {
+ .uncompressed_size = dest->uncompressed_size,
+ .file_size = dest_file_size,
+ .stream_number_add = dest->streams.count,
+ .block_number_add = dest->record_count,
+ .streams = &dest->streams,
+ };
+ index_cat_helper(&info, (index_stream *)(src->streams.root));
+
+ // Update info about all the combined Streams.
+ dest->uncompressed_size += src->uncompressed_size;
+ dest->total_size += src->total_size;
+ dest->record_count += src->record_count;
+ dest->index_list_size += src->index_list_size;
+ dest->checks |= src->checks;
+
+ // There's nothing else left in src than the base structure.
+ lzma_free(src, allocator);
+
+ return LZMA_OK;
+}
+
+
+/// Duplicate an index_stream.
+static index_stream *
+index_dup_stream(const index_stream *src, const lzma_allocator *allocator)
+{
+ // Catch a somewhat theoretical integer overflow.
+ if (src->record_count > PREALLOC_MAX)
+ return NULL;
+
+ // Allocate and initialize a new Stream.
+ index_stream *dest = index_stream_init(src->node.compressed_base,
+ src->node.uncompressed_base, src->number,
+ src->block_number_base, allocator);
+ if (dest == NULL)
+ return NULL;
+
+ // Copy the overall information.
+ dest->record_count = src->record_count;
+ dest->index_list_size = src->index_list_size;
+ dest->stream_flags = src->stream_flags;
+ dest->stream_padding = src->stream_padding;
+
+ // Return if there are no groups to duplicate.
+ if (src->groups.leftmost == NULL)
+ return dest;
+
+ // Allocate memory for the Records. We put all the Records into
+ // a single group. It's simplest and also tends to make
+ // lzma_index_locate() a little bit faster with very big Indexes.
+ index_group *destg = lzma_alloc(sizeof(index_group)
+ + src->record_count * sizeof(index_record),
+ allocator);
+ if (destg == NULL) {
+ index_stream_end(dest, allocator);
+ return NULL;
+ }
+
+ // Initialize destg.
+ destg->node.uncompressed_base = 0;
+ destg->node.compressed_base = 0;
+ destg->number_base = 1;
+ destg->allocated = src->record_count;
+ destg->last = src->record_count - 1;
+
+ // Go through all the groups in src and copy the Records into destg.
+ const index_group *srcg = (const index_group *)(src->groups.leftmost);
+ size_t i = 0;
+ do {
+ memcpy(destg->records + i, srcg->records,
+ (srcg->last + 1) * sizeof(index_record));
+ i += srcg->last + 1;
+ srcg = index_tree_next(&srcg->node);
+ } while (srcg != NULL);
+
+ assert(i == destg->allocated);
+
+ // Add the group to the new Stream.
+ index_tree_append(&dest->groups, &destg->node);
+
+ return dest;
+}
+
+
+extern LZMA_API(lzma_index *)
+lzma_index_dup(const lzma_index *src, const lzma_allocator *allocator)
+{
+ // Allocate the base structure (no initial Stream).
+ lzma_index *dest = index_init_plain(allocator);
+ if (dest == NULL)
+ return NULL;
+
+ // Copy the totals.
+ dest->uncompressed_size = src->uncompressed_size;
+ dest->total_size = src->total_size;
+ dest->record_count = src->record_count;
+ dest->index_list_size = src->index_list_size;
+
+ // Copy the Streams and the groups in them.
+ const index_stream *srcstream
+ = (const index_stream *)(src->streams.leftmost);
+ do {
+ index_stream *deststream = index_dup_stream(
+ srcstream, allocator);
+ if (deststream == NULL) {
+ lzma_index_end(dest, allocator);
+ return NULL;
+ }
+
+ index_tree_append(&dest->streams, &deststream->node);
+
+ srcstream = index_tree_next(&srcstream->node);
+ } while (srcstream != NULL);
+
+ return dest;
+}
+
+
+/// Indexing for lzma_index_iter.internal[]
+enum {
+ ITER_INDEX,
+ ITER_STREAM,
+ ITER_GROUP,
+ ITER_RECORD,
+ ITER_METHOD,
+};
+
+
+/// Values for lzma_index_iter.internal[ITER_METHOD].s
+enum {
+ ITER_METHOD_NORMAL,
+ ITER_METHOD_NEXT,
+ ITER_METHOD_LEFTMOST,
+};
+
+
+static void
+iter_set_info(lzma_index_iter *iter)
+{
+ const lzma_index *i = iter->internal[ITER_INDEX].p;
+ const index_stream *stream = iter->internal[ITER_STREAM].p;
+ const index_group *group = iter->internal[ITER_GROUP].p;
+ const size_t record = iter->internal[ITER_RECORD].s;
+
+ // lzma_index_iter.internal must not contain a pointer to the last
+ // group in the index, because that may be reallocated by
+ // lzma_index_cat().
+ if (group == NULL) {
+ // There are no groups.
+ assert(stream->groups.root == NULL);
+ iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
+
+ } else if (i->streams.rightmost != &stream->node
+ || stream->groups.rightmost != &group->node) {
+ // The group is not not the last group in the index.
+ iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
+
+ } else if (stream->groups.leftmost != &group->node) {
+ // The group isn't the only group in the Stream, thus we
+ // know that it must have a parent group i.e. it's not
+ // the root node.
+ assert(stream->groups.root != &group->node);
+ assert(group->node.parent->right == &group->node);
+ iter->internal[ITER_METHOD].s = ITER_METHOD_NEXT;
+ iter->internal[ITER_GROUP].p = group->node.parent;
+
+ } else {
+ // The Stream has only one group.
+ assert(stream->groups.root == &group->node);
+ assert(group->node.parent == NULL);
+ iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
+ iter->internal[ITER_GROUP].p = NULL;
+ }
+
+ // NOTE: lzma_index_iter.stream.number is lzma_vli but we use uint32_t
+ // internally.
+ iter->stream.number = stream->number;
+ iter->stream.block_count = stream->record_count;
+ iter->stream.compressed_offset = stream->node.compressed_base;
+ iter->stream.uncompressed_offset = stream->node.uncompressed_base;
+
+ // iter->stream.flags will be NULL if the Stream Flags haven't been
+ // set with lzma_index_stream_flags().
+ iter->stream.flags = stream->stream_flags.version == UINT32_MAX
+ ? NULL : &stream->stream_flags;
+ iter->stream.padding = stream->stream_padding;
+
+ if (stream->groups.rightmost == NULL) {
+ // Stream has no Blocks.
+ iter->stream.compressed_size = index_size(0, 0)
+ + 2 * LZMA_STREAM_HEADER_SIZE;
+ iter->stream.uncompressed_size = 0;
+ } else {
+ const index_group *g = (const index_group *)(
+ stream->groups.rightmost);
+
+ // Stream Header + Stream Footer + Index + Blocks
+ iter->stream.compressed_size = 2 * LZMA_STREAM_HEADER_SIZE
+ + index_size(stream->record_count,
+ stream->index_list_size)
+ + vli_ceil4(g->records[g->last].unpadded_sum);
+ iter->stream.uncompressed_size
+ = g->records[g->last].uncompressed_sum;
+ }
+
+ if (group != NULL) {
+ iter->block.number_in_stream = group->number_base + record;
+ iter->block.number_in_file = iter->block.number_in_stream
+ + stream->block_number_base;
+
+ iter->block.compressed_stream_offset
+ = record == 0 ? group->node.compressed_base
+ : vli_ceil4(group->records[
+ record - 1].unpadded_sum);
+ iter->block.uncompressed_stream_offset
+ = record == 0 ? group->node.uncompressed_base
+ : group->records[record - 1].uncompressed_sum;
+
+ iter->block.uncompressed_size
+ = group->records[record].uncompressed_sum
+ - iter->block.uncompressed_stream_offset;
+ iter->block.unpadded_size
+ = group->records[record].unpadded_sum
+ - iter->block.compressed_stream_offset;
+ iter->block.total_size = vli_ceil4(iter->block.unpadded_size);
+
+ iter->block.compressed_stream_offset
+ += LZMA_STREAM_HEADER_SIZE;
+
+ iter->block.compressed_file_offset
+ = iter->block.compressed_stream_offset
+ + iter->stream.compressed_offset;
+ iter->block.uncompressed_file_offset
+ = iter->block.uncompressed_stream_offset
+ + iter->stream.uncompressed_offset;
+ }
+
+ return;
+}
+
+
+extern LZMA_API(void)
+lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i)
+{
+ iter->internal[ITER_INDEX].p = i;
+ lzma_index_iter_rewind(iter);
+ return;
+}
+
+
+extern LZMA_API(void)
+lzma_index_iter_rewind(lzma_index_iter *iter)
+{
+ iter->internal[ITER_STREAM].p = NULL;
+ iter->internal[ITER_GROUP].p = NULL;
+ iter->internal[ITER_RECORD].s = 0;
+ iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
+ return;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
+{
+ // Catch unsupported mode values.
+ if ((unsigned int)(mode) > LZMA_INDEX_ITER_NONEMPTY_BLOCK)
+ return true;
+
+ const lzma_index *i = iter->internal[ITER_INDEX].p;
+ const index_stream *stream = iter->internal[ITER_STREAM].p;
+ const index_group *group = NULL;
+ size_t record = iter->internal[ITER_RECORD].s;
+
+ // If we are being asked for the next Stream, leave group to NULL
+ // so that the rest of the this function thinks that this Stream
+ // has no groups and will thus go to the next Stream.
+ if (mode != LZMA_INDEX_ITER_STREAM) {
+ // Get the pointer to the current group. See iter_set_inf()
+ // for explanation.
+ switch (iter->internal[ITER_METHOD].s) {
+ case ITER_METHOD_NORMAL:
+ group = iter->internal[ITER_GROUP].p;
+ break;
+
+ case ITER_METHOD_NEXT:
+ group = index_tree_next(iter->internal[ITER_GROUP].p);
+ break;
+
+ case ITER_METHOD_LEFTMOST:
+ group = (const index_group *)(
+ stream->groups.leftmost);
+ break;
+ }
+ }
+
+again:
+ if (stream == NULL) {
+ // We at the beginning of the lzma_index.
+ // Locate the first Stream.
+ stream = (const index_stream *)(i->streams.leftmost);
+ if (mode >= LZMA_INDEX_ITER_BLOCK) {
+ // Since we are being asked to return information
+ // about the first a Block, skip Streams that have
+ // no Blocks.
+ while (stream->groups.leftmost == NULL) {
+ stream = index_tree_next(&stream->node);
+ if (stream == NULL)
+ return true;
+ }
+ }
+
+ // Start from the first Record in the Stream.
+ group = (const index_group *)(stream->groups.leftmost);
+ record = 0;
+
+ } else if (group != NULL && record < group->last) {
+ // The next Record is in the same group.
+ ++record;
+
+ } else {
+ // This group has no more Records or this Stream has
+ // no Blocks at all.
+ record = 0;
+
+ // If group is not NULL, this Stream has at least one Block
+ // and thus at least one group. Find the next group.
+ if (group != NULL)
+ group = index_tree_next(&group->node);
+
+ if (group == NULL) {
+ // This Stream has no more Records. Find the next
+ // Stream. If we are being asked to return information
+ // about a Block, we skip empty Streams.
+ do {
+ stream = index_tree_next(&stream->node);
+ if (stream == NULL)
+ return true;
+ } while (mode >= LZMA_INDEX_ITER_BLOCK
+ && stream->groups.leftmost == NULL);
+
+ group = (const index_group *)(
+ stream->groups.leftmost);
+ }
+ }
+
+ if (mode == LZMA_INDEX_ITER_NONEMPTY_BLOCK) {
+ // We need to look for the next Block again if this Block
+ // is empty.
+ if (record == 0) {
+ if (group->node.uncompressed_base
+ == group->records[0].uncompressed_sum)
+ goto again;
+ } else if (group->records[record - 1].uncompressed_sum
+ == group->records[record].uncompressed_sum) {
+ goto again;
+ }
+ }
+
+ iter->internal[ITER_STREAM].p = stream;
+ iter->internal[ITER_GROUP].p = group;
+ iter->internal[ITER_RECORD].s = record;
+
+ iter_set_info(iter);
+
+ return false;
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target)
+{
+ const lzma_index *i = iter->internal[ITER_INDEX].p;
+
+ // If the target is past the end of the file, return immediately.
+ if (i->uncompressed_size <= target)
+ return true;
+
+ // Locate the Stream containing the target offset.
+ const index_stream *stream = index_tree_locate(&i->streams, target);
+ assert(stream != NULL);
+ target -= stream->node.uncompressed_base;
+
+ // Locate the group containing the target offset.
+ const index_group *group = index_tree_locate(&stream->groups, target);
+ assert(group != NULL);
+
+ // Use binary search to locate the exact Record. It is the first
+ // Record whose uncompressed_sum is greater than target.
+ // This is because we want the rightmost Record that fulfills the
+ // search criterion. It is possible that there are empty Blocks;
+ // we don't want to return them.
+ size_t left = 0;
+ size_t right = group->last;
+
+ while (left < right) {
+ const size_t pos = left + (right - left) / 2;
+ if (group->records[pos].uncompressed_sum <= target)
+ left = pos + 1;
+ else
+ right = pos;
+ }
+
+ iter->internal[ITER_STREAM].p = stream;
+ iter->internal[ITER_GROUP].p = group;
+ iter->internal[ITER_RECORD].s = left;
+
+ iter_set_info(iter);
+
+ return false;
+}
diff --git a/src/liblzma/common/index.h b/src/liblzma/common/index.h
new file mode 100644
index 0000000..7b27d70
--- /dev/null
+++ b/src/liblzma/common/index.h
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index.h
+/// \brief Handling of Index
+/// \note This header file does not include common.h or lzma.h because
+/// this file is needed by both liblzma internally and by the
+/// tests. Including common.h will include and define many things
+/// the tests do not need and prevents issues with header file
+/// include order. This way, if lzma.h or common.h are not
+/// included before this file it will break on every OS instead
+/// of causing more subtle errors.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_INDEX_H
+#define LZMA_INDEX_H
+
+
+/// Minimum Unpadded Size
+#define UNPADDED_SIZE_MIN LZMA_VLI_C(5)
+
+/// Maximum Unpadded Size
+#define UNPADDED_SIZE_MAX (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
+
+/// Index Indicator based on xz specification
+#define INDEX_INDICATOR 0
+
+
+/// Get the size of the Index Padding field. This is needed by Index encoder
+/// and decoder, but applications should have no use for this.
+extern uint32_t lzma_index_padding_size(const lzma_index *i);
+
+
+/// Set for how many Records to allocate memory the next time
+/// lzma_index_append() needs to allocate space for a new Record.
+/// This is used only by the Index decoder.
+extern void lzma_index_prealloc(lzma_index *i, lzma_vli records);
+
+
+/// Round the variable-length integer to the next multiple of four.
+static inline lzma_vli
+vli_ceil4(lzma_vli vli)
+{
+ assert(vli <= UNPADDED_SIZE_MAX);
+ return (vli + 3) & ~LZMA_VLI_C(3);
+}
+
+
+/// Calculate the size of the Index field excluding Index Padding
+static inline lzma_vli
+index_size_unpadded(lzma_vli count, lzma_vli index_list_size)
+{
+ // Index Indicator + Number of Records + List of Records + CRC32
+ return 1 + lzma_vli_size(count) + index_list_size + 4;
+}
+
+
+/// Calculate the size of the Index field including Index Padding
+static inline lzma_vli
+index_size(lzma_vli count, lzma_vli index_list_size)
+{
+ return vli_ceil4(index_size_unpadded(count, index_list_size));
+}
+
+
+/// Calculate the total size of the Stream
+static inline lzma_vli
+index_stream_size(lzma_vli blocks_size,
+ lzma_vli count, lzma_vli index_list_size)
+{
+ return LZMA_STREAM_HEADER_SIZE + blocks_size
+ + index_size(count, index_list_size)
+ + LZMA_STREAM_HEADER_SIZE;
+}
+
+#endif
diff --git a/src/liblzma/common/index_decoder.c b/src/liblzma/common/index_decoder.c
new file mode 100644
index 0000000..19a31b3
--- /dev/null
+++ b/src/liblzma/common/index_decoder.c
@@ -0,0 +1,362 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index_decoder.c
+/// \brief Decodes the Index field
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "index_decoder.h"
+#include "check.h"
+
+
+typedef struct {
+ enum {
+ SEQ_INDICATOR,
+ SEQ_COUNT,
+ SEQ_MEMUSAGE,
+ SEQ_UNPADDED,
+ SEQ_UNCOMPRESSED,
+ SEQ_PADDING_INIT,
+ SEQ_PADDING,
+ SEQ_CRC32,
+ } sequence;
+
+ /// Memory usage limit
+ uint64_t memlimit;
+
+ /// Target Index
+ lzma_index *index;
+
+ /// Pointer give by the application, which is set after
+ /// successful decoding.
+ lzma_index **index_ptr;
+
+ /// Number of Records left to decode.
+ lzma_vli count;
+
+ /// The most recent Unpadded Size field
+ lzma_vli unpadded_size;
+
+ /// The most recent Uncompressed Size field
+ lzma_vli uncompressed_size;
+
+ /// Position in integers
+ size_t pos;
+
+ /// CRC32 of the List of Records field
+ uint32_t crc32;
+} lzma_index_coder;
+
+
+static lzma_ret
+index_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size,
+ uint8_t *restrict out lzma_attribute((__unused__)),
+ size_t *restrict out_pos lzma_attribute((__unused__)),
+ size_t out_size lzma_attribute((__unused__)),
+ lzma_action action lzma_attribute((__unused__)))
+{
+ lzma_index_coder *coder = coder_ptr;
+
+ // Similar optimization as in index_encoder.c
+ const size_t in_start = *in_pos;
+ lzma_ret ret = LZMA_OK;
+
+ while (*in_pos < in_size)
+ switch (coder->sequence) {
+ case SEQ_INDICATOR:
+ // Return LZMA_DATA_ERROR instead of e.g. LZMA_PROG_ERROR or
+ // LZMA_FORMAT_ERROR, because a typical usage case for Index
+ // decoder is when parsing the Stream backwards. If seeking
+ // backward from the Stream Footer gives us something that
+ // doesn't begin with Index Indicator, the file is considered
+ // corrupt, not "programming error" or "unrecognized file
+ // format". One could argue that the application should
+ // verify the Index Indicator before trying to decode the
+ // Index, but well, I suppose it is simpler this way.
+ if (in[(*in_pos)++] != INDEX_INDICATOR)
+ return LZMA_DATA_ERROR;
+
+ coder->sequence = SEQ_COUNT;
+ break;
+
+ case SEQ_COUNT:
+ ret = lzma_vli_decode(&coder->count, &coder->pos,
+ in, in_pos, in_size);
+ if (ret != LZMA_STREAM_END)
+ goto out;
+
+ coder->pos = 0;
+ coder->sequence = SEQ_MEMUSAGE;
+
+ // Fall through
+
+ case SEQ_MEMUSAGE:
+ if (lzma_index_memusage(1, coder->count) > coder->memlimit) {
+ ret = LZMA_MEMLIMIT_ERROR;
+ goto out;
+ }
+
+ // Tell the Index handling code how many Records this
+ // Index has to allow it to allocate memory more efficiently.
+ lzma_index_prealloc(coder->index, coder->count);
+
+ ret = LZMA_OK;
+ coder->sequence = coder->count == 0
+ ? SEQ_PADDING_INIT : SEQ_UNPADDED;
+ break;
+
+ case SEQ_UNPADDED:
+ case SEQ_UNCOMPRESSED: {
+ lzma_vli *size = coder->sequence == SEQ_UNPADDED
+ ? &coder->unpadded_size
+ : &coder->uncompressed_size;
+
+ ret = lzma_vli_decode(size, &coder->pos,
+ in, in_pos, in_size);
+ if (ret != LZMA_STREAM_END)
+ goto out;
+
+ ret = LZMA_OK;
+ coder->pos = 0;
+
+ if (coder->sequence == SEQ_UNPADDED) {
+ // Validate that encoded Unpadded Size isn't too small
+ // or too big.
+ if (coder->unpadded_size < UNPADDED_SIZE_MIN
+ || coder->unpadded_size
+ > UNPADDED_SIZE_MAX)
+ return LZMA_DATA_ERROR;
+
+ coder->sequence = SEQ_UNCOMPRESSED;
+ } else {
+ // Add the decoded Record to the Index.
+ return_if_error(lzma_index_append(
+ coder->index, allocator,
+ coder->unpadded_size,
+ coder->uncompressed_size));
+
+ // Check if this was the last Record.
+ coder->sequence = --coder->count == 0
+ ? SEQ_PADDING_INIT
+ : SEQ_UNPADDED;
+ }
+
+ break;
+ }
+
+ case SEQ_PADDING_INIT:
+ coder->pos = lzma_index_padding_size(coder->index);
+ coder->sequence = SEQ_PADDING;
+
+ // Fall through
+
+ case SEQ_PADDING:
+ if (coder->pos > 0) {
+ --coder->pos;
+ if (in[(*in_pos)++] != 0x00)
+ return LZMA_DATA_ERROR;
+
+ break;
+ }
+
+ // Finish the CRC32 calculation.
+ coder->crc32 = lzma_crc32(in + in_start,
+ *in_pos - in_start, coder->crc32);
+
+ coder->sequence = SEQ_CRC32;
+
+ // Fall through
+
+ case SEQ_CRC32:
+ do {
+ if (*in_pos == in_size)
+ return LZMA_OK;
+
+ if (((coder->crc32 >> (coder->pos * 8)) & 0xFF)
+ != in[(*in_pos)++]) {
+#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+ return LZMA_DATA_ERROR;
+#endif
+ }
+
+ } while (++coder->pos < 4);
+
+ // Decoding was successful, now we can let the application
+ // see the decoded Index.
+ *coder->index_ptr = coder->index;
+
+ // Make index NULL so we don't free it unintentionally.
+ coder->index = NULL;
+
+ return LZMA_STREAM_END;
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+out:
+ // Update the CRC32.
+ //
+ // Avoid null pointer + 0 (undefined behavior) in "in + in_start".
+ // In such a case we had no input and thus in_used == 0.
+ {
+ const size_t in_used = *in_pos - in_start;
+ if (in_used > 0)
+ coder->crc32 = lzma_crc32(in + in_start,
+ in_used, coder->crc32);
+ }
+
+ return ret;
+}
+
+
+static void
+index_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_index_coder *coder = coder_ptr;
+ lzma_index_end(coder->index, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+index_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+ lzma_index_coder *coder = coder_ptr;
+
+ *memusage = lzma_index_memusage(1, coder->count);
+ *old_memlimit = coder->memlimit;
+
+ if (new_memlimit != 0) {
+ if (new_memlimit < *memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ coder->memlimit = new_memlimit;
+ }
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
+index_decoder_reset(lzma_index_coder *coder, const lzma_allocator *allocator,
+ lzma_index **i, uint64_t memlimit)
+{
+ // Remember the pointer given by the application. We will set it
+ // to point to the decoded Index only if decoding is successful.
+ // Before that, keep it NULL so that applications can always safely
+ // pass it to lzma_index_end() no matter did decoding succeed or not.
+ coder->index_ptr = i;
+ *i = NULL;
+
+ // We always allocate a new lzma_index.
+ coder->index = lzma_index_init(allocator);
+ if (coder->index == NULL)
+ return LZMA_MEM_ERROR;
+
+ // Initialize the rest.
+ coder->sequence = SEQ_INDICATOR;
+ coder->memlimit = my_max(1, memlimit);
+ coder->count = 0; // Needs to be initialized due to _memconfig().
+ coder->pos = 0;
+ coder->crc32 = 0;
+
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_index_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ lzma_index **i, uint64_t memlimit)
+{
+ lzma_next_coder_init(&lzma_index_decoder_init, next, allocator);
+
+ if (i == NULL)
+ return LZMA_PROG_ERROR;
+
+ lzma_index_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_index_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &index_decode;
+ next->end = &index_decoder_end;
+ next->memconfig = &index_decoder_memconfig;
+ coder->index = NULL;
+ } else {
+ lzma_index_end(coder->index, allocator);
+ }
+
+ return index_decoder_reset(coder, allocator, i, memlimit);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
+{
+ lzma_next_strm_init(lzma_index_decoder_init, strm, i, memlimit);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_buffer_decode(lzma_index **i, uint64_t *memlimit,
+ const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size)
+{
+ // Sanity checks
+ if (i == NULL || memlimit == NULL
+ || in == NULL || in_pos == NULL || *in_pos > in_size)
+ return LZMA_PROG_ERROR;
+
+ // Initialize the decoder.
+ lzma_index_coder coder;
+ return_if_error(index_decoder_reset(&coder, allocator, i, *memlimit));
+
+ // Store the input start position so that we can restore it in case
+ // of an error.
+ const size_t in_start = *in_pos;
+
+ // Do the actual decoding.
+ lzma_ret ret = index_decode(&coder, allocator, in, in_pos, in_size,
+ NULL, NULL, 0, LZMA_RUN);
+
+ if (ret == LZMA_STREAM_END) {
+ ret = LZMA_OK;
+ } else {
+ // Something went wrong, free the Index structure and restore
+ // the input position.
+ lzma_index_end(coder.index, allocator);
+ *in_pos = in_start;
+
+ if (ret == LZMA_OK) {
+ // The input is truncated or otherwise corrupt.
+ // Use LZMA_DATA_ERROR instead of LZMA_BUF_ERROR
+ // like lzma_vli_decode() does in single-call mode.
+ ret = LZMA_DATA_ERROR;
+
+ } else if (ret == LZMA_MEMLIMIT_ERROR) {
+ // Tell the caller how much memory would have
+ // been needed.
+ *memlimit = lzma_index_memusage(1, coder.count);
+ }
+ }
+
+ return ret;
+}
diff --git a/src/liblzma/common/index_decoder.h b/src/liblzma/common/index_decoder.h
new file mode 100644
index 0000000..3fec483
--- /dev/null
+++ b/src/liblzma/common/index_decoder.h
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index_decoder.h
+/// \brief Decodes the Index field
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_INDEX_DECODER_H
+#define LZMA_INDEX_DECODER_H
+
+#include "common.h"
+#include "index.h"
+
+
+extern lzma_ret lzma_index_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ lzma_index **i, uint64_t memlimit);
+
+
+#endif
diff --git a/src/liblzma/common/index_encoder.c b/src/liblzma/common/index_encoder.c
new file mode 100644
index 0000000..204490c
--- /dev/null
+++ b/src/liblzma/common/index_encoder.c
@@ -0,0 +1,263 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index_encoder.c
+/// \brief Encodes the Index field
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "index_encoder.h"
+#include "index.h"
+#include "check.h"
+
+
+typedef struct {
+ enum {
+ SEQ_INDICATOR,
+ SEQ_COUNT,
+ SEQ_UNPADDED,
+ SEQ_UNCOMPRESSED,
+ SEQ_NEXT,
+ SEQ_PADDING,
+ SEQ_CRC32,
+ } sequence;
+
+ /// Index being encoded
+ const lzma_index *index;
+
+ /// Iterator for the Index being encoded
+ lzma_index_iter iter;
+
+ /// Position in integers
+ size_t pos;
+
+ /// CRC32 of the List of Records field
+ uint32_t crc32;
+} lzma_index_coder;
+
+
+static lzma_ret
+index_encode(void *coder_ptr,
+ const lzma_allocator *allocator lzma_attribute((__unused__)),
+ const uint8_t *restrict in lzma_attribute((__unused__)),
+ size_t *restrict in_pos lzma_attribute((__unused__)),
+ size_t in_size lzma_attribute((__unused__)),
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size,
+ lzma_action action lzma_attribute((__unused__)))
+{
+ lzma_index_coder *coder = coder_ptr;
+
+ // Position where to start calculating CRC32. The idea is that we
+ // need to call lzma_crc32() only once per call to index_encode().
+ const size_t out_start = *out_pos;
+
+ // Return value to use if we return at the end of this function.
+ // We use "goto out" to jump out of the while-switch construct
+ // instead of returning directly, because that way we don't need
+ // to copypaste the lzma_crc32() call to many places.
+ lzma_ret ret = LZMA_OK;
+
+ while (*out_pos < out_size)
+ switch (coder->sequence) {
+ case SEQ_INDICATOR:
+ out[*out_pos] = INDEX_INDICATOR;
+ ++*out_pos;
+ coder->sequence = SEQ_COUNT;
+ break;
+
+ case SEQ_COUNT: {
+ const lzma_vli count = lzma_index_block_count(coder->index);
+ ret = lzma_vli_encode(count, &coder->pos,
+ out, out_pos, out_size);
+ if (ret != LZMA_STREAM_END)
+ goto out;
+
+ ret = LZMA_OK;
+ coder->pos = 0;
+ coder->sequence = SEQ_NEXT;
+ break;
+ }
+
+ case SEQ_NEXT:
+ if (lzma_index_iter_next(
+ &coder->iter, LZMA_INDEX_ITER_BLOCK)) {
+ // Get the size of the Index Padding field.
+ coder->pos = lzma_index_padding_size(coder->index);
+ assert(coder->pos <= 3);
+ coder->sequence = SEQ_PADDING;
+ break;
+ }
+
+ coder->sequence = SEQ_UNPADDED;
+
+ // Fall through
+
+ case SEQ_UNPADDED:
+ case SEQ_UNCOMPRESSED: {
+ const lzma_vli size = coder->sequence == SEQ_UNPADDED
+ ? coder->iter.block.unpadded_size
+ : coder->iter.block.uncompressed_size;
+
+ ret = lzma_vli_encode(size, &coder->pos,
+ out, out_pos, out_size);
+ if (ret != LZMA_STREAM_END)
+ goto out;
+
+ ret = LZMA_OK;
+ coder->pos = 0;
+
+ // Advance to SEQ_UNCOMPRESSED or SEQ_NEXT.
+ ++coder->sequence;
+ break;
+ }
+
+ case SEQ_PADDING:
+ if (coder->pos > 0) {
+ --coder->pos;
+ out[(*out_pos)++] = 0x00;
+ break;
+ }
+
+ // Finish the CRC32 calculation.
+ coder->crc32 = lzma_crc32(out + out_start,
+ *out_pos - out_start, coder->crc32);
+
+ coder->sequence = SEQ_CRC32;
+
+ // Fall through
+
+ case SEQ_CRC32:
+ // We don't use the main loop, because we don't want
+ // coder->crc32 to be touched anymore.
+ do {
+ if (*out_pos == out_size)
+ return LZMA_OK;
+
+ out[*out_pos] = (coder->crc32 >> (coder->pos * 8))
+ & 0xFF;
+ ++*out_pos;
+
+ } while (++coder->pos < 4);
+
+ return LZMA_STREAM_END;
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+out:
+ // Update the CRC32.
+ //
+ // Avoid null pointer + 0 (undefined behavior) in "out + out_start".
+ // In such a case we had no input and thus out_used == 0.
+ {
+ const size_t out_used = *out_pos - out_start;
+ if (out_used > 0)
+ coder->crc32 = lzma_crc32(out + out_start,
+ out_used, coder->crc32);
+ }
+
+ return ret;
+}
+
+
+static void
+index_encoder_end(void *coder, const lzma_allocator *allocator)
+{
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static void
+index_encoder_reset(lzma_index_coder *coder, const lzma_index *i)
+{
+ lzma_index_iter_init(&coder->iter, i);
+
+ coder->sequence = SEQ_INDICATOR;
+ coder->index = i;
+ coder->pos = 0;
+ coder->crc32 = 0;
+
+ return;
+}
+
+
+extern lzma_ret
+lzma_index_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_index *i)
+{
+ lzma_next_coder_init(&lzma_index_encoder_init, next, allocator);
+
+ if (i == NULL)
+ return LZMA_PROG_ERROR;
+
+ if (next->coder == NULL) {
+ next->coder = lzma_alloc(sizeof(lzma_index_coder), allocator);
+ if (next->coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->code = &index_encode;
+ next->end = &index_encoder_end;
+ }
+
+ index_encoder_reset(next->coder, i);
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
+{
+ lzma_next_strm_init(lzma_index_encoder_init, strm, i);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_buffer_encode(const lzma_index *i,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // Validate the arguments.
+ if (i == NULL || out == NULL || out_pos == NULL || *out_pos > out_size)
+ return LZMA_PROG_ERROR;
+
+ // Don't try to encode if there's not enough output space.
+ if (out_size - *out_pos < lzma_index_size(i))
+ return LZMA_BUF_ERROR;
+
+ // The Index encoder needs just one small data structure so we can
+ // allocate it on stack.
+ lzma_index_coder coder;
+ index_encoder_reset(&coder, i);
+
+ // Do the actual encoding. This should never fail, but store
+ // the original *out_pos just in case.
+ const size_t out_start = *out_pos;
+ lzma_ret ret = index_encode(&coder, NULL, NULL, NULL, 0,
+ out, out_pos, out_size, LZMA_RUN);
+
+ if (ret == LZMA_STREAM_END) {
+ ret = LZMA_OK;
+ } else {
+ // We should never get here, but just in case, restore the
+ // output position and set the error accordingly if something
+ // goes wrong and debugging isn't enabled.
+ assert(0);
+ *out_pos = out_start;
+ ret = LZMA_PROG_ERROR;
+ }
+
+ return ret;
+}
diff --git a/src/liblzma/common/index_encoder.h b/src/liblzma/common/index_encoder.h
new file mode 100644
index 0000000..4d55cd1
--- /dev/null
+++ b/src/liblzma/common/index_encoder.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index_encoder.h
+/// \brief Encodes the Index field
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_INDEX_ENCODER_H
+#define LZMA_INDEX_ENCODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_index_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator, const lzma_index *i);
+
+
+#endif
diff --git a/src/liblzma/common/index_hash.c b/src/liblzma/common/index_hash.c
new file mode 100644
index 0000000..52c3d65
--- /dev/null
+++ b/src/liblzma/common/index_hash.c
@@ -0,0 +1,343 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file index_hash.c
+/// \brief Validates Index by using a hash function
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "index.h"
+#include "check.h"
+
+
+typedef struct {
+ /// Sum of the Block sizes (including Block Padding)
+ lzma_vli blocks_size;
+
+ /// Sum of the Uncompressed Size fields
+ lzma_vli uncompressed_size;
+
+ /// Number of Records
+ lzma_vli count;
+
+ /// Size of the List of Index Records as bytes
+ lzma_vli index_list_size;
+
+ /// Check calculated from Unpadded Sizes and Uncompressed Sizes.
+ lzma_check_state check;
+
+} lzma_index_hash_info;
+
+
+struct lzma_index_hash_s {
+ enum {
+ SEQ_BLOCK,
+ SEQ_COUNT,
+ SEQ_UNPADDED,
+ SEQ_UNCOMPRESSED,
+ SEQ_PADDING_INIT,
+ SEQ_PADDING,
+ SEQ_CRC32,
+ } sequence;
+
+ /// Information collected while decoding the actual Blocks.
+ lzma_index_hash_info blocks;
+
+ /// Information collected from the Index field.
+ lzma_index_hash_info records;
+
+ /// Number of Records not fully decoded
+ lzma_vli remaining;
+
+ /// Unpadded Size currently being read from an Index Record.
+ lzma_vli unpadded_size;
+
+ /// Uncompressed Size currently being read from an Index Record.
+ lzma_vli uncompressed_size;
+
+ /// Position in variable-length integers when decoding them from
+ /// the List of Records.
+ size_t pos;
+
+ /// CRC32 of the Index
+ uint32_t crc32;
+};
+
+
+extern LZMA_API(lzma_index_hash *)
+lzma_index_hash_init(lzma_index_hash *index_hash,
+ const lzma_allocator *allocator)
+{
+ if (index_hash == NULL) {
+ index_hash = lzma_alloc(sizeof(lzma_index_hash), allocator);
+ if (index_hash == NULL)
+ return NULL;
+ }
+
+ index_hash->sequence = SEQ_BLOCK;
+ index_hash->blocks.blocks_size = 0;
+ index_hash->blocks.uncompressed_size = 0;
+ index_hash->blocks.count = 0;
+ index_hash->blocks.index_list_size = 0;
+ index_hash->records.blocks_size = 0;
+ index_hash->records.uncompressed_size = 0;
+ index_hash->records.count = 0;
+ index_hash->records.index_list_size = 0;
+ index_hash->unpadded_size = 0;
+ index_hash->uncompressed_size = 0;
+ index_hash->pos = 0;
+ index_hash->crc32 = 0;
+
+ // These cannot fail because LZMA_CHECK_BEST is known to be supported.
+ (void)lzma_check_init(&index_hash->blocks.check, LZMA_CHECK_BEST);
+ (void)lzma_check_init(&index_hash->records.check, LZMA_CHECK_BEST);
+
+ return index_hash;
+}
+
+
+extern LZMA_API(void)
+lzma_index_hash_end(lzma_index_hash *index_hash,
+ const lzma_allocator *allocator)
+{
+ lzma_free(index_hash, allocator);
+ return;
+}
+
+
+extern LZMA_API(lzma_vli)
+lzma_index_hash_size(const lzma_index_hash *index_hash)
+{
+ // Get the size of the Index from ->blocks instead of ->records for
+ // cases where application wants to know the Index Size before
+ // decoding the Index.
+ return index_size(index_hash->blocks.count,
+ index_hash->blocks.index_list_size);
+}
+
+
+/// Updates the sizes and the hash without any validation.
+static void
+hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
+ lzma_vli uncompressed_size)
+{
+ info->blocks_size += vli_ceil4(unpadded_size);
+ info->uncompressed_size += uncompressed_size;
+ info->index_list_size += lzma_vli_size(unpadded_size)
+ + lzma_vli_size(uncompressed_size);
+ ++info->count;
+
+ const lzma_vli sizes[2] = { unpadded_size, uncompressed_size };
+ lzma_check_update(&info->check, LZMA_CHECK_BEST,
+ (const uint8_t *)(sizes), sizeof(sizes));
+
+ return;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
+ lzma_vli uncompressed_size)
+{
+ // Validate the arguments.
+ if (index_hash == NULL || index_hash->sequence != SEQ_BLOCK
+ || unpadded_size < UNPADDED_SIZE_MIN
+ || unpadded_size > UNPADDED_SIZE_MAX
+ || uncompressed_size > LZMA_VLI_MAX)
+ return LZMA_PROG_ERROR;
+
+ // Update the hash.
+ hash_append(&index_hash->blocks, unpadded_size, uncompressed_size);
+
+ // Validate the properties of *info are still in allowed limits.
+ if (index_hash->blocks.blocks_size > LZMA_VLI_MAX
+ || index_hash->blocks.uncompressed_size > LZMA_VLI_MAX
+ || index_size(index_hash->blocks.count,
+ index_hash->blocks.index_list_size)
+ > LZMA_BACKWARD_SIZE_MAX
+ || index_stream_size(index_hash->blocks.blocks_size,
+ index_hash->blocks.count,
+ index_hash->blocks.index_list_size)
+ > LZMA_VLI_MAX)
+ return LZMA_DATA_ERROR;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in,
+ size_t *in_pos, size_t in_size)
+{
+ // Catch zero input buffer here, because in contrast to Index encoder
+ // and decoder functions, applications call this function directly
+ // instead of via lzma_code(), which does the buffer checking.
+ if (*in_pos >= in_size)
+ return LZMA_BUF_ERROR;
+
+ // NOTE: This function has many similarities to index_encode() and
+ // index_decode() functions found from index_encoder.c and
+ // index_decoder.c. See the comments especially in index_encoder.c.
+ const size_t in_start = *in_pos;
+ lzma_ret ret = LZMA_OK;
+
+ while (*in_pos < in_size)
+ switch (index_hash->sequence) {
+ case SEQ_BLOCK:
+ // Check the Index Indicator is present.
+ if (in[(*in_pos)++] != INDEX_INDICATOR)
+ return LZMA_DATA_ERROR;
+
+ index_hash->sequence = SEQ_COUNT;
+ break;
+
+ case SEQ_COUNT: {
+ ret = lzma_vli_decode(&index_hash->remaining,
+ &index_hash->pos, in, in_pos, in_size);
+ if (ret != LZMA_STREAM_END)
+ goto out;
+
+ // The count must match the count of the Blocks decoded.
+ if (index_hash->remaining != index_hash->blocks.count)
+ return LZMA_DATA_ERROR;
+
+ ret = LZMA_OK;
+ index_hash->pos = 0;
+
+ // Handle the special case when there are no Blocks.
+ index_hash->sequence = index_hash->remaining == 0
+ ? SEQ_PADDING_INIT : SEQ_UNPADDED;
+ break;
+ }
+
+ case SEQ_UNPADDED:
+ case SEQ_UNCOMPRESSED: {
+ lzma_vli *size = index_hash->sequence == SEQ_UNPADDED
+ ? &index_hash->unpadded_size
+ : &index_hash->uncompressed_size;
+
+ ret = lzma_vli_decode(size, &index_hash->pos,
+ in, in_pos, in_size);
+ if (ret != LZMA_STREAM_END)
+ goto out;
+
+ ret = LZMA_OK;
+ index_hash->pos = 0;
+
+ if (index_hash->sequence == SEQ_UNPADDED) {
+ if (index_hash->unpadded_size < UNPADDED_SIZE_MIN
+ || index_hash->unpadded_size
+ > UNPADDED_SIZE_MAX)
+ return LZMA_DATA_ERROR;
+
+ index_hash->sequence = SEQ_UNCOMPRESSED;
+ } else {
+ // Update the hash.
+ hash_append(&index_hash->records,
+ index_hash->unpadded_size,
+ index_hash->uncompressed_size);
+
+ // Verify that we don't go over the known sizes. Note
+ // that this validation is simpler than the one used
+ // in lzma_index_hash_append(), because here we know
+ // that values in index_hash->blocks are already
+ // validated and we are fine as long as we don't
+ // exceed them in index_hash->records.
+ if (index_hash->blocks.blocks_size
+ < index_hash->records.blocks_size
+ || index_hash->blocks.uncompressed_size
+ < index_hash->records.uncompressed_size
+ || index_hash->blocks.index_list_size
+ < index_hash->records.index_list_size)
+ return LZMA_DATA_ERROR;
+
+ // Check if this was the last Record.
+ index_hash->sequence = --index_hash->remaining == 0
+ ? SEQ_PADDING_INIT : SEQ_UNPADDED;
+ }
+
+ break;
+ }
+
+ case SEQ_PADDING_INIT:
+ index_hash->pos = (LZMA_VLI_C(4) - index_size_unpadded(
+ index_hash->records.count,
+ index_hash->records.index_list_size)) & 3;
+ index_hash->sequence = SEQ_PADDING;
+
+ // Fall through
+
+ case SEQ_PADDING:
+ if (index_hash->pos > 0) {
+ --index_hash->pos;
+ if (in[(*in_pos)++] != 0x00)
+ return LZMA_DATA_ERROR;
+
+ break;
+ }
+
+ // Compare the sizes.
+ if (index_hash->blocks.blocks_size
+ != index_hash->records.blocks_size
+ || index_hash->blocks.uncompressed_size
+ != index_hash->records.uncompressed_size
+ || index_hash->blocks.index_list_size
+ != index_hash->records.index_list_size)
+ return LZMA_DATA_ERROR;
+
+ // Finish the hashes and compare them.
+ lzma_check_finish(&index_hash->blocks.check, LZMA_CHECK_BEST);
+ lzma_check_finish(&index_hash->records.check, LZMA_CHECK_BEST);
+ if (memcmp(index_hash->blocks.check.buffer.u8,
+ index_hash->records.check.buffer.u8,
+ lzma_check_size(LZMA_CHECK_BEST)) != 0)
+ return LZMA_DATA_ERROR;
+
+ // Finish the CRC32 calculation.
+ index_hash->crc32 = lzma_crc32(in + in_start,
+ *in_pos - in_start, index_hash->crc32);
+
+ index_hash->sequence = SEQ_CRC32;
+
+ // Fall through
+
+ case SEQ_CRC32:
+ do {
+ if (*in_pos == in_size)
+ return LZMA_OK;
+
+ if (((index_hash->crc32 >> (index_hash->pos * 8))
+ & 0xFF) != in[(*in_pos)++]) {
+#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+ return LZMA_DATA_ERROR;
+#endif
+ }
+
+ } while (++index_hash->pos < 4);
+
+ return LZMA_STREAM_END;
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+out:
+ // Update the CRC32.
+ //
+ // Avoid null pointer + 0 (undefined behavior) in "in + in_start".
+ // In such a case we had no input and thus in_used == 0.
+ {
+ const size_t in_used = *in_pos - in_start;
+ if (in_used > 0)
+ index_hash->crc32 = lzma_crc32(in + in_start,
+ in_used, index_hash->crc32);
+ }
+
+ return ret;
+}
diff --git a/src/liblzma/common/lzip_decoder.c b/src/liblzma/common/lzip_decoder.c
new file mode 100644
index 0000000..88cc7ff
--- /dev/null
+++ b/src/liblzma/common/lzip_decoder.c
@@ -0,0 +1,418 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzip_decoder.c
+/// \brief Decodes .lz (lzip) files
+//
+// Author: Michał Górny
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzip_decoder.h"
+#include "lzma_decoder.h"
+#include "check.h"
+
+
+// .lz format version 0 lacks the 64-bit Member size field in the footer.
+#define LZIP_V0_FOOTER_SIZE 12
+#define LZIP_V1_FOOTER_SIZE 20
+#define LZIP_FOOTER_SIZE_MAX LZIP_V1_FOOTER_SIZE
+
+// lc/lp/pb are hardcoded in the .lz format.
+#define LZIP_LC 3
+#define LZIP_LP 0
+#define LZIP_PB 2
+
+
+typedef struct {
+ enum {
+ SEQ_ID_STRING,
+ SEQ_VERSION,
+ SEQ_DICT_SIZE,
+ SEQ_CODER_INIT,
+ SEQ_LZMA_STREAM,
+ SEQ_MEMBER_FOOTER,
+ } sequence;
+
+ /// .lz member format version
+ uint32_t version;
+
+ /// CRC32 of the uncompressed data in the .lz member
+ uint32_t crc32;
+
+ /// Uncompressed size of the .lz member
+ uint64_t uncompressed_size;
+
+ /// Compressed size of the .lz member
+ uint64_t member_size;
+
+ /// Memory usage limit
+ uint64_t memlimit;
+
+ /// Amount of memory actually needed
+ uint64_t memusage;
+
+ /// If true, LZMA_GET_CHECK is returned after decoding the header
+ /// fields. As all files use CRC32 this is redundant but it's
+ /// implemented anyway since the initialization functions supports
+ /// all other flags in addition to LZMA_TELL_ANY_CHECK.
+ bool tell_any_check;
+
+ /// If true, we won't calculate or verify the CRC32 of
+ /// the uncompressed data.
+ bool ignore_check;
+
+ /// If true, we will decode concatenated .lz members and stop if
+ /// non-.lz data is seen after at least one member has been
+ /// successfully decoded.
+ bool concatenated;
+
+ /// When decoding concatenated .lz members, this is true as long as
+ /// we are decoding the first .lz member. This is needed to avoid
+ /// incorrect LZMA_FORMAT_ERROR in case there is non-.lz data at
+ /// the end of the file.
+ bool first_member;
+
+ /// Reading position in the header and footer fields
+ size_t pos;
+
+ /// Buffer to hold the .lz footer fields
+ uint8_t buffer[LZIP_FOOTER_SIZE_MAX];
+
+ /// Options decoded from the .lz header that needed to initialize
+ /// the LZMA1 decoder.
+ lzma_options_lzma options;
+
+ /// LZMA1 decoder
+ lzma_next_coder lzma_decoder;
+
+} lzma_lzip_coder;
+
+
+static lzma_ret
+lzip_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_lzip_coder *coder = coder_ptr;
+
+ while (true)
+ switch (coder->sequence) {
+ case SEQ_ID_STRING: {
+ // The "ID string" or magic bytes are "LZIP" in US-ASCII.
+ const uint8_t lzip_id_string[4] = { 0x4C, 0x5A, 0x49, 0x50 };
+
+ while (coder->pos < sizeof(lzip_id_string)) {
+ if (*in_pos >= in_size) {
+ // If we are on the 2nd+ concatenated member
+ // and the input ends before we can read
+ // the magic bytes, we discard the bytes that
+ // were already read (up to 3) and finish.
+ // See the reasoning below.
+ return !coder->first_member
+ && action == LZMA_FINISH
+ ? LZMA_STREAM_END : LZMA_OK;
+ }
+
+ if (in[*in_pos] != lzip_id_string[coder->pos]) {
+ // The .lz format allows putting non-.lz data
+ // at the end of the file. If we have seen
+ // at least one valid .lz member already,
+ // then we won't consume the byte at *in_pos
+ // and will return LZMA_STREAM_END. This way
+ // apps can easily locate and read the non-.lz
+ // data after the .lz member(s).
+ //
+ // NOTE: If the first 1-3 bytes of the non-.lz
+ // data match the .lz ID string then the first
+ // 1-3 bytes of the junk will get ignored by
+ // us. If apps want to properly locate the
+ // trailing data they must ensure that the
+ // first byte of their custom data isn't the
+ // same as the first byte of .lz ID string.
+ // With the liblzma API we cannot rewind the
+ // input position across calls to lzma_code().
+ return !coder->first_member
+ ? LZMA_STREAM_END : LZMA_FORMAT_ERROR;
+ }
+
+ ++*in_pos;
+ ++coder->pos;
+ }
+
+ coder->pos = 0;
+
+ coder->crc32 = 0;
+ coder->uncompressed_size = 0;
+ coder->member_size = sizeof(lzip_id_string);
+
+ coder->sequence = SEQ_VERSION;
+ }
+
+ // Fall through
+
+ case SEQ_VERSION:
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ coder->version = in[(*in_pos)++];
+
+ // We support version 0 and unextended version 1.
+ if (coder->version > 1)
+ return LZMA_OPTIONS_ERROR;
+
+ ++coder->member_size;
+ coder->sequence = SEQ_DICT_SIZE;
+
+ // .lz versions 0 and 1 use CRC32 as the integrity check
+ // so if the application wanted to know that
+ // (LZMA_TELL_ANY_CHECK) we can tell it now.
+ if (coder->tell_any_check)
+ return LZMA_GET_CHECK;
+
+ // Fall through
+
+ case SEQ_DICT_SIZE: {
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ const uint32_t ds = in[(*in_pos)++];
+ ++coder->member_size;
+
+ // The five lowest bits are for the base-2 logarithm of
+ // the dictionary size and the highest three bits are
+ // the fractional part (0/16 to 7/16) that will be
+ // subtracted to get the final value.
+ //
+ // For example, with 0xB5:
+ // b2log = 21
+ // fracnum = 5
+ // dict_size = 2^21 - 2^21 * 5 / 16 = 1408 KiB
+ const uint32_t b2log = ds & 0x1F;
+ const uint32_t fracnum = ds >> 5;
+
+ // The format versions 0 and 1 allow dictionary size in the
+ // range [4 KiB, 512 MiB].
+ if (b2log < 12 || b2log > 29 || (b2log == 12 && fracnum > 0))
+ return LZMA_DATA_ERROR;
+
+ // 2^[b2log] - 2^[b2log] * [fracnum] / 16
+ // = 2^[b2log] - [fracnum] * 2^([b2log] - 4)
+ coder->options.dict_size = (UINT32_C(1) << b2log)
+ - (fracnum << (b2log - 4));
+
+ assert(coder->options.dict_size >= 4096);
+ assert(coder->options.dict_size <= (UINT32_C(512) << 20));
+
+ coder->options.preset_dict = NULL;
+ coder->options.lc = LZIP_LC;
+ coder->options.lp = LZIP_LP;
+ coder->options.pb = LZIP_PB;
+
+ // Calculate the memory usage.
+ coder->memusage = lzma_lzma_decoder_memusage(&coder->options)
+ + LZMA_MEMUSAGE_BASE;
+
+ // Initialization is a separate step because if we return
+ // LZMA_MEMLIMIT_ERROR we need to be able to restart after
+ // the memlimit has been increased.
+ coder->sequence = SEQ_CODER_INIT;
+ }
+
+ // Fall through
+
+ case SEQ_CODER_INIT: {
+ if (coder->memusage > coder->memlimit)
+ return LZMA_MEMLIMIT_ERROR;
+
+ const lzma_filter_info filters[2] = {
+ {
+ .id = LZMA_FILTER_LZMA1,
+ .init = &lzma_lzma_decoder_init,
+ .options = &coder->options,
+ }, {
+ .init = NULL,
+ }
+ };
+
+ return_if_error(lzma_next_filter_init(&coder->lzma_decoder,
+ allocator, filters));
+
+ coder->crc32 = 0;
+ coder->sequence = SEQ_LZMA_STREAM;
+ }
+
+ // Fall through
+
+ case SEQ_LZMA_STREAM: {
+ const size_t in_start = *in_pos;
+ const size_t out_start = *out_pos;
+
+ const lzma_ret ret = coder->lzma_decoder.code(
+ coder->lzma_decoder.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size,
+ action);
+
+ const size_t out_used = *out_pos - out_start;
+
+ coder->member_size += *in_pos - in_start;
+ coder->uncompressed_size += out_used;
+
+ // Don't update the CRC32 if the integrity check will be
+ // ignored or if there was no new output. The latter is
+ // important in case out == NULL to avoid null pointer + 0
+ // which is undefined behavior.
+ if (!coder->ignore_check && out_used > 0)
+ coder->crc32 = lzma_crc32(out + out_start, out_used,
+ coder->crc32);
+
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ coder->sequence = SEQ_MEMBER_FOOTER;
+ }
+
+ // Fall through
+
+ case SEQ_MEMBER_FOOTER: {
+ // The footer of .lz version 0 lacks the Member size field.
+ // This is the only difference between version 0 and
+ // unextended version 1 formats.
+ const size_t footer_size = coder->version == 0
+ ? LZIP_V0_FOOTER_SIZE
+ : LZIP_V1_FOOTER_SIZE;
+
+ // Copy the CRC32, Data size, and Member size fields to
+ // the internal buffer.
+ lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+ footer_size);
+
+ // Return if we didn't get the whole footer yet.
+ if (coder->pos < footer_size)
+ return LZMA_OK;
+
+ coder->pos = 0;
+ coder->member_size += footer_size;
+
+ // Check that the footer fields match the observed data.
+ if (!coder->ignore_check
+ && coder->crc32 != read32le(&coder->buffer[0]))
+ return LZMA_DATA_ERROR;
+
+ if (coder->uncompressed_size != read64le(&coder->buffer[4]))
+ return LZMA_DATA_ERROR;
+
+ if (coder->version > 0) {
+ // .lz version 0 has no Member size field.
+ if (coder->member_size != read64le(&coder->buffer[12]))
+ return LZMA_DATA_ERROR;
+ }
+
+ // Decoding is finished if we weren't requested to decode
+ // more than one .lz member.
+ if (!coder->concatenated)
+ return LZMA_STREAM_END;
+
+ coder->first_member = false;
+ coder->sequence = SEQ_ID_STRING;
+ break;
+ }
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ // Never reached
+}
+
+
+static void
+lzip_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_lzip_coder *coder = coder_ptr;
+ lzma_next_end(&coder->lzma_decoder, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_check
+lzip_decoder_get_check(const void *coder_ptr lzma_attribute((__unused__)))
+{
+ return LZMA_CHECK_CRC32;
+}
+
+
+static lzma_ret
+lzip_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+ lzma_lzip_coder *coder = coder_ptr;
+
+ *memusage = coder->memusage;
+ *old_memlimit = coder->memlimit;
+
+ if (new_memlimit != 0) {
+ if (new_memlimit < coder->memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ coder->memlimit = new_memlimit;
+ }
+
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_lzip_decoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t memlimit, uint32_t flags)
+{
+ lzma_next_coder_init(&lzma_lzip_decoder_init, next, allocator);
+
+ if (flags & ~LZMA_SUPPORTED_FLAGS)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_lzip_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_lzip_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &lzip_decode;
+ next->end = &lzip_decoder_end;
+ next->get_check = &lzip_decoder_get_check;
+ next->memconfig = &lzip_decoder_memconfig;
+
+ coder->lzma_decoder = LZMA_NEXT_CODER_INIT;
+ }
+
+ coder->sequence = SEQ_ID_STRING;
+ coder->memlimit = my_max(1, memlimit);
+ coder->memusage = LZMA_MEMUSAGE_BASE;
+ coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0;
+ coder->ignore_check = (flags & LZMA_IGNORE_CHECK) != 0;
+ coder->concatenated = (flags & LZMA_CONCATENATED) != 0;
+ coder->first_member = true;
+ coder->pos = 0;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_lzip_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+{
+ lzma_next_strm_init(lzma_lzip_decoder_init, strm, memlimit, flags);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/lzip_decoder.h b/src/liblzma/common/lzip_decoder.h
new file mode 100644
index 0000000..33a01c3
--- /dev/null
+++ b/src/liblzma/common/lzip_decoder.h
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzip_decoder.h
+/// \brief Decodes .lz (lzip) files
+//
+// Author: Michał Górny
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZIP_DECODER_H
+#define LZMA_LZIP_DECODER_H
+
+#include "common.h"
+
+extern lzma_ret lzma_lzip_decoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t memlimit, uint32_t flags);
+
+#endif
diff --git a/src/liblzma/common/memcmplen.h b/src/liblzma/common/memcmplen.h
new file mode 100644
index 0000000..99d9c51
--- /dev/null
+++ b/src/liblzma/common/memcmplen.h
@@ -0,0 +1,173 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file memcmplen.h
+/// \brief Optimized comparison of two buffers
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_MEMCMPLEN_H
+#define LZMA_MEMCMPLEN_H
+
+#include "common.h"
+
+#ifdef HAVE_IMMINTRIN_H
+# include <immintrin.h>
+#endif
+
+// Only include <intrin.h> if it is needed. The header is only needed
+// on Windows when using an MSVC compatible compiler. The Intel compiler
+// can use the intrinsics without the header file.
+#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
+ && defined(_MSC_VER) \
+ && defined(_M_X64) \
+ && !defined(__INTEL_COMPILER)
+# include <intrin.h>
+#endif
+
+
+/// Find out how many equal bytes the two buffers have.
+///
+/// \param buf1 First buffer
+/// \param buf2 Second buffer
+/// \param len How many bytes have already been compared and will
+/// be assumed to match
+/// \param limit How many bytes to compare at most, including the
+/// already-compared bytes. This must be significantly
+/// smaller than UINT32_MAX to avoid integer overflows.
+/// Up to LZMA_MEMCMPLEN_EXTRA bytes may be read past
+/// the specified limit from both buf1 and buf2.
+///
+/// \return Number of equal bytes in the buffers is returned.
+/// This is always at least len and at most limit.
+///
+/// \note LZMA_MEMCMPLEN_EXTRA defines how many extra bytes may be read.
+/// It's rounded up to 2^n. This extra amount needs to be
+/// allocated in the buffers being used. It needs to be
+/// initialized too to keep Valgrind quiet.
+static lzma_always_inline uint32_t
+lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
+ uint32_t len, uint32_t limit)
+{
+ assert(len <= limit);
+ assert(limit <= UINT32_MAX / 2);
+
+#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
+ && ((TUKLIB_GNUC_REQ(3, 4) && defined(__x86_64__)) \
+ || (defined(__INTEL_COMPILER) && defined(__x86_64__)) \
+ || (defined(__INTEL_COMPILER) && defined(_M_X64)) \
+ || (defined(_MSC_VER) && defined(_M_X64)))
+ // I keep this x86-64 only for now since that's where I know this
+ // to be a good method. This may be fine on other 64-bit CPUs too.
+ // On big endian one should use xor instead of subtraction and switch
+ // to __builtin_clzll().
+#define LZMA_MEMCMPLEN_EXTRA 8
+ while (len < limit) {
+ const uint64_t x = read64ne(buf1 + len) - read64ne(buf2 + len);
+ if (x != 0) {
+ // MSVC or Intel C compiler on Windows
+# if (defined(_MSC_VER) || defined(__INTEL_COMPILER)) && defined(_M_X64)
+ unsigned long tmp;
+ _BitScanForward64(&tmp, x);
+ len += (uint32_t)tmp >> 3;
+ // GCC, Clang, or Intel C compiler
+# else
+ len += (uint32_t)__builtin_ctzll(x) >> 3;
+# endif
+ return my_min(len, limit);
+ }
+
+ len += 8;
+ }
+
+ return limit;
+
+#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
+ && defined(HAVE__MM_MOVEMASK_EPI8) \
+ && (defined(__SSE2__) \
+ || (defined(_MSC_VER) && defined(_M_IX86_FP) \
+ && _M_IX86_FP >= 2))
+ // NOTE: This will use 128-bit unaligned access which
+ // TUKLIB_FAST_UNALIGNED_ACCESS wasn't meant to permit,
+ // but it's convenient here since this is x86-only.
+ //
+ // SSE2 version for 32-bit and 64-bit x86. On x86-64 the above
+ // version is sometimes significantly faster and sometimes
+ // slightly slower than this SSE2 version, so this SSE2
+ // version isn't used on x86-64.
+# define LZMA_MEMCMPLEN_EXTRA 16
+ while (len < limit) {
+ const uint32_t x = 0xFFFF ^ (uint32_t)_mm_movemask_epi8(
+ _mm_cmpeq_epi8(
+ _mm_loadu_si128((const __m128i *)(buf1 + len)),
+ _mm_loadu_si128((const __m128i *)(buf2 + len))));
+
+ if (x != 0) {
+ len += ctz32(x);
+ return my_min(len, limit);
+ }
+
+ len += 16;
+ }
+
+ return limit;
+
+#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && !defined(WORDS_BIGENDIAN)
+ // Generic 32-bit little endian method
+# define LZMA_MEMCMPLEN_EXTRA 4
+ while (len < limit) {
+ uint32_t x = read32ne(buf1 + len) - read32ne(buf2 + len);
+ if (x != 0) {
+ if ((x & 0xFFFF) == 0) {
+ len += 2;
+ x >>= 16;
+ }
+
+ if ((x & 0xFF) == 0)
+ ++len;
+
+ return my_min(len, limit);
+ }
+
+ len += 4;
+ }
+
+ return limit;
+
+#elif defined(TUKLIB_FAST_UNALIGNED_ACCESS) && defined(WORDS_BIGENDIAN)
+ // Generic 32-bit big endian method
+# define LZMA_MEMCMPLEN_EXTRA 4
+ while (len < limit) {
+ uint32_t x = read32ne(buf1 + len) ^ read32ne(buf2 + len);
+ if (x != 0) {
+ if ((x & 0xFFFF0000) == 0) {
+ len += 2;
+ x <<= 16;
+ }
+
+ if ((x & 0xFF000000) == 0)
+ ++len;
+
+ return my_min(len, limit);
+ }
+
+ len += 4;
+ }
+
+ return limit;
+
+#else
+ // Simple portable version that doesn't use unaligned access.
+# define LZMA_MEMCMPLEN_EXTRA 0
+ while (len < limit && buf1[len] == buf2[len])
+ ++len;
+
+ return len;
+#endif
+}
+
+#endif
diff --git a/src/liblzma/common/microlzma_decoder.c b/src/liblzma/common/microlzma_decoder.c
new file mode 100644
index 0000000..e473373
--- /dev/null
+++ b/src/liblzma/common/microlzma_decoder.c
@@ -0,0 +1,221 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file microlzma_decoder.c
+/// \brief Decode MicroLZMA format
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma_decoder.h"
+#include "lz_decoder.h"
+
+
+typedef struct {
+ /// LZMA1 decoder
+ lzma_next_coder lzma;
+
+ /// Compressed size of the stream as given by the application.
+ /// This must be exactly correct.
+ ///
+ /// This will be decremented when input is read.
+ uint64_t comp_size;
+
+ /// Uncompressed size of the stream as given by the application.
+ /// This may be less than the actual uncompressed size if
+ /// uncomp_size_is_exact is false.
+ ///
+ /// This will be decremented when output is produced.
+ lzma_vli uncomp_size;
+
+ /// LZMA dictionary size as given by the application
+ uint32_t dict_size;
+
+ /// If true, the exact uncompressed size is known. If false,
+ /// uncomp_size may be smaller than the real uncompressed size;
+ /// uncomp_size may never be bigger than the real uncompressed size.
+ bool uncomp_size_is_exact;
+
+ /// True once the first byte of the MicroLZMA stream
+ /// has been processed.
+ bool props_decoded;
+} lzma_microlzma_coder;
+
+
+static lzma_ret
+microlzma_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_microlzma_coder *coder = coder_ptr;
+
+ // Remember the in start position so that we can update comp_size.
+ const size_t in_start = *in_pos;
+
+ // Remember the out start position so that we can update uncomp_size.
+ const size_t out_start = *out_pos;
+
+ // Limit the amount of input so that the decoder won't read more than
+ // comp_size. This is required when uncomp_size isn't exact because
+ // in that case the LZMA decoder will try to decode more input even
+ // when it has no output space (it can be looking for EOPM).
+ if (in_size - *in_pos > coder->comp_size)
+ in_size = *in_pos + (size_t)(coder->comp_size);
+
+ // When the exact uncompressed size isn't known, we must limit
+ // the available output space to prevent the LZMA decoder from
+ // trying to decode too much.
+ if (!coder->uncomp_size_is_exact
+ && out_size - *out_pos > coder->uncomp_size)
+ out_size = *out_pos + (size_t)(coder->uncomp_size);
+
+ if (!coder->props_decoded) {
+ // There must be at least one byte of input to decode
+ // the properties byte.
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ lzma_options_lzma options = {
+ .dict_size = coder->dict_size,
+ .preset_dict = NULL,
+ .preset_dict_size = 0,
+ .ext_flags = 0, // EOPM not allowed when size is known
+ .ext_size_low = UINT32_MAX, // Unknown size by default
+ .ext_size_high = UINT32_MAX,
+ };
+
+ if (coder->uncomp_size_is_exact)
+ lzma_set_ext_size(options, coder->uncomp_size);
+
+ // The properties are stored as bitwise-negation
+ // of the typical encoding.
+ if (lzma_lzma_lclppb_decode(&options, ~in[*in_pos]))
+ return LZMA_OPTIONS_ERROR;
+
+ ++*in_pos;
+
+ // Initialize the decoder.
+ lzma_filter_info filters[2] = {
+ {
+ .id = LZMA_FILTER_LZMA1EXT,
+ .init = &lzma_lzma_decoder_init,
+ .options = &options,
+ }, {
+ .init = NULL,
+ }
+ };
+
+ return_if_error(lzma_next_filter_init(&coder->lzma,
+ allocator, filters));
+
+ // Pass one dummy 0x00 byte to the LZMA decoder since that
+ // is what it expects the first byte to be.
+ const uint8_t dummy_in = 0;
+ size_t dummy_in_pos = 0;
+ if (coder->lzma.code(coder->lzma.coder, allocator,
+ &dummy_in, &dummy_in_pos, 1,
+ out, out_pos, out_size, LZMA_RUN) != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ assert(dummy_in_pos == 1);
+ coder->props_decoded = true;
+ }
+
+ // The rest is normal LZMA decoding.
+ lzma_ret ret = coder->lzma.code(coder->lzma.coder, allocator,
+ in, in_pos, in_size,
+ out, out_pos, out_size, action);
+
+ // Update the remaining compressed size.
+ assert(coder->comp_size >= *in_pos - in_start);
+ coder->comp_size -= *in_pos - in_start;
+
+ if (coder->uncomp_size_is_exact) {
+ // After successful decompression of the complete stream
+ // the compressed size must match.
+ if (ret == LZMA_STREAM_END && coder->comp_size != 0)
+ ret = LZMA_DATA_ERROR;
+ } else {
+ // Update the amount of output remaining.
+ assert(coder->uncomp_size >= *out_pos - out_start);
+ coder->uncomp_size -= *out_pos - out_start;
+
+ // - We must not get LZMA_STREAM_END because the stream
+ // shouldn't have EOPM.
+ // - We must use uncomp_size to determine when to
+ // return LZMA_STREAM_END.
+ if (ret == LZMA_STREAM_END)
+ ret = LZMA_DATA_ERROR;
+ else if (coder->uncomp_size == 0)
+ ret = LZMA_STREAM_END;
+ }
+
+ return ret;
+}
+
+
+static void
+microlzma_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_microlzma_coder *coder = coder_ptr;
+ lzma_next_end(&coder->lzma, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+microlzma_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t comp_size,
+ uint64_t uncomp_size, bool uncomp_size_is_exact,
+ uint32_t dict_size)
+{
+ lzma_next_coder_init(&microlzma_decoder_init, next, allocator);
+
+ lzma_microlzma_coder *coder = next->coder;
+
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_microlzma_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &microlzma_decode;
+ next->end = &microlzma_decoder_end;
+
+ coder->lzma = LZMA_NEXT_CODER_INIT;
+ }
+
+ // The public API is uint64_t but the internal LZ decoder API uses
+ // lzma_vli.
+ if (uncomp_size > LZMA_VLI_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ coder->comp_size = comp_size;
+ coder->uncomp_size = uncomp_size;
+ coder->uncomp_size_is_exact = uncomp_size_is_exact;
+ coder->dict_size = dict_size;
+
+ coder->props_decoded = false;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_microlzma_decoder(lzma_stream *strm, uint64_t comp_size,
+ uint64_t uncomp_size, lzma_bool uncomp_size_is_exact,
+ uint32_t dict_size)
+{
+ lzma_next_strm_init(microlzma_decoder_init, strm, comp_size,
+ uncomp_size, uncomp_size_is_exact, dict_size);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/microlzma_encoder.c b/src/liblzma/common/microlzma_encoder.c
new file mode 100644
index 0000000..a787ca2
--- /dev/null
+++ b/src/liblzma/common/microlzma_encoder.c
@@ -0,0 +1,141 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file microlzma_encoder.c
+/// \brief Encode into MicroLZMA format
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma_encoder.h"
+
+
+typedef struct {
+ /// LZMA1 encoder
+ lzma_next_coder lzma;
+
+ /// LZMA properties byte (lc/lp/pb)
+ uint8_t props;
+} lzma_microlzma_coder;
+
+
+static lzma_ret
+microlzma_encode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_microlzma_coder *coder = coder_ptr;
+
+ // Remember *out_pos so that we can overwrite the first byte with
+ // the LZMA properties byte.
+ const size_t out_start = *out_pos;
+
+ // Remember *in_pos so that we can set it based on how many
+ // uncompressed bytes were actually encoded.
+ const size_t in_start = *in_pos;
+
+ // Set the output size limit based on the available output space.
+ // We know that the encoder supports set_out_limit() so
+ // LZMA_OPTIONS_ERROR isn't possible. LZMA_BUF_ERROR is possible
+ // but lzma_code() has an assertion to not allow it to be returned
+ // from here and I don't want to change that for now, so
+ // LZMA_BUF_ERROR becomes LZMA_PROG_ERROR.
+ uint64_t uncomp_size;
+ if (coder->lzma.set_out_limit(coder->lzma.coder,
+ &uncomp_size, out_size - *out_pos) != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ // set_out_limit fails if this isn't true.
+ assert(out_size - *out_pos >= 6);
+
+ // Encode as much as possible.
+ const lzma_ret ret = coder->lzma.code(coder->lzma.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size, action);
+
+ if (ret != LZMA_STREAM_END) {
+ if (ret == LZMA_OK) {
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ return ret;
+ }
+
+ // The first output byte is bitwise-negation of the properties byte.
+ // We know that there is space for this byte because set_out_limit
+ // and the actual encoding succeeded.
+ out[out_start] = (uint8_t)(~coder->props);
+
+ // The LZMA encoder likely read more input than it was able to encode.
+ // Set *in_pos based on uncomp_size.
+ assert(uncomp_size <= in_size - in_start);
+ *in_pos = in_start + (size_t)(uncomp_size);
+
+ return ret;
+}
+
+
+static void
+microlzma_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_microlzma_coder *coder = coder_ptr;
+ lzma_next_end(&coder->lzma, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+microlzma_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_options_lzma *options)
+{
+ lzma_next_coder_init(&microlzma_encoder_init, next, allocator);
+
+ lzma_microlzma_coder *coder = next->coder;
+
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_microlzma_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &microlzma_encode;
+ next->end = &microlzma_encoder_end;
+
+ coder->lzma = LZMA_NEXT_CODER_INIT;
+ }
+
+ // Encode the properties byte. Bitwise-negation of it will be the
+ // first output byte.
+ if (lzma_lzma_lclppb_encode(options, &coder->props))
+ return LZMA_OPTIONS_ERROR;
+
+ // Initialize the LZMA encoder.
+ const lzma_filter_info filters[2] = {
+ {
+ .id = LZMA_FILTER_LZMA1,
+ .init = &lzma_lzma_encoder_init,
+ .options = (void *)(options),
+ }, {
+ .init = NULL,
+ }
+ };
+
+ return lzma_next_filter_init(&coder->lzma, allocator, filters);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_microlzma_encoder(lzma_stream *strm, const lzma_options_lzma *options)
+{
+ lzma_next_strm_init(microlzma_encoder_init, strm, options);
+
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+
+}
diff --git a/src/liblzma/common/outqueue.c b/src/liblzma/common/outqueue.c
new file mode 100644
index 0000000..71e8648
--- /dev/null
+++ b/src/liblzma/common/outqueue.c
@@ -0,0 +1,287 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file outqueue.c
+/// \brief Output queue handling in multithreaded coding
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "outqueue.h"
+
+
+/// Get the maximum number of buffers that may be allocated based
+/// on the number of threads. For now this is twice the number of threads.
+/// It's a compromise between RAM usage and keeping the worker threads busy
+/// when buffers finish out of order.
+#define GET_BUFS_LIMIT(threads) (2 * (threads))
+
+
+extern uint64_t
+lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads)
+{
+ // This is to ease integer overflow checking: We may allocate up to
+ // GET_BUFS_LIMIT(LZMA_THREADS_MAX) buffers and we need some extra
+ // memory for other data structures too (that's the /2).
+ //
+ // lzma_outq_prealloc_buf() will still accept bigger buffers than this.
+ const uint64_t limit
+ = UINT64_MAX / GET_BUFS_LIMIT(LZMA_THREADS_MAX) / 2;
+
+ if (threads > LZMA_THREADS_MAX || buf_size_max > limit)
+ return UINT64_MAX;
+
+ return GET_BUFS_LIMIT(threads)
+ * lzma_outq_outbuf_memusage(buf_size_max);
+}
+
+
+static void
+move_head_to_cache(lzma_outq *outq, const lzma_allocator *allocator)
+{
+ assert(outq->head != NULL);
+ assert(outq->tail != NULL);
+ assert(outq->bufs_in_use > 0);
+
+ lzma_outbuf *buf = outq->head;
+ outq->head = buf->next;
+ if (outq->head == NULL)
+ outq->tail = NULL;
+
+ if (outq->cache != NULL && outq->cache->allocated != buf->allocated)
+ lzma_outq_clear_cache(outq, allocator);
+
+ buf->next = outq->cache;
+ outq->cache = buf;
+
+ --outq->bufs_in_use;
+ outq->mem_in_use -= lzma_outq_outbuf_memusage(buf->allocated);
+
+ return;
+}
+
+
+static void
+free_one_cached_buffer(lzma_outq *outq, const lzma_allocator *allocator)
+{
+ assert(outq->cache != NULL);
+
+ lzma_outbuf *buf = outq->cache;
+ outq->cache = buf->next;
+
+ --outq->bufs_allocated;
+ outq->mem_allocated -= lzma_outq_outbuf_memusage(buf->allocated);
+
+ lzma_free(buf, allocator);
+ return;
+}
+
+
+extern void
+lzma_outq_clear_cache(lzma_outq *outq, const lzma_allocator *allocator)
+{
+ while (outq->cache != NULL)
+ free_one_cached_buffer(outq, allocator);
+
+ return;
+}
+
+
+extern void
+lzma_outq_clear_cache2(lzma_outq *outq, const lzma_allocator *allocator,
+ size_t keep_size)
+{
+ if (outq->cache == NULL)
+ return;
+
+ // Free all but one.
+ while (outq->cache->next != NULL)
+ free_one_cached_buffer(outq, allocator);
+
+ // Free the last one only if its size doesn't equal to keep_size.
+ if (outq->cache->allocated != keep_size)
+ free_one_cached_buffer(outq, allocator);
+
+ return;
+}
+
+
+extern lzma_ret
+lzma_outq_init(lzma_outq *outq, const lzma_allocator *allocator,
+ uint32_t threads)
+{
+ if (threads > LZMA_THREADS_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ const uint32_t bufs_limit = GET_BUFS_LIMIT(threads);
+
+ // Clear head/tail.
+ while (outq->head != NULL)
+ move_head_to_cache(outq, allocator);
+
+ // If new buf_limit is lower than the old one, we may need to free
+ // a few cached buffers.
+ while (bufs_limit < outq->bufs_allocated)
+ free_one_cached_buffer(outq, allocator);
+
+ outq->bufs_limit = bufs_limit;
+ outq->read_pos = 0;
+
+ return LZMA_OK;
+}
+
+
+extern void
+lzma_outq_end(lzma_outq *outq, const lzma_allocator *allocator)
+{
+ while (outq->head != NULL)
+ move_head_to_cache(outq, allocator);
+
+ lzma_outq_clear_cache(outq, allocator);
+ return;
+}
+
+
+extern lzma_ret
+lzma_outq_prealloc_buf(lzma_outq *outq, const lzma_allocator *allocator,
+ size_t size)
+{
+ // Caller must have checked it with lzma_outq_has_buf().
+ assert(outq->bufs_in_use < outq->bufs_limit);
+
+ // If there already is appropriately-sized buffer in the cache,
+ // we need to do nothing.
+ if (outq->cache != NULL && outq->cache->allocated == size)
+ return LZMA_OK;
+
+ if (size > SIZE_MAX - sizeof(lzma_outbuf))
+ return LZMA_MEM_ERROR;
+
+ const size_t alloc_size = lzma_outq_outbuf_memusage(size);
+
+ // The cache may have buffers but their size is wrong.
+ lzma_outq_clear_cache(outq, allocator);
+
+ outq->cache = lzma_alloc(alloc_size, allocator);
+ if (outq->cache == NULL)
+ return LZMA_MEM_ERROR;
+
+ outq->cache->next = NULL;
+ outq->cache->allocated = size;
+
+ ++outq->bufs_allocated;
+ outq->mem_allocated += alloc_size;
+
+ return LZMA_OK;
+}
+
+
+extern lzma_outbuf *
+lzma_outq_get_buf(lzma_outq *outq, void *worker)
+{
+ // Caller must have used lzma_outq_prealloc_buf() to ensure these.
+ assert(outq->bufs_in_use < outq->bufs_limit);
+ assert(outq->bufs_in_use < outq->bufs_allocated);
+ assert(outq->cache != NULL);
+
+ lzma_outbuf *buf = outq->cache;
+ outq->cache = buf->next;
+ buf->next = NULL;
+
+ if (outq->tail != NULL) {
+ assert(outq->head != NULL);
+ outq->tail->next = buf;
+ } else {
+ assert(outq->head == NULL);
+ outq->head = buf;
+ }
+
+ outq->tail = buf;
+
+ buf->worker = worker;
+ buf->finished = false;
+ buf->finish_ret = LZMA_STREAM_END;
+ buf->pos = 0;
+ buf->decoder_in_pos = 0;
+
+ buf->unpadded_size = 0;
+ buf->uncompressed_size = 0;
+
+ ++outq->bufs_in_use;
+ outq->mem_in_use += lzma_outq_outbuf_memusage(buf->allocated);
+
+ return buf;
+}
+
+
+extern bool
+lzma_outq_is_readable(const lzma_outq *outq)
+{
+ if (outq->head == NULL)
+ return false;
+
+ return outq->read_pos < outq->head->pos || outq->head->finished;
+}
+
+
+extern lzma_ret
+lzma_outq_read(lzma_outq *restrict outq,
+ const lzma_allocator *restrict allocator,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size,
+ lzma_vli *restrict unpadded_size,
+ lzma_vli *restrict uncompressed_size)
+{
+ // There must be at least one buffer from which to read.
+ if (outq->bufs_in_use == 0)
+ return LZMA_OK;
+
+ // Get the buffer.
+ lzma_outbuf *buf = outq->head;
+
+ // Copy from the buffer to output.
+ //
+ // FIXME? In threaded decoder it may be bad to do this copy while
+ // the mutex is being held.
+ lzma_bufcpy(buf->buf, &outq->read_pos, buf->pos,
+ out, out_pos, out_size);
+
+ // Return if we didn't get all the data from the buffer.
+ if (!buf->finished || outq->read_pos < buf->pos)
+ return LZMA_OK;
+
+ // The buffer was finished. Tell the caller its size information.
+ if (unpadded_size != NULL)
+ *unpadded_size = buf->unpadded_size;
+
+ if (uncompressed_size != NULL)
+ *uncompressed_size = buf->uncompressed_size;
+
+ // Remember the return value.
+ const lzma_ret finish_ret = buf->finish_ret;
+
+ // Free this buffer for further use.
+ move_head_to_cache(outq, allocator);
+ outq->read_pos = 0;
+
+ return finish_ret;
+}
+
+
+extern void
+lzma_outq_enable_partial_output(lzma_outq *outq,
+ void (*enable_partial_output)(void *worker))
+{
+ if (outq->head != NULL && !outq->head->finished
+ && outq->head->worker != NULL) {
+ enable_partial_output(outq->head->worker);
+
+ // Set it to NULL since calling it twice is pointless.
+ outq->head->worker = NULL;
+ }
+
+ return;
+}
diff --git a/src/liblzma/common/outqueue.h b/src/liblzma/common/outqueue.h
new file mode 100644
index 0000000..596911e
--- /dev/null
+++ b/src/liblzma/common/outqueue.h
@@ -0,0 +1,254 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file outqueue.h
+/// \brief Output queue handling in multithreaded coding
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+/// Output buffer for a single thread
+typedef struct lzma_outbuf_s lzma_outbuf;
+struct lzma_outbuf_s {
+ /// Pointer to the next buffer. This is used for the cached buffers.
+ /// The worker thread must not modify this.
+ lzma_outbuf *next;
+
+ /// This initialized by lzma_outq_get_buf() and
+ /// is used by lzma_outq_enable_partial_output().
+ /// The worker thread must not modify this.
+ void *worker;
+
+ /// Amount of memory allocated for buf[].
+ /// The worker thread must not modify this.
+ size_t allocated;
+
+ /// Writing position in the worker thread or, in other words, the
+ /// amount of finished data written to buf[] which can be copied out
+ ///
+ /// \note This is read by another thread and thus access
+ /// to this variable needs a mutex.
+ size_t pos;
+
+ /// Decompression: Position in the input buffer in the worker thread
+ /// that matches the output "pos" above. This is used to detect if
+ /// more output might be possible from the worker thread: if it has
+ /// consumed all its input, then more output isn't possible.
+ ///
+ /// \note This is read by another thread and thus access
+ /// to this variable needs a mutex.
+ size_t decoder_in_pos;
+
+ /// True when no more data will be written into this buffer.
+ ///
+ /// \note This is read by another thread and thus access
+ /// to this variable needs a mutex.
+ bool finished;
+
+ /// Return value for lzma_outq_read() when the last byte from
+ /// a finished buffer has been read. Defaults to LZMA_STREAM_END.
+ /// This must *not* be LZMA_OK. The idea is to allow a decoder to
+ /// pass an error code to the main thread, setting the code here
+ /// together with finished = true.
+ lzma_ret finish_ret;
+
+ /// Additional size information. lzma_outq_read() may read these
+ /// when "finished" is true.
+ lzma_vli unpadded_size;
+ lzma_vli uncompressed_size;
+
+ /// Buffer of "allocated" bytes
+ uint8_t buf[];
+};
+
+
+typedef struct {
+ /// Linked list of buffers in use. The next output byte will be
+ /// read from the head and buffers for the next thread will be
+ /// appended to the tail. tail->next is always NULL.
+ lzma_outbuf *head;
+ lzma_outbuf *tail;
+
+ /// Number of bytes read from head->buf[] in lzma_outq_read()
+ size_t read_pos;
+
+ /// Linked list of allocated buffers that aren't currently used.
+ /// This way buffers of similar size can be reused and don't
+ /// need to be reallocated every time. For simplicity, all
+ /// cached buffers in the list have the same allocated size.
+ lzma_outbuf *cache;
+
+ /// Total amount of memory allocated for buffers
+ uint64_t mem_allocated;
+
+ /// Amount of memory used by the buffers that are in use in
+ /// the head...tail linked list.
+ uint64_t mem_in_use;
+
+ /// Number of buffers in use in the head...tail list. If and only if
+ /// this is zero, the pointers head and tail above are NULL.
+ uint32_t bufs_in_use;
+
+ /// Number of buffers allocated (in use + cached)
+ uint32_t bufs_allocated;
+
+ /// Maximum allowed number of allocated buffers
+ uint32_t bufs_limit;
+} lzma_outq;
+
+
+/**
+ * \brief Calculate the memory usage of an output queue
+ *
+ * \return Approximate memory usage in bytes or UINT64_MAX on error.
+ */
+extern uint64_t lzma_outq_memusage(uint64_t buf_size_max, uint32_t threads);
+
+
+/// \brief Initialize an output queue
+///
+/// \param outq Pointer to an output queue. Before calling
+/// this function the first time, *outq should
+/// have been zeroed with memzero() so that this
+/// function knows that there are no previous
+/// allocations to free.
+/// \param allocator Pointer to allocator or NULL
+/// \param threads Number of buffers that may be in use
+/// concurrently. Note that more than this number
+/// of buffers may actually get allocated to
+/// improve performance when buffers finish
+/// out of order. The actual maximum number of
+/// allocated buffers is derived from the number
+/// of threads.
+///
+/// \return - LZMA_OK
+/// - LZMA_MEM_ERROR
+///
+extern lzma_ret lzma_outq_init(lzma_outq *outq,
+ const lzma_allocator *allocator, uint32_t threads);
+
+
+/// \brief Free the memory associated with the output queue
+extern void lzma_outq_end(lzma_outq *outq, const lzma_allocator *allocator);
+
+
+/// \brief Free all cached buffers that consume memory but aren't in use
+extern void lzma_outq_clear_cache(
+ lzma_outq *outq, const lzma_allocator *allocator);
+
+
+/// \brief Like lzma_outq_clear_cache() but might keep one buffer
+///
+/// One buffer is not freed if its size is equal to keep_size.
+/// This is useful if the caller knows that it will soon need a buffer of
+/// keep_size bytes. This way it won't be freed and immediately reallocated.
+extern void lzma_outq_clear_cache2(
+ lzma_outq *outq, const lzma_allocator *allocator,
+ size_t keep_size);
+
+
+/// \brief Preallocate a new buffer into cache
+///
+/// Splitting the buffer allocation into a separate function makes it
+/// possible to ensure that way lzma_outq_get_buf() cannot fail.
+/// If the preallocated buffer isn't actually used (for example, some
+/// other error occurs), the caller has to do nothing as the buffer will
+/// be used later or cleared from the cache when not needed.
+///
+/// \return LZMA_OK on success, LZMA_MEM_ERROR if allocation fails
+///
+extern lzma_ret lzma_outq_prealloc_buf(
+ lzma_outq *outq, const lzma_allocator *allocator, size_t size);
+
+
+/// \brief Get a new buffer
+///
+/// lzma_outq_prealloc_buf() must be used to ensure that there is a buffer
+/// available before calling lzma_outq_get_buf().
+///
+extern lzma_outbuf *lzma_outq_get_buf(lzma_outq *outq, void *worker);
+
+
+/// \brief Test if there is data ready to be read
+///
+/// Call to this function must be protected with the same mutex that
+/// is used to protect lzma_outbuf.finished.
+///
+extern bool lzma_outq_is_readable(const lzma_outq *outq);
+
+
+/// \brief Read finished data
+///
+/// \param outq Pointer to an output queue
+/// \param out Beginning of the output buffer
+/// \param out_pos The next byte will be written to
+/// out[*out_pos].
+/// \param out_size Size of the out buffer; the first byte into
+/// which no data is written to is out[out_size].
+/// \param unpadded_size Unpadded Size from the Block encoder
+/// \param uncompressed_size Uncompressed Size from the Block encoder
+///
+/// \return - LZMA: All OK. Either no data was available or the buffer
+/// being read didn't become empty yet.
+/// - LZMA_STREAM_END: The buffer being read was finished.
+/// *unpadded_size and *uncompressed_size were set if they
+/// were not NULL.
+///
+/// \note This reads lzma_outbuf.finished and .pos variables and thus
+/// calls to this function need to be protected with a mutex.
+///
+extern lzma_ret lzma_outq_read(lzma_outq *restrict outq,
+ const lzma_allocator *restrict allocator,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size, lzma_vli *restrict unpadded_size,
+ lzma_vli *restrict uncompressed_size);
+
+
+/// \brief Enable partial output from a worker thread
+///
+/// If the buffer at the head of the output queue isn't finished,
+/// this will call enable_partial_output on the worker associated with
+/// that output buffer.
+///
+/// \note This reads a lzma_outbuf.finished variable and thus
+/// calls to this function need to be protected with a mutex.
+///
+extern void lzma_outq_enable_partial_output(lzma_outq *outq,
+ void (*enable_partial_output)(void *worker));
+
+
+/// \brief Test if there is at least one buffer free
+///
+/// This must be used before getting a new buffer with lzma_outq_get_buf().
+///
+static inline bool
+lzma_outq_has_buf(const lzma_outq *outq)
+{
+ return outq->bufs_in_use < outq->bufs_limit;
+}
+
+
+/// \brief Test if the queue is completely empty
+static inline bool
+lzma_outq_is_empty(const lzma_outq *outq)
+{
+ return outq->bufs_in_use == 0;
+}
+
+
+/// \brief Get the amount of memory needed for a single lzma_outbuf
+///
+/// \note Caller must check that the argument is significantly less
+/// than SIZE_MAX to avoid an integer overflow!
+static inline uint64_t
+lzma_outq_outbuf_memusage(size_t buf_size)
+{
+ assert(buf_size <= SIZE_MAX - sizeof(lzma_outbuf));
+ return sizeof(lzma_outbuf) + buf_size;
+}
diff --git a/src/liblzma/common/stream_buffer_decoder.c b/src/liblzma/common/stream_buffer_decoder.c
new file mode 100644
index 0000000..b9745b5
--- /dev/null
+++ b/src/liblzma/common/stream_buffer_decoder.c
@@ -0,0 +1,91 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_buffer_decoder.c
+/// \brief Single-call .xz Stream decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_decoder.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags,
+ const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ // Sanity checks
+ if (in_pos == NULL || (in == NULL && *in_pos != in_size)
+ || *in_pos > in_size || out_pos == NULL
+ || (out == NULL && *out_pos != out_size)
+ || *out_pos > out_size)
+ return LZMA_PROG_ERROR;
+
+ // Catch flags that are not allowed in buffer-to-buffer decoding.
+ if (flags & LZMA_TELL_ANY_CHECK)
+ return LZMA_PROG_ERROR;
+
+ // Initialize the Stream decoder.
+ // TODO: We need something to tell the decoder that it can use the
+ // output buffer as workspace, and thus save significant amount of RAM.
+ lzma_next_coder stream_decoder = LZMA_NEXT_CODER_INIT;
+ lzma_ret ret = lzma_stream_decoder_init(
+ &stream_decoder, allocator, *memlimit, flags);
+
+ if (ret == LZMA_OK) {
+ // Save the positions so that we can restore them in case
+ // an error occurs.
+ const size_t in_start = *in_pos;
+ const size_t out_start = *out_pos;
+
+ // Do the actual decoding.
+ ret = stream_decoder.code(stream_decoder.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size,
+ LZMA_FINISH);
+
+ if (ret == LZMA_STREAM_END) {
+ ret = LZMA_OK;
+ } else {
+ // Something went wrong, restore the positions.
+ *in_pos = in_start;
+ *out_pos = out_start;
+
+ if (ret == LZMA_OK) {
+ // Either the input was truncated or the
+ // output buffer was too small.
+ assert(*in_pos == in_size
+ || *out_pos == out_size);
+
+ // If all the input was consumed, then the
+ // input is truncated, even if the output
+ // buffer is also full. This is because
+ // processing the last byte of the Stream
+ // never produces output.
+ if (*in_pos == in_size)
+ ret = LZMA_DATA_ERROR;
+ else
+ ret = LZMA_BUF_ERROR;
+
+ } else if (ret == LZMA_MEMLIMIT_ERROR) {
+ // Let the caller know how much memory would
+ // have been needed.
+ uint64_t memusage;
+ (void)stream_decoder.memconfig(
+ stream_decoder.coder,
+ memlimit, &memusage, 0);
+ }
+ }
+ }
+
+ // Free the decoder memory. This needs to be done even if
+ // initialization fails, because the internal API doesn't
+ // require the initialization function to free its memory on error.
+ lzma_next_end(&stream_decoder, allocator);
+
+ return ret;
+}
diff --git a/src/liblzma/common/stream_buffer_encoder.c b/src/liblzma/common/stream_buffer_encoder.c
new file mode 100644
index 0000000..7315759
--- /dev/null
+++ b/src/liblzma/common/stream_buffer_encoder.c
@@ -0,0 +1,142 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_buffer_encoder.c
+/// \brief Single-call .xz Stream encoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "index.h"
+
+
+/// Maximum size of Index that has exactly one Record.
+/// Index Indicator + Number of Records + Record + CRC32 rounded up to
+/// the next multiple of four.
+#define INDEX_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 4 + 3) & ~3)
+
+/// Stream Header, Stream Footer, and Index
+#define HEADERS_BOUND (2 * LZMA_STREAM_HEADER_SIZE + INDEX_BOUND)
+
+
+extern LZMA_API(size_t)
+lzma_stream_buffer_bound(size_t uncompressed_size)
+{
+ // Get the maximum possible size of a Block.
+ const size_t block_bound = lzma_block_buffer_bound(uncompressed_size);
+ if (block_bound == 0)
+ return 0;
+
+ // Catch the possible integer overflow and also prevent the size of
+ // the Stream exceeding LZMA_VLI_MAX (theoretically possible on
+ // 64-bit systems).
+ if (my_min(SIZE_MAX, LZMA_VLI_MAX) - block_bound < HEADERS_BOUND)
+ return 0;
+
+ return block_bound + HEADERS_BOUND;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
+ const lzma_allocator *allocator,
+ const uint8_t *in, size_t in_size,
+ uint8_t *out, size_t *out_pos_ptr, size_t out_size)
+{
+ // Sanity checks
+ if (filters == NULL || (unsigned int)(check) > LZMA_CHECK_ID_MAX
+ || (in == NULL && in_size != 0) || out == NULL
+ || out_pos_ptr == NULL || *out_pos_ptr > out_size)
+ return LZMA_PROG_ERROR;
+
+ if (!lzma_check_is_supported(check))
+ return LZMA_UNSUPPORTED_CHECK;
+
+ // Note for the paranoids: Index encoder prevents the Stream from
+ // getting too big and still being accepted with LZMA_OK, and Block
+ // encoder catches if the input is too big. So we don't need to
+ // separately check if the buffers are too big.
+
+ // Use a local copy. We update *out_pos_ptr only if everything
+ // succeeds.
+ size_t out_pos = *out_pos_ptr;
+
+ // Check that there's enough space for both Stream Header and
+ // Stream Footer.
+ if (out_size - out_pos <= 2 * LZMA_STREAM_HEADER_SIZE)
+ return LZMA_BUF_ERROR;
+
+ // Reserve space for Stream Footer so we don't need to check for
+ // available space again before encoding Stream Footer.
+ out_size -= LZMA_STREAM_HEADER_SIZE;
+
+ // Encode the Stream Header.
+ lzma_stream_flags stream_flags = {
+ .version = 0,
+ .check = check,
+ };
+
+ if (lzma_stream_header_encode(&stream_flags, out + out_pos)
+ != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ out_pos += LZMA_STREAM_HEADER_SIZE;
+
+ // Encode a Block but only if there is at least one byte of input.
+ lzma_block block = {
+ .version = 0,
+ .check = check,
+ .filters = filters,
+ };
+
+ if (in_size > 0)
+ return_if_error(lzma_block_buffer_encode(&block, allocator,
+ in, in_size, out, &out_pos, out_size));
+
+ // Index
+ {
+ // Create an Index. It will have one Record if there was
+ // at least one byte of input to encode. Otherwise the
+ // Index will be empty.
+ lzma_index *i = lzma_index_init(allocator);
+ if (i == NULL)
+ return LZMA_MEM_ERROR;
+
+ lzma_ret ret = LZMA_OK;
+
+ if (in_size > 0)
+ ret = lzma_index_append(i, allocator,
+ lzma_block_unpadded_size(&block),
+ block.uncompressed_size);
+
+ // If adding the Record was successful, encode the Index
+ // and get its size which will be stored into Stream Footer.
+ if (ret == LZMA_OK) {
+ ret = lzma_index_buffer_encode(
+ i, out, &out_pos, out_size);
+
+ stream_flags.backward_size = lzma_index_size(i);
+ }
+
+ lzma_index_end(i, allocator);
+
+ if (ret != LZMA_OK)
+ return ret;
+ }
+
+ // Stream Footer. We have already reserved space for this.
+ if (lzma_stream_footer_encode(&stream_flags, out + out_pos)
+ != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ out_pos += LZMA_STREAM_HEADER_SIZE;
+
+ // Everything went fine, make the new output position available
+ // to the application.
+ *out_pos_ptr = out_pos;
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/stream_decoder.c b/src/liblzma/common/stream_decoder.c
new file mode 100644
index 0000000..6428381
--- /dev/null
+++ b/src/liblzma/common/stream_decoder.c
@@ -0,0 +1,474 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_decoder.c
+/// \brief Decodes .xz Streams
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_decoder.h"
+#include "block_decoder.h"
+#include "index.h"
+
+
+typedef struct {
+ enum {
+ SEQ_STREAM_HEADER,
+ SEQ_BLOCK_HEADER,
+ SEQ_BLOCK_INIT,
+ SEQ_BLOCK_RUN,
+ SEQ_INDEX,
+ SEQ_STREAM_FOOTER,
+ SEQ_STREAM_PADDING,
+ } sequence;
+
+ /// Block decoder
+ lzma_next_coder block_decoder;
+
+ /// Block options decoded by the Block Header decoder and used by
+ /// the Block decoder.
+ lzma_block block_options;
+
+ /// Stream Flags from Stream Header
+ lzma_stream_flags stream_flags;
+
+ /// Index is hashed so that it can be compared to the sizes of Blocks
+ /// with O(1) memory usage.
+ lzma_index_hash *index_hash;
+
+ /// Memory usage limit
+ uint64_t memlimit;
+
+ /// Amount of memory actually needed (only an estimate)
+ uint64_t memusage;
+
+ /// If true, LZMA_NO_CHECK is returned if the Stream has
+ /// no integrity check.
+ bool tell_no_check;
+
+ /// If true, LZMA_UNSUPPORTED_CHECK is returned if the Stream has
+ /// an integrity check that isn't supported by this liblzma build.
+ bool tell_unsupported_check;
+
+ /// If true, LZMA_GET_CHECK is returned after decoding Stream Header.
+ bool tell_any_check;
+
+ /// If true, we will tell the Block decoder to skip calculating
+ /// and verifying the integrity check.
+ bool ignore_check;
+
+ /// If true, we will decode concatenated Streams that possibly have
+ /// Stream Padding between or after them. LZMA_STREAM_END is returned
+ /// once the application isn't giving us any new input (LZMA_FINISH),
+ /// and we aren't in the middle of a Stream, and possible
+ /// Stream Padding is a multiple of four bytes.
+ bool concatenated;
+
+ /// When decoding concatenated Streams, this is true as long as we
+ /// are decoding the first Stream. This is needed to avoid misleading
+ /// LZMA_FORMAT_ERROR in case the later Streams don't have valid magic
+ /// bytes.
+ bool first_stream;
+
+ /// Write position in buffer[] and position in Stream Padding
+ size_t pos;
+
+ /// Buffer to hold Stream Header, Block Header, and Stream Footer.
+ /// Block Header has biggest maximum size.
+ uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
+} lzma_stream_coder;
+
+
+static lzma_ret
+stream_decoder_reset(lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+ // Initialize the Index hash used to verify the Index.
+ coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator);
+ if (coder->index_hash == NULL)
+ return LZMA_MEM_ERROR;
+
+ // Reset the rest of the variables.
+ coder->sequence = SEQ_STREAM_HEADER;
+ coder->pos = 0;
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
+stream_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ // When decoding the actual Block, it may be able to produce more
+ // output even if we don't give it any new input.
+ while (true)
+ switch (coder->sequence) {
+ case SEQ_STREAM_HEADER: {
+ // Copy the Stream Header to the internal buffer.
+ lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+ LZMA_STREAM_HEADER_SIZE);
+
+ // Return if we didn't get the whole Stream Header yet.
+ if (coder->pos < LZMA_STREAM_HEADER_SIZE)
+ return LZMA_OK;
+
+ coder->pos = 0;
+
+ // Decode the Stream Header.
+ const lzma_ret ret = lzma_stream_header_decode(
+ &coder->stream_flags, coder->buffer);
+ if (ret != LZMA_OK)
+ return ret == LZMA_FORMAT_ERROR && !coder->first_stream
+ ? LZMA_DATA_ERROR : ret;
+
+ // If we are decoding concatenated Streams, and the later
+ // Streams have invalid Header Magic Bytes, we give
+ // LZMA_DATA_ERROR instead of LZMA_FORMAT_ERROR.
+ coder->first_stream = false;
+
+ // Copy the type of the Check so that Block Header and Block
+ // decoders see it.
+ coder->block_options.check = coder->stream_flags.check;
+
+ // Even if we return LZMA_*_CHECK below, we want
+ // to continue from Block Header decoding.
+ coder->sequence = SEQ_BLOCK_HEADER;
+
+ // Detect if there's no integrity check or if it is
+ // unsupported if those were requested by the application.
+ if (coder->tell_no_check && coder->stream_flags.check
+ == LZMA_CHECK_NONE)
+ return LZMA_NO_CHECK;
+
+ if (coder->tell_unsupported_check
+ && !lzma_check_is_supported(
+ coder->stream_flags.check))
+ return LZMA_UNSUPPORTED_CHECK;
+
+ if (coder->tell_any_check)
+ return LZMA_GET_CHECK;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_HEADER: {
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ if (coder->pos == 0) {
+ // Detect if it's Index.
+ if (in[*in_pos] == INDEX_INDICATOR) {
+ coder->sequence = SEQ_INDEX;
+ break;
+ }
+
+ // Calculate the size of the Block Header. Note that
+ // Block Header decoder wants to see this byte too
+ // so don't advance *in_pos.
+ coder->block_options.header_size
+ = lzma_block_header_size_decode(
+ in[*in_pos]);
+ }
+
+ // Copy the Block Header to the internal buffer.
+ lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+ coder->block_options.header_size);
+
+ // Return if we didn't get the whole Block Header yet.
+ if (coder->pos < coder->block_options.header_size)
+ return LZMA_OK;
+
+ coder->pos = 0;
+ coder->sequence = SEQ_BLOCK_INIT;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_INIT: {
+ // Checking memusage and doing the initialization needs
+ // its own sequence point because we need to be able to
+ // retry if we return LZMA_MEMLIMIT_ERROR.
+
+ // Version 1 is needed to support the .ignore_check option.
+ coder->block_options.version = 1;
+
+ // Set up a buffer to hold the filter chain. Block Header
+ // decoder will initialize all members of this array so
+ // we don't need to do it here.
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+ coder->block_options.filters = filters;
+
+ // Decode the Block Header.
+ return_if_error(lzma_block_header_decode(&coder->block_options,
+ allocator, coder->buffer));
+
+ // If LZMA_IGNORE_CHECK was used, this flag needs to be set.
+ // It has to be set after lzma_block_header_decode() because
+ // it always resets this to false.
+ coder->block_options.ignore_check = coder->ignore_check;
+
+ // Check the memory usage limit.
+ const uint64_t memusage = lzma_raw_decoder_memusage(filters);
+ lzma_ret ret;
+
+ if (memusage == UINT64_MAX) {
+ // One or more unknown Filter IDs.
+ ret = LZMA_OPTIONS_ERROR;
+ } else {
+ // Now we can set coder->memusage since we know that
+ // the filter chain is valid. We don't want
+ // lzma_memusage() to return UINT64_MAX in case of
+ // invalid filter chain.
+ coder->memusage = memusage;
+
+ if (memusage > coder->memlimit) {
+ // The chain would need too much memory.
+ ret = LZMA_MEMLIMIT_ERROR;
+ } else {
+ // Memory usage is OK.
+ // Initialize the Block decoder.
+ ret = lzma_block_decoder_init(
+ &coder->block_decoder,
+ allocator,
+ &coder->block_options);
+ }
+ }
+
+ // Free the allocated filter options since they are needed
+ // only to initialize the Block decoder.
+ lzma_filters_free(filters, allocator);
+ coder->block_options.filters = NULL;
+
+ // Check if memory usage calculation and Block decoder
+ // initialization succeeded.
+ if (ret != LZMA_OK)
+ return ret;
+
+ coder->sequence = SEQ_BLOCK_RUN;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_RUN: {
+ const lzma_ret ret = coder->block_decoder.code(
+ coder->block_decoder.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size,
+ action);
+
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ // Block decoded successfully. Add the new size pair to
+ // the Index hash.
+ return_if_error(lzma_index_hash_append(coder->index_hash,
+ lzma_block_unpadded_size(
+ &coder->block_options),
+ coder->block_options.uncompressed_size));
+
+ coder->sequence = SEQ_BLOCK_HEADER;
+ break;
+ }
+
+ case SEQ_INDEX: {
+ // If we don't have any input, don't call
+ // lzma_index_hash_decode() since it would return
+ // LZMA_BUF_ERROR, which we must not do here.
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ // Decode the Index and compare it to the hash calculated
+ // from the sizes of the Blocks (if any).
+ const lzma_ret ret = lzma_index_hash_decode(coder->index_hash,
+ in, in_pos, in_size);
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ coder->sequence = SEQ_STREAM_FOOTER;
+ }
+
+ // Fall through
+
+ case SEQ_STREAM_FOOTER: {
+ // Copy the Stream Footer to the internal buffer.
+ lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+ LZMA_STREAM_HEADER_SIZE);
+
+ // Return if we didn't get the whole Stream Footer yet.
+ if (coder->pos < LZMA_STREAM_HEADER_SIZE)
+ return LZMA_OK;
+
+ coder->pos = 0;
+
+ // Decode the Stream Footer. The decoder gives
+ // LZMA_FORMAT_ERROR if the magic bytes don't match,
+ // so convert that return code to LZMA_DATA_ERROR.
+ lzma_stream_flags footer_flags;
+ const lzma_ret ret = lzma_stream_footer_decode(
+ &footer_flags, coder->buffer);
+ if (ret != LZMA_OK)
+ return ret == LZMA_FORMAT_ERROR
+ ? LZMA_DATA_ERROR : ret;
+
+ // Check that Index Size stored in the Stream Footer matches
+ // the real size of the Index field.
+ if (lzma_index_hash_size(coder->index_hash)
+ != footer_flags.backward_size)
+ return LZMA_DATA_ERROR;
+
+ // Compare that the Stream Flags fields are identical in
+ // both Stream Header and Stream Footer.
+ return_if_error(lzma_stream_flags_compare(
+ &coder->stream_flags, &footer_flags));
+
+ if (!coder->concatenated)
+ return LZMA_STREAM_END;
+
+ coder->sequence = SEQ_STREAM_PADDING;
+ }
+
+ // Fall through
+
+ case SEQ_STREAM_PADDING:
+ assert(coder->concatenated);
+
+ // Skip over possible Stream Padding.
+ while (true) {
+ if (*in_pos >= in_size) {
+ // Unless LZMA_FINISH was used, we cannot
+ // know if there's more input coming later.
+ if (action != LZMA_FINISH)
+ return LZMA_OK;
+
+ // Stream Padding must be a multiple of
+ // four bytes.
+ return coder->pos == 0
+ ? LZMA_STREAM_END
+ : LZMA_DATA_ERROR;
+ }
+
+ // If the byte is not zero, it probably indicates
+ // beginning of a new Stream (or the file is corrupt).
+ if (in[*in_pos] != 0x00)
+ break;
+
+ ++*in_pos;
+ coder->pos = (coder->pos + 1) & 3;
+ }
+
+ // Stream Padding must be a multiple of four bytes (empty
+ // Stream Padding is OK).
+ if (coder->pos != 0) {
+ ++*in_pos;
+ return LZMA_DATA_ERROR;
+ }
+
+ // Prepare to decode the next Stream.
+ return_if_error(stream_decoder_reset(coder, allocator));
+ break;
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ // Never reached
+}
+
+
+static void
+stream_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_stream_coder *coder = coder_ptr;
+ lzma_next_end(&coder->block_decoder, allocator);
+ lzma_index_hash_end(coder->index_hash, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_check
+stream_decoder_get_check(const void *coder_ptr)
+{
+ const lzma_stream_coder *coder = coder_ptr;
+ return coder->stream_flags.check;
+}
+
+
+static lzma_ret
+stream_decoder_memconfig(void *coder_ptr, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ *memusage = coder->memusage;
+ *old_memlimit = coder->memlimit;
+
+ if (new_memlimit != 0) {
+ if (new_memlimit < coder->memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ coder->memlimit = new_memlimit;
+ }
+
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_stream_decoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t memlimit, uint32_t flags)
+{
+ lzma_next_coder_init(&lzma_stream_decoder_init, next, allocator);
+
+ if (flags & ~LZMA_SUPPORTED_FLAGS)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_stream_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &stream_decode;
+ next->end = &stream_decoder_end;
+ next->get_check = &stream_decoder_get_check;
+ next->memconfig = &stream_decoder_memconfig;
+
+ coder->block_decoder = LZMA_NEXT_CODER_INIT;
+ coder->index_hash = NULL;
+ }
+
+ coder->memlimit = my_max(1, memlimit);
+ coder->memusage = LZMA_MEMUSAGE_BASE;
+ coder->tell_no_check = (flags & LZMA_TELL_NO_CHECK) != 0;
+ coder->tell_unsupported_check
+ = (flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0;
+ coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0;
+ coder->ignore_check = (flags & LZMA_IGNORE_CHECK) != 0;
+ coder->concatenated = (flags & LZMA_CONCATENATED) != 0;
+ coder->first_stream = true;
+
+ return stream_decoder_reset(coder, allocator);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
+{
+ lzma_next_strm_init(lzma_stream_decoder_init, strm, memlimit, flags);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/stream_decoder.h b/src/liblzma/common/stream_decoder.h
new file mode 100644
index 0000000..c13c6ba
--- /dev/null
+++ b/src/liblzma/common/stream_decoder.h
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_decoder.h
+/// \brief Decodes .xz Streams
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_STREAM_DECODER_H
+#define LZMA_STREAM_DECODER_H
+
+#include "common.h"
+
+extern lzma_ret lzma_stream_decoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ uint64_t memlimit, uint32_t flags);
+
+#endif
diff --git a/src/liblzma/common/stream_decoder_mt.c b/src/liblzma/common/stream_decoder_mt.c
new file mode 100644
index 0000000..76212b4
--- /dev/null
+++ b/src/liblzma/common/stream_decoder_mt.c
@@ -0,0 +1,2018 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_decoder_mt.c
+/// \brief Multithreaded .xz Stream decoder
+//
+// Authors: Sebastian Andrzej Siewior
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+#include "block_decoder.h"
+#include "stream_decoder.h"
+#include "index.h"
+#include "outqueue.h"
+
+
+typedef enum {
+ /// Waiting for work.
+ /// Main thread may change this to THR_RUN or THR_EXIT.
+ THR_IDLE,
+
+ /// Decoding is in progress.
+ /// Main thread may change this to THR_STOP or THR_EXIT.
+ /// The worker thread may change this to THR_IDLE.
+ THR_RUN,
+
+ /// The main thread wants the thread to stop whatever it was doing
+ /// but not exit. Main thread may change this to THR_EXIT.
+ /// The worker thread may change this to THR_IDLE.
+ THR_STOP,
+
+ /// The main thread wants the thread to exit.
+ THR_EXIT,
+
+} worker_state;
+
+
+typedef enum {
+ /// Partial updates (storing of worker thread progress
+ /// to lzma_outbuf) are disabled.
+ PARTIAL_DISABLED,
+
+ /// Main thread requests partial updates to be enabled but
+ /// no partial update has been done by the worker thread yet.
+ ///
+ /// Changing from PARTIAL_DISABLED to PARTIAL_START requires
+ /// use of the worker-thread mutex. Other transitions don't
+ /// need a mutex.
+ PARTIAL_START,
+
+ /// Partial updates are enabled and the worker thread has done
+ /// at least one partial update.
+ PARTIAL_ENABLED,
+
+} partial_update_mode;
+
+
+struct worker_thread {
+ /// Worker state is protected with our mutex.
+ worker_state state;
+
+ /// Input buffer that will contain the whole Block except Block Header.
+ uint8_t *in;
+
+ /// Amount of memory allocated for "in"
+ size_t in_size;
+
+ /// Number of bytes written to "in" by the main thread
+ size_t in_filled;
+
+ /// Number of bytes consumed from "in" by the worker thread.
+ size_t in_pos;
+
+ /// Amount of uncompressed data that has been decoded. This local
+ /// copy is needed because updating outbuf->pos requires locking
+ /// the main mutex (coder->mutex).
+ size_t out_pos;
+
+ /// Pointer to the main structure is needed to (1) lock the main
+ /// mutex (coder->mutex) when updating outbuf->pos and (2) when
+ /// putting this thread back to the stack of free threads.
+ struct lzma_stream_coder *coder;
+
+ /// The allocator is set by the main thread. Since a copy of the
+ /// pointer is kept here, the application must not change the
+ /// allocator before calling lzma_end().
+ const lzma_allocator *allocator;
+
+ /// Output queue buffer to which the uncompressed data is written.
+ lzma_outbuf *outbuf;
+
+ /// Amount of compressed data that has already been decompressed.
+ /// This is updated from in_pos when our mutex is locked.
+ /// This is size_t, not uint64_t, because per-thread progress
+ /// is limited to sizes of allocated buffers.
+ size_t progress_in;
+
+ /// Like progress_in but for uncompressed data.
+ size_t progress_out;
+
+ /// Updating outbuf->pos requires locking the main mutex
+ /// (coder->mutex). Since the main thread will only read output
+ /// from the oldest outbuf in the queue, only the worker thread
+ /// that is associated with the oldest outbuf needs to update its
+ /// outbuf->pos. This avoids useless mutex contention that would
+ /// happen if all worker threads were frequently locking the main
+ /// mutex to update their outbuf->pos.
+ ///
+ /// Only when partial_update is something else than PARTIAL_DISABLED,
+ /// this worker thread will update outbuf->pos after each call to
+ /// the Block decoder.
+ partial_update_mode partial_update;
+
+ /// Block decoder
+ lzma_next_coder block_decoder;
+
+ /// Thread-specific Block options are needed because the Block
+ /// decoder modifies the struct given to it at initialization.
+ lzma_block block_options;
+
+ /// Filter chain memory usage
+ uint64_t mem_filters;
+
+ /// Next structure in the stack of free worker threads.
+ struct worker_thread *next;
+
+ mythread_mutex mutex;
+ mythread_cond cond;
+
+ /// The ID of this thread is used to join the thread
+ /// when it's not needed anymore.
+ mythread thread_id;
+};
+
+
+struct lzma_stream_coder {
+ enum {
+ SEQ_STREAM_HEADER,
+ SEQ_BLOCK_HEADER,
+ SEQ_BLOCK_INIT,
+ SEQ_BLOCK_THR_INIT,
+ SEQ_BLOCK_THR_RUN,
+ SEQ_BLOCK_DIRECT_INIT,
+ SEQ_BLOCK_DIRECT_RUN,
+ SEQ_INDEX_WAIT_OUTPUT,
+ SEQ_INDEX_DECODE,
+ SEQ_STREAM_FOOTER,
+ SEQ_STREAM_PADDING,
+ SEQ_ERROR,
+ } sequence;
+
+ /// Block decoder
+ lzma_next_coder block_decoder;
+
+ /// Every Block Header will be decoded into this structure.
+ /// This is also used to initialize a Block decoder when in
+ /// direct mode. In threaded mode, a thread-specific copy will
+ /// be made for decoder initialization because the Block decoder
+ /// will modify the structure given to it.
+ lzma_block block_options;
+
+ /// Buffer to hold a filter chain for Block Header decoding and
+ /// initialization. These are freed after successful Block decoder
+ /// initialization or at stream_decoder_mt_end(). The thread-specific
+ /// copy of block_options won't hold a pointer to filters[] after
+ /// initialization.
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+ /// Stream Flags from Stream Header
+ lzma_stream_flags stream_flags;
+
+ /// Index is hashed so that it can be compared to the sizes of Blocks
+ /// with O(1) memory usage.
+ lzma_index_hash *index_hash;
+
+
+ /// Maximum wait time if cannot use all the input and cannot
+ /// fill the output buffer. This is in milliseconds.
+ uint32_t timeout;
+
+
+ /// Error code from a worker thread.
+ ///
+ /// \note Use mutex.
+ lzma_ret thread_error;
+
+ /// Error code to return after pending output has been copied out. If
+ /// set in read_output_and_wait(), this is a mirror of thread_error.
+ /// If set in stream_decode_mt() then it's, for example, error that
+ /// occurred when decoding Block Header.
+ lzma_ret pending_error;
+
+ /// Number of threads that will be created at maximum.
+ uint32_t threads_max;
+
+ /// Number of thread structures that have been initialized from
+ /// "threads", and thus the number of worker threads actually
+ /// created so far.
+ uint32_t threads_initialized;
+
+ /// Array of allocated thread-specific structures. When no threads
+ /// are in use (direct mode) this is NULL. In threaded mode this
+ /// points to an array of threads_max number of worker_thread structs.
+ struct worker_thread *threads;
+
+ /// Stack of free threads. When a thread finishes, it puts itself
+ /// back into this stack. This starts as empty because threads
+ /// are created only when actually needed.
+ ///
+ /// \note Use mutex.
+ struct worker_thread *threads_free;
+
+ /// The most recent worker thread to which the main thread writes
+ /// the new input from the application.
+ struct worker_thread *thr;
+
+ /// Output buffer queue for decompressed data from the worker threads
+ ///
+ /// \note Use mutex with operations that need it.
+ lzma_outq outq;
+
+ mythread_mutex mutex;
+ mythread_cond cond;
+
+
+ /// Memory usage that will not be exceeded in multi-threaded mode.
+ /// Single-threaded mode can exceed this even by a large amount.
+ uint64_t memlimit_threading;
+
+ /// Memory usage limit that should never be exceeded.
+ /// LZMA_MEMLIMIT_ERROR will be returned if decoding isn't possible
+ /// even in single-threaded mode without exceeding this limit.
+ uint64_t memlimit_stop;
+
+ /// Amount of memory in use by the direct mode decoder
+ /// (coder->block_decoder). In threaded mode this is 0.
+ uint64_t mem_direct_mode;
+
+ /// Amount of memory needed by the running worker threads.
+ /// This doesn't include the memory needed by the output buffer.
+ ///
+ /// \note Use mutex.
+ uint64_t mem_in_use;
+
+ /// Amount of memory used by the idle (cached) threads.
+ ///
+ /// \note Use mutex.
+ uint64_t mem_cached;
+
+
+ /// Amount of memory needed for the filter chain of the next Block.
+ uint64_t mem_next_filters;
+
+ /// Amount of memory needed for the thread-specific input buffer
+ /// for the next Block.
+ uint64_t mem_next_in;
+
+ /// Amount of memory actually needed to decode the next Block
+ /// in threaded mode. This is
+ /// mem_next_filters + mem_next_in + memory needed for lzma_outbuf.
+ uint64_t mem_next_block;
+
+
+ /// Amount of compressed data in Stream Header + Blocks that have
+ /// already been finished.
+ ///
+ /// \note Use mutex.
+ uint64_t progress_in;
+
+ /// Amount of uncompressed data in Blocks that have already
+ /// been finished.
+ ///
+ /// \note Use mutex.
+ uint64_t progress_out;
+
+
+ /// If true, LZMA_NO_CHECK is returned if the Stream has
+ /// no integrity check.
+ bool tell_no_check;
+
+ /// If true, LZMA_UNSUPPORTED_CHECK is returned if the Stream has
+ /// an integrity check that isn't supported by this liblzma build.
+ bool tell_unsupported_check;
+
+ /// If true, LZMA_GET_CHECK is returned after decoding Stream Header.
+ bool tell_any_check;
+
+ /// If true, we will tell the Block decoder to skip calculating
+ /// and verifying the integrity check.
+ bool ignore_check;
+
+ /// If true, we will decode concatenated Streams that possibly have
+ /// Stream Padding between or after them. LZMA_STREAM_END is returned
+ /// once the application isn't giving us any new input (LZMA_FINISH),
+ /// and we aren't in the middle of a Stream, and possible
+ /// Stream Padding is a multiple of four bytes.
+ bool concatenated;
+
+ /// If true, we will return any errors immediately instead of first
+ /// producing all output before the location of the error.
+ bool fail_fast;
+
+
+ /// When decoding concatenated Streams, this is true as long as we
+ /// are decoding the first Stream. This is needed to avoid misleading
+ /// LZMA_FORMAT_ERROR in case the later Streams don't have valid magic
+ /// bytes.
+ bool first_stream;
+
+ /// This is used to track if the previous call to stream_decode_mt()
+ /// had output space (*out_pos < out_size) and managed to fill the
+ /// output buffer (*out_pos == out_size). This may be set to true
+ /// in read_output_and_wait(). This is read and then reset to false
+ /// at the beginning of stream_decode_mt().
+ ///
+ /// This is needed to support applications that call lzma_code() in
+ /// such a way that more input is provided only when lzma_code()
+ /// didn't fill the output buffer completely. Basically, this makes
+ /// it easier to convert such applications from single-threaded
+ /// decoder to multi-threaded decoder.
+ bool out_was_filled;
+
+ /// Write position in buffer[] and position in Stream Padding
+ size_t pos;
+
+ /// Buffer to hold Stream Header, Block Header, and Stream Footer.
+ /// Block Header has biggest maximum size.
+ uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
+};
+
+
+/// Enables updating of outbuf->pos. This is a callback function that is
+/// used with lzma_outq_enable_partial_output().
+static void
+worker_enable_partial_update(void *thr_ptr)
+{
+ struct worker_thread *thr = thr_ptr;
+
+ mythread_sync(thr->mutex) {
+ thr->partial_update = PARTIAL_START;
+ mythread_cond_signal(&thr->cond);
+ }
+}
+
+
+/// Things do to at THR_STOP or when finishing a Block.
+/// This is called with thr->mutex locked.
+static void
+worker_stop(struct worker_thread *thr)
+{
+ // Update memory usage counters.
+ thr->coder->mem_in_use -= thr->in_size;
+ thr->in_size = 0; // thr->in was freed above.
+
+ thr->coder->mem_in_use -= thr->mem_filters;
+ thr->coder->mem_cached += thr->mem_filters;
+
+ // Put this thread to the stack of free threads.
+ thr->next = thr->coder->threads_free;
+ thr->coder->threads_free = thr;
+
+ mythread_cond_signal(&thr->coder->cond);
+ return;
+}
+
+
+static MYTHREAD_RET_TYPE
+worker_decoder(void *thr_ptr)
+{
+ struct worker_thread *thr = thr_ptr;
+ size_t in_filled;
+ partial_update_mode partial_update;
+ lzma_ret ret;
+
+next_loop_lock:
+
+ mythread_mutex_lock(&thr->mutex);
+next_loop_unlocked:
+
+ if (thr->state == THR_IDLE) {
+ mythread_cond_wait(&thr->cond, &thr->mutex);
+ goto next_loop_unlocked;
+ }
+
+ if (thr->state == THR_EXIT) {
+ mythread_mutex_unlock(&thr->mutex);
+
+ lzma_free(thr->in, thr->allocator);
+ lzma_next_end(&thr->block_decoder, thr->allocator);
+
+ mythread_mutex_destroy(&thr->mutex);
+ mythread_cond_destroy(&thr->cond);
+
+ return MYTHREAD_RET_VALUE;
+ }
+
+ if (thr->state == THR_STOP) {
+ thr->state = THR_IDLE;
+ mythread_mutex_unlock(&thr->mutex);
+
+ mythread_sync(thr->coder->mutex) {
+ worker_stop(thr);
+ }
+
+ goto next_loop_lock;
+ }
+
+ assert(thr->state == THR_RUN);
+
+ // Update progress info for get_progress().
+ thr->progress_in = thr->in_pos;
+ thr->progress_out = thr->out_pos;
+
+ // If we don't have any new input, wait for a signal from the main
+ // thread except if partial output has just been enabled. In that
+ // case we will do one normal run so that the partial output info
+ // gets passed to the main thread. The call to block_decoder.code()
+ // is useless but harmless as it can occur only once per Block.
+ in_filled = thr->in_filled;
+ partial_update = thr->partial_update;
+
+ if (in_filled == thr->in_pos && partial_update != PARTIAL_START) {
+ mythread_cond_wait(&thr->cond, &thr->mutex);
+ goto next_loop_unlocked;
+ }
+
+ mythread_mutex_unlock(&thr->mutex);
+
+ // Pass the input in small chunks to the Block decoder.
+ // This way we react reasonably fast if we are told to stop/exit,
+ // and (when partial update is enabled) we tell about our progress
+ // to the main thread frequently enough.
+ const size_t chunk_size = 16384;
+ if ((in_filled - thr->in_pos) > chunk_size)
+ in_filled = thr->in_pos + chunk_size;
+
+ ret = thr->block_decoder.code(
+ thr->block_decoder.coder, thr->allocator,
+ thr->in, &thr->in_pos, in_filled,
+ thr->outbuf->buf, &thr->out_pos,
+ thr->outbuf->allocated, LZMA_RUN);
+
+ if (ret == LZMA_OK) {
+ if (partial_update != PARTIAL_DISABLED) {
+ // The main thread uses thr->mutex to change from
+ // PARTIAL_DISABLED to PARTIAL_START. The main thread
+ // doesn't care about this variable after that so we
+ // can safely change it here to PARTIAL_ENABLED
+ // without a mutex.
+ thr->partial_update = PARTIAL_ENABLED;
+
+ // The main thread is reading decompressed data
+ // from thr->outbuf. Tell the main thread about
+ // our progress.
+ //
+ // NOTE: It's possible that we consumed input without
+ // producing any new output so it's possible that
+ // only in_pos has changed. In case of PARTIAL_START
+ // it is possible that neither in_pos nor out_pos has
+ // changed.
+ mythread_sync(thr->coder->mutex) {
+ thr->outbuf->pos = thr->out_pos;
+ thr->outbuf->decoder_in_pos = thr->in_pos;
+ mythread_cond_signal(&thr->coder->cond);
+ }
+ }
+
+ goto next_loop_lock;
+ }
+
+ // Either we finished successfully (LZMA_STREAM_END) or an error
+ // occurred. Both cases are handled almost identically. The error
+ // case requires updating thr->coder->thread_error.
+ //
+ // The sizes are in the Block Header and the Block decoder
+ // checks that they match, thus we know these:
+ assert(ret != LZMA_STREAM_END || thr->in_pos == thr->in_size);
+ assert(ret != LZMA_STREAM_END
+ || thr->out_pos == thr->block_options.uncompressed_size);
+
+ // Free the input buffer. Don't update in_size as we need
+ // it later to update thr->coder->mem_in_use.
+ lzma_free(thr->in, thr->allocator);
+ thr->in = NULL;
+
+ mythread_sync(thr->mutex) {
+ if (thr->state != THR_EXIT)
+ thr->state = THR_IDLE;
+ }
+
+ mythread_sync(thr->coder->mutex) {
+ // Move our progress info to the main thread.
+ thr->coder->progress_in += thr->in_pos;
+ thr->coder->progress_out += thr->out_pos;
+ thr->progress_in = 0;
+ thr->progress_out = 0;
+
+ // Mark the outbuf as finished.
+ thr->outbuf->pos = thr->out_pos;
+ thr->outbuf->decoder_in_pos = thr->in_pos;
+ thr->outbuf->finished = true;
+ thr->outbuf->finish_ret = ret;
+ thr->outbuf = NULL;
+
+ // If an error occurred, tell it to the main thread.
+ if (ret != LZMA_STREAM_END
+ && thr->coder->thread_error == LZMA_OK)
+ thr->coder->thread_error = ret;
+
+ worker_stop(thr);
+ }
+
+ goto next_loop_lock;
+}
+
+
+/// Tells the worker threads to exit and waits for them to terminate.
+static void
+threads_end(struct lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+ for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
+ mythread_sync(coder->threads[i].mutex) {
+ coder->threads[i].state = THR_EXIT;
+ mythread_cond_signal(&coder->threads[i].cond);
+ }
+ }
+
+ for (uint32_t i = 0; i < coder->threads_initialized; ++i)
+ mythread_join(coder->threads[i].thread_id);
+
+ lzma_free(coder->threads, allocator);
+ coder->threads_initialized = 0;
+ coder->threads = NULL;
+ coder->threads_free = NULL;
+
+ // The threads don't update these when they exit. Do it here.
+ coder->mem_in_use = 0;
+ coder->mem_cached = 0;
+
+ return;
+}
+
+
+static void
+threads_stop(struct lzma_stream_coder *coder)
+{
+ for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
+ mythread_sync(coder->threads[i].mutex) {
+ // The state must be changed conditionally because
+ // THR_IDLE -> THR_STOP is not a valid state change.
+ if (coder->threads[i].state != THR_IDLE) {
+ coder->threads[i].state = THR_STOP;
+ mythread_cond_signal(&coder->threads[i].cond);
+ }
+ }
+ }
+
+ return;
+}
+
+
+/// Initialize a new worker_thread structure and create a new thread.
+static lzma_ret
+initialize_new_thread(struct lzma_stream_coder *coder,
+ const lzma_allocator *allocator)
+{
+ // Allocate the coder->threads array if needed. It's done here instead
+ // of when initializing the decoder because we don't need this if we
+ // use the direct mode (we may even free coder->threads in the middle
+ // of the file if we switch from threaded to direct mode).
+ if (coder->threads == NULL) {
+ coder->threads = lzma_alloc(
+ coder->threads_max * sizeof(struct worker_thread),
+ allocator);
+
+ if (coder->threads == NULL)
+ return LZMA_MEM_ERROR;
+ }
+
+ // Pick a free structure.
+ assert(coder->threads_initialized < coder->threads_max);
+ struct worker_thread *thr
+ = &coder->threads[coder->threads_initialized];
+
+ if (mythread_mutex_init(&thr->mutex))
+ goto error_mutex;
+
+ if (mythread_cond_init(&thr->cond))
+ goto error_cond;
+
+ thr->state = THR_IDLE;
+ thr->in = NULL;
+ thr->in_size = 0;
+ thr->allocator = allocator;
+ thr->coder = coder;
+ thr->outbuf = NULL;
+ thr->block_decoder = LZMA_NEXT_CODER_INIT;
+ thr->mem_filters = 0;
+
+ if (mythread_create(&thr->thread_id, worker_decoder, thr))
+ goto error_thread;
+
+ ++coder->threads_initialized;
+ coder->thr = thr;
+
+ return LZMA_OK;
+
+error_thread:
+ mythread_cond_destroy(&thr->cond);
+
+error_cond:
+ mythread_mutex_destroy(&thr->mutex);
+
+error_mutex:
+ return LZMA_MEM_ERROR;
+}
+
+
+static lzma_ret
+get_thread(struct lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+ // If there is a free structure on the stack, use it.
+ mythread_sync(coder->mutex) {
+ if (coder->threads_free != NULL) {
+ coder->thr = coder->threads_free;
+ coder->threads_free = coder->threads_free->next;
+
+ // The thread is no longer in the cache so subtract
+ // it from the cached memory usage. Don't add it
+ // to mem_in_use though; the caller will handle it
+ // since it knows how much memory it will actually
+ // use (the filter chain might change).
+ coder->mem_cached -= coder->thr->mem_filters;
+ }
+ }
+
+ if (coder->thr == NULL) {
+ assert(coder->threads_initialized < coder->threads_max);
+
+ // Initialize a new thread.
+ return_if_error(initialize_new_thread(coder, allocator));
+ }
+
+ coder->thr->in_filled = 0;
+ coder->thr->in_pos = 0;
+ coder->thr->out_pos = 0;
+
+ coder->thr->progress_in = 0;
+ coder->thr->progress_out = 0;
+
+ coder->thr->partial_update = PARTIAL_DISABLED;
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
+read_output_and_wait(struct lzma_stream_coder *coder,
+ const lzma_allocator *allocator,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size,
+ bool *input_is_possible,
+ bool waiting_allowed,
+ mythread_condtime *wait_abs, bool *has_blocked)
+{
+ lzma_ret ret = LZMA_OK;
+
+ mythread_sync(coder->mutex) {
+ do {
+ // Get as much output from the queue as is possible
+ // without blocking.
+ const size_t out_start = *out_pos;
+ do {
+ ret = lzma_outq_read(&coder->outq, allocator,
+ out, out_pos, out_size,
+ NULL, NULL);
+
+ // If a Block was finished, tell the worker
+ // thread of the next Block (if it is still
+ // running) to start telling the main thread
+ // when new output is available.
+ if (ret == LZMA_STREAM_END)
+ lzma_outq_enable_partial_output(
+ &coder->outq,
+ &worker_enable_partial_update);
+
+ // Loop until a Block wasn't finished.
+ // It's important to loop around even if
+ // *out_pos == out_size because there could
+ // be an empty Block that will return
+ // LZMA_STREAM_END without needing any
+ // output space.
+ } while (ret == LZMA_STREAM_END);
+
+ // Check if lzma_outq_read reported an error from
+ // the Block decoder.
+ if (ret != LZMA_OK)
+ break;
+
+ // If the output buffer is now full but it wasn't full
+ // when this function was called, set out_was_filled.
+ // This way the next call to stream_decode_mt() knows
+ // that some output was produced and no output space
+ // remained in the previous call to stream_decode_mt().
+ if (*out_pos == out_size && *out_pos != out_start)
+ coder->out_was_filled = true;
+
+ // Check if any thread has indicated an error.
+ if (coder->thread_error != LZMA_OK) {
+ // If LZMA_FAIL_FAST was used, report errors
+ // from worker threads immediately.
+ if (coder->fail_fast) {
+ ret = coder->thread_error;
+ break;
+ }
+
+ // Otherwise set pending_error. The value we
+ // set here will not actually get used other
+ // than working as a flag that an error has
+ // occurred. This is because in SEQ_ERROR
+ // all output before the error will be read
+ // first by calling this function, and once we
+ // reach the location of the (first) error the
+ // error code from the above lzma_outq_read()
+ // will be returned to the application.
+ //
+ // Use LZMA_PROG_ERROR since the value should
+ // never leak to the application. It's
+ // possible that pending_error has already
+ // been set but that doesn't matter: if we get
+ // here, pending_error only works as a flag.
+ coder->pending_error = LZMA_PROG_ERROR;
+ }
+
+ // Check if decoding of the next Block can be started.
+ // The memusage of the active threads must be low
+ // enough, there must be a free buffer slot in the
+ // output queue, and there must be a free thread
+ // (that can be either created or an existing one
+ // reused).
+ //
+ // NOTE: This is checked after reading the output
+ // above because reading the output can free a slot in
+ // the output queue and also reduce active memusage.
+ //
+ // NOTE: If output queue is empty, then input will
+ // always be possible.
+ if (input_is_possible != NULL
+ && coder->memlimit_threading
+ - coder->mem_in_use
+ - coder->outq.mem_in_use
+ >= coder->mem_next_block
+ && lzma_outq_has_buf(&coder->outq)
+ && (coder->threads_initialized
+ < coder->threads_max
+ || coder->threads_free
+ != NULL)) {
+ *input_is_possible = true;
+ break;
+ }
+
+ // If the caller doesn't want us to block, return now.
+ if (!waiting_allowed)
+ break;
+
+ // This check is needed only when input_is_possible
+ // is NULL. We must return if we aren't waiting for
+ // input to become possible and there is no more
+ // output coming from the queue.
+ if (lzma_outq_is_empty(&coder->outq)) {
+ assert(input_is_possible == NULL);
+ break;
+ }
+
+ // If there is more data available from the queue,
+ // our out buffer must be full and we need to return
+ // so that the application can provide more output
+ // space.
+ //
+ // NOTE: In general lzma_outq_is_readable() can return
+ // true also when there are no more bytes available.
+ // This can happen when a Block has finished without
+ // providing any new output. We know that this is not
+ // the case because in the beginning of this loop we
+ // tried to read as much as possible even when we had
+ // no output space left and the mutex has been locked
+ // all the time (so worker threads cannot have changed
+ // anything). Thus there must be actual pending output
+ // in the queue.
+ if (lzma_outq_is_readable(&coder->outq)) {
+ assert(*out_pos == out_size);
+ break;
+ }
+
+ // If the application stops providing more input
+ // in the middle of a Block, there will eventually
+ // be one worker thread left that is stuck waiting for
+ // more input (that might never arrive) and a matching
+ // outbuf which the worker thread cannot finish due
+ // to lack of input. We must detect this situation,
+ // otherwise we would end up waiting indefinitely
+ // (if no timeout is in use) or keep returning
+ // LZMA_TIMED_OUT while making no progress. Thus, the
+ // application would never get LZMA_BUF_ERROR from
+ // lzma_code() which would tell the application that
+ // no more progress is possible. No LZMA_BUF_ERROR
+ // means that, for example, truncated .xz files could
+ // cause an infinite loop.
+ //
+ // A worker thread doing partial updates will
+ // store not only the output position in outbuf->pos
+ // but also the matching input position in
+ // outbuf->decoder_in_pos. Here we check if that
+ // input position matches the amount of input that
+ // the worker thread has been given (in_filled).
+ // If so, we must return and not wait as no more
+ // output will be coming without first getting more
+ // input to the worker thread. If the application
+ // keeps calling lzma_code() without providing more
+ // input, it will eventually get LZMA_BUF_ERROR.
+ //
+ // NOTE: We can read partial_update and in_filled
+ // without thr->mutex as only the main thread
+ // modifies these variables. decoder_in_pos requires
+ // coder->mutex which we are already holding.
+ if (coder->thr != NULL && coder->thr->partial_update
+ != PARTIAL_DISABLED) {
+ // There is exactly one outbuf in the queue.
+ assert(coder->thr->outbuf == coder->outq.head);
+ assert(coder->thr->outbuf == coder->outq.tail);
+
+ if (coder->thr->outbuf->decoder_in_pos
+ == coder->thr->in_filled)
+ break;
+ }
+
+ // Wait for input or output to become possible.
+ if (coder->timeout != 0) {
+ // See the comment in stream_encoder_mt.c
+ // about why mythread_condtime_set() is used
+ // like this.
+ //
+ // FIXME?
+ // In contrast to the encoder, this calls
+ // _condtime_set while the mutex is locked.
+ if (!*has_blocked) {
+ *has_blocked = true;
+ mythread_condtime_set(wait_abs,
+ &coder->cond,
+ coder->timeout);
+ }
+
+ if (mythread_cond_timedwait(&coder->cond,
+ &coder->mutex,
+ wait_abs) != 0) {
+ ret = LZMA_TIMED_OUT;
+ break;
+ }
+ } else {
+ mythread_cond_wait(&coder->cond,
+ &coder->mutex);
+ }
+ } while (ret == LZMA_OK);
+ }
+
+ // If we are returning an error, then the application cannot get
+ // more output from us and thus keeping the threads running is
+ // useless and waste of CPU time.
+ if (ret != LZMA_OK && ret != LZMA_TIMED_OUT)
+ threads_stop(coder);
+
+ return ret;
+}
+
+
+static lzma_ret
+decode_block_header(struct lzma_stream_coder *coder,
+ const lzma_allocator *allocator, const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size)
+{
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ if (coder->pos == 0) {
+ // Detect if it's Index.
+ if (in[*in_pos] == INDEX_INDICATOR)
+ return LZMA_INDEX_DETECTED;
+
+ // Calculate the size of the Block Header. Note that
+ // Block Header decoder wants to see this byte too
+ // so don't advance *in_pos.
+ coder->block_options.header_size
+ = lzma_block_header_size_decode(
+ in[*in_pos]);
+ }
+
+ // Copy the Block Header to the internal buffer.
+ lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+ coder->block_options.header_size);
+
+ // Return if we didn't get the whole Block Header yet.
+ if (coder->pos < coder->block_options.header_size)
+ return LZMA_OK;
+
+ coder->pos = 0;
+
+ // Version 1 is needed to support the .ignore_check option.
+ coder->block_options.version = 1;
+
+ // Block Header decoder will initialize all members of this array
+ // so we don't need to do it here.
+ coder->block_options.filters = coder->filters;
+
+ // Decode the Block Header.
+ return_if_error(lzma_block_header_decode(&coder->block_options,
+ allocator, coder->buffer));
+
+ // If LZMA_IGNORE_CHECK was used, this flag needs to be set.
+ // It has to be set after lzma_block_header_decode() because
+ // it always resets this to false.
+ coder->block_options.ignore_check = coder->ignore_check;
+
+ // coder->block_options is ready now.
+ return LZMA_STREAM_END;
+}
+
+
+/// Get the size of the Compressed Data + Block Padding + Check.
+static size_t
+comp_blk_size(const struct lzma_stream_coder *coder)
+{
+ return vli_ceil4(coder->block_options.compressed_size)
+ + lzma_check_size(coder->stream_flags.check);
+}
+
+
+/// Returns true if the size (compressed or uncompressed) is such that
+/// threaded decompression cannot be used. Sizes that are too big compared
+/// to SIZE_MAX must be rejected to avoid integer overflows and truncations
+/// when lzma_vli is assigned to a size_t.
+static bool
+is_direct_mode_needed(lzma_vli size)
+{
+ return size == LZMA_VLI_UNKNOWN || size > SIZE_MAX / 3;
+}
+
+
+static lzma_ret
+stream_decoder_reset(struct lzma_stream_coder *coder,
+ const lzma_allocator *allocator)
+{
+ // Initialize the Index hash used to verify the Index.
+ coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator);
+ if (coder->index_hash == NULL)
+ return LZMA_MEM_ERROR;
+
+ // Reset the rest of the variables.
+ coder->sequence = SEQ_STREAM_HEADER;
+ coder->pos = 0;
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
+stream_decode_mt(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size, lzma_action action)
+{
+ struct lzma_stream_coder *coder = coder_ptr;
+
+ mythread_condtime wait_abs;
+ bool has_blocked = false;
+
+ // Determine if in SEQ_BLOCK_HEADER and SEQ_BLOCK_THR_RUN we should
+ // tell read_output_and_wait() to wait until it can fill the output
+ // buffer (or a timeout occurs). Two conditions must be met:
+ //
+ // (1) If the caller provided no new input. The reason for this
+ // can be, for example, the end of the file or that there is
+ // a pause in the input stream and more input is available
+ // a little later. In this situation we should wait for output
+ // because otherwise we would end up in a busy-waiting loop where
+ // we make no progress and the application just calls us again
+ // without providing any new input. This would then result in
+ // LZMA_BUF_ERROR even though more output would be available
+ // once the worker threads decode more data.
+ //
+ // (2) Even if (1) is true, we will not wait if the previous call to
+ // this function managed to produce some output and the output
+ // buffer became full. This is for compatibility with applications
+ // that call lzma_code() in such a way that new input is provided
+ // only when the output buffer didn't become full. Without this
+ // trick such applications would have bad performance (bad
+ // parallelization due to decoder not getting input fast enough).
+ //
+ // NOTE: Such loops might require that timeout is disabled (0)
+ // if they assume that output-not-full implies that all input has
+ // been consumed. If and only if timeout is enabled, we may return
+ // when output isn't full *and* not all input has been consumed.
+ //
+ // However, if LZMA_FINISH is used, the above is ignored and we always
+ // wait (timeout can still cause us to return) because we know that
+ // we won't get any more input. This matters if the input file is
+ // truncated and we are doing single-shot decoding, that is,
+ // timeout = 0 and LZMA_FINISH is used on the first call to
+ // lzma_code() and the output buffer is known to be big enough
+ // to hold all uncompressed data:
+ //
+ // - If LZMA_FINISH wasn't handled specially, we could return
+ // LZMA_OK before providing all output that is possible with the
+ // truncated input. The rest would be available if lzma_code() was
+ // called again but then it's not single-shot decoding anymore.
+ //
+ // - By handling LZMA_FINISH specially here, the first call will
+ // produce all the output, matching the behavior of the
+ // single-threaded decoder.
+ //
+ // So it's a very specific corner case but also easy to avoid. Note
+ // that this special handling of LZMA_FINISH has no effect for
+ // single-shot decoding when the input file is valid (not truncated);
+ // premature LZMA_OK wouldn't be possible as long as timeout = 0.
+ const bool waiting_allowed = action == LZMA_FINISH
+ || (*in_pos == in_size && !coder->out_was_filled);
+ coder->out_was_filled = false;
+
+ while (true)
+ switch (coder->sequence) {
+ case SEQ_STREAM_HEADER: {
+ // Copy the Stream Header to the internal buffer.
+ const size_t in_old = *in_pos;
+ lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+ LZMA_STREAM_HEADER_SIZE);
+ coder->progress_in += *in_pos - in_old;
+
+ // Return if we didn't get the whole Stream Header yet.
+ if (coder->pos < LZMA_STREAM_HEADER_SIZE)
+ return LZMA_OK;
+
+ coder->pos = 0;
+
+ // Decode the Stream Header.
+ const lzma_ret ret = lzma_stream_header_decode(
+ &coder->stream_flags, coder->buffer);
+ if (ret != LZMA_OK)
+ return ret == LZMA_FORMAT_ERROR && !coder->first_stream
+ ? LZMA_DATA_ERROR : ret;
+
+ // If we are decoding concatenated Streams, and the later
+ // Streams have invalid Header Magic Bytes, we give
+ // LZMA_DATA_ERROR instead of LZMA_FORMAT_ERROR.
+ coder->first_stream = false;
+
+ // Copy the type of the Check so that Block Header and Block
+ // decoders see it.
+ coder->block_options.check = coder->stream_flags.check;
+
+ // Even if we return LZMA_*_CHECK below, we want
+ // to continue from Block Header decoding.
+ coder->sequence = SEQ_BLOCK_HEADER;
+
+ // Detect if there's no integrity check or if it is
+ // unsupported if those were requested by the application.
+ if (coder->tell_no_check && coder->stream_flags.check
+ == LZMA_CHECK_NONE)
+ return LZMA_NO_CHECK;
+
+ if (coder->tell_unsupported_check
+ && !lzma_check_is_supported(
+ coder->stream_flags.check))
+ return LZMA_UNSUPPORTED_CHECK;
+
+ if (coder->tell_any_check)
+ return LZMA_GET_CHECK;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_HEADER: {
+ const size_t in_old = *in_pos;
+ const lzma_ret ret = decode_block_header(coder, allocator,
+ in, in_pos, in_size);
+ coder->progress_in += *in_pos - in_old;
+
+ if (ret == LZMA_OK) {
+ // We didn't decode the whole Block Header yet.
+ //
+ // Read output from the queue before returning. This
+ // is important because it is possible that the
+ // application doesn't have any new input available
+ // immediately. If we didn't try to copy output from
+ // the output queue here, lzma_code() could end up
+ // returning LZMA_BUF_ERROR even though queued output
+ // is available.
+ //
+ // If the lzma_code() call provided at least one input
+ // byte, only copy as much data from the output queue
+ // as is available immediately. This way the
+ // application will be able to provide more input
+ // without a delay.
+ //
+ // On the other hand, if lzma_code() was called with
+ // an empty input buffer(*), treat it specially: try
+ // to fill the output buffer even if it requires
+ // waiting for the worker threads to provide output
+ // (timeout, if specified, can still cause us to
+ // return).
+ //
+ // - This way the application will be able to get all
+ // data that can be decoded from the input provided
+ // so far.
+ //
+ // - We avoid both premature LZMA_BUF_ERROR and
+ // busy-waiting where the application repeatedly
+ // calls lzma_code() which immediately returns
+ // LZMA_OK without providing new data.
+ //
+ // - If the queue becomes empty, we won't wait
+ // anything and will return LZMA_OK immediately
+ // (coder->timeout is completely ignored).
+ //
+ // (*) See the comment at the beginning of this
+ // function how waiting_allowed is determined
+ // and why there is an exception to the rule
+ // of "called with an empty input buffer".
+ assert(*in_pos == in_size);
+
+ // If LZMA_FINISH was used we know that we won't get
+ // more input, so the file must be truncated if we
+ // get here. If worker threads don't detect any
+ // errors, eventually there will be no more output
+ // while we keep returning LZMA_OK which gets
+ // converted to LZMA_BUF_ERROR in lzma_code().
+ //
+ // If fail-fast is enabled then we will return
+ // immediately using LZMA_DATA_ERROR instead of
+ // LZMA_OK or LZMA_BUF_ERROR. Rationale for the
+ // error code:
+ //
+ // - Worker threads may have a large amount of
+ // not-yet-decoded input data and we don't
+ // know for sure if all data is valid. Bad
+ // data there would result in LZMA_DATA_ERROR
+ // when fail-fast isn't used.
+ //
+ // - Immediate LZMA_BUF_ERROR would be a bit weird
+ // considering the older liblzma code. lzma_code()
+ // even has an assertion to prevent coders from
+ // returning LZMA_BUF_ERROR directly.
+ //
+ // The downside of this is that with fail-fast apps
+ // cannot always distinguish between corrupt and
+ // truncated files.
+ if (action == LZMA_FINISH && coder->fail_fast) {
+ // We won't produce any more output. Stop
+ // the unfinished worker threads so they
+ // won't waste CPU time.
+ threads_stop(coder);
+ return LZMA_DATA_ERROR;
+ }
+
+ // read_output_and_wait() will call threads_stop()
+ // if needed so with that we can use return_if_error.
+ return_if_error(read_output_and_wait(coder, allocator,
+ out, out_pos, out_size,
+ NULL, waiting_allowed,
+ &wait_abs, &has_blocked));
+
+ if (coder->pending_error != LZMA_OK) {
+ coder->sequence = SEQ_ERROR;
+ break;
+ }
+
+ return LZMA_OK;
+ }
+
+ if (ret == LZMA_INDEX_DETECTED) {
+ coder->sequence = SEQ_INDEX_WAIT_OUTPUT;
+ break;
+ }
+
+ // See if an error occurred.
+ if (ret != LZMA_STREAM_END) {
+ // NOTE: Here and in all other places where
+ // pending_error is set, it may overwrite the value
+ // (LZMA_PROG_ERROR) set by read_output_and_wait().
+ // That function might overwrite value set here too.
+ // These are fine because when read_output_and_wait()
+ // sets pending_error, it actually works as a flag
+ // variable only ("some error has occurred") and the
+ // actual value of pending_error is not used in
+ // SEQ_ERROR. In such cases SEQ_ERROR will eventually
+ // get the correct error code from the return value of
+ // a later read_output_and_wait() call.
+ coder->pending_error = ret;
+ coder->sequence = SEQ_ERROR;
+ break;
+ }
+
+ // Calculate the memory usage of the filters / Block decoder.
+ coder->mem_next_filters = lzma_raw_decoder_memusage(
+ coder->filters);
+
+ if (coder->mem_next_filters == UINT64_MAX) {
+ // One or more unknown Filter IDs.
+ coder->pending_error = LZMA_OPTIONS_ERROR;
+ coder->sequence = SEQ_ERROR;
+ break;
+ }
+
+ coder->sequence = SEQ_BLOCK_INIT;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_INIT: {
+ // Check if decoding is possible at all with the current
+ // memlimit_stop which we must never exceed.
+ //
+ // This needs to be the first thing in SEQ_BLOCK_INIT
+ // to make it possible to restart decoding after increasing
+ // memlimit_stop with lzma_memlimit_set().
+ if (coder->mem_next_filters > coder->memlimit_stop) {
+ // Flush pending output before returning
+ // LZMA_MEMLIMIT_ERROR. If the application doesn't
+ // want to increase the limit, at least it will get
+ // all the output possible so far.
+ return_if_error(read_output_and_wait(coder, allocator,
+ out, out_pos, out_size,
+ NULL, true, &wait_abs, &has_blocked));
+
+ if (!lzma_outq_is_empty(&coder->outq))
+ return LZMA_OK;
+
+ return LZMA_MEMLIMIT_ERROR;
+ }
+
+ // Check if the size information is available in Block Header.
+ // If it is, check if the sizes are small enough that we don't
+ // need to worry *too* much about integer overflows later in
+ // the code. If these conditions are not met, we must use the
+ // single-threaded direct mode.
+ if (is_direct_mode_needed(coder->block_options.compressed_size)
+ || is_direct_mode_needed(
+ coder->block_options.uncompressed_size)) {
+ coder->sequence = SEQ_BLOCK_DIRECT_INIT;
+ break;
+ }
+
+ // Calculate the amount of memory needed for the input and
+ // output buffers in threaded mode.
+ //
+ // These cannot overflow because we already checked that
+ // the sizes are small enough using is_direct_mode_needed().
+ coder->mem_next_in = comp_blk_size(coder);
+ const uint64_t mem_buffers = coder->mem_next_in
+ + lzma_outq_outbuf_memusage(
+ coder->block_options.uncompressed_size);
+
+ // Add the amount needed by the filters.
+ // Avoid integer overflows.
+ if (UINT64_MAX - mem_buffers < coder->mem_next_filters) {
+ // Use direct mode if the memusage would overflow.
+ // This is a theoretical case that shouldn't happen
+ // in practice unless the input file is weird (broken
+ // or malicious).
+ coder->sequence = SEQ_BLOCK_DIRECT_INIT;
+ break;
+ }
+
+ // Amount of memory needed to decode this Block in
+ // threaded mode:
+ coder->mem_next_block = coder->mem_next_filters + mem_buffers;
+
+ // If this alone would exceed memlimit_threading, then we must
+ // use the single-threaded direct mode.
+ if (coder->mem_next_block > coder->memlimit_threading) {
+ coder->sequence = SEQ_BLOCK_DIRECT_INIT;
+ break;
+ }
+
+ // Use the threaded mode. Free the direct mode decoder in
+ // case it has been initialized.
+ lzma_next_end(&coder->block_decoder, allocator);
+ coder->mem_direct_mode = 0;
+
+ // Since we already know what the sizes are supposed to be,
+ // we can already add them to the Index hash. The Block
+ // decoder will verify the values while decoding.
+ const lzma_ret ret = lzma_index_hash_append(coder->index_hash,
+ lzma_block_unpadded_size(
+ &coder->block_options),
+ coder->block_options.uncompressed_size);
+ if (ret != LZMA_OK) {
+ coder->pending_error = ret;
+ coder->sequence = SEQ_ERROR;
+ break;
+ }
+
+ coder->sequence = SEQ_BLOCK_THR_INIT;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_THR_INIT: {
+ // We need to wait for a multiple conditions to become true
+ // until we can initialize the Block decoder and let a worker
+ // thread decode it:
+ //
+ // - Wait for the memory usage of the active threads to drop
+ // so that starting the decoding of this Block won't make
+ // us go over memlimit_threading.
+ //
+ // - Wait for at least one free output queue slot.
+ //
+ // - Wait for a free worker thread.
+ //
+ // While we wait, we must copy decompressed data to the out
+ // buffer and catch possible decoder errors.
+ //
+ // read_output_and_wait() does all the above.
+ bool block_can_start = false;
+
+ return_if_error(read_output_and_wait(coder, allocator,
+ out, out_pos, out_size,
+ &block_can_start, true,
+ &wait_abs, &has_blocked));
+
+ if (coder->pending_error != LZMA_OK) {
+ coder->sequence = SEQ_ERROR;
+ break;
+ }
+
+ if (!block_can_start) {
+ // It's not a timeout because return_if_error handles
+ // it already. Output queue cannot be empty either
+ // because in that case block_can_start would have
+ // been true. Thus the output buffer must be full and
+ // the queue isn't empty.
+ assert(*out_pos == out_size);
+ assert(!lzma_outq_is_empty(&coder->outq));
+ return LZMA_OK;
+ }
+
+ // We know that we can start decoding this Block without
+ // exceeding memlimit_threading. However, to stay below
+ // memlimit_threading may require freeing some of the
+ // cached memory.
+ //
+ // Get a local copy of variables that require locking the
+ // mutex. It is fine if the worker threads modify the real
+ // values after we read these as those changes can only be
+ // towards more favorable conditions (less memory in use,
+ // more in cache).
+ //
+ // These are initialized to silence warnings.
+ uint64_t mem_in_use = 0;
+ uint64_t mem_cached = 0;
+ struct worker_thread *thr = NULL;
+
+ mythread_sync(coder->mutex) {
+ mem_in_use = coder->mem_in_use;
+ mem_cached = coder->mem_cached;
+ thr = coder->threads_free;
+ }
+
+ // The maximum amount of memory that can be held by other
+ // threads and cached buffers while allowing us to start
+ // decoding the next Block.
+ const uint64_t mem_max = coder->memlimit_threading
+ - coder->mem_next_block;
+
+ // If the existing allocations are so large that starting
+ // to decode this Block might exceed memlimit_threads,
+ // try to free memory from the output queue cache first.
+ //
+ // NOTE: This math assumes the worst case. It's possible
+ // that the limit wouldn't be exceeded if the existing cached
+ // allocations are reused.
+ if (mem_in_use + mem_cached + coder->outq.mem_allocated
+ > mem_max) {
+ // Clear the outq cache except leave one buffer in
+ // the cache if its size is correct. That way we
+ // don't free and almost immediately reallocate
+ // an identical buffer.
+ lzma_outq_clear_cache2(&coder->outq, allocator,
+ coder->block_options.uncompressed_size);
+ }
+
+ // If there is at least one worker_thread in the cache and
+ // the existing allocations are so large that starting to
+ // decode this Block might exceed memlimit_threads, free
+ // memory by freeing cached Block decoders.
+ //
+ // NOTE: The comparison is different here than above.
+ // Here we don't care about cached buffers in outq anymore
+ // and only look at memory actually in use. This is because
+ // if there is something in outq cache, it's a single buffer
+ // that can be used as is. We ensured this in the above
+ // if-block.
+ uint64_t mem_freed = 0;
+ if (thr != NULL && mem_in_use + mem_cached
+ + coder->outq.mem_in_use > mem_max) {
+ // Don't free the first Block decoder if its memory
+ // usage isn't greater than what this Block will need.
+ // Typically the same filter chain is used for all
+ // Blocks so this way the allocations can be reused
+ // when get_thread() picks the first worker_thread
+ // from the cache.
+ if (thr->mem_filters <= coder->mem_next_filters)
+ thr = thr->next;
+
+ while (thr != NULL) {
+ lzma_next_end(&thr->block_decoder, allocator);
+ mem_freed += thr->mem_filters;
+ thr->mem_filters = 0;
+ thr = thr->next;
+ }
+ }
+
+ // Update the memory usage counters. Note that coder->mem_*
+ // may have changed since we read them so we must subtract
+ // or add the changes.
+ mythread_sync(coder->mutex) {
+ coder->mem_cached -= mem_freed;
+
+ // Memory needed for the filters and the input buffer.
+ // The output queue takes care of its own counter so
+ // we don't touch it here.
+ //
+ // NOTE: After this, coder->mem_in_use +
+ // coder->mem_cached might count the same thing twice.
+ // If so, this will get corrected in get_thread() when
+ // a worker_thread is picked from coder->free_threads
+ // and its memory usage is subtracted from mem_cached.
+ coder->mem_in_use += coder->mem_next_in
+ + coder->mem_next_filters;
+ }
+
+ // Allocate memory for the output buffer in the output queue.
+ lzma_ret ret = lzma_outq_prealloc_buf(
+ &coder->outq, allocator,
+ coder->block_options.uncompressed_size);
+ if (ret != LZMA_OK) {
+ threads_stop(coder);
+ return ret;
+ }
+
+ // Set up coder->thr.
+ ret = get_thread(coder, allocator);
+ if (ret != LZMA_OK) {
+ threads_stop(coder);
+ return ret;
+ }
+
+ // The new Block decoder memory usage is already counted in
+ // coder->mem_in_use. Store it in the thread too.
+ coder->thr->mem_filters = coder->mem_next_filters;
+
+ // Initialize the Block decoder.
+ coder->thr->block_options = coder->block_options;
+ ret = lzma_block_decoder_init(
+ &coder->thr->block_decoder, allocator,
+ &coder->thr->block_options);
+
+ // Free the allocated filter options since they are needed
+ // only to initialize the Block decoder.
+ lzma_filters_free(coder->filters, allocator);
+ coder->thr->block_options.filters = NULL;
+
+ // Check if memory usage calculation and Block encoder
+ // initialization succeeded.
+ if (ret != LZMA_OK) {
+ coder->pending_error = ret;
+ coder->sequence = SEQ_ERROR;
+ break;
+ }
+
+ // Allocate the input buffer.
+ coder->thr->in_size = coder->mem_next_in;
+ coder->thr->in = lzma_alloc(coder->thr->in_size, allocator);
+ if (coder->thr->in == NULL) {
+ threads_stop(coder);
+ return LZMA_MEM_ERROR;
+ }
+
+ // Get the preallocated output buffer.
+ coder->thr->outbuf = lzma_outq_get_buf(
+ &coder->outq, coder->thr);
+
+ // Start the decoder.
+ mythread_sync(coder->thr->mutex) {
+ assert(coder->thr->state == THR_IDLE);
+ coder->thr->state = THR_RUN;
+ mythread_cond_signal(&coder->thr->cond);
+ }
+
+ // Enable output from the thread that holds the oldest output
+ // buffer in the output queue (if such a thread exists).
+ mythread_sync(coder->mutex) {
+ lzma_outq_enable_partial_output(&coder->outq,
+ &worker_enable_partial_update);
+ }
+
+ coder->sequence = SEQ_BLOCK_THR_RUN;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_THR_RUN: {
+ if (action == LZMA_FINISH && coder->fail_fast) {
+ // We know that we won't get more input and that
+ // the caller wants fail-fast behavior. If we see
+ // that we don't have enough input to finish this
+ // Block, return LZMA_DATA_ERROR immediately.
+ // See SEQ_BLOCK_HEADER for the error code rationale.
+ const size_t in_avail = in_size - *in_pos;
+ const size_t in_needed = coder->thr->in_size
+ - coder->thr->in_filled;
+ if (in_avail < in_needed) {
+ threads_stop(coder);
+ return LZMA_DATA_ERROR;
+ }
+ }
+
+ // Copy input to the worker thread.
+ size_t cur_in_filled = coder->thr->in_filled;
+ lzma_bufcpy(in, in_pos, in_size, coder->thr->in,
+ &cur_in_filled, coder->thr->in_size);
+
+ // Tell the thread how much we copied.
+ mythread_sync(coder->thr->mutex) {
+ coder->thr->in_filled = cur_in_filled;
+
+ // NOTE: Most of the time we are copying input faster
+ // than the thread can decode so most of the time
+ // calling mythread_cond_signal() is useless but
+ // we cannot make it conditional because thr->in_pos
+ // is updated without a mutex. And the overhead should
+ // be very much negligible anyway.
+ mythread_cond_signal(&coder->thr->cond);
+ }
+
+ // Read output from the output queue. Just like in
+ // SEQ_BLOCK_HEADER, we wait to fill the output buffer
+ // only if waiting_allowed was set to true in the beginning
+ // of this function (see the comment there).
+ return_if_error(read_output_and_wait(coder, allocator,
+ out, out_pos, out_size,
+ NULL, waiting_allowed,
+ &wait_abs, &has_blocked));
+
+ if (coder->pending_error != LZMA_OK) {
+ coder->sequence = SEQ_ERROR;
+ break;
+ }
+
+ // Return if the input didn't contain the whole Block.
+ if (coder->thr->in_filled < coder->thr->in_size) {
+ assert(*in_pos == in_size);
+ return LZMA_OK;
+ }
+
+ // The whole Block has been copied to the thread-specific
+ // buffer. Continue from the next Block Header or Index.
+ coder->thr = NULL;
+ coder->sequence = SEQ_BLOCK_HEADER;
+ break;
+ }
+
+ case SEQ_BLOCK_DIRECT_INIT: {
+ // Wait for the threads to finish and that all decoded data
+ // has been copied to the output. That is, wait until the
+ // output queue becomes empty.
+ //
+ // NOTE: No need to check for coder->pending_error as
+ // we aren't consuming any input until the queue is empty
+ // and if there is a pending error, read_output_and_wait()
+ // will eventually return it before the queue is empty.
+ return_if_error(read_output_and_wait(coder, allocator,
+ out, out_pos, out_size,
+ NULL, true, &wait_abs, &has_blocked));
+ if (!lzma_outq_is_empty(&coder->outq))
+ return LZMA_OK;
+
+ // Free the cached output buffers.
+ lzma_outq_clear_cache(&coder->outq, allocator);
+
+ // Get rid of the worker threads, including the coder->threads
+ // array.
+ threads_end(coder, allocator);
+
+ // Initialize the Block decoder.
+ const lzma_ret ret = lzma_block_decoder_init(
+ &coder->block_decoder, allocator,
+ &coder->block_options);
+
+ // Free the allocated filter options since they are needed
+ // only to initialize the Block decoder.
+ lzma_filters_free(coder->filters, allocator);
+ coder->block_options.filters = NULL;
+
+ // Check if Block decoder initialization succeeded.
+ if (ret != LZMA_OK)
+ return ret;
+
+ // Make the memory usage visible to _memconfig().
+ coder->mem_direct_mode = coder->mem_next_filters;
+
+ coder->sequence = SEQ_BLOCK_DIRECT_RUN;
+ }
+
+ // Fall through
+
+ case SEQ_BLOCK_DIRECT_RUN: {
+ const size_t in_old = *in_pos;
+ const size_t out_old = *out_pos;
+ const lzma_ret ret = coder->block_decoder.code(
+ coder->block_decoder.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size,
+ action);
+ coder->progress_in += *in_pos - in_old;
+ coder->progress_out += *out_pos - out_old;
+
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ // Block decoded successfully. Add the new size pair to
+ // the Index hash.
+ return_if_error(lzma_index_hash_append(coder->index_hash,
+ lzma_block_unpadded_size(
+ &coder->block_options),
+ coder->block_options.uncompressed_size));
+
+ coder->sequence = SEQ_BLOCK_HEADER;
+ break;
+ }
+
+ case SEQ_INDEX_WAIT_OUTPUT:
+ // Flush the output from all worker threads so that we can
+ // decode the Index without thinking about threading.
+ return_if_error(read_output_and_wait(coder, allocator,
+ out, out_pos, out_size,
+ NULL, true, &wait_abs, &has_blocked));
+
+ if (!lzma_outq_is_empty(&coder->outq))
+ return LZMA_OK;
+
+ coder->sequence = SEQ_INDEX_DECODE;
+
+ // Fall through
+
+ case SEQ_INDEX_DECODE: {
+ // If we don't have any input, don't call
+ // lzma_index_hash_decode() since it would return
+ // LZMA_BUF_ERROR, which we must not do here.
+ if (*in_pos >= in_size)
+ return LZMA_OK;
+
+ // Decode the Index and compare it to the hash calculated
+ // from the sizes of the Blocks (if any).
+ const size_t in_old = *in_pos;
+ const lzma_ret ret = lzma_index_hash_decode(coder->index_hash,
+ in, in_pos, in_size);
+ coder->progress_in += *in_pos - in_old;
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ coder->sequence = SEQ_STREAM_FOOTER;
+ }
+
+ // Fall through
+
+ case SEQ_STREAM_FOOTER: {
+ // Copy the Stream Footer to the internal buffer.
+ const size_t in_old = *in_pos;
+ lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
+ LZMA_STREAM_HEADER_SIZE);
+ coder->progress_in += *in_pos - in_old;
+
+ // Return if we didn't get the whole Stream Footer yet.
+ if (coder->pos < LZMA_STREAM_HEADER_SIZE)
+ return LZMA_OK;
+
+ coder->pos = 0;
+
+ // Decode the Stream Footer. The decoder gives
+ // LZMA_FORMAT_ERROR if the magic bytes don't match,
+ // so convert that return code to LZMA_DATA_ERROR.
+ lzma_stream_flags footer_flags;
+ const lzma_ret ret = lzma_stream_footer_decode(
+ &footer_flags, coder->buffer);
+ if (ret != LZMA_OK)
+ return ret == LZMA_FORMAT_ERROR
+ ? LZMA_DATA_ERROR : ret;
+
+ // Check that Index Size stored in the Stream Footer matches
+ // the real size of the Index field.
+ if (lzma_index_hash_size(coder->index_hash)
+ != footer_flags.backward_size)
+ return LZMA_DATA_ERROR;
+
+ // Compare that the Stream Flags fields are identical in
+ // both Stream Header and Stream Footer.
+ return_if_error(lzma_stream_flags_compare(
+ &coder->stream_flags, &footer_flags));
+
+ if (!coder->concatenated)
+ return LZMA_STREAM_END;
+
+ coder->sequence = SEQ_STREAM_PADDING;
+ }
+
+ // Fall through
+
+ case SEQ_STREAM_PADDING:
+ assert(coder->concatenated);
+
+ // Skip over possible Stream Padding.
+ while (true) {
+ if (*in_pos >= in_size) {
+ // Unless LZMA_FINISH was used, we cannot
+ // know if there's more input coming later.
+ if (action != LZMA_FINISH)
+ return LZMA_OK;
+
+ // Stream Padding must be a multiple of
+ // four bytes.
+ return coder->pos == 0
+ ? LZMA_STREAM_END
+ : LZMA_DATA_ERROR;
+ }
+
+ // If the byte is not zero, it probably indicates
+ // beginning of a new Stream (or the file is corrupt).
+ if (in[*in_pos] != 0x00)
+ break;
+
+ ++*in_pos;
+ ++coder->progress_in;
+ coder->pos = (coder->pos + 1) & 3;
+ }
+
+ // Stream Padding must be a multiple of four bytes (empty
+ // Stream Padding is OK).
+ if (coder->pos != 0) {
+ ++*in_pos;
+ ++coder->progress_in;
+ return LZMA_DATA_ERROR;
+ }
+
+ // Prepare to decode the next Stream.
+ return_if_error(stream_decoder_reset(coder, allocator));
+ break;
+
+ case SEQ_ERROR:
+ if (!coder->fail_fast) {
+ // Let the application get all data before the point
+ // where the error was detected. This matches the
+ // behavior of single-threaded use.
+ //
+ // FIXME? Some errors (LZMA_MEM_ERROR) don't get here,
+ // they are returned immediately. Thus in rare cases
+ // the output will be less than in the single-threaded
+ // mode. Maybe this doesn't matter much in practice.
+ return_if_error(read_output_and_wait(coder, allocator,
+ out, out_pos, out_size,
+ NULL, true, &wait_abs, &has_blocked));
+
+ // We get here only if the error happened in the main
+ // thread, for example, unsupported Block Header.
+ if (!lzma_outq_is_empty(&coder->outq))
+ return LZMA_OK;
+ }
+
+ // We only get here if no errors were detected by the worker
+ // threads. Errors from worker threads would have already been
+ // returned by the call to read_output_and_wait() above.
+ return coder->pending_error;
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ // Never reached
+}
+
+
+static void
+stream_decoder_mt_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ struct lzma_stream_coder *coder = coder_ptr;
+
+ threads_end(coder, allocator);
+ lzma_outq_end(&coder->outq, allocator);
+
+ lzma_next_end(&coder->block_decoder, allocator);
+ lzma_filters_free(coder->filters, allocator);
+ lzma_index_hash_end(coder->index_hash, allocator);
+
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_check
+stream_decoder_mt_get_check(const void *coder_ptr)
+{
+ const struct lzma_stream_coder *coder = coder_ptr;
+ return coder->stream_flags.check;
+}
+
+
+static lzma_ret
+stream_decoder_mt_memconfig(void *coder_ptr, uint64_t *memusage,
+ uint64_t *old_memlimit, uint64_t new_memlimit)
+{
+ // NOTE: This function gets/sets memlimit_stop. For now,
+ // memlimit_threading cannot be modified after initialization.
+ //
+ // *memusage will include cached memory too. Excluding cached memory
+ // would be misleading and it wouldn't help the applications to
+ // know how much memory is actually needed to decompress the file
+ // because the higher the number of threads and the memlimits are
+ // the more memory the decoder may use.
+ //
+ // Setting a new limit includes the cached memory too and too low
+ // limits will be rejected. Alternative could be to free the cached
+ // memory immediately if that helps to bring the limit down but
+ // the current way is the simplest. It's unlikely that limit needs
+ // to be lowered in the middle of a file anyway; the typical reason
+ // to want a new limit is to increase after LZMA_MEMLIMIT_ERROR
+ // and even such use isn't common.
+ struct lzma_stream_coder *coder = coder_ptr;
+
+ mythread_sync(coder->mutex) {
+ *memusage = coder->mem_direct_mode
+ + coder->mem_in_use
+ + coder->mem_cached
+ + coder->outq.mem_allocated;
+ }
+
+ // If no filter chains are allocated, *memusage may be zero.
+ // Always return at least LZMA_MEMUSAGE_BASE.
+ if (*memusage < LZMA_MEMUSAGE_BASE)
+ *memusage = LZMA_MEMUSAGE_BASE;
+
+ *old_memlimit = coder->memlimit_stop;
+
+ if (new_memlimit != 0) {
+ if (new_memlimit < *memusage)
+ return LZMA_MEMLIMIT_ERROR;
+
+ coder->memlimit_stop = new_memlimit;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+stream_decoder_mt_get_progress(void *coder_ptr,
+ uint64_t *progress_in, uint64_t *progress_out)
+{
+ struct lzma_stream_coder *coder = coder_ptr;
+
+ // Lock coder->mutex to prevent finishing threads from moving their
+ // progress info from the worker_thread structure to lzma_stream_coder.
+ mythread_sync(coder->mutex) {
+ *progress_in = coder->progress_in;
+ *progress_out = coder->progress_out;
+
+ for (size_t i = 0; i < coder->threads_initialized; ++i) {
+ mythread_sync(coder->threads[i].mutex) {
+ *progress_in += coder->threads[i].progress_in;
+ *progress_out += coder->threads[i]
+ .progress_out;
+ }
+ }
+ }
+
+ return;
+}
+
+
+static lzma_ret
+stream_decoder_mt_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_mt *options)
+{
+ struct lzma_stream_coder *coder;
+
+ if (options->threads == 0 || options->threads > LZMA_THREADS_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ if (options->flags & ~LZMA_SUPPORTED_FLAGS)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_next_coder_init(&stream_decoder_mt_init, next, allocator);
+
+ coder = next->coder;
+ if (!coder) {
+ coder = lzma_alloc(sizeof(struct lzma_stream_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+
+ if (mythread_mutex_init(&coder->mutex)) {
+ lzma_free(coder, allocator);
+ return LZMA_MEM_ERROR;
+ }
+
+ if (mythread_cond_init(&coder->cond)) {
+ mythread_mutex_destroy(&coder->mutex);
+ lzma_free(coder, allocator);
+ return LZMA_MEM_ERROR;
+ }
+
+ next->code = &stream_decode_mt;
+ next->end = &stream_decoder_mt_end;
+ next->get_check = &stream_decoder_mt_get_check;
+ next->memconfig = &stream_decoder_mt_memconfig;
+ next->get_progress = &stream_decoder_mt_get_progress;
+
+ coder->filters[0].id = LZMA_VLI_UNKNOWN;
+ memzero(&coder->outq, sizeof(coder->outq));
+
+ coder->block_decoder = LZMA_NEXT_CODER_INIT;
+ coder->mem_direct_mode = 0;
+
+ coder->index_hash = NULL;
+ coder->threads = NULL;
+ coder->threads_free = NULL;
+ coder->threads_initialized = 0;
+ }
+
+ // Cleanup old filter chain if one remains after unfinished decoding
+ // of a previous Stream.
+ lzma_filters_free(coder->filters, allocator);
+
+ // By allocating threads from scratch we can start memory-usage
+ // accounting from scratch, too. Changes in filter and block sizes may
+ // affect number of threads.
+ //
+ // FIXME? Reusing should be easy but unlike the single-threaded
+ // decoder, with some types of input file combinations reusing
+ // could leave quite a lot of memory allocated but unused (first
+ // file could allocate a lot, the next files could use fewer
+ // threads and some of the allocations from the first file would not
+ // get freed unless memlimit_threading forces us to clear caches).
+ //
+ // NOTE: The direct mode decoder isn't freed here if one exists.
+ // It will be reused or freed as needed in the main loop.
+ threads_end(coder, allocator);
+
+ // All memusage counters start at 0 (including mem_direct_mode).
+ // The little extra that is needed for the structs in this file
+ // get accounted well enough by the filter chain memory usage
+ // which adds LZMA_MEMUSAGE_BASE for each chain. However,
+ // stream_decoder_mt_memconfig() has to handle this specially so that
+ // it will never return less than LZMA_MEMUSAGE_BASE as memory usage.
+ coder->mem_in_use = 0;
+ coder->mem_cached = 0;
+ coder->mem_next_block = 0;
+
+ coder->progress_in = 0;
+ coder->progress_out = 0;
+
+ coder->sequence = SEQ_STREAM_HEADER;
+ coder->thread_error = LZMA_OK;
+ coder->pending_error = LZMA_OK;
+ coder->thr = NULL;
+
+ coder->timeout = options->timeout;
+
+ coder->memlimit_threading = my_max(1, options->memlimit_threading);
+ coder->memlimit_stop = my_max(1, options->memlimit_stop);
+ if (coder->memlimit_threading > coder->memlimit_stop)
+ coder->memlimit_threading = coder->memlimit_stop;
+
+ coder->tell_no_check = (options->flags & LZMA_TELL_NO_CHECK) != 0;
+ coder->tell_unsupported_check
+ = (options->flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0;
+ coder->tell_any_check = (options->flags & LZMA_TELL_ANY_CHECK) != 0;
+ coder->ignore_check = (options->flags & LZMA_IGNORE_CHECK) != 0;
+ coder->concatenated = (options->flags & LZMA_CONCATENATED) != 0;
+ coder->fail_fast = (options->flags & LZMA_FAIL_FAST) != 0;
+
+ coder->first_stream = true;
+ coder->out_was_filled = false;
+ coder->pos = 0;
+
+ coder->threads_max = options->threads;
+
+ return_if_error(lzma_outq_init(&coder->outq, allocator,
+ coder->threads_max));
+
+ return stream_decoder_reset(coder, allocator);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_decoder_mt(lzma_stream *strm, const lzma_mt *options)
+{
+ lzma_next_strm_init(stream_decoder_mt_init, strm, options);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/stream_encoder.c b/src/liblzma/common/stream_encoder.c
new file mode 100644
index 0000000..ee92046
--- /dev/null
+++ b/src/liblzma/common/stream_encoder.c
@@ -0,0 +1,355 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_encoder.c
+/// \brief Encodes .xz Streams
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "block_encoder.h"
+#include "index_encoder.h"
+
+
+typedef struct {
+ enum {
+ SEQ_STREAM_HEADER,
+ SEQ_BLOCK_INIT,
+ SEQ_BLOCK_HEADER,
+ SEQ_BLOCK_ENCODE,
+ SEQ_INDEX_ENCODE,
+ SEQ_STREAM_FOOTER,
+ } sequence;
+
+ /// True if Block encoder has been initialized by
+ /// stream_encoder_init() or stream_encoder_update()
+ /// and thus doesn't need to be initialized in stream_encode().
+ bool block_encoder_is_initialized;
+
+ /// Block
+ lzma_next_coder block_encoder;
+
+ /// Options for the Block encoder
+ lzma_block block_options;
+
+ /// The filter chain currently in use
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+ /// Index encoder. This is separate from Block encoder, because this
+ /// doesn't take much memory, and when encoding multiple Streams
+ /// with the same encoding options we avoid reallocating memory.
+ lzma_next_coder index_encoder;
+
+ /// Index to hold sizes of the Blocks
+ lzma_index *index;
+
+ /// Read position in buffer[]
+ size_t buffer_pos;
+
+ /// Total number of bytes in buffer[]
+ size_t buffer_size;
+
+ /// Buffer to hold Stream Header, Block Header, and Stream Footer.
+ /// Block Header has biggest maximum size.
+ uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
+} lzma_stream_coder;
+
+
+static lzma_ret
+block_encoder_init(lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+ // Prepare the Block options. Even though Block encoder doesn't need
+ // compressed_size, uncompressed_size, and header_size to be
+ // initialized, it is a good idea to do it here, because this way
+ // we catch if someone gave us Filter ID that cannot be used in
+ // Blocks/Streams.
+ coder->block_options.compressed_size = LZMA_VLI_UNKNOWN;
+ coder->block_options.uncompressed_size = LZMA_VLI_UNKNOWN;
+
+ return_if_error(lzma_block_header_size(&coder->block_options));
+
+ // Initialize the actual Block encoder.
+ return lzma_block_encoder_init(&coder->block_encoder, allocator,
+ &coder->block_options);
+}
+
+
+static lzma_ret
+stream_encode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ // Main loop
+ while (*out_pos < out_size)
+ switch (coder->sequence) {
+ case SEQ_STREAM_HEADER:
+ case SEQ_BLOCK_HEADER:
+ case SEQ_STREAM_FOOTER:
+ lzma_bufcpy(coder->buffer, &coder->buffer_pos,
+ coder->buffer_size, out, out_pos, out_size);
+ if (coder->buffer_pos < coder->buffer_size)
+ return LZMA_OK;
+
+ if (coder->sequence == SEQ_STREAM_FOOTER)
+ return LZMA_STREAM_END;
+
+ coder->buffer_pos = 0;
+ ++coder->sequence;
+ break;
+
+ case SEQ_BLOCK_INIT: {
+ if (*in_pos == in_size) {
+ // If we are requested to flush or finish the current
+ // Block, return LZMA_STREAM_END immediately since
+ // there's nothing to do.
+ if (action != LZMA_FINISH)
+ return action == LZMA_RUN
+ ? LZMA_OK : LZMA_STREAM_END;
+
+ // The application had used LZMA_FULL_FLUSH to finish
+ // the previous Block, but now wants to finish without
+ // encoding new data, or it is simply creating an
+ // empty Stream with no Blocks.
+ //
+ // Initialize the Index encoder, and continue to
+ // actually encoding the Index.
+ return_if_error(lzma_index_encoder_init(
+ &coder->index_encoder, allocator,
+ coder->index));
+ coder->sequence = SEQ_INDEX_ENCODE;
+ break;
+ }
+
+ // Initialize the Block encoder unless it was already
+ // initialized by stream_encoder_init() or
+ // stream_encoder_update().
+ if (!coder->block_encoder_is_initialized)
+ return_if_error(block_encoder_init(coder, allocator));
+
+ // Make it false so that we don't skip the initialization
+ // with the next Block.
+ coder->block_encoder_is_initialized = false;
+
+ // Encode the Block Header. This shouldn't fail since we have
+ // already initialized the Block encoder.
+ if (lzma_block_header_encode(&coder->block_options,
+ coder->buffer) != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ coder->buffer_size = coder->block_options.header_size;
+ coder->sequence = SEQ_BLOCK_HEADER;
+ break;
+ }
+
+ case SEQ_BLOCK_ENCODE: {
+ static const lzma_action convert[LZMA_ACTION_MAX + 1] = {
+ LZMA_RUN,
+ LZMA_SYNC_FLUSH,
+ LZMA_FINISH,
+ LZMA_FINISH,
+ LZMA_FINISH,
+ };
+
+ const lzma_ret ret = coder->block_encoder.code(
+ coder->block_encoder.coder, allocator,
+ in, in_pos, in_size,
+ out, out_pos, out_size, convert[action]);
+ if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
+ return ret;
+
+ // Add a new Index Record.
+ const lzma_vli unpadded_size = lzma_block_unpadded_size(
+ &coder->block_options);
+ assert(unpadded_size != 0);
+ return_if_error(lzma_index_append(coder->index, allocator,
+ unpadded_size,
+ coder->block_options.uncompressed_size));
+
+ coder->sequence = SEQ_BLOCK_INIT;
+ break;
+ }
+
+ case SEQ_INDEX_ENCODE: {
+ // Call the Index encoder. It doesn't take any input, so
+ // those pointers can be NULL.
+ const lzma_ret ret = coder->index_encoder.code(
+ coder->index_encoder.coder, allocator,
+ NULL, NULL, 0,
+ out, out_pos, out_size, LZMA_RUN);
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ // Encode the Stream Footer into coder->buffer.
+ const lzma_stream_flags stream_flags = {
+ .version = 0,
+ .backward_size = lzma_index_size(coder->index),
+ .check = coder->block_options.check,
+ };
+
+ if (lzma_stream_footer_encode(&stream_flags, coder->buffer)
+ != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
+ coder->sequence = SEQ_STREAM_FOOTER;
+ break;
+ }
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+stream_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ lzma_next_end(&coder->block_encoder, allocator);
+ lzma_next_end(&coder->index_encoder, allocator);
+ lzma_index_end(coder->index, allocator);
+
+ lzma_filters_free(coder->filters, allocator);
+
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+stream_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+ const lzma_filter *filters,
+ const lzma_filter *reversed_filters)
+{
+ lzma_stream_coder *coder = coder_ptr;
+ lzma_ret ret;
+
+ // Make a copy to a temporary buffer first. This way it is easier
+ // to keep the encoder state unchanged if an error occurs with
+ // lzma_filters_copy().
+ lzma_filter temp[LZMA_FILTERS_MAX + 1];
+ return_if_error(lzma_filters_copy(filters, temp, allocator));
+
+ if (coder->sequence <= SEQ_BLOCK_INIT) {
+ // There is no incomplete Block waiting to be finished,
+ // thus we can change the whole filter chain. Start by
+ // trying to initialize the Block encoder with the new
+ // chain. This way we detect if the chain is valid.
+ coder->block_encoder_is_initialized = false;
+ coder->block_options.filters = temp;
+ ret = block_encoder_init(coder, allocator);
+ coder->block_options.filters = coder->filters;
+ if (ret != LZMA_OK)
+ goto error;
+
+ coder->block_encoder_is_initialized = true;
+
+ } else if (coder->sequence <= SEQ_BLOCK_ENCODE) {
+ // We are in the middle of a Block. Try to update only
+ // the filter-specific options.
+ ret = coder->block_encoder.update(
+ coder->block_encoder.coder, allocator,
+ filters, reversed_filters);
+ if (ret != LZMA_OK)
+ goto error;
+ } else {
+ // Trying to update the filter chain when we are already
+ // encoding Index or Stream Footer.
+ ret = LZMA_PROG_ERROR;
+ goto error;
+ }
+
+ // Free the options of the old chain.
+ lzma_filters_free(coder->filters, allocator);
+
+ // Copy the new filter chain in place.
+ memcpy(coder->filters, temp, sizeof(temp));
+
+ return LZMA_OK;
+
+error:
+ lzma_filters_free(temp, allocator);
+ return ret;
+}
+
+
+static lzma_ret
+stream_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter *filters, lzma_check check)
+{
+ lzma_next_coder_init(&stream_encoder_init, next, allocator);
+
+ if (filters == NULL)
+ return LZMA_PROG_ERROR;
+
+ lzma_stream_coder *coder = next->coder;
+
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &stream_encode;
+ next->end = &stream_encoder_end;
+ next->update = &stream_encoder_update;
+
+ coder->filters[0].id = LZMA_VLI_UNKNOWN;
+ coder->block_encoder = LZMA_NEXT_CODER_INIT;
+ coder->index_encoder = LZMA_NEXT_CODER_INIT;
+ coder->index = NULL;
+ }
+
+ // Basic initializations
+ coder->sequence = SEQ_STREAM_HEADER;
+ coder->block_options.version = 0;
+ coder->block_options.check = check;
+
+ // Initialize the Index
+ lzma_index_end(coder->index, allocator);
+ coder->index = lzma_index_init(allocator);
+ if (coder->index == NULL)
+ return LZMA_MEM_ERROR;
+
+ // Encode the Stream Header
+ lzma_stream_flags stream_flags = {
+ .version = 0,
+ .check = check,
+ };
+ return_if_error(lzma_stream_header_encode(
+ &stream_flags, coder->buffer));
+
+ coder->buffer_pos = 0;
+ coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
+
+ // Initialize the Block encoder. This way we detect unsupported
+ // filter chains when initializing the Stream encoder instead of
+ // giving an error after Stream Header has already been written out.
+ return stream_encoder_update(coder, allocator, filters, NULL);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_encoder(lzma_stream *strm,
+ const lzma_filter *filters, lzma_check check)
+{
+ lzma_next_strm_init(stream_encoder_init, strm, filters, check);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+ strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
+ strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
+ strm->internal->supported_actions[LZMA_FULL_BARRIER] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/stream_encoder_mt.c b/src/liblzma/common/stream_encoder_mt.c
new file mode 100644
index 0000000..f64de9b
--- /dev/null
+++ b/src/liblzma/common/stream_encoder_mt.c
@@ -0,0 +1,1283 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_encoder_mt.c
+/// \brief Multithreaded .xz Stream encoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_encoder.h"
+#include "easy_preset.h"
+#include "block_encoder.h"
+#include "block_buffer_encoder.h"
+#include "index_encoder.h"
+#include "outqueue.h"
+
+
+/// Maximum supported block size. This makes it simpler to prevent integer
+/// overflows if we are given unusually large block size.
+#define BLOCK_SIZE_MAX (UINT64_MAX / LZMA_THREADS_MAX)
+
+
+typedef enum {
+ /// Waiting for work.
+ THR_IDLE,
+
+ /// Encoding is in progress.
+ THR_RUN,
+
+ /// Encoding is in progress but no more input data will
+ /// be read.
+ THR_FINISH,
+
+ /// The main thread wants the thread to stop whatever it was doing
+ /// but not exit.
+ THR_STOP,
+
+ /// The main thread wants the thread to exit. We could use
+ /// cancellation but since there's stopped anyway, this is lazier.
+ THR_EXIT,
+
+} worker_state;
+
+typedef struct lzma_stream_coder_s lzma_stream_coder;
+
+typedef struct worker_thread_s worker_thread;
+struct worker_thread_s {
+ worker_state state;
+
+ /// Input buffer of coder->block_size bytes. The main thread will
+ /// put new input into this and update in_size accordingly. Once
+ /// no more input is coming, state will be set to THR_FINISH.
+ uint8_t *in;
+
+ /// Amount of data available in the input buffer. This is modified
+ /// only by the main thread.
+ size_t in_size;
+
+ /// Output buffer for this thread. This is set by the main
+ /// thread every time a new Block is started with this thread
+ /// structure.
+ lzma_outbuf *outbuf;
+
+ /// Pointer to the main structure is needed when putting this
+ /// thread back to the stack of free threads.
+ lzma_stream_coder *coder;
+
+ /// The allocator is set by the main thread. Since a copy of the
+ /// pointer is kept here, the application must not change the
+ /// allocator before calling lzma_end().
+ const lzma_allocator *allocator;
+
+ /// Amount of uncompressed data that has already been compressed.
+ uint64_t progress_in;
+
+ /// Amount of compressed data that is ready.
+ uint64_t progress_out;
+
+ /// Block encoder
+ lzma_next_coder block_encoder;
+
+ /// Compression options for this Block
+ lzma_block block_options;
+
+ /// Filter chain for this thread. By copying the filters array
+ /// to each thread it is possible to change the filter chain
+ /// between Blocks using lzma_filters_update().
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+ /// Next structure in the stack of free worker threads.
+ worker_thread *next;
+
+ mythread_mutex mutex;
+ mythread_cond cond;
+
+ /// The ID of this thread is used to join the thread
+ /// when it's not needed anymore.
+ mythread thread_id;
+};
+
+
+struct lzma_stream_coder_s {
+ enum {
+ SEQ_STREAM_HEADER,
+ SEQ_BLOCK,
+ SEQ_INDEX,
+ SEQ_STREAM_FOOTER,
+ } sequence;
+
+ /// Start a new Block every block_size bytes of input unless
+ /// LZMA_FULL_FLUSH or LZMA_FULL_BARRIER is used earlier.
+ size_t block_size;
+
+ /// The filter chain to use for the next Block.
+ /// This can be updated using lzma_filters_update()
+ /// after LZMA_FULL_BARRIER or LZMA_FULL_FLUSH.
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+ /// A copy of filters[] will be put here when attempting to get
+ /// a new worker thread. This will be copied to a worker thread
+ /// when a thread becomes free and then this cache is marked as
+ /// empty by setting [0].id = LZMA_VLI_UNKNOWN. Without this cache
+ /// the filter options from filters[] would get uselessly copied
+ /// multiple times (allocated and freed) when waiting for a new free
+ /// worker thread.
+ ///
+ /// This is freed if filters[] is updated via lzma_filters_update().
+ lzma_filter filters_cache[LZMA_FILTERS_MAX + 1];
+
+
+ /// Index to hold sizes of the Blocks
+ lzma_index *index;
+
+ /// Index encoder
+ lzma_next_coder index_encoder;
+
+
+ /// Stream Flags for encoding the Stream Header and Stream Footer.
+ lzma_stream_flags stream_flags;
+
+ /// Buffer to hold Stream Header and Stream Footer.
+ uint8_t header[LZMA_STREAM_HEADER_SIZE];
+
+ /// Read position in header[]
+ size_t header_pos;
+
+
+ /// Output buffer queue for compressed data
+ lzma_outq outq;
+
+ /// How much memory to allocate for each lzma_outbuf.buf
+ size_t outbuf_alloc_size;
+
+
+ /// Maximum wait time if cannot use all the input and cannot
+ /// fill the output buffer. This is in milliseconds.
+ uint32_t timeout;
+
+
+ /// Error code from a worker thread
+ lzma_ret thread_error;
+
+ /// Array of allocated thread-specific structures
+ worker_thread *threads;
+
+ /// Number of structures in "threads" above. This is also the
+ /// number of threads that will be created at maximum.
+ uint32_t threads_max;
+
+ /// Number of thread structures that have been initialized, and
+ /// thus the number of worker threads actually created so far.
+ uint32_t threads_initialized;
+
+ /// Stack of free threads. When a thread finishes, it puts itself
+ /// back into this stack. This starts as empty because threads
+ /// are created only when actually needed.
+ worker_thread *threads_free;
+
+ /// The most recent worker thread to which the main thread writes
+ /// the new input from the application.
+ worker_thread *thr;
+
+
+ /// Amount of uncompressed data in Blocks that have already
+ /// been finished.
+ uint64_t progress_in;
+
+ /// Amount of compressed data in Stream Header + Blocks that
+ /// have already been finished.
+ uint64_t progress_out;
+
+
+ mythread_mutex mutex;
+ mythread_cond cond;
+};
+
+
+/// Tell the main thread that something has gone wrong.
+static void
+worker_error(worker_thread *thr, lzma_ret ret)
+{
+ assert(ret != LZMA_OK);
+ assert(ret != LZMA_STREAM_END);
+
+ mythread_sync(thr->coder->mutex) {
+ if (thr->coder->thread_error == LZMA_OK)
+ thr->coder->thread_error = ret;
+
+ mythread_cond_signal(&thr->coder->cond);
+ }
+
+ return;
+}
+
+
+static worker_state
+worker_encode(worker_thread *thr, size_t *out_pos, worker_state state)
+{
+ assert(thr->progress_in == 0);
+ assert(thr->progress_out == 0);
+
+ // Set the Block options.
+ thr->block_options = (lzma_block){
+ .version = 0,
+ .check = thr->coder->stream_flags.check,
+ .compressed_size = thr->outbuf->allocated,
+ .uncompressed_size = thr->coder->block_size,
+ .filters = thr->filters,
+ };
+
+ // Calculate maximum size of the Block Header. This amount is
+ // reserved in the beginning of the buffer so that Block Header
+ // along with Compressed Size and Uncompressed Size can be
+ // written there.
+ lzma_ret ret = lzma_block_header_size(&thr->block_options);
+ if (ret != LZMA_OK) {
+ worker_error(thr, ret);
+ return THR_STOP;
+ }
+
+ // Initialize the Block encoder.
+ ret = lzma_block_encoder_init(&thr->block_encoder,
+ thr->allocator, &thr->block_options);
+ if (ret != LZMA_OK) {
+ worker_error(thr, ret);
+ return THR_STOP;
+ }
+
+ size_t in_pos = 0;
+ size_t in_size = 0;
+
+ *out_pos = thr->block_options.header_size;
+ const size_t out_size = thr->outbuf->allocated;
+
+ do {
+ mythread_sync(thr->mutex) {
+ // Store in_pos and *out_pos into *thr so that
+ // an application may read them via
+ // lzma_get_progress() to get progress information.
+ //
+ // NOTE: These aren't updated when the encoding
+ // finishes. Instead, the final values are taken
+ // later from thr->outbuf.
+ thr->progress_in = in_pos;
+ thr->progress_out = *out_pos;
+
+ while (in_size == thr->in_size
+ && thr->state == THR_RUN)
+ mythread_cond_wait(&thr->cond, &thr->mutex);
+
+ state = thr->state;
+ in_size = thr->in_size;
+ }
+
+ // Return if we were asked to stop or exit.
+ if (state >= THR_STOP)
+ return state;
+
+ lzma_action action = state == THR_FINISH
+ ? LZMA_FINISH : LZMA_RUN;
+
+ // Limit the amount of input given to the Block encoder
+ // at once. This way this thread can react fairly quickly
+ // if the main thread wants us to stop or exit.
+ static const size_t in_chunk_max = 16384;
+ size_t in_limit = in_size;
+ if (in_size - in_pos > in_chunk_max) {
+ in_limit = in_pos + in_chunk_max;
+ action = LZMA_RUN;
+ }
+
+ ret = thr->block_encoder.code(
+ thr->block_encoder.coder, thr->allocator,
+ thr->in, &in_pos, in_limit, thr->outbuf->buf,
+ out_pos, out_size, action);
+ } while (ret == LZMA_OK && *out_pos < out_size);
+
+ switch (ret) {
+ case LZMA_STREAM_END:
+ assert(state == THR_FINISH);
+
+ // Encode the Block Header. By doing it after
+ // the compression, we can store the Compressed Size
+ // and Uncompressed Size fields.
+ ret = lzma_block_header_encode(&thr->block_options,
+ thr->outbuf->buf);
+ if (ret != LZMA_OK) {
+ worker_error(thr, ret);
+ return THR_STOP;
+ }
+
+ break;
+
+ case LZMA_OK:
+ // The data was incompressible. Encode it using uncompressed
+ // LZMA2 chunks.
+ //
+ // First wait that we have gotten all the input.
+ mythread_sync(thr->mutex) {
+ while (thr->state == THR_RUN)
+ mythread_cond_wait(&thr->cond, &thr->mutex);
+
+ state = thr->state;
+ in_size = thr->in_size;
+ }
+
+ if (state >= THR_STOP)
+ return state;
+
+ // Do the encoding. This takes care of the Block Header too.
+ *out_pos = 0;
+ ret = lzma_block_uncomp_encode(&thr->block_options,
+ thr->in, in_size, thr->outbuf->buf,
+ out_pos, out_size);
+
+ // It shouldn't fail.
+ if (ret != LZMA_OK) {
+ worker_error(thr, LZMA_PROG_ERROR);
+ return THR_STOP;
+ }
+
+ break;
+
+ default:
+ worker_error(thr, ret);
+ return THR_STOP;
+ }
+
+ // Set the size information that will be read by the main thread
+ // to write the Index field.
+ thr->outbuf->unpadded_size
+ = lzma_block_unpadded_size(&thr->block_options);
+ assert(thr->outbuf->unpadded_size != 0);
+ thr->outbuf->uncompressed_size = thr->block_options.uncompressed_size;
+
+ return THR_FINISH;
+}
+
+
+static MYTHREAD_RET_TYPE
+worker_start(void *thr_ptr)
+{
+ worker_thread *thr = thr_ptr;
+ worker_state state = THR_IDLE; // Init to silence a warning
+
+ while (true) {
+ // Wait for work.
+ mythread_sync(thr->mutex) {
+ while (true) {
+ // The thread is already idle so if we are
+ // requested to stop, just set the state.
+ if (thr->state == THR_STOP) {
+ thr->state = THR_IDLE;
+ mythread_cond_signal(&thr->cond);
+ }
+
+ state = thr->state;
+ if (state != THR_IDLE)
+ break;
+
+ mythread_cond_wait(&thr->cond, &thr->mutex);
+ }
+ }
+
+ size_t out_pos = 0;
+
+ assert(state != THR_IDLE);
+ assert(state != THR_STOP);
+
+ if (state <= THR_FINISH)
+ state = worker_encode(thr, &out_pos, state);
+
+ if (state == THR_EXIT)
+ break;
+
+ // Mark the thread as idle unless the main thread has
+ // told us to exit. Signal is needed for the case
+ // where the main thread is waiting for the threads to stop.
+ mythread_sync(thr->mutex) {
+ if (thr->state != THR_EXIT) {
+ thr->state = THR_IDLE;
+ mythread_cond_signal(&thr->cond);
+ }
+ }
+
+ mythread_sync(thr->coder->mutex) {
+ // If no errors occurred, make the encoded data
+ // available to be copied out.
+ if (state == THR_FINISH) {
+ thr->outbuf->pos = out_pos;
+ thr->outbuf->finished = true;
+ }
+
+ // Update the main progress info.
+ thr->coder->progress_in
+ += thr->outbuf->uncompressed_size;
+ thr->coder->progress_out += out_pos;
+ thr->progress_in = 0;
+ thr->progress_out = 0;
+
+ // Return this thread to the stack of free threads.
+ thr->next = thr->coder->threads_free;
+ thr->coder->threads_free = thr;
+
+ mythread_cond_signal(&thr->coder->cond);
+ }
+ }
+
+ // Exiting, free the resources.
+ lzma_filters_free(thr->filters, thr->allocator);
+
+ mythread_mutex_destroy(&thr->mutex);
+ mythread_cond_destroy(&thr->cond);
+
+ lzma_next_end(&thr->block_encoder, thr->allocator);
+ lzma_free(thr->in, thr->allocator);
+ return MYTHREAD_RET_VALUE;
+}
+
+
+/// Make the threads stop but not exit. Optionally wait for them to stop.
+static void
+threads_stop(lzma_stream_coder *coder, bool wait_for_threads)
+{
+ // Tell the threads to stop.
+ for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
+ mythread_sync(coder->threads[i].mutex) {
+ coder->threads[i].state = THR_STOP;
+ mythread_cond_signal(&coder->threads[i].cond);
+ }
+ }
+
+ if (!wait_for_threads)
+ return;
+
+ // Wait for the threads to settle in the idle state.
+ for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
+ mythread_sync(coder->threads[i].mutex) {
+ while (coder->threads[i].state != THR_IDLE)
+ mythread_cond_wait(&coder->threads[i].cond,
+ &coder->threads[i].mutex);
+ }
+ }
+
+ return;
+}
+
+
+/// Stop the threads and free the resources associated with them.
+/// Wait until the threads have exited.
+static void
+threads_end(lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+ for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
+ mythread_sync(coder->threads[i].mutex) {
+ coder->threads[i].state = THR_EXIT;
+ mythread_cond_signal(&coder->threads[i].cond);
+ }
+ }
+
+ for (uint32_t i = 0; i < coder->threads_initialized; ++i) {
+ int ret = mythread_join(coder->threads[i].thread_id);
+ assert(ret == 0);
+ (void)ret;
+ }
+
+ lzma_free(coder->threads, allocator);
+ return;
+}
+
+
+/// Initialize a new worker_thread structure and create a new thread.
+static lzma_ret
+initialize_new_thread(lzma_stream_coder *coder,
+ const lzma_allocator *allocator)
+{
+ worker_thread *thr = &coder->threads[coder->threads_initialized];
+
+ thr->in = lzma_alloc(coder->block_size, allocator);
+ if (thr->in == NULL)
+ return LZMA_MEM_ERROR;
+
+ if (mythread_mutex_init(&thr->mutex))
+ goto error_mutex;
+
+ if (mythread_cond_init(&thr->cond))
+ goto error_cond;
+
+ thr->state = THR_IDLE;
+ thr->allocator = allocator;
+ thr->coder = coder;
+ thr->progress_in = 0;
+ thr->progress_out = 0;
+ thr->block_encoder = LZMA_NEXT_CODER_INIT;
+ thr->filters[0].id = LZMA_VLI_UNKNOWN;
+
+ if (mythread_create(&thr->thread_id, &worker_start, thr))
+ goto error_thread;
+
+ ++coder->threads_initialized;
+ coder->thr = thr;
+
+ return LZMA_OK;
+
+error_thread:
+ mythread_cond_destroy(&thr->cond);
+
+error_cond:
+ mythread_mutex_destroy(&thr->mutex);
+
+error_mutex:
+ lzma_free(thr->in, allocator);
+ return LZMA_MEM_ERROR;
+}
+
+
+static lzma_ret
+get_thread(lzma_stream_coder *coder, const lzma_allocator *allocator)
+{
+ // If there are no free output subqueues, there is no
+ // point to try getting a thread.
+ if (!lzma_outq_has_buf(&coder->outq))
+ return LZMA_OK;
+
+ // That's also true if we cannot allocate memory for the output
+ // buffer in the output queue.
+ return_if_error(lzma_outq_prealloc_buf(&coder->outq, allocator,
+ coder->outbuf_alloc_size));
+
+ // Make a thread-specific copy of the filter chain. Put it in
+ // the cache array first so that if we cannot get a new thread yet,
+ // the allocation is ready when we try again.
+ if (coder->filters_cache[0].id == LZMA_VLI_UNKNOWN)
+ return_if_error(lzma_filters_copy(
+ coder->filters, coder->filters_cache, allocator));
+
+ // If there is a free structure on the stack, use it.
+ mythread_sync(coder->mutex) {
+ if (coder->threads_free != NULL) {
+ coder->thr = coder->threads_free;
+ coder->threads_free = coder->threads_free->next;
+ }
+ }
+
+ if (coder->thr == NULL) {
+ // If there are no uninitialized structures left, return.
+ if (coder->threads_initialized == coder->threads_max)
+ return LZMA_OK;
+
+ // Initialize a new thread.
+ return_if_error(initialize_new_thread(coder, allocator));
+ }
+
+ // Reset the parts of the thread state that have to be done
+ // in the main thread.
+ mythread_sync(coder->thr->mutex) {
+ coder->thr->state = THR_RUN;
+ coder->thr->in_size = 0;
+ coder->thr->outbuf = lzma_outq_get_buf(&coder->outq, NULL);
+
+ // Free the old thread-specific filter options and replace
+ // them with the already-allocated new options from
+ // coder->filters_cache[]. Then mark the cache as empty.
+ lzma_filters_free(coder->thr->filters, allocator);
+ memcpy(coder->thr->filters, coder->filters_cache,
+ sizeof(coder->filters_cache));
+ coder->filters_cache[0].id = LZMA_VLI_UNKNOWN;
+
+ mythread_cond_signal(&coder->thr->cond);
+ }
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
+stream_encode_in(lzma_stream_coder *coder, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, lzma_action action)
+{
+ while (*in_pos < in_size
+ || (coder->thr != NULL && action != LZMA_RUN)) {
+ if (coder->thr == NULL) {
+ // Get a new thread.
+ const lzma_ret ret = get_thread(coder, allocator);
+ if (coder->thr == NULL)
+ return ret;
+ }
+
+ // Copy the input data to thread's buffer.
+ size_t thr_in_size = coder->thr->in_size;
+ lzma_bufcpy(in, in_pos, in_size, coder->thr->in,
+ &thr_in_size, coder->block_size);
+
+ // Tell the Block encoder to finish if
+ // - it has got block_size bytes of input; or
+ // - all input was used and LZMA_FINISH, LZMA_FULL_FLUSH,
+ // or LZMA_FULL_BARRIER was used.
+ //
+ // TODO: LZMA_SYNC_FLUSH and LZMA_SYNC_BARRIER.
+ const bool finish = thr_in_size == coder->block_size
+ || (*in_pos == in_size && action != LZMA_RUN);
+
+ bool block_error = false;
+
+ mythread_sync(coder->thr->mutex) {
+ if (coder->thr->state == THR_IDLE) {
+ // Something has gone wrong with the Block
+ // encoder. It has set coder->thread_error
+ // which we will read a few lines later.
+ block_error = true;
+ } else {
+ // Tell the Block encoder its new amount
+ // of input and update the state if needed.
+ coder->thr->in_size = thr_in_size;
+
+ if (finish)
+ coder->thr->state = THR_FINISH;
+
+ mythread_cond_signal(&coder->thr->cond);
+ }
+ }
+
+ if (block_error) {
+ lzma_ret ret = LZMA_OK; // Init to silence a warning.
+
+ mythread_sync(coder->mutex) {
+ ret = coder->thread_error;
+ }
+
+ return ret;
+ }
+
+ if (finish)
+ coder->thr = NULL;
+ }
+
+ return LZMA_OK;
+}
+
+
+/// Wait until more input can be consumed, more output can be read, or
+/// an optional timeout is reached.
+static bool
+wait_for_work(lzma_stream_coder *coder, mythread_condtime *wait_abs,
+ bool *has_blocked, bool has_input)
+{
+ if (coder->timeout != 0 && !*has_blocked) {
+ // Every time when stream_encode_mt() is called via
+ // lzma_code(), *has_blocked starts as false. We set it
+ // to true here and calculate the absolute time when
+ // we must return if there's nothing to do.
+ //
+ // This way if we block multiple times for short moments
+ // less than "timeout" milliseconds, we will return once
+ // "timeout" amount of time has passed since the *first*
+ // blocking occurred. If the absolute time was calculated
+ // again every time we block, "timeout" would effectively
+ // be meaningless if we never consecutively block longer
+ // than "timeout" ms.
+ *has_blocked = true;
+ mythread_condtime_set(wait_abs, &coder->cond, coder->timeout);
+ }
+
+ bool timed_out = false;
+
+ mythread_sync(coder->mutex) {
+ // There are four things that we wait. If one of them
+ // becomes possible, we return.
+ // - If there is input left, we need to get a free
+ // worker thread and an output buffer for it.
+ // - Data ready to be read from the output queue.
+ // - A worker thread indicates an error.
+ // - Time out occurs.
+ while ((!has_input || coder->threads_free == NULL
+ || !lzma_outq_has_buf(&coder->outq))
+ && !lzma_outq_is_readable(&coder->outq)
+ && coder->thread_error == LZMA_OK
+ && !timed_out) {
+ if (coder->timeout != 0)
+ timed_out = mythread_cond_timedwait(
+ &coder->cond, &coder->mutex,
+ wait_abs) != 0;
+ else
+ mythread_cond_wait(&coder->cond,
+ &coder->mutex);
+ }
+ }
+
+ return timed_out;
+}
+
+
+static lzma_ret
+stream_encode_mt(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ switch (coder->sequence) {
+ case SEQ_STREAM_HEADER:
+ lzma_bufcpy(coder->header, &coder->header_pos,
+ sizeof(coder->header),
+ out, out_pos, out_size);
+ if (coder->header_pos < sizeof(coder->header))
+ return LZMA_OK;
+
+ coder->header_pos = 0;
+ coder->sequence = SEQ_BLOCK;
+
+ // Fall through
+
+ case SEQ_BLOCK: {
+ // Initialized to silence warnings.
+ lzma_vli unpadded_size = 0;
+ lzma_vli uncompressed_size = 0;
+ lzma_ret ret = LZMA_OK;
+
+ // These are for wait_for_work().
+ bool has_blocked = false;
+ mythread_condtime wait_abs = { 0 };
+
+ while (true) {
+ mythread_sync(coder->mutex) {
+ // Check for Block encoder errors.
+ ret = coder->thread_error;
+ if (ret != LZMA_OK) {
+ assert(ret != LZMA_STREAM_END);
+ break; // Break out of mythread_sync.
+ }
+
+ // Try to read compressed data to out[].
+ ret = lzma_outq_read(&coder->outq, allocator,
+ out, out_pos, out_size,
+ &unpadded_size,
+ &uncompressed_size);
+ }
+
+ if (ret == LZMA_STREAM_END) {
+ // End of Block. Add it to the Index.
+ ret = lzma_index_append(coder->index,
+ allocator, unpadded_size,
+ uncompressed_size);
+ if (ret != LZMA_OK) {
+ threads_stop(coder, false);
+ return ret;
+ }
+
+ // If we didn't fill the output buffer yet,
+ // try to read more data. Maybe the next
+ // outbuf has been finished already too.
+ if (*out_pos < out_size)
+ continue;
+ }
+
+ if (ret != LZMA_OK) {
+ // coder->thread_error was set.
+ threads_stop(coder, false);
+ return ret;
+ }
+
+ // Try to give uncompressed data to a worker thread.
+ ret = stream_encode_in(coder, allocator,
+ in, in_pos, in_size, action);
+ if (ret != LZMA_OK) {
+ threads_stop(coder, false);
+ return ret;
+ }
+
+ // See if we should wait or return.
+ //
+ // TODO: LZMA_SYNC_FLUSH and LZMA_SYNC_BARRIER.
+ if (*in_pos == in_size) {
+ // LZMA_RUN: More data is probably coming
+ // so return to let the caller fill the
+ // input buffer.
+ if (action == LZMA_RUN)
+ return LZMA_OK;
+
+ // LZMA_FULL_BARRIER: The same as with
+ // LZMA_RUN but tell the caller that the
+ // barrier was completed.
+ if (action == LZMA_FULL_BARRIER)
+ return LZMA_STREAM_END;
+
+ // Finishing or flushing isn't completed until
+ // all input data has been encoded and copied
+ // to the output buffer.
+ if (lzma_outq_is_empty(&coder->outq)) {
+ // LZMA_FINISH: Continue to encode
+ // the Index field.
+ if (action == LZMA_FINISH)
+ break;
+
+ // LZMA_FULL_FLUSH: Return to tell
+ // the caller that flushing was
+ // completed.
+ if (action == LZMA_FULL_FLUSH)
+ return LZMA_STREAM_END;
+ }
+ }
+
+ // Return if there is no output space left.
+ // This check must be done after testing the input
+ // buffer, because we might want to use a different
+ // return code.
+ if (*out_pos == out_size)
+ return LZMA_OK;
+
+ // Neither in nor out has been used completely.
+ // Wait until there's something we can do.
+ if (wait_for_work(coder, &wait_abs, &has_blocked,
+ *in_pos < in_size))
+ return LZMA_TIMED_OUT;
+ }
+
+ // All Blocks have been encoded and the threads have stopped.
+ // Prepare to encode the Index field.
+ return_if_error(lzma_index_encoder_init(
+ &coder->index_encoder, allocator,
+ coder->index));
+ coder->sequence = SEQ_INDEX;
+
+ // Update the progress info to take the Index and
+ // Stream Footer into account. Those are very fast to encode
+ // so in terms of progress information they can be thought
+ // to be ready to be copied out.
+ coder->progress_out += lzma_index_size(coder->index)
+ + LZMA_STREAM_HEADER_SIZE;
+ }
+
+ // Fall through
+
+ case SEQ_INDEX: {
+ // Call the Index encoder. It doesn't take any input, so
+ // those pointers can be NULL.
+ const lzma_ret ret = coder->index_encoder.code(
+ coder->index_encoder.coder, allocator,
+ NULL, NULL, 0,
+ out, out_pos, out_size, LZMA_RUN);
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ // Encode the Stream Footer into coder->buffer.
+ coder->stream_flags.backward_size
+ = lzma_index_size(coder->index);
+ if (lzma_stream_footer_encode(&coder->stream_flags,
+ coder->header) != LZMA_OK)
+ return LZMA_PROG_ERROR;
+
+ coder->sequence = SEQ_STREAM_FOOTER;
+ }
+
+ // Fall through
+
+ case SEQ_STREAM_FOOTER:
+ lzma_bufcpy(coder->header, &coder->header_pos,
+ sizeof(coder->header),
+ out, out_pos, out_size);
+ return coder->header_pos < sizeof(coder->header)
+ ? LZMA_OK : LZMA_STREAM_END;
+ }
+
+ assert(0);
+ return LZMA_PROG_ERROR;
+}
+
+
+static void
+stream_encoder_mt_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ // Threads must be killed before the output queue can be freed.
+ threads_end(coder, allocator);
+ lzma_outq_end(&coder->outq, allocator);
+
+ lzma_filters_free(coder->filters, allocator);
+ lzma_filters_free(coder->filters_cache, allocator);
+
+ lzma_next_end(&coder->index_encoder, allocator);
+ lzma_index_end(coder->index, allocator);
+
+ mythread_cond_destroy(&coder->cond);
+ mythread_mutex_destroy(&coder->mutex);
+
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+stream_encoder_mt_update(void *coder_ptr, const lzma_allocator *allocator,
+ const lzma_filter *filters,
+ const lzma_filter *reversed_filters
+ lzma_attribute((__unused__)))
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ // Applications shouldn't attempt to change the options when
+ // we are already encoding the Index or Stream Footer.
+ if (coder->sequence > SEQ_BLOCK)
+ return LZMA_PROG_ERROR;
+
+ // For now the threaded encoder doesn't support changing
+ // the options in the middle of a Block.
+ if (coder->thr != NULL)
+ return LZMA_PROG_ERROR;
+
+ // Check if the filter chain seems mostly valid. See the comment
+ // in stream_encoder_mt_init().
+ if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ // Make a copy to a temporary buffer first. This way the encoder
+ // state stays unchanged if an error occurs in lzma_filters_copy().
+ lzma_filter temp[LZMA_FILTERS_MAX + 1];
+ return_if_error(lzma_filters_copy(filters, temp, allocator));
+
+ // Free the options of the old chain as well as the cache.
+ lzma_filters_free(coder->filters, allocator);
+ lzma_filters_free(coder->filters_cache, allocator);
+
+ // Copy the new filter chain in place.
+ memcpy(coder->filters, temp, sizeof(temp));
+
+ return LZMA_OK;
+}
+
+
+/// Options handling for lzma_stream_encoder_mt_init() and
+/// lzma_stream_encoder_mt_memusage()
+static lzma_ret
+get_options(const lzma_mt *options, lzma_options_easy *opt_easy,
+ const lzma_filter **filters, uint64_t *block_size,
+ uint64_t *outbuf_size_max)
+{
+ // Validate some of the options.
+ if (options == NULL)
+ return LZMA_PROG_ERROR;
+
+ if (options->flags != 0 || options->threads == 0
+ || options->threads > LZMA_THREADS_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ if (options->filters != NULL) {
+ // Filter chain was given, use it as is.
+ *filters = options->filters;
+ } else {
+ // Use a preset.
+ if (lzma_easy_preset(opt_easy, options->preset))
+ return LZMA_OPTIONS_ERROR;
+
+ *filters = opt_easy->filters;
+ }
+
+ // Block size
+ if (options->block_size > 0) {
+ if (options->block_size > BLOCK_SIZE_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ *block_size = options->block_size;
+ } else {
+ // Determine the Block size from the filter chain.
+ *block_size = lzma_mt_block_size(*filters);
+ if (*block_size == 0)
+ return LZMA_OPTIONS_ERROR;
+
+ assert(*block_size <= BLOCK_SIZE_MAX);
+ }
+
+ // Calculate the maximum amount output that a single output buffer
+ // may need to hold. This is the same as the maximum total size of
+ // a Block.
+ *outbuf_size_max = lzma_block_buffer_bound64(*block_size);
+ if (*outbuf_size_max == 0)
+ return LZMA_MEM_ERROR;
+
+ return LZMA_OK;
+}
+
+
+static void
+get_progress(void *coder_ptr, uint64_t *progress_in, uint64_t *progress_out)
+{
+ lzma_stream_coder *coder = coder_ptr;
+
+ // Lock coder->mutex to prevent finishing threads from moving their
+ // progress info from the worker_thread structure to lzma_stream_coder.
+ mythread_sync(coder->mutex) {
+ *progress_in = coder->progress_in;
+ *progress_out = coder->progress_out;
+
+ for (size_t i = 0; i < coder->threads_initialized; ++i) {
+ mythread_sync(coder->threads[i].mutex) {
+ *progress_in += coder->threads[i].progress_in;
+ *progress_out += coder->threads[i]
+ .progress_out;
+ }
+ }
+ }
+
+ return;
+}
+
+
+static lzma_ret
+stream_encoder_mt_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_mt *options)
+{
+ lzma_next_coder_init(&stream_encoder_mt_init, next, allocator);
+
+ // Get the filter chain.
+ lzma_options_easy easy;
+ const lzma_filter *filters;
+ uint64_t block_size;
+ uint64_t outbuf_size_max;
+ return_if_error(get_options(options, &easy, &filters,
+ &block_size, &outbuf_size_max));
+
+#if SIZE_MAX < UINT64_MAX
+ if (block_size > SIZE_MAX || outbuf_size_max > SIZE_MAX)
+ return LZMA_MEM_ERROR;
+#endif
+
+ // Validate the filter chain so that we can give an error in this
+ // function instead of delaying it to the first call to lzma_code().
+ // The memory usage calculation verifies the filter chain as
+ // a side effect so we take advantage of that. It's not a perfect
+ // check though as raw encoder allows LZMA1 too but such problems
+ // will be caught eventually with Block Header encoder.
+ if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ // Validate the Check ID.
+ if ((unsigned int)(options->check) > LZMA_CHECK_ID_MAX)
+ return LZMA_PROG_ERROR;
+
+ if (!lzma_check_is_supported(options->check))
+ return LZMA_UNSUPPORTED_CHECK;
+
+ // Allocate and initialize the base structure if needed.
+ lzma_stream_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_stream_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+
+ // For the mutex and condition variable initializations
+ // the error handling has to be done here because
+ // stream_encoder_mt_end() doesn't know if they have
+ // already been initialized or not.
+ if (mythread_mutex_init(&coder->mutex)) {
+ lzma_free(coder, allocator);
+ next->coder = NULL;
+ return LZMA_MEM_ERROR;
+ }
+
+ if (mythread_cond_init(&coder->cond)) {
+ mythread_mutex_destroy(&coder->mutex);
+ lzma_free(coder, allocator);
+ next->coder = NULL;
+ return LZMA_MEM_ERROR;
+ }
+
+ next->code = &stream_encode_mt;
+ next->end = &stream_encoder_mt_end;
+ next->get_progress = &get_progress;
+ next->update = &stream_encoder_mt_update;
+
+ coder->filters[0].id = LZMA_VLI_UNKNOWN;
+ coder->filters_cache[0].id = LZMA_VLI_UNKNOWN;
+ coder->index_encoder = LZMA_NEXT_CODER_INIT;
+ coder->index = NULL;
+ memzero(&coder->outq, sizeof(coder->outq));
+ coder->threads = NULL;
+ coder->threads_max = 0;
+ coder->threads_initialized = 0;
+ }
+
+ // Basic initializations
+ coder->sequence = SEQ_STREAM_HEADER;
+ coder->block_size = (size_t)(block_size);
+ coder->outbuf_alloc_size = (size_t)(outbuf_size_max);
+ coder->thread_error = LZMA_OK;
+ coder->thr = NULL;
+
+ // Allocate the thread-specific base structures.
+ assert(options->threads > 0);
+ if (coder->threads_max != options->threads) {
+ threads_end(coder, allocator);
+
+ coder->threads = NULL;
+ coder->threads_max = 0;
+
+ coder->threads_initialized = 0;
+ coder->threads_free = NULL;
+
+ coder->threads = lzma_alloc(
+ options->threads * sizeof(worker_thread),
+ allocator);
+ if (coder->threads == NULL)
+ return LZMA_MEM_ERROR;
+
+ coder->threads_max = options->threads;
+ } else {
+ // Reuse the old structures and threads. Tell the running
+ // threads to stop and wait until they have stopped.
+ threads_stop(coder, true);
+ }
+
+ // Output queue
+ return_if_error(lzma_outq_init(&coder->outq, allocator,
+ options->threads));
+
+ // Timeout
+ coder->timeout = options->timeout;
+
+ // Free the old filter chain and the cache.
+ lzma_filters_free(coder->filters, allocator);
+ lzma_filters_free(coder->filters_cache, allocator);
+
+ // Copy the new filter chain.
+ return_if_error(lzma_filters_copy(
+ filters, coder->filters, allocator));
+
+ // Index
+ lzma_index_end(coder->index, allocator);
+ coder->index = lzma_index_init(allocator);
+ if (coder->index == NULL)
+ return LZMA_MEM_ERROR;
+
+ // Stream Header
+ coder->stream_flags.version = 0;
+ coder->stream_flags.check = options->check;
+ return_if_error(lzma_stream_header_encode(
+ &coder->stream_flags, coder->header));
+
+ coder->header_pos = 0;
+
+ // Progress info
+ coder->progress_in = 0;
+ coder->progress_out = LZMA_STREAM_HEADER_SIZE;
+
+ return LZMA_OK;
+}
+
+
+#ifdef HAVE_SYMBOL_VERSIONS_LINUX
+// These are for compatibility with binaries linked against liblzma that
+// has been patched with xz-5.2.2-compat-libs.patch from RHEL/CentOS 7.
+// Actually that patch didn't create lzma_stream_encoder_mt@XZ_5.2.2
+// but it has been added here anyway since someone might misread the
+// RHEL patch and think both @XZ_5.1.2alpha and @XZ_5.2.2 exist.
+LZMA_SYMVER_API("lzma_stream_encoder_mt@XZ_5.1.2alpha",
+ lzma_ret, lzma_stream_encoder_mt_512a)(
+ lzma_stream *strm, const lzma_mt *options)
+ lzma_nothrow lzma_attr_warn_unused_result
+ __attribute__((__alias__("lzma_stream_encoder_mt_52")));
+
+LZMA_SYMVER_API("lzma_stream_encoder_mt@XZ_5.2.2",
+ lzma_ret, lzma_stream_encoder_mt_522)(
+ lzma_stream *strm, const lzma_mt *options)
+ lzma_nothrow lzma_attr_warn_unused_result
+ __attribute__((__alias__("lzma_stream_encoder_mt_52")));
+
+LZMA_SYMVER_API("lzma_stream_encoder_mt@@XZ_5.2",
+ lzma_ret, lzma_stream_encoder_mt_52)(
+ lzma_stream *strm, const lzma_mt *options)
+ lzma_nothrow lzma_attr_warn_unused_result;
+
+#define lzma_stream_encoder_mt lzma_stream_encoder_mt_52
+#endif
+extern LZMA_API(lzma_ret)
+lzma_stream_encoder_mt(lzma_stream *strm, const lzma_mt *options)
+{
+ lzma_next_strm_init(stream_encoder_mt_init, strm, options);
+
+ strm->internal->supported_actions[LZMA_RUN] = true;
+// strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
+ strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
+ strm->internal->supported_actions[LZMA_FULL_BARRIER] = true;
+ strm->internal->supported_actions[LZMA_FINISH] = true;
+
+ return LZMA_OK;
+}
+
+
+#ifdef HAVE_SYMBOL_VERSIONS_LINUX
+LZMA_SYMVER_API("lzma_stream_encoder_mt_memusage@XZ_5.1.2alpha",
+ uint64_t, lzma_stream_encoder_mt_memusage_512a)(
+ const lzma_mt *options) lzma_nothrow lzma_attr_pure
+ __attribute__((__alias__("lzma_stream_encoder_mt_memusage_52")));
+
+LZMA_SYMVER_API("lzma_stream_encoder_mt_memusage@XZ_5.2.2",
+ uint64_t, lzma_stream_encoder_mt_memusage_522)(
+ const lzma_mt *options) lzma_nothrow lzma_attr_pure
+ __attribute__((__alias__("lzma_stream_encoder_mt_memusage_52")));
+
+LZMA_SYMVER_API("lzma_stream_encoder_mt_memusage@@XZ_5.2",
+ uint64_t, lzma_stream_encoder_mt_memusage_52)(
+ const lzma_mt *options) lzma_nothrow lzma_attr_pure;
+
+#define lzma_stream_encoder_mt_memusage lzma_stream_encoder_mt_memusage_52
+#endif
+// This function name is a monster but it's consistent with the older
+// monster names. :-( 31 chars is the max that C99 requires so in that
+// sense it's not too long. ;-)
+extern LZMA_API(uint64_t)
+lzma_stream_encoder_mt_memusage(const lzma_mt *options)
+{
+ lzma_options_easy easy;
+ const lzma_filter *filters;
+ uint64_t block_size;
+ uint64_t outbuf_size_max;
+
+ if (get_options(options, &easy, &filters, &block_size,
+ &outbuf_size_max) != LZMA_OK)
+ return UINT64_MAX;
+
+ // Memory usage of the input buffers
+ const uint64_t inbuf_memusage = options->threads * block_size;
+
+ // Memory usage of the filter encoders
+ uint64_t filters_memusage = lzma_raw_encoder_memusage(filters);
+ if (filters_memusage == UINT64_MAX)
+ return UINT64_MAX;
+
+ filters_memusage *= options->threads;
+
+ // Memory usage of the output queue
+ const uint64_t outq_memusage = lzma_outq_memusage(
+ outbuf_size_max, options->threads);
+ if (outq_memusage == UINT64_MAX)
+ return UINT64_MAX;
+
+ // Sum them with overflow checking.
+ uint64_t total_memusage = LZMA_MEMUSAGE_BASE
+ + sizeof(lzma_stream_coder)
+ + options->threads * sizeof(worker_thread);
+
+ if (UINT64_MAX - total_memusage < inbuf_memusage)
+ return UINT64_MAX;
+
+ total_memusage += inbuf_memusage;
+
+ if (UINT64_MAX - total_memusage < filters_memusage)
+ return UINT64_MAX;
+
+ total_memusage += filters_memusage;
+
+ if (UINT64_MAX - total_memusage < outq_memusage)
+ return UINT64_MAX;
+
+ return total_memusage + outq_memusage;
+}
diff --git a/src/liblzma/common/stream_flags_common.c b/src/liblzma/common/stream_flags_common.c
new file mode 100644
index 0000000..fbe8eb8
--- /dev/null
+++ b/src/liblzma/common/stream_flags_common.c
@@ -0,0 +1,47 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_flags_common.c
+/// \brief Common stuff for Stream flags coders
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_flags_common.h"
+
+
+const uint8_t lzma_header_magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
+const uint8_t lzma_footer_magic[2] = { 0x59, 0x5A };
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_flags_compare(
+ const lzma_stream_flags *a, const lzma_stream_flags *b)
+{
+ // We can compare only version 0 structures.
+ if (a->version != 0 || b->version != 0)
+ return LZMA_OPTIONS_ERROR;
+
+ // Check type
+ if ((unsigned int)(a->check) > LZMA_CHECK_ID_MAX
+ || (unsigned int)(b->check) > LZMA_CHECK_ID_MAX)
+ return LZMA_PROG_ERROR;
+
+ if (a->check != b->check)
+ return LZMA_DATA_ERROR;
+
+ // Backward Sizes are compared only if they are known in both.
+ if (a->backward_size != LZMA_VLI_UNKNOWN
+ && b->backward_size != LZMA_VLI_UNKNOWN) {
+ if (!is_backward_size_valid(a) || !is_backward_size_valid(b))
+ return LZMA_PROG_ERROR;
+
+ if (a->backward_size != b->backward_size)
+ return LZMA_DATA_ERROR;
+ }
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/stream_flags_common.h b/src/liblzma/common/stream_flags_common.h
new file mode 100644
index 0000000..84e96ba
--- /dev/null
+++ b/src/liblzma/common/stream_flags_common.h
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_flags_common.h
+/// \brief Common stuff for Stream flags coders
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_STREAM_FLAGS_COMMON_H
+#define LZMA_STREAM_FLAGS_COMMON_H
+
+#include "common.h"
+
+/// Size of the Stream Flags field
+#define LZMA_STREAM_FLAGS_SIZE 2
+
+lzma_attr_visibility_hidden
+extern const uint8_t lzma_header_magic[6];
+
+lzma_attr_visibility_hidden
+extern const uint8_t lzma_footer_magic[2];
+
+
+static inline bool
+is_backward_size_valid(const lzma_stream_flags *options)
+{
+ return options->backward_size >= LZMA_BACKWARD_SIZE_MIN
+ && options->backward_size <= LZMA_BACKWARD_SIZE_MAX
+ && (options->backward_size & 3) == 0;
+}
+
+#endif
diff --git a/src/liblzma/common/stream_flags_decoder.c b/src/liblzma/common/stream_flags_decoder.c
new file mode 100644
index 0000000..b8d263b
--- /dev/null
+++ b/src/liblzma/common/stream_flags_decoder.c
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_flags_decoder.c
+/// \brief Decodes Stream Header and Stream Footer from .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_flags_common.h"
+
+
+static bool
+stream_flags_decode(lzma_stream_flags *options, const uint8_t *in)
+{
+ // Reserved bits must be unset.
+ if (in[0] != 0x00 || (in[1] & 0xF0))
+ return true;
+
+ options->version = 0;
+ options->check = in[1] & 0x0F;
+
+ return false;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
+{
+ // Magic
+ if (memcmp(in, lzma_header_magic, sizeof(lzma_header_magic)) != 0)
+ return LZMA_FORMAT_ERROR;
+
+ // Verify the CRC32 so we can distinguish between corrupt
+ // and unsupported files.
+ const uint32_t crc = lzma_crc32(in + sizeof(lzma_header_magic),
+ LZMA_STREAM_FLAGS_SIZE, 0);
+ if (crc != read32le(in + sizeof(lzma_header_magic)
+ + LZMA_STREAM_FLAGS_SIZE)) {
+#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+ return LZMA_DATA_ERROR;
+#endif
+ }
+
+ // Stream Flags
+ if (stream_flags_decode(options, in + sizeof(lzma_header_magic)))
+ return LZMA_OPTIONS_ERROR;
+
+ // Set Backward Size to indicate unknown value. That way
+ // lzma_stream_flags_compare() can be used to compare Stream Header
+ // and Stream Footer while keeping it useful also for comparing
+ // two Stream Footers.
+ options->backward_size = LZMA_VLI_UNKNOWN;
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
+{
+ // Magic
+ if (memcmp(in + sizeof(uint32_t) * 2 + LZMA_STREAM_FLAGS_SIZE,
+ lzma_footer_magic, sizeof(lzma_footer_magic)) != 0)
+ return LZMA_FORMAT_ERROR;
+
+ // CRC32
+ const uint32_t crc = lzma_crc32(in + sizeof(uint32_t),
+ sizeof(uint32_t) + LZMA_STREAM_FLAGS_SIZE, 0);
+ if (crc != read32le(in)) {
+#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+ return LZMA_DATA_ERROR;
+#endif
+ }
+
+ // Stream Flags
+ if (stream_flags_decode(options, in + sizeof(uint32_t) * 2))
+ return LZMA_OPTIONS_ERROR;
+
+ // Backward Size
+ options->backward_size = read32le(in + sizeof(uint32_t));
+ options->backward_size = (options->backward_size + 1) * 4;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/stream_flags_encoder.c b/src/liblzma/common/stream_flags_encoder.c
new file mode 100644
index 0000000..b98ab17
--- /dev/null
+++ b/src/liblzma/common/stream_flags_encoder.c
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file stream_flags_encoder.c
+/// \brief Encodes Stream Header and Stream Footer for .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "stream_flags_common.h"
+
+
+static bool
+stream_flags_encode(const lzma_stream_flags *options, uint8_t *out)
+{
+ if ((unsigned int)(options->check) > LZMA_CHECK_ID_MAX)
+ return true;
+
+ out[0] = 0x00;
+ out[1] = options->check;
+
+ return false;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
+{
+ assert(sizeof(lzma_header_magic) + LZMA_STREAM_FLAGS_SIZE
+ + 4 == LZMA_STREAM_HEADER_SIZE);
+
+ if (options->version != 0)
+ return LZMA_OPTIONS_ERROR;
+
+ // Magic
+ memcpy(out, lzma_header_magic, sizeof(lzma_header_magic));
+
+ // Stream Flags
+ if (stream_flags_encode(options, out + sizeof(lzma_header_magic)))
+ return LZMA_PROG_ERROR;
+
+ // CRC32 of the Stream Header
+ const uint32_t crc = lzma_crc32(out + sizeof(lzma_header_magic),
+ LZMA_STREAM_FLAGS_SIZE, 0);
+
+ write32le(out + sizeof(lzma_header_magic) + LZMA_STREAM_FLAGS_SIZE,
+ crc);
+
+ return LZMA_OK;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
+{
+ assert(2 * 4 + LZMA_STREAM_FLAGS_SIZE + sizeof(lzma_footer_magic)
+ == LZMA_STREAM_HEADER_SIZE);
+
+ if (options->version != 0)
+ return LZMA_OPTIONS_ERROR;
+
+ // Backward Size
+ if (!is_backward_size_valid(options))
+ return LZMA_PROG_ERROR;
+
+ write32le(out + 4, options->backward_size / 4 - 1);
+
+ // Stream Flags
+ if (stream_flags_encode(options, out + 2 * 4))
+ return LZMA_PROG_ERROR;
+
+ // CRC32
+ const uint32_t crc = lzma_crc32(
+ out + 4, 4 + LZMA_STREAM_FLAGS_SIZE, 0);
+
+ write32le(out, crc);
+
+ // Magic
+ memcpy(out + 2 * 4 + LZMA_STREAM_FLAGS_SIZE,
+ lzma_footer_magic, sizeof(lzma_footer_magic));
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/common/string_conversion.c b/src/liblzma/common/string_conversion.c
new file mode 100644
index 0000000..d2c1e80
--- /dev/null
+++ b/src/liblzma/common/string_conversion.c
@@ -0,0 +1,1324 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file string_conversion.c
+/// \brief Conversion of strings to filter chain and vice versa
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "filter_common.h"
+
+
+/////////////////////
+// String building //
+/////////////////////
+
+/// How much memory to allocate for strings. For now, no realloc is used
+/// so this needs to be big enough even though there of course is
+/// an overflow check still.
+///
+/// FIXME? Using a fixed size is wasteful if the application doesn't free
+/// the string fairly quickly but this can be improved later if needed.
+#define STR_ALLOC_SIZE 800
+
+
+typedef struct {
+ char *buf;
+ size_t pos;
+} lzma_str;
+
+
+static lzma_ret
+str_init(lzma_str *str, const lzma_allocator *allocator)
+{
+ str->buf = lzma_alloc(STR_ALLOC_SIZE, allocator);
+ if (str->buf == NULL)
+ return LZMA_MEM_ERROR;
+
+ str->pos = 0;
+ return LZMA_OK;
+}
+
+
+static void
+str_free(lzma_str *str, const lzma_allocator *allocator)
+{
+ lzma_free(str->buf, allocator);
+ return;
+}
+
+
+static bool
+str_is_full(const lzma_str *str)
+{
+ return str->pos == STR_ALLOC_SIZE - 1;
+}
+
+
+static lzma_ret
+str_finish(char **dest, lzma_str *str, const lzma_allocator *allocator)
+{
+ if (str_is_full(str)) {
+ // The preallocated buffer was too small.
+ // This shouldn't happen as STR_ALLOC_SIZE should
+ // be adjusted if new filters are added.
+ lzma_free(str->buf, allocator);
+ *dest = NULL;
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ str->buf[str->pos] = '\0';
+ *dest = str->buf;
+ return LZMA_OK;
+}
+
+
+static void
+str_append_str(lzma_str *str, const char *s)
+{
+ const size_t len = strlen(s);
+ const size_t limit = STR_ALLOC_SIZE - 1 - str->pos;
+ const size_t copy_size = my_min(len, limit);
+
+ memcpy(str->buf + str->pos, s, copy_size);
+ str->pos += copy_size;
+ return;
+}
+
+
+static void
+str_append_u32(lzma_str *str, uint32_t v, bool use_byte_suffix)
+{
+ if (v == 0) {
+ str_append_str(str, "0");
+ } else {
+ // NOTE: Don't use plain "B" because xz and the parser in this
+ // file don't support it and at glance it may look like 8
+ // (there cannot be a space before the suffix).
+ static const char suffixes[4][4] = { "", "KiB", "MiB", "GiB" };
+
+ size_t suf = 0;
+ if (use_byte_suffix) {
+ while ((v & 1023) == 0
+ && suf < ARRAY_SIZE(suffixes) - 1) {
+ v >>= 10;
+ ++suf;
+ }
+ }
+
+ // UINT32_MAX in base 10 would need 10 + 1 bytes. Remember
+ // that initializing to "" initializes all elements to
+ // zero so '\0'-termination gets handled by this.
+ char buf[16] = "";
+ size_t pos = sizeof(buf) - 1;
+
+ do {
+ buf[--pos] = '0' + (v % 10);
+ v /= 10;
+ } while (v != 0);
+
+ str_append_str(str, buf + pos);
+ str_append_str(str, suffixes[suf]);
+ }
+
+ return;
+}
+
+
+//////////////////////////////////////////////
+// Parsing and stringification declarations //
+//////////////////////////////////////////////
+
+/// Maximum length for filter and option names.
+/// 11 chars + terminating '\0' + sizeof(uint32_t) = 16 bytes
+#define NAME_LEN_MAX 11
+
+
+/// For option_map.flags: Use .u.map to do convert the input value
+/// to an integer. Without this flag, .u.range.{min,max} are used
+/// as the allowed range for the integer.
+#define OPTMAP_USE_NAME_VALUE_MAP 0x01
+
+/// For option_map.flags: Allow KiB/MiB/GiB in input string and use them in
+/// the stringified output if the value is an exact multiple of these.
+/// This is used e.g. for LZMA1/2 dictionary size.
+#define OPTMAP_USE_BYTE_SUFFIX 0x02
+
+/// For option_map.flags: If the integer value is zero then this option
+/// won't be included in the stringified output. It's used e.g. for
+/// BCJ filter start offset which usually is zero.
+#define OPTMAP_NO_STRFY_ZERO 0x04
+
+/// Possible values for option_map.type. Since OPTMAP_TYPE_UINT32 is 0,
+/// it doesn't need to be specified in the initializers as it is
+/// the implicit value.
+enum {
+ OPTMAP_TYPE_UINT32,
+ OPTMAP_TYPE_LZMA_MODE,
+ OPTMAP_TYPE_LZMA_MATCH_FINDER,
+ OPTMAP_TYPE_LZMA_PRESET,
+};
+
+
+/// This is for mapping string values in options to integers.
+/// The last element of an array must have "" as the name.
+/// It's used e.g. for match finder names in LZMA1/2.
+typedef struct {
+ const char name[NAME_LEN_MAX + 1];
+ const uint32_t value;
+} name_value_map;
+
+
+/// Each filter that has options needs an array of option_map structures.
+/// The array doesn't need to be terminated as the functions take the
+/// length of the array as an argument.
+///
+/// When converting a string to filter options structure, option values
+/// will be handled in a few different ways:
+///
+/// (1) If .type equals OPTMAP_TYPE_LZMA_PRESET then LZMA1/2 preset string
+/// is handled specially.
+///
+/// (2) If .flags has OPTMAP_USE_NAME_VALUE_MAP set then the string is
+/// converted to an integer using the name_value_map pointed by .u.map.
+/// The last element in .u.map must have .name = "" as the terminator.
+///
+/// (3) Otherwise the string is treated as a non-negative unsigned decimal
+/// integer which must be in the range set in .u.range. If .flags has
+/// OPTMAP_USE_BYTE_SUFFIX then KiB, MiB, and GiB suffixes are allowed.
+///
+/// The integer value from (2) or (3) is then stored to filter_options
+/// at the offset specified in .offset using the type specified in .type
+/// (default is uint32_t).
+///
+/// Stringifying a filter is done by processing a given number of options
+/// in order from the beginning of an option_map array. The integer is
+/// read from filter_options at .offset using the type from .type.
+///
+/// If the integer is zero and .flags has OPTMAP_NO_STRFY_ZERO then the
+/// option is skipped.
+///
+/// If .flags has OPTMAP_USE_NAME_VALUE_MAP set then .u.map will be used
+/// to convert the option to a string. If the map doesn't contain a string
+/// for the integer value then "UNKNOWN" is used.
+///
+/// If .flags doesn't have OPTMAP_USE_NAME_VALUE_MAP set then the integer is
+/// converted to a decimal value. If OPTMAP_USE_BYTE_SUFFIX is used then KiB,
+/// MiB, or GiB suffix is used if the value is an exact multiple of these.
+/// Plain "B" suffix is never used.
+typedef struct {
+ char name[NAME_LEN_MAX + 1];
+ uint8_t type;
+ uint8_t flags;
+ uint16_t offset;
+
+ union {
+ struct {
+ uint32_t min;
+ uint32_t max;
+ } range;
+
+ const name_value_map *map;
+ } u;
+} option_map;
+
+
+static const char *parse_options(const char **const str, const char *str_end,
+ void *filter_options,
+ const option_map *const optmap, const size_t optmap_size);
+
+
+/////////
+// BCJ //
+/////////
+
+#if defined(HAVE_ENCODER_X86) \
+ || defined(HAVE_DECODER_X86) \
+ || defined(HAVE_ENCODER_ARM) \
+ || defined(HAVE_DECODER_ARM) \
+ || defined(HAVE_ENCODER_ARMTHUMB) \
+ || defined(HAVE_DECODER_ARMTHUMB) \
+ || defined(HAVE_ENCODER_ARM64) \
+ || defined(HAVE_DECODER_ARM64) \
+ || defined(HAVE_ENCODER_POWERPC) \
+ || defined(HAVE_DECODER_POWERPC) \
+ || defined(HAVE_ENCODER_IA64) \
+ || defined(HAVE_DECODER_IA64) \
+ || defined(HAVE_ENCODER_SPARC) \
+ || defined(HAVE_DECODER_SPARC)
+static const option_map bcj_optmap[] = {
+ {
+ .name = "start",
+ .flags = OPTMAP_NO_STRFY_ZERO | OPTMAP_USE_BYTE_SUFFIX,
+ .offset = offsetof(lzma_options_bcj, start_offset),
+ .u.range.min = 0,
+ .u.range.max = UINT32_MAX,
+ }
+};
+
+
+static const char *
+parse_bcj(const char **const str, const char *str_end, void *filter_options)
+{
+ // filter_options was zeroed on allocation and that is enough
+ // for the default value.
+ return parse_options(str, str_end, filter_options,
+ bcj_optmap, ARRAY_SIZE(bcj_optmap));
+}
+#endif
+
+
+///////////
+// Delta //
+///////////
+
+#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
+static const option_map delta_optmap[] = {
+ {
+ .name = "dist",
+ .offset = offsetof(lzma_options_delta, dist),
+ .u.range.min = LZMA_DELTA_DIST_MIN,
+ .u.range.max = LZMA_DELTA_DIST_MAX,
+ }
+};
+
+
+static const char *
+parse_delta(const char **const str, const char *str_end, void *filter_options)
+{
+ lzma_options_delta *opts = filter_options;
+ opts->type = LZMA_DELTA_TYPE_BYTE;
+ opts->dist = LZMA_DELTA_DIST_MIN;
+
+ return parse_options(str, str_end, filter_options,
+ delta_optmap, ARRAY_SIZE(delta_optmap));
+}
+#endif
+
+
+///////////////////
+// LZMA1 & LZMA2 //
+///////////////////
+
+/// Help string for presets
+#define LZMA12_PRESET_STR "0-9[e]"
+
+
+static const char *
+parse_lzma12_preset(const char **const str, const char *str_end,
+ uint32_t *preset)
+{
+ assert(*str < str_end);
+ *preset = (uint32_t)(**str - '0');
+
+ // NOTE: Remember to update LZMA12_PRESET_STR if this is modified!
+ while (++*str < str_end) {
+ switch (**str) {
+ case 'e':
+ *preset |= LZMA_PRESET_EXTREME;
+ break;
+
+ default:
+ return "Unsupported preset flag";
+ }
+ }
+
+ return NULL;
+}
+
+
+static const char *
+set_lzma12_preset(const char **const str, const char *str_end,
+ void *filter_options)
+{
+ uint32_t preset;
+ const char *errmsg = parse_lzma12_preset(str, str_end, &preset);
+ if (errmsg != NULL)
+ return errmsg;
+
+ lzma_options_lzma *opts = filter_options;
+ if (lzma_lzma_preset(opts, preset))
+ return "Unsupported preset";
+
+ return NULL;
+}
+
+
+static const name_value_map lzma12_mode_map[] = {
+ { "fast", LZMA_MODE_FAST },
+ { "normal", LZMA_MODE_NORMAL },
+ { "", 0 }
+};
+
+
+static const name_value_map lzma12_mf_map[] = {
+ { "hc3", LZMA_MF_HC3 },
+ { "hc4", LZMA_MF_HC4 },
+ { "bt2", LZMA_MF_BT2 },
+ { "bt3", LZMA_MF_BT3 },
+ { "bt4", LZMA_MF_BT4 },
+ { "", 0 }
+};
+
+
+static const option_map lzma12_optmap[] = {
+ {
+ .name = "preset",
+ .type = OPTMAP_TYPE_LZMA_PRESET,
+ }, {
+ .name = "dict",
+ .flags = OPTMAP_USE_BYTE_SUFFIX,
+ .offset = offsetof(lzma_options_lzma, dict_size),
+ .u.range.min = LZMA_DICT_SIZE_MIN,
+ // FIXME? The max is really max for encoding but decoding
+ // would allow 4 GiB - 1 B.
+ .u.range.max = (UINT32_C(1) << 30) + (UINT32_C(1) << 29),
+ }, {
+ .name = "lc",
+ .offset = offsetof(lzma_options_lzma, lc),
+ .u.range.min = LZMA_LCLP_MIN,
+ .u.range.max = LZMA_LCLP_MAX,
+ }, {
+ .name = "lp",
+ .offset = offsetof(lzma_options_lzma, lp),
+ .u.range.min = LZMA_LCLP_MIN,
+ .u.range.max = LZMA_LCLP_MAX,
+ }, {
+ .name = "pb",
+ .offset = offsetof(lzma_options_lzma, pb),
+ .u.range.min = LZMA_PB_MIN,
+ .u.range.max = LZMA_PB_MAX,
+ }, {
+ .name = "mode",
+ .type = OPTMAP_TYPE_LZMA_MODE,
+ .flags = OPTMAP_USE_NAME_VALUE_MAP,
+ .offset = offsetof(lzma_options_lzma, mode),
+ .u.map = lzma12_mode_map,
+ }, {
+ .name = "nice",
+ .offset = offsetof(lzma_options_lzma, nice_len),
+ .u.range.min = 2,
+ .u.range.max = 273,
+ }, {
+ .name = "mf",
+ .type = OPTMAP_TYPE_LZMA_MATCH_FINDER,
+ .flags = OPTMAP_USE_NAME_VALUE_MAP,
+ .offset = offsetof(lzma_options_lzma, mf),
+ .u.map = lzma12_mf_map,
+ }, {
+ .name = "depth",
+ .offset = offsetof(lzma_options_lzma, depth),
+ .u.range.min = 0,
+ .u.range.max = UINT32_MAX,
+ }
+};
+
+
+static const char *
+parse_lzma12(const char **const str, const char *str_end, void *filter_options)
+{
+ lzma_options_lzma *opts = filter_options;
+
+ // It cannot fail.
+ const bool preset_ret = lzma_lzma_preset(opts, LZMA_PRESET_DEFAULT);
+ assert(!preset_ret);
+ (void)preset_ret;
+
+ const char *errmsg = parse_options(str, str_end, filter_options,
+ lzma12_optmap, ARRAY_SIZE(lzma12_optmap));
+ if (errmsg != NULL)
+ return errmsg;
+
+ if (opts->lc + opts->lp > LZMA_LCLP_MAX)
+ return "The sum of lc and lp must not exceed 4";
+
+ return NULL;
+}
+
+
+/////////////////////////////////////////
+// Generic parsing and stringification //
+/////////////////////////////////////////
+
+static const struct {
+ /// Name of the filter
+ char name[NAME_LEN_MAX + 1];
+
+ /// For lzma_str_to_filters:
+ /// Size of the filter-specific options structure.
+ uint32_t opts_size;
+
+ /// Filter ID
+ lzma_vli id;
+
+ /// For lzma_str_to_filters:
+ /// Function to parse the filter-specific options. The filter_options
+ /// will already have been allocated using lzma_alloc_zero().
+ const char *(*parse)(const char **str, const char *str_end,
+ void *filter_options);
+
+ /// For lzma_str_from_filters:
+ /// If the flag LZMA_STR_ENCODER is used then the first
+ /// strfy_encoder elements of optmap are stringified.
+ /// With LZMA_STR_DECODER strfy_decoder is used.
+ /// Currently encoders use all options that decoders do but if
+ /// that changes then this needs to be changed too, for example,
+ /// add a new OPTMAP flag to skip printing some decoder-only options.
+ const option_map *optmap;
+ uint8_t strfy_encoder;
+ uint8_t strfy_decoder;
+
+ /// For lzma_str_from_filters:
+ /// If true, lzma_filter.options is allowed to be NULL. In that case,
+ /// only the filter name is printed without any options.
+ bool allow_null;
+
+} filter_name_map[] = {
+#if defined (HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1)
+ { "lzma1", sizeof(lzma_options_lzma), LZMA_FILTER_LZMA1,
+ &parse_lzma12, lzma12_optmap, 9, 5, false },
+#endif
+
+#if defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
+ { "lzma2", sizeof(lzma_options_lzma), LZMA_FILTER_LZMA2,
+ &parse_lzma12, lzma12_optmap, 9, 2, false },
+#endif
+
+#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86)
+ { "x86", sizeof(lzma_options_bcj), LZMA_FILTER_X86,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
+#if defined(HAVE_ENCODER_ARM) || defined(HAVE_DECODER_ARM)
+ { "arm", sizeof(lzma_options_bcj), LZMA_FILTER_ARM,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
+#if defined(HAVE_ENCODER_ARMTHUMB) || defined(HAVE_DECODER_ARMTHUMB)
+ { "armthumb", sizeof(lzma_options_bcj), LZMA_FILTER_ARMTHUMB,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
+#if defined(HAVE_ENCODER_ARM64) || defined(HAVE_DECODER_ARM64)
+ { "arm64", sizeof(lzma_options_bcj), LZMA_FILTER_ARM64,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
+#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC)
+ { "powerpc", sizeof(lzma_options_bcj), LZMA_FILTER_POWERPC,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
+#if defined(HAVE_ENCODER_IA64) || defined(HAVE_DECODER_IA64)
+ { "ia64", sizeof(lzma_options_bcj), LZMA_FILTER_IA64,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
+#if defined(HAVE_ENCODER_SPARC) || defined(HAVE_DECODER_SPARC)
+ { "sparc", sizeof(lzma_options_bcj), LZMA_FILTER_SPARC,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
+#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
+ { "delta", sizeof(lzma_options_delta), LZMA_FILTER_DELTA,
+ &parse_delta, delta_optmap, 1, 1, false },
+#endif
+};
+
+
+/// Decodes options from a string for one filter (name1=value1,name2=value2).
+/// Caller must have allocated memory for filter_options already and set
+/// the initial default values. This is called from the filter-specific
+/// parse_* functions.
+///
+/// The input string starts at *str and the address in str_end is the first
+/// char that is not part of the string anymore. So no '\0' terminator is
+/// used. *str is advanced every time something has been decoded successfully.
+static const char *
+parse_options(const char **const str, const char *str_end,
+ void *filter_options,
+ const option_map *const optmap, const size_t optmap_size)
+{
+ while (*str < str_end && **str != '\0') {
+ // Each option is of the form name=value.
+ // Commas (',') separate options. Extra commas are ignored.
+ // Ignoring extra commas makes it simpler if an optional
+ // option stored in a shell variable which can be empty.
+ if (**str == ',') {
+ ++*str;
+ continue;
+ }
+
+ // Find where the next name=value ends.
+ const size_t str_len = (size_t)(str_end - *str);
+ const char *name_eq_value_end = memchr(*str, ',', str_len);
+ if (name_eq_value_end == NULL)
+ name_eq_value_end = str_end;
+
+ const char *equals_sign = memchr(*str, '=',
+ (size_t)(name_eq_value_end - *str));
+
+ // Fail if the '=' wasn't found or the option name is missing
+ // (the first char is '=').
+ if (equals_sign == NULL || **str == '=')
+ return "Options must be 'name=value' pairs separated "
+ "with commas";
+
+ // Reject a too long option name so that the memcmp()
+ // in the loop below won't read past the end of the
+ // string in optmap[i].name.
+ const size_t name_len = (size_t)(equals_sign - *str);
+ if (name_len > NAME_LEN_MAX)
+ return "Unknown option name";
+
+ // Find the option name from optmap[].
+ size_t i = 0;
+ while (true) {
+ if (i == optmap_size)
+ return "Unknown option name";
+
+ if (memcmp(*str, optmap[i].name, name_len) == 0
+ && optmap[i].name[name_len] == '\0')
+ break;
+
+ ++i;
+ }
+
+ // The input string is good at least until the start of
+ // the option value.
+ *str = equals_sign + 1;
+
+ // The code assumes that the option value isn't an empty
+ // string so check it here.
+ const size_t value_len = (size_t)(name_eq_value_end - *str);
+ if (value_len == 0)
+ return "Option value cannot be empty";
+
+ // LZMA1/2 preset has its own parsing function.
+ if (optmap[i].type == OPTMAP_TYPE_LZMA_PRESET) {
+ const char *errmsg = set_lzma12_preset(str,
+ name_eq_value_end, filter_options);
+ if (errmsg != NULL)
+ return errmsg;
+
+ continue;
+ }
+
+ // It's an integer value.
+ uint32_t v;
+ if (optmap[i].flags & OPTMAP_USE_NAME_VALUE_MAP) {
+ // The integer is picked from a string-to-integer map.
+ //
+ // Reject a too long value string so that the memcmp()
+ // in the loop below won't read past the end of the
+ // string in optmap[i].u.map[j].name.
+ if (value_len > NAME_LEN_MAX)
+ return "Invalid option value";
+
+ const name_value_map *map = optmap[i].u.map;
+ size_t j = 0;
+ while (true) {
+ // The array is terminated with an empty name.
+ if (map[j].name[0] == '\0')
+ return "Invalid option value";
+
+ if (memcmp(*str, map[j].name, value_len) == 0
+ && map[j].name[value_len]
+ == '\0') {
+ v = map[j].value;
+ break;
+ }
+
+ ++j;
+ }
+ } else if (**str < '0' || **str > '9') {
+ // Note that "max" isn't supported while it is
+ // supported in xz. It's not useful here.
+ return "Value is not a non-negative decimal integer";
+ } else {
+ // strtoul() has locale-specific behavior so it cannot
+ // be relied on to get reproducible results since we
+ // cannot change the locate in a thread-safe library.
+ // It also needs '\0'-termination.
+ //
+ // Use a temporary pointer so that *str will point
+ // to the beginning of the value string in case
+ // an error occurs.
+ const char *p = *str;
+ v = 0;
+ do {
+ if (v > UINT32_MAX / 10)
+ return "Value out of range";
+
+ v *= 10;
+
+ const uint32_t add = (uint32_t)(*p - '0');
+ if (UINT32_MAX - add < v)
+ return "Value out of range";
+
+ v += add;
+ ++p;
+ } while (p < name_eq_value_end
+ && *p >= '0' && *p <= '9');
+
+ if (p < name_eq_value_end) {
+ // Remember this position so that it can be
+ // used for error messages that are
+ // specifically about the suffix. (Out of
+ // range values are about the whole value
+ // and those error messages point to the
+ // beginning of the number part,
+ // not to the suffix.)
+ const char *multiplier_start = p;
+
+ // If multiplier suffix shouldn't be used
+ // then don't allow them even if the value
+ // would stay within limits. This is a somewhat
+ // unnecessary check but it rejects silly
+ // things like lzma2:pb=0MiB which xz allows.
+ if ((optmap[i].flags & OPTMAP_USE_BYTE_SUFFIX)
+ == 0) {
+ *str = multiplier_start;
+ return "This option does not support "
+ "any integer suffixes";
+ }
+
+ uint32_t shift;
+
+ switch (*p) {
+ case 'k':
+ case 'K':
+ shift = 10;
+ break;
+
+ case 'm':
+ case 'M':
+ shift = 20;
+ break;
+
+ case 'g':
+ case 'G':
+ shift = 30;
+ break;
+
+ default:
+ *str = multiplier_start;
+ return "Invalid multiplier suffix "
+ "(KiB, MiB, or GiB)";
+ }
+
+ ++p;
+
+ // Allow "M", "Mi", "MB", "MiB" and the same
+ // for the other five characters from the
+ // switch-statement above. All are handled
+ // as base-2 (perhaps a mistake, perhaps not).
+ // Note that 'i' and 'B' are case sensitive.
+ if (p < name_eq_value_end && *p == 'i')
+ ++p;
+
+ if (p < name_eq_value_end && *p == 'B')
+ ++p;
+
+ // Now we must have no chars remaining.
+ if (p < name_eq_value_end) {
+ *str = multiplier_start;
+ return "Invalid multiplier suffix "
+ "(KiB, MiB, or GiB)";
+ }
+
+ if (v > (UINT32_MAX >> shift))
+ return "Value out of range";
+
+ v <<= shift;
+ }
+
+ if (v < optmap[i].u.range.min
+ || v > optmap[i].u.range.max)
+ return "Value out of range";
+ }
+
+ // Set the value in filter_options. Enums are handled
+ // specially since the underlying type isn't the same
+ // as uint32_t on all systems.
+ void *ptr = (char *)filter_options + optmap[i].offset;
+ switch (optmap[i].type) {
+ case OPTMAP_TYPE_LZMA_MODE:
+ *(lzma_mode *)ptr = (lzma_mode)v;
+ break;
+
+ case OPTMAP_TYPE_LZMA_MATCH_FINDER:
+ *(lzma_match_finder *)ptr = (lzma_match_finder)v;
+ break;
+
+ default:
+ *(uint32_t *)ptr = v;
+ break;
+ }
+
+ // This option has been successfully handled.
+ *str = name_eq_value_end;
+ }
+
+ // No errors.
+ return NULL;
+}
+
+
+/// Finds the name of the filter at the beginning of the string and
+/// calls filter_name_map[i].parse() to decode the filter-specific options.
+/// The caller must have set str_end so that exactly one filter and its
+/// options are present without any trailing characters.
+static const char *
+parse_filter(const char **const str, const char *str_end, lzma_filter *filter,
+ const lzma_allocator *allocator, bool only_xz)
+{
+ // Search for a colon or equals sign that would separate the filter
+ // name from filter options. If neither is found, then the input
+ // string only contains a filter name and there are no options.
+ //
+ // First assume that a colon or equals sign won't be found:
+ const char *name_end = str_end;
+ const char *opts_start = str_end;
+
+ for (const char *p = *str; p < str_end; ++p) {
+ if (*p == ':' || *p == '=') {
+ name_end = p;
+
+ // Filter options (name1=value1,name2=value2,...)
+ // begin after the colon or equals sign.
+ opts_start = p + 1;
+ break;
+ }
+ }
+
+ // Reject a too long filter name so that the memcmp()
+ // in the loop below won't read past the end of the
+ // string in filter_name_map[i].name.
+ const size_t name_len = (size_t)(name_end - *str);
+ if (name_len > NAME_LEN_MAX)
+ return "Unknown filter name";
+
+ for (size_t i = 0; i < ARRAY_SIZE(filter_name_map); ++i) {
+ if (memcmp(*str, filter_name_map[i].name, name_len) == 0
+ && filter_name_map[i].name[name_len] == '\0') {
+ if (only_xz && filter_name_map[i].id
+ >= LZMA_FILTER_RESERVED_START)
+ return "This filter cannot be used in "
+ "the .xz format";
+
+ // Allocate the filter-specific options and
+ // initialize the memory with zeros.
+ void *options = lzma_alloc_zero(
+ filter_name_map[i].opts_size,
+ allocator);
+ if (options == NULL)
+ return "Memory allocation failed";
+
+ // Filter name was found so the input string is good
+ // at least this far.
+ *str = opts_start;
+
+ const char *errmsg = filter_name_map[i].parse(
+ str, str_end, options);
+ if (errmsg != NULL) {
+ lzma_free(options, allocator);
+ return errmsg;
+ }
+
+ // *filter is modified only when parsing is successful.
+ filter->id = filter_name_map[i].id;
+ filter->options = options;
+ return NULL;
+ }
+ }
+
+ return "Unknown filter name";
+}
+
+
+/// Converts the string to a filter chain (array of lzma_filter structures).
+///
+/// *str is advanced every time something has been decoded successfully.
+/// This way the caller knows where in the string a possible error occurred.
+static const char *
+str_to_filters(const char **const str, lzma_filter *filters, uint32_t flags,
+ const lzma_allocator *allocator)
+{
+ const char *errmsg;
+
+ // Skip leading spaces.
+ while (**str == ' ')
+ ++*str;
+
+ if (**str == '\0')
+ return "Empty string is not allowed, "
+ "try \"6\" if a default value is needed";
+
+ // Detect the type of the string.
+ //
+ // A string beginning with a digit or a string beginning with
+ // one dash and a digit are treated as presets. Trailing spaces
+ // will be ignored too (leading spaces were already ignored above).
+ //
+ // For example, "6", "7 ", "-9e", or " -3 " are treated as presets.
+ // Strings like "-" or "- " aren't preset.
+#define MY_IS_DIGIT(c) ((c) >= '0' && (c) <= '9')
+ if (MY_IS_DIGIT(**str) || (**str == '-' && MY_IS_DIGIT((*str)[1]))) {
+ if (**str == '-')
+ ++*str;
+
+ // Ignore trailing spaces.
+ const size_t str_len = strlen(*str);
+ const char *str_end = memchr(*str, ' ', str_len);
+ if (str_end != NULL) {
+ // There is at least one trailing space. Check that
+ // there are no chars other than spaces.
+ for (size_t i = 1; str_end[i] != '\0'; ++i)
+ if (str_end[i] != ' ')
+ return "Unsupported preset";
+ } else {
+ // There are no trailing spaces. Use the whole string.
+ str_end = *str + str_len;
+ }
+
+ uint32_t preset;
+ errmsg = parse_lzma12_preset(str, str_end, &preset);
+ if (errmsg != NULL)
+ return errmsg;
+
+ lzma_options_lzma *opts = lzma_alloc(sizeof(*opts), allocator);
+ if (opts == NULL)
+ return "Memory allocation failed";
+
+ if (lzma_lzma_preset(opts, preset)) {
+ lzma_free(opts, allocator);
+ return "Unsupported preset";
+ }
+
+ filters[0].id = LZMA_FILTER_LZMA2;
+ filters[0].options = opts;
+ filters[1].id = LZMA_VLI_UNKNOWN;
+ filters[1].options = NULL;
+
+ return NULL;
+ }
+
+ // Not a preset so it must be a filter chain.
+ //
+ // If LZMA_STR_ALL_FILTERS isn't used we allow only filters that
+ // can be used in .xz.
+ const bool only_xz = (flags & LZMA_STR_ALL_FILTERS) == 0;
+
+ // Use a temporary array so that we don't modify the caller-supplied
+ // one until we know that no errors occurred.
+ lzma_filter temp_filters[LZMA_FILTERS_MAX + 1];
+
+ size_t i = 0;
+ do {
+ if (i == LZMA_FILTERS_MAX) {
+ errmsg = "The maximum number of filters is four";
+ goto error;
+ }
+
+ // Skip "--" if present.
+ if ((*str)[0] == '-' && (*str)[1] == '-')
+ *str += 2;
+
+ // Locate the end of "filter:name1=value1,name2=value2",
+ // stopping at the first "--" or a single space.
+ const char *filter_end = *str;
+ while (filter_end[0] != '\0') {
+ if ((filter_end[0] == '-' && filter_end[1] == '-')
+ || filter_end[0] == ' ')
+ break;
+
+ ++filter_end;
+ }
+
+ // Inputs that have "--" at the end or "-- " in the middle
+ // will result in an empty filter name.
+ if (filter_end == *str) {
+ errmsg = "Filter name is missing";
+ goto error;
+ }
+
+ errmsg = parse_filter(str, filter_end, &temp_filters[i],
+ allocator, only_xz);
+ if (errmsg != NULL)
+ goto error;
+
+ // Skip trailing spaces.
+ while (**str == ' ')
+ ++*str;
+
+ ++i;
+ } while (**str != '\0');
+
+ // Seems to be good, terminate the array so that
+ // basic validation can be done.
+ temp_filters[i].id = LZMA_VLI_UNKNOWN;
+ temp_filters[i].options = NULL;
+
+ // Do basic validation if the application didn't prohibit it.
+ if ((flags & LZMA_STR_NO_VALIDATION) == 0) {
+ size_t dummy;
+ const lzma_ret ret = lzma_validate_chain(temp_filters, &dummy);
+ assert(ret == LZMA_OK || ret == LZMA_OPTIONS_ERROR);
+ if (ret != LZMA_OK) {
+ errmsg = "Invalid filter chain "
+ "('lzma2' missing at the end?)";
+ goto error;
+ }
+ }
+
+ // All good. Copy the filters to the application supplied array.
+ memcpy(filters, temp_filters, (i + 1) * sizeof(lzma_filter));
+ return NULL;
+
+error:
+ // Free the filter options that were successfully decoded.
+ while (i-- > 0)
+ lzma_free(temp_filters[i].options, allocator);
+
+ return errmsg;
+}
+
+
+extern LZMA_API(const char *)
+lzma_str_to_filters(const char *str, int *error_pos, lzma_filter *filters,
+ uint32_t flags, const lzma_allocator *allocator)
+{
+ if (str == NULL || filters == NULL)
+ return "Unexpected NULL pointer argument(s) "
+ "to lzma_str_to_filters()";
+
+ // Validate the flags.
+ const uint32_t supported_flags
+ = LZMA_STR_ALL_FILTERS
+ | LZMA_STR_NO_VALIDATION;
+
+ if (flags & ~supported_flags)
+ return "Unsupported flags to lzma_str_to_filters()";
+
+ const char *used = str;
+ const char *errmsg = str_to_filters(&used, filters, flags, allocator);
+
+ if (error_pos != NULL) {
+ const size_t n = (size_t)(used - str);
+ *error_pos = n > INT_MAX ? INT_MAX : (int)n;
+ }
+
+ return errmsg;
+}
+
+
+/// Converts options of one filter to a string.
+///
+/// The caller must have already put the filter name in the destination
+/// string. Since it is possible that no options will be needed, the caller
+/// won't have put a delimiter character (':' or '=') in the string yet.
+/// We will add it if at least one option will be added to the string.
+static void
+strfy_filter(lzma_str *dest, const char *delimiter,
+ const option_map *optmap, size_t optmap_count,
+ const void *filter_options)
+{
+ for (size_t i = 0; i < optmap_count; ++i) {
+ // No attempt is made to reverse LZMA1/2 preset.
+ if (optmap[i].type == OPTMAP_TYPE_LZMA_PRESET)
+ continue;
+
+ // All options have integer values, some just are mapped
+ // to a string with a name_value_map. LZMA1/2 preset
+ // isn't reversed back to preset=PRESET form.
+ uint32_t v;
+ const void *ptr
+ = (const char *)filter_options + optmap[i].offset;
+ switch (optmap[i].type) {
+ case OPTMAP_TYPE_LZMA_MODE:
+ v = *(const lzma_mode *)ptr;
+ break;
+
+ case OPTMAP_TYPE_LZMA_MATCH_FINDER:
+ v = *(const lzma_match_finder *)ptr;
+ break;
+
+ default:
+ v = *(const uint32_t *)ptr;
+ break;
+ }
+
+ // Skip this if this option should be omitted from
+ // the string when the value is zero.
+ if (v == 0 && (optmap[i].flags & OPTMAP_NO_STRFY_ZERO))
+ continue;
+
+ // Before the first option we add whatever delimiter
+ // the caller gave us. For later options a comma is used.
+ str_append_str(dest, delimiter);
+ delimiter = ",";
+
+ // Add the option name and equals sign.
+ str_append_str(dest, optmap[i].name);
+ str_append_str(dest, "=");
+
+ if (optmap[i].flags & OPTMAP_USE_NAME_VALUE_MAP) {
+ const name_value_map *map = optmap[i].u.map;
+ size_t j = 0;
+ while (true) {
+ if (map[j].name[0] == '\0') {
+ str_append_str(dest, "UNKNOWN");
+ break;
+ }
+
+ if (map[j].value == v) {
+ str_append_str(dest, map[j].name);
+ break;
+ }
+
+ ++j;
+ }
+ } else {
+ str_append_u32(dest, v,
+ optmap[i].flags & OPTMAP_USE_BYTE_SUFFIX);
+ }
+ }
+
+ return;
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_str_from_filters(char **output_str, const lzma_filter *filters,
+ uint32_t flags, const lzma_allocator *allocator)
+{
+ // On error *output_str is always set to NULL.
+ // Do it as the very first step.
+ if (output_str == NULL)
+ return LZMA_PROG_ERROR;
+
+ *output_str = NULL;
+
+ if (filters == NULL)
+ return LZMA_PROG_ERROR;
+
+ // Validate the flags.
+ const uint32_t supported_flags
+ = LZMA_STR_ENCODER
+ | LZMA_STR_DECODER
+ | LZMA_STR_GETOPT_LONG
+ | LZMA_STR_NO_SPACES;
+
+ if (flags & ~supported_flags)
+ return LZMA_OPTIONS_ERROR;
+
+ // There must be at least one filter.
+ if (filters[0].id == LZMA_VLI_UNKNOWN)
+ return LZMA_OPTIONS_ERROR;
+
+ // Allocate memory for the output string.
+ lzma_str dest;
+ return_if_error(str_init(&dest, allocator));
+
+ const bool show_opts = (flags & (LZMA_STR_ENCODER | LZMA_STR_DECODER));
+
+ const char *opt_delim = (flags & LZMA_STR_GETOPT_LONG) ? "=" : ":";
+
+ for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ // If we reach LZMA_FILTERS_MAX, then the filters array
+ // is too large since the ID cannot be LZMA_VLI_UNKNOWN here.
+ if (i == LZMA_FILTERS_MAX) {
+ str_free(&dest, allocator);
+ return LZMA_OPTIONS_ERROR;
+ }
+
+ // Don't add a space between filters if the caller
+ // doesn't want them.
+ if (i > 0 && !(flags & LZMA_STR_NO_SPACES))
+ str_append_str(&dest, " ");
+
+ // Use dashes for xz getopt_long() compatible syntax but also
+ // use dashes to separate filters when spaces weren't wanted.
+ if ((flags & LZMA_STR_GETOPT_LONG)
+ || (i > 0 && (flags & LZMA_STR_NO_SPACES)))
+ str_append_str(&dest, "--");
+
+ size_t j = 0;
+ while (true) {
+ if (j == ARRAY_SIZE(filter_name_map)) {
+ // Filter ID in filters[i].id isn't supported.
+ str_free(&dest, allocator);
+ return LZMA_OPTIONS_ERROR;
+ }
+
+ if (filter_name_map[j].id == filters[i].id) {
+ // Add the filter name.
+ str_append_str(&dest, filter_name_map[j].name);
+
+ // If only the filter names were wanted then
+ // skip to the next filter. In this case
+ // .options is ignored and may be NULL even
+ // when the filter doesn't allow NULL options.
+ if (!show_opts)
+ break;
+
+ if (filters[i].options == NULL) {
+ if (!filter_name_map[j].allow_null) {
+ // Filter-specific options
+ // are missing but with
+ // this filter the options
+ // structure is mandatory.
+ str_free(&dest, allocator);
+ return LZMA_OPTIONS_ERROR;
+ }
+
+ // .options is allowed to be NULL.
+ // There is no need to add any
+ // options to the string.
+ break;
+ }
+
+ // Options structure is available. Add
+ // the filter options to the string.
+ const size_t optmap_count
+ = (flags & LZMA_STR_ENCODER)
+ ? filter_name_map[j].strfy_encoder
+ : filter_name_map[j].strfy_decoder;
+ strfy_filter(&dest, opt_delim,
+ filter_name_map[j].optmap,
+ optmap_count,
+ filters[i].options);
+ break;
+ }
+
+ ++j;
+ }
+ }
+
+ return str_finish(output_str, &dest, allocator);
+}
+
+
+extern LZMA_API(lzma_ret)
+lzma_str_list_filters(char **output_str, lzma_vli filter_id, uint32_t flags,
+ const lzma_allocator *allocator)
+{
+ // On error *output_str is always set to NULL.
+ // Do it as the very first step.
+ if (output_str == NULL)
+ return LZMA_PROG_ERROR;
+
+ *output_str = NULL;
+
+ // Validate the flags.
+ const uint32_t supported_flags
+ = LZMA_STR_ALL_FILTERS
+ | LZMA_STR_ENCODER
+ | LZMA_STR_DECODER
+ | LZMA_STR_GETOPT_LONG;
+
+ if (flags & ~supported_flags)
+ return LZMA_OPTIONS_ERROR;
+
+ // Allocate memory for the output string.
+ lzma_str dest;
+ return_if_error(str_init(&dest, allocator));
+
+ // If only listing the filter names then separate them with spaces.
+ // Otherwise use newlines.
+ const bool show_opts = (flags & (LZMA_STR_ENCODER | LZMA_STR_DECODER));
+ const char *filter_delim = show_opts ? "\n" : " ";
+
+ const char *opt_delim = (flags & LZMA_STR_GETOPT_LONG) ? "=" : ":";
+ bool first_filter_printed = false;
+
+ for (size_t i = 0; i < ARRAY_SIZE(filter_name_map); ++i) {
+ // If we are printing only one filter then skip others.
+ if (filter_id != LZMA_VLI_UNKNOWN
+ && filter_id != filter_name_map[i].id)
+ continue;
+
+ // If we are printing only .xz filters then skip the others.
+ if (filter_name_map[i].id >= LZMA_FILTER_RESERVED_START
+ && (flags & LZMA_STR_ALL_FILTERS) == 0
+ && filter_id == LZMA_VLI_UNKNOWN)
+ continue;
+
+ // Add a new line if this isn't the first filter being
+ // written to the string.
+ if (first_filter_printed)
+ str_append_str(&dest, filter_delim);
+
+ first_filter_printed = true;
+
+ if (flags & LZMA_STR_GETOPT_LONG)
+ str_append_str(&dest, "--");
+
+ str_append_str(&dest, filter_name_map[i].name);
+
+ // If only the filter names were wanted then continue
+ // to the next filter.
+ if (!show_opts)
+ continue;
+
+ const option_map *optmap = filter_name_map[i].optmap;
+ const char *d = opt_delim;
+
+ const size_t end = (flags & LZMA_STR_ENCODER)
+ ? filter_name_map[i].strfy_encoder
+ : filter_name_map[i].strfy_decoder;
+
+ for (size_t j = 0; j < end; ++j) {
+ // The first option is delimited from the filter
+ // name using "=" or ":" and the rest of the options
+ // are separated with ",".
+ str_append_str(&dest, d);
+ d = ",";
+
+ // optname=<possible_values>
+ str_append_str(&dest, optmap[j].name);
+ str_append_str(&dest, "=<");
+
+ if (optmap[j].type == OPTMAP_TYPE_LZMA_PRESET) {
+ // LZMA1/2 preset has its custom help string.
+ str_append_str(&dest, LZMA12_PRESET_STR);
+ } else if (optmap[j].flags
+ & OPTMAP_USE_NAME_VALUE_MAP) {
+ // Separate the possible option values by "|".
+ const name_value_map *m = optmap[j].u.map;
+ for (size_t k = 0; m[k].name[0] != '\0'; ++k) {
+ if (k > 0)
+ str_append_str(&dest, "|");
+
+ str_append_str(&dest, m[k].name);
+ }
+ } else {
+ // Integer range is shown as min-max.
+ const bool use_byte_suffix = optmap[j].flags
+ & OPTMAP_USE_BYTE_SUFFIX;
+ str_append_u32(&dest, optmap[j].u.range.min,
+ use_byte_suffix);
+ str_append_str(&dest, "-");
+ str_append_u32(&dest, optmap[j].u.range.max,
+ use_byte_suffix);
+ }
+
+ str_append_str(&dest, ">");
+ }
+ }
+
+ // If no filters were added to the string then it must be because
+ // the caller provided an unsupported Filter ID.
+ if (!first_filter_printed) {
+ str_free(&dest, allocator);
+ return LZMA_OPTIONS_ERROR;
+ }
+
+ return str_finish(output_str, &dest, allocator);
+}
diff --git a/src/liblzma/common/vli_decoder.c b/src/liblzma/common/vli_decoder.c
new file mode 100644
index 0000000..af2799d
--- /dev/null
+++ b/src/liblzma/common/vli_decoder.c
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file vli_decoder.c
+/// \brief Decodes variable-length integers
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_vli_decode(lzma_vli *restrict vli, size_t *vli_pos,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size)
+{
+ // If we haven't been given vli_pos, work in single-call mode.
+ size_t vli_pos_internal = 0;
+ if (vli_pos == NULL) {
+ vli_pos = &vli_pos_internal;
+ *vli = 0;
+
+ // If there's no input, use LZMA_DATA_ERROR. This way it is
+ // easy to decode VLIs from buffers that have known size,
+ // and get the correct error code in case the buffer is
+ // too short.
+ if (*in_pos >= in_size)
+ return LZMA_DATA_ERROR;
+
+ } else {
+ // Initialize *vli when starting to decode a new integer.
+ if (*vli_pos == 0)
+ *vli = 0;
+
+ // Validate the arguments.
+ if (*vli_pos >= LZMA_VLI_BYTES_MAX
+ || (*vli >> (*vli_pos * 7)) != 0)
+ return LZMA_PROG_ERROR;;
+
+ if (*in_pos >= in_size)
+ return LZMA_BUF_ERROR;
+ }
+
+ do {
+ // Read the next byte. Use a temporary variable so that we
+ // can update *in_pos immediately.
+ const uint8_t byte = in[*in_pos];
+ ++*in_pos;
+
+ // Add the newly read byte to *vli.
+ *vli += (lzma_vli)(byte & 0x7F) << (*vli_pos * 7);
+ ++*vli_pos;
+
+ // Check if this is the last byte of a multibyte integer.
+ if ((byte & 0x80) == 0) {
+ // We don't allow using variable-length integers as
+ // padding i.e. the encoding must use the most the
+ // compact form.
+ if (byte == 0x00 && *vli_pos > 1)
+ return LZMA_DATA_ERROR;
+
+ return vli_pos == &vli_pos_internal
+ ? LZMA_OK : LZMA_STREAM_END;
+ }
+
+ // There is at least one more byte coming. If we have already
+ // read maximum number of bytes, the integer is considered
+ // corrupt.
+ //
+ // If we need bigger integers in future, old versions liblzma
+ // will confusingly indicate the file being corrupt instead of
+ // unsupported. I suppose it's still better this way, because
+ // in the foreseeable future (writing this in 2008) the only
+ // reason why files would appear having over 63-bit integers
+ // is that the files are simply corrupt.
+ if (*vli_pos == LZMA_VLI_BYTES_MAX)
+ return LZMA_DATA_ERROR;
+
+ } while (*in_pos < in_size);
+
+ return vli_pos == &vli_pos_internal ? LZMA_DATA_ERROR : LZMA_OK;
+}
diff --git a/src/liblzma/common/vli_encoder.c b/src/liblzma/common/vli_encoder.c
new file mode 100644
index 0000000..f864269
--- /dev/null
+++ b/src/liblzma/common/vli_encoder.c
@@ -0,0 +1,69 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file vli_encoder.c
+/// \brief Encodes variable-length integers
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+extern LZMA_API(lzma_ret)
+lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size)
+{
+ // If we haven't been given vli_pos, work in single-call mode.
+ size_t vli_pos_internal = 0;
+ if (vli_pos == NULL) {
+ vli_pos = &vli_pos_internal;
+
+ // In single-call mode, we expect that the caller has
+ // reserved enough output space.
+ if (*out_pos >= out_size)
+ return LZMA_PROG_ERROR;
+ } else {
+ // This never happens when we are called by liblzma, but
+ // may happen if called directly from an application.
+ if (*out_pos >= out_size)
+ return LZMA_BUF_ERROR;
+ }
+
+ // Validate the arguments.
+ if (*vli_pos >= LZMA_VLI_BYTES_MAX || vli > LZMA_VLI_MAX)
+ return LZMA_PROG_ERROR;
+
+ // Shift vli so that the next bits to encode are the lowest. In
+ // single-call mode this never changes vli since *vli_pos is zero.
+ vli >>= *vli_pos * 7;
+
+ // Write the non-last bytes in a loop.
+ while (vli >= 0x80) {
+ // We don't need *vli_pos during this function call anymore,
+ // but update it here so that it is ready if we need to
+ // return before the whole integer has been decoded.
+ ++*vli_pos;
+ assert(*vli_pos < LZMA_VLI_BYTES_MAX);
+
+ // Write the next byte.
+ out[*out_pos] = (uint8_t)(vli) | 0x80;
+ vli >>= 7;
+
+ if (++*out_pos == out_size)
+ return vli_pos == &vli_pos_internal
+ ? LZMA_PROG_ERROR : LZMA_OK;
+ }
+
+ // Write the last byte.
+ out[*out_pos] = (uint8_t)(vli);
+ ++*out_pos;
+ ++*vli_pos;
+
+ return vli_pos == &vli_pos_internal ? LZMA_OK : LZMA_STREAM_END;
+
+}
diff --git a/src/liblzma/common/vli_size.c b/src/liblzma/common/vli_size.c
new file mode 100644
index 0000000..ec1b4fa
--- /dev/null
+++ b/src/liblzma/common/vli_size.c
@@ -0,0 +1,30 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file vli_size.c
+/// \brief Calculates the encoded size of a variable-length integer
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+extern LZMA_API(uint32_t)
+lzma_vli_size(lzma_vli vli)
+{
+ if (vli > LZMA_VLI_MAX)
+ return 0;
+
+ uint32_t i = 0;
+ do {
+ vli >>= 7;
+ ++i;
+ } while (vli != 0);
+
+ assert(i <= LZMA_VLI_BYTES_MAX);
+ return i;
+}
diff --git a/src/liblzma/delta/Makefile.inc b/src/liblzma/delta/Makefile.inc
new file mode 100644
index 0000000..c7739b4
--- /dev/null
+++ b/src/liblzma/delta/Makefile.inc
@@ -0,0 +1,23 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+liblzma_la_SOURCES += \
+ delta/delta_common.c \
+ delta/delta_common.h \
+ delta/delta_private.h
+
+if COND_ENCODER_DELTA
+liblzma_la_SOURCES += \
+ delta/delta_encoder.c \
+ delta/delta_encoder.h
+endif
+
+if COND_DECODER_DELTA
+liblzma_la_SOURCES += \
+ delta/delta_decoder.c \
+ delta/delta_decoder.h
+endif
diff --git a/src/liblzma/delta/delta_common.c b/src/liblzma/delta/delta_common.c
new file mode 100644
index 0000000..4768201
--- /dev/null
+++ b/src/liblzma/delta/delta_common.c
@@ -0,0 +1,73 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file delta_common.c
+/// \brief Common stuff for Delta encoder and decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "delta_common.h"
+#include "delta_private.h"
+
+
+static void
+delta_coder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_delta_coder *coder = coder_ptr;
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+extern lzma_ret
+lzma_delta_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ // Allocate memory for the decoder if needed.
+ lzma_delta_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_delta_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+
+ // End function is the same for encoder and decoder.
+ next->end = &delta_coder_end;
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ // Validate the options.
+ if (lzma_delta_coder_memusage(filters[0].options) == UINT64_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ // Set the delta distance.
+ const lzma_options_delta *opt = filters[0].options;
+ coder->distance = opt->dist;
+
+ // Initialize the rest of the variables.
+ coder->pos = 0;
+ memzero(coder->history, LZMA_DELTA_DIST_MAX);
+
+ // Initialize the next decoder in the chain, if any.
+ return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}
+
+
+extern uint64_t
+lzma_delta_coder_memusage(const void *options)
+{
+ const lzma_options_delta *opt = options;
+
+ if (opt == NULL || opt->type != LZMA_DELTA_TYPE_BYTE
+ || opt->dist < LZMA_DELTA_DIST_MIN
+ || opt->dist > LZMA_DELTA_DIST_MAX)
+ return UINT64_MAX;
+
+ return sizeof(lzma_delta_coder);
+}
diff --git a/src/liblzma/delta/delta_common.h b/src/liblzma/delta/delta_common.h
new file mode 100644
index 0000000..7e7e1ba
--- /dev/null
+++ b/src/liblzma/delta/delta_common.h
@@ -0,0 +1,20 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file delta_common.h
+/// \brief Common stuff for Delta encoder and decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_DELTA_COMMON_H
+#define LZMA_DELTA_COMMON_H
+
+#include "common.h"
+
+extern uint64_t lzma_delta_coder_memusage(const void *options);
+
+#endif
diff --git a/src/liblzma/delta/delta_decoder.c b/src/liblzma/delta/delta_decoder.c
new file mode 100644
index 0000000..77cf65c
--- /dev/null
+++ b/src/liblzma/delta/delta_decoder.c
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file delta_decoder.c
+/// \brief Delta filter decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "delta_decoder.h"
+#include "delta_private.h"
+
+
+static void
+decode_buffer(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
+{
+ const size_t distance = coder->distance;
+
+ for (size_t i = 0; i < size; ++i) {
+ buffer[i] += coder->history[(distance + coder->pos) & 0xFF];
+ coder->history[coder->pos-- & 0xFF] = buffer[i];
+ }
+}
+
+
+static lzma_ret
+delta_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_delta_coder *coder = coder_ptr;
+
+ assert(coder->next.code != NULL);
+
+ const size_t out_start = *out_pos;
+
+ const lzma_ret ret = coder->next.code(coder->next.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size,
+ action);
+
+ // out might be NULL. In that case size == 0. Null pointer + 0 is
+ // undefined behavior so skip the call in that case as it would
+ // do nothing anyway.
+ const size_t size = *out_pos - out_start;
+ if (size > 0)
+ decode_buffer(coder, out + out_start, size);
+
+ return ret;
+}
+
+
+extern lzma_ret
+lzma_delta_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ next->code = &delta_decode;
+ return lzma_delta_coder_init(next, allocator, filters);
+}
+
+
+extern lzma_ret
+lzma_delta_props_decode(void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size)
+{
+ if (props_size != 1)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_options_delta *opt
+ = lzma_alloc(sizeof(lzma_options_delta), allocator);
+ if (opt == NULL)
+ return LZMA_MEM_ERROR;
+
+ opt->type = LZMA_DELTA_TYPE_BYTE;
+ opt->dist = props[0] + 1U;
+
+ *options = opt;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/delta/delta_decoder.h b/src/liblzma/delta/delta_decoder.h
new file mode 100644
index 0000000..ad89cc6
--- /dev/null
+++ b/src/liblzma/delta/delta_decoder.h
@@ -0,0 +1,26 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file delta_decoder.h
+/// \brief Delta filter decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_DELTA_DECODER_H
+#define LZMA_DELTA_DECODER_H
+
+#include "delta_common.h"
+
+extern lzma_ret lzma_delta_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_delta_props_decode(
+ void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size);
+
+#endif
diff --git a/src/liblzma/delta/delta_encoder.c b/src/liblzma/delta/delta_encoder.c
new file mode 100644
index 0000000..056bf74
--- /dev/null
+++ b/src/liblzma/delta/delta_encoder.c
@@ -0,0 +1,133 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file delta_encoder.c
+/// \brief Delta filter encoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "delta_encoder.h"
+#include "delta_private.h"
+
+
+/// Copies and encodes the data at the same time. This is used when Delta
+/// is the first filter in the chain (and thus the last filter in the
+/// encoder's filter stack).
+static void
+copy_and_encode(lzma_delta_coder *coder,
+ const uint8_t *restrict in, uint8_t *restrict out, size_t size)
+{
+ const size_t distance = coder->distance;
+
+ for (size_t i = 0; i < size; ++i) {
+ const uint8_t tmp = coder->history[
+ (distance + coder->pos) & 0xFF];
+ coder->history[coder->pos-- & 0xFF] = in[i];
+ out[i] = in[i] - tmp;
+ }
+}
+
+
+/// Encodes the data in place. This is used when we are the last filter
+/// in the chain (and thus non-last filter in the encoder's filter stack).
+static void
+encode_in_place(lzma_delta_coder *coder, uint8_t *buffer, size_t size)
+{
+ const size_t distance = coder->distance;
+
+ for (size_t i = 0; i < size; ++i) {
+ const uint8_t tmp = coder->history[
+ (distance + coder->pos) & 0xFF];
+ coder->history[coder->pos-- & 0xFF] = buffer[i];
+ buffer[i] -= tmp;
+ }
+}
+
+
+static lzma_ret
+delta_encode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_delta_coder *coder = coder_ptr;
+
+ lzma_ret ret;
+
+ if (coder->next.code == NULL) {
+ const size_t in_avail = in_size - *in_pos;
+ const size_t out_avail = out_size - *out_pos;
+ const size_t size = my_min(in_avail, out_avail);
+
+ // in and out might be NULL. In such cases size == 0.
+ // Null pointer + 0 is undefined behavior so skip
+ // the call in that case as it would do nothing anyway.
+ if (size > 0)
+ copy_and_encode(coder, in + *in_pos, out + *out_pos,
+ size);
+
+ *in_pos += size;
+ *out_pos += size;
+
+ ret = action != LZMA_RUN && *in_pos == in_size
+ ? LZMA_STREAM_END : LZMA_OK;
+
+ } else {
+ const size_t out_start = *out_pos;
+
+ ret = coder->next.code(coder->next.coder, allocator,
+ in, in_pos, in_size, out, out_pos, out_size,
+ action);
+
+ // Like above, avoid null pointer + 0.
+ const size_t size = *out_pos - out_start;
+ if (size > 0)
+ encode_in_place(coder, out + out_start, size);
+ }
+
+ return ret;
+}
+
+
+static lzma_ret
+delta_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+ const lzma_filter *filters_null lzma_attribute((__unused__)),
+ const lzma_filter *reversed_filters)
+{
+ lzma_delta_coder *coder = coder_ptr;
+
+ // Delta doesn't and will never support changing the options in
+ // the middle of encoding. If the app tries to change them, we
+ // simply ignore them.
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters + 1);
+}
+
+
+extern lzma_ret
+lzma_delta_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ next->code = &delta_encode;
+ next->update = &delta_encoder_update;
+ return lzma_delta_coder_init(next, allocator, filters);
+}
+
+
+extern lzma_ret
+lzma_delta_props_encode(const void *options, uint8_t *out)
+{
+ // The caller must have already validated the options, so it's
+ // LZMA_PROG_ERROR if they are invalid.
+ if (lzma_delta_coder_memusage(options) == UINT64_MAX)
+ return LZMA_PROG_ERROR;
+
+ const lzma_options_delta *opt = options;
+ out[0] = opt->dist - LZMA_DELTA_DIST_MIN;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/delta/delta_encoder.h b/src/liblzma/delta/delta_encoder.h
new file mode 100644
index 0000000..4ab9847
--- /dev/null
+++ b/src/liblzma/delta/delta_encoder.h
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file delta_encoder.h
+/// \brief Delta filter encoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_DELTA_ENCODER_H
+#define LZMA_DELTA_ENCODER_H
+
+#include "delta_common.h"
+
+extern lzma_ret lzma_delta_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_delta_props_encode(const void *options, uint8_t *out);
+
+#endif
diff --git a/src/liblzma/delta/delta_private.h b/src/liblzma/delta/delta_private.h
new file mode 100644
index 0000000..0d6cb38
--- /dev/null
+++ b/src/liblzma/delta/delta_private.h
@@ -0,0 +1,37 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file delta_private.h
+/// \brief Private common stuff for Delta encoder and decoder
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_DELTA_PRIVATE_H
+#define LZMA_DELTA_PRIVATE_H
+
+#include "delta_common.h"
+
+typedef struct {
+ /// Next coder in the chain
+ lzma_next_coder next;
+
+ /// Delta distance
+ size_t distance;
+
+ /// Position in history[]
+ uint8_t pos;
+
+ /// Buffer to hold history of the original data
+ uint8_t history[LZMA_DELTA_DIST_MAX];
+} lzma_delta_coder;
+
+
+extern lzma_ret lzma_delta_coder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+#endif
diff --git a/src/liblzma/liblzma.pc.in b/src/liblzma/liblzma.pc.in
new file mode 100644
index 0000000..d077cb7
--- /dev/null
+++ b/src/liblzma/liblzma.pc.in
@@ -0,0 +1,20 @@
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: liblzma
+Description: General purpose data compression library
+URL: @PACKAGE_URL@
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Cflags.private: -DLZMA_API_STATIC
+Libs: -L${libdir} -llzma
+Libs.private: @PTHREAD_CFLAGS@ @LIBS@
diff --git a/src/liblzma/liblzma_generic.map b/src/liblzma/liblzma_generic.map
new file mode 100644
index 0000000..bb82167
--- /dev/null
+++ b/src/liblzma/liblzma_generic.map
@@ -0,0 +1,121 @@
+XZ_5.0 {
+global:
+ lzma_alone_decoder;
+ lzma_alone_encoder;
+ lzma_auto_decoder;
+ lzma_block_buffer_bound;
+ lzma_block_buffer_decode;
+ lzma_block_buffer_encode;
+ lzma_block_compressed_size;
+ lzma_block_decoder;
+ lzma_block_encoder;
+ lzma_block_header_decode;
+ lzma_block_header_encode;
+ lzma_block_header_size;
+ lzma_block_total_size;
+ lzma_block_unpadded_size;
+ lzma_check_is_supported;
+ lzma_check_size;
+ lzma_code;
+ lzma_crc32;
+ lzma_crc64;
+ lzma_easy_buffer_encode;
+ lzma_easy_decoder_memusage;
+ lzma_easy_encoder;
+ lzma_easy_encoder_memusage;
+ lzma_end;
+ lzma_filter_decoder_is_supported;
+ lzma_filter_encoder_is_supported;
+ lzma_filter_flags_decode;
+ lzma_filter_flags_encode;
+ lzma_filter_flags_size;
+ lzma_filters_copy;
+ lzma_filters_update;
+ lzma_get_check;
+ lzma_index_append;
+ lzma_index_block_count;
+ lzma_index_buffer_decode;
+ lzma_index_buffer_encode;
+ lzma_index_cat;
+ lzma_index_checks;
+ lzma_index_decoder;
+ lzma_index_dup;
+ lzma_index_encoder;
+ lzma_index_end;
+ lzma_index_file_size;
+ lzma_index_hash_append;
+ lzma_index_hash_decode;
+ lzma_index_hash_end;
+ lzma_index_hash_init;
+ lzma_index_hash_size;
+ lzma_index_init;
+ lzma_index_iter_init;
+ lzma_index_iter_locate;
+ lzma_index_iter_next;
+ lzma_index_iter_rewind;
+ lzma_index_memusage;
+ lzma_index_memused;
+ lzma_index_size;
+ lzma_index_stream_count;
+ lzma_index_stream_flags;
+ lzma_index_stream_padding;
+ lzma_index_stream_size;
+ lzma_index_total_size;
+ lzma_index_uncompressed_size;
+ lzma_lzma_preset;
+ lzma_memlimit_get;
+ lzma_memlimit_set;
+ lzma_memusage;
+ lzma_mf_is_supported;
+ lzma_mode_is_supported;
+ lzma_physmem;
+ lzma_properties_decode;
+ lzma_properties_encode;
+ lzma_properties_size;
+ lzma_raw_buffer_decode;
+ lzma_raw_buffer_encode;
+ lzma_raw_decoder;
+ lzma_raw_decoder_memusage;
+ lzma_raw_encoder;
+ lzma_raw_encoder_memusage;
+ lzma_stream_buffer_bound;
+ lzma_stream_buffer_decode;
+ lzma_stream_buffer_encode;
+ lzma_stream_decoder;
+ lzma_stream_encoder;
+ lzma_stream_flags_compare;
+ lzma_stream_footer_decode;
+ lzma_stream_footer_encode;
+ lzma_stream_header_decode;
+ lzma_stream_header_encode;
+ lzma_version_number;
+ lzma_version_string;
+ lzma_vli_decode;
+ lzma_vli_encode;
+ lzma_vli_size;
+
+local:
+ *;
+};
+
+XZ_5.2 {
+global:
+ lzma_block_uncomp_encode;
+ lzma_cputhreads;
+ lzma_get_progress;
+ lzma_stream_encoder_mt;
+ lzma_stream_encoder_mt_memusage;
+} XZ_5.0;
+
+XZ_5.4 {
+global:
+ lzma_file_info_decoder;
+ lzma_filters_free;
+ lzma_lzip_decoder;
+ lzma_microlzma_decoder;
+ lzma_microlzma_encoder;
+ lzma_stream_decoder_mt;
+ lzma_str_from_filters;
+ lzma_str_list_filters;
+ lzma_str_to_filters;
+} XZ_5.2;
diff --git a/src/liblzma/liblzma_linux.map b/src/liblzma/liblzma_linux.map
new file mode 100644
index 0000000..449f5fd
--- /dev/null
+++ b/src/liblzma/liblzma_linux.map
@@ -0,0 +1,136 @@
+XZ_5.0 {
+global:
+ lzma_alone_decoder;
+ lzma_alone_encoder;
+ lzma_auto_decoder;
+ lzma_block_buffer_bound;
+ lzma_block_buffer_decode;
+ lzma_block_buffer_encode;
+ lzma_block_compressed_size;
+ lzma_block_decoder;
+ lzma_block_encoder;
+ lzma_block_header_decode;
+ lzma_block_header_encode;
+ lzma_block_header_size;
+ lzma_block_total_size;
+ lzma_block_unpadded_size;
+ lzma_check_is_supported;
+ lzma_check_size;
+ lzma_code;
+ lzma_crc32;
+ lzma_crc64;
+ lzma_easy_buffer_encode;
+ lzma_easy_decoder_memusage;
+ lzma_easy_encoder;
+ lzma_easy_encoder_memusage;
+ lzma_end;
+ lzma_filter_decoder_is_supported;
+ lzma_filter_encoder_is_supported;
+ lzma_filter_flags_decode;
+ lzma_filter_flags_encode;
+ lzma_filter_flags_size;
+ lzma_filters_copy;
+ lzma_filters_update;
+ lzma_get_check;
+ lzma_index_append;
+ lzma_index_block_count;
+ lzma_index_buffer_decode;
+ lzma_index_buffer_encode;
+ lzma_index_cat;
+ lzma_index_checks;
+ lzma_index_decoder;
+ lzma_index_dup;
+ lzma_index_encoder;
+ lzma_index_end;
+ lzma_index_file_size;
+ lzma_index_hash_append;
+ lzma_index_hash_decode;
+ lzma_index_hash_end;
+ lzma_index_hash_init;
+ lzma_index_hash_size;
+ lzma_index_init;
+ lzma_index_iter_init;
+ lzma_index_iter_locate;
+ lzma_index_iter_next;
+ lzma_index_iter_rewind;
+ lzma_index_memusage;
+ lzma_index_memused;
+ lzma_index_size;
+ lzma_index_stream_count;
+ lzma_index_stream_flags;
+ lzma_index_stream_padding;
+ lzma_index_stream_size;
+ lzma_index_total_size;
+ lzma_index_uncompressed_size;
+ lzma_lzma_preset;
+ lzma_memlimit_get;
+ lzma_memlimit_set;
+ lzma_memusage;
+ lzma_mf_is_supported;
+ lzma_mode_is_supported;
+ lzma_physmem;
+ lzma_properties_decode;
+ lzma_properties_encode;
+ lzma_properties_size;
+ lzma_raw_buffer_decode;
+ lzma_raw_buffer_encode;
+ lzma_raw_decoder;
+ lzma_raw_decoder_memusage;
+ lzma_raw_encoder;
+ lzma_raw_encoder_memusage;
+ lzma_stream_buffer_bound;
+ lzma_stream_buffer_decode;
+ lzma_stream_buffer_encode;
+ lzma_stream_decoder;
+ lzma_stream_encoder;
+ lzma_stream_flags_compare;
+ lzma_stream_footer_decode;
+ lzma_stream_footer_encode;
+ lzma_stream_header_decode;
+ lzma_stream_header_encode;
+ lzma_version_number;
+ lzma_version_string;
+ lzma_vli_decode;
+ lzma_vli_encode;
+ lzma_vli_size;
+
+local:
+ *;
+};
+
+XZ_5.2 {
+global:
+ lzma_block_uncomp_encode;
+ lzma_cputhreads;
+ lzma_get_progress;
+ lzma_stream_encoder_mt;
+ lzma_stream_encoder_mt_memusage;
+} XZ_5.0;
+
+XZ_5.1.2alpha {
+global:
+ lzma_stream_encoder_mt;
+ lzma_stream_encoder_mt_memusage;
+} XZ_5.0;
+
+XZ_5.2.2 {
+global:
+ lzma_block_uncomp_encode;
+ lzma_cputhreads;
+ lzma_get_progress;
+ lzma_stream_encoder_mt;
+ lzma_stream_encoder_mt_memusage;
+} XZ_5.1.2alpha;
+
+XZ_5.4 {
+global:
+ lzma_file_info_decoder;
+ lzma_filters_free;
+ lzma_lzip_decoder;
+ lzma_microlzma_decoder;
+ lzma_microlzma_encoder;
+ lzma_stream_decoder_mt;
+ lzma_str_from_filters;
+ lzma_str_list_filters;
+ lzma_str_to_filters;
+} XZ_5.2;
diff --git a/src/liblzma/liblzma_w32res.rc b/src/liblzma/liblzma_w32res.rc
new file mode 100644
index 0000000..d4d8159
--- /dev/null
+++ b/src/liblzma/liblzma_w32res.rc
@@ -0,0 +1,12 @@
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#define MY_TYPE VFT_DLL
+#define MY_NAME "liblzma"
+#define MY_SUFFIX ".dll"
+#define MY_DESC "liblzma data compression library"
+#include "common_w32res.rc"
diff --git a/src/liblzma/lz/Makefile.inc b/src/liblzma/lz/Makefile.inc
new file mode 100644
index 0000000..75742a8
--- /dev/null
+++ b/src/liblzma/lz/Makefile.inc
@@ -0,0 +1,22 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+if COND_ENCODER_LZ
+liblzma_la_SOURCES += \
+ lz/lz_encoder.c \
+ lz/lz_encoder.h \
+ lz/lz_encoder_hash.h \
+ lz/lz_encoder_hash_table.h \
+ lz/lz_encoder_mf.c
+endif
+
+
+if COND_DECODER_LZ
+liblzma_la_SOURCES += \
+ lz/lz_decoder.c \
+ lz/lz_decoder.h
+endif
diff --git a/src/liblzma/lz/lz_decoder.c b/src/liblzma/lz/lz_decoder.c
new file mode 100644
index 0000000..06c95c1
--- /dev/null
+++ b/src/liblzma/lz/lz_decoder.c
@@ -0,0 +1,304 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lz_decoder.c
+/// \brief LZ out window
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// liblzma supports multiple LZ77-based filters. The LZ part is shared
+// between these filters. The LZ code takes care of dictionary handling
+// and passing the data between filters in the chain. The filter-specific
+// part decodes from the input buffer to the dictionary.
+
+
+#include "lz_decoder.h"
+
+
+typedef struct {
+ /// Dictionary (history buffer)
+ lzma_dict dict;
+
+ /// The actual LZ-based decoder e.g. LZMA
+ lzma_lz_decoder lz;
+
+ /// Next filter in the chain, if any. Note that LZMA and LZMA2 are
+ /// only allowed as the last filter, but the long-range filter in
+ /// future can be in the middle of the chain.
+ lzma_next_coder next;
+
+ /// True if the next filter in the chain has returned LZMA_STREAM_END.
+ bool next_finished;
+
+ /// True if the LZ decoder (e.g. LZMA) has detected end of payload
+ /// marker. This may become true before next_finished becomes true.
+ bool this_finished;
+
+ /// Temporary buffer needed when the LZ-based filter is not the last
+ /// filter in the chain. The output of the next filter is first
+ /// decoded into buffer[], which is then used as input for the actual
+ /// LZ-based decoder.
+ struct {
+ size_t pos;
+ size_t size;
+ uint8_t buffer[LZMA_BUFFER_SIZE];
+ } temp;
+} lzma_coder;
+
+
+static void
+lz_decoder_reset(lzma_coder *coder)
+{
+ coder->dict.pos = 0;
+ coder->dict.full = 0;
+ coder->dict.buf[coder->dict.size - 1] = '\0';
+ coder->dict.need_reset = false;
+ return;
+}
+
+
+static lzma_ret
+decode_buffer(lzma_coder *coder,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size)
+{
+ while (true) {
+ // Wrap the dictionary if needed.
+ if (coder->dict.pos == coder->dict.size)
+ coder->dict.pos = 0;
+
+ // Store the current dictionary position. It is needed to know
+ // where to start copying to the out[] buffer.
+ const size_t dict_start = coder->dict.pos;
+
+ // Calculate how much we allow coder->lz.code() to decode.
+ // It must not decode past the end of the dictionary
+ // buffer, and we don't want it to decode more than is
+ // actually needed to fill the out[] buffer.
+ coder->dict.limit = coder->dict.pos
+ + my_min(out_size - *out_pos,
+ coder->dict.size - coder->dict.pos);
+
+ // Call the coder->lz.code() to do the actual decoding.
+ const lzma_ret ret = coder->lz.code(
+ coder->lz.coder, &coder->dict,
+ in, in_pos, in_size);
+
+ // Copy the decoded data from the dictionary to the out[]
+ // buffer. Do it conditionally because out can be NULL
+ // (in which case copy_size is always 0). Calling memcpy()
+ // with a null-pointer is undefined even if the third
+ // argument is 0.
+ const size_t copy_size = coder->dict.pos - dict_start;
+ assert(copy_size <= out_size - *out_pos);
+
+ if (copy_size > 0)
+ memcpy(out + *out_pos, coder->dict.buf + dict_start,
+ copy_size);
+
+ *out_pos += copy_size;
+
+ // Reset the dictionary if so requested by coder->lz.code().
+ if (coder->dict.need_reset) {
+ lz_decoder_reset(coder);
+
+ // Since we reset dictionary, we don't check if
+ // dictionary became full.
+ if (ret != LZMA_OK || *out_pos == out_size)
+ return ret;
+ } else {
+ // Return if everything got decoded or an error
+ // occurred, or if there's no more data to decode.
+ //
+ // Note that detecting if there's something to decode
+ // is done by looking if dictionary become full
+ // instead of looking if *in_pos == in_size. This
+ // is because it is possible that all the input was
+ // consumed already but some data is pending to be
+ // written to the dictionary.
+ if (ret != LZMA_OK || *out_pos == out_size
+ || coder->dict.pos < coder->dict.size)
+ return ret;
+ }
+ }
+}
+
+
+static lzma_ret
+lz_decode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size,
+ lzma_action action)
+{
+ lzma_coder *coder = coder_ptr;
+
+ if (coder->next.code == NULL)
+ return decode_buffer(coder, in, in_pos, in_size,
+ out, out_pos, out_size);
+
+ // We aren't the last coder in the chain, we need to decode
+ // our input to a temporary buffer.
+ while (*out_pos < out_size) {
+ // Fill the temporary buffer if it is empty.
+ if (!coder->next_finished
+ && coder->temp.pos == coder->temp.size) {
+ coder->temp.pos = 0;
+ coder->temp.size = 0;
+
+ const lzma_ret ret = coder->next.code(
+ coder->next.coder,
+ allocator, in, in_pos, in_size,
+ coder->temp.buffer, &coder->temp.size,
+ LZMA_BUFFER_SIZE, action);
+
+ if (ret == LZMA_STREAM_END)
+ coder->next_finished = true;
+ else if (ret != LZMA_OK || coder->temp.size == 0)
+ return ret;
+ }
+
+ if (coder->this_finished) {
+ if (coder->temp.size != 0)
+ return LZMA_DATA_ERROR;
+
+ if (coder->next_finished)
+ return LZMA_STREAM_END;
+
+ return LZMA_OK;
+ }
+
+ const lzma_ret ret = decode_buffer(coder, coder->temp.buffer,
+ &coder->temp.pos, coder->temp.size,
+ out, out_pos, out_size);
+
+ if (ret == LZMA_STREAM_END)
+ coder->this_finished = true;
+ else if (ret != LZMA_OK)
+ return ret;
+ else if (coder->next_finished && *out_pos < out_size)
+ return LZMA_DATA_ERROR;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+lz_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_coder *coder = coder_ptr;
+
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder->dict.buf, allocator);
+
+ if (coder->lz.end != NULL)
+ coder->lz.end(coder->lz.coder, allocator);
+ else
+ lzma_free(coder->lz.coder, allocator);
+
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+extern lzma_ret
+lzma_lz_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters,
+ lzma_ret (*lz_init)(lzma_lz_decoder *lz,
+ const lzma_allocator *allocator,
+ lzma_vli id, const void *options,
+ lzma_lz_options *lz_options))
+{
+ // Allocate the base structure if it isn't already allocated.
+ lzma_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &lz_decode;
+ next->end = &lz_decoder_end;
+
+ coder->dict.buf = NULL;
+ coder->dict.size = 0;
+ coder->lz = LZMA_LZ_DECODER_INIT;
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ // Allocate and initialize the LZ-based decoder. It will also give
+ // us the dictionary size.
+ lzma_lz_options lz_options;
+ return_if_error(lz_init(&coder->lz, allocator,
+ filters[0].id, filters[0].options, &lz_options));
+
+ // If the dictionary size is very small, increase it to 4096 bytes.
+ // This is to prevent constant wrapping of the dictionary, which
+ // would slow things down. The downside is that since we don't check
+ // separately for the real dictionary size, we may happily accept
+ // corrupt files.
+ if (lz_options.dict_size < 4096)
+ lz_options.dict_size = 4096;
+
+ // Make dictionary size a multiple of 16. Some LZ-based decoders like
+ // LZMA use the lowest bits lzma_dict.pos to know the alignment of the
+ // data. Aligned buffer is also good when memcpying from the
+ // dictionary to the output buffer, since applications are
+ // recommended to give aligned buffers to liblzma.
+ //
+ // Avoid integer overflow.
+ if (lz_options.dict_size > SIZE_MAX - 15)
+ return LZMA_MEM_ERROR;
+
+ lz_options.dict_size = (lz_options.dict_size + 15) & ~((size_t)(15));
+
+ // Allocate and initialize the dictionary.
+ if (coder->dict.size != lz_options.dict_size) {
+ lzma_free(coder->dict.buf, allocator);
+ coder->dict.buf
+ = lzma_alloc(lz_options.dict_size, allocator);
+ if (coder->dict.buf == NULL)
+ return LZMA_MEM_ERROR;
+
+ coder->dict.size = lz_options.dict_size;
+ }
+
+ lz_decoder_reset(next->coder);
+
+ // Use the preset dictionary if it was given to us.
+ if (lz_options.preset_dict != NULL
+ && lz_options.preset_dict_size > 0) {
+ // If the preset dictionary is bigger than the actual
+ // dictionary, copy only the tail.
+ const size_t copy_size = my_min(lz_options.preset_dict_size,
+ lz_options.dict_size);
+ const size_t offset = lz_options.preset_dict_size - copy_size;
+ memcpy(coder->dict.buf, lz_options.preset_dict + offset,
+ copy_size);
+ coder->dict.pos = copy_size;
+ coder->dict.full = copy_size;
+ }
+
+ // Miscellaneous initializations
+ coder->next_finished = false;
+ coder->this_finished = false;
+ coder->temp.pos = 0;
+ coder->temp.size = 0;
+
+ // Initialize the next filter in the chain, if any.
+ return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}
+
+
+extern uint64_t
+lzma_lz_decoder_memusage(size_t dictionary_size)
+{
+ return sizeof(lzma_coder) + (uint64_t)(dictionary_size);
+}
diff --git a/src/liblzma/lz/lz_decoder.h b/src/liblzma/lz/lz_decoder.h
new file mode 100644
index 0000000..ad80d4d
--- /dev/null
+++ b/src/liblzma/lz/lz_decoder.h
@@ -0,0 +1,234 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lz_decoder.h
+/// \brief LZ out window
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZ_DECODER_H
+#define LZMA_LZ_DECODER_H
+
+#include "common.h"
+
+
+typedef struct {
+ /// Pointer to the dictionary buffer. It can be an allocated buffer
+ /// internal to liblzma, or it can a be a buffer given by the
+ /// application when in single-call mode (not implemented yet).
+ uint8_t *buf;
+
+ /// Write position in dictionary. The next byte will be written to
+ /// buf[pos].
+ size_t pos;
+
+ /// Indicates how full the dictionary is. This is used by
+ /// dict_is_distance_valid() to detect corrupt files that would
+ /// read beyond the beginning of the dictionary.
+ size_t full;
+
+ /// Write limit
+ size_t limit;
+
+ /// Size of the dictionary
+ size_t size;
+
+ /// True when dictionary should be reset before decoding more data.
+ bool need_reset;
+
+} lzma_dict;
+
+
+typedef struct {
+ size_t dict_size;
+ const uint8_t *preset_dict;
+ size_t preset_dict_size;
+} lzma_lz_options;
+
+
+typedef struct {
+ /// Data specific to the LZ-based decoder
+ void *coder;
+
+ /// Function to decode from in[] to *dict
+ lzma_ret (*code)(void *coder,
+ lzma_dict *restrict dict, const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size);
+
+ void (*reset)(void *coder, const void *options);
+
+ /// Set the uncompressed size. If uncompressed_size == LZMA_VLI_UNKNOWN
+ /// then allow_eopm will always be true.
+ void (*set_uncompressed)(void *coder, lzma_vli uncompressed_size,
+ bool allow_eopm);
+
+ /// Free allocated resources
+ void (*end)(void *coder, const lzma_allocator *allocator);
+
+} lzma_lz_decoder;
+
+
+#define LZMA_LZ_DECODER_INIT \
+ (lzma_lz_decoder){ \
+ .coder = NULL, \
+ .code = NULL, \
+ .reset = NULL, \
+ .set_uncompressed = NULL, \
+ .end = NULL, \
+ }
+
+
+extern lzma_ret lzma_lz_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters,
+ lzma_ret (*lz_init)(lzma_lz_decoder *lz,
+ const lzma_allocator *allocator,
+ lzma_vli id, const void *options,
+ lzma_lz_options *lz_options));
+
+extern uint64_t lzma_lz_decoder_memusage(size_t dictionary_size);
+
+
+//////////////////////
+// Inline functions //
+//////////////////////
+
+/// Get a byte from the history buffer.
+static inline uint8_t
+dict_get(const lzma_dict *const dict, const uint32_t distance)
+{
+ return dict->buf[dict->pos - distance - 1
+ + (distance < dict->pos ? 0 : dict->size)];
+}
+
+
+/// Test if dictionary is empty.
+static inline bool
+dict_is_empty(const lzma_dict *const dict)
+{
+ return dict->full == 0;
+}
+
+
+/// Validate the match distance
+static inline bool
+dict_is_distance_valid(const lzma_dict *const dict, const size_t distance)
+{
+ return dict->full > distance;
+}
+
+
+/// Repeat *len bytes at distance.
+static inline bool
+dict_repeat(lzma_dict *dict, uint32_t distance, uint32_t *len)
+{
+ // Don't write past the end of the dictionary.
+ const size_t dict_avail = dict->limit - dict->pos;
+ uint32_t left = my_min(dict_avail, *len);
+ *len -= left;
+
+ // Repeat a block of data from the history. Because memcpy() is faster
+ // than copying byte by byte in a loop, the copying process gets split
+ // into three cases.
+ if (distance < left) {
+ // Source and target areas overlap, thus we can't use
+ // memcpy() nor even memmove() safely.
+ do {
+ dict->buf[dict->pos] = dict_get(dict, distance);
+ ++dict->pos;
+ } while (--left > 0);
+
+ } else if (distance < dict->pos) {
+ // The easiest and fastest case
+ memcpy(dict->buf + dict->pos,
+ dict->buf + dict->pos - distance - 1,
+ left);
+ dict->pos += left;
+
+ } else {
+ // The bigger the dictionary, the more rare this
+ // case occurs. We need to "wrap" the dict, thus
+ // we might need two memcpy() to copy all the data.
+ assert(dict->full == dict->size);
+ const uint32_t copy_pos
+ = dict->pos - distance - 1 + dict->size;
+ uint32_t copy_size = dict->size - copy_pos;
+
+ if (copy_size < left) {
+ memmove(dict->buf + dict->pos, dict->buf + copy_pos,
+ copy_size);
+ dict->pos += copy_size;
+ copy_size = left - copy_size;
+ memcpy(dict->buf + dict->pos, dict->buf, copy_size);
+ dict->pos += copy_size;
+ } else {
+ memmove(dict->buf + dict->pos, dict->buf + copy_pos,
+ left);
+ dict->pos += left;
+ }
+ }
+
+ // Update how full the dictionary is.
+ if (dict->full < dict->pos)
+ dict->full = dict->pos;
+
+ return unlikely(*len != 0);
+}
+
+
+/// Puts one byte into the dictionary. Returns true if the dictionary was
+/// already full and the byte couldn't be added.
+static inline bool
+dict_put(lzma_dict *dict, uint8_t byte)
+{
+ if (unlikely(dict->pos == dict->limit))
+ return true;
+
+ dict->buf[dict->pos++] = byte;
+
+ if (dict->pos > dict->full)
+ dict->full = dict->pos;
+
+ return false;
+}
+
+
+/// Copies arbitrary amount of data into the dictionary.
+static inline void
+dict_write(lzma_dict *restrict dict, const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size,
+ size_t *restrict left)
+{
+ // NOTE: If we are being given more data than the size of the
+ // dictionary, it could be possible to optimize the LZ decoder
+ // so that not everything needs to go through the dictionary.
+ // This shouldn't be very common thing in practice though, and
+ // the slowdown of one extra memcpy() isn't bad compared to how
+ // much time it would have taken if the data were compressed.
+
+ if (in_size - *in_pos > *left)
+ in_size = *in_pos + *left;
+
+ *left -= lzma_bufcpy(in, in_pos, in_size,
+ dict->buf, &dict->pos, dict->limit);
+
+ if (dict->pos > dict->full)
+ dict->full = dict->pos;
+
+ return;
+}
+
+
+static inline void
+dict_reset(lzma_dict *dict)
+{
+ dict->need_reset = true;
+ return;
+}
+
+#endif
diff --git a/src/liblzma/lz/lz_encoder.c b/src/liblzma/lz/lz_encoder.c
new file mode 100644
index 0000000..5489085
--- /dev/null
+++ b/src/liblzma/lz/lz_encoder.c
@@ -0,0 +1,633 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lz_encoder.c
+/// \brief LZ in window
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_encoder.h"
+#include "lz_encoder_hash.h"
+
+// See lz_encoder_hash.h. This is a bit hackish but avoids making
+// endianness a conditional in makefiles.
+#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
+# include "lz_encoder_hash_table.h"
+#endif
+
+#include "memcmplen.h"
+
+
+typedef struct {
+ /// LZ-based encoder e.g. LZMA
+ lzma_lz_encoder lz;
+
+ /// History buffer and match finder
+ lzma_mf mf;
+
+ /// Next coder in the chain
+ lzma_next_coder next;
+} lzma_coder;
+
+
+/// \brief Moves the data in the input window to free space for new data
+///
+/// mf->buffer is a sliding input window, which keeps mf->keep_size_before
+/// bytes of input history available all the time. Now and then we need to
+/// "slide" the buffer to make space for the new data to the end of the
+/// buffer. At the same time, data older than keep_size_before is dropped.
+///
+static void
+move_window(lzma_mf *mf)
+{
+ // Align the move to a multiple of 16 bytes. Some LZ-based encoders
+ // like LZMA use the lowest bits of mf->read_pos to know the
+ // alignment of the uncompressed data. We also get better speed
+ // for memmove() with aligned buffers.
+ assert(mf->read_pos > mf->keep_size_before);
+ const uint32_t move_offset
+ = (mf->read_pos - mf->keep_size_before) & ~UINT32_C(15);
+
+ assert(mf->write_pos > move_offset);
+ const size_t move_size = mf->write_pos - move_offset;
+
+ assert(move_offset + move_size <= mf->size);
+
+ memmove(mf->buffer, mf->buffer + move_offset, move_size);
+
+ mf->offset += move_offset;
+ mf->read_pos -= move_offset;
+ mf->read_limit -= move_offset;
+ mf->write_pos -= move_offset;
+
+ return;
+}
+
+
+/// \brief Tries to fill the input window (mf->buffer)
+///
+/// If we are the last encoder in the chain, our input data is in in[].
+/// Otherwise we call the next filter in the chain to process in[] and
+/// write its output to mf->buffer.
+///
+/// This function must not be called once it has returned LZMA_STREAM_END.
+///
+static lzma_ret
+fill_window(lzma_coder *coder, const lzma_allocator *allocator,
+ const uint8_t *in, size_t *in_pos, size_t in_size,
+ lzma_action action)
+{
+ assert(coder->mf.read_pos <= coder->mf.write_pos);
+
+ // Move the sliding window if needed.
+ if (coder->mf.read_pos >= coder->mf.size - coder->mf.keep_size_after)
+ move_window(&coder->mf);
+
+ // Maybe this is ugly, but lzma_mf uses uint32_t for most things
+ // (which I find cleanest), but we need size_t here when filling
+ // the history window.
+ size_t write_pos = coder->mf.write_pos;
+ lzma_ret ret;
+ if (coder->next.code == NULL) {
+ // Not using a filter, simply memcpy() as much as possible.
+ lzma_bufcpy(in, in_pos, in_size, coder->mf.buffer,
+ &write_pos, coder->mf.size);
+
+ ret = action != LZMA_RUN && *in_pos == in_size
+ ? LZMA_STREAM_END : LZMA_OK;
+
+ } else {
+ ret = coder->next.code(coder->next.coder, allocator,
+ in, in_pos, in_size,
+ coder->mf.buffer, &write_pos,
+ coder->mf.size, action);
+ }
+
+ coder->mf.write_pos = write_pos;
+
+ // Silence Valgrind. lzma_memcmplen() can read extra bytes
+ // and Valgrind will give warnings if those bytes are uninitialized
+ // because Valgrind cannot see that the values of the uninitialized
+ // bytes are eventually ignored.
+ memzero(coder->mf.buffer + write_pos, LZMA_MEMCMPLEN_EXTRA);
+
+ // If end of stream has been reached or flushing completed, we allow
+ // the encoder to process all the input (that is, read_pos is allowed
+ // to reach write_pos). Otherwise we keep keep_size_after bytes
+ // available as prebuffer.
+ if (ret == LZMA_STREAM_END) {
+ assert(*in_pos == in_size);
+ ret = LZMA_OK;
+ coder->mf.action = action;
+ coder->mf.read_limit = coder->mf.write_pos;
+
+ } else if (coder->mf.write_pos > coder->mf.keep_size_after) {
+ // This needs to be done conditionally, because if we got
+ // only little new input, there may be too little input
+ // to do any encoding yet.
+ coder->mf.read_limit = coder->mf.write_pos
+ - coder->mf.keep_size_after;
+ }
+
+ // Restart the match finder after finished LZMA_SYNC_FLUSH.
+ if (coder->mf.pending > 0
+ && coder->mf.read_pos < coder->mf.read_limit) {
+ // Match finder may update coder->pending and expects it to
+ // start from zero, so use a temporary variable.
+ const uint32_t pending = coder->mf.pending;
+ coder->mf.pending = 0;
+
+ // Rewind read_pos so that the match finder can hash
+ // the pending bytes.
+ assert(coder->mf.read_pos >= pending);
+ coder->mf.read_pos -= pending;
+
+ // Call the skip function directly instead of using
+ // mf_skip(), since we don't want to touch mf->read_ahead.
+ coder->mf.skip(&coder->mf, pending);
+ }
+
+ return ret;
+}
+
+
+static lzma_ret
+lz_encode(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size, lzma_action action)
+{
+ lzma_coder *coder = coder_ptr;
+
+ while (*out_pos < out_size
+ && (*in_pos < in_size || action != LZMA_RUN)) {
+ // Read more data to coder->mf.buffer if needed.
+ if (coder->mf.action == LZMA_RUN && coder->mf.read_pos
+ >= coder->mf.read_limit)
+ return_if_error(fill_window(coder, allocator,
+ in, in_pos, in_size, action));
+
+ // Encode
+ const lzma_ret ret = coder->lz.code(coder->lz.coder,
+ &coder->mf, out, out_pos, out_size);
+ if (ret != LZMA_OK) {
+ // Setting this to LZMA_RUN for cases when we are
+ // flushing. It doesn't matter when finishing or if
+ // an error occurred.
+ coder->mf.action = LZMA_RUN;
+ return ret;
+ }
+ }
+
+ return LZMA_OK;
+}
+
+
+static bool
+lz_encoder_prepare(lzma_mf *mf, const lzma_allocator *allocator,
+ const lzma_lz_options *lz_options)
+{
+ // For now, the dictionary size is limited to 1.5 GiB. This may grow
+ // in the future if needed, but it needs a little more work than just
+ // changing this check.
+ if (lz_options->dict_size < LZMA_DICT_SIZE_MIN
+ || lz_options->dict_size
+ > (UINT32_C(1) << 30) + (UINT32_C(1) << 29)
+ || lz_options->nice_len > lz_options->match_len_max)
+ return true;
+
+ mf->keep_size_before = lz_options->before_size + lz_options->dict_size;
+
+ mf->keep_size_after = lz_options->after_size
+ + lz_options->match_len_max;
+
+ // To avoid constant memmove()s, allocate some extra space. Since
+ // memmove()s become more expensive when the size of the buffer
+ // increases, we reserve more space when a large dictionary is
+ // used to make the memmove() calls rarer.
+ //
+ // This works with dictionaries up to about 3 GiB. If bigger
+ // dictionary is wanted, some extra work is needed:
+ // - Several variables in lzma_mf have to be changed from uint32_t
+ // to size_t.
+ // - Memory usage calculation needs something too, e.g. use uint64_t
+ // for mf->size.
+ uint32_t reserve = lz_options->dict_size / 2;
+ if (reserve > (UINT32_C(1) << 30))
+ reserve /= 2;
+
+ reserve += (lz_options->before_size + lz_options->match_len_max
+ + lz_options->after_size) / 2 + (UINT32_C(1) << 19);
+
+ const uint32_t old_size = mf->size;
+ mf->size = mf->keep_size_before + reserve + mf->keep_size_after;
+
+ // Deallocate the old history buffer if it exists but has different
+ // size than what is needed now.
+ if (mf->buffer != NULL && old_size != mf->size) {
+ lzma_free(mf->buffer, allocator);
+ mf->buffer = NULL;
+ }
+
+ // Match finder options
+ mf->match_len_max = lz_options->match_len_max;
+ mf->nice_len = lz_options->nice_len;
+
+ // cyclic_size has to stay smaller than 2 Gi. Note that this doesn't
+ // mean limiting dictionary size to less than 2 GiB. With a match
+ // finder that uses multibyte resolution (hashes start at e.g. every
+ // fourth byte), cyclic_size would stay below 2 Gi even when
+ // dictionary size is greater than 2 GiB.
+ //
+ // It would be possible to allow cyclic_size >= 2 Gi, but then we
+ // would need to be careful to use 64-bit types in various places
+ // (size_t could do since we would need bigger than 32-bit address
+ // space anyway). It would also require either zeroing a multigigabyte
+ // buffer at initialization (waste of time and RAM) or allow
+ // normalization in lz_encoder_mf.c to access uninitialized
+ // memory to keep the code simpler. The current way is simple and
+ // still allows pretty big dictionaries, so I don't expect these
+ // limits to change.
+ mf->cyclic_size = lz_options->dict_size + 1;
+
+ // Validate the match finder ID and setup the function pointers.
+ switch (lz_options->match_finder) {
+#ifdef HAVE_MF_HC3
+ case LZMA_MF_HC3:
+ mf->find = &lzma_mf_hc3_find;
+ mf->skip = &lzma_mf_hc3_skip;
+ break;
+#endif
+#ifdef HAVE_MF_HC4
+ case LZMA_MF_HC4:
+ mf->find = &lzma_mf_hc4_find;
+ mf->skip = &lzma_mf_hc4_skip;
+ break;
+#endif
+#ifdef HAVE_MF_BT2
+ case LZMA_MF_BT2:
+ mf->find = &lzma_mf_bt2_find;
+ mf->skip = &lzma_mf_bt2_skip;
+ break;
+#endif
+#ifdef HAVE_MF_BT3
+ case LZMA_MF_BT3:
+ mf->find = &lzma_mf_bt3_find;
+ mf->skip = &lzma_mf_bt3_skip;
+ break;
+#endif
+#ifdef HAVE_MF_BT4
+ case LZMA_MF_BT4:
+ mf->find = &lzma_mf_bt4_find;
+ mf->skip = &lzma_mf_bt4_skip;
+ break;
+#endif
+
+ default:
+ return true;
+ }
+
+ // Calculate the sizes of mf->hash and mf->son.
+ //
+ // NOTE: Since 5.3.5beta the LZMA encoder ensures that nice_len
+ // is big enough for the selected match finder. This makes it
+ // easier for applications as nice_len = 2 will always be accepted
+ // even though the effective value can be slightly bigger.
+ const uint32_t hash_bytes
+ = mf_get_hash_bytes(lz_options->match_finder);
+ assert(hash_bytes <= mf->nice_len);
+
+ const bool is_bt = (lz_options->match_finder & 0x10) != 0;
+ uint32_t hs;
+
+ if (hash_bytes == 2) {
+ hs = 0xFFFF;
+ } else {
+ // Round dictionary size up to the next 2^n - 1 so it can
+ // be used as a hash mask.
+ hs = lz_options->dict_size - 1;
+ hs |= hs >> 1;
+ hs |= hs >> 2;
+ hs |= hs >> 4;
+ hs |= hs >> 8;
+ hs >>= 1;
+ hs |= 0xFFFF;
+
+ if (hs > (UINT32_C(1) << 24)) {
+ if (hash_bytes == 3)
+ hs = (UINT32_C(1) << 24) - 1;
+ else
+ hs >>= 1;
+ }
+ }
+
+ mf->hash_mask = hs;
+
+ ++hs;
+ if (hash_bytes > 2)
+ hs += HASH_2_SIZE;
+ if (hash_bytes > 3)
+ hs += HASH_3_SIZE;
+/*
+ No match finder uses this at the moment.
+ if (mf->hash_bytes > 4)
+ hs += HASH_4_SIZE;
+*/
+
+ const uint32_t old_hash_count = mf->hash_count;
+ const uint32_t old_sons_count = mf->sons_count;
+ mf->hash_count = hs;
+ mf->sons_count = mf->cyclic_size;
+ if (is_bt)
+ mf->sons_count *= 2;
+
+ // Deallocate the old hash array if it exists and has different size
+ // than what is needed now.
+ if (old_hash_count != mf->hash_count
+ || old_sons_count != mf->sons_count) {
+ lzma_free(mf->hash, allocator);
+ mf->hash = NULL;
+
+ lzma_free(mf->son, allocator);
+ mf->son = NULL;
+ }
+
+ // Maximum number of match finder cycles
+ mf->depth = lz_options->depth;
+ if (mf->depth == 0) {
+ if (is_bt)
+ mf->depth = 16 + mf->nice_len / 2;
+ else
+ mf->depth = 4 + mf->nice_len / 4;
+ }
+
+ return false;
+}
+
+
+static bool
+lz_encoder_init(lzma_mf *mf, const lzma_allocator *allocator,
+ const lzma_lz_options *lz_options)
+{
+ // Allocate the history buffer.
+ if (mf->buffer == NULL) {
+ // lzma_memcmplen() is used for the dictionary buffer
+ // so we need to allocate a few extra bytes to prevent
+ // it from reading past the end of the buffer.
+ mf->buffer = lzma_alloc(mf->size + LZMA_MEMCMPLEN_EXTRA,
+ allocator);
+ if (mf->buffer == NULL)
+ return true;
+
+ // Keep Valgrind happy with lzma_memcmplen() and initialize
+ // the extra bytes whose value may get read but which will
+ // effectively get ignored.
+ memzero(mf->buffer + mf->size, LZMA_MEMCMPLEN_EXTRA);
+ }
+
+ // Use cyclic_size as initial mf->offset. This allows
+ // avoiding a few branches in the match finders. The downside is
+ // that match finder needs to be normalized more often, which may
+ // hurt performance with huge dictionaries.
+ mf->offset = mf->cyclic_size;
+ mf->read_pos = 0;
+ mf->read_ahead = 0;
+ mf->read_limit = 0;
+ mf->write_pos = 0;
+ mf->pending = 0;
+
+#if UINT32_MAX >= SIZE_MAX / 4
+ // Check for integer overflow. (Huge dictionaries are not
+ // possible on 32-bit CPU.)
+ if (mf->hash_count > SIZE_MAX / sizeof(uint32_t)
+ || mf->sons_count > SIZE_MAX / sizeof(uint32_t))
+ return true;
+#endif
+
+ // Allocate and initialize the hash table. Since EMPTY_HASH_VALUE
+ // is zero, we can use lzma_alloc_zero() or memzero() for mf->hash.
+ //
+ // We don't need to initialize mf->son, but not doing that may
+ // make Valgrind complain in normalization (see normalize() in
+ // lz_encoder_mf.c). Skipping the initialization is *very* good
+ // when big dictionary is used but only small amount of data gets
+ // actually compressed: most of the mf->son won't get actually
+ // allocated by the kernel, so we avoid wasting RAM and improve
+ // initialization speed a lot.
+ if (mf->hash == NULL) {
+ mf->hash = lzma_alloc_zero(mf->hash_count * sizeof(uint32_t),
+ allocator);
+ mf->son = lzma_alloc(mf->sons_count * sizeof(uint32_t),
+ allocator);
+
+ if (mf->hash == NULL || mf->son == NULL) {
+ lzma_free(mf->hash, allocator);
+ mf->hash = NULL;
+
+ lzma_free(mf->son, allocator);
+ mf->son = NULL;
+
+ return true;
+ }
+ } else {
+/*
+ for (uint32_t i = 0; i < mf->hash_count; ++i)
+ mf->hash[i] = EMPTY_HASH_VALUE;
+*/
+ memzero(mf->hash, mf->hash_count * sizeof(uint32_t));
+ }
+
+ mf->cyclic_pos = 0;
+
+ // Handle preset dictionary.
+ if (lz_options->preset_dict != NULL
+ && lz_options->preset_dict_size > 0) {
+ // If the preset dictionary is bigger than the actual
+ // dictionary, use only the tail.
+ mf->write_pos = my_min(lz_options->preset_dict_size, mf->size);
+ memcpy(mf->buffer, lz_options->preset_dict
+ + lz_options->preset_dict_size - mf->write_pos,
+ mf->write_pos);
+ mf->action = LZMA_SYNC_FLUSH;
+ mf->skip(mf, mf->write_pos);
+ }
+
+ mf->action = LZMA_RUN;
+
+ return false;
+}
+
+
+extern uint64_t
+lzma_lz_encoder_memusage(const lzma_lz_options *lz_options)
+{
+ // Old buffers must not exist when calling lz_encoder_prepare().
+ lzma_mf mf = {
+ .buffer = NULL,
+ .hash = NULL,
+ .son = NULL,
+ .hash_count = 0,
+ .sons_count = 0,
+ };
+
+ // Setup the size information into mf.
+ if (lz_encoder_prepare(&mf, NULL, lz_options))
+ return UINT64_MAX;
+
+ // Calculate the memory usage.
+ return ((uint64_t)(mf.hash_count) + mf.sons_count) * sizeof(uint32_t)
+ + mf.size + sizeof(lzma_coder);
+}
+
+
+static void
+lz_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_coder *coder = coder_ptr;
+
+ lzma_next_end(&coder->next, allocator);
+
+ lzma_free(coder->mf.son, allocator);
+ lzma_free(coder->mf.hash, allocator);
+ lzma_free(coder->mf.buffer, allocator);
+
+ if (coder->lz.end != NULL)
+ coder->lz.end(coder->lz.coder, allocator);
+ else
+ lzma_free(coder->lz.coder, allocator);
+
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+lz_encoder_update(void *coder_ptr, const lzma_allocator *allocator,
+ const lzma_filter *filters_null lzma_attribute((__unused__)),
+ const lzma_filter *reversed_filters)
+{
+ lzma_coder *coder = coder_ptr;
+
+ if (coder->lz.options_update == NULL)
+ return LZMA_PROG_ERROR;
+
+ return_if_error(coder->lz.options_update(
+ coder->lz.coder, reversed_filters));
+
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters + 1);
+}
+
+
+static lzma_ret
+lz_encoder_set_out_limit(void *coder_ptr, uint64_t *uncomp_size,
+ uint64_t out_limit)
+{
+ lzma_coder *coder = coder_ptr;
+
+ // This is supported only if there are no other filters chained.
+ if (coder->next.code == NULL && coder->lz.set_out_limit != NULL)
+ return coder->lz.set_out_limit(
+ coder->lz.coder, uncomp_size, out_limit);
+
+ return LZMA_OPTIONS_ERROR;
+}
+
+
+extern lzma_ret
+lzma_lz_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters,
+ lzma_ret (*lz_init)(lzma_lz_encoder *lz,
+ const lzma_allocator *allocator,
+ lzma_vli id, const void *options,
+ lzma_lz_options *lz_options))
+{
+#if defined(HAVE_SMALL) && !defined(HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR)
+ // We need that the CRC32 table has been initialized.
+ lzma_crc32_init();
+#endif
+
+ // Allocate and initialize the base data structure.
+ lzma_coder *coder = next->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &lz_encode;
+ next->end = &lz_encoder_end;
+ next->update = &lz_encoder_update;
+ next->set_out_limit = &lz_encoder_set_out_limit;
+
+ coder->lz.coder = NULL;
+ coder->lz.code = NULL;
+ coder->lz.end = NULL;
+
+ // mf.size is initialized to silence Valgrind
+ // when used on optimized binaries (GCC may reorder
+ // code in a way that Valgrind gets unhappy).
+ coder->mf.buffer = NULL;
+ coder->mf.size = 0;
+ coder->mf.hash = NULL;
+ coder->mf.son = NULL;
+ coder->mf.hash_count = 0;
+ coder->mf.sons_count = 0;
+
+ coder->next = LZMA_NEXT_CODER_INIT;
+ }
+
+ // Initialize the LZ-based encoder.
+ lzma_lz_options lz_options;
+ return_if_error(lz_init(&coder->lz, allocator,
+ filters[0].id, filters[0].options, &lz_options));
+
+ // Setup the size information into coder->mf and deallocate
+ // old buffers if they have wrong size.
+ if (lz_encoder_prepare(&coder->mf, allocator, &lz_options))
+ return LZMA_OPTIONS_ERROR;
+
+ // Allocate new buffers if needed, and do the rest of
+ // the initialization.
+ if (lz_encoder_init(&coder->mf, allocator, &lz_options))
+ return LZMA_MEM_ERROR;
+
+ // Initialize the next filter in the chain, if any.
+ return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}
+
+
+extern LZMA_API(lzma_bool)
+lzma_mf_is_supported(lzma_match_finder mf)
+{
+ switch (mf) {
+#ifdef HAVE_MF_HC3
+ case LZMA_MF_HC3:
+ return true;
+#endif
+#ifdef HAVE_MF_HC4
+ case LZMA_MF_HC4:
+ return true;
+#endif
+#ifdef HAVE_MF_BT2
+ case LZMA_MF_BT2:
+ return true;
+#endif
+#ifdef HAVE_MF_BT3
+ case LZMA_MF_BT3:
+ return true;
+#endif
+#ifdef HAVE_MF_BT4
+ case LZMA_MF_BT4:
+ return true;
+#endif
+ default:
+ return false;
+ }
+}
diff --git a/src/liblzma/lz/lz_encoder.h b/src/liblzma/lz/lz_encoder.h
new file mode 100644
index 0000000..ffcba02
--- /dev/null
+++ b/src/liblzma/lz/lz_encoder.h
@@ -0,0 +1,341 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lz_encoder.h
+/// \brief LZ in window and match finder API
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZ_ENCODER_H
+#define LZMA_LZ_ENCODER_H
+
+#include "common.h"
+
+
+/// A table of these is used by the LZ-based encoder to hold
+/// the length-distance pairs found by the match finder.
+typedef struct {
+ uint32_t len;
+ uint32_t dist;
+} lzma_match;
+
+
+typedef struct lzma_mf_s lzma_mf;
+struct lzma_mf_s {
+ ///////////////
+ // In Window //
+ ///////////////
+
+ /// Pointer to buffer with data to be compressed
+ uint8_t *buffer;
+
+ /// Total size of the allocated buffer (that is, including all
+ /// the extra space)
+ uint32_t size;
+
+ /// Number of bytes that must be kept available in our input history.
+ /// That is, once keep_size_before bytes have been processed,
+ /// buffer[read_pos - keep_size_before] is the oldest byte that
+ /// must be available for reading.
+ uint32_t keep_size_before;
+
+ /// Number of bytes that must be kept in buffer after read_pos.
+ /// That is, read_pos <= write_pos - keep_size_after as long as
+ /// action is LZMA_RUN; when action != LZMA_RUN, read_pos is allowed
+ /// to reach write_pos so that the last bytes get encoded too.
+ uint32_t keep_size_after;
+
+ /// Match finders store locations of matches using 32-bit integers.
+ /// To avoid adjusting several megabytes of integers every time the
+ /// input window is moved with move_window, we only adjust the
+ /// offset of the buffer. Thus, buffer[value_in_hash_table - offset]
+ /// is the byte pointed by value_in_hash_table.
+ uint32_t offset;
+
+ /// buffer[read_pos] is the next byte to run through the match
+ /// finder. This is incremented in the match finder once the byte
+ /// has been processed.
+ uint32_t read_pos;
+
+ /// Number of bytes that have been ran through the match finder, but
+ /// which haven't been encoded by the LZ-based encoder yet.
+ uint32_t read_ahead;
+
+ /// As long as read_pos is less than read_limit, there is enough
+ /// input available in buffer for at least one encoding loop.
+ ///
+ /// Because of the stateful API, read_limit may and will get greater
+ /// than read_pos quite often. This is taken into account when
+ /// calculating the value for keep_size_after.
+ uint32_t read_limit;
+
+ /// buffer[write_pos] is the first byte that doesn't contain valid
+ /// uncompressed data; that is, the next input byte will be copied
+ /// to buffer[write_pos].
+ uint32_t write_pos;
+
+ /// Number of bytes not hashed before read_pos. This is needed to
+ /// restart the match finder after LZMA_SYNC_FLUSH.
+ uint32_t pending;
+
+ //////////////////
+ // Match Finder //
+ //////////////////
+
+ /// Find matches. Returns the number of distance-length pairs written
+ /// to the matches array. This is called only via lzma_mf_find().
+ uint32_t (*find)(lzma_mf *mf, lzma_match *matches);
+
+ /// Skips num bytes. This is like find() but doesn't make the
+ /// distance-length pairs available, thus being a little faster.
+ /// This is called only via mf_skip().
+ void (*skip)(lzma_mf *mf, uint32_t num);
+
+ uint32_t *hash;
+ uint32_t *son;
+ uint32_t cyclic_pos;
+ uint32_t cyclic_size; // Must be dictionary size + 1.
+ uint32_t hash_mask;
+
+ /// Maximum number of loops in the match finder
+ uint32_t depth;
+
+ /// Maximum length of a match that the match finder will try to find.
+ uint32_t nice_len;
+
+ /// Maximum length of a match supported by the LZ-based encoder.
+ /// If the longest match found by the match finder is nice_len,
+ /// mf_find() tries to expand it up to match_len_max bytes.
+ uint32_t match_len_max;
+
+ /// When running out of input, binary tree match finders need to know
+ /// if it is due to flushing or finishing. The action is used also
+ /// by the LZ-based encoders themselves.
+ lzma_action action;
+
+ /// Number of elements in hash[]
+ uint32_t hash_count;
+
+ /// Number of elements in son[]
+ uint32_t sons_count;
+};
+
+
+typedef struct {
+ /// Extra amount of data to keep available before the "actual"
+ /// dictionary.
+ size_t before_size;
+
+ /// Size of the history buffer
+ size_t dict_size;
+
+ /// Extra amount of data to keep available after the "actual"
+ /// dictionary.
+ size_t after_size;
+
+ /// Maximum length of a match that the LZ-based encoder can accept.
+ /// This is used to extend matches of length nice_len to the
+ /// maximum possible length.
+ size_t match_len_max;
+
+ /// Match finder will search matches up to this length.
+ /// This must be less than or equal to match_len_max.
+ size_t nice_len;
+
+ /// Type of the match finder to use
+ lzma_match_finder match_finder;
+
+ /// Maximum search depth
+ uint32_t depth;
+
+ /// TODO: Comment
+ const uint8_t *preset_dict;
+
+ uint32_t preset_dict_size;
+
+} lzma_lz_options;
+
+
+// The total usable buffer space at any moment outside the match finder:
+// before_size + dict_size + after_size + match_len_max
+//
+// In reality, there's some extra space allocated to prevent the number of
+// memmove() calls reasonable. The bigger the dict_size is, the bigger
+// this extra buffer will be since with bigger dictionaries memmove() would
+// also take longer.
+//
+// A single encoder loop in the LZ-based encoder may call the match finder
+// (mf_find() or mf_skip()) at most after_size times. In other words,
+// a single encoder loop may increment lzma_mf.read_pos at most after_size
+// times. Since matches are looked up to
+// lzma_mf.buffer[lzma_mf.read_pos + match_len_max - 1], the total
+// amount of extra buffer needed after dict_size becomes
+// after_size + match_len_max.
+//
+// before_size has two uses. The first one is to keep literals available
+// in cases when the LZ-based encoder has made some read ahead.
+// TODO: Maybe this could be changed by making the LZ-based encoders to
+// store the actual literals as they do with length-distance pairs.
+//
+// Algorithms such as LZMA2 first try to compress a chunk, and then check
+// if the encoded result is smaller than the uncompressed one. If the chunk
+// was incompressible, it is better to store it in uncompressed form in
+// the output stream. To do this, the whole uncompressed chunk has to be
+// still available in the history buffer. before_size achieves that.
+
+
+typedef struct {
+ /// Data specific to the LZ-based encoder
+ void *coder;
+
+ /// Function to encode from *dict to out[]
+ lzma_ret (*code)(void *coder,
+ lzma_mf *restrict mf, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size);
+
+ /// Free allocated resources
+ void (*end)(void *coder, const lzma_allocator *allocator);
+
+ /// Update the options in the middle of the encoding.
+ lzma_ret (*options_update)(void *coder, const lzma_filter *filter);
+
+ /// Set maximum allowed output size
+ lzma_ret (*set_out_limit)(void *coder, uint64_t *uncomp_size,
+ uint64_t out_limit);
+
+} lzma_lz_encoder;
+
+
+// Basic steps:
+// 1. Input gets copied into the dictionary.
+// 2. Data in dictionary gets run through the match finder byte by byte.
+// 3. The literals and matches are encoded using e.g. LZMA.
+//
+// The bytes that have been ran through the match finder, but not encoded yet,
+// are called `read ahead'.
+
+
+/// Get how many bytes the match finder hashes in its initial step.
+/// This is also the minimum nice_len value with the match finder.
+static inline uint32_t
+mf_get_hash_bytes(lzma_match_finder match_finder)
+{
+ return (uint32_t)match_finder & 0x0F;
+}
+
+
+/// Get pointer to the first byte not ran through the match finder
+static inline const uint8_t *
+mf_ptr(const lzma_mf *mf)
+{
+ return mf->buffer + mf->read_pos;
+}
+
+
+/// Get the number of bytes that haven't been ran through the match finder yet.
+static inline uint32_t
+mf_avail(const lzma_mf *mf)
+{
+ return mf->write_pos - mf->read_pos;
+}
+
+
+/// Get the number of bytes that haven't been encoded yet (some of these
+/// bytes may have been ran through the match finder though).
+static inline uint32_t
+mf_unencoded(const lzma_mf *mf)
+{
+ return mf->write_pos - mf->read_pos + mf->read_ahead;
+}
+
+
+/// Calculate the absolute offset from the beginning of the most recent
+/// dictionary reset. Only the lowest four bits are important, so there's no
+/// problem that we don't know the 64-bit size of the data encoded so far.
+///
+/// NOTE: When moving the input window, we need to do it so that the lowest
+/// bits of dict->read_pos are not modified to keep this macro working
+/// as intended.
+static inline uint32_t
+mf_position(const lzma_mf *mf)
+{
+ return mf->read_pos - mf->read_ahead;
+}
+
+
+/// Since everything else begins with mf_, use it also for lzma_mf_find().
+#define mf_find lzma_mf_find
+
+
+/// Skip the given number of bytes. This is used when a good match was found.
+/// For example, if mf_find() finds a match of 200 bytes long, the first byte
+/// of that match was already consumed by mf_find(), and the rest 199 bytes
+/// have to be skipped with mf_skip(mf, 199).
+static inline void
+mf_skip(lzma_mf *mf, uint32_t amount)
+{
+ if (amount != 0) {
+ mf->skip(mf, amount);
+ mf->read_ahead += amount;
+ }
+}
+
+
+/// Copies at most *left number of bytes from the history buffer
+/// to out[]. This is needed by LZMA2 to encode uncompressed chunks.
+static inline void
+mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size,
+ size_t *left)
+{
+ const size_t out_avail = out_size - *out_pos;
+ const size_t copy_size = my_min(out_avail, *left);
+
+ assert(mf->read_ahead == 0);
+ assert(mf->read_pos >= *left);
+
+ memcpy(out + *out_pos, mf->buffer + mf->read_pos - *left,
+ copy_size);
+
+ *out_pos += copy_size;
+ *left -= copy_size;
+ return;
+}
+
+
+extern lzma_ret lzma_lz_encoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters,
+ lzma_ret (*lz_init)(lzma_lz_encoder *lz,
+ const lzma_allocator *allocator,
+ lzma_vli id, const void *options,
+ lzma_lz_options *lz_options));
+
+
+extern uint64_t lzma_lz_encoder_memusage(const lzma_lz_options *lz_options);
+
+
+// These are only for LZ encoder's internal use.
+extern uint32_t lzma_mf_find(
+ lzma_mf *mf, uint32_t *count, lzma_match *matches);
+
+extern uint32_t lzma_mf_hc3_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_hc3_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_hc4_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_hc4_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_bt2_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_bt2_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_bt3_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_bt3_skip(lzma_mf *dict, uint32_t amount);
+
+extern uint32_t lzma_mf_bt4_find(lzma_mf *dict, lzma_match *matches);
+extern void lzma_mf_bt4_skip(lzma_mf *dict, uint32_t amount);
+
+#endif
diff --git a/src/liblzma/lz/lz_encoder_hash.h b/src/liblzma/lz/lz_encoder_hash.h
new file mode 100644
index 0000000..4d9971a
--- /dev/null
+++ b/src/liblzma/lz/lz_encoder_hash.h
@@ -0,0 +1,109 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lz_encoder_hash.h
+/// \brief Hash macros for match finders
+//
+// Author: Igor Pavlov
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZ_ENCODER_HASH_H
+#define LZMA_LZ_ENCODER_HASH_H
+
+#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
+ // This is to make liblzma produce the same output on big endian
+ // systems that it does on little endian systems. lz_encoder.c
+ // takes care of including the actual table.
+ lzma_attr_visibility_hidden
+ extern const uint32_t lzma_lz_hash_table[256];
+# define hash_table lzma_lz_hash_table
+#else
+# include "check.h"
+# define hash_table lzma_crc32_table[0]
+#endif
+
+#define HASH_2_SIZE (UINT32_C(1) << 10)
+#define HASH_3_SIZE (UINT32_C(1) << 16)
+#define HASH_4_SIZE (UINT32_C(1) << 20)
+
+#define HASH_2_MASK (HASH_2_SIZE - 1)
+#define HASH_3_MASK (HASH_3_SIZE - 1)
+#define HASH_4_MASK (HASH_4_SIZE - 1)
+
+#define FIX_3_HASH_SIZE (HASH_2_SIZE)
+#define FIX_4_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE)
+#define FIX_5_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE + HASH_4_SIZE)
+
+// Endianness doesn't matter in hash_2_calc() (no effect on the output).
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
+# define hash_2_calc() \
+ const uint32_t hash_value = read16ne(cur)
+#else
+# define hash_2_calc() \
+ const uint32_t hash_value \
+ = (uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8)
+#endif
+
+#define hash_3_calc() \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
+ const uint32_t hash_2_value = temp & HASH_2_MASK; \
+ const uint32_t hash_value \
+ = (temp ^ ((uint32_t)(cur[2]) << 8)) & mf->hash_mask
+
+#define hash_4_calc() \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
+ const uint32_t hash_2_value = temp & HASH_2_MASK; \
+ const uint32_t hash_3_value \
+ = (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
+ const uint32_t hash_value = (temp ^ ((uint32_t)(cur[2]) << 8) \
+ ^ (hash_table[cur[3]] << 5)) & mf->hash_mask
+
+
+// The following are not currently used.
+
+#define hash_5_calc() \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
+ const uint32_t hash_2_value = temp & HASH_2_MASK; \
+ const uint32_t hash_3_value \
+ = (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
+ uint32_t hash_4_value = (temp ^ ((uint32_t)(cur[2]) << 8) ^ \
+ ^ hash_table[cur[3]] << 5); \
+ const uint32_t hash_value \
+ = (hash_4_value ^ (hash_table[cur[4]] << 3)) \
+ & mf->hash_mask; \
+ hash_4_value &= HASH_4_MASK
+
+/*
+#define hash_zip_calc() \
+ const uint32_t hash_value \
+ = (((uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8)) \
+ ^ hash_table[cur[2]]) & 0xFFFF
+*/
+
+#define hash_zip_calc() \
+ const uint32_t hash_value \
+ = (((uint32_t)(cur[2]) | ((uint32_t)(cur[0]) << 8)) \
+ ^ hash_table[cur[1]]) & 0xFFFF
+
+#define mt_hash_2_calc() \
+ const uint32_t hash_2_value \
+ = (hash_table[cur[0]] ^ cur[1]) & HASH_2_MASK
+
+#define mt_hash_3_calc() \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
+ const uint32_t hash_2_value = temp & HASH_2_MASK; \
+ const uint32_t hash_3_value \
+ = (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK
+
+#define mt_hash_4_calc() \
+ const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
+ const uint32_t hash_2_value = temp & HASH_2_MASK; \
+ const uint32_t hash_3_value \
+ = (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
+ const uint32_t hash_4_value = (temp ^ ((uint32_t)(cur[2]) << 8) ^ \
+ (hash_table[cur[3]] << 5)) & HASH_4_MASK
+
+#endif
diff --git a/src/liblzma/lz/lz_encoder_hash_table.h b/src/liblzma/lz/lz_encoder_hash_table.h
new file mode 100644
index 0000000..8c51717
--- /dev/null
+++ b/src/liblzma/lz/lz_encoder_hash_table.h
@@ -0,0 +1,68 @@
+/* This file has been automatically generated by crc32_tablegen.c. */
+
+const uint32_t lzma_lz_hash_table[256] = {
+ 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
+ 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+ 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
+ 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+ 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
+ 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+ 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
+ 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+ 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
+ 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+ 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
+ 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+ 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
+ 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+ 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
+ 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+ 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
+ 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+ 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
+ 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+ 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
+ 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+ 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
+ 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+ 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
+ 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+ 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
+ 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+ 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
+ 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+ 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
+ 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+ 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
+ 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+ 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
+ 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+ 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
+ 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+ 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
+ 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+ 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
+ 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+ 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
+ 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+ 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
+ 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+ 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
+ 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+ 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
+ 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+ 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
+ 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+ 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
+ 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+ 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
+ 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+ 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
+ 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+ 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
+ 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+ 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
+ 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+ 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
+ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+};
diff --git a/src/liblzma/lz/lz_encoder_mf.c b/src/liblzma/lz/lz_encoder_mf.c
new file mode 100644
index 0000000..1fdc2d7
--- /dev/null
+++ b/src/liblzma/lz/lz_encoder_mf.c
@@ -0,0 +1,745 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lz_encoder_mf.c
+/// \brief Match finders
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_encoder.h"
+#include "lz_encoder_hash.h"
+#include "memcmplen.h"
+
+
+/// \brief Find matches starting from the current byte
+///
+/// \return The length of the longest match found
+extern uint32_t
+lzma_mf_find(lzma_mf *mf, uint32_t *count_ptr, lzma_match *matches)
+{
+ // Call the match finder. It returns the number of length-distance
+ // pairs found.
+ // FIXME: Minimum count is zero, what _exactly_ is the maximum?
+ const uint32_t count = mf->find(mf, matches);
+
+ // Length of the longest match; assume that no matches were found
+ // and thus the maximum length is zero.
+ uint32_t len_best = 0;
+
+ if (count > 0) {
+#ifndef NDEBUG
+ // Validate the matches.
+ for (uint32_t i = 0; i < count; ++i) {
+ assert(matches[i].len <= mf->nice_len);
+ assert(matches[i].dist < mf->read_pos);
+ assert(memcmp(mf_ptr(mf) - 1,
+ mf_ptr(mf) - matches[i].dist - 2,
+ matches[i].len) == 0);
+ }
+#endif
+
+ // The last used element in the array contains
+ // the longest match.
+ len_best = matches[count - 1].len;
+
+ // If a match of maximum search length was found, try to
+ // extend the match to maximum possible length.
+ if (len_best == mf->nice_len) {
+ // The limit for the match length is either the
+ // maximum match length supported by the LZ-based
+ // encoder or the number of bytes left in the
+ // dictionary, whichever is smaller.
+ uint32_t limit = mf_avail(mf) + 1;
+ if (limit > mf->match_len_max)
+ limit = mf->match_len_max;
+
+ // Pointer to the byte we just ran through
+ // the match finder.
+ const uint8_t *p1 = mf_ptr(mf) - 1;
+
+ // Pointer to the beginning of the match. We need -1
+ // here because the match distances are zero based.
+ const uint8_t *p2 = p1 - matches[count - 1].dist - 1;
+
+ len_best = lzma_memcmplen(p1, p2, len_best, limit);
+ }
+ }
+
+ *count_ptr = count;
+
+ // Finally update the read position to indicate that match finder was
+ // run for this dictionary offset.
+ ++mf->read_ahead;
+
+ return len_best;
+}
+
+
+/// Hash value to indicate unused element in the hash. Since we start the
+/// positions from dict_size + 1, zero is always too far to qualify
+/// as usable match position.
+#define EMPTY_HASH_VALUE 0
+
+
+/// Normalization must be done when lzma_mf.offset + lzma_mf.read_pos
+/// reaches MUST_NORMALIZE_POS.
+#define MUST_NORMALIZE_POS UINT32_MAX
+
+
+/// \brief Normalizes hash values
+///
+/// The hash arrays store positions of match candidates. The positions are
+/// relative to an arbitrary offset that is not the same as the absolute
+/// offset in the input stream. The relative position of the current byte
+/// is lzma_mf.offset + lzma_mf.read_pos. The distances of the matches are
+/// the differences of the current read position and the position found from
+/// the hash.
+///
+/// To prevent integer overflows of the offsets stored in the hash arrays,
+/// we need to "normalize" the stored values now and then. During the
+/// normalization, we drop values that indicate distance greater than the
+/// dictionary size, thus making space for new values.
+static void
+normalize(lzma_mf *mf)
+{
+ assert(mf->read_pos + mf->offset == MUST_NORMALIZE_POS);
+
+ // In future we may not want to touch the lowest bits, because there
+ // may be match finders that use larger resolution than one byte.
+ const uint32_t subvalue
+ = (MUST_NORMALIZE_POS - mf->cyclic_size);
+ // & ~((UINT32_C(1) << 10) - 1);
+
+ for (uint32_t i = 0; i < mf->hash_count; ++i) {
+ // If the distance is greater than the dictionary size,
+ // we can simply mark the hash element as empty.
+ if (mf->hash[i] <= subvalue)
+ mf->hash[i] = EMPTY_HASH_VALUE;
+ else
+ mf->hash[i] -= subvalue;
+ }
+
+ for (uint32_t i = 0; i < mf->sons_count; ++i) {
+ // Do the same for mf->son.
+ //
+ // NOTE: There may be uninitialized elements in mf->son.
+ // Valgrind may complain that the "if" below depends on
+ // an uninitialized value. In this case it is safe to ignore
+ // the warning. See also the comments in lz_encoder_init()
+ // in lz_encoder.c.
+ if (mf->son[i] <= subvalue)
+ mf->son[i] = EMPTY_HASH_VALUE;
+ else
+ mf->son[i] -= subvalue;
+ }
+
+ // Update offset to match the new locations.
+ mf->offset -= subvalue;
+
+ return;
+}
+
+
+/// Mark the current byte as processed from point of view of the match finder.
+static void
+move_pos(lzma_mf *mf)
+{
+ if (++mf->cyclic_pos == mf->cyclic_size)
+ mf->cyclic_pos = 0;
+
+ ++mf->read_pos;
+ assert(mf->read_pos <= mf->write_pos);
+
+ if (unlikely(mf->read_pos + mf->offset == UINT32_MAX))
+ normalize(mf);
+}
+
+
+/// When flushing, we cannot run the match finder unless there is nice_len
+/// bytes available in the dictionary. Instead, we skip running the match
+/// finder (indicating that no match was found), and count how many bytes we
+/// have ignored this way.
+///
+/// When new data is given after the flushing was completed, the match finder
+/// is restarted by rewinding mf->read_pos backwards by mf->pending. Then
+/// the missed bytes are added to the hash using the match finder's skip
+/// function (with small amount of input, it may start using mf->pending
+/// again if flushing).
+///
+/// Due to this rewinding, we don't touch cyclic_pos or test for
+/// normalization. It will be done when the match finder's skip function
+/// catches up after a flush.
+static void
+move_pending(lzma_mf *mf)
+{
+ ++mf->read_pos;
+ assert(mf->read_pos <= mf->write_pos);
+ ++mf->pending;
+}
+
+
+/// Calculate len_limit and determine if there is enough input to run
+/// the actual match finder code. Sets up "cur" and "pos". This macro
+/// is used by all find functions and binary tree skip functions. Hash
+/// chain skip function doesn't need len_limit so a simpler code is used
+/// in them.
+#define header(is_bt, len_min, ret_op) \
+ uint32_t len_limit = mf_avail(mf); \
+ if (mf->nice_len <= len_limit) { \
+ len_limit = mf->nice_len; \
+ } else if (len_limit < (len_min) \
+ || (is_bt && mf->action == LZMA_SYNC_FLUSH)) { \
+ assert(mf->action != LZMA_RUN); \
+ move_pending(mf); \
+ ret_op; \
+ } \
+ const uint8_t *cur = mf_ptr(mf); \
+ const uint32_t pos = mf->read_pos + mf->offset
+
+
+/// Header for find functions. "return 0" indicates that zero matches
+/// were found.
+#define header_find(is_bt, len_min) \
+ header(is_bt, len_min, return 0); \
+ uint32_t matches_count = 0
+
+
+/// Header for a loop in a skip function. "continue" tells to skip the rest
+/// of the code in the loop.
+#define header_skip(is_bt, len_min) \
+ header(is_bt, len_min, continue)
+
+
+/// Calls hc_find_func() or bt_find_func() and calculates the total number
+/// of matches found. Updates the dictionary position and returns the number
+/// of matches found.
+#define call_find(func, len_best) \
+do { \
+ matches_count = (uint32_t)(func(len_limit, pos, cur, cur_match, \
+ mf->depth, mf->son, \
+ mf->cyclic_pos, mf->cyclic_size, \
+ matches + matches_count, len_best) \
+ - matches); \
+ move_pos(mf); \
+ return matches_count; \
+} while (0)
+
+
+////////////////
+// Hash Chain //
+////////////////
+
+#if defined(HAVE_MF_HC3) || defined(HAVE_MF_HC4)
+///
+///
+/// \param len_limit Don't look for matches longer than len_limit.
+/// \param pos lzma_mf.read_pos + lzma_mf.offset
+/// \param cur Pointer to current byte (mf_ptr(mf))
+/// \param cur_match Start position of the current match candidate
+/// \param depth Maximum length of the hash chain
+/// \param son lzma_mf.son (contains the hash chain)
+/// \param cyclic_pos lzma_mf.cyclic_pos
+/// \param cyclic_size lzma_mf_cyclic_size
+/// \param matches Array to hold the matches.
+/// \param len_best The length of the longest match found so far.
+static lzma_match *
+hc_find_func(
+ const uint32_t len_limit,
+ const uint32_t pos,
+ const uint8_t *const cur,
+ uint32_t cur_match,
+ uint32_t depth,
+ uint32_t *const son,
+ const uint32_t cyclic_pos,
+ const uint32_t cyclic_size,
+ lzma_match *matches,
+ uint32_t len_best)
+{
+ son[cyclic_pos] = cur_match;
+
+ while (true) {
+ const uint32_t delta = pos - cur_match;
+ if (depth-- == 0 || delta >= cyclic_size)
+ return matches;
+
+ const uint8_t *const pb = cur - delta;
+ cur_match = son[cyclic_pos - delta
+ + (delta > cyclic_pos ? cyclic_size : 0)];
+
+ if (pb[len_best] == cur[len_best] && pb[0] == cur[0]) {
+ uint32_t len = lzma_memcmplen(pb, cur, 1, len_limit);
+
+ if (len_best < len) {
+ len_best = len;
+ matches->len = len;
+ matches->dist = delta - 1;
+ ++matches;
+
+ if (len == len_limit)
+ return matches;
+ }
+ }
+ }
+}
+
+
+#define hc_find(len_best) \
+ call_find(hc_find_func, len_best)
+
+
+#define hc_skip() \
+do { \
+ mf->son[mf->cyclic_pos] = cur_match; \
+ move_pos(mf); \
+} while (0)
+
+#endif
+
+
+#ifdef HAVE_MF_HC3
+extern uint32_t
+lzma_mf_hc3_find(lzma_mf *mf, lzma_match *matches)
+{
+ header_find(false, 3);
+
+ hash_3_calc();
+
+ const uint32_t delta2 = pos - mf->hash[hash_2_value];
+ const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+ uint32_t len_best = 2;
+
+ if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+ len_best = lzma_memcmplen(cur - delta2, cur,
+ len_best, len_limit);
+
+ matches[0].len = len_best;
+ matches[0].dist = delta2 - 1;
+ matches_count = 1;
+
+ if (len_best == len_limit) {
+ hc_skip();
+ return 1; // matches_count
+ }
+ }
+
+ hc_find(len_best);
+}
+
+
+extern void
+lzma_mf_hc3_skip(lzma_mf *mf, uint32_t amount)
+{
+ do {
+ if (mf_avail(mf) < 3) {
+ move_pending(mf);
+ continue;
+ }
+
+ const uint8_t *cur = mf_ptr(mf);
+ const uint32_t pos = mf->read_pos + mf->offset;
+
+ hash_3_calc();
+
+ const uint32_t cur_match
+ = mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+ hc_skip();
+
+ } while (--amount != 0);
+}
+#endif
+
+
+#ifdef HAVE_MF_HC4
+extern uint32_t
+lzma_mf_hc4_find(lzma_mf *mf, lzma_match *matches)
+{
+ header_find(false, 4);
+
+ hash_4_calc();
+
+ uint32_t delta2 = pos - mf->hash[hash_2_value];
+ const uint32_t delta3
+ = pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
+ const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value ] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+ mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+ uint32_t len_best = 1;
+
+ if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+ len_best = 2;
+ matches[0].len = 2;
+ matches[0].dist = delta2 - 1;
+ matches_count = 1;
+ }
+
+ if (delta2 != delta3 && delta3 < mf->cyclic_size
+ && *(cur - delta3) == *cur) {
+ len_best = 3;
+ matches[matches_count++].dist = delta3 - 1;
+ delta2 = delta3;
+ }
+
+ if (matches_count != 0) {
+ len_best = lzma_memcmplen(cur - delta2, cur,
+ len_best, len_limit);
+
+ matches[matches_count - 1].len = len_best;
+
+ if (len_best == len_limit) {
+ hc_skip();
+ return matches_count;
+ }
+ }
+
+ if (len_best < 3)
+ len_best = 3;
+
+ hc_find(len_best);
+}
+
+
+extern void
+lzma_mf_hc4_skip(lzma_mf *mf, uint32_t amount)
+{
+ do {
+ if (mf_avail(mf) < 4) {
+ move_pending(mf);
+ continue;
+ }
+
+ const uint8_t *cur = mf_ptr(mf);
+ const uint32_t pos = mf->read_pos + mf->offset;
+
+ hash_4_calc();
+
+ const uint32_t cur_match
+ = mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+ mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+ hc_skip();
+
+ } while (--amount != 0);
+}
+#endif
+
+
+/////////////////
+// Binary Tree //
+/////////////////
+
+#if defined(HAVE_MF_BT2) || defined(HAVE_MF_BT3) || defined(HAVE_MF_BT4)
+static lzma_match *
+bt_find_func(
+ const uint32_t len_limit,
+ const uint32_t pos,
+ const uint8_t *const cur,
+ uint32_t cur_match,
+ uint32_t depth,
+ uint32_t *const son,
+ const uint32_t cyclic_pos,
+ const uint32_t cyclic_size,
+ lzma_match *matches,
+ uint32_t len_best)
+{
+ uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
+ uint32_t *ptr1 = son + (cyclic_pos << 1);
+
+ uint32_t len0 = 0;
+ uint32_t len1 = 0;
+
+ while (true) {
+ const uint32_t delta = pos - cur_match;
+ if (depth-- == 0 || delta >= cyclic_size) {
+ *ptr0 = EMPTY_HASH_VALUE;
+ *ptr1 = EMPTY_HASH_VALUE;
+ return matches;
+ }
+
+ uint32_t *const pair = son + ((cyclic_pos - delta
+ + (delta > cyclic_pos ? cyclic_size : 0))
+ << 1);
+
+ const uint8_t *const pb = cur - delta;
+ uint32_t len = my_min(len0, len1);
+
+ if (pb[len] == cur[len]) {
+ len = lzma_memcmplen(pb, cur, len + 1, len_limit);
+
+ if (len_best < len) {
+ len_best = len;
+ matches->len = len;
+ matches->dist = delta - 1;
+ ++matches;
+
+ if (len == len_limit) {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ return matches;
+ }
+ }
+ }
+
+ if (pb[len] < cur[len]) {
+ *ptr1 = cur_match;
+ ptr1 = pair + 1;
+ cur_match = *ptr1;
+ len1 = len;
+ } else {
+ *ptr0 = cur_match;
+ ptr0 = pair;
+ cur_match = *ptr0;
+ len0 = len;
+ }
+ }
+}
+
+
+static void
+bt_skip_func(
+ const uint32_t len_limit,
+ const uint32_t pos,
+ const uint8_t *const cur,
+ uint32_t cur_match,
+ uint32_t depth,
+ uint32_t *const son,
+ const uint32_t cyclic_pos,
+ const uint32_t cyclic_size)
+{
+ uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
+ uint32_t *ptr1 = son + (cyclic_pos << 1);
+
+ uint32_t len0 = 0;
+ uint32_t len1 = 0;
+
+ while (true) {
+ const uint32_t delta = pos - cur_match;
+ if (depth-- == 0 || delta >= cyclic_size) {
+ *ptr0 = EMPTY_HASH_VALUE;
+ *ptr1 = EMPTY_HASH_VALUE;
+ return;
+ }
+
+ uint32_t *pair = son + ((cyclic_pos - delta
+ + (delta > cyclic_pos ? cyclic_size : 0))
+ << 1);
+ const uint8_t *pb = cur - delta;
+ uint32_t len = my_min(len0, len1);
+
+ if (pb[len] == cur[len]) {
+ len = lzma_memcmplen(pb, cur, len + 1, len_limit);
+
+ if (len == len_limit) {
+ *ptr1 = pair[0];
+ *ptr0 = pair[1];
+ return;
+ }
+ }
+
+ if (pb[len] < cur[len]) {
+ *ptr1 = cur_match;
+ ptr1 = pair + 1;
+ cur_match = *ptr1;
+ len1 = len;
+ } else {
+ *ptr0 = cur_match;
+ ptr0 = pair;
+ cur_match = *ptr0;
+ len0 = len;
+ }
+ }
+}
+
+
+#define bt_find(len_best) \
+ call_find(bt_find_func, len_best)
+
+#define bt_skip() \
+do { \
+ bt_skip_func(len_limit, pos, cur, cur_match, mf->depth, \
+ mf->son, mf->cyclic_pos, \
+ mf->cyclic_size); \
+ move_pos(mf); \
+} while (0)
+
+#endif
+
+
+#ifdef HAVE_MF_BT2
+extern uint32_t
+lzma_mf_bt2_find(lzma_mf *mf, lzma_match *matches)
+{
+ header_find(true, 2);
+
+ hash_2_calc();
+
+ const uint32_t cur_match = mf->hash[hash_value];
+ mf->hash[hash_value] = pos;
+
+ bt_find(1);
+}
+
+
+extern void
+lzma_mf_bt2_skip(lzma_mf *mf, uint32_t amount)
+{
+ do {
+ header_skip(true, 2);
+
+ hash_2_calc();
+
+ const uint32_t cur_match = mf->hash[hash_value];
+ mf->hash[hash_value] = pos;
+
+ bt_skip();
+
+ } while (--amount != 0);
+}
+#endif
+
+
+#ifdef HAVE_MF_BT3
+extern uint32_t
+lzma_mf_bt3_find(lzma_mf *mf, lzma_match *matches)
+{
+ header_find(true, 3);
+
+ hash_3_calc();
+
+ const uint32_t delta2 = pos - mf->hash[hash_2_value];
+ const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+ uint32_t len_best = 2;
+
+ if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+ len_best = lzma_memcmplen(
+ cur, cur - delta2, len_best, len_limit);
+
+ matches[0].len = len_best;
+ matches[0].dist = delta2 - 1;
+ matches_count = 1;
+
+ if (len_best == len_limit) {
+ bt_skip();
+ return 1; // matches_count
+ }
+ }
+
+ bt_find(len_best);
+}
+
+
+extern void
+lzma_mf_bt3_skip(lzma_mf *mf, uint32_t amount)
+{
+ do {
+ header_skip(true, 3);
+
+ hash_3_calc();
+
+ const uint32_t cur_match
+ = mf->hash[FIX_3_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
+
+ bt_skip();
+
+ } while (--amount != 0);
+}
+#endif
+
+
+#ifdef HAVE_MF_BT4
+extern uint32_t
+lzma_mf_bt4_find(lzma_mf *mf, lzma_match *matches)
+{
+ header_find(true, 4);
+
+ hash_4_calc();
+
+ uint32_t delta2 = pos - mf->hash[hash_2_value];
+ const uint32_t delta3
+ = pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
+ const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+ mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+ uint32_t len_best = 1;
+
+ if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
+ len_best = 2;
+ matches[0].len = 2;
+ matches[0].dist = delta2 - 1;
+ matches_count = 1;
+ }
+
+ if (delta2 != delta3 && delta3 < mf->cyclic_size
+ && *(cur - delta3) == *cur) {
+ len_best = 3;
+ matches[matches_count++].dist = delta3 - 1;
+ delta2 = delta3;
+ }
+
+ if (matches_count != 0) {
+ len_best = lzma_memcmplen(
+ cur, cur - delta2, len_best, len_limit);
+
+ matches[matches_count - 1].len = len_best;
+
+ if (len_best == len_limit) {
+ bt_skip();
+ return matches_count;
+ }
+ }
+
+ if (len_best < 3)
+ len_best = 3;
+
+ bt_find(len_best);
+}
+
+
+extern void
+lzma_mf_bt4_skip(lzma_mf *mf, uint32_t amount)
+{
+ do {
+ header_skip(true, 4);
+
+ hash_4_calc();
+
+ const uint32_t cur_match
+ = mf->hash[FIX_4_HASH_SIZE + hash_value];
+
+ mf->hash[hash_2_value] = pos;
+ mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
+ mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
+
+ bt_skip();
+
+ } while (--amount != 0);
+}
+#endif
diff --git a/src/liblzma/lzma/Makefile.inc b/src/liblzma/lzma/Makefile.inc
new file mode 100644
index 0000000..25440d8
--- /dev/null
+++ b/src/liblzma/lzma/Makefile.inc
@@ -0,0 +1,44 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+EXTRA_DIST += lzma/fastpos_tablegen.c
+
+liblzma_la_SOURCES += \
+ lzma/lzma_common.h \
+ lzma/lzma_encoder_presets.c
+
+if COND_ENCODER_LZMA1
+liblzma_la_SOURCES += \
+ lzma/fastpos.h \
+ lzma/lzma_encoder.h \
+ lzma/lzma_encoder.c \
+ lzma/lzma_encoder_private.h \
+ lzma/lzma_encoder_optimum_fast.c \
+ lzma/lzma_encoder_optimum_normal.c
+
+if !COND_SMALL
+liblzma_la_SOURCES += lzma/fastpos_table.c
+endif
+endif
+
+if COND_DECODER_LZMA1
+liblzma_la_SOURCES += \
+ lzma/lzma_decoder.c \
+ lzma/lzma_decoder.h
+endif
+
+if COND_ENCODER_LZMA2
+liblzma_la_SOURCES += \
+ lzma/lzma2_encoder.c \
+ lzma/lzma2_encoder.h
+endif
+
+if COND_DECODER_LZMA2
+liblzma_la_SOURCES += \
+ lzma/lzma2_decoder.c \
+ lzma/lzma2_decoder.h
+endif
diff --git a/src/liblzma/lzma/fastpos.h b/src/liblzma/lzma/fastpos.h
new file mode 100644
index 0000000..dbeb16f
--- /dev/null
+++ b/src/liblzma/lzma/fastpos.h
@@ -0,0 +1,142 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file fastpos.h
+/// \brief Kind of two-bit version of bit scan reverse
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_FASTPOS_H
+#define LZMA_FASTPOS_H
+
+// LZMA encodes match distances by storing the highest two bits using
+// a six-bit value [0, 63], and then the missing lower bits.
+// Dictionary size is also stored using this encoding in the .xz
+// file format header.
+//
+// fastpos.h provides a way to quickly find out the correct six-bit
+// values. The following table gives some examples of this encoding:
+//
+// dist return
+// 0 0
+// 1 1
+// 2 2
+// 3 3
+// 4 4
+// 5 4
+// 6 5
+// 7 5
+// 8 6
+// 11 6
+// 12 7
+// ... ...
+// 15 7
+// 16 8
+// 17 8
+// ... ...
+// 23 8
+// 24 9
+// 25 9
+// ... ...
+//
+//
+// Provided functions or macros
+// ----------------------------
+//
+// get_dist_slot(dist) is the basic version. get_dist_slot_2(dist)
+// assumes that dist >= FULL_DISTANCES, thus the result is at least
+// FULL_DISTANCES_BITS * 2. Using get_dist_slot(dist) instead of
+// get_dist_slot_2(dist) would give the same result, but get_dist_slot_2(dist)
+// should be tiny bit faster due to the assumption being made.
+//
+//
+// Size vs. speed
+// --------------
+//
+// With some CPUs that have fast BSR (bit scan reverse) instruction, the
+// size optimized version is slightly faster than the bigger table based
+// approach. Such CPUs include Intel Pentium Pro, Pentium II, Pentium III
+// and Core 2 (possibly others). AMD K7 seems to have slower BSR, but that
+// would still have speed roughly comparable to the table version. Older
+// x86 CPUs like the original Pentium have very slow BSR; on those systems
+// the table version is a lot faster.
+//
+// On some CPUs, the table version is a lot faster when using position
+// dependent code, but with position independent code the size optimized
+// version is slightly faster. This occurs at least on 32-bit SPARC (no
+// ASM optimizations).
+//
+// I'm making the table version the default, because that has good speed
+// on all systems I have tried. The size optimized version is sometimes
+// slightly faster, but sometimes it is a lot slower.
+
+#ifdef HAVE_SMALL
+# define get_dist_slot(dist) \
+ ((dist) <= 4 ? (dist) : get_dist_slot_2(dist))
+
+static inline uint32_t
+get_dist_slot_2(uint32_t dist)
+{
+ const uint32_t i = bsr32(dist);
+ return (i + i) + ((dist >> (i - 1)) & 1);
+}
+
+
+#else
+
+#define FASTPOS_BITS 13
+
+lzma_attr_visibility_hidden
+extern const uint8_t lzma_fastpos[1 << FASTPOS_BITS];
+
+
+#define fastpos_shift(extra, n) \
+ ((extra) + (n) * (FASTPOS_BITS - 1))
+
+#define fastpos_limit(extra, n) \
+ (UINT32_C(1) << (FASTPOS_BITS + fastpos_shift(extra, n)))
+
+#define fastpos_result(dist, extra, n) \
+ (uint32_t)(lzma_fastpos[(dist) >> fastpos_shift(extra, n)]) \
+ + 2 * fastpos_shift(extra, n)
+
+
+static inline uint32_t
+get_dist_slot(uint32_t dist)
+{
+ // If it is small enough, we can pick the result directly from
+ // the precalculated table.
+ if (dist < fastpos_limit(0, 0))
+ return lzma_fastpos[dist];
+
+ if (dist < fastpos_limit(0, 1))
+ return fastpos_result(dist, 0, 1);
+
+ return fastpos_result(dist, 0, 2);
+}
+
+
+#ifdef FULL_DISTANCES_BITS
+static inline uint32_t
+get_dist_slot_2(uint32_t dist)
+{
+ assert(dist >= FULL_DISTANCES);
+
+ if (dist < fastpos_limit(FULL_DISTANCES_BITS - 1, 0))
+ return fastpos_result(dist, FULL_DISTANCES_BITS - 1, 0);
+
+ if (dist < fastpos_limit(FULL_DISTANCES_BITS - 1, 1))
+ return fastpos_result(dist, FULL_DISTANCES_BITS - 1, 1);
+
+ return fastpos_result(dist, FULL_DISTANCES_BITS - 1, 2);
+}
+#endif
+
+#endif
+
+#endif
diff --git a/src/liblzma/lzma/fastpos_table.c b/src/liblzma/lzma/fastpos_table.c
new file mode 100644
index 0000000..6a3ceac
--- /dev/null
+++ b/src/liblzma/lzma/fastpos_table.c
@@ -0,0 +1,519 @@
+/* This file has been automatically generated by fastpos_tablegen.c. */
+
+#include "common.h"
+#include "fastpos.h"
+
+const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {
+ 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
+ 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25
+};
diff --git a/src/liblzma/lzma/fastpos_tablegen.c b/src/liblzma/lzma/fastpos_tablegen.c
new file mode 100644
index 0000000..57ed150
--- /dev/null
+++ b/src/liblzma/lzma/fastpos_tablegen.c
@@ -0,0 +1,57 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file fastpos_tablegen.c
+/// \brief Generates the lzma_fastpos[] lookup table
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <inttypes.h>
+#include <stdio.h>
+
+#define lzma_attr_visibility_hidden
+#include "fastpos.h"
+
+
+int
+main(void)
+{
+ uint8_t fastpos[1 << FASTPOS_BITS];
+
+ const uint8_t fast_slots = 2 * FASTPOS_BITS;
+ uint32_t c = 2;
+
+ fastpos[0] = 0;
+ fastpos[1] = 1;
+
+ for (uint8_t slot_fast = 2; slot_fast < fast_slots; ++slot_fast) {
+ const uint32_t k = 1 << ((slot_fast >> 1) - 1);
+ for (uint32_t j = 0; j < k; ++j, ++c)
+ fastpos[c] = slot_fast;
+ }
+
+ printf("/* This file has been automatically generated "
+ "by fastpos_tablegen.c. */\n\n"
+ "#include \"common.h\"\n"
+ "#include \"fastpos.h\"\n\n"
+ "const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {");
+
+ for (size_t i = 0; i < (1 << FASTPOS_BITS); ++i) {
+ if (i % 16 == 0)
+ printf("\n\t");
+
+ printf("%3u", (unsigned int)(fastpos[i]));
+
+ if (i != (1 << FASTPOS_BITS) - 1)
+ printf(",");
+ }
+
+ printf("\n};\n");
+
+ return 0;
+}
diff --git a/src/liblzma/lzma/lzma2_decoder.c b/src/liblzma/lzma/lzma2_decoder.c
new file mode 100644
index 0000000..567df49
--- /dev/null
+++ b/src/liblzma/lzma/lzma2_decoder.c
@@ -0,0 +1,311 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma2_decoder.c
+/// \brief LZMA2 decoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma2_decoder.h"
+#include "lz_decoder.h"
+#include "lzma_decoder.h"
+
+
+typedef struct {
+ enum sequence {
+ SEQ_CONTROL,
+ SEQ_UNCOMPRESSED_1,
+ SEQ_UNCOMPRESSED_2,
+ SEQ_COMPRESSED_0,
+ SEQ_COMPRESSED_1,
+ SEQ_PROPERTIES,
+ SEQ_LZMA,
+ SEQ_COPY,
+ } sequence;
+
+ /// Sequence after the size fields have been decoded.
+ enum sequence next_sequence;
+
+ /// LZMA decoder
+ lzma_lz_decoder lzma;
+
+ /// Uncompressed size of LZMA chunk
+ size_t uncompressed_size;
+
+ /// Compressed size of the chunk (naturally equals to uncompressed
+ /// size of uncompressed chunk)
+ size_t compressed_size;
+
+ /// True if properties are needed. This is false before the
+ /// first LZMA chunk.
+ bool need_properties;
+
+ /// True if dictionary reset is needed. This is false before the
+ /// first chunk (LZMA or uncompressed).
+ bool need_dictionary_reset;
+
+ lzma_options_lzma options;
+} lzma_lzma2_coder;
+
+
+static lzma_ret
+lzma2_decode(void *coder_ptr, lzma_dict *restrict dict,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size)
+{
+ lzma_lzma2_coder *restrict coder = coder_ptr;
+
+ // With SEQ_LZMA it is possible that no new input is needed to do
+ // some progress. The rest of the sequences assume that there is
+ // at least one byte of input.
+ while (*in_pos < in_size || coder->sequence == SEQ_LZMA)
+ switch (coder->sequence) {
+ case SEQ_CONTROL: {
+ const uint32_t control = in[*in_pos];
+ ++*in_pos;
+
+ // End marker
+ if (control == 0x00)
+ return LZMA_STREAM_END;
+
+ if (control >= 0xE0 || control == 1) {
+ // Dictionary reset implies that next LZMA chunk has
+ // to set new properties.
+ coder->need_properties = true;
+ coder->need_dictionary_reset = true;
+ } else if (coder->need_dictionary_reset) {
+ return LZMA_DATA_ERROR;
+ }
+
+ if (control >= 0x80) {
+ // LZMA chunk. The highest five bits of the
+ // uncompressed size are taken from the control byte.
+ coder->uncompressed_size = (control & 0x1F) << 16;
+ coder->sequence = SEQ_UNCOMPRESSED_1;
+
+ // See if there are new properties or if we need to
+ // reset the state.
+ if (control >= 0xC0) {
+ // When there are new properties, state reset
+ // is done at SEQ_PROPERTIES.
+ coder->need_properties = false;
+ coder->next_sequence = SEQ_PROPERTIES;
+
+ } else if (coder->need_properties) {
+ return LZMA_DATA_ERROR;
+
+ } else {
+ coder->next_sequence = SEQ_LZMA;
+
+ // If only state reset is wanted with old
+ // properties, do the resetting here for
+ // simplicity.
+ if (control >= 0xA0)
+ coder->lzma.reset(coder->lzma.coder,
+ &coder->options);
+ }
+ } else {
+ // Invalid control values
+ if (control > 2)
+ return LZMA_DATA_ERROR;
+
+ // It's uncompressed chunk
+ coder->sequence = SEQ_COMPRESSED_0;
+ coder->next_sequence = SEQ_COPY;
+ }
+
+ if (coder->need_dictionary_reset) {
+ // Finish the dictionary reset and let the caller
+ // flush the dictionary to the actual output buffer.
+ coder->need_dictionary_reset = false;
+ dict_reset(dict);
+ return LZMA_OK;
+ }
+
+ break;
+ }
+
+ case SEQ_UNCOMPRESSED_1:
+ coder->uncompressed_size += (uint32_t)(in[(*in_pos)++]) << 8;
+ coder->sequence = SEQ_UNCOMPRESSED_2;
+ break;
+
+ case SEQ_UNCOMPRESSED_2:
+ coder->uncompressed_size += in[(*in_pos)++] + 1U;
+ coder->sequence = SEQ_COMPRESSED_0;
+ coder->lzma.set_uncompressed(coder->lzma.coder,
+ coder->uncompressed_size, false);
+ break;
+
+ case SEQ_COMPRESSED_0:
+ coder->compressed_size = (uint32_t)(in[(*in_pos)++]) << 8;
+ coder->sequence = SEQ_COMPRESSED_1;
+ break;
+
+ case SEQ_COMPRESSED_1:
+ coder->compressed_size += in[(*in_pos)++] + 1U;
+ coder->sequence = coder->next_sequence;
+ break;
+
+ case SEQ_PROPERTIES:
+ if (lzma_lzma_lclppb_decode(&coder->options, in[(*in_pos)++]))
+ return LZMA_DATA_ERROR;
+
+ coder->lzma.reset(coder->lzma.coder, &coder->options);
+
+ coder->sequence = SEQ_LZMA;
+ break;
+
+ case SEQ_LZMA: {
+ // Store the start offset so that we can update
+ // coder->compressed_size later.
+ const size_t in_start = *in_pos;
+
+ // Decode from in[] to *dict.
+ const lzma_ret ret = coder->lzma.code(coder->lzma.coder,
+ dict, in, in_pos, in_size);
+
+ // Validate and update coder->compressed_size.
+ const size_t in_used = *in_pos - in_start;
+ if (in_used > coder->compressed_size)
+ return LZMA_DATA_ERROR;
+
+ coder->compressed_size -= in_used;
+
+ // Return if we didn't finish the chunk, or an error occurred.
+ if (ret != LZMA_STREAM_END)
+ return ret;
+
+ // The LZMA decoder must have consumed the whole chunk now.
+ // We don't need to worry about uncompressed size since it
+ // is checked by the LZMA decoder.
+ if (coder->compressed_size != 0)
+ return LZMA_DATA_ERROR;
+
+ coder->sequence = SEQ_CONTROL;
+ break;
+ }
+
+ case SEQ_COPY: {
+ // Copy from input to the dictionary as is.
+ dict_write(dict, in, in_pos, in_size, &coder->compressed_size);
+ if (coder->compressed_size != 0)
+ return LZMA_OK;
+
+ coder->sequence = SEQ_CONTROL;
+ break;
+ }
+
+ default:
+ assert(0);
+ return LZMA_PROG_ERROR;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+lzma2_decoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_lzma2_coder *coder = coder_ptr;
+
+ assert(coder->lzma.end == NULL);
+ lzma_free(coder->lzma.coder, allocator);
+
+ lzma_free(coder, allocator);
+
+ return;
+}
+
+
+static lzma_ret
+lzma2_decoder_init(lzma_lz_decoder *lz, const lzma_allocator *allocator,
+ lzma_vli id lzma_attribute((__unused__)), const void *opt,
+ lzma_lz_options *lz_options)
+{
+ lzma_lzma2_coder *coder = lz->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_lzma2_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ lz->coder = coder;
+ lz->code = &lzma2_decode;
+ lz->end = &lzma2_decoder_end;
+
+ coder->lzma = LZMA_LZ_DECODER_INIT;
+ }
+
+ const lzma_options_lzma *options = opt;
+
+ coder->sequence = SEQ_CONTROL;
+ coder->need_properties = true;
+ coder->need_dictionary_reset = options->preset_dict == NULL
+ || options->preset_dict_size == 0;
+
+ return lzma_lzma_decoder_create(&coder->lzma,
+ allocator, options, lz_options);
+}
+
+
+extern lzma_ret
+lzma_lzma2_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ // LZMA2 can only be the last filter in the chain. This is enforced
+ // by the raw_decoder initialization.
+ assert(filters[1].init == NULL);
+
+ return lzma_lz_decoder_init(next, allocator, filters,
+ &lzma2_decoder_init);
+}
+
+
+extern uint64_t
+lzma_lzma2_decoder_memusage(const void *options)
+{
+ return sizeof(lzma_lzma2_coder)
+ + lzma_lzma_decoder_memusage_nocheck(options);
+}
+
+
+extern lzma_ret
+lzma_lzma2_props_decode(void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size)
+{
+ if (props_size != 1)
+ return LZMA_OPTIONS_ERROR;
+
+ // Check that reserved bits are unset.
+ if (props[0] & 0xC0)
+ return LZMA_OPTIONS_ERROR;
+
+ // Decode the dictionary size.
+ if (props[0] > 40)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_options_lzma *opt = lzma_alloc(
+ sizeof(lzma_options_lzma), allocator);
+ if (opt == NULL)
+ return LZMA_MEM_ERROR;
+
+ if (props[0] == 40) {
+ opt->dict_size = UINT32_MAX;
+ } else {
+ opt->dict_size = 2 | (props[0] & 1U);
+ opt->dict_size <<= props[0] / 2U + 11;
+ }
+
+ opt->preset_dict = NULL;
+ opt->preset_dict_size = 0;
+
+ *options = opt;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/lzma/lzma2_decoder.h b/src/liblzma/lzma/lzma2_decoder.h
new file mode 100644
index 0000000..ef2dcbf
--- /dev/null
+++ b/src/liblzma/lzma/lzma2_decoder.h
@@ -0,0 +1,29 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma2_decoder.h
+/// \brief LZMA2 decoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA2_DECODER_H
+#define LZMA_LZMA2_DECODER_H
+
+#include "common.h"
+
+extern lzma_ret lzma_lzma2_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern uint64_t lzma_lzma2_decoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma2_props_decode(
+ void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size);
+
+#endif
diff --git a/src/liblzma/lzma/lzma2_encoder.c b/src/liblzma/lzma/lzma2_encoder.c
new file mode 100644
index 0000000..4b6b231
--- /dev/null
+++ b/src/liblzma/lzma/lzma2_encoder.c
@@ -0,0 +1,414 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma2_encoder.c
+/// \brief LZMA2 encoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_encoder.h"
+#include "lzma_encoder.h"
+#include "fastpos.h"
+#include "lzma2_encoder.h"
+
+
+typedef struct {
+ enum {
+ SEQ_INIT,
+ SEQ_LZMA_ENCODE,
+ SEQ_LZMA_COPY,
+ SEQ_UNCOMPRESSED_HEADER,
+ SEQ_UNCOMPRESSED_COPY,
+ } sequence;
+
+ /// LZMA encoder
+ void *lzma;
+
+ /// LZMA options currently in use.
+ lzma_options_lzma opt_cur;
+
+ bool need_properties;
+ bool need_state_reset;
+ bool need_dictionary_reset;
+
+ /// Uncompressed size of a chunk
+ size_t uncompressed_size;
+
+ /// Compressed size of a chunk (excluding headers); this is also used
+ /// to indicate the end of buf[] in SEQ_LZMA_COPY.
+ size_t compressed_size;
+
+ /// Read position in buf[]
+ size_t buf_pos;
+
+ /// Buffer to hold the chunk header and LZMA compressed data
+ uint8_t buf[LZMA2_HEADER_MAX + LZMA2_CHUNK_MAX];
+} lzma_lzma2_coder;
+
+
+static void
+lzma2_header_lzma(lzma_lzma2_coder *coder)
+{
+ assert(coder->uncompressed_size > 0);
+ assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
+ assert(coder->compressed_size > 0);
+ assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
+
+ size_t pos;
+
+ if (coder->need_properties) {
+ pos = 0;
+
+ if (coder->need_dictionary_reset)
+ coder->buf[pos] = 0x80 + (3 << 5);
+ else
+ coder->buf[pos] = 0x80 + (2 << 5);
+ } else {
+ pos = 1;
+
+ if (coder->need_state_reset)
+ coder->buf[pos] = 0x80 + (1 << 5);
+ else
+ coder->buf[pos] = 0x80;
+ }
+
+ // Set the start position for copying.
+ coder->buf_pos = pos;
+
+ // Uncompressed size
+ size_t size = coder->uncompressed_size - 1;
+ coder->buf[pos++] += size >> 16;
+ coder->buf[pos++] = (size >> 8) & 0xFF;
+ coder->buf[pos++] = size & 0xFF;
+
+ // Compressed size
+ size = coder->compressed_size - 1;
+ coder->buf[pos++] = size >> 8;
+ coder->buf[pos++] = size & 0xFF;
+
+ // Properties, if needed
+ if (coder->need_properties)
+ lzma_lzma_lclppb_encode(&coder->opt_cur, coder->buf + pos);
+
+ coder->need_properties = false;
+ coder->need_state_reset = false;
+ coder->need_dictionary_reset = false;
+
+ // The copying code uses coder->compressed_size to indicate the end
+ // of coder->buf[], so we need add the maximum size of the header here.
+ coder->compressed_size += LZMA2_HEADER_MAX;
+
+ return;
+}
+
+
+static void
+lzma2_header_uncompressed(lzma_lzma2_coder *coder)
+{
+ assert(coder->uncompressed_size > 0);
+ assert(coder->uncompressed_size <= LZMA2_CHUNK_MAX);
+
+ // If this is the first chunk, we need to include dictionary
+ // reset indicator.
+ if (coder->need_dictionary_reset)
+ coder->buf[0] = 1;
+ else
+ coder->buf[0] = 2;
+
+ coder->need_dictionary_reset = false;
+
+ // "Compressed" size
+ coder->buf[1] = (coder->uncompressed_size - 1) >> 8;
+ coder->buf[2] = (coder->uncompressed_size - 1) & 0xFF;
+
+ // Set the start position for copying.
+ coder->buf_pos = 0;
+ return;
+}
+
+
+static lzma_ret
+lzma2_encode(void *coder_ptr, lzma_mf *restrict mf,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size)
+{
+ lzma_lzma2_coder *restrict coder = coder_ptr;
+
+ while (*out_pos < out_size)
+ switch (coder->sequence) {
+ case SEQ_INIT:
+ // If there's no input left and we are flushing or finishing,
+ // don't start a new chunk.
+ if (mf_unencoded(mf) == 0) {
+ // Write end of payload marker if finishing.
+ if (mf->action == LZMA_FINISH)
+ out[(*out_pos)++] = 0;
+
+ return mf->action == LZMA_RUN
+ ? LZMA_OK : LZMA_STREAM_END;
+ }
+
+ if (coder->need_state_reset)
+ return_if_error(lzma_lzma_encoder_reset(
+ coder->lzma, &coder->opt_cur));
+
+ coder->uncompressed_size = 0;
+ coder->compressed_size = 0;
+ coder->sequence = SEQ_LZMA_ENCODE;
+
+ // Fall through
+
+ case SEQ_LZMA_ENCODE: {
+ // Calculate how much more uncompressed data this chunk
+ // could accept.
+ const uint32_t left = LZMA2_UNCOMPRESSED_MAX
+ - coder->uncompressed_size;
+ uint32_t limit;
+
+ if (left < mf->match_len_max) {
+ // Must flush immediately since the next LZMA symbol
+ // could make the uncompressed size of the chunk too
+ // big.
+ limit = 0;
+ } else {
+ // Calculate maximum read_limit that is OK from point
+ // of view of LZMA2 chunk size.
+ limit = mf->read_pos - mf->read_ahead
+ + left - mf->match_len_max;
+ }
+
+ // Save the start position so that we can update
+ // coder->uncompressed_size.
+ const uint32_t read_start = mf->read_pos - mf->read_ahead;
+
+ // Call the LZMA encoder until the chunk is finished.
+ const lzma_ret ret = lzma_lzma_encode(coder->lzma, mf,
+ coder->buf + LZMA2_HEADER_MAX,
+ &coder->compressed_size,
+ LZMA2_CHUNK_MAX, limit);
+
+ coder->uncompressed_size += mf->read_pos - mf->read_ahead
+ - read_start;
+
+ assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
+ assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
+
+ if (ret != LZMA_STREAM_END)
+ return LZMA_OK;
+
+ // See if the chunk compressed. If it didn't, we encode it
+ // as uncompressed chunk. This saves a few bytes of space
+ // and makes decoding faster.
+ if (coder->compressed_size >= coder->uncompressed_size) {
+ coder->uncompressed_size += mf->read_ahead;
+ assert(coder->uncompressed_size
+ <= LZMA2_UNCOMPRESSED_MAX);
+ mf->read_ahead = 0;
+ lzma2_header_uncompressed(coder);
+ coder->need_state_reset = true;
+ coder->sequence = SEQ_UNCOMPRESSED_HEADER;
+ break;
+ }
+
+ // The chunk did compress at least by one byte, so we store
+ // the chunk as LZMA.
+ lzma2_header_lzma(coder);
+
+ coder->sequence = SEQ_LZMA_COPY;
+ }
+
+ // Fall through
+
+ case SEQ_LZMA_COPY:
+ // Copy the compressed chunk along its headers to the
+ // output buffer.
+ lzma_bufcpy(coder->buf, &coder->buf_pos,
+ coder->compressed_size,
+ out, out_pos, out_size);
+ if (coder->buf_pos != coder->compressed_size)
+ return LZMA_OK;
+
+ coder->sequence = SEQ_INIT;
+ break;
+
+ case SEQ_UNCOMPRESSED_HEADER:
+ // Copy the three-byte header to indicate uncompressed chunk.
+ lzma_bufcpy(coder->buf, &coder->buf_pos,
+ LZMA2_HEADER_UNCOMPRESSED,
+ out, out_pos, out_size);
+ if (coder->buf_pos != LZMA2_HEADER_UNCOMPRESSED)
+ return LZMA_OK;
+
+ coder->sequence = SEQ_UNCOMPRESSED_COPY;
+
+ // Fall through
+
+ case SEQ_UNCOMPRESSED_COPY:
+ // Copy the uncompressed data as is from the dictionary
+ // to the output buffer.
+ mf_read(mf, out, out_pos, out_size, &coder->uncompressed_size);
+ if (coder->uncompressed_size != 0)
+ return LZMA_OK;
+
+ coder->sequence = SEQ_INIT;
+ break;
+ }
+
+ return LZMA_OK;
+}
+
+
+static void
+lzma2_encoder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_lzma2_coder *coder = coder_ptr;
+ lzma_free(coder->lzma, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+lzma2_encoder_options_update(void *coder_ptr, const lzma_filter *filter)
+{
+ lzma_lzma2_coder *coder = coder_ptr;
+
+ // New options can be set only when there is no incomplete chunk.
+ // This is the case at the beginning of the raw stream and right
+ // after LZMA_SYNC_FLUSH.
+ if (filter->options == NULL || coder->sequence != SEQ_INIT)
+ return LZMA_PROG_ERROR;
+
+ // Look if there are new options. At least for now,
+ // only lc/lp/pb can be changed.
+ const lzma_options_lzma *opt = filter->options;
+ if (coder->opt_cur.lc != opt->lc || coder->opt_cur.lp != opt->lp
+ || coder->opt_cur.pb != opt->pb) {
+ // Validate the options.
+ if (opt->lc > LZMA_LCLP_MAX || opt->lp > LZMA_LCLP_MAX
+ || opt->lc + opt->lp > LZMA_LCLP_MAX
+ || opt->pb > LZMA_PB_MAX)
+ return LZMA_OPTIONS_ERROR;
+
+ // The new options will be used when the encoder starts
+ // a new LZMA2 chunk.
+ coder->opt_cur.lc = opt->lc;
+ coder->opt_cur.lp = opt->lp;
+ coder->opt_cur.pb = opt->pb;
+ coder->need_properties = true;
+ coder->need_state_reset = true;
+ }
+
+ return LZMA_OK;
+}
+
+
+static lzma_ret
+lzma2_encoder_init(lzma_lz_encoder *lz, const lzma_allocator *allocator,
+ lzma_vli id lzma_attribute((__unused__)), const void *options,
+ lzma_lz_options *lz_options)
+{
+ if (options == NULL)
+ return LZMA_PROG_ERROR;
+
+ lzma_lzma2_coder *coder = lz->coder;
+ if (coder == NULL) {
+ coder = lzma_alloc(sizeof(lzma_lzma2_coder), allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ lz->coder = coder;
+ lz->code = &lzma2_encode;
+ lz->end = &lzma2_encoder_end;
+ lz->options_update = &lzma2_encoder_options_update;
+
+ coder->lzma = NULL;
+ }
+
+ coder->opt_cur = *(const lzma_options_lzma *)(options);
+
+ coder->sequence = SEQ_INIT;
+ coder->need_properties = true;
+ coder->need_state_reset = false;
+ coder->need_dictionary_reset
+ = coder->opt_cur.preset_dict == NULL
+ || coder->opt_cur.preset_dict_size == 0;
+
+ // Initialize LZMA encoder
+ return_if_error(lzma_lzma_encoder_create(&coder->lzma, allocator,
+ LZMA_FILTER_LZMA2, &coder->opt_cur, lz_options));
+
+ // Make sure that we will always have enough history available in
+ // case we need to use uncompressed chunks. They are used when the
+ // compressed size of a chunk is not smaller than the uncompressed
+ // size, so we need to have at least LZMA2_COMPRESSED_MAX bytes
+ // history available.
+ if (lz_options->before_size + lz_options->dict_size < LZMA2_CHUNK_MAX)
+ lz_options->before_size
+ = LZMA2_CHUNK_MAX - lz_options->dict_size;
+
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_lzma2_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return lzma_lz_encoder_init(
+ next, allocator, filters, &lzma2_encoder_init);
+}
+
+
+extern uint64_t
+lzma_lzma2_encoder_memusage(const void *options)
+{
+ const uint64_t lzma_mem = lzma_lzma_encoder_memusage(options);
+ if (lzma_mem == UINT64_MAX)
+ return UINT64_MAX;
+
+ return sizeof(lzma_lzma2_coder) + lzma_mem;
+}
+
+
+extern lzma_ret
+lzma_lzma2_props_encode(const void *options, uint8_t *out)
+{
+ if (options == NULL)
+ return LZMA_PROG_ERROR;
+
+ const lzma_options_lzma *const opt = options;
+ uint32_t d = my_max(opt->dict_size, LZMA_DICT_SIZE_MIN);
+
+ // Round up to the next 2^n - 1 or 2^n + 2^(n - 1) - 1 depending
+ // on which one is the next:
+ --d;
+ d |= d >> 2;
+ d |= d >> 3;
+ d |= d >> 4;
+ d |= d >> 8;
+ d |= d >> 16;
+
+ // Get the highest two bits using the proper encoding:
+ if (d == UINT32_MAX)
+ out[0] = 40;
+ else
+ out[0] = get_dist_slot(d + 1) - 24;
+
+ return LZMA_OK;
+}
+
+
+extern uint64_t
+lzma_lzma2_block_size(const void *options)
+{
+ const lzma_options_lzma *const opt = options;
+
+ // Use at least 1 MiB to keep compression ratio better.
+ return my_max((uint64_t)(opt->dict_size) * 3, UINT64_C(1) << 20);
+}
diff --git a/src/liblzma/lzma/lzma2_encoder.h b/src/liblzma/lzma/lzma2_encoder.h
new file mode 100644
index 0000000..515f183
--- /dev/null
+++ b/src/liblzma/lzma/lzma2_encoder.h
@@ -0,0 +1,43 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma2_encoder.h
+/// \brief LZMA2 encoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA2_ENCODER_H
+#define LZMA_LZMA2_ENCODER_H
+
+#include "common.h"
+
+
+/// Maximum number of bytes of actual data per chunk (no headers)
+#define LZMA2_CHUNK_MAX (UINT32_C(1) << 16)
+
+/// Maximum uncompressed size of LZMA chunk (no headers)
+#define LZMA2_UNCOMPRESSED_MAX (UINT32_C(1) << 21)
+
+/// Maximum size of LZMA2 headers
+#define LZMA2_HEADER_MAX 6
+
+/// Size of a header for uncompressed chunk
+#define LZMA2_HEADER_UNCOMPRESSED 3
+
+
+extern lzma_ret lzma_lzma2_encoder_init(
+ lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern uint64_t lzma_lzma2_encoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma2_props_encode(const void *options, uint8_t *out);
+
+extern uint64_t lzma_lzma2_block_size(const void *options);
+
+#endif
diff --git a/src/liblzma/lzma/lzma_common.h b/src/liblzma/lzma/lzma_common.h
new file mode 100644
index 0000000..9d040d9
--- /dev/null
+++ b/src/liblzma/lzma/lzma_common.h
@@ -0,0 +1,225 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_common.h
+/// \brief Private definitions common to LZMA encoder and decoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_COMMON_H
+#define LZMA_LZMA_COMMON_H
+
+#include "common.h"
+#include "range_common.h"
+
+
+///////////////////
+// Miscellaneous //
+///////////////////
+
+/// Maximum number of position states. A position state is the lowest pos bits
+/// number of bits of the current uncompressed offset. In some places there
+/// are different sets of probabilities for different pos states.
+#define POS_STATES_MAX (1 << LZMA_PB_MAX)
+
+
+/// Validates lc, lp, and pb.
+static inline bool
+is_lclppb_valid(const lzma_options_lzma *options)
+{
+ return options->lc <= LZMA_LCLP_MAX && options->lp <= LZMA_LCLP_MAX
+ && options->lc + options->lp <= LZMA_LCLP_MAX
+ && options->pb <= LZMA_PB_MAX;
+}
+
+
+///////////
+// State //
+///////////
+
+/// This enum is used to track which events have occurred most recently and
+/// in which order. This information is used to predict the next event.
+///
+/// Events:
+/// - Literal: One 8-bit byte
+/// - Match: Repeat a chunk of data at some distance
+/// - Long repeat: Multi-byte match at a recently seen distance
+/// - Short repeat: One-byte repeat at a recently seen distance
+///
+/// The event names are in from STATE_oldest_older_previous. REP means
+/// either short or long repeated match, and NONLIT means any non-literal.
+typedef enum {
+ STATE_LIT_LIT,
+ STATE_MATCH_LIT_LIT,
+ STATE_REP_LIT_LIT,
+ STATE_SHORTREP_LIT_LIT,
+ STATE_MATCH_LIT,
+ STATE_REP_LIT,
+ STATE_SHORTREP_LIT,
+ STATE_LIT_MATCH,
+ STATE_LIT_LONGREP,
+ STATE_LIT_SHORTREP,
+ STATE_NONLIT_MATCH,
+ STATE_NONLIT_REP,
+} lzma_lzma_state;
+
+
+/// Total number of states
+#define STATES 12
+
+/// The lowest 7 states indicate that the previous state was a literal.
+#define LIT_STATES 7
+
+
+/// Indicate that the latest state was a literal.
+#define update_literal(state) \
+ state = ((state) <= STATE_SHORTREP_LIT_LIT \
+ ? STATE_LIT_LIT \
+ : ((state) <= STATE_LIT_SHORTREP \
+ ? (state) - 3 \
+ : (state) - 6))
+
+/// Indicate that the latest state was a match.
+#define update_match(state) \
+ state = ((state) < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH)
+
+/// Indicate that the latest state was a long repeated match.
+#define update_long_rep(state) \
+ state = ((state) < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP)
+
+/// Indicate that the latest state was a short match.
+#define update_short_rep(state) \
+ state = ((state) < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP)
+
+/// Test if the previous state was a literal.
+#define is_literal_state(state) \
+ ((state) < LIT_STATES)
+
+
+/////////////
+// Literal //
+/////////////
+
+/// Each literal coder is divided in three sections:
+/// - 0x001-0x0FF: Without match byte
+/// - 0x101-0x1FF: With match byte; match bit is 0
+/// - 0x201-0x2FF: With match byte; match bit is 1
+///
+/// Match byte is used when the previous LZMA symbol was something else than
+/// a literal (that is, it was some kind of match).
+#define LITERAL_CODER_SIZE 0x300
+
+/// Maximum number of literal coders
+#define LITERAL_CODERS_MAX (1 << LZMA_LCLP_MAX)
+
+/// Locate the literal coder for the next literal byte. The choice depends on
+/// - the lowest literal_pos_bits bits of the position of the current
+/// byte; and
+/// - the highest literal_context_bits bits of the previous byte.
+#define literal_subcoder(probs, lc, lp_mask, pos, prev_byte) \
+ ((probs)[(((pos) & (lp_mask)) << (lc)) \
+ + ((uint32_t)(prev_byte) >> (8U - (lc)))])
+
+
+static inline void
+literal_init(probability (*probs)[LITERAL_CODER_SIZE],
+ uint32_t lc, uint32_t lp)
+{
+ assert(lc + lp <= LZMA_LCLP_MAX);
+
+ const uint32_t coders = 1U << (lc + lp);
+
+ for (uint32_t i = 0; i < coders; ++i)
+ for (uint32_t j = 0; j < LITERAL_CODER_SIZE; ++j)
+ bit_reset(probs[i][j]);
+
+ return;
+}
+
+
+//////////////////
+// Match length //
+//////////////////
+
+// Minimum length of a match is two bytes.
+#define MATCH_LEN_MIN 2
+
+// Match length is encoded with 4, 5, or 10 bits.
+//
+// Length Bits
+// 2-9 4 = Choice=0 + 3 bits
+// 10-17 5 = Choice=1 + Choice2=0 + 3 bits
+// 18-273 10 = Choice=1 + Choice2=1 + 8 bits
+#define LEN_LOW_BITS 3
+#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)
+#define LEN_MID_BITS 3
+#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)
+#define LEN_HIGH_BITS 8
+#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)
+#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)
+
+// Maximum length of a match is 273 which is a result of the encoding
+// described above.
+#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)
+
+
+////////////////////
+// Match distance //
+////////////////////
+
+// Different sets of probabilities are used for match distances that have very
+// short match length: Lengths of 2, 3, and 4 bytes have a separate set of
+// probabilities for each length. The matches with longer length use a shared
+// set of probabilities.
+#define DIST_STATES 4
+
+// Macro to get the index of the appropriate probability array.
+#define get_dist_state(len) \
+ ((len) < DIST_STATES + MATCH_LEN_MIN \
+ ? (len) - MATCH_LEN_MIN \
+ : DIST_STATES - 1)
+
+// The highest two bits of a match distance (distance slot) are encoded
+// using six bits. See fastpos.h for more explanation.
+#define DIST_SLOT_BITS 6
+#define DIST_SLOTS (1 << DIST_SLOT_BITS)
+
+// Match distances up to 127 are fully encoded using probabilities. Since
+// the highest two bits (distance slot) are always encoded using six bits,
+// the distances 0-3 don't need any additional bits to encode, since the
+// distance slot itself is the same as the actual distance. DIST_MODEL_START
+// indicates the first distance slot where at least one additional bit is
+// needed.
+#define DIST_MODEL_START 4
+
+// Match distances greater than 127 are encoded in three pieces:
+// - distance slot: the highest two bits
+// - direct bits: 2-26 bits below the highest two bits
+// - alignment bits: four lowest bits
+//
+// Direct bits don't use any probabilities.
+//
+// The distance slot value of 14 is for distances 128-191 (see the table in
+// fastpos.h to understand why).
+#define DIST_MODEL_END 14
+
+// Distance slots that indicate a distance <= 127.
+#define FULL_DISTANCES_BITS (DIST_MODEL_END / 2)
+#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)
+
+// For match distances greater than 127, only the highest two bits and the
+// lowest four bits (alignment) is encoded using probabilities.
+#define ALIGN_BITS 4
+#define ALIGN_SIZE (1 << ALIGN_BITS)
+#define ALIGN_MASK (ALIGN_SIZE - 1)
+
+// LZMA remembers the four most recent match distances. Reusing these distances
+// tends to take less space than re-encoding the actual distance value.
+#define REPS 4
+
+#endif
diff --git a/src/liblzma/lzma/lzma_decoder.c b/src/liblzma/lzma/lzma_decoder.c
new file mode 100644
index 0000000..26c148a
--- /dev/null
+++ b/src/liblzma/lzma/lzma_decoder.c
@@ -0,0 +1,1133 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_decoder.c
+/// \brief LZMA decoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lz_decoder.h"
+#include "lzma_common.h"
+#include "lzma_decoder.h"
+#include "range_decoder.h"
+
+// The macros unroll loops with switch statements.
+// Silence warnings about missing fall-through comments.
+#if TUKLIB_GNUC_REQ(7, 0)
+# pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif
+
+
+#ifdef HAVE_SMALL
+
+// Macros for (somewhat) size-optimized code.
+#define seq_4(seq) seq
+
+#define seq_6(seq) seq
+
+#define seq_8(seq) seq
+
+#define seq_len(seq) \
+ seq ## _CHOICE, \
+ seq ## _CHOICE2, \
+ seq ## _BITTREE
+
+#define len_decode(target, ld, pos_state, seq) \
+do { \
+case seq ## _CHOICE: \
+ rc_if_0(ld.choice, seq ## _CHOICE) { \
+ rc_update_0(ld.choice); \
+ probs = ld.low[pos_state];\
+ limit = LEN_LOW_SYMBOLS; \
+ target = MATCH_LEN_MIN; \
+ } else { \
+ rc_update_1(ld.choice); \
+case seq ## _CHOICE2: \
+ rc_if_0(ld.choice2, seq ## _CHOICE2) { \
+ rc_update_0(ld.choice2); \
+ probs = ld.mid[pos_state]; \
+ limit = LEN_MID_SYMBOLS; \
+ target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
+ } else { \
+ rc_update_1(ld.choice2); \
+ probs = ld.high; \
+ limit = LEN_HIGH_SYMBOLS; \
+ target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS \
+ + LEN_MID_SYMBOLS; \
+ } \
+ } \
+ symbol = 1; \
+case seq ## _BITTREE: \
+ do { \
+ rc_bit(probs[symbol], , , seq ## _BITTREE); \
+ } while (symbol < limit); \
+ target += symbol - limit; \
+} while (0)
+
+#else // HAVE_SMALL
+
+// Unrolled versions
+#define seq_4(seq) \
+ seq ## 0, \
+ seq ## 1, \
+ seq ## 2, \
+ seq ## 3
+
+#define seq_6(seq) \
+ seq ## 0, \
+ seq ## 1, \
+ seq ## 2, \
+ seq ## 3, \
+ seq ## 4, \
+ seq ## 5
+
+#define seq_8(seq) \
+ seq ## 0, \
+ seq ## 1, \
+ seq ## 2, \
+ seq ## 3, \
+ seq ## 4, \
+ seq ## 5, \
+ seq ## 6, \
+ seq ## 7
+
+#define seq_len(seq) \
+ seq ## _CHOICE, \
+ seq ## _LOW0, \
+ seq ## _LOW1, \
+ seq ## _LOW2, \
+ seq ## _CHOICE2, \
+ seq ## _MID0, \
+ seq ## _MID1, \
+ seq ## _MID2, \
+ seq ## _HIGH0, \
+ seq ## _HIGH1, \
+ seq ## _HIGH2, \
+ seq ## _HIGH3, \
+ seq ## _HIGH4, \
+ seq ## _HIGH5, \
+ seq ## _HIGH6, \
+ seq ## _HIGH7
+
+#define len_decode(target, ld, pos_state, seq) \
+do { \
+ symbol = 1; \
+case seq ## _CHOICE: \
+ rc_if_0(ld.choice, seq ## _CHOICE) { \
+ rc_update_0(ld.choice); \
+ rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW0); \
+ rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW1); \
+ rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW2); \
+ target = symbol - LEN_LOW_SYMBOLS + MATCH_LEN_MIN; \
+ } else { \
+ rc_update_1(ld.choice); \
+case seq ## _CHOICE2: \
+ rc_if_0(ld.choice2, seq ## _CHOICE2) { \
+ rc_update_0(ld.choice2); \
+ rc_bit_case(ld.mid[pos_state][symbol], , , \
+ seq ## _MID0); \
+ rc_bit_case(ld.mid[pos_state][symbol], , , \
+ seq ## _MID1); \
+ rc_bit_case(ld.mid[pos_state][symbol], , , \
+ seq ## _MID2); \
+ target = symbol - LEN_MID_SYMBOLS \
+ + MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
+ } else { \
+ rc_update_1(ld.choice2); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH0); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH1); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH2); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH3); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH4); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH5); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH6); \
+ rc_bit_case(ld.high[symbol], , , seq ## _HIGH7); \
+ target = symbol - LEN_HIGH_SYMBOLS \
+ + MATCH_LEN_MIN \
+ + LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; \
+ } \
+ } \
+} while (0)
+
+#endif // HAVE_SMALL
+
+
+/// Length decoder probabilities; see comments in lzma_common.h.
+typedef struct {
+ probability choice;
+ probability choice2;
+ probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
+ probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
+ probability high[LEN_HIGH_SYMBOLS];
+} lzma_length_decoder;
+
+
+typedef struct {
+ ///////////////////
+ // Probabilities //
+ ///////////////////
+
+ /// Literals; see comments in lzma_common.h.
+ probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
+
+ /// If 1, it's a match. Otherwise it's a single 8-bit literal.
+ probability is_match[STATES][POS_STATES_MAX];
+
+ /// If 1, it's a repeated match. The distance is one of rep0 .. rep3.
+ probability is_rep[STATES];
+
+ /// If 0, distance of a repeated match is rep0.
+ /// Otherwise check is_rep1.
+ probability is_rep0[STATES];
+
+ /// If 0, distance of a repeated match is rep1.
+ /// Otherwise check is_rep2.
+ probability is_rep1[STATES];
+
+ /// If 0, distance of a repeated match is rep2. Otherwise it is rep3.
+ probability is_rep2[STATES];
+
+ /// If 1, the repeated match has length of one byte. Otherwise
+ /// the length is decoded from rep_len_decoder.
+ probability is_rep0_long[STATES][POS_STATES_MAX];
+
+ /// Probability tree for the highest two bits of the match distance.
+ /// There is a separate probability tree for match lengths of
+ /// 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
+ probability dist_slot[DIST_STATES][DIST_SLOTS];
+
+ /// Probability trees for additional bits for match distance when the
+ /// distance is in the range [4, 127].
+ probability pos_special[FULL_DISTANCES - DIST_MODEL_END];
+
+ /// Probability tree for the lowest four bits of a match distance
+ /// that is equal to or greater than 128.
+ probability pos_align[ALIGN_SIZE];
+
+ /// Length of a normal match
+ lzma_length_decoder match_len_decoder;
+
+ /// Length of a repeated match
+ lzma_length_decoder rep_len_decoder;
+
+ ///////////////////
+ // Decoder state //
+ ///////////////////
+
+ // Range coder
+ lzma_range_decoder rc;
+
+ // Types of the most recently seen LZMA symbols
+ lzma_lzma_state state;
+
+ uint32_t rep0; ///< Distance of the latest match
+ uint32_t rep1; ///< Distance of second latest match
+ uint32_t rep2; ///< Distance of third latest match
+ uint32_t rep3; ///< Distance of fourth latest match
+
+ uint32_t pos_mask; // (1U << pb) - 1
+ uint32_t literal_context_bits;
+ uint32_t literal_pos_mask;
+
+ /// Uncompressed size as bytes, or LZMA_VLI_UNKNOWN if end of
+ /// payload marker is expected.
+ lzma_vli uncompressed_size;
+
+ /// True if end of payload marker (EOPM) is allowed even when
+ /// uncompressed_size is known; false if EOPM must not be present.
+ /// This is ignored if uncompressed_size == LZMA_VLI_UNKNOWN.
+ bool allow_eopm;
+
+ ////////////////////////////////
+ // State of incomplete symbol //
+ ////////////////////////////////
+
+ /// Position where to continue the decoder loop
+ enum {
+ SEQ_NORMALIZE,
+ SEQ_IS_MATCH,
+ seq_8(SEQ_LITERAL),
+ seq_8(SEQ_LITERAL_MATCHED),
+ SEQ_LITERAL_WRITE,
+ SEQ_IS_REP,
+ seq_len(SEQ_MATCH_LEN),
+ seq_6(SEQ_DIST_SLOT),
+ SEQ_DIST_MODEL,
+ SEQ_DIRECT,
+ seq_4(SEQ_ALIGN),
+ SEQ_EOPM,
+ SEQ_IS_REP0,
+ SEQ_SHORTREP,
+ SEQ_IS_REP0_LONG,
+ SEQ_IS_REP1,
+ SEQ_IS_REP2,
+ seq_len(SEQ_REP_LEN),
+ SEQ_COPY,
+ } sequence;
+
+ /// Base of the current probability tree
+ probability *probs;
+
+ /// Symbol being decoded. This is also used as an index variable in
+ /// bittree decoders: probs[symbol]
+ uint32_t symbol;
+
+ /// Used as a loop termination condition on bittree decoders and
+ /// direct bits decoder.
+ uint32_t limit;
+
+ /// Matched literal decoder: 0x100 or 0 to help avoiding branches.
+ /// Bittree reverse decoders: Offset of the next bit: 1 << offset
+ uint32_t offset;
+
+ /// If decoding a literal: match byte.
+ /// If decoding a match: length of the match.
+ uint32_t len;
+} lzma_lzma1_decoder;
+
+
+static lzma_ret
+lzma_decode(void *coder_ptr, lzma_dict *restrict dictptr,
+ const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size)
+{
+ lzma_lzma1_decoder *restrict coder = coder_ptr;
+
+ ////////////////////
+ // Initialization //
+ ////////////////////
+
+ {
+ const lzma_ret ret = rc_read_init(
+ &coder->rc, in, in_pos, in_size);
+ if (ret != LZMA_STREAM_END)
+ return ret;
+ }
+
+ ///////////////
+ // Variables //
+ ///////////////
+
+ // Making local copies of often-used variables improves both
+ // speed and readability.
+
+ lzma_dict dict = *dictptr;
+
+ const size_t dict_start = dict.pos;
+
+ // Range decoder
+ rc_to_local(coder->rc, *in_pos);
+
+ // State
+ uint32_t state = coder->state;
+ uint32_t rep0 = coder->rep0;
+ uint32_t rep1 = coder->rep1;
+ uint32_t rep2 = coder->rep2;
+ uint32_t rep3 = coder->rep3;
+
+ const uint32_t pos_mask = coder->pos_mask;
+
+ // These variables are actually needed only if we last time ran
+ // out of input in the middle of the decoder loop.
+ probability *probs = coder->probs;
+ uint32_t symbol = coder->symbol;
+ uint32_t limit = coder->limit;
+ uint32_t offset = coder->offset;
+ uint32_t len = coder->len;
+
+ const uint32_t literal_pos_mask = coder->literal_pos_mask;
+ const uint32_t literal_context_bits = coder->literal_context_bits;
+
+ // Temporary variables
+ uint32_t pos_state = dict.pos & pos_mask;
+
+ lzma_ret ret = LZMA_OK;
+
+ // This is true when the next LZMA symbol is allowed to be EOPM.
+ // That is, if this is false, then EOPM is considered
+ // an invalid symbol and we will return LZMA_DATA_ERROR.
+ //
+ // EOPM is always required (not just allowed) when
+ // the uncompressed size isn't known. When uncompressed size
+ // is known, eopm_is_valid may be set to true later.
+ bool eopm_is_valid = coder->uncompressed_size == LZMA_VLI_UNKNOWN;
+
+ // If uncompressed size is known and there is enough output space
+ // to decode all the data, limit the available buffer space so that
+ // the main loop won't try to decode past the end of the stream.
+ bool might_finish_without_eopm = false;
+ if (coder->uncompressed_size != LZMA_VLI_UNKNOWN
+ && coder->uncompressed_size <= dict.limit - dict.pos) {
+ dict.limit = dict.pos + (size_t)(coder->uncompressed_size);
+ might_finish_without_eopm = true;
+ }
+
+ // The main decoder loop. The "switch" is used to restart the decoder at
+ // correct location. Once restarted, the "switch" is no longer used.
+ switch (coder->sequence)
+ while (true) {
+ // Calculate new pos_state. This is skipped on the first loop
+ // since we already calculated it when setting up the local
+ // variables.
+ pos_state = dict.pos & pos_mask;
+
+ case SEQ_NORMALIZE:
+ case SEQ_IS_MATCH:
+ if (unlikely(might_finish_without_eopm
+ && dict.pos == dict.limit)) {
+ // In rare cases there is a useless byte that needs
+ // to be read anyway.
+ rc_normalize(SEQ_NORMALIZE);
+
+ // If the range decoder state is such that we can
+ // be at the end of the LZMA stream, then the
+ // decoding is finished.
+ if (rc_is_finished(rc)) {
+ ret = LZMA_STREAM_END;
+ goto out;
+ }
+
+ // If the caller hasn't allowed EOPM to be present
+ // together with known uncompressed size, then the
+ // LZMA stream is corrupt.
+ if (!coder->allow_eopm) {
+ ret = LZMA_DATA_ERROR;
+ goto out;
+ }
+
+ // Otherwise continue decoding with the expectation
+ // that the next LZMA symbol is EOPM.
+ eopm_is_valid = true;
+ }
+
+ rc_if_0(coder->is_match[state][pos_state], SEQ_IS_MATCH) {
+ rc_update_0(coder->is_match[state][pos_state]);
+
+ // It's a literal i.e. a single 8-bit byte.
+
+ probs = literal_subcoder(coder->literal,
+ literal_context_bits, literal_pos_mask,
+ dict.pos, dict_get(&dict, 0));
+ symbol = 1;
+
+ if (is_literal_state(state)) {
+ // Decode literal without match byte.
+#ifdef HAVE_SMALL
+ case SEQ_LITERAL:
+ do {
+ rc_bit(probs[symbol], , , SEQ_LITERAL);
+ } while (symbol < (1 << 8));
+#else
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL0);
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL1);
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL2);
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL3);
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL4);
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL5);
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL6);
+ rc_bit_case(probs[symbol], , , SEQ_LITERAL7);
+#endif
+ } else {
+ // Decode literal with match byte.
+ //
+ // We store the byte we compare against
+ // ("match byte") to "len" to minimize the
+ // number of variables we need to store
+ // between decoder calls.
+ len = (uint32_t)(dict_get(&dict, rep0)) << 1;
+
+ // The usage of "offset" allows omitting some
+ // branches, which should give tiny speed
+ // improvement on some CPUs. "offset" gets
+ // set to zero if match_bit didn't match.
+ offset = 0x100;
+
+#ifdef HAVE_SMALL
+ case SEQ_LITERAL_MATCHED:
+ do {
+ const uint32_t match_bit
+ = len & offset;
+ const uint32_t subcoder_index
+ = offset + match_bit
+ + symbol;
+
+ rc_bit(probs[subcoder_index],
+ offset &= ~match_bit,
+ offset &= match_bit,
+ SEQ_LITERAL_MATCHED);
+
+ // It seems to be faster to do this
+ // here instead of putting it to the
+ // beginning of the loop and then
+ // putting the "case" in the middle
+ // of the loop.
+ len <<= 1;
+
+ } while (symbol < (1 << 8));
+#else
+ // Unroll the loop.
+ uint32_t match_bit;
+ uint32_t subcoder_index;
+
+# define d(seq) \
+ case seq: \
+ match_bit = len & offset; \
+ subcoder_index = offset + match_bit + symbol; \
+ rc_bit(probs[subcoder_index], \
+ offset &= ~match_bit, \
+ offset &= match_bit, \
+ seq)
+
+ d(SEQ_LITERAL_MATCHED0);
+ len <<= 1;
+ d(SEQ_LITERAL_MATCHED1);
+ len <<= 1;
+ d(SEQ_LITERAL_MATCHED2);
+ len <<= 1;
+ d(SEQ_LITERAL_MATCHED3);
+ len <<= 1;
+ d(SEQ_LITERAL_MATCHED4);
+ len <<= 1;
+ d(SEQ_LITERAL_MATCHED5);
+ len <<= 1;
+ d(SEQ_LITERAL_MATCHED6);
+ len <<= 1;
+ d(SEQ_LITERAL_MATCHED7);
+# undef d
+#endif
+ }
+
+ //update_literal(state);
+ // Use a lookup table to update to literal state,
+ // since compared to other state updates, this would
+ // need two branches.
+ static const lzma_lzma_state next_state[] = {
+ STATE_LIT_LIT,
+ STATE_LIT_LIT,
+ STATE_LIT_LIT,
+ STATE_LIT_LIT,
+ STATE_MATCH_LIT_LIT,
+ STATE_REP_LIT_LIT,
+ STATE_SHORTREP_LIT_LIT,
+ STATE_MATCH_LIT,
+ STATE_REP_LIT,
+ STATE_SHORTREP_LIT,
+ STATE_MATCH_LIT,
+ STATE_REP_LIT
+ };
+ state = next_state[state];
+
+ case SEQ_LITERAL_WRITE:
+ if (unlikely(dict_put(&dict, symbol))) {
+ coder->sequence = SEQ_LITERAL_WRITE;
+ goto out;
+ }
+
+ continue;
+ }
+
+ // Instead of a new byte we are going to get a byte range
+ // (distance and length) which will be repeated from our
+ // output history.
+
+ rc_update_1(coder->is_match[state][pos_state]);
+
+ case SEQ_IS_REP:
+ rc_if_0(coder->is_rep[state], SEQ_IS_REP) {
+ // Not a repeated match
+ rc_update_0(coder->is_rep[state]);
+ update_match(state);
+
+ // The latest three match distances are kept in
+ // memory in case there are repeated matches.
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+
+ // Decode the length of the match.
+ len_decode(len, coder->match_len_decoder,
+ pos_state, SEQ_MATCH_LEN);
+
+ // Prepare to decode the highest two bits of the
+ // match distance.
+ probs = coder->dist_slot[get_dist_state(len)];
+ symbol = 1;
+
+#ifdef HAVE_SMALL
+ case SEQ_DIST_SLOT:
+ do {
+ rc_bit(probs[symbol], , , SEQ_DIST_SLOT);
+ } while (symbol < DIST_SLOTS);
+#else
+ rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT0);
+ rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT1);
+ rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT2);
+ rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT3);
+ rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT4);
+ rc_bit_case(probs[symbol], , , SEQ_DIST_SLOT5);
+#endif
+ // Get rid of the highest bit that was needed for
+ // indexing of the probability array.
+ symbol -= DIST_SLOTS;
+ assert(symbol <= 63);
+
+ if (symbol < DIST_MODEL_START) {
+ // Match distances [0, 3] have only two bits.
+ rep0 = symbol;
+ } else {
+ // Decode the lowest [1, 29] bits of
+ // the match distance.
+ limit = (symbol >> 1) - 1;
+ assert(limit >= 1 && limit <= 30);
+ rep0 = 2 + (symbol & 1);
+
+ if (symbol < DIST_MODEL_END) {
+ // Prepare to decode the low bits for
+ // a distance of [4, 127].
+ assert(limit <= 5);
+ rep0 <<= limit;
+ assert(rep0 <= 96);
+ // -1 is fine, because we start
+ // decoding at probs[1], not probs[0].
+ // NOTE: This violates the C standard,
+ // since we are doing pointer
+ // arithmetic past the beginning of
+ // the array.
+ assert((int32_t)(rep0 - symbol - 1)
+ >= -1);
+ assert((int32_t)(rep0 - symbol - 1)
+ <= 82);
+ probs = coder->pos_special + rep0
+ - symbol - 1;
+ symbol = 1;
+ offset = 0;
+ case SEQ_DIST_MODEL:
+#ifdef HAVE_SMALL
+ do {
+ rc_bit(probs[symbol], ,
+ rep0 += 1U << offset,
+ SEQ_DIST_MODEL);
+ } while (++offset < limit);
+#else
+ switch (limit) {
+ case 5:
+ assert(offset == 0);
+ rc_bit(probs[symbol], ,
+ rep0 += 1U,
+ SEQ_DIST_MODEL);
+ ++offset;
+ --limit;
+ case 4:
+ rc_bit(probs[symbol], ,
+ rep0 += 1U << offset,
+ SEQ_DIST_MODEL);
+ ++offset;
+ --limit;
+ case 3:
+ rc_bit(probs[symbol], ,
+ rep0 += 1U << offset,
+ SEQ_DIST_MODEL);
+ ++offset;
+ --limit;
+ case 2:
+ rc_bit(probs[symbol], ,
+ rep0 += 1U << offset,
+ SEQ_DIST_MODEL);
+ ++offset;
+ --limit;
+ case 1:
+ // We need "symbol" only for
+ // indexing the probability
+ // array, thus we can use
+ // rc_bit_last() here to omit
+ // the unneeded updating of
+ // "symbol".
+ rc_bit_last(probs[symbol], ,
+ rep0 += 1U << offset,
+ SEQ_DIST_MODEL);
+ }
+#endif
+ } else {
+ // The distance is >= 128. Decode the
+ // lower bits without probabilities
+ // except the lowest four bits.
+ assert(symbol >= 14);
+ assert(limit >= 6);
+ limit -= ALIGN_BITS;
+ assert(limit >= 2);
+ case SEQ_DIRECT:
+ // Not worth manual unrolling
+ do {
+ rc_direct(rep0, SEQ_DIRECT);
+ } while (--limit > 0);
+
+ // Decode the lowest four bits using
+ // probabilities.
+ rep0 <<= ALIGN_BITS;
+ symbol = 1;
+#ifdef HAVE_SMALL
+ offset = 0;
+ case SEQ_ALIGN:
+ do {
+ rc_bit(coder->pos_align[
+ symbol], ,
+ rep0 += 1U << offset,
+ SEQ_ALIGN);
+ } while (++offset < ALIGN_BITS);
+#else
+ case SEQ_ALIGN0:
+ rc_bit(coder->pos_align[symbol], ,
+ rep0 += 1, SEQ_ALIGN0);
+ case SEQ_ALIGN1:
+ rc_bit(coder->pos_align[symbol], ,
+ rep0 += 2, SEQ_ALIGN1);
+ case SEQ_ALIGN2:
+ rc_bit(coder->pos_align[symbol], ,
+ rep0 += 4, SEQ_ALIGN2);
+ case SEQ_ALIGN3:
+ // Like in SEQ_DIST_MODEL, we don't
+ // need "symbol" for anything else
+ // than indexing the probability array.
+ rc_bit_last(coder->pos_align[symbol], ,
+ rep0 += 8, SEQ_ALIGN3);
+#endif
+
+ if (rep0 == UINT32_MAX) {
+ // End of payload marker was
+ // found. It may only be
+ // present if
+ // - uncompressed size is
+ // unknown or
+ // - after known uncompressed
+ // size amount of bytes has
+ // been decompressed and
+ // caller has indicated
+ // that EOPM might be used
+ // (it's not allowed in
+ // LZMA2).
+ if (!eopm_is_valid) {
+ ret = LZMA_DATA_ERROR;
+ goto out;
+ }
+
+ case SEQ_EOPM:
+ // LZMA1 stream with
+ // end-of-payload marker.
+ rc_normalize(SEQ_EOPM);
+ ret = rc_is_finished(rc)
+ ? LZMA_STREAM_END
+ : LZMA_DATA_ERROR;
+ goto out;
+ }
+ }
+ }
+
+ // Validate the distance we just decoded.
+ if (unlikely(!dict_is_distance_valid(&dict, rep0))) {
+ ret = LZMA_DATA_ERROR;
+ goto out;
+ }
+
+ } else {
+ rc_update_1(coder->is_rep[state]);
+
+ // Repeated match
+ //
+ // The match distance is a value that we have had
+ // earlier. The latest four match distances are
+ // available as rep0, rep1, rep2 and rep3. We will
+ // now decode which of them is the new distance.
+ //
+ // There cannot be a match if we haven't produced
+ // any output, so check that first.
+ if (unlikely(!dict_is_distance_valid(&dict, 0))) {
+ ret = LZMA_DATA_ERROR;
+ goto out;
+ }
+
+ case SEQ_IS_REP0:
+ rc_if_0(coder->is_rep0[state], SEQ_IS_REP0) {
+ rc_update_0(coder->is_rep0[state]);
+ // The distance is rep0.
+
+ case SEQ_IS_REP0_LONG:
+ rc_if_0(coder->is_rep0_long[state][pos_state],
+ SEQ_IS_REP0_LONG) {
+ rc_update_0(coder->is_rep0_long[
+ state][pos_state]);
+
+ update_short_rep(state);
+
+ case SEQ_SHORTREP:
+ if (unlikely(dict_put(&dict, dict_get(
+ &dict, rep0)))) {
+ coder->sequence = SEQ_SHORTREP;
+ goto out;
+ }
+
+ continue;
+ }
+
+ // Repeating more than one byte at
+ // distance of rep0.
+ rc_update_1(coder->is_rep0_long[
+ state][pos_state]);
+
+ } else {
+ rc_update_1(coder->is_rep0[state]);
+
+ case SEQ_IS_REP1:
+ // The distance is rep1, rep2 or rep3. Once
+ // we find out which one of these three, it
+ // is stored to rep0 and rep1, rep2 and rep3
+ // are updated accordingly.
+ rc_if_0(coder->is_rep1[state], SEQ_IS_REP1) {
+ rc_update_0(coder->is_rep1[state]);
+
+ const uint32_t distance = rep1;
+ rep1 = rep0;
+ rep0 = distance;
+
+ } else {
+ rc_update_1(coder->is_rep1[state]);
+ case SEQ_IS_REP2:
+ rc_if_0(coder->is_rep2[state],
+ SEQ_IS_REP2) {
+ rc_update_0(coder->is_rep2[
+ state]);
+
+ const uint32_t distance = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ rep0 = distance;
+
+ } else {
+ rc_update_1(coder->is_rep2[
+ state]);
+
+ const uint32_t distance = rep3;
+ rep3 = rep2;
+ rep2 = rep1;
+ rep1 = rep0;
+ rep0 = distance;
+ }
+ }
+ }
+
+ update_long_rep(state);
+
+ // Decode the length of the repeated match.
+ len_decode(len, coder->rep_len_decoder,
+ pos_state, SEQ_REP_LEN);
+ }
+
+ /////////////////////////////////
+ // Repeat from history buffer. //
+ /////////////////////////////////
+
+ // The length is always between these limits. There is no way
+ // to trigger the algorithm to set len outside this range.
+ assert(len >= MATCH_LEN_MIN);
+ assert(len <= MATCH_LEN_MAX);
+
+ case SEQ_COPY:
+ // Repeat len bytes from distance of rep0.
+ if (unlikely(dict_repeat(&dict, rep0, &len))) {
+ coder->sequence = SEQ_COPY;
+ goto out;
+ }
+ }
+
+out:
+ // Save state
+
+ // NOTE: Must not copy dict.limit.
+ dictptr->pos = dict.pos;
+ dictptr->full = dict.full;
+
+ rc_from_local(coder->rc, *in_pos);
+
+ coder->state = state;
+ coder->rep0 = rep0;
+ coder->rep1 = rep1;
+ coder->rep2 = rep2;
+ coder->rep3 = rep3;
+
+ coder->probs = probs;
+ coder->symbol = symbol;
+ coder->limit = limit;
+ coder->offset = offset;
+ coder->len = len;
+
+ // Update the remaining amount of uncompressed data if uncompressed
+ // size was known.
+ if (coder->uncompressed_size != LZMA_VLI_UNKNOWN) {
+ coder->uncompressed_size -= dict.pos - dict_start;
+
+ // If we have gotten all the output but the decoder wants
+ // to write more output, the file is corrupt. There are
+ // three SEQ values where output is produced.
+ if (coder->uncompressed_size == 0 && ret == LZMA_OK
+ && (coder->sequence == SEQ_LITERAL_WRITE
+ || coder->sequence == SEQ_SHORTREP
+ || coder->sequence == SEQ_COPY))
+ ret = LZMA_DATA_ERROR;
+ }
+
+ if (ret == LZMA_STREAM_END) {
+ // Reset the range decoder so that it is ready to reinitialize
+ // for a new LZMA2 chunk.
+ rc_reset(coder->rc);
+ coder->sequence = SEQ_IS_MATCH;
+ }
+
+ return ret;
+}
+
+
+
+static void
+lzma_decoder_uncompressed(void *coder_ptr, lzma_vli uncompressed_size,
+ bool allow_eopm)
+{
+ lzma_lzma1_decoder *coder = coder_ptr;
+ coder->uncompressed_size = uncompressed_size;
+ coder->allow_eopm = allow_eopm;
+}
+
+
+static void
+lzma_decoder_reset(void *coder_ptr, const void *opt)
+{
+ lzma_lzma1_decoder *coder = coder_ptr;
+ const lzma_options_lzma *options = opt;
+
+ // NOTE: We assume that lc/lp/pb are valid since they were
+ // successfully decoded with lzma_lzma_decode_properties().
+
+ // Calculate pos_mask. We don't need pos_bits as is for anything.
+ coder->pos_mask = (1U << options->pb) - 1;
+
+ // Initialize the literal decoder.
+ literal_init(coder->literal, options->lc, options->lp);
+
+ coder->literal_context_bits = options->lc;
+ coder->literal_pos_mask = (1U << options->lp) - 1;
+
+ // State
+ coder->state = STATE_LIT_LIT;
+ coder->rep0 = 0;
+ coder->rep1 = 0;
+ coder->rep2 = 0;
+ coder->rep3 = 0;
+ coder->pos_mask = (1U << options->pb) - 1;
+
+ // Range decoder
+ rc_reset(coder->rc);
+
+ // Bit and bittree decoders
+ for (uint32_t i = 0; i < STATES; ++i) {
+ for (uint32_t j = 0; j <= coder->pos_mask; ++j) {
+ bit_reset(coder->is_match[i][j]);
+ bit_reset(coder->is_rep0_long[i][j]);
+ }
+
+ bit_reset(coder->is_rep[i]);
+ bit_reset(coder->is_rep0[i]);
+ bit_reset(coder->is_rep1[i]);
+ bit_reset(coder->is_rep2[i]);
+ }
+
+ for (uint32_t i = 0; i < DIST_STATES; ++i)
+ bittree_reset(coder->dist_slot[i], DIST_SLOT_BITS);
+
+ for (uint32_t i = 0; i < FULL_DISTANCES - DIST_MODEL_END; ++i)
+ bit_reset(coder->pos_special[i]);
+
+ bittree_reset(coder->pos_align, ALIGN_BITS);
+
+ // Len decoders (also bit/bittree)
+ const uint32_t num_pos_states = 1U << options->pb;
+ bit_reset(coder->match_len_decoder.choice);
+ bit_reset(coder->match_len_decoder.choice2);
+ bit_reset(coder->rep_len_decoder.choice);
+ bit_reset(coder->rep_len_decoder.choice2);
+
+ for (uint32_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
+ bittree_reset(coder->match_len_decoder.low[pos_state],
+ LEN_LOW_BITS);
+ bittree_reset(coder->match_len_decoder.mid[pos_state],
+ LEN_MID_BITS);
+
+ bittree_reset(coder->rep_len_decoder.low[pos_state],
+ LEN_LOW_BITS);
+ bittree_reset(coder->rep_len_decoder.mid[pos_state],
+ LEN_MID_BITS);
+ }
+
+ bittree_reset(coder->match_len_decoder.high, LEN_HIGH_BITS);
+ bittree_reset(coder->rep_len_decoder.high, LEN_HIGH_BITS);
+
+ coder->sequence = SEQ_IS_MATCH;
+ coder->probs = NULL;
+ coder->symbol = 0;
+ coder->limit = 0;
+ coder->offset = 0;
+ coder->len = 0;
+
+ return;
+}
+
+
+extern lzma_ret
+lzma_lzma_decoder_create(lzma_lz_decoder *lz, const lzma_allocator *allocator,
+ const lzma_options_lzma *options, lzma_lz_options *lz_options)
+{
+ if (lz->coder == NULL) {
+ lz->coder = lzma_alloc(sizeof(lzma_lzma1_decoder), allocator);
+ if (lz->coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ lz->code = &lzma_decode;
+ lz->reset = &lzma_decoder_reset;
+ lz->set_uncompressed = &lzma_decoder_uncompressed;
+ }
+
+ // All dictionary sizes are OK here. LZ decoder will take care of
+ // the special cases.
+ lz_options->dict_size = options->dict_size;
+ lz_options->preset_dict = options->preset_dict;
+ lz_options->preset_dict_size = options->preset_dict_size;
+
+ return LZMA_OK;
+}
+
+
+/// Allocate and initialize LZMA decoder. This is used only via LZ
+/// initialization (lzma_lzma_decoder_init() passes function pointer to
+/// the LZ initialization).
+static lzma_ret
+lzma_decoder_init(lzma_lz_decoder *lz, const lzma_allocator *allocator,
+ lzma_vli id, const void *options, lzma_lz_options *lz_options)
+{
+ if (!is_lclppb_valid(options))
+ return LZMA_PROG_ERROR;
+
+ lzma_vli uncomp_size = LZMA_VLI_UNKNOWN;
+ bool allow_eopm = true;
+
+ if (id == LZMA_FILTER_LZMA1EXT) {
+ const lzma_options_lzma *opt = options;
+
+ // Only one flag is supported.
+ if (opt->ext_flags & ~LZMA_LZMA1EXT_ALLOW_EOPM)
+ return LZMA_OPTIONS_ERROR;
+
+ // FIXME? Using lzma_vli instead of uint64_t is weird because
+ // this has nothing to do with .xz headers and variable-length
+ // integer encoding. On the other hand, using LZMA_VLI_UNKNOWN
+ // instead of UINT64_MAX is clearer when unknown size is
+ // meant. A problem with using lzma_vli is that now we
+ // allow > LZMA_VLI_MAX which is fine in this file but
+ // it's still confusing. Note that alone_decoder.c also
+ // allows > LZMA_VLI_MAX when setting uncompressed size.
+ uncomp_size = opt->ext_size_low
+ + ((uint64_t)(opt->ext_size_high) << 32);
+ allow_eopm = (opt->ext_flags & LZMA_LZMA1EXT_ALLOW_EOPM) != 0
+ || uncomp_size == LZMA_VLI_UNKNOWN;
+ }
+
+ return_if_error(lzma_lzma_decoder_create(
+ lz, allocator, options, lz_options));
+
+ lzma_decoder_reset(lz->coder, options);
+ lzma_decoder_uncompressed(lz->coder, uncomp_size, allow_eopm);
+
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_lzma_decoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ // LZMA can only be the last filter in the chain. This is enforced
+ // by the raw_decoder initialization.
+ assert(filters[1].init == NULL);
+
+ return lzma_lz_decoder_init(next, allocator, filters,
+ &lzma_decoder_init);
+}
+
+
+extern 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;
+}
+
+
+extern uint64_t
+lzma_lzma_decoder_memusage_nocheck(const void *options)
+{
+ const lzma_options_lzma *const opt = options;
+ return sizeof(lzma_lzma1_decoder)
+ + lzma_lz_decoder_memusage(opt->dict_size);
+}
+
+
+extern uint64_t
+lzma_lzma_decoder_memusage(const void *options)
+{
+ if (!is_lclppb_valid(options))
+ return UINT64_MAX;
+
+ return lzma_lzma_decoder_memusage_nocheck(options);
+}
+
+
+extern lzma_ret
+lzma_lzma_props_decode(void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size)
+{
+ if (props_size != 5)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_options_lzma *opt
+ = lzma_alloc(sizeof(lzma_options_lzma), allocator);
+ if (opt == NULL)
+ return LZMA_MEM_ERROR;
+
+ if (lzma_lzma_lclppb_decode(opt, props[0]))
+ goto error;
+
+ // All dictionary sizes are accepted, including zero. LZ decoder
+ // will automatically use a dictionary at least a few KiB even if
+ // a smaller dictionary is requested.
+ opt->dict_size = read32le(props + 1);
+
+ opt->preset_dict = NULL;
+ opt->preset_dict_size = 0;
+
+ *options = opt;
+
+ return LZMA_OK;
+
+error:
+ lzma_free(opt, allocator);
+ return LZMA_OPTIONS_ERROR;
+}
diff --git a/src/liblzma/lzma/lzma_decoder.h b/src/liblzma/lzma/lzma_decoder.h
new file mode 100644
index 0000000..1427bc2
--- /dev/null
+++ b/src/liblzma/lzma/lzma_decoder.h
@@ -0,0 +1,53 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_decoder.h
+/// \brief LZMA decoder API
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_DECODER_H
+#define LZMA_LZMA_DECODER_H
+
+#include "common.h"
+
+
+/// Allocates and initializes LZMA decoder
+extern lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern uint64_t lzma_lzma_decoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma_props_decode(
+ void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size);
+
+
+/// \brief Decodes the LZMA Properties byte (lc/lp/pb)
+///
+/// \return true if error occurred, false on success
+///
+extern bool lzma_lzma_lclppb_decode(
+ lzma_options_lzma *options, uint8_t byte);
+
+
+#ifdef LZMA_LZ_DECODER_H
+/// Allocate and setup function pointers only. This is used by LZMA1 and
+/// LZMA2 decoders.
+extern lzma_ret lzma_lzma_decoder_create(
+ lzma_lz_decoder *lz, const lzma_allocator *allocator,
+ const lzma_options_lzma *opt, lzma_lz_options *lz_options);
+
+/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
+/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
+extern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options);
+
+#endif
+
+#endif
diff --git a/src/liblzma/lzma/lzma_encoder.c b/src/liblzma/lzma/lzma_encoder.c
new file mode 100644
index 0000000..559c63e
--- /dev/null
+++ b/src/liblzma/lzma/lzma_encoder.c
@@ -0,0 +1,784 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_encoder.c
+/// \brief LZMA encoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma2_encoder.h"
+#include "lzma_encoder_private.h"
+#include "fastpos.h"
+
+
+/////////////
+// Literal //
+/////////////
+
+static inline void
+literal_matched(lzma_range_encoder *rc, probability *subcoder,
+ uint32_t match_byte, uint32_t symbol)
+{
+ uint32_t offset = 0x100;
+ symbol += UINT32_C(1) << 8;
+
+ do {
+ match_byte <<= 1;
+ const uint32_t match_bit = match_byte & offset;
+ const uint32_t subcoder_index
+ = offset + match_bit + (symbol >> 8);
+ const uint32_t bit = (symbol >> 7) & 1;
+ rc_bit(rc, &subcoder[subcoder_index], bit);
+
+ symbol <<= 1;
+ offset &= ~(match_byte ^ symbol);
+
+ } while (symbol < (UINT32_C(1) << 16));
+}
+
+
+static inline void
+literal(lzma_lzma1_encoder *coder, lzma_mf *mf, uint32_t position)
+{
+ // Locate the literal byte to be encoded and the subcoder.
+ const uint8_t cur_byte = mf->buffer[
+ mf->read_pos - mf->read_ahead];
+ probability *subcoder = literal_subcoder(coder->literal,
+ coder->literal_context_bits, coder->literal_pos_mask,
+ position, mf->buffer[mf->read_pos - mf->read_ahead - 1]);
+
+ if (is_literal_state(coder->state)) {
+ // Previous LZMA-symbol was a literal. Encode a normal
+ // literal without a match byte.
+ rc_bittree(&coder->rc, subcoder, 8, cur_byte);
+ } else {
+ // Previous LZMA-symbol was a match. Use the last byte of
+ // the match as a "match byte". That is, compare the bits
+ // of the current literal and the match byte.
+ const uint8_t match_byte = mf->buffer[
+ mf->read_pos - coder->reps[0] - 1
+ - mf->read_ahead];
+ literal_matched(&coder->rc, subcoder, match_byte, cur_byte);
+ }
+
+ update_literal(coder->state);
+}
+
+
+//////////////////
+// Match length //
+//////////////////
+
+static void
+length_update_prices(lzma_length_encoder *lc, const uint32_t pos_state)
+{
+ const uint32_t table_size = lc->table_size;
+ lc->counters[pos_state] = table_size;
+
+ const uint32_t a0 = rc_bit_0_price(lc->choice);
+ const uint32_t a1 = rc_bit_1_price(lc->choice);
+ const uint32_t b0 = a1 + rc_bit_0_price(lc->choice2);
+ const uint32_t b1 = a1 + rc_bit_1_price(lc->choice2);
+ uint32_t *const prices = lc->prices[pos_state];
+
+ uint32_t i;
+ for (i = 0; i < table_size && i < LEN_LOW_SYMBOLS; ++i)
+ prices[i] = a0 + rc_bittree_price(lc->low[pos_state],
+ LEN_LOW_BITS, i);
+
+ for (; i < table_size && i < LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; ++i)
+ prices[i] = b0 + rc_bittree_price(lc->mid[pos_state],
+ LEN_MID_BITS, i - LEN_LOW_SYMBOLS);
+
+ for (; i < table_size; ++i)
+ prices[i] = b1 + rc_bittree_price(lc->high, LEN_HIGH_BITS,
+ i - LEN_LOW_SYMBOLS - LEN_MID_SYMBOLS);
+
+ return;
+}
+
+
+static inline void
+length(lzma_range_encoder *rc, lzma_length_encoder *lc,
+ const uint32_t pos_state, uint32_t len, const bool fast_mode)
+{
+ assert(len <= MATCH_LEN_MAX);
+ len -= MATCH_LEN_MIN;
+
+ if (len < LEN_LOW_SYMBOLS) {
+ rc_bit(rc, &lc->choice, 0);
+ rc_bittree(rc, lc->low[pos_state], LEN_LOW_BITS, len);
+ } else {
+ rc_bit(rc, &lc->choice, 1);
+ len -= LEN_LOW_SYMBOLS;
+
+ if (len < LEN_MID_SYMBOLS) {
+ rc_bit(rc, &lc->choice2, 0);
+ rc_bittree(rc, lc->mid[pos_state], LEN_MID_BITS, len);
+ } else {
+ rc_bit(rc, &lc->choice2, 1);
+ len -= LEN_MID_SYMBOLS;
+ rc_bittree(rc, lc->high, LEN_HIGH_BITS, len);
+ }
+ }
+
+ // Only getoptimum uses the prices so don't update the table when
+ // in fast mode.
+ if (!fast_mode)
+ if (--lc->counters[pos_state] == 0)
+ length_update_prices(lc, pos_state);
+}
+
+
+///////////
+// Match //
+///////////
+
+static inline void
+match(lzma_lzma1_encoder *coder, const uint32_t pos_state,
+ const uint32_t distance, const uint32_t len)
+{
+ update_match(coder->state);
+
+ length(&coder->rc, &coder->match_len_encoder, pos_state, len,
+ coder->fast_mode);
+
+ const uint32_t dist_slot = get_dist_slot(distance);
+ const uint32_t dist_state = get_dist_state(len);
+ rc_bittree(&coder->rc, coder->dist_slot[dist_state],
+ DIST_SLOT_BITS, dist_slot);
+
+ if (dist_slot >= DIST_MODEL_START) {
+ const uint32_t footer_bits = (dist_slot >> 1) - 1;
+ const uint32_t base = (2 | (dist_slot & 1)) << footer_bits;
+ const uint32_t dist_reduced = distance - base;
+
+ if (dist_slot < DIST_MODEL_END) {
+ // Careful here: base - dist_slot - 1 can be -1, but
+ // rc_bittree_reverse starts at probs[1], not probs[0].
+ rc_bittree_reverse(&coder->rc,
+ coder->dist_special + base - dist_slot - 1,
+ footer_bits, dist_reduced);
+ } else {
+ rc_direct(&coder->rc, dist_reduced >> ALIGN_BITS,
+ footer_bits - ALIGN_BITS);
+ rc_bittree_reverse(
+ &coder->rc, coder->dist_align,
+ ALIGN_BITS, dist_reduced & ALIGN_MASK);
+ ++coder->align_price_count;
+ }
+ }
+
+ coder->reps[3] = coder->reps[2];
+ coder->reps[2] = coder->reps[1];
+ coder->reps[1] = coder->reps[0];
+ coder->reps[0] = distance;
+ ++coder->match_price_count;
+}
+
+
+////////////////////
+// Repeated match //
+////////////////////
+
+static inline void
+rep_match(lzma_lzma1_encoder *coder, const uint32_t pos_state,
+ const uint32_t rep, const uint32_t len)
+{
+ if (rep == 0) {
+ rc_bit(&coder->rc, &coder->is_rep0[coder->state], 0);
+ rc_bit(&coder->rc,
+ &coder->is_rep0_long[coder->state][pos_state],
+ len != 1);
+ } else {
+ const uint32_t distance = coder->reps[rep];
+ rc_bit(&coder->rc, &coder->is_rep0[coder->state], 1);
+
+ if (rep == 1) {
+ rc_bit(&coder->rc, &coder->is_rep1[coder->state], 0);
+ } else {
+ rc_bit(&coder->rc, &coder->is_rep1[coder->state], 1);
+ rc_bit(&coder->rc, &coder->is_rep2[coder->state],
+ rep - 2);
+
+ if (rep == 3)
+ coder->reps[3] = coder->reps[2];
+
+ coder->reps[2] = coder->reps[1];
+ }
+
+ coder->reps[1] = coder->reps[0];
+ coder->reps[0] = distance;
+ }
+
+ if (len == 1) {
+ update_short_rep(coder->state);
+ } else {
+ length(&coder->rc, &coder->rep_len_encoder, pos_state, len,
+ coder->fast_mode);
+ update_long_rep(coder->state);
+ }
+}
+
+
+//////////
+// Main //
+//////////
+
+static void
+encode_symbol(lzma_lzma1_encoder *coder, lzma_mf *mf,
+ uint32_t back, uint32_t len, uint32_t position)
+{
+ const uint32_t pos_state = position & coder->pos_mask;
+
+ if (back == UINT32_MAX) {
+ // Literal i.e. eight-bit byte
+ assert(len == 1);
+ rc_bit(&coder->rc,
+ &coder->is_match[coder->state][pos_state], 0);
+ literal(coder, mf, position);
+ } else {
+ // Some type of match
+ rc_bit(&coder->rc,
+ &coder->is_match[coder->state][pos_state], 1);
+
+ if (back < REPS) {
+ // It's a repeated match i.e. the same distance
+ // has been used earlier.
+ rc_bit(&coder->rc, &coder->is_rep[coder->state], 1);
+ rep_match(coder, pos_state, back, len);
+ } else {
+ // Normal match
+ rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
+ match(coder, pos_state, back - REPS, len);
+ }
+ }
+
+ assert(mf->read_ahead >= len);
+ mf->read_ahead -= len;
+}
+
+
+static bool
+encode_init(lzma_lzma1_encoder *coder, lzma_mf *mf)
+{
+ assert(mf_position(mf) == 0);
+ assert(coder->uncomp_size == 0);
+
+ if (mf->read_pos == mf->read_limit) {
+ if (mf->action == LZMA_RUN)
+ return false; // We cannot do anything.
+
+ // We are finishing (we cannot get here when flushing).
+ assert(mf->write_pos == mf->read_pos);
+ assert(mf->action == LZMA_FINISH);
+ } else {
+ // Do the actual initialization. The first LZMA symbol must
+ // always be a literal.
+ mf_skip(mf, 1);
+ mf->read_ahead = 0;
+ rc_bit(&coder->rc, &coder->is_match[0][0], 0);
+ rc_bittree(&coder->rc, coder->literal[0], 8, mf->buffer[0]);
+ ++coder->uncomp_size;
+ }
+
+ // Initialization is done (except if empty file).
+ coder->is_initialized = true;
+
+ return true;
+}
+
+
+static void
+encode_eopm(lzma_lzma1_encoder *coder, uint32_t position)
+{
+ const uint32_t pos_state = position & coder->pos_mask;
+ rc_bit(&coder->rc, &coder->is_match[coder->state][pos_state], 1);
+ rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
+ match(coder, pos_state, UINT32_MAX, MATCH_LEN_MIN);
+}
+
+
+/// Number of bytes that a single encoding loop in lzma_lzma_encode() can
+/// consume from the dictionary. This limit comes from lzma_lzma_optimum()
+/// and may need to be updated if that function is significantly modified.
+#define LOOP_INPUT_MAX (OPTS + 1)
+
+
+extern lzma_ret
+lzma_lzma_encode(lzma_lzma1_encoder *restrict coder, lzma_mf *restrict mf,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size, uint32_t limit)
+{
+ // Initialize the stream if no data has been encoded yet.
+ if (!coder->is_initialized && !encode_init(coder, mf))
+ return LZMA_OK;
+
+ // Encode pending output bytes from the range encoder.
+ // At the start of the stream, encode_init() encodes one literal.
+ // Later there can be pending output only with LZMA1 because LZMA2
+ // ensures that there is always enough output space. Thus when using
+ // LZMA2, rc_encode() calls in this function will always return false.
+ if (rc_encode(&coder->rc, out, out_pos, out_size)) {
+ // We don't get here with LZMA2.
+ assert(limit == UINT32_MAX);
+ return LZMA_OK;
+ }
+
+ // If the range encoder was flushed in an earlier call to this
+ // function but there wasn't enough output buffer space, those
+ // bytes would have now been encoded by the above rc_encode() call
+ // and the stream has now been finished. This can only happen with
+ // LZMA1 as LZMA2 always provides enough output buffer space.
+ if (coder->is_flushed) {
+ assert(limit == UINT32_MAX);
+ return LZMA_STREAM_END;
+ }
+
+ while (true) {
+ // With LZMA2 we need to take care that compressed size of
+ // a chunk doesn't get too big.
+ // FIXME? Check if this could be improved.
+ if (limit != UINT32_MAX
+ && (mf->read_pos - mf->read_ahead >= limit
+ || *out_pos + rc_pending(&coder->rc)
+ >= LZMA2_CHUNK_MAX
+ - LOOP_INPUT_MAX))
+ break;
+
+ // Check that there is some input to process.
+ if (mf->read_pos >= mf->read_limit) {
+ if (mf->action == LZMA_RUN)
+ return LZMA_OK;
+
+ if (mf->read_ahead == 0)
+ break;
+ }
+
+ // Get optimal match (repeat position and length).
+ // Value ranges for pos:
+ // - [0, REPS): repeated match
+ // - [REPS, UINT32_MAX):
+ // match at (pos - REPS)
+ // - UINT32_MAX: not a match but a literal
+ // Value ranges for len:
+ // - [MATCH_LEN_MIN, MATCH_LEN_MAX]
+ uint32_t len;
+ uint32_t back;
+
+ if (coder->fast_mode)
+ lzma_lzma_optimum_fast(coder, mf, &back, &len);
+ else
+ lzma_lzma_optimum_normal(coder, mf, &back, &len,
+ (uint32_t)(coder->uncomp_size));
+
+ encode_symbol(coder, mf, back, len,
+ (uint32_t)(coder->uncomp_size));
+
+ // If output size limiting is active (out_limit != 0), check
+ // if encoding this LZMA symbol would make the output size
+ // exceed the specified limit.
+ if (coder->out_limit != 0 && rc_encode_dummy(
+ &coder->rc, coder->out_limit)) {
+ // The most recent LZMA symbol would make the output
+ // too big. Throw it away.
+ rc_forget(&coder->rc);
+
+ // FIXME: Tell the LZ layer to not read more input as
+ // it would be waste of time. This doesn't matter if
+ // output-size-limited encoding is done with a single
+ // call though.
+
+ break;
+ }
+
+ // This symbol will be encoded so update the uncompressed size.
+ coder->uncomp_size += len;
+
+ // Encode the LZMA symbol.
+ if (rc_encode(&coder->rc, out, out_pos, out_size)) {
+ // Once again, this can only happen with LZMA1.
+ assert(limit == UINT32_MAX);
+ return LZMA_OK;
+ }
+ }
+
+ // Make the uncompressed size available to the application.
+ if (coder->uncomp_size_ptr != NULL)
+ *coder->uncomp_size_ptr = coder->uncomp_size;
+
+ // LZMA2 doesn't use EOPM at LZMA level.
+ //
+ // Plain LZMA streams without EOPM aren't supported except when
+ // output size limiting is enabled.
+ if (coder->use_eopm)
+ encode_eopm(coder, (uint32_t)(coder->uncomp_size));
+
+ // Flush the remaining bytes from the range encoder.
+ rc_flush(&coder->rc);
+
+ // Copy the remaining bytes to the output buffer. If there
+ // isn't enough output space, we will copy out the remaining
+ // bytes on the next call to this function.
+ if (rc_encode(&coder->rc, out, out_pos, out_size)) {
+ // This cannot happen with LZMA2.
+ assert(limit == UINT32_MAX);
+
+ coder->is_flushed = true;
+ return LZMA_OK;
+ }
+
+ return LZMA_STREAM_END;
+}
+
+
+static lzma_ret
+lzma_encode(void *coder, lzma_mf *restrict mf,
+ uint8_t *restrict out, size_t *restrict out_pos,
+ size_t out_size)
+{
+ // Plain LZMA has no support for sync-flushing.
+ if (unlikely(mf->action == LZMA_SYNC_FLUSH))
+ return LZMA_OPTIONS_ERROR;
+
+ return lzma_lzma_encode(coder, mf, out, out_pos, out_size, UINT32_MAX);
+}
+
+
+static lzma_ret
+lzma_lzma_set_out_limit(
+ void *coder_ptr, uint64_t *uncomp_size, uint64_t out_limit)
+{
+ // Minimum output size is 5 bytes but that cannot hold any output
+ // so we use 6 bytes.
+ if (out_limit < 6)
+ return LZMA_BUF_ERROR;
+
+ lzma_lzma1_encoder *coder = coder_ptr;
+ coder->out_limit = out_limit;
+ coder->uncomp_size_ptr = uncomp_size;
+ coder->use_eopm = false;
+ return LZMA_OK;
+}
+
+
+////////////////////
+// Initialization //
+////////////////////
+
+static bool
+is_options_valid(const lzma_options_lzma *options)
+{
+ // Validate some of the options. LZ encoder validates nice_len too
+ // but we need a valid value here earlier.
+ return is_lclppb_valid(options)
+ && options->nice_len >= MATCH_LEN_MIN
+ && options->nice_len <= MATCH_LEN_MAX
+ && (options->mode == LZMA_MODE_FAST
+ || options->mode == LZMA_MODE_NORMAL);
+}
+
+
+static void
+set_lz_options(lzma_lz_options *lz_options, const lzma_options_lzma *options)
+{
+ // LZ encoder initialization does the validation for these so we
+ // don't need to validate here.
+ lz_options->before_size = OPTS;
+ lz_options->dict_size = options->dict_size;
+ lz_options->after_size = LOOP_INPUT_MAX;
+ lz_options->match_len_max = MATCH_LEN_MAX;
+ lz_options->nice_len = my_max(mf_get_hash_bytes(options->mf),
+ options->nice_len);
+ lz_options->match_finder = options->mf;
+ lz_options->depth = options->depth;
+ lz_options->preset_dict = options->preset_dict;
+ lz_options->preset_dict_size = options->preset_dict_size;
+ return;
+}
+
+
+static void
+length_encoder_reset(lzma_length_encoder *lencoder,
+ const uint32_t num_pos_states, const bool fast_mode)
+{
+ bit_reset(lencoder->choice);
+ bit_reset(lencoder->choice2);
+
+ for (size_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
+ bittree_reset(lencoder->low[pos_state], LEN_LOW_BITS);
+ bittree_reset(lencoder->mid[pos_state], LEN_MID_BITS);
+ }
+
+ bittree_reset(lencoder->high, LEN_HIGH_BITS);
+
+ if (!fast_mode)
+ for (uint32_t pos_state = 0; pos_state < num_pos_states;
+ ++pos_state)
+ length_update_prices(lencoder, pos_state);
+
+ return;
+}
+
+
+extern lzma_ret
+lzma_lzma_encoder_reset(lzma_lzma1_encoder *coder,
+ const lzma_options_lzma *options)
+{
+ if (!is_options_valid(options))
+ return LZMA_OPTIONS_ERROR;
+
+ coder->pos_mask = (1U << options->pb) - 1;
+ coder->literal_context_bits = options->lc;
+ coder->literal_pos_mask = (1U << options->lp) - 1;
+
+ // Range coder
+ rc_reset(&coder->rc);
+
+ // State
+ coder->state = STATE_LIT_LIT;
+ for (size_t i = 0; i < REPS; ++i)
+ coder->reps[i] = 0;
+
+ literal_init(coder->literal, options->lc, options->lp);
+
+ // Bit encoders
+ for (size_t i = 0; i < STATES; ++i) {
+ for (size_t j = 0; j <= coder->pos_mask; ++j) {
+ bit_reset(coder->is_match[i][j]);
+ bit_reset(coder->is_rep0_long[i][j]);
+ }
+
+ bit_reset(coder->is_rep[i]);
+ bit_reset(coder->is_rep0[i]);
+ bit_reset(coder->is_rep1[i]);
+ bit_reset(coder->is_rep2[i]);
+ }
+
+ for (size_t i = 0; i < FULL_DISTANCES - DIST_MODEL_END; ++i)
+ bit_reset(coder->dist_special[i]);
+
+ // Bit tree encoders
+ for (size_t i = 0; i < DIST_STATES; ++i)
+ bittree_reset(coder->dist_slot[i], DIST_SLOT_BITS);
+
+ bittree_reset(coder->dist_align, ALIGN_BITS);
+
+ // Length encoders
+ length_encoder_reset(&coder->match_len_encoder,
+ 1U << options->pb, coder->fast_mode);
+
+ length_encoder_reset(&coder->rep_len_encoder,
+ 1U << options->pb, coder->fast_mode);
+
+ // Price counts are incremented every time appropriate probabilities
+ // are changed. price counts are set to zero when the price tables
+ // are updated, which is done when the appropriate price counts have
+ // big enough value, and lzma_mf.read_ahead == 0 which happens at
+ // least every OPTS (a few thousand) possible price count increments.
+ //
+ // By resetting price counts to UINT32_MAX / 2, we make sure that the
+ // price tables will be initialized before they will be used (since
+ // the value is definitely big enough), and that it is OK to increment
+ // price counts without risk of integer overflow (since UINT32_MAX / 2
+ // is small enough). The current code doesn't increment price counts
+ // before initializing price tables, but it maybe done in future if
+ // we add support for saving the state between LZMA2 chunks.
+ coder->match_price_count = UINT32_MAX / 2;
+ coder->align_price_count = UINT32_MAX / 2;
+
+ coder->opts_end_index = 0;
+ coder->opts_current_index = 0;
+
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_lzma_encoder_create(void **coder_ptr, const lzma_allocator *allocator,
+ lzma_vli id, const lzma_options_lzma *options,
+ lzma_lz_options *lz_options)
+{
+ assert(id == LZMA_FILTER_LZMA1 || id == LZMA_FILTER_LZMA1EXT
+ || id == LZMA_FILTER_LZMA2);
+
+ // Allocate lzma_lzma1_encoder if it wasn't already allocated.
+ if (*coder_ptr == NULL) {
+ *coder_ptr = lzma_alloc(sizeof(lzma_lzma1_encoder), allocator);
+ if (*coder_ptr == NULL)
+ return LZMA_MEM_ERROR;
+ }
+
+ lzma_lzma1_encoder *coder = *coder_ptr;
+
+ // Set compression mode. Note that we haven't validated the options
+ // yet. Invalid options will get rejected by lzma_lzma_encoder_reset()
+ // call at the end of this function.
+ switch (options->mode) {
+ case LZMA_MODE_FAST:
+ coder->fast_mode = true;
+ break;
+
+ case LZMA_MODE_NORMAL: {
+ coder->fast_mode = false;
+
+ // Set dist_table_size.
+ // Round the dictionary size up to next 2^n.
+ //
+ // Currently the maximum encoder dictionary size
+ // is 1.5 GiB due to lz_encoder.c and here we need
+ // to be below 2 GiB to make the rounded up value
+ // fit in an uint32_t and avoid an infinite while-loop
+ // (and undefined behavior due to a too large shift).
+ // So do the same check as in LZ encoder,
+ // limiting to 1.5 GiB.
+ if (options->dict_size > (UINT32_C(1) << 30)
+ + (UINT32_C(1) << 29))
+ return LZMA_OPTIONS_ERROR;
+
+ uint32_t log_size = 0;
+ while ((UINT32_C(1) << log_size) < options->dict_size)
+ ++log_size;
+
+ coder->dist_table_size = log_size * 2;
+
+ // Length encoders' price table size
+ const uint32_t nice_len = my_max(
+ mf_get_hash_bytes(options->mf),
+ options->nice_len);
+
+ coder->match_len_encoder.table_size
+ = nice_len + 1 - MATCH_LEN_MIN;
+ coder->rep_len_encoder.table_size
+ = nice_len + 1 - MATCH_LEN_MIN;
+ break;
+ }
+
+ default:
+ return LZMA_OPTIONS_ERROR;
+ }
+
+ // We don't need to write the first byte as literal if there is
+ // a non-empty preset dictionary. encode_init() wouldn't even work
+ // if there is a non-empty preset dictionary, because encode_init()
+ // assumes that position is zero and previous byte is also zero.
+ coder->is_initialized = options->preset_dict != NULL
+ && options->preset_dict_size > 0;
+ coder->is_flushed = false;
+ coder->uncomp_size = 0;
+ coder->uncomp_size_ptr = NULL;
+
+ // Output size limiting is disabled by default.
+ coder->out_limit = 0;
+
+ // Determine if end marker is wanted:
+ // - It is never used with LZMA2.
+ // - It is always used with LZMA_FILTER_LZMA1 (unless
+ // lzma_lzma_set_out_limit() is called later).
+ // - LZMA_FILTER_LZMA1EXT has a flag for it in the options.
+ coder->use_eopm = (id == LZMA_FILTER_LZMA1);
+ if (id == LZMA_FILTER_LZMA1EXT) {
+ // Check if unsupported flags are present.
+ if (options->ext_flags & ~LZMA_LZMA1EXT_ALLOW_EOPM)
+ return LZMA_OPTIONS_ERROR;
+
+ coder->use_eopm = (options->ext_flags
+ & LZMA_LZMA1EXT_ALLOW_EOPM) != 0;
+
+ // TODO? As long as there are no filters that change the size
+ // of the data, it is enough to look at lzma_stream.total_in
+ // after encoding has been finished to know the uncompressed
+ // size of the LZMA1 stream. But in the future there could be
+ // filters that change the size of the data and then total_in
+ // doesn't work as the LZMA1 stream size might be different
+ // due to another filter in the chain. The problem is simple
+ // to solve: Add another flag to ext_flags and then set
+ // coder->uncomp_size_ptr to the address stored in
+ // lzma_options_lzma.reserved_ptr2 (or _ptr1).
+ }
+
+ set_lz_options(lz_options, options);
+
+ return lzma_lzma_encoder_reset(coder, options);
+}
+
+
+static lzma_ret
+lzma_encoder_init(lzma_lz_encoder *lz, const lzma_allocator *allocator,
+ lzma_vli id, const void *options, lzma_lz_options *lz_options)
+{
+ lz->code = &lzma_encode;
+ lz->set_out_limit = &lzma_lzma_set_out_limit;
+ return lzma_lzma_encoder_create(
+ &lz->coder, allocator, id, options, lz_options);
+}
+
+
+extern lzma_ret
+lzma_lzma_encoder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return lzma_lz_encoder_init(
+ next, allocator, filters, &lzma_encoder_init);
+}
+
+
+extern uint64_t
+lzma_lzma_encoder_memusage(const void *options)
+{
+ if (!is_options_valid(options))
+ return UINT64_MAX;
+
+ lzma_lz_options lz_options;
+ set_lz_options(&lz_options, options);
+
+ const uint64_t lz_memusage = lzma_lz_encoder_memusage(&lz_options);
+ if (lz_memusage == UINT64_MAX)
+ return UINT64_MAX;
+
+ return (uint64_t)(sizeof(lzma_lzma1_encoder)) + lz_memusage;
+}
+
+
+extern bool
+lzma_lzma_lclppb_encode(const lzma_options_lzma *options, uint8_t *byte)
+{
+ if (!is_lclppb_valid(options))
+ return true;
+
+ *byte = (options->pb * 5 + options->lp) * 9 + options->lc;
+ assert(*byte <= (4 * 5 + 4) * 9 + 8);
+
+ return false;
+}
+
+
+#ifdef HAVE_ENCODER_LZMA1
+extern lzma_ret
+lzma_lzma_props_encode(const void *options, uint8_t *out)
+{
+ if (options == NULL)
+ return LZMA_PROG_ERROR;
+
+ const lzma_options_lzma *const opt = options;
+
+ if (lzma_lzma_lclppb_encode(opt, out))
+ return LZMA_PROG_ERROR;
+
+ write32le(out + 1, opt->dict_size);
+
+ return LZMA_OK;
+}
+#endif
+
+
+extern LZMA_API(lzma_bool)
+lzma_mode_is_supported(lzma_mode mode)
+{
+ return mode == LZMA_MODE_FAST || mode == LZMA_MODE_NORMAL;
+}
diff --git a/src/liblzma/lzma/lzma_encoder.h b/src/liblzma/lzma/lzma_encoder.h
new file mode 100644
index 0000000..84d8c91
--- /dev/null
+++ b/src/liblzma/lzma/lzma_encoder.h
@@ -0,0 +1,59 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_encoder.h
+/// \brief LZMA encoder API
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_ENCODER_H
+#define LZMA_LZMA_ENCODER_H
+
+#include "common.h"
+
+
+typedef struct lzma_lzma1_encoder_s lzma_lzma1_encoder;
+
+
+extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+
+extern uint64_t lzma_lzma_encoder_memusage(const void *options);
+
+extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);
+
+
+/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.
+extern bool lzma_lzma_lclppb_encode(
+ const lzma_options_lzma *options, uint8_t *byte);
+
+
+#ifdef LZMA_LZ_ENCODER_H
+
+/// Initializes raw LZMA encoder; this is used by LZMA2.
+extern lzma_ret lzma_lzma_encoder_create(
+ void **coder_ptr, const lzma_allocator *allocator,
+ lzma_vli id, const lzma_options_lzma *options,
+ lzma_lz_options *lz_options);
+
+
+/// Resets an already initialized LZMA encoder; this is used by LZMA2.
+extern lzma_ret lzma_lzma_encoder_reset(
+ lzma_lzma1_encoder *coder, const lzma_options_lzma *options);
+
+
+extern lzma_ret lzma_lzma_encode(lzma_lzma1_encoder *restrict coder,
+ lzma_mf *restrict mf, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size,
+ uint32_t read_limit);
+
+#endif
+
+#endif
diff --git a/src/liblzma/lzma/lzma_encoder_optimum_fast.c b/src/liblzma/lzma/lzma_encoder_optimum_fast.c
new file mode 100644
index 0000000..6c53d2b
--- /dev/null
+++ b/src/liblzma/lzma/lzma_encoder_optimum_fast.c
@@ -0,0 +1,170 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_encoder_optimum_fast.c
+//
+// Author: Igor Pavlov
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma_encoder_private.h"
+#include "memcmplen.h"
+
+
+#define change_pair(small_dist, big_dist) \
+ (((big_dist) >> 7) > (small_dist))
+
+
+extern void
+lzma_lzma_optimum_fast(lzma_lzma1_encoder *restrict coder,
+ lzma_mf *restrict mf,
+ uint32_t *restrict back_res, uint32_t *restrict len_res)
+{
+ const uint32_t nice_len = mf->nice_len;
+
+ uint32_t len_main;
+ uint32_t matches_count;
+ if (mf->read_ahead == 0) {
+ len_main = mf_find(mf, &matches_count, coder->matches);
+ } else {
+ assert(mf->read_ahead == 1);
+ len_main = coder->longest_match_length;
+ matches_count = coder->matches_count;
+ }
+
+ const uint8_t *buf = mf_ptr(mf) - 1;
+ const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
+
+ if (buf_avail < 2) {
+ // There's not enough input left to encode a match.
+ *back_res = UINT32_MAX;
+ *len_res = 1;
+ return;
+ }
+
+ // Look for repeated matches; scan the previous four match distances
+ uint32_t rep_len = 0;
+ uint32_t rep_index = 0;
+
+ for (uint32_t i = 0; i < REPS; ++i) {
+ // Pointer to the beginning of the match candidate
+ const uint8_t *const buf_back = buf - coder->reps[i] - 1;
+
+ // If the first two bytes (2 == MATCH_LEN_MIN) do not match,
+ // this rep is not useful.
+ if (not_equal_16(buf, buf_back))
+ continue;
+
+ // The first two bytes matched.
+ // Calculate the length of the match.
+ const uint32_t len = lzma_memcmplen(
+ buf, buf_back, 2, buf_avail);
+
+ // If we have found a repeated match that is at least
+ // nice_len long, return it immediately.
+ if (len >= nice_len) {
+ *back_res = i;
+ *len_res = len;
+ mf_skip(mf, len - 1);
+ return;
+ }
+
+ if (len > rep_len) {
+ rep_index = i;
+ rep_len = len;
+ }
+ }
+
+ // We didn't find a long enough repeated match. Encode it as a normal
+ // match if the match length is at least nice_len.
+ if (len_main >= nice_len) {
+ *back_res = coder->matches[matches_count - 1].dist + REPS;
+ *len_res = len_main;
+ mf_skip(mf, len_main - 1);
+ return;
+ }
+
+ uint32_t back_main = 0;
+ if (len_main >= 2) {
+ back_main = coder->matches[matches_count - 1].dist;
+
+ while (matches_count > 1 && len_main ==
+ coder->matches[matches_count - 2].len + 1) {
+ if (!change_pair(coder->matches[
+ matches_count - 2].dist,
+ back_main))
+ break;
+
+ --matches_count;
+ len_main = coder->matches[matches_count - 1].len;
+ back_main = coder->matches[matches_count - 1].dist;
+ }
+
+ if (len_main == 2 && back_main >= 0x80)
+ len_main = 1;
+ }
+
+ if (rep_len >= 2) {
+ if (rep_len + 1 >= len_main
+ || (rep_len + 2 >= len_main
+ && back_main > (UINT32_C(1) << 9))
+ || (rep_len + 3 >= len_main
+ && back_main > (UINT32_C(1) << 15))) {
+ *back_res = rep_index;
+ *len_res = rep_len;
+ mf_skip(mf, rep_len - 1);
+ return;
+ }
+ }
+
+ if (len_main < 2 || buf_avail <= 2) {
+ *back_res = UINT32_MAX;
+ *len_res = 1;
+ return;
+ }
+
+ // Get the matches for the next byte. If we find a better match,
+ // the current byte is encoded as a literal.
+ coder->longest_match_length = mf_find(mf,
+ &coder->matches_count, coder->matches);
+
+ if (coder->longest_match_length >= 2) {
+ const uint32_t new_dist = coder->matches[
+ coder->matches_count - 1].dist;
+
+ if ((coder->longest_match_length >= len_main
+ && new_dist < back_main)
+ || (coder->longest_match_length == len_main + 1
+ && !change_pair(back_main, new_dist))
+ || (coder->longest_match_length > len_main + 1)
+ || (coder->longest_match_length + 1 >= len_main
+ && len_main >= 3
+ && change_pair(new_dist, back_main))) {
+ *back_res = UINT32_MAX;
+ *len_res = 1;
+ return;
+ }
+ }
+
+ // In contrast to LZMA SDK, dictionary could not have been moved
+ // between mf_find() calls, thus it is safe to just increment
+ // the old buf pointer instead of recalculating it with mf_ptr().
+ ++buf;
+
+ const uint32_t limit = my_max(2, len_main - 1);
+
+ for (uint32_t i = 0; i < REPS; ++i) {
+ if (memcmp(buf, buf - coder->reps[i] - 1, limit) == 0) {
+ *back_res = UINT32_MAX;
+ *len_res = 1;
+ return;
+ }
+ }
+
+ *back_res = back_main + REPS;
+ *len_res = len_main;
+ mf_skip(mf, len_main - 2);
+ return;
+}
diff --git a/src/liblzma/lzma/lzma_encoder_optimum_normal.c b/src/liblzma/lzma/lzma_encoder_optimum_normal.c
new file mode 100644
index 0000000..101c8d4
--- /dev/null
+++ b/src/liblzma/lzma/lzma_encoder_optimum_normal.c
@@ -0,0 +1,859 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_encoder_optimum_normal.c
+//
+// Author: Igor Pavlov
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "lzma_encoder_private.h"
+#include "fastpos.h"
+#include "memcmplen.h"
+
+
+////////////
+// Prices //
+////////////
+
+static uint32_t
+get_literal_price(const lzma_lzma1_encoder *const coder, const uint32_t pos,
+ const uint32_t prev_byte, const bool match_mode,
+ uint32_t match_byte, uint32_t symbol)
+{
+ const probability *const subcoder = literal_subcoder(coder->literal,
+ coder->literal_context_bits, coder->literal_pos_mask,
+ pos, prev_byte);
+
+ uint32_t price = 0;
+
+ if (!match_mode) {
+ price = rc_bittree_price(subcoder, 8, symbol);
+ } else {
+ uint32_t offset = 0x100;
+ symbol += UINT32_C(1) << 8;
+
+ do {
+ match_byte <<= 1;
+
+ const uint32_t match_bit = match_byte & offset;
+ const uint32_t subcoder_index
+ = offset + match_bit + (symbol >> 8);
+ const uint32_t bit = (symbol >> 7) & 1;
+ price += rc_bit_price(subcoder[subcoder_index], bit);
+
+ symbol <<= 1;
+ offset &= ~(match_byte ^ symbol);
+
+ } while (symbol < (UINT32_C(1) << 16));
+ }
+
+ return price;
+}
+
+
+static inline uint32_t
+get_len_price(const lzma_length_encoder *const lencoder,
+ const uint32_t len, const uint32_t pos_state)
+{
+ // NOTE: Unlike the other price tables, length prices are updated
+ // in lzma_encoder.c
+ return lencoder->prices[pos_state][len - MATCH_LEN_MIN];
+}
+
+
+static inline uint32_t
+get_short_rep_price(const lzma_lzma1_encoder *const coder,
+ const lzma_lzma_state state, const uint32_t pos_state)
+{
+ return rc_bit_0_price(coder->is_rep0[state])
+ + rc_bit_0_price(coder->is_rep0_long[state][pos_state]);
+}
+
+
+static inline uint32_t
+get_pure_rep_price(const lzma_lzma1_encoder *const coder, const uint32_t rep_index,
+ const lzma_lzma_state state, uint32_t pos_state)
+{
+ uint32_t price;
+
+ if (rep_index == 0) {
+ price = rc_bit_0_price(coder->is_rep0[state]);
+ price += rc_bit_1_price(coder->is_rep0_long[state][pos_state]);
+ } else {
+ price = rc_bit_1_price(coder->is_rep0[state]);
+
+ if (rep_index == 1) {
+ price += rc_bit_0_price(coder->is_rep1[state]);
+ } else {
+ price += rc_bit_1_price(coder->is_rep1[state]);
+ price += rc_bit_price(coder->is_rep2[state],
+ rep_index - 2);
+ }
+ }
+
+ return price;
+}
+
+
+static inline uint32_t
+get_rep_price(const lzma_lzma1_encoder *const coder, const uint32_t rep_index,
+ const uint32_t len, const lzma_lzma_state state,
+ const uint32_t pos_state)
+{
+ return get_len_price(&coder->rep_len_encoder, len, pos_state)
+ + get_pure_rep_price(coder, rep_index, state, pos_state);
+}
+
+
+static inline uint32_t
+get_dist_len_price(const lzma_lzma1_encoder *const coder, const uint32_t dist,
+ const uint32_t len, const uint32_t pos_state)
+{
+ const uint32_t dist_state = get_dist_state(len);
+ uint32_t price;
+
+ if (dist < FULL_DISTANCES) {
+ price = coder->dist_prices[dist_state][dist];
+ } else {
+ const uint32_t dist_slot = get_dist_slot_2(dist);
+ price = coder->dist_slot_prices[dist_state][dist_slot]
+ + coder->align_prices[dist & ALIGN_MASK];
+ }
+
+ price += get_len_price(&coder->match_len_encoder, len, pos_state);
+
+ return price;
+}
+
+
+static void
+fill_dist_prices(lzma_lzma1_encoder *coder)
+{
+ for (uint32_t dist_state = 0; dist_state < DIST_STATES; ++dist_state) {
+
+ uint32_t *const dist_slot_prices
+ = coder->dist_slot_prices[dist_state];
+
+ // Price to encode the dist_slot.
+ for (uint32_t dist_slot = 0;
+ dist_slot < coder->dist_table_size; ++dist_slot)
+ dist_slot_prices[dist_slot] = rc_bittree_price(
+ coder->dist_slot[dist_state],
+ DIST_SLOT_BITS, dist_slot);
+
+ // For matches with distance >= FULL_DISTANCES, add the price
+ // of the direct bits part of the match distance. (Align bits
+ // are handled by fill_align_prices()).
+ for (uint32_t dist_slot = DIST_MODEL_END;
+ dist_slot < coder->dist_table_size;
+ ++dist_slot)
+ dist_slot_prices[dist_slot] += rc_direct_price(
+ ((dist_slot >> 1) - 1) - ALIGN_BITS);
+
+ // Distances in the range [0, 3] are fully encoded with
+ // dist_slot, so they are used for coder->dist_prices
+ // as is.
+ for (uint32_t i = 0; i < DIST_MODEL_START; ++i)
+ coder->dist_prices[dist_state][i]
+ = dist_slot_prices[i];
+ }
+
+ // Distances in the range [4, 127] depend on dist_slot and
+ // dist_special. We do this in a loop separate from the above
+ // loop to avoid redundant calls to get_dist_slot().
+ for (uint32_t i = DIST_MODEL_START; i < FULL_DISTANCES; ++i) {
+ const uint32_t dist_slot = get_dist_slot(i);
+ const uint32_t footer_bits = ((dist_slot >> 1) - 1);
+ const uint32_t base = (2 | (dist_slot & 1)) << footer_bits;
+ const uint32_t price = rc_bittree_reverse_price(
+ coder->dist_special + base - dist_slot - 1,
+ footer_bits, i - base);
+
+ for (uint32_t dist_state = 0; dist_state < DIST_STATES;
+ ++dist_state)
+ coder->dist_prices[dist_state][i]
+ = price + coder->dist_slot_prices[
+ dist_state][dist_slot];
+ }
+
+ coder->match_price_count = 0;
+ return;
+}
+
+
+static void
+fill_align_prices(lzma_lzma1_encoder *coder)
+{
+ for (uint32_t i = 0; i < ALIGN_SIZE; ++i)
+ coder->align_prices[i] = rc_bittree_reverse_price(
+ coder->dist_align, ALIGN_BITS, i);
+
+ coder->align_price_count = 0;
+ return;
+}
+
+
+/////////////
+// Optimal //
+/////////////
+
+static inline void
+make_literal(lzma_optimal *optimal)
+{
+ optimal->back_prev = UINT32_MAX;
+ optimal->prev_1_is_literal = false;
+}
+
+
+static inline void
+make_short_rep(lzma_optimal *optimal)
+{
+ optimal->back_prev = 0;
+ optimal->prev_1_is_literal = false;
+}
+
+
+#define is_short_rep(optimal) \
+ ((optimal).back_prev == 0)
+
+
+static void
+backward(lzma_lzma1_encoder *restrict coder, uint32_t *restrict len_res,
+ uint32_t *restrict back_res, uint32_t cur)
+{
+ coder->opts_end_index = cur;
+
+ uint32_t pos_mem = coder->opts[cur].pos_prev;
+ uint32_t back_mem = coder->opts[cur].back_prev;
+
+ do {
+ if (coder->opts[cur].prev_1_is_literal) {
+ make_literal(&coder->opts[pos_mem]);
+ coder->opts[pos_mem].pos_prev = pos_mem - 1;
+
+ if (coder->opts[cur].prev_2) {
+ coder->opts[pos_mem - 1].prev_1_is_literal
+ = false;
+ coder->opts[pos_mem - 1].pos_prev
+ = coder->opts[cur].pos_prev_2;
+ coder->opts[pos_mem - 1].back_prev
+ = coder->opts[cur].back_prev_2;
+ }
+ }
+
+ const uint32_t pos_prev = pos_mem;
+ const uint32_t back_cur = back_mem;
+
+ back_mem = coder->opts[pos_prev].back_prev;
+ pos_mem = coder->opts[pos_prev].pos_prev;
+
+ coder->opts[pos_prev].back_prev = back_cur;
+ coder->opts[pos_prev].pos_prev = cur;
+ cur = pos_prev;
+
+ } while (cur != 0);
+
+ coder->opts_current_index = coder->opts[0].pos_prev;
+ *len_res = coder->opts[0].pos_prev;
+ *back_res = coder->opts[0].back_prev;
+
+ return;
+}
+
+
+//////////
+// Main //
+//////////
+
+static inline uint32_t
+helper1(lzma_lzma1_encoder *restrict coder, lzma_mf *restrict mf,
+ uint32_t *restrict back_res, uint32_t *restrict len_res,
+ uint32_t position)
+{
+ const uint32_t nice_len = mf->nice_len;
+
+ uint32_t len_main;
+ uint32_t matches_count;
+
+ if (mf->read_ahead == 0) {
+ len_main = mf_find(mf, &matches_count, coder->matches);
+ } else {
+ assert(mf->read_ahead == 1);
+ len_main = coder->longest_match_length;
+ matches_count = coder->matches_count;
+ }
+
+ const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
+ if (buf_avail < 2) {
+ *back_res = UINT32_MAX;
+ *len_res = 1;
+ return UINT32_MAX;
+ }
+
+ const uint8_t *const buf = mf_ptr(mf) - 1;
+
+ uint32_t rep_lens[REPS];
+ uint32_t rep_max_index = 0;
+
+ for (uint32_t i = 0; i < REPS; ++i) {
+ const uint8_t *const buf_back = buf - coder->reps[i] - 1;
+
+ if (not_equal_16(buf, buf_back)) {
+ rep_lens[i] = 0;
+ continue;
+ }
+
+ rep_lens[i] = lzma_memcmplen(buf, buf_back, 2, buf_avail);
+
+ if (rep_lens[i] > rep_lens[rep_max_index])
+ rep_max_index = i;
+ }
+
+ if (rep_lens[rep_max_index] >= nice_len) {
+ *back_res = rep_max_index;
+ *len_res = rep_lens[rep_max_index];
+ mf_skip(mf, *len_res - 1);
+ return UINT32_MAX;
+ }
+
+
+ if (len_main >= nice_len) {
+ *back_res = coder->matches[matches_count - 1].dist + REPS;
+ *len_res = len_main;
+ mf_skip(mf, len_main - 1);
+ return UINT32_MAX;
+ }
+
+ const uint8_t current_byte = *buf;
+ const uint8_t match_byte = *(buf - coder->reps[0] - 1);
+
+ if (len_main < 2 && current_byte != match_byte
+ && rep_lens[rep_max_index] < 2) {
+ *back_res = UINT32_MAX;
+ *len_res = 1;
+ return UINT32_MAX;
+ }
+
+ coder->opts[0].state = coder->state;
+
+ const uint32_t pos_state = position & coder->pos_mask;
+
+ coder->opts[1].price = rc_bit_0_price(
+ coder->is_match[coder->state][pos_state])
+ + get_literal_price(coder, position, buf[-1],
+ !is_literal_state(coder->state),
+ match_byte, current_byte);
+
+ make_literal(&coder->opts[1]);
+
+ const uint32_t match_price = rc_bit_1_price(
+ coder->is_match[coder->state][pos_state]);
+ const uint32_t rep_match_price = match_price
+ + rc_bit_1_price(coder->is_rep[coder->state]);
+
+ if (match_byte == current_byte) {
+ const uint32_t short_rep_price = rep_match_price
+ + get_short_rep_price(
+ coder, coder->state, pos_state);
+
+ if (short_rep_price < coder->opts[1].price) {
+ coder->opts[1].price = short_rep_price;
+ make_short_rep(&coder->opts[1]);
+ }
+ }
+
+ const uint32_t len_end = my_max(len_main, rep_lens[rep_max_index]);
+
+ if (len_end < 2) {
+ *back_res = coder->opts[1].back_prev;
+ *len_res = 1;
+ return UINT32_MAX;
+ }
+
+ coder->opts[1].pos_prev = 0;
+
+ for (uint32_t i = 0; i < REPS; ++i)
+ coder->opts[0].backs[i] = coder->reps[i];
+
+ uint32_t len = len_end;
+ do {
+ coder->opts[len].price = RC_INFINITY_PRICE;
+ } while (--len >= 2);
+
+
+ for (uint32_t i = 0; i < REPS; ++i) {
+ uint32_t rep_len = rep_lens[i];
+ if (rep_len < 2)
+ continue;
+
+ const uint32_t price = rep_match_price + get_pure_rep_price(
+ coder, i, coder->state, pos_state);
+
+ do {
+ const uint32_t cur_and_len_price = price
+ + get_len_price(
+ &coder->rep_len_encoder,
+ rep_len, pos_state);
+
+ if (cur_and_len_price < coder->opts[rep_len].price) {
+ coder->opts[rep_len].price = cur_and_len_price;
+ coder->opts[rep_len].pos_prev = 0;
+ coder->opts[rep_len].back_prev = i;
+ coder->opts[rep_len].prev_1_is_literal = false;
+ }
+ } while (--rep_len >= 2);
+ }
+
+
+ const uint32_t normal_match_price = match_price
+ + rc_bit_0_price(coder->is_rep[coder->state]);
+
+ len = rep_lens[0] >= 2 ? rep_lens[0] + 1 : 2;
+ if (len <= len_main) {
+ uint32_t i = 0;
+ while (len > coder->matches[i].len)
+ ++i;
+
+ for(; ; ++len) {
+ const uint32_t dist = coder->matches[i].dist;
+ const uint32_t cur_and_len_price = normal_match_price
+ + get_dist_len_price(coder,
+ dist, len, pos_state);
+
+ if (cur_and_len_price < coder->opts[len].price) {
+ coder->opts[len].price = cur_and_len_price;
+ coder->opts[len].pos_prev = 0;
+ coder->opts[len].back_prev = dist + REPS;
+ coder->opts[len].prev_1_is_literal = false;
+ }
+
+ if (len == coder->matches[i].len)
+ if (++i == matches_count)
+ break;
+ }
+ }
+
+ return len_end;
+}
+
+
+static inline uint32_t
+helper2(lzma_lzma1_encoder *coder, uint32_t *reps, const uint8_t *buf,
+ uint32_t len_end, uint32_t position, const uint32_t cur,
+ const uint32_t nice_len, const uint32_t buf_avail_full)
+{
+ uint32_t matches_count = coder->matches_count;
+ uint32_t new_len = coder->longest_match_length;
+ uint32_t pos_prev = coder->opts[cur].pos_prev;
+ lzma_lzma_state state;
+
+ if (coder->opts[cur].prev_1_is_literal) {
+ --pos_prev;
+
+ if (coder->opts[cur].prev_2) {
+ state = coder->opts[coder->opts[cur].pos_prev_2].state;
+
+ if (coder->opts[cur].back_prev_2 < REPS)
+ update_long_rep(state);
+ else
+ update_match(state);
+
+ } else {
+ state = coder->opts[pos_prev].state;
+ }
+
+ update_literal(state);
+
+ } else {
+ state = coder->opts[pos_prev].state;
+ }
+
+ if (pos_prev == cur - 1) {
+ if (is_short_rep(coder->opts[cur]))
+ update_short_rep(state);
+ else
+ update_literal(state);
+ } else {
+ uint32_t pos;
+ if (coder->opts[cur].prev_1_is_literal
+ && coder->opts[cur].prev_2) {
+ pos_prev = coder->opts[cur].pos_prev_2;
+ pos = coder->opts[cur].back_prev_2;
+ update_long_rep(state);
+ } else {
+ pos = coder->opts[cur].back_prev;
+ if (pos < REPS)
+ update_long_rep(state);
+ else
+ update_match(state);
+ }
+
+ if (pos < REPS) {
+ reps[0] = coder->opts[pos_prev].backs[pos];
+
+ uint32_t i;
+ for (i = 1; i <= pos; ++i)
+ reps[i] = coder->opts[pos_prev].backs[i - 1];
+
+ for (; i < REPS; ++i)
+ reps[i] = coder->opts[pos_prev].backs[i];
+
+ } else {
+ reps[0] = pos - REPS;
+
+ for (uint32_t i = 1; i < REPS; ++i)
+ reps[i] = coder->opts[pos_prev].backs[i - 1];
+ }
+ }
+
+ coder->opts[cur].state = state;
+
+ for (uint32_t i = 0; i < REPS; ++i)
+ coder->opts[cur].backs[i] = reps[i];
+
+ const uint32_t cur_price = coder->opts[cur].price;
+
+ const uint8_t current_byte = *buf;
+ const uint8_t match_byte = *(buf - reps[0] - 1);
+
+ const uint32_t pos_state = position & coder->pos_mask;
+
+ const uint32_t cur_and_1_price = cur_price
+ + rc_bit_0_price(coder->is_match[state][pos_state])
+ + get_literal_price(coder, position, buf[-1],
+ !is_literal_state(state), match_byte, current_byte);
+
+ bool next_is_literal = false;
+
+ if (cur_and_1_price < coder->opts[cur + 1].price) {
+ coder->opts[cur + 1].price = cur_and_1_price;
+ coder->opts[cur + 1].pos_prev = cur;
+ make_literal(&coder->opts[cur + 1]);
+ next_is_literal = true;
+ }
+
+ const uint32_t match_price = cur_price
+ + rc_bit_1_price(coder->is_match[state][pos_state]);
+ const uint32_t rep_match_price = match_price
+ + rc_bit_1_price(coder->is_rep[state]);
+
+ if (match_byte == current_byte
+ && !(coder->opts[cur + 1].pos_prev < cur
+ && coder->opts[cur + 1].back_prev == 0)) {
+
+ const uint32_t short_rep_price = rep_match_price
+ + get_short_rep_price(coder, state, pos_state);
+
+ if (short_rep_price <= coder->opts[cur + 1].price) {
+ coder->opts[cur + 1].price = short_rep_price;
+ coder->opts[cur + 1].pos_prev = cur;
+ make_short_rep(&coder->opts[cur + 1]);
+ next_is_literal = true;
+ }
+ }
+
+ if (buf_avail_full < 2)
+ return len_end;
+
+ const uint32_t buf_avail = my_min(buf_avail_full, nice_len);
+
+ if (!next_is_literal && match_byte != current_byte) { // speed optimization
+ // try literal + rep0
+ const uint8_t *const buf_back = buf - reps[0] - 1;
+ const uint32_t limit = my_min(buf_avail_full, nice_len + 1);
+
+ const uint32_t len_test = lzma_memcmplen(buf, buf_back, 1, limit) - 1;
+
+ if (len_test >= 2) {
+ lzma_lzma_state state_2 = state;
+ update_literal(state_2);
+
+ const uint32_t pos_state_next = (position + 1) & coder->pos_mask;
+ const uint32_t next_rep_match_price = cur_and_1_price
+ + rc_bit_1_price(coder->is_match[state_2][pos_state_next])
+ + rc_bit_1_price(coder->is_rep[state_2]);
+
+ //for (; len_test >= 2; --len_test) {
+ const uint32_t offset = cur + 1 + len_test;
+
+ while (len_end < offset)
+ coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+ const uint32_t cur_and_len_price = next_rep_match_price
+ + get_rep_price(coder, 0, len_test,
+ state_2, pos_state_next);
+
+ if (cur_and_len_price < coder->opts[offset].price) {
+ coder->opts[offset].price = cur_and_len_price;
+ coder->opts[offset].pos_prev = cur + 1;
+ coder->opts[offset].back_prev = 0;
+ coder->opts[offset].prev_1_is_literal = true;
+ coder->opts[offset].prev_2 = false;
+ }
+ //}
+ }
+ }
+
+
+ uint32_t start_len = 2; // speed optimization
+
+ for (uint32_t rep_index = 0; rep_index < REPS; ++rep_index) {
+ const uint8_t *const buf_back = buf - reps[rep_index] - 1;
+ if (not_equal_16(buf, buf_back))
+ continue;
+
+ uint32_t len_test = lzma_memcmplen(buf, buf_back, 2, buf_avail);
+
+ while (len_end < cur + len_test)
+ coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+ const uint32_t len_test_temp = len_test;
+ const uint32_t price = rep_match_price + get_pure_rep_price(
+ coder, rep_index, state, pos_state);
+
+ do {
+ const uint32_t cur_and_len_price = price
+ + get_len_price(&coder->rep_len_encoder,
+ len_test, pos_state);
+
+ if (cur_and_len_price < coder->opts[cur + len_test].price) {
+ coder->opts[cur + len_test].price = cur_and_len_price;
+ coder->opts[cur + len_test].pos_prev = cur;
+ coder->opts[cur + len_test].back_prev = rep_index;
+ coder->opts[cur + len_test].prev_1_is_literal = false;
+ }
+ } while (--len_test >= 2);
+
+ len_test = len_test_temp;
+
+ if (rep_index == 0)
+ start_len = len_test + 1;
+
+
+ uint32_t len_test_2 = len_test + 1;
+ const uint32_t limit = my_min(buf_avail_full,
+ len_test_2 + nice_len);
+ // NOTE: len_test_2 may be greater than limit so the call to
+ // lzma_memcmplen() must be done conditionally.
+ if (len_test_2 < limit)
+ len_test_2 = lzma_memcmplen(buf, buf_back, len_test_2, limit);
+
+ len_test_2 -= len_test + 1;
+
+ if (len_test_2 >= 2) {
+ lzma_lzma_state state_2 = state;
+ update_long_rep(state_2);
+
+ uint32_t pos_state_next = (position + len_test) & coder->pos_mask;
+
+ const uint32_t cur_and_len_literal_price = price
+ + get_len_price(&coder->rep_len_encoder,
+ len_test, pos_state)
+ + rc_bit_0_price(coder->is_match[state_2][pos_state_next])
+ + get_literal_price(coder, position + len_test,
+ buf[len_test - 1], true,
+ buf_back[len_test], buf[len_test]);
+
+ update_literal(state_2);
+
+ pos_state_next = (position + len_test + 1) & coder->pos_mask;
+
+ const uint32_t next_rep_match_price = cur_and_len_literal_price
+ + rc_bit_1_price(coder->is_match[state_2][pos_state_next])
+ + rc_bit_1_price(coder->is_rep[state_2]);
+
+ //for(; len_test_2 >= 2; len_test_2--) {
+ const uint32_t offset = cur + len_test + 1 + len_test_2;
+
+ while (len_end < offset)
+ coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+ const uint32_t cur_and_len_price = next_rep_match_price
+ + get_rep_price(coder, 0, len_test_2,
+ state_2, pos_state_next);
+
+ if (cur_and_len_price < coder->opts[offset].price) {
+ coder->opts[offset].price = cur_and_len_price;
+ coder->opts[offset].pos_prev = cur + len_test + 1;
+ coder->opts[offset].back_prev = 0;
+ coder->opts[offset].prev_1_is_literal = true;
+ coder->opts[offset].prev_2 = true;
+ coder->opts[offset].pos_prev_2 = cur;
+ coder->opts[offset].back_prev_2 = rep_index;
+ }
+ //}
+ }
+ }
+
+
+ //for (uint32_t len_test = 2; len_test <= new_len; ++len_test)
+ if (new_len > buf_avail) {
+ new_len = buf_avail;
+
+ matches_count = 0;
+ while (new_len > coder->matches[matches_count].len)
+ ++matches_count;
+
+ coder->matches[matches_count++].len = new_len;
+ }
+
+
+ if (new_len >= start_len) {
+ const uint32_t normal_match_price = match_price
+ + rc_bit_0_price(coder->is_rep[state]);
+
+ while (len_end < cur + new_len)
+ coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+ uint32_t i = 0;
+ while (start_len > coder->matches[i].len)
+ ++i;
+
+ for (uint32_t len_test = start_len; ; ++len_test) {
+ const uint32_t cur_back = coder->matches[i].dist;
+ uint32_t cur_and_len_price = normal_match_price
+ + get_dist_len_price(coder,
+ cur_back, len_test, pos_state);
+
+ if (cur_and_len_price < coder->opts[cur + len_test].price) {
+ coder->opts[cur + len_test].price = cur_and_len_price;
+ coder->opts[cur + len_test].pos_prev = cur;
+ coder->opts[cur + len_test].back_prev
+ = cur_back + REPS;
+ coder->opts[cur + len_test].prev_1_is_literal = false;
+ }
+
+ if (len_test == coder->matches[i].len) {
+ // Try Match + Literal + Rep0
+ const uint8_t *const buf_back = buf - cur_back - 1;
+ uint32_t len_test_2 = len_test + 1;
+ const uint32_t limit = my_min(buf_avail_full,
+ len_test_2 + nice_len);
+
+ // NOTE: len_test_2 may be greater than limit
+ // so the call to lzma_memcmplen() must be
+ // done conditionally.
+ if (len_test_2 < limit)
+ len_test_2 = lzma_memcmplen(buf, buf_back,
+ len_test_2, limit);
+
+ len_test_2 -= len_test + 1;
+
+ if (len_test_2 >= 2) {
+ lzma_lzma_state state_2 = state;
+ update_match(state_2);
+ uint32_t pos_state_next
+ = (position + len_test) & coder->pos_mask;
+
+ const uint32_t cur_and_len_literal_price = cur_and_len_price
+ + rc_bit_0_price(
+ coder->is_match[state_2][pos_state_next])
+ + get_literal_price(coder,
+ position + len_test,
+ buf[len_test - 1],
+ true,
+ buf_back[len_test],
+ buf[len_test]);
+
+ update_literal(state_2);
+ pos_state_next = (pos_state_next + 1) & coder->pos_mask;
+
+ const uint32_t next_rep_match_price
+ = cur_and_len_literal_price
+ + rc_bit_1_price(
+ coder->is_match[state_2][pos_state_next])
+ + rc_bit_1_price(coder->is_rep[state_2]);
+
+ // for(; len_test_2 >= 2; --len_test_2) {
+ const uint32_t offset = cur + len_test + 1 + len_test_2;
+
+ while (len_end < offset)
+ coder->opts[++len_end].price = RC_INFINITY_PRICE;
+
+ cur_and_len_price = next_rep_match_price
+ + get_rep_price(coder, 0, len_test_2,
+ state_2, pos_state_next);
+
+ if (cur_and_len_price < coder->opts[offset].price) {
+ coder->opts[offset].price = cur_and_len_price;
+ coder->opts[offset].pos_prev = cur + len_test + 1;
+ coder->opts[offset].back_prev = 0;
+ coder->opts[offset].prev_1_is_literal = true;
+ coder->opts[offset].prev_2 = true;
+ coder->opts[offset].pos_prev_2 = cur;
+ coder->opts[offset].back_prev_2
+ = cur_back + REPS;
+ }
+ //}
+ }
+
+ if (++i == matches_count)
+ break;
+ }
+ }
+ }
+
+ return len_end;
+}
+
+
+extern void
+lzma_lzma_optimum_normal(lzma_lzma1_encoder *restrict coder,
+ lzma_mf *restrict mf,
+ uint32_t *restrict back_res, uint32_t *restrict len_res,
+ uint32_t position)
+{
+ // If we have symbols pending, return the next pending symbol.
+ if (coder->opts_end_index != coder->opts_current_index) {
+ assert(mf->read_ahead > 0);
+ *len_res = coder->opts[coder->opts_current_index].pos_prev
+ - coder->opts_current_index;
+ *back_res = coder->opts[coder->opts_current_index].back_prev;
+ coder->opts_current_index = coder->opts[
+ coder->opts_current_index].pos_prev;
+ return;
+ }
+
+ // Update the price tables. In LZMA SDK <= 4.60 (and possibly later)
+ // this was done in both initialization function and in the main loop.
+ // In liblzma they were moved into this single place.
+ if (mf->read_ahead == 0) {
+ if (coder->match_price_count >= (1 << 7))
+ fill_dist_prices(coder);
+
+ if (coder->align_price_count >= ALIGN_SIZE)
+ fill_align_prices(coder);
+ }
+
+ // TODO: This needs quite a bit of cleaning still. But splitting
+ // the original function into two pieces makes it at least a little
+ // more readable, since those two parts don't share many variables.
+
+ uint32_t len_end = helper1(coder, mf, back_res, len_res, position);
+ if (len_end == UINT32_MAX)
+ return;
+
+ uint32_t reps[REPS];
+ memcpy(reps, coder->reps, sizeof(reps));
+
+ uint32_t cur;
+ for (cur = 1; cur < len_end; ++cur) {
+ assert(cur < OPTS);
+
+ coder->longest_match_length = mf_find(
+ mf, &coder->matches_count, coder->matches);
+
+ if (coder->longest_match_length >= mf->nice_len)
+ break;
+
+ len_end = helper2(coder, reps, mf_ptr(mf) - 1, len_end,
+ position + cur, cur, mf->nice_len,
+ my_min(mf_avail(mf) + 1, OPTS - 1 - cur));
+ }
+
+ backward(coder, len_res, back_res, cur);
+ return;
+}
diff --git a/src/liblzma/lzma/lzma_encoder_presets.c b/src/liblzma/lzma/lzma_encoder_presets.c
new file mode 100644
index 0000000..711df02
--- /dev/null
+++ b/src/liblzma/lzma/lzma_encoder_presets.c
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_encoder_presets.c
+/// \brief Encoder presets
+/// \note xz needs this even when only decoding is enabled.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "common.h"
+
+
+extern LZMA_API(lzma_bool)
+lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
+{
+ const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK;
+ const uint32_t flags = preset & ~LZMA_PRESET_LEVEL_MASK;
+ const uint32_t supported_flags = LZMA_PRESET_EXTREME;
+
+ if (level > 9 || (flags & ~supported_flags))
+ return true;
+
+ options->preset_dict = NULL;
+ options->preset_dict_size = 0;
+
+ options->lc = LZMA_LC_DEFAULT;
+ options->lp = LZMA_LP_DEFAULT;
+ options->pb = LZMA_PB_DEFAULT;
+
+ static const uint8_t dict_pow2[]
+ = { 18, 20, 21, 22, 22, 23, 23, 24, 25, 26 };
+ options->dict_size = UINT32_C(1) << dict_pow2[level];
+
+ if (level <= 3) {
+ options->mode = LZMA_MODE_FAST;
+ options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4;
+ options->nice_len = level <= 1 ? 128 : 273;
+ static const uint8_t depths[] = { 4, 8, 24, 48 };
+ options->depth = depths[level];
+ } else {
+ options->mode = LZMA_MODE_NORMAL;
+ options->mf = LZMA_MF_BT4;
+ options->nice_len = level == 4 ? 16 : level == 5 ? 32 : 64;
+ options->depth = 0;
+ }
+
+ if (flags & LZMA_PRESET_EXTREME) {
+ options->mode = LZMA_MODE_NORMAL;
+ options->mf = LZMA_MF_BT4;
+ if (level == 3 || level == 5) {
+ options->nice_len = 192;
+ options->depth = 0;
+ } else {
+ options->nice_len = 273;
+ options->depth = 512;
+ }
+ }
+
+ return false;
+}
diff --git a/src/liblzma/lzma/lzma_encoder_private.h b/src/liblzma/lzma/lzma_encoder_private.h
new file mode 100644
index 0000000..b228c57
--- /dev/null
+++ b/src/liblzma/lzma/lzma_encoder_private.h
@@ -0,0 +1,162 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzma_encoder_private.h
+/// \brief Private definitions for LZMA encoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_LZMA_ENCODER_PRIVATE_H
+#define LZMA_LZMA_ENCODER_PRIVATE_H
+
+#include "lz_encoder.h"
+#include "range_encoder.h"
+#include "lzma_common.h"
+#include "lzma_encoder.h"
+
+
+// Macro to compare if the first two bytes in two buffers differ. This is
+// needed in lzma_lzma_optimum_*() to test if the match is at least
+// MATCH_LEN_MIN bytes. Unaligned access gives tiny gain so there's no
+// reason to not use it when it is supported.
+#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
+# define not_equal_16(a, b) (read16ne(a) != read16ne(b))
+#else
+# define not_equal_16(a, b) \
+ ((a)[0] != (b)[0] || (a)[1] != (b)[1])
+#endif
+
+
+// Optimal - Number of entries in the optimum array.
+#define OPTS (1 << 12)
+
+
+typedef struct {
+ probability choice;
+ probability choice2;
+ probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
+ probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
+ probability high[LEN_HIGH_SYMBOLS];
+
+ uint32_t prices[POS_STATES_MAX][LEN_SYMBOLS];
+ uint32_t table_size;
+ uint32_t counters[POS_STATES_MAX];
+
+} lzma_length_encoder;
+
+
+typedef struct {
+ lzma_lzma_state state;
+
+ bool prev_1_is_literal;
+ bool prev_2;
+
+ uint32_t pos_prev_2;
+ uint32_t back_prev_2;
+
+ uint32_t price;
+ uint32_t pos_prev; // pos_next;
+ uint32_t back_prev;
+
+ uint32_t backs[REPS];
+
+} lzma_optimal;
+
+
+struct lzma_lzma1_encoder_s {
+ /// Range encoder
+ lzma_range_encoder rc;
+
+ /// Uncompressed size (doesn't include possible preset dictionary)
+ uint64_t uncomp_size;
+
+ /// If non-zero, produce at most this much output.
+ /// Some input may then be missing from the output.
+ uint64_t out_limit;
+
+ /// If the above out_limit is non-zero, *uncomp_size_ptr is set to
+ /// the amount of uncompressed data that we were able to fit
+ /// in the output buffer.
+ uint64_t *uncomp_size_ptr;
+
+ /// State
+ lzma_lzma_state state;
+
+ /// The four most recent match distances
+ uint32_t reps[REPS];
+
+ /// Array of match candidates
+ lzma_match matches[MATCH_LEN_MAX + 1];
+
+ /// Number of match candidates in matches[]
+ uint32_t matches_count;
+
+ /// Variable to hold the length of the longest match between calls
+ /// to lzma_lzma_optimum_*().
+ uint32_t longest_match_length;
+
+ /// True if using getoptimumfast
+ bool fast_mode;
+
+ /// True if the encoder has been initialized by encoding the first
+ /// byte as a literal.
+ bool is_initialized;
+
+ /// True if the range encoder has been flushed, but not all bytes
+ /// have been written to the output buffer yet.
+ bool is_flushed;
+
+ /// True if end of payload marker will be written.
+ bool use_eopm;
+
+ uint32_t pos_mask; ///< (1 << pos_bits) - 1
+ uint32_t literal_context_bits;
+ uint32_t literal_pos_mask;
+
+ // These are the same as in lzma_decoder.c. See comments there.
+ probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
+ probability is_match[STATES][POS_STATES_MAX];
+ probability is_rep[STATES];
+ probability is_rep0[STATES];
+ probability is_rep1[STATES];
+ probability is_rep2[STATES];
+ probability is_rep0_long[STATES][POS_STATES_MAX];
+ probability dist_slot[DIST_STATES][DIST_SLOTS];
+ probability dist_special[FULL_DISTANCES - DIST_MODEL_END];
+ probability dist_align[ALIGN_SIZE];
+
+ // These are the same as in lzma_decoder.c except that the encoders
+ // include also price tables.
+ lzma_length_encoder match_len_encoder;
+ lzma_length_encoder rep_len_encoder;
+
+ // Price tables
+ uint32_t dist_slot_prices[DIST_STATES][DIST_SLOTS];
+ uint32_t dist_prices[DIST_STATES][FULL_DISTANCES];
+ uint32_t dist_table_size;
+ uint32_t match_price_count;
+
+ uint32_t align_prices[ALIGN_SIZE];
+ uint32_t align_price_count;
+
+ // Optimal
+ uint32_t opts_end_index;
+ uint32_t opts_current_index;
+ lzma_optimal opts[OPTS];
+};
+
+
+extern void lzma_lzma_optimum_fast(
+ lzma_lzma1_encoder *restrict coder, lzma_mf *restrict mf,
+ uint32_t *restrict back_res, uint32_t *restrict len_res);
+
+extern void lzma_lzma_optimum_normal(lzma_lzma1_encoder *restrict coder,
+ lzma_mf *restrict mf, uint32_t *restrict back_res,
+ uint32_t *restrict len_res, uint32_t position);
+
+#endif
diff --git a/src/liblzma/rangecoder/Makefile.inc b/src/liblzma/rangecoder/Makefile.inc
new file mode 100644
index 0000000..d8a597a
--- /dev/null
+++ b/src/liblzma/rangecoder/Makefile.inc
@@ -0,0 +1,21 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+EXTRA_DIST += rangecoder/price_tablegen.c
+
+liblzma_la_SOURCES += rangecoder/range_common.h
+
+if COND_ENCODER_LZMA1
+liblzma_la_SOURCES += \
+ rangecoder/range_encoder.h \
+ rangecoder/price.h \
+ rangecoder/price_table.c
+endif
+
+if COND_DECODER_LZMA1
+liblzma_la_SOURCES += rangecoder/range_decoder.h
+endif
diff --git a/src/liblzma/rangecoder/price.h b/src/liblzma/rangecoder/price.h
new file mode 100644
index 0000000..45dbbbb
--- /dev/null
+++ b/src/liblzma/rangecoder/price.h
@@ -0,0 +1,93 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file price.h
+/// \brief Probability price calculation
+//
+// Author: Igor Pavlov
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_PRICE_H
+#define LZMA_PRICE_H
+
+
+#define RC_MOVE_REDUCING_BITS 4
+#define RC_BIT_PRICE_SHIFT_BITS 4
+#define RC_PRICE_TABLE_SIZE (RC_BIT_MODEL_TOTAL >> RC_MOVE_REDUCING_BITS)
+
+#define RC_INFINITY_PRICE (UINT32_C(1) << 30)
+
+
+/// Lookup table for the inline functions defined in this file.
+lzma_attr_visibility_hidden
+extern const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE];
+
+
+static inline uint32_t
+rc_bit_price(const probability prob, const uint32_t bit)
+{
+ return lzma_rc_prices[(prob ^ ((UINT32_C(0) - bit)
+ & (RC_BIT_MODEL_TOTAL - 1))) >> RC_MOVE_REDUCING_BITS];
+}
+
+
+static inline uint32_t
+rc_bit_0_price(const probability prob)
+{
+ return lzma_rc_prices[prob >> RC_MOVE_REDUCING_BITS];
+}
+
+
+static inline uint32_t
+rc_bit_1_price(const probability prob)
+{
+ return lzma_rc_prices[(prob ^ (RC_BIT_MODEL_TOTAL - 1))
+ >> RC_MOVE_REDUCING_BITS];
+}
+
+
+static inline uint32_t
+rc_bittree_price(const probability *const probs,
+ const uint32_t bit_levels, uint32_t symbol)
+{
+ uint32_t price = 0;
+ symbol += UINT32_C(1) << bit_levels;
+
+ do {
+ const uint32_t bit = symbol & 1;
+ symbol >>= 1;
+ price += rc_bit_price(probs[symbol], bit);
+ } while (symbol != 1);
+
+ return price;
+}
+
+
+static inline uint32_t
+rc_bittree_reverse_price(const probability *const probs,
+ uint32_t bit_levels, uint32_t symbol)
+{
+ uint32_t price = 0;
+ uint32_t model_index = 1;
+
+ do {
+ const uint32_t bit = symbol & 1;
+ symbol >>= 1;
+ price += rc_bit_price(probs[model_index], bit);
+ model_index = (model_index << 1) + bit;
+ } while (--bit_levels != 0);
+
+ return price;
+}
+
+
+static inline uint32_t
+rc_direct_price(const uint32_t bits)
+{
+ return bits << RC_BIT_PRICE_SHIFT_BITS;
+}
+
+#endif
diff --git a/src/liblzma/rangecoder/price_table.c b/src/liblzma/rangecoder/price_table.c
new file mode 100644
index 0000000..ac64bf6
--- /dev/null
+++ b/src/liblzma/rangecoder/price_table.c
@@ -0,0 +1,22 @@
+/* This file has been automatically generated by price_tablegen.c. */
+
+#include "range_encoder.h"
+
+const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE] = {
+ 128, 103, 91, 84, 78, 73, 69, 66,
+ 63, 61, 58, 56, 54, 52, 51, 49,
+ 48, 46, 45, 44, 43, 42, 41, 40,
+ 39, 38, 37, 36, 35, 34, 34, 33,
+ 32, 31, 31, 30, 29, 29, 28, 28,
+ 27, 26, 26, 25, 25, 24, 24, 23,
+ 23, 22, 22, 22, 21, 21, 20, 20,
+ 19, 19, 19, 18, 18, 17, 17, 17,
+ 16, 16, 16, 15, 15, 15, 14, 14,
+ 14, 13, 13, 13, 12, 12, 12, 11,
+ 11, 11, 11, 10, 10, 10, 10, 9,
+ 9, 9, 9, 8, 8, 8, 8, 7,
+ 7, 7, 7, 6, 6, 6, 6, 5,
+ 5, 5, 5, 5, 4, 4, 4, 4,
+ 3, 3, 3, 3, 3, 2, 2, 2,
+ 2, 2, 2, 1, 1, 1, 1, 1
+};
diff --git a/src/liblzma/rangecoder/price_tablegen.c b/src/liblzma/rangecoder/price_tablegen.c
new file mode 100644
index 0000000..bf08ce3
--- /dev/null
+++ b/src/liblzma/rangecoder/price_tablegen.c
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file price_tablegen.c
+/// \brief Probability price table generator
+///
+/// Compiling: gcc -std=c99 -o price_tablegen price_tablegen.c
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <inttypes.h>
+#include <stdio.h>
+#include "range_common.h"
+#include "price.h"
+
+
+static uint32_t rc_prices[RC_PRICE_TABLE_SIZE];
+
+
+static void
+init_price_table(void)
+{
+ for (uint32_t i = (UINT32_C(1) << RC_MOVE_REDUCING_BITS) / 2;
+ i < RC_BIT_MODEL_TOTAL;
+ i += (UINT32_C(1) << RC_MOVE_REDUCING_BITS)) {
+ const uint32_t cycles_bits = RC_BIT_PRICE_SHIFT_BITS;
+ uint32_t w = i;
+ uint32_t bit_count = 0;
+
+ for (uint32_t j = 0; j < cycles_bits; ++j) {
+ w *= w;
+ bit_count <<= 1;
+
+ while (w >= (UINT32_C(1) << 16)) {
+ w >>= 1;
+ ++bit_count;
+ }
+ }
+
+ rc_prices[i >> RC_MOVE_REDUCING_BITS]
+ = (RC_BIT_MODEL_TOTAL_BITS << cycles_bits)
+ - 15 - bit_count;
+ }
+
+ return;
+}
+
+
+static void
+print_price_table(void)
+{
+ printf("/* This file has been automatically generated by "
+ "price_tablegen.c. */\n\n"
+ "#include \"range_encoder.h\"\n\n"
+ "const uint8_t lzma_rc_prices["
+ "RC_PRICE_TABLE_SIZE] = {");
+
+ const size_t array_size = sizeof(lzma_rc_prices)
+ / sizeof(lzma_rc_prices[0]);
+ for (size_t i = 0; i < array_size; ++i) {
+ if (i % 8 == 0)
+ printf("\n\t");
+
+ printf("%4" PRIu32, rc_prices[i]);
+
+ if (i != array_size - 1)
+ printf(",");
+ }
+
+ printf("\n};\n");
+
+ return;
+}
+
+
+int
+main(void)
+{
+ init_price_table();
+ print_price_table();
+ return 0;
+}
diff --git a/src/liblzma/rangecoder/range_common.h b/src/liblzma/rangecoder/range_common.h
new file mode 100644
index 0000000..2c74dc1
--- /dev/null
+++ b/src/liblzma/rangecoder/range_common.h
@@ -0,0 +1,71 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file range_common.h
+/// \brief Common things for range encoder and decoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_RANGE_COMMON_H
+#define LZMA_RANGE_COMMON_H
+
+#include "common.h"
+
+
+///////////////
+// Constants //
+///////////////
+
+#define RC_SHIFT_BITS 8
+#define RC_TOP_BITS 24
+#define RC_TOP_VALUE (UINT32_C(1) << RC_TOP_BITS)
+#define RC_BIT_MODEL_TOTAL_BITS 11
+#define RC_BIT_MODEL_TOTAL (UINT32_C(1) << RC_BIT_MODEL_TOTAL_BITS)
+#define RC_MOVE_BITS 5
+
+
+////////////
+// Macros //
+////////////
+
+// Resets the probability so that both 0 and 1 have probability of 50 %
+#define bit_reset(prob) \
+ prob = RC_BIT_MODEL_TOTAL >> 1
+
+// This does the same for a complete bit tree.
+// (A tree represented as an array.)
+#define bittree_reset(probs, bit_levels) \
+ for (uint32_t bt_i = 0; bt_i < (1 << (bit_levels)); ++bt_i) \
+ bit_reset((probs)[bt_i])
+
+
+//////////////////////
+// Type definitions //
+//////////////////////
+
+/// \brief Type of probabilities used with range coder
+///
+/// This needs to be at least 12-bit integer, so uint16_t is a logical choice.
+/// However, on some architecture and compiler combinations, a bigger type
+/// may give better speed, because the probability variables are accessed
+/// a lot. On the other hand, bigger probability type increases cache
+/// footprint, since there are 2 to 14 thousand probability variables in
+/// LZMA (assuming the limit of lc + lp <= 4; with lc + lp <= 12 there
+/// would be about 1.5 million variables).
+///
+/// With malicious files, the initialization speed of the LZMA decoder can
+/// become important. In that case, smaller probability variables mean that
+/// there is less bytes to write to RAM, which makes initialization faster.
+/// With big probability type, the initialization can become so slow that it
+/// can be a problem e.g. for email servers doing virus scanning.
+///
+/// I will be sticking to uint16_t unless some specific architectures
+/// are *much* faster (20-50 %) with uint32_t.
+typedef uint16_t probability;
+
+#endif
diff --git a/src/liblzma/rangecoder/range_decoder.h b/src/liblzma/rangecoder/range_decoder.h
new file mode 100644
index 0000000..e0b051f
--- /dev/null
+++ b/src/liblzma/rangecoder/range_decoder.h
@@ -0,0 +1,185 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file range_decoder.h
+/// \brief Range Decoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_RANGE_DECODER_H
+#define LZMA_RANGE_DECODER_H
+
+#include "range_common.h"
+
+
+typedef struct {
+ uint32_t range;
+ uint32_t code;
+ uint32_t init_bytes_left;
+} lzma_range_decoder;
+
+
+/// Reads the first five bytes to initialize the range decoder.
+static inline lzma_ret
+rc_read_init(lzma_range_decoder *rc, const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size)
+{
+ while (rc->init_bytes_left > 0) {
+ if (*in_pos == in_size)
+ return LZMA_OK;
+
+ // The first byte is always 0x00. It could have been omitted
+ // in LZMA2 but it wasn't, so one byte is wasted in every
+ // LZMA2 chunk.
+ if (rc->init_bytes_left == 5 && in[*in_pos] != 0x00)
+ return LZMA_DATA_ERROR;
+
+ rc->code = (rc->code << 8) | in[*in_pos];
+ ++*in_pos;
+ --rc->init_bytes_left;
+ }
+
+ return LZMA_STREAM_END;
+}
+
+
+/// Makes local copies of range decoder and *in_pos variables. Doing this
+/// improves speed significantly. The range decoder macros expect also
+/// variables `in' and `in_size' to be defined.
+#define rc_to_local(range_decoder, in_pos) \
+ lzma_range_decoder rc = range_decoder; \
+ size_t rc_in_pos = (in_pos); \
+ uint32_t rc_bound
+
+
+/// Stores the local copes back to the range decoder structure.
+#define rc_from_local(range_decoder, in_pos) \
+do { \
+ range_decoder = rc; \
+ in_pos = rc_in_pos; \
+} while (0)
+
+
+/// Resets the range decoder structure.
+#define rc_reset(range_decoder) \
+do { \
+ (range_decoder).range = UINT32_MAX; \
+ (range_decoder).code = 0; \
+ (range_decoder).init_bytes_left = 5; \
+} while (0)
+
+
+/// When decoding has been properly finished, rc.code is always zero unless
+/// the input stream is corrupt. So checking this can catch some corrupt
+/// files especially if they don't have any other integrity check.
+#define rc_is_finished(range_decoder) \
+ ((range_decoder).code == 0)
+
+
+/// Read the next input byte if needed. If more input is needed but there is
+/// no more input available, "goto out" is used to jump out of the main
+/// decoder loop.
+#define rc_normalize(seq) \
+do { \
+ if (rc.range < RC_TOP_VALUE) { \
+ if (unlikely(rc_in_pos == in_size)) { \
+ coder->sequence = seq; \
+ goto out; \
+ } \
+ rc.range <<= RC_SHIFT_BITS; \
+ rc.code = (rc.code << RC_SHIFT_BITS) | in[rc_in_pos++]; \
+ } \
+} while (0)
+
+
+/// Start decoding a bit. This must be used together with rc_update_0()
+/// and rc_update_1():
+///
+/// rc_if_0(prob, seq) {
+/// rc_update_0(prob);
+/// // Do something
+/// } else {
+/// rc_update_1(prob);
+/// // Do something else
+/// }
+///
+#define rc_if_0(prob, seq) \
+ rc_normalize(seq); \
+ rc_bound = (rc.range >> RC_BIT_MODEL_TOTAL_BITS) * (prob); \
+ if (rc.code < rc_bound)
+
+
+/// Update the range decoder state and the used probability variable to
+/// match a decoded bit of 0.
+#define rc_update_0(prob) \
+do { \
+ rc.range = rc_bound; \
+ prob += (RC_BIT_MODEL_TOTAL - (prob)) >> RC_MOVE_BITS; \
+} while (0)
+
+
+/// Update the range decoder state and the used probability variable to
+/// match a decoded bit of 1.
+#define rc_update_1(prob) \
+do { \
+ rc.range -= rc_bound; \
+ rc.code -= rc_bound; \
+ prob -= (prob) >> RC_MOVE_BITS; \
+} while (0)
+
+
+/// Decodes one bit and runs action0 or action1 depending on the decoded bit.
+/// This macro is used as the last step in bittree reverse decoders since
+/// those don't use "symbol" for anything else than indexing the probability
+/// arrays.
+#define rc_bit_last(prob, action0, action1, seq) \
+do { \
+ rc_if_0(prob, seq) { \
+ rc_update_0(prob); \
+ action0; \
+ } else { \
+ rc_update_1(prob); \
+ action1; \
+ } \
+} while (0)
+
+
+/// Decodes one bit, updates "symbol", and runs action0 or action1 depending
+/// on the decoded bit.
+#define rc_bit(prob, action0, action1, seq) \
+ rc_bit_last(prob, \
+ symbol <<= 1; action0, \
+ symbol = (symbol << 1) + 1; action1, \
+ seq);
+
+
+/// Like rc_bit() but add "case seq:" as a prefix. This makes the unrolled
+/// loops more readable because the code isn't littered with "case"
+/// statements. On the other hand this also makes it less readable, since
+/// spotting the places where the decoder loop may be restarted is less
+/// obvious.
+#define rc_bit_case(prob, action0, action1, seq) \
+ case seq: rc_bit(prob, action0, action1, seq)
+
+
+/// Decode a bit without using a probability.
+#define rc_direct(dest, seq) \
+do { \
+ rc_normalize(seq); \
+ rc.range >>= 1; \
+ rc.code -= rc.range; \
+ rc_bound = UINT32_C(0) - (rc.code >> 31); \
+ rc.code += rc.range & rc_bound; \
+ dest = (dest << 1) + (rc_bound + 1); \
+} while (0)
+
+
+// NOTE: No macros are provided for bittree decoding. It seems to be simpler
+// to just write them open in the code.
+
+#endif
diff --git a/src/liblzma/rangecoder/range_encoder.h b/src/liblzma/rangecoder/range_encoder.h
new file mode 100644
index 0000000..d794eab
--- /dev/null
+++ b/src/liblzma/rangecoder/range_encoder.h
@@ -0,0 +1,350 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file range_encoder.h
+/// \brief Range Encoder
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_RANGE_ENCODER_H
+#define LZMA_RANGE_ENCODER_H
+
+#include "range_common.h"
+#include "price.h"
+
+
+/// Maximum number of symbols that can be put pending into lzma_range_encoder
+/// structure between calls to lzma_rc_encode(). For LZMA, 48+5 is enough
+/// (match with big distance and length followed by range encoder flush).
+#define RC_SYMBOLS_MAX 53
+
+
+typedef struct {
+ uint64_t low;
+ uint64_t cache_size;
+ uint32_t range;
+ uint8_t cache;
+
+ /// Number of bytes written out by rc_encode() -> rc_shift_low()
+ uint64_t out_total;
+
+ /// Number of symbols in the tables
+ size_t count;
+
+ /// rc_encode()'s position in the tables
+ size_t pos;
+
+ /// Symbols to encode
+ enum {
+ RC_BIT_0,
+ RC_BIT_1,
+ RC_DIRECT_0,
+ RC_DIRECT_1,
+ RC_FLUSH,
+ } symbols[RC_SYMBOLS_MAX];
+
+ /// Probabilities associated with RC_BIT_0 or RC_BIT_1
+ probability *probs[RC_SYMBOLS_MAX];
+
+} lzma_range_encoder;
+
+
+static inline void
+rc_reset(lzma_range_encoder *rc)
+{
+ rc->low = 0;
+ rc->cache_size = 1;
+ rc->range = UINT32_MAX;
+ rc->cache = 0;
+ rc->out_total = 0;
+ rc->count = 0;
+ rc->pos = 0;
+}
+
+
+static inline void
+rc_forget(lzma_range_encoder *rc)
+{
+ // This must not be called when rc_encode() is partially done.
+ assert(rc->pos == 0);
+ rc->count = 0;
+}
+
+
+static inline void
+rc_bit(lzma_range_encoder *rc, probability *prob, uint32_t bit)
+{
+ rc->symbols[rc->count] = bit;
+ rc->probs[rc->count] = prob;
+ ++rc->count;
+}
+
+
+static inline void
+rc_bittree(lzma_range_encoder *rc, probability *probs,
+ uint32_t bit_count, uint32_t symbol)
+{
+ uint32_t model_index = 1;
+
+ do {
+ const uint32_t bit = (symbol >> --bit_count) & 1;
+ rc_bit(rc, &probs[model_index], bit);
+ model_index = (model_index << 1) + bit;
+ } while (bit_count != 0);
+}
+
+
+static inline void
+rc_bittree_reverse(lzma_range_encoder *rc, probability *probs,
+ uint32_t bit_count, uint32_t symbol)
+{
+ uint32_t model_index = 1;
+
+ do {
+ const uint32_t bit = symbol & 1;
+ symbol >>= 1;
+ rc_bit(rc, &probs[model_index], bit);
+ model_index = (model_index << 1) + bit;
+ } while (--bit_count != 0);
+}
+
+
+static inline void
+rc_direct(lzma_range_encoder *rc,
+ uint32_t value, uint32_t bit_count)
+{
+ do {
+ rc->symbols[rc->count++]
+ = RC_DIRECT_0 + ((value >> --bit_count) & 1);
+ } while (bit_count != 0);
+}
+
+
+static inline void
+rc_flush(lzma_range_encoder *rc)
+{
+ for (size_t i = 0; i < 5; ++i)
+ rc->symbols[rc->count++] = RC_FLUSH;
+}
+
+
+static inline bool
+rc_shift_low(lzma_range_encoder *rc,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ if ((uint32_t)(rc->low) < (uint32_t)(0xFF000000)
+ || (uint32_t)(rc->low >> 32) != 0) {
+ do {
+ if (*out_pos == out_size)
+ return true;
+
+ out[*out_pos] = rc->cache + (uint8_t)(rc->low >> 32);
+ ++*out_pos;
+ ++rc->out_total;
+ rc->cache = 0xFF;
+
+ } while (--rc->cache_size != 0);
+
+ rc->cache = (rc->low >> 24) & 0xFF;
+ }
+
+ ++rc->cache_size;
+ rc->low = (rc->low & 0x00FFFFFF) << RC_SHIFT_BITS;
+
+ return false;
+}
+
+
+// NOTE: The last two arguments are uint64_t instead of size_t because in
+// the dummy version these refer to the size of the whole range-encoded
+// output stream, not just to the currently available output buffer space.
+static inline bool
+rc_shift_low_dummy(uint64_t *low, uint64_t *cache_size, uint8_t *cache,
+ uint64_t *out_pos, uint64_t out_size)
+{
+ if ((uint32_t)(*low) < (uint32_t)(0xFF000000)
+ || (uint32_t)(*low >> 32) != 0) {
+ do {
+ if (*out_pos == out_size)
+ return true;
+
+ ++*out_pos;
+ *cache = 0xFF;
+
+ } while (--*cache_size != 0);
+
+ *cache = (*low >> 24) & 0xFF;
+ }
+
+ ++*cache_size;
+ *low = (*low & 0x00FFFFFF) << RC_SHIFT_BITS;
+
+ return false;
+}
+
+
+static inline bool
+rc_encode(lzma_range_encoder *rc,
+ uint8_t *out, size_t *out_pos, size_t out_size)
+{
+ assert(rc->count <= RC_SYMBOLS_MAX);
+
+ while (rc->pos < rc->count) {
+ // Normalize
+ if (rc->range < RC_TOP_VALUE) {
+ if (rc_shift_low(rc, out, out_pos, out_size))
+ return true;
+
+ rc->range <<= RC_SHIFT_BITS;
+ }
+
+ // Encode a bit
+ switch (rc->symbols[rc->pos]) {
+ case RC_BIT_0: {
+ probability prob = *rc->probs[rc->pos];
+ rc->range = (rc->range >> RC_BIT_MODEL_TOTAL_BITS)
+ * prob;
+ prob += (RC_BIT_MODEL_TOTAL - prob) >> RC_MOVE_BITS;
+ *rc->probs[rc->pos] = prob;
+ break;
+ }
+
+ case RC_BIT_1: {
+ probability prob = *rc->probs[rc->pos];
+ const uint32_t bound = prob * (rc->range
+ >> RC_BIT_MODEL_TOTAL_BITS);
+ rc->low += bound;
+ rc->range -= bound;
+ prob -= prob >> RC_MOVE_BITS;
+ *rc->probs[rc->pos] = prob;
+ break;
+ }
+
+ case RC_DIRECT_0:
+ rc->range >>= 1;
+ break;
+
+ case RC_DIRECT_1:
+ rc->range >>= 1;
+ rc->low += rc->range;
+ break;
+
+ case RC_FLUSH:
+ // Prevent further normalizations.
+ rc->range = UINT32_MAX;
+
+ // Flush the last five bytes (see rc_flush()).
+ do {
+ if (rc_shift_low(rc, out, out_pos, out_size))
+ return true;
+ } while (++rc->pos < rc->count);
+
+ // Reset the range encoder so we are ready to continue
+ // encoding if we weren't finishing the stream.
+ rc_reset(rc);
+ return false;
+
+ default:
+ assert(0);
+ break;
+ }
+
+ ++rc->pos;
+ }
+
+ rc->count = 0;
+ rc->pos = 0;
+
+ return false;
+}
+
+
+static inline bool
+rc_encode_dummy(const lzma_range_encoder *rc, uint64_t out_limit)
+{
+ assert(rc->count <= RC_SYMBOLS_MAX);
+
+ uint64_t low = rc->low;
+ uint64_t cache_size = rc->cache_size;
+ uint32_t range = rc->range;
+ uint8_t cache = rc->cache;
+ uint64_t out_pos = rc->out_total;
+
+ size_t pos = rc->pos;
+
+ while (true) {
+ // Normalize
+ if (range < RC_TOP_VALUE) {
+ if (rc_shift_low_dummy(&low, &cache_size, &cache,
+ &out_pos, out_limit))
+ return true;
+
+ range <<= RC_SHIFT_BITS;
+ }
+
+ // This check is here because the normalization above must
+ // be done before flushing the last bytes.
+ if (pos == rc->count)
+ break;
+
+ // Encode a bit
+ switch (rc->symbols[pos]) {
+ case RC_BIT_0: {
+ probability prob = *rc->probs[pos];
+ range = (range >> RC_BIT_MODEL_TOTAL_BITS)
+ * prob;
+ break;
+ }
+
+ case RC_BIT_1: {
+ probability prob = *rc->probs[pos];
+ const uint32_t bound = prob * (range
+ >> RC_BIT_MODEL_TOTAL_BITS);
+ low += bound;
+ range -= bound;
+ break;
+ }
+
+ case RC_DIRECT_0:
+ range >>= 1;
+ break;
+
+ case RC_DIRECT_1:
+ range >>= 1;
+ low += range;
+ break;
+
+ case RC_FLUSH:
+ default:
+ assert(0);
+ break;
+ }
+
+ ++pos;
+ }
+
+ // Flush the last bytes. This isn't in rc->symbols[] so we do
+ // it after the above loop to take into account the size of
+ // the flushing that will be done at the end of the stream.
+ for (pos = 0; pos < 5; ++pos) {
+ if (rc_shift_low_dummy(&low, &cache_size,
+ &cache, &out_pos, out_limit))
+ return true;
+ }
+
+ return false;
+}
+
+
+static inline uint64_t
+rc_pending(const lzma_range_encoder *rc)
+{
+ return rc->cache_size + 5 - 1;
+}
+
+#endif
diff --git a/src/liblzma/simple/Makefile.inc b/src/liblzma/simple/Makefile.inc
new file mode 100644
index 0000000..dc092f9
--- /dev/null
+++ b/src/liblzma/simple/Makefile.inc
@@ -0,0 +1,51 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+liblzma_la_SOURCES += \
+ simple/simple_coder.c \
+ simple/simple_coder.h \
+ simple/simple_private.h
+
+if COND_ENCODER_SIMPLE
+liblzma_la_SOURCES += \
+ simple/simple_encoder.c \
+ simple/simple_encoder.h
+endif
+
+if COND_DECODER_SIMPLE
+liblzma_la_SOURCES += \
+ simple/simple_decoder.c \
+ simple/simple_decoder.h
+endif
+
+if COND_FILTER_X86
+liblzma_la_SOURCES += simple/x86.c
+endif
+
+if COND_FILTER_POWERPC
+liblzma_la_SOURCES += simple/powerpc.c
+endif
+
+if COND_FILTER_IA64
+liblzma_la_SOURCES += simple/ia64.c
+endif
+
+if COND_FILTER_ARM
+liblzma_la_SOURCES += simple/arm.c
+endif
+
+if COND_FILTER_ARMTHUMB
+liblzma_la_SOURCES += simple/armthumb.c
+endif
+
+if COND_FILTER_ARM64
+liblzma_la_SOURCES += simple/arm64.c
+endif
+
+if COND_FILTER_SPARC
+liblzma_la_SOURCES += simple/sparc.c
+endif
diff --git a/src/liblzma/simple/arm.c b/src/liblzma/simple/arm.c
new file mode 100644
index 0000000..6e53970
--- /dev/null
+++ b/src/liblzma/simple/arm.c
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file arm.c
+/// \brief Filter for ARM binaries
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+arm_code(void *simple lzma_attribute((__unused__)),
+ uint32_t now_pos, bool is_encoder,
+ uint8_t *buffer, size_t size)
+{
+ size_t i;
+ for (i = 0; i + 4 <= size; i += 4) {
+ if (buffer[i + 3] == 0xEB) {
+ uint32_t src = ((uint32_t)(buffer[i + 2]) << 16)
+ | ((uint32_t)(buffer[i + 1]) << 8)
+ | (uint32_t)(buffer[i + 0]);
+ src <<= 2;
+
+ uint32_t dest;
+ if (is_encoder)
+ dest = now_pos + (uint32_t)(i) + 8 + src;
+ else
+ dest = src - (now_pos + (uint32_t)(i) + 8);
+
+ dest >>= 2;
+ buffer[i + 2] = (dest >> 16);
+ buffer[i + 1] = (dest >> 8);
+ buffer[i + 0] = dest;
+ }
+ }
+
+ return i;
+}
+
+
+static lzma_ret
+arm_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters, bool is_encoder)
+{
+ return lzma_simple_coder_init(next, allocator, filters,
+ &arm_code, 0, 4, 4, is_encoder);
+}
+
+
+#ifdef HAVE_ENCODER_ARM
+extern lzma_ret
+lzma_simple_arm_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return arm_coder_init(next, allocator, filters, true);
+}
+#endif
+
+
+#ifdef HAVE_DECODER_ARM
+extern lzma_ret
+lzma_simple_arm_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return arm_coder_init(next, allocator, filters, false);
+}
+#endif
diff --git a/src/liblzma/simple/arm64.c b/src/liblzma/simple/arm64.c
new file mode 100644
index 0000000..0fe0824
--- /dev/null
+++ b/src/liblzma/simple/arm64.c
@@ -0,0 +1,137 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file arm64.c
+/// \brief Filter for ARM64 binaries
+///
+/// This converts ARM64 relative addresses in the BL and ADRP immediates
+/// to absolute values to increase redundancy of ARM64 code.
+///
+/// Converting B or ADR instructions was also tested but it's not useful.
+/// A majority of the jumps for the B instruction are very small (+/- 0xFF).
+/// These are typical for loops and if-statements. Encoding them to their
+/// absolute address reduces redundancy since many of the small relative
+/// jump values are repeated, but very few of the absolute addresses are.
+//
+// Authors: Lasse Collin
+// Jia Tan
+// Igor Pavlov
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+arm64_code(void *simple lzma_attribute((__unused__)),
+ uint32_t now_pos, bool is_encoder,
+ uint8_t *buffer, size_t size)
+{
+ size_t i;
+
+ // Clang 14.0.6 on x86-64 makes this four times bigger and 40 % slower
+ // with auto-vectorization that is enabled by default with -O2.
+ // Such vectorization bloat happens with -O2 when targeting ARM64 too
+ // but performance hasn't been tested.
+#ifdef __clang__
+# pragma clang loop vectorize(disable)
+#endif
+ for (i = 0; i + 4 <= size; i += 4) {
+ uint32_t pc = (uint32_t)(now_pos + i);
+ uint32_t instr = read32le(buffer + i);
+
+ if ((instr >> 26) == 0x25) {
+ // BL instruction:
+ // The full 26-bit immediate is converted.
+ // The range is +/-128 MiB.
+ //
+ // Using the full range is helps quite a lot with
+ // big executables. Smaller range would reduce false
+ // positives in non-code sections of the input though
+ // so this is a compromise that slightly favors big
+ // files. With the full range only six bits of the 32
+ // need to match to trigger a conversion.
+ const uint32_t src = instr;
+ instr = 0x94000000;
+
+ pc >>= 2;
+ if (!is_encoder)
+ pc = 0U - pc;
+
+ instr |= (src + pc) & 0x03FFFFFF;
+ write32le(buffer + i, instr);
+
+ } else if ((instr & 0x9F000000) == 0x90000000) {
+ // ADRP instruction:
+ // Only values in the range +/-512 MiB are converted.
+ //
+ // Using less than the full +/-4 GiB range reduces
+ // false positives on non-code sections of the input
+ // while being excellent for executables up to 512 MiB.
+ // The positive effect of ADRP conversion is smaller
+ // than that of BL but it also doesn't hurt so much in
+ // non-code sections of input because, with +/-512 MiB
+ // range, nine bits of 32 need to match to trigger a
+ // conversion (two 10-bit match choices = 9 bits).
+ const uint32_t src = ((instr >> 29) & 3)
+ | ((instr >> 3) & 0x001FFFFC);
+
+ // With the addition only one branch is needed to
+ // check the +/- range. This is usually false when
+ // processing ARM64 code so branch prediction will
+ // handle it well in terms of performance.
+ //
+ //if ((src & 0x001E0000) != 0
+ // && (src & 0x001E0000) != 0x001E0000)
+ if ((src + 0x00020000) & 0x001C0000)
+ continue;
+
+ instr &= 0x9000001F;
+
+ pc >>= 12;
+ if (!is_encoder)
+ pc = 0U - pc;
+
+ const uint32_t dest = src + pc;
+ instr |= (dest & 3) << 29;
+ instr |= (dest & 0x0003FFFC) << 3;
+ instr |= (0U - (dest & 0x00020000)) & 0x00E00000;
+ write32le(buffer + i, instr);
+ }
+ }
+
+ return i;
+}
+
+
+static lzma_ret
+arm64_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters, bool is_encoder)
+{
+ return lzma_simple_coder_init(next, allocator, filters,
+ &arm64_code, 0, 4, 4, is_encoder);
+}
+
+
+#ifdef HAVE_ENCODER_ARM64
+extern lzma_ret
+lzma_simple_arm64_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return arm64_coder_init(next, allocator, filters, true);
+}
+#endif
+
+
+#ifdef HAVE_DECODER_ARM64
+extern lzma_ret
+lzma_simple_arm64_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return arm64_coder_init(next, allocator, filters, false);
+}
+#endif
diff --git a/src/liblzma/simple/armthumb.c b/src/liblzma/simple/armthumb.c
new file mode 100644
index 0000000..25d8dbd
--- /dev/null
+++ b/src/liblzma/simple/armthumb.c
@@ -0,0 +1,80 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file armthumb.c
+/// \brief Filter for ARM-Thumb binaries
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+armthumb_code(void *simple lzma_attribute((__unused__)),
+ uint32_t now_pos, bool is_encoder,
+ uint8_t *buffer, size_t size)
+{
+ size_t i;
+ for (i = 0; i + 4 <= size; i += 2) {
+ if ((buffer[i + 1] & 0xF8) == 0xF0
+ && (buffer[i + 3] & 0xF8) == 0xF8) {
+ uint32_t src = (((uint32_t)(buffer[i + 1]) & 7) << 19)
+ | ((uint32_t)(buffer[i + 0]) << 11)
+ | (((uint32_t)(buffer[i + 3]) & 7) << 8)
+ | (uint32_t)(buffer[i + 2]);
+
+ src <<= 1;
+
+ uint32_t dest;
+ if (is_encoder)
+ dest = now_pos + (uint32_t)(i) + 4 + src;
+ else
+ dest = src - (now_pos + (uint32_t)(i) + 4);
+
+ dest >>= 1;
+ buffer[i + 1] = 0xF0 | ((dest >> 19) & 0x7);
+ buffer[i + 0] = (dest >> 11);
+ buffer[i + 3] = 0xF8 | ((dest >> 8) & 0x7);
+ buffer[i + 2] = (dest);
+ i += 2;
+ }
+ }
+
+ return i;
+}
+
+
+static lzma_ret
+armthumb_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters, bool is_encoder)
+{
+ return lzma_simple_coder_init(next, allocator, filters,
+ &armthumb_code, 0, 4, 2, is_encoder);
+}
+
+
+#ifdef HAVE_ENCODER_ARMTHUMB
+extern lzma_ret
+lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return armthumb_coder_init(next, allocator, filters, true);
+}
+#endif
+
+
+#ifdef HAVE_DECODER_ARMTHUMB
+extern lzma_ret
+lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return armthumb_coder_init(next, allocator, filters, false);
+}
+#endif
diff --git a/src/liblzma/simple/ia64.c b/src/liblzma/simple/ia64.c
new file mode 100644
index 0000000..692b0a2
--- /dev/null
+++ b/src/liblzma/simple/ia64.c
@@ -0,0 +1,116 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file ia64.c
+/// \brief Filter for IA64 (Itanium) binaries
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+ia64_code(void *simple lzma_attribute((__unused__)),
+ uint32_t now_pos, bool is_encoder,
+ uint8_t *buffer, size_t size)
+{
+ static const uint32_t BRANCH_TABLE[32] = {
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 4, 4, 6, 6, 0, 0, 7, 7,
+ 4, 4, 0, 0, 4, 4, 0, 0
+ };
+
+ size_t i;
+ for (i = 0; i + 16 <= size; i += 16) {
+ const uint32_t instr_template = buffer[i] & 0x1F;
+ const uint32_t mask = BRANCH_TABLE[instr_template];
+ uint32_t bit_pos = 5;
+
+ for (size_t slot = 0; slot < 3; ++slot, bit_pos += 41) {
+ if (((mask >> slot) & 1) == 0)
+ continue;
+
+ const size_t byte_pos = (bit_pos >> 3);
+ const uint32_t bit_res = bit_pos & 0x7;
+ uint64_t instruction = 0;
+
+ for (size_t j = 0; j < 6; ++j)
+ instruction += (uint64_t)(
+ buffer[i + j + byte_pos])
+ << (8 * j);
+
+ uint64_t inst_norm = instruction >> bit_res;
+
+ if (((inst_norm >> 37) & 0xF) == 0x5
+ && ((inst_norm >> 9) & 0x7) == 0
+ /* && (inst_norm & 0x3F)== 0 */
+ ) {
+ uint32_t src = (uint32_t)(
+ (inst_norm >> 13) & 0xFFFFF);
+ src |= ((inst_norm >> 36) & 1) << 20;
+
+ src <<= 4;
+
+ uint32_t dest;
+ if (is_encoder)
+ dest = now_pos + (uint32_t)(i) + src;
+ else
+ dest = src - (now_pos + (uint32_t)(i));
+
+ dest >>= 4;
+
+ inst_norm &= ~((uint64_t)(0x8FFFFF) << 13);
+ inst_norm |= (uint64_t)(dest & 0xFFFFF) << 13;
+ inst_norm |= (uint64_t)(dest & 0x100000)
+ << (36 - 20);
+
+ instruction &= (1U << bit_res) - 1;
+ instruction |= (inst_norm << bit_res);
+
+ for (size_t j = 0; j < 6; j++)
+ buffer[i + j + byte_pos] = (uint8_t)(
+ instruction
+ >> (8 * j));
+ }
+ }
+ }
+
+ return i;
+}
+
+
+static lzma_ret
+ia64_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters, bool is_encoder)
+{
+ return lzma_simple_coder_init(next, allocator, filters,
+ &ia64_code, 0, 16, 16, is_encoder);
+}
+
+
+#ifdef HAVE_ENCODER_IA64
+extern lzma_ret
+lzma_simple_ia64_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return ia64_coder_init(next, allocator, filters, true);
+}
+#endif
+
+
+#ifdef HAVE_DECODER_IA64
+extern lzma_ret
+lzma_simple_ia64_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return ia64_coder_init(next, allocator, filters, false);
+}
+#endif
diff --git a/src/liblzma/simple/powerpc.c b/src/liblzma/simple/powerpc.c
new file mode 100644
index 0000000..3a340fd
--- /dev/null
+++ b/src/liblzma/simple/powerpc.c
@@ -0,0 +1,80 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file powerpc.c
+/// \brief Filter for PowerPC (big endian) binaries
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+powerpc_code(void *simple lzma_attribute((__unused__)),
+ uint32_t now_pos, bool is_encoder,
+ uint8_t *buffer, size_t size)
+{
+ size_t i;
+ for (i = 0; i + 4 <= size; i += 4) {
+ // PowerPC branch 6(48) 24(Offset) 1(Abs) 1(Link)
+ if ((buffer[i] >> 2) == 0x12
+ && ((buffer[i + 3] & 3) == 1)) {
+
+ const uint32_t src
+ = (((uint32_t)(buffer[i + 0]) & 3) << 24)
+ | ((uint32_t)(buffer[i + 1]) << 16)
+ | ((uint32_t)(buffer[i + 2]) << 8)
+ | ((uint32_t)(buffer[i + 3]) & ~UINT32_C(3));
+
+ uint32_t dest;
+ if (is_encoder)
+ dest = now_pos + (uint32_t)(i) + src;
+ else
+ dest = src - (now_pos + (uint32_t)(i));
+
+ buffer[i + 0] = 0x48 | ((dest >> 24) & 0x03);
+ buffer[i + 1] = (dest >> 16);
+ buffer[i + 2] = (dest >> 8);
+ buffer[i + 3] &= 0x03;
+ buffer[i + 3] |= dest;
+ }
+ }
+
+ return i;
+}
+
+
+static lzma_ret
+powerpc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters, bool is_encoder)
+{
+ return lzma_simple_coder_init(next, allocator, filters,
+ &powerpc_code, 0, 4, 4, is_encoder);
+}
+
+
+#ifdef HAVE_ENCODER_POWERPC
+extern lzma_ret
+lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return powerpc_coder_init(next, allocator, filters, true);
+}
+#endif
+
+
+#ifdef HAVE_DECODER_POWERPC
+extern lzma_ret
+lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return powerpc_coder_init(next, allocator, filters, false);
+}
+#endif
diff --git a/src/liblzma/simple/simple_coder.c b/src/liblzma/simple/simple_coder.c
new file mode 100644
index 0000000..ed2d7fb
--- /dev/null
+++ b/src/liblzma/simple/simple_coder.c
@@ -0,0 +1,292 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file simple_coder.c
+/// \brief Wrapper for simple filters
+///
+/// Simple filters don't change the size of the data i.e. number of bytes
+/// in equals the number of bytes out.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+/// Copied or encodes/decodes more data to out[].
+static lzma_ret
+copy_or_code(lzma_simple_coder *coder, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ assert(!coder->end_was_reached);
+
+ if (coder->next.code == NULL) {
+ lzma_bufcpy(in, in_pos, in_size, out, out_pos, out_size);
+
+ // Check if end of stream was reached.
+ if (coder->is_encoder && action == LZMA_FINISH
+ && *in_pos == in_size)
+ coder->end_was_reached = true;
+
+ } else {
+ // Call the next coder in the chain to provide us some data.
+ const lzma_ret ret = coder->next.code(
+ coder->next.coder, allocator,
+ in, in_pos, in_size,
+ out, out_pos, out_size, action);
+
+ if (ret == LZMA_STREAM_END) {
+ assert(!coder->is_encoder
+ || action == LZMA_FINISH);
+ coder->end_was_reached = true;
+
+ } else if (ret != LZMA_OK) {
+ return ret;
+ }
+ }
+
+ return LZMA_OK;
+}
+
+
+static size_t
+call_filter(lzma_simple_coder *coder, uint8_t *buffer, size_t size)
+{
+ const size_t filtered = coder->filter(coder->simple,
+ coder->now_pos, coder->is_encoder,
+ buffer, size);
+ coder->now_pos += filtered;
+ return filtered;
+}
+
+
+static lzma_ret
+simple_code(void *coder_ptr, const lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size, lzma_action action)
+{
+ lzma_simple_coder *coder = coder_ptr;
+
+ // TODO: Add partial support for LZMA_SYNC_FLUSH. We can support it
+ // in cases when the filter is able to filter everything. With most
+ // simple filters it can be done at offset that is a multiple of 2,
+ // 4, or 16. With x86 filter, it needs good luck, and thus cannot
+ // be made to work predictably.
+ if (action == LZMA_SYNC_FLUSH)
+ return LZMA_OPTIONS_ERROR;
+
+ // Flush already filtered data from coder->buffer[] to out[].
+ if (coder->pos < coder->filtered) {
+ lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
+ out, out_pos, out_size);
+
+ // If we couldn't flush all the filtered data, return to
+ // application immediately.
+ if (coder->pos < coder->filtered)
+ return LZMA_OK;
+
+ if (coder->end_was_reached) {
+ assert(coder->filtered == coder->size);
+ return LZMA_STREAM_END;
+ }
+ }
+
+ // If we get here, there is no filtered data left in the buffer.
+ coder->filtered = 0;
+
+ assert(!coder->end_was_reached);
+
+ // If there is more output space left than there is unfiltered data
+ // in coder->buffer[], flush coder->buffer[] to out[], and copy/code
+ // more data to out[] hopefully filling it completely. Then filter
+ // the data in out[]. This step is where most of the data gets
+ // filtered if the buffer sizes used by the application are reasonable.
+ const size_t out_avail = out_size - *out_pos;
+ const size_t buf_avail = coder->size - coder->pos;
+ if (out_avail > buf_avail || buf_avail == 0) {
+ // Store the old position so that we know from which byte
+ // to start filtering.
+ const size_t out_start = *out_pos;
+
+ // Flush data from coder->buffer[] to out[], but don't reset
+ // coder->pos and coder->size yet. This way the coder can be
+ // restarted if the next filter in the chain returns e.g.
+ // LZMA_MEM_ERROR.
+ //
+ // Do the memcpy() conditionally because out can be NULL
+ // (in which case buf_avail is always 0). Calling memcpy()
+ // with a null-pointer is undefined even if the third
+ // argument is 0.
+ if (buf_avail > 0)
+ memcpy(out + *out_pos, coder->buffer + coder->pos,
+ buf_avail);
+
+ *out_pos += buf_avail;
+
+ // Copy/Encode/Decode more data to out[].
+ {
+ const lzma_ret ret = copy_or_code(coder, allocator,
+ in, in_pos, in_size,
+ out, out_pos, out_size, action);
+ assert(ret != LZMA_STREAM_END);
+ if (ret != LZMA_OK)
+ return ret;
+ }
+
+ // Filter out[] unless there is nothing to filter.
+ // This way we avoid null pointer + 0 (undefined behavior)
+ // when out == NULL.
+ const size_t size = *out_pos - out_start;
+ const size_t filtered = size == 0 ? 0 : call_filter(
+ coder, out + out_start, size);
+
+ const size_t unfiltered = size - filtered;
+ assert(unfiltered <= coder->allocated / 2);
+
+ // Now we can update coder->pos and coder->size, because
+ // the next coder in the chain (if any) was successful.
+ coder->pos = 0;
+ coder->size = unfiltered;
+
+ if (coder->end_was_reached) {
+ // The last byte has been copied to out[] already.
+ // They are left as is.
+ coder->size = 0;
+
+ } else if (unfiltered > 0) {
+ // There is unfiltered data left in out[]. Copy it to
+ // coder->buffer[] and rewind *out_pos appropriately.
+ *out_pos -= unfiltered;
+ memcpy(coder->buffer, out + *out_pos, unfiltered);
+ }
+ } else if (coder->pos > 0) {
+ memmove(coder->buffer, coder->buffer + coder->pos, buf_avail);
+ coder->size -= coder->pos;
+ coder->pos = 0;
+ }
+
+ assert(coder->pos == 0);
+
+ // If coder->buffer[] isn't empty, try to fill it by copying/decoding
+ // more data. Then filter coder->buffer[] and copy the successfully
+ // filtered data to out[]. It is probable, that some filtered and
+ // unfiltered data will be left to coder->buffer[].
+ if (coder->size > 0) {
+ {
+ const lzma_ret ret = copy_or_code(coder, allocator,
+ in, in_pos, in_size,
+ coder->buffer, &coder->size,
+ coder->allocated, action);
+ assert(ret != LZMA_STREAM_END);
+ if (ret != LZMA_OK)
+ return ret;
+ }
+
+ coder->filtered = call_filter(
+ coder, coder->buffer, coder->size);
+
+ // Everything is considered to be filtered if coder->buffer[]
+ // contains the last bytes of the data.
+ if (coder->end_was_reached)
+ coder->filtered = coder->size;
+
+ // Flush as much as possible.
+ lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
+ out, out_pos, out_size);
+ }
+
+ // Check if we got everything done.
+ if (coder->end_was_reached && coder->pos == coder->size)
+ return LZMA_STREAM_END;
+
+ return LZMA_OK;
+}
+
+
+static void
+simple_coder_end(void *coder_ptr, const lzma_allocator *allocator)
+{
+ lzma_simple_coder *coder = coder_ptr;
+ lzma_next_end(&coder->next, allocator);
+ lzma_free(coder->simple, allocator);
+ lzma_free(coder, allocator);
+ return;
+}
+
+
+static lzma_ret
+simple_coder_update(void *coder_ptr, const lzma_allocator *allocator,
+ const lzma_filter *filters_null lzma_attribute((__unused__)),
+ const lzma_filter *reversed_filters)
+{
+ lzma_simple_coder *coder = coder_ptr;
+
+ // No update support, just call the next filter in the chain.
+ return lzma_next_filter_update(
+ &coder->next, allocator, reversed_filters + 1);
+}
+
+
+extern lzma_ret
+lzma_simple_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters,
+ size_t (*filter)(void *simple, uint32_t now_pos,
+ bool is_encoder, uint8_t *buffer, size_t size),
+ size_t simple_size, size_t unfiltered_max,
+ uint32_t alignment, bool is_encoder)
+{
+ // Allocate memory for the lzma_simple_coder structure if needed.
+ lzma_simple_coder *coder = next->coder;
+ if (coder == NULL) {
+ // Here we allocate space also for the temporary buffer. We
+ // need twice the size of unfiltered_max, because then it
+ // is always possible to filter at least unfiltered_max bytes
+ // more data in coder->buffer[] if it can be filled completely.
+ coder = lzma_alloc(sizeof(lzma_simple_coder)
+ + 2 * unfiltered_max, allocator);
+ if (coder == NULL)
+ return LZMA_MEM_ERROR;
+
+ next->coder = coder;
+ next->code = &simple_code;
+ next->end = &simple_coder_end;
+ next->update = &simple_coder_update;
+
+ coder->next = LZMA_NEXT_CODER_INIT;
+ coder->filter = filter;
+ coder->allocated = 2 * unfiltered_max;
+
+ // Allocate memory for filter-specific data structure.
+ if (simple_size > 0) {
+ coder->simple = lzma_alloc(simple_size, allocator);
+ if (coder->simple == NULL)
+ return LZMA_MEM_ERROR;
+ } else {
+ coder->simple = NULL;
+ }
+ }
+
+ if (filters[0].options != NULL) {
+ const lzma_options_bcj *simple = filters[0].options;
+ coder->now_pos = simple->start_offset;
+ if (coder->now_pos & (alignment - 1))
+ return LZMA_OPTIONS_ERROR;
+ } else {
+ coder->now_pos = 0;
+ }
+
+ // Reset variables.
+ coder->is_encoder = is_encoder;
+ coder->end_was_reached = false;
+ coder->pos = 0;
+ coder->filtered = 0;
+ coder->size = 0;
+
+ return lzma_next_filter_init(&coder->next, allocator, filters + 1);
+}
diff --git a/src/liblzma/simple/simple_coder.h b/src/liblzma/simple/simple_coder.h
new file mode 100644
index 0000000..668a509
--- /dev/null
+++ b/src/liblzma/simple/simple_coder.h
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file simple_coder.h
+/// \brief Wrapper for simple filters
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SIMPLE_CODER_H
+#define LZMA_SIMPLE_CODER_H
+
+#include "common.h"
+
+
+extern lzma_ret lzma_simple_x86_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_x86_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_ia64_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_ia64_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_arm_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_arm_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_arm64_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_arm64_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+
+extern lzma_ret lzma_simple_sparc_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+extern lzma_ret lzma_simple_sparc_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+#endif
diff --git a/src/liblzma/simple/simple_decoder.c b/src/liblzma/simple/simple_decoder.c
new file mode 100644
index 0000000..dc4d241
--- /dev/null
+++ b/src/liblzma/simple/simple_decoder.c
@@ -0,0 +1,40 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file simple_decoder.c
+/// \brief Properties decoder for simple filters
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_decoder.h"
+
+
+extern lzma_ret
+lzma_simple_props_decode(void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size)
+{
+ if (props_size == 0)
+ return LZMA_OK;
+
+ if (props_size != 4)
+ return LZMA_OPTIONS_ERROR;
+
+ lzma_options_bcj *opt = lzma_alloc(
+ sizeof(lzma_options_bcj), allocator);
+ if (opt == NULL)
+ return LZMA_MEM_ERROR;
+
+ opt->start_offset = read32le(props);
+
+ // Don't leave an options structure allocated if start_offset is zero.
+ if (opt->start_offset == 0)
+ lzma_free(opt, allocator);
+ else
+ *options = opt;
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/simple/simple_decoder.h b/src/liblzma/simple/simple_decoder.h
new file mode 100644
index 0000000..bed8d37
--- /dev/null
+++ b/src/liblzma/simple/simple_decoder.h
@@ -0,0 +1,22 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file simple_decoder.h
+/// \brief Properties decoder for simple filters
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SIMPLE_DECODER_H
+#define LZMA_SIMPLE_DECODER_H
+
+#include "simple_coder.h"
+
+extern lzma_ret lzma_simple_props_decode(
+ void **options, const lzma_allocator *allocator,
+ const uint8_t *props, size_t props_size);
+
+#endif
diff --git a/src/liblzma/simple/simple_encoder.c b/src/liblzma/simple/simple_encoder.c
new file mode 100644
index 0000000..d2cc03e
--- /dev/null
+++ b/src/liblzma/simple/simple_encoder.c
@@ -0,0 +1,38 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file simple_encoder.c
+/// \brief Properties encoder for simple filters
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_encoder.h"
+
+
+extern lzma_ret
+lzma_simple_props_size(uint32_t *size, const void *options)
+{
+ const lzma_options_bcj *const opt = options;
+ *size = (opt == NULL || opt->start_offset == 0) ? 0 : 4;
+ return LZMA_OK;
+}
+
+
+extern lzma_ret
+lzma_simple_props_encode(const void *options, uint8_t *out)
+{
+ const lzma_options_bcj *const opt = options;
+
+ // The default start offset is zero, so we don't need to store any
+ // options unless the start offset is non-zero.
+ if (opt == NULL || opt->start_offset == 0)
+ return LZMA_OK;
+
+ write32le(out, opt->start_offset);
+
+ return LZMA_OK;
+}
diff --git a/src/liblzma/simple/simple_encoder.h b/src/liblzma/simple/simple_encoder.h
new file mode 100644
index 0000000..1cee482
--- /dev/null
+++ b/src/liblzma/simple/simple_encoder.h
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file simple_encoder.c
+/// \brief Properties encoder for simple filters
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SIMPLE_ENCODER_H
+#define LZMA_SIMPLE_ENCODER_H
+
+#include "simple_coder.h"
+
+
+extern lzma_ret lzma_simple_props_size(uint32_t *size, const void *options);
+
+extern lzma_ret lzma_simple_props_encode(const void *options, uint8_t *out);
+
+#endif
diff --git a/src/liblzma/simple/simple_private.h b/src/liblzma/simple/simple_private.h
new file mode 100644
index 0000000..9d2c0fd
--- /dev/null
+++ b/src/liblzma/simple/simple_private.h
@@ -0,0 +1,74 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file simple_private.h
+/// \brief Private definitions for so called simple filters
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef LZMA_SIMPLE_PRIVATE_H
+#define LZMA_SIMPLE_PRIVATE_H
+
+#include "simple_coder.h"
+
+
+typedef struct {
+ /// Next filter in the chain
+ lzma_next_coder next;
+
+ /// True if the next coder in the chain has returned LZMA_STREAM_END.
+ bool end_was_reached;
+
+ /// True if filter() should encode the data; false to decode.
+ /// Currently all simple filters use the same function for encoding
+ /// and decoding, because the difference between encoders and decoders
+ /// is very small.
+ bool is_encoder;
+
+ /// Pointer to filter-specific function, which does
+ /// the actual filtering.
+ size_t (*filter)(void *simple, uint32_t now_pos,
+ bool is_encoder, uint8_t *buffer, size_t size);
+
+ /// Pointer to filter-specific data, or NULL if filter doesn't need
+ /// any extra data.
+ void *simple;
+
+ /// The lowest 32 bits of the current position in the data. Most
+ /// filters need this to do conversions between absolute and relative
+ /// addresses.
+ uint32_t now_pos;
+
+ /// Size of the memory allocated for the buffer.
+ size_t allocated;
+
+ /// Flushing position in the temporary buffer. buffer[pos] is the
+ /// next byte to be copied to out[].
+ size_t pos;
+
+ /// buffer[filtered] is the first unfiltered byte. When pos is smaller
+ /// than filtered, there is unflushed filtered data in the buffer.
+ size_t filtered;
+
+ /// Total number of bytes (both filtered and unfiltered) currently
+ /// in the temporary buffer.
+ size_t size;
+
+ /// Temporary buffer
+ uint8_t buffer[];
+} lzma_simple_coder;
+
+
+extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters,
+ size_t (*filter)(void *simple, uint32_t now_pos,
+ bool is_encoder, uint8_t *buffer, size_t size),
+ size_t simple_size, size_t unfiltered_max,
+ uint32_t alignment, bool is_encoder);
+
+#endif
diff --git a/src/liblzma/simple/sparc.c b/src/liblzma/simple/sparc.c
new file mode 100644
index 0000000..bad8492
--- /dev/null
+++ b/src/liblzma/simple/sparc.c
@@ -0,0 +1,87 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file sparc.c
+/// \brief Filter for SPARC binaries
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+static size_t
+sparc_code(void *simple lzma_attribute((__unused__)),
+ uint32_t now_pos, bool is_encoder,
+ uint8_t *buffer, size_t size)
+{
+ size_t i;
+ for (i = 0; i + 4 <= size; i += 4) {
+
+ if ((buffer[i] == 0x40 && (buffer[i + 1] & 0xC0) == 0x00)
+ || (buffer[i] == 0x7F
+ && (buffer[i + 1] & 0xC0) == 0xC0)) {
+
+ uint32_t src = ((uint32_t)buffer[i + 0] << 24)
+ | ((uint32_t)buffer[i + 1] << 16)
+ | ((uint32_t)buffer[i + 2] << 8)
+ | ((uint32_t)buffer[i + 3]);
+
+ src <<= 2;
+
+ uint32_t dest;
+ if (is_encoder)
+ dest = now_pos + (uint32_t)(i) + src;
+ else
+ dest = src - (now_pos + (uint32_t)(i));
+
+ dest >>= 2;
+
+ dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF)
+ | (dest & 0x3FFFFF)
+ | 0x40000000;
+
+ buffer[i + 0] = (uint8_t)(dest >> 24);
+ buffer[i + 1] = (uint8_t)(dest >> 16);
+ buffer[i + 2] = (uint8_t)(dest >> 8);
+ buffer[i + 3] = (uint8_t)(dest);
+ }
+ }
+
+ return i;
+}
+
+
+static lzma_ret
+sparc_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters, bool is_encoder)
+{
+ return lzma_simple_coder_init(next, allocator, filters,
+ &sparc_code, 0, 4, 4, is_encoder);
+}
+
+
+#ifdef HAVE_ENCODER_SPARC
+extern lzma_ret
+lzma_simple_sparc_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return sparc_coder_init(next, allocator, filters, true);
+}
+#endif
+
+
+#ifdef HAVE_DECODER_SPARC
+extern lzma_ret
+lzma_simple_sparc_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return sparc_coder_init(next, allocator, filters, false);
+}
+#endif
diff --git a/src/liblzma/simple/x86.c b/src/liblzma/simple/x86.c
new file mode 100644
index 0000000..232b295
--- /dev/null
+++ b/src/liblzma/simple/x86.c
@@ -0,0 +1,163 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file x86.c
+/// \brief Filter for x86 binaries (BCJ filter)
+///
+// Authors: Igor Pavlov
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "simple_private.h"
+
+
+#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
+
+
+typedef struct {
+ uint32_t prev_mask;
+ uint32_t prev_pos;
+} lzma_simple_x86;
+
+
+static size_t
+x86_code(void *simple_ptr, uint32_t now_pos, bool is_encoder,
+ uint8_t *buffer, size_t size)
+{
+ static const bool MASK_TO_ALLOWED_STATUS[8]
+ = { true, true, true, false, true, false, false, false };
+
+ static const uint32_t MASK_TO_BIT_NUMBER[8]
+ = { 0, 1, 2, 2, 3, 3, 3, 3 };
+
+ lzma_simple_x86 *simple = simple_ptr;
+ uint32_t prev_mask = simple->prev_mask;
+ uint32_t prev_pos = simple->prev_pos;
+
+ if (size < 5)
+ return 0;
+
+ if (now_pos - prev_pos > 5)
+ prev_pos = now_pos - 5;
+
+ const size_t limit = size - 5;
+ size_t buffer_pos = 0;
+
+ while (buffer_pos <= limit) {
+ uint8_t b = buffer[buffer_pos];
+ if (b != 0xE8 && b != 0xE9) {
+ ++buffer_pos;
+ continue;
+ }
+
+ const uint32_t offset = now_pos + (uint32_t)(buffer_pos)
+ - prev_pos;
+ prev_pos = now_pos + (uint32_t)(buffer_pos);
+
+ if (offset > 5) {
+ prev_mask = 0;
+ } else {
+ for (uint32_t i = 0; i < offset; ++i) {
+ prev_mask &= 0x77;
+ prev_mask <<= 1;
+ }
+ }
+
+ b = buffer[buffer_pos + 4];
+
+ if (Test86MSByte(b)
+ && MASK_TO_ALLOWED_STATUS[(prev_mask >> 1) & 0x7]
+ && (prev_mask >> 1) < 0x10) {
+
+ uint32_t src = ((uint32_t)(b) << 24)
+ | ((uint32_t)(buffer[buffer_pos + 3]) << 16)
+ | ((uint32_t)(buffer[buffer_pos + 2]) << 8)
+ | (buffer[buffer_pos + 1]);
+
+ uint32_t dest;
+ while (true) {
+ if (is_encoder)
+ dest = src + (now_pos + (uint32_t)(
+ buffer_pos) + 5);
+ else
+ dest = src - (now_pos + (uint32_t)(
+ buffer_pos) + 5);
+
+ if (prev_mask == 0)
+ break;
+
+ const uint32_t i = MASK_TO_BIT_NUMBER[
+ prev_mask >> 1];
+
+ b = (uint8_t)(dest >> (24 - i * 8));
+
+ if (!Test86MSByte(b))
+ break;
+
+ src = dest ^ ((1U << (32 - i * 8)) - 1);
+ }
+
+ buffer[buffer_pos + 4]
+ = (uint8_t)(~(((dest >> 24) & 1) - 1));
+ buffer[buffer_pos + 3] = (uint8_t)(dest >> 16);
+ buffer[buffer_pos + 2] = (uint8_t)(dest >> 8);
+ buffer[buffer_pos + 1] = (uint8_t)(dest);
+ buffer_pos += 5;
+ prev_mask = 0;
+
+ } else {
+ ++buffer_pos;
+ prev_mask |= 1;
+ if (Test86MSByte(b))
+ prev_mask |= 0x10;
+ }
+ }
+
+ simple->prev_mask = prev_mask;
+ simple->prev_pos = prev_pos;
+
+ return buffer_pos;
+}
+
+
+static lzma_ret
+x86_coder_init(lzma_next_coder *next, const lzma_allocator *allocator,
+ const lzma_filter_info *filters, bool is_encoder)
+{
+ const lzma_ret ret = lzma_simple_coder_init(next, allocator, filters,
+ &x86_code, sizeof(lzma_simple_x86), 5, 1, is_encoder);
+
+ if (ret == LZMA_OK) {
+ lzma_simple_coder *coder = next->coder;
+ lzma_simple_x86 *simple = coder->simple;
+ simple->prev_mask = 0;
+ simple->prev_pos = (uint32_t)(-5);
+ }
+
+ return ret;
+}
+
+
+#ifdef HAVE_ENCODER_X86
+extern lzma_ret
+lzma_simple_x86_encoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return x86_coder_init(next, allocator, filters, true);
+}
+#endif
+
+
+#ifdef HAVE_DECODER_X86
+extern lzma_ret
+lzma_simple_x86_decoder_init(lzma_next_coder *next,
+ const lzma_allocator *allocator,
+ const lzma_filter_info *filters)
+{
+ return x86_coder_init(next, allocator, filters, false);
+}
+#endif
diff --git a/src/liblzma/validate_map.sh b/src/liblzma/validate_map.sh
new file mode 100644
index 0000000..2bf6f8b
--- /dev/null
+++ b/src/liblzma/validate_map.sh
@@ -0,0 +1,165 @@
+#!/bin/sh
+
+###############################################################################
+#
+# Check liblzma_*.map for certain types of errors.
+#
+# liblzma_generic.map is for FreeBSD and Solaris and possibly others
+# except GNU/Linux.
+#
+# liblzma_linux.map is for GNU/Linux only. This and the matching extra code
+# in the .c files make liblzma >= 5.2.7 compatible with binaries that were
+# linked against ill-patched liblzma in RHEL/CentOS 7. By providing the
+# compatibility in official XZ Utils release will hopefully prevent people
+# from further copying the broken patch to other places when they want
+# compatibility with binaries linked on RHEL/CentOS 7. The long version
+# of the story:
+#
+# RHEL/CentOS 7 shipped with 5.1.2alpha, including the threaded
+# encoder that is behind #ifdef LZMA_UNSTABLE in the API headers.
+# In 5.1.2alpha these symbols are under XZ_5.1.2alpha in liblzma.map.
+# API/ABI compatibility tracking isn't done between development
+# releases so newer releases didn't have XZ_5.1.2alpha anymore.
+#
+# Later RHEL/CentOS 7 updated xz to 5.2.2 but they wanted to keep
+# the exported symbols compatible with 5.1.2alpha. After checking
+# the ABI changes it turned out that >= 5.2.0 ABI is backward
+# compatible with the threaded encoder functions from 5.1.2alpha
+# (but not vice versa as fixes and extensions to these functions
+# were made between 5.1.2alpha and 5.2.0).
+#
+# In RHEL/CentOS 7, XZ Utils 5.2.2 was patched with
+# xz-5.2.2-compat-libs.patch to modify liblzma.map:
+#
+# - XZ_5.1.2alpha was added with lzma_stream_encoder_mt and
+# lzma_stream_encoder_mt_memusage. This matched XZ Utils 5.1.2alpha.
+#
+# - XZ_5.2 was replaced with XZ_5.2.2. It is clear that this was
+# an error; the intention was to keep using XZ_5.2 (XZ_5.2.2
+# has never been used in XZ Utils). So XZ_5.2.2 lists all
+# symbols that were listed under XZ_5.2 before the patch.
+# lzma_stream_encoder_mt and _mt_memusage are included too so
+# they are listed both here and under XZ_5.1.2alpha.
+#
+# The patch didn't add any __asm__(".symver ...") lines to the .c
+# files. Thus the resulting liblzma.so exports the threaded encoder
+# functions under XZ_5.1.2alpha only. Listing the two functions
+# also under XZ_5.2.2 in liblzma.map has no effect without
+# matching .symver lines.
+#
+# The lack of XZ_5.2 in RHEL/CentOS 7 means that binaries linked
+# against unpatched XZ Utils 5.2.x won't run on RHEL/CentOS 7.
+# This is unfortunate but this alone isn't too bad as the problem
+# is contained within RHEL/CentOS 7 and doesn't affect users
+# of other distributions. It could also be fixed internally in
+# RHEL/CentOS 7.
+#
+# The second problem is more serious: In XZ Utils 5.2.2 the API
+# headers don't have #ifdef LZMA_UNSTABLE for obvious reasons.
+# This is true in RHEL/CentOS 7 version too. Thus now programs
+# using new APIs can be compiled without an extra #define. However,
+# the programs end up depending on symbol version XZ_5.1.2alpha
+# (and possibly also XZ_5.2.2) instead of XZ_5.2 as they would
+# with an unpatched XZ Utils 5.2.2. This means that such binaries
+# won't run on other distributions shipping XZ Utils >= 5.2.0 as
+# they don't provide XZ_5.1.2alpha or XZ_5.2.2; they only provide
+# XZ_5.2 (and XZ_5.0). (This includes RHEL/CentOS 8 as the patch
+# luckily isn't included there anymore with XZ Utils 5.2.4.)
+#
+# Binaries built by RHEL/CentOS 7 users get distributed and then
+# people wonder why they don't run on some other distribution.
+# Seems that people have found out about the patch and been copying
+# it to some build scripts, seemingly curing the symptoms but
+# actually spreading the illness further and outside RHEL/CentOS 7.
+# Adding compatibility in an official XZ Utils release should work
+# as a vaccine against this ill patch and stop it from spreading.
+# The vaccine is kept GNU/Linux-only as other OSes should be immune
+# (hopefully it hasn't spread via some build script to other OSes).
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+LC_ALL=C
+export LC_ALL
+
+STATUS=0
+
+cd "$(dirname "$0")"
+
+# Get the list of symbols that aren't defined in liblzma_generic.map.
+SYMS=$(sed -n 's/^extern LZMA_API([^)]*) \([a-z0-9_]*\)(.*$/\1;/p' \
+ api/lzma/*.h \
+ | sort \
+ | grep -Fve "$(sed '/[{}:*]/d;/^$/d;s/^ //' liblzma_generic.map)")
+
+# Check that there are no old alpha or beta versions listed.
+VER=$(cd ../.. && sh build-aux/version.sh)
+NAMES=
+case $VER in
+ *alpha | *beta)
+ NAMES=$(sed -n 's/^.*XZ_\([^ ]*\)\(alpha\|beta\) .*$/\1\2/p' \
+ liblzma_generic.map | grep -Fv "$VER")
+ ;;
+esac
+
+# Check for duplicate lines. It can catch missing dependencies.
+DUPS=$(sort liblzma_generic.map | sed '/^$/d;/^global:$/d' | uniq -d)
+
+# Check that liblzma_linux.map is in sync with liblzma_generic.map.
+# The RHEL/CentOS 7 compatibility symbols are in a fixed location
+# so it makes it easy to remove them for comparison with liblzma_generic.map.
+#
+# NOTE: Putting XZ_5.2 before the compatibility symbols XZ_5.1.2alpha
+# and XZ_5.2.2 in liblzma_linux.map is important: If liblzma_linux.map is
+# incorrectly used without #define HAVE_SYMBOL_VERSIONS_LINUX, only the first
+# occurrence of each function name will be used from liblzma_linux.map;
+# the rest are ignored by the linker. Thus having XZ_5.2 before the
+# compatibility symbols means that @@XZ_5.2 will be used for the symbols
+# listed under XZ_5.2 {...} and the same function names later in
+# the file under XZ_5.1.2alpha {...} and XZ_5.2.2 {...} will be
+# ignored (@XZ_5.1.2alpha or @XZ_5.2.2 won't be added at all when
+# the #define HAVE_SYMBOL_VERSIONS_LINUX isn't used).
+IN_SYNC=
+if ! sed '109,123d' liblzma_linux.map \
+ | cmp -s - liblzma_generic.map; then
+ IN_SYNC=no
+fi
+
+# Print error messages if needed.
+if test -n "$SYMS$NAMES$DUPS$IN_SYNC"; then
+ echo
+ echo 'validate_map.sh found problems from liblzma_*.map:'
+ echo
+
+ if test -n "$SYMS"; then
+ echo 'liblzma_generic.map lacks the following symbols:'
+ echo "$SYMS"
+ echo
+ fi
+
+ if test -n "$NAMES"; then
+ echo 'Obsolete alpha or beta version names:'
+ echo "$NAMES"
+ echo
+ fi
+
+ if test -n "$DUPS"; then
+ echo 'Duplicate lines:'
+ echo "$DUPS"
+ echo
+ fi
+
+ if test -n "$IN_SYNC"; then
+ echo "liblzma_generic.map and liblzma_linux.map aren't in sync"
+ echo
+ fi
+
+ STATUS=1
+fi
+
+# Exit status is 1 if problems were found, 0 otherwise.
+exit "$STATUS"
diff --git a/src/lzmainfo/Makefile.am b/src/lzmainfo/Makefile.am
new file mode 100644
index 0000000..ff7172b
--- /dev/null
+++ b/src/lzmainfo/Makefile.am
@@ -0,0 +1,39 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+bin_PROGRAMS = lzmainfo
+
+lzmainfo_SOURCES = \
+ lzmainfo.c \
+ ../common/tuklib_progname.c \
+ ../common/tuklib_exit.c
+
+if COND_W32
+lzmainfo_SOURCES += lzmainfo_w32res.rc
+endif
+
+lzmainfo_CPPFLAGS = \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -I$(top_srcdir)/src/common \
+ -I$(top_srcdir)/src/liblzma/api \
+ -I$(top_builddir)/lib
+
+lzmainfo_LDADD = $(top_builddir)/src/liblzma/liblzma.la
+
+if COND_GNULIB
+lzmainfo_LDADD += $(top_builddir)/lib/libgnu.a
+endif
+
+lzmainfo_LDADD += $(LTLIBINTL)
+
+
+dist_man_MANS = lzmainfo.1
+
+# Windows resource compiler support
+.rc.o:
+ $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@
diff --git a/src/lzmainfo/Makefile.in b/src/lzmainfo/Makefile.in
new file mode 100644
index 0000000..0a18942
--- /dev/null
+++ b/src/lzmainfo/Makefile.in
@@ -0,0 +1,837 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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@
+bin_PROGRAMS = lzmainfo$(EXEEXT)
+@COND_W32_TRUE@am__append_1 = lzmainfo_w32res.rc
+@COND_GNULIB_TRUE@am__append_2 = $(top_builddir)/lib/libgnu.a
+subdir = src/lzmainfo
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__lzmainfo_SOURCES_DIST = lzmainfo.c ../common/tuklib_progname.c \
+ ../common/tuklib_exit.c lzmainfo_w32res.rc
+@COND_W32_TRUE@am__objects_1 = lzmainfo_w32res.$(OBJEXT)
+am_lzmainfo_OBJECTS = lzmainfo-lzmainfo.$(OBJEXT) \
+ lzmainfo-tuklib_progname.$(OBJEXT) \
+ lzmainfo-tuklib_exit.$(OBJEXT) $(am__objects_1)
+lzmainfo_OBJECTS = $(am_lzmainfo_OBJECTS)
+am__DEPENDENCIES_1 =
+lzmainfo_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_2) $(am__DEPENDENCIES_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 =
+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)/lzmainfo-lzmainfo.Po \
+ ./$(DEPDIR)/lzmainfo-tuklib_exit.Po \
+ ./$(DEPDIR)/lzmainfo-tuklib_progname.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 = $(lzmainfo_SOURCES)
+DIST_SOURCES = $(am__lzmainfo_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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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@
+lzmainfo_SOURCES = lzmainfo.c ../common/tuklib_progname.c \
+ ../common/tuklib_exit.c $(am__append_1)
+lzmainfo_CPPFLAGS = \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -I$(top_srcdir)/src/common \
+ -I$(top_srcdir)/src/liblzma/api \
+ -I$(top_builddir)/lib
+
+lzmainfo_LDADD = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_2) $(LTLIBINTL)
+dist_man_MANS = lzmainfo.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/lzmainfo/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/lzmainfo/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)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+lzmainfo$(EXEEXT): $(lzmainfo_OBJECTS) $(lzmainfo_DEPENDENCIES) $(EXTRA_lzmainfo_DEPENDENCIES)
+ @rm -f lzmainfo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(lzmainfo_OBJECTS) $(lzmainfo_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmainfo-lzmainfo.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmainfo-tuklib_exit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lzmainfo-tuklib_progname.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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 $@ $<
+
+lzmainfo-lzmainfo.o: lzmainfo.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-lzmainfo.o -MD -MP -MF $(DEPDIR)/lzmainfo-lzmainfo.Tpo -c -o lzmainfo-lzmainfo.o `test -f 'lzmainfo.c' || echo '$(srcdir)/'`lzmainfo.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmainfo-lzmainfo.Tpo $(DEPDIR)/lzmainfo-lzmainfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzmainfo.c' object='lzmainfo-lzmainfo.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) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-lzmainfo.o `test -f 'lzmainfo.c' || echo '$(srcdir)/'`lzmainfo.c
+
+lzmainfo-lzmainfo.obj: lzmainfo.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-lzmainfo.obj -MD -MP -MF $(DEPDIR)/lzmainfo-lzmainfo.Tpo -c -o lzmainfo-lzmainfo.obj `if test -f 'lzmainfo.c'; then $(CYGPATH_W) 'lzmainfo.c'; else $(CYGPATH_W) '$(srcdir)/lzmainfo.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmainfo-lzmainfo.Tpo $(DEPDIR)/lzmainfo-lzmainfo.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzmainfo.c' object='lzmainfo-lzmainfo.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) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-lzmainfo.obj `if test -f 'lzmainfo.c'; then $(CYGPATH_W) 'lzmainfo.c'; else $(CYGPATH_W) '$(srcdir)/lzmainfo.c'; fi`
+
+lzmainfo-tuklib_progname.o: ../common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_progname.o -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_progname.Tpo -c -o lzmainfo-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmainfo-tuklib_progname.Tpo $(DEPDIR)/lzmainfo-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='lzmainfo-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) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c
+
+lzmainfo-tuklib_progname.obj: ../common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_progname.Tpo -c -o lzmainfo-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)/lzmainfo-tuklib_progname.Tpo $(DEPDIR)/lzmainfo-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='lzmainfo-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) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-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`
+
+lzmainfo-tuklib_exit.o: ../common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_exit.o -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_exit.Tpo -c -o lzmainfo-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lzmainfo-tuklib_exit.Tpo $(DEPDIR)/lzmainfo-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='lzmainfo-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) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c
+
+lzmainfo-tuklib_exit.obj: ../common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lzmainfo-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/lzmainfo-tuklib_exit.Tpo -c -o lzmainfo-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)/lzmainfo-tuklib_exit.Tpo $(DEPDIR)/lzmainfo-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='lzmainfo-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) $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lzmainfo-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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/lzmainfo-lzmainfo.Po
+ -rm -f ./$(DEPDIR)/lzmainfo-tuklib_exit.Po
+ -rm -f ./$(DEPDIR)/lzmainfo-tuklib_progname.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
+
+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)/lzmainfo-lzmainfo.Po
+ -rm -f ./$(DEPDIR)/lzmainfo-tuklib_exit.Po
+ -rm -f ./$(DEPDIR)/lzmainfo-tuklib_progname.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
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.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-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-man uninstall-man1
+
+.PRECIOUS: Makefile
+
+
+# Windows resource compiler support
+.rc.o:
+ $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@
+
+# 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:
diff --git a/src/lzmainfo/lzmainfo.1 b/src/lzmainfo/lzmainfo.1
new file mode 100644
index 0000000..ce38eee
--- /dev/null
+++ b/src/lzmainfo/lzmainfo.1
@@ -0,0 +1,60 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.TH LZMAINFO 1 "2013-06-30" "Tukaani" "XZ Utils"
+.SH NAME
+lzmainfo \- show information stored in the .lzma file header
+.SH SYNOPSIS
+.B lzmainfo
+.RB [ \-\-help ]
+.RB [ \-\-version ]
+.RI [ file... ]
+.SH DESCRIPTION
+.B lzmainfo
+shows information stored in the
+.B .lzma
+file header.
+It reads the first 13 bytes from the specified
+.IR file ,
+decodes the header, and prints it to standard output in human
+readable format.
+If no
+.I files
+are given or
+.I file
+is
+.BR \- ,
+standard input is read.
+.PP
+Usually the most interesting information is
+the uncompressed size and the dictionary size.
+Uncompressed size can be shown only if
+the file is in the non-streamed
+.B .lzma
+format variant.
+The amount of memory required to decompress the file is
+a few dozen kilobytes plus the dictionary size.
+.PP
+.B lzmainfo
+is included in XZ Utils primarily for
+backward compatibility with LZMA Utils.
+.SH "EXIT STATUS"
+.TP
+.B 0
+All is good.
+.TP
+.B 1
+An error occurred.
+.SH BUGS
+.B lzmainfo
+uses
+.B MB
+while the correct suffix would be
+.B MiB
+(2^20 bytes).
+This is to keep the output compatible with LZMA Utils.
+.SH "SEE ALSO"
+.BR xz (1)
diff --git a/src/lzmainfo/lzmainfo.c b/src/lzmainfo/lzmainfo.c
new file mode 100644
index 0000000..71e6295
--- /dev/null
+++ b/src/lzmainfo/lzmainfo.c
@@ -0,0 +1,221 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file lzmainfo.c
+/// \brief lzmainfo tool for compatibility with LZMA Utils
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include <stdio.h>
+#include <errno.h>
+
+#include "lzma.h"
+#include "getopt.h"
+#include "tuklib_gettext.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
+
+#ifdef TUKLIB_DOSLIKE
+# include <fcntl.h>
+# include <io.h>
+#endif
+
+
+tuklib_attr_noreturn
+static void
+help(void)
+{
+ printf(
+_("Usage: %s [--help] [--version] [FILE]...\n"
+"Show information stored in the .lzma file header"), progname);
+
+ printf(_(
+"\nWith no FILE, or when FILE is -, read standard input.\n"));
+ printf("\n");
+
+ printf(_("Report bugs to <%s> (in English or Finnish).\n"),
+ PACKAGE_BUGREPORT);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+
+ tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, true);
+}
+
+
+tuklib_attr_noreturn
+static void
+version(void)
+{
+ puts("lzmainfo (" PACKAGE_NAME ") " LZMA_VERSION_STRING);
+ tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, true);
+}
+
+
+/// Parse command line options.
+static void
+parse_args(int argc, char **argv)
+{
+ enum {
+ OPT_HELP,
+ OPT_VERSION,
+ };
+
+ static const struct option long_opts[] = {
+ { "help", no_argument, NULL, OPT_HELP },
+ { "version", no_argument, NULL, OPT_VERSION },
+ { NULL, 0, NULL, 0 }
+ };
+
+ int c;
+ while ((c = getopt_long(argc, argv, "", long_opts, NULL)) != -1) {
+ switch (c) {
+ case OPT_HELP:
+ help();
+
+ case OPT_VERSION:
+ version();
+
+ default:
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ return;
+}
+
+
+/// Primitive base-2 logarithm for integers
+static uint32_t
+my_log2(uint32_t n)
+{
+ uint32_t e;
+ for (e = 0; n > 1; ++e, n /= 2) ;
+ return e;
+}
+
+
+/// Parse the .lzma header and display information about it.
+static bool
+lzmainfo(const char *name, FILE *f)
+{
+ uint8_t buf[13];
+ const size_t size = fread(buf, 1, sizeof(buf), f);
+ if (size != 13) {
+ fprintf(stderr, "%s: %s: %s\n", progname, name,
+ ferror(f) ? strerror(errno)
+ : _("File is too small to be a .lzma file"));
+ return true;
+ }
+
+ lzma_filter filter = { .id = LZMA_FILTER_LZMA1 };
+
+ // Parse the first five bytes.
+ switch (lzma_properties_decode(&filter, NULL, buf, 5)) {
+ case LZMA_OK:
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ fprintf(stderr, "%s: %s: %s\n", progname, name,
+ _("Not a .lzma file"));
+ return true;
+
+ case LZMA_MEM_ERROR:
+ fprintf(stderr, "%s: %s\n", progname, strerror(ENOMEM));
+ exit(EXIT_FAILURE);
+
+ default:
+ fprintf(stderr, "%s: %s\n", progname,
+ _("Internal error (bug)"));
+ exit(EXIT_FAILURE);
+ }
+
+ // Uncompressed size
+ uint64_t uncompressed_size = 0;
+ for (size_t i = 0; i < 8; ++i)
+ uncompressed_size |= (uint64_t)(buf[5 + i]) << (i * 8);
+
+ // Display the results. We don't want to translate these and also
+ // will use MB instead of MiB, because someone could be parsing
+ // this output and we don't want to break that when people move
+ // from LZMA Utils to XZ Utils.
+ if (f != stdin)
+ printf("%s\n", name);
+
+ printf("Uncompressed size: ");
+ if (uncompressed_size == UINT64_MAX)
+ printf("Unknown");
+ else
+ printf("%" PRIu64 " MB (%" PRIu64 " bytes)",
+ (uncompressed_size + 512 * 1024)
+ / (1024 * 1024),
+ uncompressed_size);
+
+ lzma_options_lzma *opt = filter.options;
+
+ printf("\nDictionary size: "
+ "%" PRIu32 " MB (2^%" PRIu32 " bytes)\n"
+ "Literal context bits (lc): %" PRIu32 "\n"
+ "Literal pos bits (lp): %" PRIu32 "\n"
+ "Number of pos bits (pb): %" PRIu32 "\n",
+ (opt->dict_size + 512 * 1024) / (1024 * 1024),
+ my_log2(opt->dict_size), opt->lc, opt->lp, opt->pb);
+
+ free(opt);
+
+ return false;
+}
+
+
+extern int
+main(int argc, char **argv)
+{
+ tuklib_progname_init(argv);
+ tuklib_gettext_init(PACKAGE, LOCALEDIR);
+
+ parse_args(argc, argv);
+
+#ifdef TUKLIB_DOSLIKE
+ setmode(fileno(stdin), O_BINARY);
+#endif
+
+ int ret = EXIT_SUCCESS;
+
+ // We print empty lines around the output only when reading from
+ // files specified on the command line. This is due to how
+ // LZMA Utils did it.
+ if (optind == argc) {
+ if (lzmainfo("(stdin)", stdin))
+ ret = EXIT_FAILURE;
+ } else {
+ printf("\n");
+
+ do {
+ if (strcmp(argv[optind], "-") == 0) {
+ if (lzmainfo("(stdin)", stdin))
+ ret = EXIT_FAILURE;
+ } else {
+ FILE *f = fopen(argv[optind], "r");
+ if (f == NULL) {
+ ret = EXIT_FAILURE;
+ fprintf(stderr, "%s: %s: %s\n",
+ progname,
+ argv[optind],
+ strerror(errno));
+ continue;
+ }
+
+ if (lzmainfo(argv[optind], f))
+ ret = EXIT_FAILURE;
+
+ printf("\n");
+ fclose(f);
+ }
+ } while (++optind < argc);
+ }
+
+ tuklib_exit(ret, EXIT_FAILURE, true);
+}
diff --git a/src/lzmainfo/lzmainfo_w32res.rc b/src/lzmainfo/lzmainfo_w32res.rc
new file mode 100644
index 0000000..378fbe6
--- /dev/null
+++ b/src/lzmainfo/lzmainfo_w32res.rc
@@ -0,0 +1,12 @@
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#define MY_TYPE VFT_APP
+#define MY_NAME "lzmainfo"
+#define MY_SUFFIX ".exe"
+#define MY_DESC "lzmainfo shows information about .lzma files"
+#include "common_w32res.rc"
diff --git a/src/scripts/Makefile.am b/src/scripts/Makefile.am
new file mode 100644
index 0000000..fe5742d
--- /dev/null
+++ b/src/scripts/Makefile.am
@@ -0,0 +1,89 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+nodist_bin_SCRIPTS = xzdiff xzgrep xzmore xzless
+dist_man_MANS = xzdiff.1 xzgrep.1 xzmore.1 xzless.1
+
+links = \
+ xzdiff-xzcmp \
+ xzgrep-xzegrep \
+ xzgrep-xzfgrep
+
+if COND_LZMALINKS
+links += \
+ xzdiff-lzdiff \
+ xzdiff-lzcmp \
+ xzgrep-lzgrep \
+ xzgrep-lzegrep \
+ xzgrep-lzfgrep \
+ xzmore-lzmore \
+ xzless-lzless
+endif
+
+install-exec-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ for pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
+ rm -f "$$link" && \
+ $(LN_S) "$$target" "$$link"; \
+ done
+
+# 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; \
+ for lang in $$languages; do \
+ mans= ; \
+ for man in $(dist_man_MANS); do \
+ man="$(top_srcdir)/po4a/man/$$lang/$$man" ; \
+ if test -f "$$man"; then \
+ mans="$$mans $$man"; \
+ fi; \
+ done; \
+ $(MAKE) dist_man_MANS="$$mans" man_MANS= \
+ mandir="$(mandir)/$$lang" install-man; \
+ done; \
+ for lang in . $$languages; do \
+ for pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' \
+ | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' \
+ | sed '$(transform)'` && \
+ man1dir="$(DESTDIR)$(mandir)/$$lang/man1" && \
+ if test -f "$$man1dir/$$target.1"; then ( \
+ cd "$$man1dir" && \
+ rm -f "$$link.1" && \
+ $(LN_S) "$$target.1" "$$link.1" \
+ ); fi; \
+ done; \
+ done
+
+uninstall-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ for pair in $(links); do \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
+ rm -f "$$link"; \
+ done
+ 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 pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' \
+ | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' \
+ | sed '$(transform)'` && \
+ rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$target.1" \
+ "$(DESTDIR)$(mandir)/$$lang/man1/$$link.1"; \
+ done; \
+ done
diff --git a/src/scripts/Makefile.in b/src/scripts/Makefile.in
new file mode 100644
index 0000000..42dbfff
--- /dev/null
+++ b/src/scripts/Makefile.in
@@ -0,0 +1,700 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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_LZMALINKS_TRUE@am__append_1 = \
+@COND_LZMALINKS_TRUE@ xzdiff-lzdiff \
+@COND_LZMALINKS_TRUE@ xzdiff-lzcmp \
+@COND_LZMALINKS_TRUE@ xzgrep-lzgrep \
+@COND_LZMALINKS_TRUE@ xzgrep-lzegrep \
+@COND_LZMALINKS_TRUE@ xzgrep-lzfgrep \
+@COND_LZMALINKS_TRUE@ xzmore-lzmore \
+@COND_LZMALINKS_TRUE@ xzless-lzless
+
+subdir = src/scripts
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 = xzdiff xzgrep xzmore xzless
+CONFIG_CLEAN_VPATH_FILES =
+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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+SCRIPTS = $(nodist_bin_SCRIPTS)
+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 =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
+ $(srcdir)/xzdiff.in $(srcdir)/xzgrep.in $(srcdir)/xzless.in \
+ $(srcdir)/xzmore.in
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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@
+nodist_bin_SCRIPTS = xzdiff xzgrep xzmore xzless
+dist_man_MANS = xzdiff.1 xzgrep.1 xzmore.1 xzless.1
+links = xzdiff-xzcmp xzgrep-xzegrep xzgrep-xzfgrep $(am__append_1)
+all: all-am
+
+.SUFFIXES:
+$(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/scripts/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/scripts/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):
+xzdiff: $(top_builddir)/config.status $(srcdir)/xzdiff.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+xzgrep: $(top_builddir)/config.status $(srcdir)/xzgrep.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+xzmore: $(top_builddir)/config.status $(srcdir)/xzmore.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+xzless: $(top_builddir)/config.status $(srcdir)/xzless.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(nodist_bin_SCRIPTS)'; 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 \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | 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; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$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_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-nodist_binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+
+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)
+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: check-am
+all-am: Makefile $(SCRIPTS) $(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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+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-nodist_binSCRIPTS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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 Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-nodist_binSCRIPTS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-data-am install-exec-am install-strip \
+ uninstall-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-data-hook install-dvi install-dvi-am install-exec \
+ install-exec-am install-exec-hook install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-nodist_binSCRIPTS install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-hook uninstall-man uninstall-man1 \
+ uninstall-nodist_binSCRIPTS
+
+.PRECIOUS: Makefile
+
+
+install-exec-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ for pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
+ rm -f "$$link" && \
+ $(LN_S) "$$target" "$$link"; \
+ done
+
+# 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; \
+ for lang in $$languages; do \
+ mans= ; \
+ for man in $(dist_man_MANS); do \
+ man="$(top_srcdir)/po4a/man/$$lang/$$man" ; \
+ if test -f "$$man"; then \
+ mans="$$mans $$man"; \
+ fi; \
+ done; \
+ $(MAKE) dist_man_MANS="$$mans" man_MANS= \
+ mandir="$(mandir)/$$lang" install-man; \
+ done; \
+ for lang in . $$languages; do \
+ for pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' \
+ | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' \
+ | sed '$(transform)'` && \
+ man1dir="$(DESTDIR)$(mandir)/$$lang/man1" && \
+ if test -f "$$man1dir/$$target.1"; then ( \
+ cd "$$man1dir" && \
+ rm -f "$$link.1" && \
+ $(LN_S) "$$target.1" "$$link.1" \
+ ); fi; \
+ done; \
+ done
+
+uninstall-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ for pair in $(links); do \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
+ rm -f "$$link"; \
+ done
+ 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 pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' \
+ | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' \
+ | sed '$(transform)'` && \
+ rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$target.1" \
+ "$(DESTDIR)$(mandir)/$$lang/man1/$$link.1"; \
+ done; \
+ 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:
diff --git a/src/scripts/xzdiff.1 b/src/scripts/xzdiff.1
new file mode 100644
index 0000000..24fed68
--- /dev/null
+++ b/src/scripts/xzdiff.1
@@ -0,0 +1,79 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\" Andrew Dudman
+.\"
+.\" License: GNU GPLv2+
+.\"
+.TH XZDIFF 1 "2021-06-04" "Tukaani" "XZ Utils"
+.SH NAME
+xzcmp, xzdiff, lzcmp, lzdiff \- compare compressed files
+.SH SYNOPSIS
+.B xzcmp
+.RI [ cmp_options "] " file1 " [" file2 ]
+.br
+.B xzdiff
+.RI [ diff_options "] " file1 " [" file2 ]
+.br
+.B lzcmp
+.RI [ cmp_options "] " file1 " [" file2 ]
+.br
+.B lzdiff
+.RI [ diff_options "] " file1 " [" file2 ]
+.SH DESCRIPTION
+.B xzcmp
+and
+.B xzdiff
+invoke
+.BR cmp (1)
+or
+.BR diff (1)
+on files compressed with
+.BR xz (1),
+.BR lzma (1),
+.BR gzip (1),
+.BR bzip2 (1),
+.BR lzop (1),
+or
+.BR zstd (1).
+All options specified are passed directly to
+.BR cmp (1)
+or
+.BR diff (1).
+If only one file is specified, then the files compared are
+.I file1
+(which must have a suffix of a supported compression format) and
+.I file1
+from which the compression format suffix has been stripped.
+If two files are specified,
+then they are uncompressed if necessary and fed to
+.BR cmp (1)
+or
+.BR diff (1).
+The exit status from
+.BR cmp (1)
+or
+.BR diff (1)
+is preserved unless a decompression error occurs; then exit status is 2.
+.PP
+The names
+.B lzcmp
+and
+.B lzdiff
+are provided for backward compatibility with LZMA Utils.
+.SH "SEE ALSO"
+.BR cmp (1),
+.BR diff (1),
+.BR xz (1),
+.BR gzip (1),
+.BR bzip2 (1),
+.BR lzop (1),
+.BR zstd (1),
+.BR zdiff (1)
+.SH BUGS
+Messages from the
+.BR cmp (1)
+or
+.BR diff (1)
+programs refer to temporary filenames instead of those specified.
diff --git a/src/scripts/xzdiff.in b/src/scripts/xzdiff.in
new file mode 100644
index 0000000..c17d78b
--- /dev/null
+++ b/src/scripts/xzdiff.in
@@ -0,0 +1,215 @@
+#!@POSIX_SHELL@
+
+# Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
+# Copyright (C) 1993 Jean-loup Gailly
+
+# Modified for XZ Utils by Andrew Dudman and Lasse Collin.
+
+# 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.
+
+@enable_path_for_scripts@
+#SET_PATH - This line is a placeholder to ease patching this script.
+
+# Instead of unsetting XZ_OPT, just make sure that xz will use file format
+# autodetection. This way memory usage limit and thread limit can be
+# specified via XZ_OPT. With gzip, bzip2, and lzop it's OK to just unset the
+# environment variables.
+xz='@xz@ --format=auto'
+unset GZIP BZIP BZIP2 LZOP
+
+case ${0##*/} in
+ *cmp*) prog=xzcmp; cmp=${CMP:-cmp};;
+ *) prog=xzdiff; cmp=${DIFF:-diff};;
+esac
+
+version="$prog (@PACKAGE_NAME@) @VERSION@"
+
+usage="Usage: ${0##*/} [OPTION]... FILE1 [FILE2]
+Compare FILE1 to FILE2, using their uncompressed contents if they are
+compressed. If FILE2 is omitted, then the files compared are FILE1 and
+FILE1 from which the compression format suffix has been stripped.
+
+Do comparisons like '$cmp' does. OPTIONs are the same as for '$cmp'.
+
+Report bugs to <@PACKAGE_BUGREPORT@>."
+
+# sed script to escape all ' for the shell, and then (to handle trailing
+# newlines correctly) turn trailing X on last line into '.
+escape='
+ s/'\''/'\''\\'\'''\''/g
+ $s/X$/'\''/
+'
+
+while :; do
+ case $1 in
+ --h*) printf '%s\n' "$usage" || exit 2; exit;;
+ --v*) printf '%s\n' "$version" || exit 2; exit;;
+ --) shift; break;;
+ -*\'*) cmp="$cmp '"`printf '%sX\n' "$1" | sed "$escape"`;;
+ -?*) cmp="$cmp '$1'";;
+ *) break;;
+ esac
+ shift
+done
+cmp="$cmp --"
+
+for file; do
+ test "X$file" = X- || <"$file" || exit 2
+done
+
+# xz needs -qQ to ignore warnings like unsupported check type.
+xz1="$xz -qQ"
+xz2="$xz -qQ"
+xz_status=0
+exec 3>&1
+
+if test $# -eq 1; then
+ case $1 in
+ *[-.]xz | *[-.]lzma | *[-.]lz | *.t[lx]z)
+ ;;
+ *[-.]bz2 | *.tbz | *.tbz2)
+ xz1=bzip2;;
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z)
+ xz1=gzip;;
+ *[-.]lzo | *.tzo)
+ xz1=lzop;;
+ *[-.]zst | *.tzst)
+ xz1='zstd -q';;
+ *)
+ printf '%s\n' "$0: $1: Unknown compressed file name suffix" >&2
+ exit 2;;
+ esac
+ case $1 in
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *[-.]lzo | *[-.]zst)
+ FILE=`expr "X$1" : 'X\(.*\)[-.][abglmostxzZ2]*$'`;;
+ *.t[abglx]z)
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)[abglx]z$'`ar;;
+ *.tbz2)
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)bz2$'`ar;;
+ *.tzo)
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)zo$'`ar;;
+ *.tzst)
+ FILE=`expr "X$1" : 'X\(.*[-.]t\)zst$'`ar;;
+ esac
+ xz_status=$(
+ exec 4>&1
+ ($xz1 -cd -- "$1" 4>&-; echo $? >&4) 3>&- | eval "$cmp" - '"$FILE"' >&3
+ )
+elif test $# -eq 2; then
+ case $1 in
+ *[-.]bz2 | *.tbz | *.tbz2) xz1=bzip2;;
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz1=gzip;;
+ *[-.]lzo | *.tzo) xz1=lzop;;
+ *[-.]zst | *.tzst) xz1='zstd -q';;
+ esac
+ case $2 in
+ *[-.]bz2 | *.tbz | *.tbz2) xz2=bzip2;;
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) xz2=gzip;;
+ *[-.]lzo | *.tzo) xz2=lzop;;
+ *[-.]zst | *.tzst) xz2='zstd -q';;
+ esac
+ case $1 in
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -)
+ case "$2" in
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -)
+ if test "$1$2" = --; then
+ xz_status=$(
+ exec 4>&1
+ ($xz1 -cdf - 4>&-; echo $? >&4) 3>&- |
+ eval "$cmp" - - >&3
+ )
+ elif # Reject Solaris 8's buggy /bin/bash 2.03.
+ echo X | (echo X | eval "$cmp" /dev/fd/5 - >/dev/null 2>&1) 5<&0; then
+ # NOTE: xz_status will contain two numbers.
+ xz_status=$(
+ exec 4>&1
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
+ ( ($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- 5<&- </dev/null |
+ eval "$cmp" /dev/fd/5 - >&3) 5<&0
+ )
+ else
+ F=`expr "/$2" : '.*/\(.*\)[-.][ablmotxz2]*$'` || F=$prog
+ tmp=
+ trap '
+ test -n "$tmp" && rm -rf "$tmp"
+ (exit 2); exit 2
+ ' HUP INT PIPE TERM 0
+ if type mktemp >/dev/null 2>&1; then
+ # Note that FreeBSD's mktemp isn't fully compatible with
+ # the implementations from mktemp.org and GNU coreutils.
+ # It is important that the -t argument is the last argument
+ # and that no "--" is used between -t and the template argument.
+ # This way this command works on all implementations.
+ tmp=`mktemp -d -t "$prog.XXXXXXXXXX"` || exit 2
+ else
+ # Fallback code if mktemp is missing. This isn't as
+ # robust as using mktemp since this doesn't try with
+ # different file names in case of a file name conflict.
+ #
+ # There's no need to save the original umask since
+ # we don't create any non-temp files. Note that using
+ # mkdir -m 0077 isn't secure since some mkdir implementations
+ # create the dir with the default umask and chmod the
+ # the dir afterwards.
+ umask 0077
+ mkdir -- "${TMPDIR-/tmp}/$prog.$$" || exit 2
+ tmp="${TMPDIR-/tmp}/$prog.$$"
+ fi
+ $xz2 -cdf -- "$2" > "$tmp/$F" || exit 2
+ xz_status=$(
+ exec 4>&1
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
+ eval "$cmp" - '"$tmp/$F"' >&3
+ )
+ cmp_status=$?
+ rm -rf "$tmp" || xz_status=$?
+ trap - HUP INT PIPE TERM 0
+ (exit $cmp_status)
+ fi;;
+ *)
+ xz_status=$(
+ exec 4>&1
+ ($xz1 -cdf -- "$1" 4>&-; echo $? >&4) 3>&- |
+ eval "$cmp" - '"$2"' >&3
+ );;
+ esac;;
+ *)
+ case "$2" in
+ *[-.][zZ] | *_z | *[-.][gx]z | *[-.]bz2 | *[-.]lzma | *[-.]lz | *.t[abglx]z | *.tbz2 | *[-.]lzo | *.tzo | *[-.]zst | *.tzst | -)
+ xz_status=$(
+ exec 4>&1
+ ($xz2 -cdf -- "$2" 4>&-; echo $? >&4) 3>&- |
+ eval "$cmp" '"$1"' - >&3
+ );;
+ *)
+ eval "$cmp" '"$1"' '"$2"';;
+ esac;;
+ esac
+else
+ printf '%s\n' "$0: Invalid number of operands; try \`${0##*/} --help' for help" >&2
+ exit 2
+fi
+
+cmp_status=$?
+for num in $xz_status ; do
+ # 0 from decompressor means successful decompression. SIGPIPE from
+ # decompressor is possible when diff or cmp exits before the whole file
+ # has been decompressed. In that case we want to retain the exit status
+ # from diff or cmp. Note that using "trap '' PIPE" is not possible
+ # because gzip changes its behavior (including exit status) if SIGPIPE
+ # is ignored.
+ test "$num" -eq 0 && continue
+ test "$num" -ge 128 \
+ && test "$(kill -l "$num" 2> /dev/null)" = "PIPE" \
+ && continue
+ exit 2
+done
+exit $cmp_status
diff --git a/src/scripts/xzgrep.1 b/src/scripts/xzgrep.1
new file mode 100644
index 0000000..e0514b8
--- /dev/null
+++ b/src/scripts/xzgrep.1
@@ -0,0 +1,113 @@
+.\"
+.\" Original zgrep.1 for gzip: Jean-loup Gailly
+.\" Charles Levert <charles@comm.polymtl.ca>
+.\"
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.TH XZGREP 1 "2022-07-19" "Tukaani" "XZ Utils"
+.SH NAME
+xzgrep \- search compressed files for a regular expression
+.SH SYNOPSIS
+.B xzgrep
+.RI [ grep_options ]
+.RB [ \-e ]
+.I pattern
+.RI [ file... ]
+.br
+.B xzegrep
+\&...
+.br
+.B xzfgrep
+\&...
+.br
+.B lzgrep
+\&...
+.br
+.B lzegrep
+\&...
+.br
+.B lzfgrep
+\&...
+.SH DESCRIPTION
+.B xzgrep
+invokes
+.BR grep (1)
+on
+.I files
+which may be either uncompressed or compressed with
+.BR xz (1),
+.BR lzma (1),
+.BR gzip (1),
+.BR bzip2 (1),
+.BR lzop (1),
+or
+.BR zstd (1).
+All options specified are passed directly to
+.BR grep (1).
+.PP
+If no
+.I file
+is specified, then standard input is decompressed if necessary
+and fed to
+.BR grep (1).
+When reading from standard input,
+.BR gzip (1),
+.BR bzip2 (1),
+.BR lzop (1),
+and
+.BR zstd (1)
+compressed files are not supported.
+.PP
+If
+.B xzgrep
+is invoked as
+.B xzegrep
+or
+.B xzfgrep
+then
+.B grep \-E
+or
+.B grep \-F
+is used instead of
+.BR grep (1).
+The same applies to names
+.BR lzgrep ,
+.BR lzegrep ,
+and
+.BR lzfgrep ,
+which are provided for backward compatibility with LZMA Utils.
+.SH EXIT STATUS
+.TP
+0
+At least one match was found from at least one of the input files.
+No errors occurred.
+.TP
+1
+No matches were found from any of the input files.
+No errors occurred.
+.TP
+>1
+One or more errors occurred.
+It is unknown if matches were found.
+.SH ENVIRONMENT
+.TP
+.B GREP
+If the
+.B GREP
+environment variable is set,
+.B xzgrep
+uses it instead of
+.BR grep (1),
+.BR "grep \-E" ,
+or
+.BR "grep \-F" .
+.SH "SEE ALSO"
+.BR grep (1),
+.BR xz (1),
+.BR gzip (1),
+.BR bzip2 (1),
+.BR lzop (1),
+.BR zstd (1),
+.BR zgrep (1)
diff --git a/src/scripts/xzgrep.in b/src/scripts/xzgrep.in
new file mode 100644
index 0000000..490e47d
--- /dev/null
+++ b/src/scripts/xzgrep.in
@@ -0,0 +1,298 @@
+#!@POSIX_SHELL@
+
+# xzgrep -- a wrapper around a grep program that decompresses files as needed
+# Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
+
+# Copyright (C) 1998, 2001, 2002, 2006, 2007 Free Software Foundation
+# Copyright (C) 1993 Jean-loup Gailly
+
+# Modified for XZ Utils by Andrew Dudman and Lasse Collin.
+
+# 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.
+
+@enable_path_for_scripts@
+#SET_PATH - This line is a placeholder to ease patching this script.
+
+# Instead of unsetting XZ_OPT, just make sure that xz will use file format
+# autodetection. This way memory usage limit and thread limit can be
+# specified via XZ_OPT. With gzip, bzip2, and lzop it's OK to just unset the
+# environment variables.
+xz='@xz@ --format=auto'
+unset GZIP BZIP BZIP2 LZOP
+
+case ${0##*/} in
+ *egrep*) prog=xzegrep; grep=${GREP:-grep -E};;
+ *fgrep*) prog=xzfgrep; grep=${GREP:-grep -F};;
+ *) prog=xzgrep; grep=${GREP:-grep};;
+esac
+
+version="$prog (@PACKAGE_NAME@) @VERSION@"
+
+usage="Usage: ${0##*/} [OPTION]... [-e] PATTERN [FILE]...
+Look for instances of PATTERN in the input FILEs, using their
+uncompressed contents if they are compressed.
+
+OPTIONs are the same as for '$grep'.
+
+Report bugs to <@PACKAGE_BUGREPORT@>."
+
+# sed script to escape all ' for the shell, and then (to handle trailing
+# newlines correctly) turn trailing X on last line into '.
+escape='
+ s/'\''/'\''\\'\'''\''/g
+ $s/X$/'\''/
+'
+operands=
+have_pat=0
+files_with_matches=0
+files_without_matches=0
+no_filename=0
+with_filename=0
+
+# See if -H and --label options are supported (GNU and *BSDs).
+if test f:x = "$(eval "echo x | $grep -H --label=f x 2> /dev/null")"; then
+ grep_supports_label=1
+else
+ grep_supports_label=0
+fi
+
+while test $# -ne 0; do
+ option=$1
+ shift
+ optarg=
+
+ case $option in
+ (-[0123456789abcdEFGhHiIKlLnoPqrRsTuUvVwxyzZ]*[!0123456789]*)
+ # Something like -Fiv was specified, that is, $option contains more
+ # than one option of which the first option (in this example -F)
+ # doesn't take an argument. Split the first option into a standalone
+ # argument and continue parsing the rest of the options (in this example,
+ # replace -Fiv with -iv in the argument list and set option=-F).
+ #
+ # If there are digits [0-9] they are treated as if they were a single
+ # option character because this syntax is an alias for -C for GNU grep.
+ # For example, "grep -25F" is equivalent to "grep -C25 -F". If only
+ # digits are specified like "grep -25" we don't get here because the
+ # above pattern in the case-statement doesn't match such strings.
+ arg2=-\'$(LC_ALL=C expr "X${option}X" : 'X-.[0-9]*\(.*\)' |
+ LC_ALL=C sed "$escape")
+ eval "set -- $arg2 "'${1+"$@"}'
+ option=$(LC_ALL=C expr "X$option" : 'X\(-.[0-9]*\)');;
+ (--binary-*=* | --[lm]a*=* | --reg*=*)
+ # These options require an argument and an argument has been provided
+ # with the --foo=argument syntax. All is good.
+ ;;
+ (-[ABCDefmX] | --binary-* | --file | --[lm]a* | --reg*)
+ # These options require an argument which should now be in $1.
+ # If it isn't, display an error and exit.
+ case ${1?"$option option requires an argument"} in
+ (*\'*)
+ optarg=" '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
+ (*)
+ optarg=" '$1'";;
+ esac
+ shift;;
+ (--)
+ break;;
+ (-?*)
+ ;;
+ (*)
+ case $option in
+ (*\'*)
+ operands="$operands '"$(printf '%sX\n' "$option" |
+ LC_ALL=C sed "$escape");;
+ (*)
+ operands="$operands '$option'";;
+ esac
+ ${POSIXLY_CORRECT+break}
+ continue;;
+ esac
+
+ case $option in
+ (-[drRzZ] | --di* | --exc* | --inc* | --rec* | --nu*)
+ printf >&2 '%s: %s: Option not supported\n' "$0" "$option"
+ exit 2;;
+ (-[ef]* | --file | --file=* | --reg*)
+ have_pat=1;;
+ (--h | --he | --hel | --help)
+ printf '%s\n' "$usage" || exit 2
+ exit;;
+ (-H | --wi | --wit | --with | --with- | --with-f | --with-fi \
+ | --with-fil | --with-file | --with-filen | --with-filena | --with-filenam \
+ | --with-filename)
+ with_filename=1
+ continue;;
+ (-l | --files-with-*)
+ files_with_matches=1
+ continue;;
+ (-L | --files-witho*)
+ files_without_matches=1
+ continue;;
+ (-h | --no-f*)
+ no_filename=1;;
+ (-V | --v | --ve | --ver | --vers | --versi | --versio | --version)
+ printf '%s\n' "$version" || exit 2
+ exit;;
+ esac
+
+ case $option in
+ (*\'?*)
+ option=\'$(printf '%sX\n' "$option" | LC_ALL=C sed "$escape");;
+ (*)
+ option="'$option'";;
+ esac
+
+ grep="$grep $option$optarg"
+done
+
+eval "set -- $operands "'${1+"$@"}'
+
+if test $have_pat -eq 0; then
+ case ${1?"Missing pattern; try \`${0##*/} --help' for help"} in
+ (*\'*)
+ grep="$grep -e '"$(printf '%sX\n' "$1" | LC_ALL=C sed "$escape");;
+ (*)
+ grep="$grep -e '$1'";;
+ esac
+ shift
+fi
+
+if test $# -eq 0; then
+ set -- -
+fi
+
+exec 3>&1
+
+# res=1 means that no file matched yet
+res=1
+
+for i; do
+ case $i in
+ *[-.][zZ] | *_z | *[-.]gz | *.t[ag]z) uncompress="gzip -cdf";;
+ *[-.]bz2 | *[-.]tbz | *.tbz2) uncompress="bzip2 -cdf";;
+ *[-.]lzo | *[-.]tzo) uncompress="lzop -cdf";;
+ *[-.]zst | *[-.]tzst) uncompress="zstd -cdfq";; # zstd needs -q.
+ *) uncompress="$xz -cdfqQ";; # -qQ to ignore warnings like unsupp. check.
+ esac
+ # xz_status will hold the decompressor's exit status.
+ # Exit status of grep (and in rare cases, printf or sed) is
+ # available as the exit status of this assignment command.
+ xz_status=$(
+ exec 5>&1
+ ($uncompress -- "$i" 5>&-; echo $? >&5) 3>&- |
+ if test $files_with_matches -eq 1; then
+ eval "$grep -q" && { printf '%s\n' "$i" || exit 2; }
+ elif test $files_without_matches -eq 1; then
+ eval "$grep -q" || {
+ r=$?
+ if test $r -eq 1; then
+ printf '%s\n' "$i" || r=2
+ fi
+ exit $r
+ }
+ elif test $with_filename -eq 0 &&
+ { test $# -eq 1 || test $no_filename -eq 1; }; then
+ eval "$grep"
+ elif test $grep_supports_label -eq 1; then
+ # The grep implementation in use allows us to specify the filename
+ # that grep will prefix to the output lines. This is faster and
+ # less prone to security bugs than the fallback method that uses sed.
+ # This also avoids confusing output with GNU grep >= 3.5 (2020-09-27)
+ # which prints "binary file matches" to stderr instead of stdout.
+ #
+ # If reading from stdin, let grep use whatever name it prefers for
+ # stdin. With GNU grep it is a locale-specific translated string.
+ if test "x$i" = "x-"; then
+ eval "$grep -H"
+ else
+ eval "$grep -H --label \"\$i\""
+ fi
+ else
+ # Append a colon so that the last character will never be a newline
+ # which would otherwise get lost in shell command substitution.
+ i="$i:"
+
+ # Escape & \ | and newlines only if such characters are present
+ # (speed optimization).
+ case $i in
+ (*'
+'* | *'&'* | *'\'* | *'|'*)
+ # If sed fails, set i to a known safe string to ensure that
+ # failing sed did not create a half-escaped dangerous string.
+ i=$(printf '%s\n' "$i" | LC_ALL=C sed 's/[&\|]/\\&/g; $!s/$/\\/') ||
+ i='(unknown filename):';;
+ esac
+
+ # $i already ends with a colon so do not add it here.
+ sed_script="s|^|$i|"
+
+ # If grep or sed fails, pick the larger value of the two exit statuses.
+ # If sed fails, use at least 2 since we use >= 2 to indicate errors.
+ r=$(
+ exec 4>&1
+ (eval "$grep" 4>&-; echo $? >&4) 3>&- |
+ LC_ALL=C sed "$sed_script" >&3 4>&-
+ ) || {
+ sed_status=$?
+ test "$sed_status" -lt 2 && sed_status=2
+ test "$r" -lt "$sed_status" && r=$sed_status
+ }
+ exit $r
+ fi >&3 5>&-
+ )
+ r=$?
+
+ # If grep or sed or other non-decompression command failed with a signal,
+ # exit immediately and ignore the possible remaining files.
+ #
+ # NOTE: Instead of 128 + signal_number, some shells use
+ # 256 + signal_number (ksh) or 384 + signal_number (yash).
+ # This is fine for us since their "exit" and "kill -l" commands take
+ # this into account. (At least the versions I tried do but there is
+ # a report of an old ksh variant whose "exit" truncates the exit status
+ # to 8 bits without any special handling for values indicating a signal.)
+ test "$r" -ge 128 && exit "$r"
+
+ if test -z "$xz_status"; then
+ # Something unusual happened, for example, we got a signal and
+ # the exit status of the decompressor was never echoed and thus
+ # $xz_status is empty. Exit immediately and ignore the possible
+ # remaining files.
+ exit 2
+ elif test "$xz_status" -ge 128; then
+ # The decompressor died due to a signal. SIGPIPE is ignored since it can
+ # occur if grep exits before the whole file has been decompressed (grep -q
+ # can do that). If the decompressor died with some other signal, exit
+ # immediately and ignore the possible remaining files.
+ test "$(kill -l "$xz_status" 2> /dev/null)" != "PIPE" && exit "$xz_status"
+ elif test "$xz_status" -gt 0; then
+ # Decompression failed but we will continue with the remaining
+ # files anwyway. Set exit status to at least 2 to indicate an error.
+ test "$r" -lt 2 && r=2
+ fi
+
+ # Since res=1 is the initial value, we only need to care about
+ # matches (r == 0) and errors (r >= 2) here; r == 1 can be ignored.
+ if test "$r" -ge 2; then
+ # An error occurred in decompressor, grep, or some other command. Update
+ # res unless a larger error code has been seen with an earlier file.
+ test "$res" -lt "$r" && res=$r
+ elif test "$r" -eq 0; then
+ # grep found a match and no errors occurred. Update res if no errors have
+ # occurred with earlier files.
+ test "$res" -eq 1 && res=0
+ fi
+done
+
+# 0: At least one file matched and no errors occurred.
+# 1: No matches were found and no errors occurred.
+# >=2: Error. It's unknown if matches were found.
+exit "$res"
diff --git a/src/scripts/xzless.1 b/src/scripts/xzless.1
new file mode 100644
index 0000000..2d05459
--- /dev/null
+++ b/src/scripts/xzless.1
@@ -0,0 +1,69 @@
+.\"
+.\" Authors: Andrew Dudman
+.\" Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.\" (Note that this file is not based on gzip's zless.1.)
+.\"
+.TH XZLESS 1 "2010-09-27" "Tukaani" "XZ Utils"
+.SH NAME
+xzless, lzless \- view xz or lzma compressed (text) files
+.SH SYNOPSIS
+.B xzless
+.RI [ file ...]
+.br
+.B lzless
+.RI [ file ...]
+.SH DESCRIPTION
+.B xzless
+is a filter that displays text from compressed files to a terminal.
+It works on files compressed with
+.BR xz (1)
+or
+.BR lzma (1).
+If no
+.I files
+are given,
+.B xzless
+reads from standard input.
+.PP
+.B xzless
+uses
+.BR less (1)
+to present its output.
+Unlike
+.BR xzmore ,
+its choice of pager cannot be altered by
+setting an environment variable.
+Commands are based on both
+.BR more (1)
+and
+.BR vi (1)
+and allow back and forth movement and searching.
+See the
+.BR less (1)
+manual for more information.
+.PP
+The command named
+.B lzless
+is provided for backward compatibility with LZMA Utils.
+.SH ENVIRONMENT
+.TP
+.B LESSMETACHARS
+A list of characters special to the shell.
+Set by
+.B xzless
+unless it is already set in the environment.
+.TP
+.B LESSOPEN
+Set to a command line to invoke the
+.BR xz (1)
+decompressor for preprocessing the input files to
+.BR less (1).
+.SH "SEE ALSO"
+.BR less (1),
+.BR xz (1),
+.BR xzmore (1),
+.BR zless (1)
diff --git a/src/scripts/xzless.in b/src/scripts/xzless.in
new file mode 100644
index 0000000..79a849e
--- /dev/null
+++ b/src/scripts/xzless.in
@@ -0,0 +1,59 @@
+#!@POSIX_SHELL@
+
+# Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
+
+# The original version for gzip was written by Paul Eggert.
+# Modified for XZ Utils by Andrew Dudman and Lasse Collin.
+
+# 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.
+
+@enable_path_for_scripts@
+#SET_PATH - This line is a placeholder to ease patching this script.
+
+# Instead of unsetting XZ_OPT, just make sure that xz will use file format
+# autodetection. This way memory usage limit and thread limit can be
+# specified via XZ_OPT.
+xz='@xz@ --format=auto'
+
+version='xzless (@PACKAGE_NAME@) @VERSION@'
+
+usage="Usage: ${0##*/} [OPTION]... [FILE]...
+Like 'less', but operate on the uncompressed contents of xz compressed FILEs.
+
+Options are the same as for 'less'.
+
+Report bugs to <@PACKAGE_BUGREPORT@>."
+
+case $1 in
+ --help) printf '%s\n' "$usage" || exit 2; exit;;
+ --version) printf '%s\n' "$version" || exit 2; exit;;
+esac
+
+if test "${LESSMETACHARS+set}" != set; then
+ # Work around a bug in less 394 and earlier;
+ # it mishandles the metacharacters '$%=~'.
+ space=' '
+ tab=' '
+ nl='
+'
+ LESSMETACHARS="$space$tab$nl'"';*?"()<>[|&^`#\$%=~'
+fi
+
+if test "$(less -V | { read _ ver _ && echo ${ver%%.*}; })" -ge 429; then
+ # less 429 or later: LESSOPEN pipe will be used on
+ # standard input if $LESSOPEN begins with |-.
+ LESSOPEN="|-$xz -cdfqQ -- %s"
+else
+ LESSOPEN="|$xz -cdfqQ -- %s"
+fi
+export LESSMETACHARS LESSOPEN
+
+exec less "$@"
diff --git a/src/scripts/xzmore.1 b/src/scripts/xzmore.1
new file mode 100644
index 0000000..9613974
--- /dev/null
+++ b/src/scripts/xzmore.1
@@ -0,0 +1,55 @@
+.\"
+.\" Original zdiff.1 for gzip: Jean-loup Gailly
+.\" Modifications for XZ Utils: Lasse Collin
+.\"
+.\" License: GNU GPLv2+
+.\"
+.TH XZMORE 1 "2013-06-30" "Tukaani" "XZ Utils"
+.SH NAME
+xzmore, lzmore \- view xz or lzma compressed (text) files
+.SH SYNOPSIS
+.B xzmore
+.RI [ file... ]
+.br
+.B lzmore
+.RI [ file... ]
+.SH DESCRIPTION
+.B xzmore
+is a filter which allows examination of
+.BR xz (1)
+or
+.BR lzma (1)
+compressed text files one screenful at a time
+on a soft-copy terminal.
+.PP
+To use a pager other than the default
+.B more,
+set environment variable
+.B PAGER
+to the name of the desired program.
+The name
+.B lzmore
+is provided for backward compatibility with LZMA Utils.
+.TP
+.BR e " or " q
+When the prompt \-\-More\-\-(Next file:
+.IR file )
+is printed, this command causes
+.B xzmore
+to exit.
+.TP
+.B s
+When the prompt \-\-More\-\-(Next file:
+.IR file )
+is printed, this command causes
+.B xzmore
+to skip the next file and continue.
+.PP
+For list of keyboard commands supported while actually viewing the
+content of a file, refer to manual of the pager you use, usually
+.BR more (1).
+.SH "SEE ALSO"
+.BR more (1),
+.BR xz (1),
+.BR xzless (1),
+.BR zmore (1)
diff --git a/src/scripts/xzmore.in b/src/scripts/xzmore.in
new file mode 100644
index 0000000..5188fda
--- /dev/null
+++ b/src/scripts/xzmore.in
@@ -0,0 +1,79 @@
+#!@POSIX_SHELL@
+
+# Copyright (C) 2001, 2002, 2007 Free Software Foundation
+# Copyright (C) 1992, 1993 Jean-loup Gailly
+
+# Modified for XZ Utils by Andrew Dudman and Lasse Collin.
+
+# 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.
+
+@enable_path_for_scripts@
+#SET_PATH - This line is a placeholder to ease patching this script.
+
+# Instead of unsetting XZ_OPT, just make sure that xz will use file format
+# autodetection. This way memory usage limit and thread limit can be
+# specified via XZ_OPT.
+xz='@xz@ --format=auto'
+
+version='xzmore (@PACKAGE_NAME@) @VERSION@'
+
+usage="Usage: ${0##*/} [OPTION]... [FILE]...
+Like 'more', but operate on the uncompressed contents of xz compressed FILEs.
+
+Report bugs to <@PACKAGE_BUGREPORT@>."
+
+case $1 in
+ --help) printf '%s\n' "$usage" || exit 2; exit;;
+ --version) printf '%s\n' "$version" || exit 2; exit;;
+esac
+
+oldtty=`stty -g 2>/dev/null`
+if stty -cbreak 2>/dev/null; then
+ cb='cbreak'; ncb='-cbreak'
+else
+ # 'stty min 1' resets eof to ^a on both SunOS and SysV!
+ cb='min 1 -icanon'; ncb='icanon eof ^d'
+fi
+if test $? -eq 0 && test -n "$oldtty"; then
+ trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
+else
+ trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
+fi
+
+if test $# = 0; then
+ if test -t 0; then
+ printf '%s\n' "$usage"; exit 1
+ else
+ $xz -cdfqQ | eval "${PAGER:-more}"
+ fi
+else
+ FIRST=1
+ for FILE; do
+ < "$FILE" || continue
+ if test $FIRST -eq 0; then
+ printf "%s--More--(Next file: %s)" "" "$FILE"
+ stty $cb -echo 2>/dev/null
+ ANS=`dd bs=1 count=1 2>/dev/null`
+ stty $ncb echo 2>/dev/null
+ echo " "
+ case "$ANS" in
+ [eq]) exit;;
+ esac
+ fi
+ if test "$ANS" != 's'; then
+ printf '%s\n' "------> $FILE <------"
+ $xz -cdfqQ -- "$FILE" | eval "${PAGER:-more}"
+ fi
+ if test -t 1; then
+ FIRST=0
+ fi
+ done
+fi
diff --git a/src/xz/Makefile.am b/src/xz/Makefile.am
new file mode 100644
index 0000000..4bc64f3
--- /dev/null
+++ b/src/xz/Makefile.am
@@ -0,0 +1,133 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+bin_PROGRAMS = xz
+
+xz_SOURCES = \
+ args.c \
+ args.h \
+ coder.c \
+ coder.h \
+ file_io.c \
+ file_io.h \
+ hardware.c \
+ hardware.h \
+ main.c \
+ main.h \
+ message.c \
+ message.h \
+ mytime.c \
+ mytime.h \
+ options.c \
+ options.h \
+ private.h \
+ signals.c \
+ signals.h \
+ suffix.c \
+ suffix.h \
+ util.c \
+ util.h \
+ ../common/tuklib_open_stdxxx.c \
+ ../common/tuklib_progname.c \
+ ../common/tuklib_exit.c \
+ ../common/tuklib_mbstr_width.c \
+ ../common/tuklib_mbstr_fw.c
+
+if COND_MAIN_DECODER
+xz_SOURCES += \
+ list.c \
+ list.h
+endif
+
+if COND_W32
+xz_SOURCES += xz_w32res.rc
+endif
+
+xz_CPPFLAGS = \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -I$(top_srcdir)/src/common \
+ -I$(top_srcdir)/src/liblzma/api \
+ -I$(top_builddir)/lib
+
+xz_LDADD = $(top_builddir)/src/liblzma/liblzma.la $(CAPSICUM_LIB)
+
+if COND_GNULIB
+xz_LDADD += $(top_builddir)/lib/libgnu.a
+endif
+
+# libgnu.a may need these libs, so this must be after libgnu.a.
+xz_LDADD += $(LTLIBINTL)
+
+
+# Windows resource compiler support
+.rc.o:
+ $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(xz_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@
+
+
+dist_man_MANS = xz.1
+
+
+## Create symlinks for unxz and xzcat for convenience. Create symlinks also
+## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
+xzlinks = unxz xzcat
+
+if COND_LZMALINKS
+xzlinks += lzma unlzma lzcat
+endif
+
+install-exec-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ target=`echo xz | sed '$(transform)'`$(EXEEXT) && \
+ for name in $(xzlinks); do \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
+ rm -f "$$link" && \
+ $(LN_S) "$$target" "$$link"; \
+ done
+
+# 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 xz | sed '$(transform)'` && \
+ for lang in . $$languages; do \
+ man="$(top_srcdir)/po4a/man/$$lang/xz.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 ( \
+ cd "$$man1dir" && \
+ for name in $(xzlinks); do \
+ link=`echo $$name | sed '$(transform)'` && \
+ rm -f "$$link.1" && \
+ $(LN_S) "$$target.1" "$$link.1"; \
+ done \
+ ); fi; \
+ done
+
+uninstall-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ for name in $(xzlinks); do \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
+ rm -f "$$link"; \
+ done
+ 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 xz $(xzlinks); do \
+ name=`echo $$name | sed '$(transform)'` && \
+ rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$name.1"; \
+ done; \
+ done
diff --git a/src/xz/Makefile.in b/src/xz/Makefile.in
new file mode 100644
index 0000000..e6422c5
--- /dev/null
+++ b/src/xz/Makefile.in
@@ -0,0 +1,1162 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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@
+bin_PROGRAMS = xz$(EXEEXT)
+@COND_MAIN_DECODER_TRUE@am__append_1 = \
+@COND_MAIN_DECODER_TRUE@ list.c \
+@COND_MAIN_DECODER_TRUE@ list.h
+
+@COND_W32_TRUE@am__append_2 = xz_w32res.rc
+@COND_GNULIB_TRUE@am__append_3 = $(top_builddir)/lib/libgnu.a
+@COND_LZMALINKS_TRUE@am__append_4 = lzma unlzma lzcat
+subdir = src/xz
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__xz_SOURCES_DIST = args.c args.h coder.c coder.h file_io.c \
+ file_io.h hardware.c hardware.h main.c main.h message.c \
+ message.h mytime.c mytime.h options.c options.h private.h \
+ signals.c signals.h suffix.c suffix.h util.c util.h \
+ ../common/tuklib_open_stdxxx.c ../common/tuklib_progname.c \
+ ../common/tuklib_exit.c ../common/tuklib_mbstr_width.c \
+ ../common/tuklib_mbstr_fw.c list.c list.h xz_w32res.rc
+@COND_MAIN_DECODER_TRUE@am__objects_1 = xz-list.$(OBJEXT)
+@COND_W32_TRUE@am__objects_2 = xz_w32res.$(OBJEXT)
+am_xz_OBJECTS = xz-args.$(OBJEXT) xz-coder.$(OBJEXT) \
+ xz-file_io.$(OBJEXT) xz-hardware.$(OBJEXT) xz-main.$(OBJEXT) \
+ xz-message.$(OBJEXT) xz-mytime.$(OBJEXT) xz-options.$(OBJEXT) \
+ xz-signals.$(OBJEXT) xz-suffix.$(OBJEXT) xz-util.$(OBJEXT) \
+ xz-tuklib_open_stdxxx.$(OBJEXT) xz-tuklib_progname.$(OBJEXT) \
+ xz-tuklib_exit.$(OBJEXT) xz-tuklib_mbstr_width.$(OBJEXT) \
+ xz-tuklib_mbstr_fw.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+xz_OBJECTS = $(am_xz_OBJECTS)
+am__DEPENDENCIES_1 =
+xz_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__DEPENDENCIES_1) $(am__append_3) $(am__DEPENDENCIES_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 =
+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)/xz-args.Po ./$(DEPDIR)/xz-coder.Po \
+ ./$(DEPDIR)/xz-file_io.Po ./$(DEPDIR)/xz-hardware.Po \
+ ./$(DEPDIR)/xz-list.Po ./$(DEPDIR)/xz-main.Po \
+ ./$(DEPDIR)/xz-message.Po ./$(DEPDIR)/xz-mytime.Po \
+ ./$(DEPDIR)/xz-options.Po ./$(DEPDIR)/xz-signals.Po \
+ ./$(DEPDIR)/xz-suffix.Po ./$(DEPDIR)/xz-tuklib_exit.Po \
+ ./$(DEPDIR)/xz-tuklib_mbstr_fw.Po \
+ ./$(DEPDIR)/xz-tuklib_mbstr_width.Po \
+ ./$(DEPDIR)/xz-tuklib_open_stdxxx.Po \
+ ./$(DEPDIR)/xz-tuklib_progname.Po ./$(DEPDIR)/xz-util.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 = $(xz_SOURCES)
+DIST_SOURCES = $(am__xz_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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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@
+xz_SOURCES = args.c args.h coder.c coder.h file_io.c file_io.h \
+ hardware.c hardware.h main.c main.h message.c message.h \
+ mytime.c mytime.h options.c options.h private.h signals.c \
+ signals.h suffix.c suffix.h util.c util.h \
+ ../common/tuklib_open_stdxxx.c ../common/tuklib_progname.c \
+ ../common/tuklib_exit.c ../common/tuklib_mbstr_width.c \
+ ../common/tuklib_mbstr_fw.c $(am__append_1) $(am__append_2)
+xz_CPPFLAGS = \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -I$(top_srcdir)/src/common \
+ -I$(top_srcdir)/src/liblzma/api \
+ -I$(top_builddir)/lib
+
+
+# libgnu.a may need these libs, so this must be after libgnu.a.
+xz_LDADD = $(top_builddir)/src/liblzma/liblzma.la $(CAPSICUM_LIB) \
+ $(am__append_3) $(LTLIBINTL)
+dist_man_MANS = xz.1
+xzlinks = unxz xzcat $(am__append_4)
+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/xz/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/xz/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)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+xz$(EXEEXT): $(xz_OBJECTS) $(xz_DEPENDENCIES) $(EXTRA_xz_DEPENDENCIES)
+ @rm -f xz$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(xz_OBJECTS) $(xz_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-args.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-coder.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-file_io.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-hardware.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-list.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-main.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-message.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-mytime.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-options.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-signals.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-suffix.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_exit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_mbstr_fw.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_mbstr_width.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_open_stdxxx.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-tuklib_progname.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xz-util.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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 $@ $<
+
+xz-args.o: args.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-args.o -MD -MP -MF $(DEPDIR)/xz-args.Tpo -c -o xz-args.o `test -f 'args.c' || echo '$(srcdir)/'`args.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-args.Tpo $(DEPDIR)/xz-args.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='args.c' object='xz-args.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-args.o `test -f 'args.c' || echo '$(srcdir)/'`args.c
+
+xz-args.obj: args.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-args.obj -MD -MP -MF $(DEPDIR)/xz-args.Tpo -c -o xz-args.obj `if test -f 'args.c'; then $(CYGPATH_W) 'args.c'; else $(CYGPATH_W) '$(srcdir)/args.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-args.Tpo $(DEPDIR)/xz-args.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='args.c' object='xz-args.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-args.obj `if test -f 'args.c'; then $(CYGPATH_W) 'args.c'; else $(CYGPATH_W) '$(srcdir)/args.c'; fi`
+
+xz-coder.o: coder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-coder.o -MD -MP -MF $(DEPDIR)/xz-coder.Tpo -c -o xz-coder.o `test -f 'coder.c' || echo '$(srcdir)/'`coder.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-coder.Tpo $(DEPDIR)/xz-coder.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='coder.c' object='xz-coder.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-coder.o `test -f 'coder.c' || echo '$(srcdir)/'`coder.c
+
+xz-coder.obj: coder.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-coder.obj -MD -MP -MF $(DEPDIR)/xz-coder.Tpo -c -o xz-coder.obj `if test -f 'coder.c'; then $(CYGPATH_W) 'coder.c'; else $(CYGPATH_W) '$(srcdir)/coder.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-coder.Tpo $(DEPDIR)/xz-coder.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='coder.c' object='xz-coder.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-coder.obj `if test -f 'coder.c'; then $(CYGPATH_W) 'coder.c'; else $(CYGPATH_W) '$(srcdir)/coder.c'; fi`
+
+xz-file_io.o: file_io.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-file_io.o -MD -MP -MF $(DEPDIR)/xz-file_io.Tpo -c -o xz-file_io.o `test -f 'file_io.c' || echo '$(srcdir)/'`file_io.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-file_io.Tpo $(DEPDIR)/xz-file_io.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_io.c' object='xz-file_io.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-file_io.o `test -f 'file_io.c' || echo '$(srcdir)/'`file_io.c
+
+xz-file_io.obj: file_io.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-file_io.obj -MD -MP -MF $(DEPDIR)/xz-file_io.Tpo -c -o xz-file_io.obj `if test -f 'file_io.c'; then $(CYGPATH_W) 'file_io.c'; else $(CYGPATH_W) '$(srcdir)/file_io.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-file_io.Tpo $(DEPDIR)/xz-file_io.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='file_io.c' object='xz-file_io.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-file_io.obj `if test -f 'file_io.c'; then $(CYGPATH_W) 'file_io.c'; else $(CYGPATH_W) '$(srcdir)/file_io.c'; fi`
+
+xz-hardware.o: hardware.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-hardware.o -MD -MP -MF $(DEPDIR)/xz-hardware.Tpo -c -o xz-hardware.o `test -f 'hardware.c' || echo '$(srcdir)/'`hardware.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-hardware.Tpo $(DEPDIR)/xz-hardware.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hardware.c' object='xz-hardware.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-hardware.o `test -f 'hardware.c' || echo '$(srcdir)/'`hardware.c
+
+xz-hardware.obj: hardware.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-hardware.obj -MD -MP -MF $(DEPDIR)/xz-hardware.Tpo -c -o xz-hardware.obj `if test -f 'hardware.c'; then $(CYGPATH_W) 'hardware.c'; else $(CYGPATH_W) '$(srcdir)/hardware.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-hardware.Tpo $(DEPDIR)/xz-hardware.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hardware.c' object='xz-hardware.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-hardware.obj `if test -f 'hardware.c'; then $(CYGPATH_W) 'hardware.c'; else $(CYGPATH_W) '$(srcdir)/hardware.c'; fi`
+
+xz-main.o: main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-main.o -MD -MP -MF $(DEPDIR)/xz-main.Tpo -c -o xz-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-main.Tpo $(DEPDIR)/xz-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='xz-main.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
+
+xz-main.obj: main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-main.obj -MD -MP -MF $(DEPDIR)/xz-main.Tpo -c -o xz-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-main.Tpo $(DEPDIR)/xz-main.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='xz-main.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
+
+xz-message.o: message.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-message.o -MD -MP -MF $(DEPDIR)/xz-message.Tpo -c -o xz-message.o `test -f 'message.c' || echo '$(srcdir)/'`message.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-message.Tpo $(DEPDIR)/xz-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='message.c' object='xz-message.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-message.o `test -f 'message.c' || echo '$(srcdir)/'`message.c
+
+xz-message.obj: message.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-message.obj -MD -MP -MF $(DEPDIR)/xz-message.Tpo -c -o xz-message.obj `if test -f 'message.c'; then $(CYGPATH_W) 'message.c'; else $(CYGPATH_W) '$(srcdir)/message.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-message.Tpo $(DEPDIR)/xz-message.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='message.c' object='xz-message.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-message.obj `if test -f 'message.c'; then $(CYGPATH_W) 'message.c'; else $(CYGPATH_W) '$(srcdir)/message.c'; fi`
+
+xz-mytime.o: mytime.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-mytime.o -MD -MP -MF $(DEPDIR)/xz-mytime.Tpo -c -o xz-mytime.o `test -f 'mytime.c' || echo '$(srcdir)/'`mytime.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-mytime.Tpo $(DEPDIR)/xz-mytime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mytime.c' object='xz-mytime.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-mytime.o `test -f 'mytime.c' || echo '$(srcdir)/'`mytime.c
+
+xz-mytime.obj: mytime.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-mytime.obj -MD -MP -MF $(DEPDIR)/xz-mytime.Tpo -c -o xz-mytime.obj `if test -f 'mytime.c'; then $(CYGPATH_W) 'mytime.c'; else $(CYGPATH_W) '$(srcdir)/mytime.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-mytime.Tpo $(DEPDIR)/xz-mytime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mytime.c' object='xz-mytime.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-mytime.obj `if test -f 'mytime.c'; then $(CYGPATH_W) 'mytime.c'; else $(CYGPATH_W) '$(srcdir)/mytime.c'; fi`
+
+xz-options.o: options.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-options.o -MD -MP -MF $(DEPDIR)/xz-options.Tpo -c -o xz-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-options.Tpo $(DEPDIR)/xz-options.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='options.c' object='xz-options.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-options.o `test -f 'options.c' || echo '$(srcdir)/'`options.c
+
+xz-options.obj: options.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-options.obj -MD -MP -MF $(DEPDIR)/xz-options.Tpo -c -o xz-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-options.Tpo $(DEPDIR)/xz-options.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='options.c' object='xz-options.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-options.obj `if test -f 'options.c'; then $(CYGPATH_W) 'options.c'; else $(CYGPATH_W) '$(srcdir)/options.c'; fi`
+
+xz-signals.o: signals.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-signals.o -MD -MP -MF $(DEPDIR)/xz-signals.Tpo -c -o xz-signals.o `test -f 'signals.c' || echo '$(srcdir)/'`signals.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-signals.Tpo $(DEPDIR)/xz-signals.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signals.c' object='xz-signals.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-signals.o `test -f 'signals.c' || echo '$(srcdir)/'`signals.c
+
+xz-signals.obj: signals.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-signals.obj -MD -MP -MF $(DEPDIR)/xz-signals.Tpo -c -o xz-signals.obj `if test -f 'signals.c'; then $(CYGPATH_W) 'signals.c'; else $(CYGPATH_W) '$(srcdir)/signals.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-signals.Tpo $(DEPDIR)/xz-signals.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signals.c' object='xz-signals.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-signals.obj `if test -f 'signals.c'; then $(CYGPATH_W) 'signals.c'; else $(CYGPATH_W) '$(srcdir)/signals.c'; fi`
+
+xz-suffix.o: suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-suffix.o -MD -MP -MF $(DEPDIR)/xz-suffix.Tpo -c -o xz-suffix.o `test -f 'suffix.c' || echo '$(srcdir)/'`suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-suffix.Tpo $(DEPDIR)/xz-suffix.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='suffix.c' object='xz-suffix.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-suffix.o `test -f 'suffix.c' || echo '$(srcdir)/'`suffix.c
+
+xz-suffix.obj: suffix.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-suffix.obj -MD -MP -MF $(DEPDIR)/xz-suffix.Tpo -c -o xz-suffix.obj `if test -f 'suffix.c'; then $(CYGPATH_W) 'suffix.c'; else $(CYGPATH_W) '$(srcdir)/suffix.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-suffix.Tpo $(DEPDIR)/xz-suffix.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='suffix.c' object='xz-suffix.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-suffix.obj `if test -f 'suffix.c'; then $(CYGPATH_W) 'suffix.c'; else $(CYGPATH_W) '$(srcdir)/suffix.c'; fi`
+
+xz-util.o: util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-util.o -MD -MP -MF $(DEPDIR)/xz-util.Tpo -c -o xz-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-util.Tpo $(DEPDIR)/xz-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='xz-util.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-util.o `test -f 'util.c' || echo '$(srcdir)/'`util.c
+
+xz-util.obj: util.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-util.obj -MD -MP -MF $(DEPDIR)/xz-util.Tpo -c -o xz-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-util.Tpo $(DEPDIR)/xz-util.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util.c' object='xz-util.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-util.obj `if test -f 'util.c'; then $(CYGPATH_W) 'util.c'; else $(CYGPATH_W) '$(srcdir)/util.c'; fi`
+
+xz-tuklib_open_stdxxx.o: ../common/tuklib_open_stdxxx.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_open_stdxxx.o -MD -MP -MF $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo -c -o xz-tuklib_open_stdxxx.o `test -f '../common/tuklib_open_stdxxx.c' || echo '$(srcdir)/'`../common/tuklib_open_stdxxx.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo $(DEPDIR)/xz-tuklib_open_stdxxx.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_open_stdxxx.c' object='xz-tuklib_open_stdxxx.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_open_stdxxx.o `test -f '../common/tuklib_open_stdxxx.c' || echo '$(srcdir)/'`../common/tuklib_open_stdxxx.c
+
+xz-tuklib_open_stdxxx.obj: ../common/tuklib_open_stdxxx.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_open_stdxxx.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo -c -o xz-tuklib_open_stdxxx.obj `if test -f '../common/tuklib_open_stdxxx.c'; then $(CYGPATH_W) '../common/tuklib_open_stdxxx.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_open_stdxxx.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_open_stdxxx.Tpo $(DEPDIR)/xz-tuklib_open_stdxxx.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_open_stdxxx.c' object='xz-tuklib_open_stdxxx.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_open_stdxxx.obj `if test -f '../common/tuklib_open_stdxxx.c'; then $(CYGPATH_W) '../common/tuklib_open_stdxxx.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_open_stdxxx.c'; fi`
+
+xz-tuklib_progname.o: ../common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_progname.o -MD -MP -MF $(DEPDIR)/xz-tuklib_progname.Tpo -c -o xz-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_progname.Tpo $(DEPDIR)/xz-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='xz-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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_progname.o `test -f '../common/tuklib_progname.c' || echo '$(srcdir)/'`../common/tuklib_progname.c
+
+xz-tuklib_progname.obj: ../common/tuklib_progname.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_progname.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_progname.Tpo -c -o xz-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)/xz-tuklib_progname.Tpo $(DEPDIR)/xz-tuklib_progname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_progname.c' object='xz-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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-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`
+
+xz-tuklib_exit.o: ../common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_exit.o -MD -MP -MF $(DEPDIR)/xz-tuklib_exit.Tpo -c -o xz-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_exit.Tpo $(DEPDIR)/xz-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='xz-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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_exit.o `test -f '../common/tuklib_exit.c' || echo '$(srcdir)/'`../common/tuklib_exit.c
+
+xz-tuklib_exit.obj: ../common/tuklib_exit.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_exit.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_exit.Tpo -c -o xz-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)/xz-tuklib_exit.Tpo $(DEPDIR)/xz-tuklib_exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_exit.c' object='xz-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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-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`
+
+xz-tuklib_mbstr_width.o: ../common/tuklib_mbstr_width.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_mbstr_width.o -MD -MP -MF $(DEPDIR)/xz-tuklib_mbstr_width.Tpo -c -o xz-tuklib_mbstr_width.o `test -f '../common/tuklib_mbstr_width.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_width.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_mbstr_width.Tpo $(DEPDIR)/xz-tuklib_mbstr_width.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_width.c' object='xz-tuklib_mbstr_width.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_mbstr_width.o `test -f '../common/tuklib_mbstr_width.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_width.c
+
+xz-tuklib_mbstr_width.obj: ../common/tuklib_mbstr_width.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_mbstr_width.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_mbstr_width.Tpo -c -o xz-tuklib_mbstr_width.obj `if test -f '../common/tuklib_mbstr_width.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_width.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_width.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_mbstr_width.Tpo $(DEPDIR)/xz-tuklib_mbstr_width.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_width.c' object='xz-tuklib_mbstr_width.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_mbstr_width.obj `if test -f '../common/tuklib_mbstr_width.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_width.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_width.c'; fi`
+
+xz-tuklib_mbstr_fw.o: ../common/tuklib_mbstr_fw.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_mbstr_fw.o -MD -MP -MF $(DEPDIR)/xz-tuklib_mbstr_fw.Tpo -c -o xz-tuklib_mbstr_fw.o `test -f '../common/tuklib_mbstr_fw.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_fw.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_mbstr_fw.Tpo $(DEPDIR)/xz-tuklib_mbstr_fw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_fw.c' object='xz-tuklib_mbstr_fw.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_mbstr_fw.o `test -f '../common/tuklib_mbstr_fw.c' || echo '$(srcdir)/'`../common/tuklib_mbstr_fw.c
+
+xz-tuklib_mbstr_fw.obj: ../common/tuklib_mbstr_fw.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-tuklib_mbstr_fw.obj -MD -MP -MF $(DEPDIR)/xz-tuklib_mbstr_fw.Tpo -c -o xz-tuklib_mbstr_fw.obj `if test -f '../common/tuklib_mbstr_fw.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_fw.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_fw.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-tuklib_mbstr_fw.Tpo $(DEPDIR)/xz-tuklib_mbstr_fw.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../common/tuklib_mbstr_fw.c' object='xz-tuklib_mbstr_fw.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-tuklib_mbstr_fw.obj `if test -f '../common/tuklib_mbstr_fw.c'; then $(CYGPATH_W) '../common/tuklib_mbstr_fw.c'; else $(CYGPATH_W) '$(srcdir)/../common/tuklib_mbstr_fw.c'; fi`
+
+xz-list.o: list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-list.o -MD -MP -MF $(DEPDIR)/xz-list.Tpo -c -o xz-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-list.Tpo $(DEPDIR)/xz-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list.c' object='xz-list.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c
+
+xz-list.obj: list.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xz-list.obj -MD -MP -MF $(DEPDIR)/xz-list.Tpo -c -o xz-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xz-list.Tpo $(DEPDIR)/xz-list.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list.c' object='xz-list.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) $(xz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xz-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f ./$(DEPDIR)/xz-args.Po
+ -rm -f ./$(DEPDIR)/xz-coder.Po
+ -rm -f ./$(DEPDIR)/xz-file_io.Po
+ -rm -f ./$(DEPDIR)/xz-hardware.Po
+ -rm -f ./$(DEPDIR)/xz-list.Po
+ -rm -f ./$(DEPDIR)/xz-main.Po
+ -rm -f ./$(DEPDIR)/xz-message.Po
+ -rm -f ./$(DEPDIR)/xz-mytime.Po
+ -rm -f ./$(DEPDIR)/xz-options.Po
+ -rm -f ./$(DEPDIR)/xz-signals.Po
+ -rm -f ./$(DEPDIR)/xz-suffix.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_exit.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_mbstr_fw.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_mbstr_width.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_open_stdxxx.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_progname.Po
+ -rm -f ./$(DEPDIR)/xz-util.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
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+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)/xz-args.Po
+ -rm -f ./$(DEPDIR)/xz-coder.Po
+ -rm -f ./$(DEPDIR)/xz-file_io.Po
+ -rm -f ./$(DEPDIR)/xz-hardware.Po
+ -rm -f ./$(DEPDIR)/xz-list.Po
+ -rm -f ./$(DEPDIR)/xz-main.Po
+ -rm -f ./$(DEPDIR)/xz-message.Po
+ -rm -f ./$(DEPDIR)/xz-mytime.Po
+ -rm -f ./$(DEPDIR)/xz-options.Po
+ -rm -f ./$(DEPDIR)/xz-signals.Po
+ -rm -f ./$(DEPDIR)/xz-suffix.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_exit.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_mbstr_fw.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_mbstr_width.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_open_stdxxx.Po
+ -rm -f ./$(DEPDIR)/xz-tuklib_progname.Po
+ -rm -f ./$(DEPDIR)/xz-util.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-exec-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-exec-hook \
+ 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
+.rc.o:
+ $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(xz_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@
+
+install-exec-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ target=`echo xz | sed '$(transform)'`$(EXEEXT) && \
+ for name in $(xzlinks); do \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
+ rm -f "$$link" && \
+ $(LN_S) "$$target" "$$link"; \
+ done
+
+# 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 xz | sed '$(transform)'` && \
+ for lang in . $$languages; do \
+ man="$(top_srcdir)/po4a/man/$$lang/xz.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 ( \
+ cd "$$man1dir" && \
+ for name in $(xzlinks); do \
+ link=`echo $$name | sed '$(transform)'` && \
+ rm -f "$$link.1" && \
+ $(LN_S) "$$target.1" "$$link.1"; \
+ done \
+ ); fi; \
+ done
+
+uninstall-hook:
+ cd "$(DESTDIR)$(bindir)" && \
+ for name in $(xzlinks); do \
+ link=`echo $$name | sed '$(transform)'`$(LN_EXEEXT) && \
+ rm -f "$$link"; \
+ done
+ 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 xz $(xzlinks); do \
+ name=`echo $$name | sed '$(transform)'` && \
+ rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$name.1"; \
+ done; \
+ 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:
diff --git a/src/xz/args.c b/src/xz/args.c
new file mode 100644
index 0000000..17e778c
--- /dev/null
+++ b/src/xz/args.c
@@ -0,0 +1,763 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file args.c
+/// \brief Argument parsing
+///
+/// \note Filter-specific options parsing is in options.c.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#include "getopt.h"
+#include <ctype.h>
+
+
+bool opt_stdout = false;
+bool opt_force = false;
+bool opt_keep_original = false;
+bool opt_robot = false;
+bool opt_ignore_check = false;
+
+// We don't modify or free() this, but we need to assign it in some
+// non-const pointers.
+const char stdin_filename[] = "(stdin)";
+
+
+/// Parse and set the memory usage limit for compression, decompression,
+/// and/or multithreaded decompression.
+static void
+parse_memlimit(const char *name, const char *name_percentage, const char *str,
+ bool set_compress, bool set_decompress, bool set_mtdec)
+{
+ bool is_percentage = false;
+ uint64_t value;
+
+ const size_t len = strlen(str);
+ if (len > 0 && str[len - 1] == '%') {
+ // Make a copy so that we can get rid of %.
+ //
+ // In the past str wasn't const and we modified it directly
+ // but that modified argv[] and thus affected what was visible
+ // in "ps auxf" or similar tools which was confusing. For
+ // example, --memlimit=50% would show up as --memlimit=50
+ // since the percent sign was overwritten here.
+ char *s = xstrdup(str);
+ s[len - 1] = '\0';
+ is_percentage = true;
+ value = str_to_uint64(name_percentage, s, 1, 100);
+ free(s);
+ } else {
+ // On 32-bit systems, SIZE_MAX would make more sense than
+ // UINT64_MAX. But use UINT64_MAX still so that scripts
+ // that assume > 4 GiB values don't break.
+ value = str_to_uint64(name, str, 0, UINT64_MAX);
+ }
+
+ hardware_memlimit_set(value, set_compress, set_decompress, set_mtdec,
+ is_percentage);
+ return;
+}
+
+
+static void
+parse_block_list(const char *str_const)
+{
+ // We need a modifiable string in the for-loop.
+ char *str_start = xstrdup(str_const);
+ char *str = str_start;
+
+ // It must be non-empty and not begin with a comma.
+ if (str[0] == '\0' || str[0] == ',')
+ message_fatal(_("%s: Invalid argument to --block-list"), str);
+
+ // Count the number of comma-separated strings.
+ size_t count = 1;
+ for (size_t i = 0; str[i] != '\0'; ++i)
+ if (str[i] == ',')
+ ++count;
+
+ // Prevent an unlikely integer overflow.
+ if (count > SIZE_MAX / sizeof(uint64_t) - 1)
+ message_fatal(_("%s: Too many arguments to --block-list"),
+ str);
+
+ // Allocate memory to hold all the sizes specified.
+ // If --block-list was specified already, its value is forgotten.
+ free(opt_block_list);
+ opt_block_list = xmalloc((count + 1) * sizeof(uint64_t));
+
+ for (size_t i = 0; i < count; ++i) {
+ // Locate the next comma and replace it with \0.
+ char *p = strchr(str, ',');
+ if (p != NULL)
+ *p = '\0';
+
+ if (str[0] == '\0') {
+ // There is no string, that is, a comma follows
+ // another comma. Use the previous value.
+ //
+ // NOTE: We checked earlier that the first char
+ // of the whole list cannot be a comma.
+ assert(i > 0);
+ opt_block_list[i] = opt_block_list[i - 1];
+ } else {
+ opt_block_list[i] = str_to_uint64("block-list", str,
+ 0, UINT64_MAX);
+
+ // Zero indicates no more new Blocks.
+ if (opt_block_list[i] == 0) {
+ if (i + 1 != count)
+ message_fatal(_("0 can only be used "
+ "as the last element "
+ "in --block-list"));
+
+ opt_block_list[i] = UINT64_MAX;
+ }
+ }
+
+ str = p + 1;
+ }
+
+ // Terminate the array.
+ opt_block_list[count] = 0;
+
+ free(str_start);
+ return;
+}
+
+
+static void
+parse_real(args_info *args, int argc, char **argv)
+{
+ enum {
+ OPT_X86 = INT_MIN,
+ OPT_POWERPC,
+ OPT_IA64,
+ OPT_ARM,
+ OPT_ARMTHUMB,
+ OPT_ARM64,
+ OPT_SPARC,
+ OPT_DELTA,
+ OPT_LZMA1,
+ OPT_LZMA2,
+
+ OPT_SINGLE_STREAM,
+ OPT_NO_SPARSE,
+ OPT_FILES,
+ OPT_FILES0,
+ OPT_BLOCK_SIZE,
+ OPT_BLOCK_LIST,
+ OPT_MEM_COMPRESS,
+ OPT_MEM_DECOMPRESS,
+ OPT_MEM_MT_DECOMPRESS,
+ OPT_NO_ADJUST,
+ OPT_INFO_MEMORY,
+ OPT_ROBOT,
+ OPT_FLUSH_TIMEOUT,
+ OPT_IGNORE_CHECK,
+ };
+
+ static const char short_opts[]
+ = "cC:defF:hHlkM:qQrS:tT:vVz0123456789";
+
+ static const struct option long_opts[] = {
+ // Operation mode
+ { "compress", no_argument, NULL, 'z' },
+ { "decompress", no_argument, NULL, 'd' },
+ { "uncompress", no_argument, NULL, 'd' },
+ { "test", no_argument, NULL, 't' },
+ { "list", no_argument, NULL, 'l' },
+
+ // Operation modifiers
+ { "keep", no_argument, NULL, 'k' },
+ { "force", no_argument, NULL, 'f' },
+ { "stdout", no_argument, NULL, 'c' },
+ { "to-stdout", no_argument, NULL, 'c' },
+ { "single-stream", no_argument, NULL, OPT_SINGLE_STREAM },
+ { "no-sparse", no_argument, NULL, OPT_NO_SPARSE },
+ { "suffix", required_argument, NULL, 'S' },
+ // { "recursive", no_argument, NULL, 'r' }, // TODO
+ { "files", optional_argument, NULL, OPT_FILES },
+ { "files0", optional_argument, NULL, OPT_FILES0 },
+
+ // Basic compression settings
+ { "format", required_argument, NULL, 'F' },
+ { "check", required_argument, NULL, 'C' },
+ { "ignore-check", no_argument, NULL, OPT_IGNORE_CHECK },
+ { "block-size", required_argument, NULL, OPT_BLOCK_SIZE },
+ { "block-list", required_argument, NULL, OPT_BLOCK_LIST },
+ { "memlimit-compress", required_argument, NULL, OPT_MEM_COMPRESS },
+ { "memlimit-decompress", required_argument, NULL, OPT_MEM_DECOMPRESS },
+ { "memlimit-mt-decompress", required_argument, NULL, OPT_MEM_MT_DECOMPRESS },
+ { "memlimit", required_argument, NULL, 'M' },
+ { "memory", required_argument, NULL, 'M' }, // Old alias
+ { "no-adjust", no_argument, NULL, OPT_NO_ADJUST },
+ { "threads", required_argument, NULL, 'T' },
+ { "flush-timeout", required_argument, NULL, OPT_FLUSH_TIMEOUT },
+
+ { "extreme", no_argument, NULL, 'e' },
+ { "fast", no_argument, NULL, '0' },
+ { "best", no_argument, NULL, '9' },
+
+ // Filters
+ { "lzma1", optional_argument, NULL, OPT_LZMA1 },
+ { "lzma2", optional_argument, NULL, OPT_LZMA2 },
+ { "x86", optional_argument, NULL, OPT_X86 },
+ { "powerpc", optional_argument, NULL, OPT_POWERPC },
+ { "ia64", optional_argument, NULL, OPT_IA64 },
+ { "arm", optional_argument, NULL, OPT_ARM },
+ { "armthumb", optional_argument, NULL, OPT_ARMTHUMB },
+ { "arm64", optional_argument, NULL, OPT_ARM64 },
+ { "sparc", optional_argument, NULL, OPT_SPARC },
+ { "delta", optional_argument, NULL, OPT_DELTA },
+
+ // Other options
+ { "quiet", no_argument, NULL, 'q' },
+ { "verbose", no_argument, NULL, 'v' },
+ { "no-warn", no_argument, NULL, 'Q' },
+ { "robot", no_argument, NULL, OPT_ROBOT },
+ { "info-memory", no_argument, NULL, OPT_INFO_MEMORY },
+ { "help", no_argument, NULL, 'h' },
+ { "long-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) {
+ // Compression preset (also for decompression if --format=raw)
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ coder_set_preset((uint32_t)(c - '0'));
+ break;
+
+ // --memlimit-compress
+ case OPT_MEM_COMPRESS:
+ parse_memlimit("memlimit-compress",
+ "memlimit-compress%", optarg,
+ true, false, false);
+ break;
+
+ // --memlimit-decompress
+ case OPT_MEM_DECOMPRESS:
+ parse_memlimit("memlimit-decompress",
+ "memlimit-decompress%", optarg,
+ false, true, false);
+ break;
+
+ // --memlimit-mt-decompress
+ case OPT_MEM_MT_DECOMPRESS:
+ parse_memlimit("memlimit-mt-decompress",
+ "memlimit-mt-decompress%", optarg,
+ false, false, true);
+ break;
+
+ // --memlimit
+ case 'M':
+ parse_memlimit("memlimit", "memlimit%", optarg,
+ true, true, true);
+ break;
+
+ // --suffix
+ case 'S':
+ suffix_set(optarg);
+ break;
+
+ case 'T': {
+ // Since xz 5.4.0: Ignore leading '+' first.
+ const char *s = optarg;
+ if (optarg[0] == '+')
+ ++s;
+
+ // The max is from src/liblzma/common/common.h.
+ uint32_t t = str_to_uint64("threads", s, 0, 16384);
+
+ // If leading '+' was used then use multi-threaded
+ // mode even if exactly one thread was specified.
+ if (t == 1 && optarg[0] == '+')
+ t = UINT32_MAX;
+
+ hardware_threads_set(t);
+ break;
+ }
+
+ // --version
+ case 'V':
+ // This doesn't return.
+ message_version();
+
+ // --stdout
+ case 'c':
+ opt_stdout = true;
+ break;
+
+ // --decompress
+ case 'd':
+ opt_mode = MODE_DECOMPRESS;
+ break;
+
+ // --extreme
+ case 'e':
+ coder_set_extreme();
+ break;
+
+ // --force
+ case 'f':
+ opt_force = true;
+ break;
+
+ // --info-memory
+ case OPT_INFO_MEMORY:
+ // This doesn't return.
+ hardware_memlimit_show();
+
+ // --help
+ case 'h':
+ // This doesn't return.
+ message_help(false);
+
+ // --long-help
+ case 'H':
+ // This doesn't return.
+ message_help(true);
+
+ // --list
+ case 'l':
+ opt_mode = MODE_LIST;
+ break;
+
+ // --keep
+ case 'k':
+ opt_keep_original = true;
+ break;
+
+ // --quiet
+ case 'q':
+ message_verbosity_decrease();
+ break;
+
+ case 'Q':
+ set_exit_no_warn();
+ break;
+
+ case 't':
+ opt_mode = MODE_TEST;
+ break;
+
+ // --verbose
+ case 'v':
+ message_verbosity_increase();
+ break;
+
+ // --robot
+ case OPT_ROBOT:
+ opt_robot = true;
+
+ // This is to make sure that floating point numbers
+ // always have a dot as decimal separator.
+ setlocale(LC_NUMERIC, "C");
+ break;
+
+ case 'z':
+ opt_mode = MODE_COMPRESS;
+ break;
+
+ // Filter setup
+
+ case OPT_X86:
+ coder_add_filter(LZMA_FILTER_X86,
+ options_bcj(optarg));
+ break;
+
+ case OPT_POWERPC:
+ coder_add_filter(LZMA_FILTER_POWERPC,
+ options_bcj(optarg));
+ break;
+
+ case OPT_IA64:
+ coder_add_filter(LZMA_FILTER_IA64,
+ options_bcj(optarg));
+ break;
+
+ case OPT_ARM:
+ coder_add_filter(LZMA_FILTER_ARM,
+ options_bcj(optarg));
+ break;
+
+ case OPT_ARMTHUMB:
+ coder_add_filter(LZMA_FILTER_ARMTHUMB,
+ options_bcj(optarg));
+ break;
+
+ case OPT_ARM64:
+ coder_add_filter(LZMA_FILTER_ARM64,
+ options_bcj(optarg));
+ break;
+
+ case OPT_SPARC:
+ coder_add_filter(LZMA_FILTER_SPARC,
+ options_bcj(optarg));
+ break;
+
+ case OPT_DELTA:
+ coder_add_filter(LZMA_FILTER_DELTA,
+ options_delta(optarg));
+ break;
+
+ case OPT_LZMA1:
+ coder_add_filter(LZMA_FILTER_LZMA1,
+ options_lzma(optarg));
+ break;
+
+ case OPT_LZMA2:
+ coder_add_filter(LZMA_FILTER_LZMA2,
+ options_lzma(optarg));
+ break;
+
+ // Other
+
+ // --format
+ case 'F': {
+ // Just in case, support both "lzma" and "alone" since
+ // the latter was used for forward compatibility in
+ // LZMA Utils 4.32.x.
+ static const struct {
+ char str[8];
+ enum format_type format;
+ } types[] = {
+ { "auto", FORMAT_AUTO },
+ { "xz", FORMAT_XZ },
+ { "lzma", FORMAT_LZMA },
+ { "alone", FORMAT_LZMA },
+#ifdef HAVE_LZIP_DECODER
+ { "lzip", FORMAT_LZIP },
+#endif
+ { "raw", FORMAT_RAW },
+ };
+
+ size_t i = 0;
+ while (strcmp(types[i].str, optarg) != 0)
+ if (++i == ARRAY_SIZE(types))
+ message_fatal(_("%s: Unknown file "
+ "format type"),
+ optarg);
+
+ opt_format = types[i].format;
+ break;
+ }
+
+ // --check
+ case 'C': {
+ static const struct {
+ char str[8];
+ lzma_check check;
+ } types[] = {
+ { "none", LZMA_CHECK_NONE },
+ { "crc32", LZMA_CHECK_CRC32 },
+ { "crc64", LZMA_CHECK_CRC64 },
+ { "sha256", LZMA_CHECK_SHA256 },
+ };
+
+ size_t i = 0;
+ while (strcmp(types[i].str, optarg) != 0) {
+ if (++i == ARRAY_SIZE(types))
+ message_fatal(_("%s: Unsupported "
+ "integrity "
+ "check type"), optarg);
+ }
+
+ // Use a separate check in case we are using different
+ // liblzma than what was used to compile us.
+ if (!lzma_check_is_supported(types[i].check))
+ message_fatal(_("%s: Unsupported integrity "
+ "check type"), optarg);
+
+ coder_set_check(types[i].check);
+ break;
+ }
+
+ case OPT_IGNORE_CHECK:
+ opt_ignore_check = true;
+ break;
+
+ case OPT_BLOCK_SIZE:
+ opt_block_size = str_to_uint64("block-size", optarg,
+ 0, LZMA_VLI_MAX);
+ break;
+
+ case OPT_BLOCK_LIST: {
+ parse_block_list(optarg);
+ break;
+ }
+
+ case OPT_SINGLE_STREAM:
+ opt_single_stream = true;
+ break;
+
+ case OPT_NO_SPARSE:
+ io_no_sparse();
+ break;
+
+ case OPT_FILES:
+ args->files_delim = '\n';
+
+ // Fall through
+
+ case OPT_FILES0:
+ if (args->files_name != NULL)
+ message_fatal(_("Only one file can be "
+ "specified with `--files' "
+ "or `--files0'."));
+
+ if (optarg == NULL) {
+ args->files_name = stdin_filename;
+ args->files_file = stdin;
+ } else {
+ args->files_name = optarg;
+ args->files_file = fopen(optarg,
+ c == OPT_FILES ? "r" : "rb");
+ if (args->files_file == NULL)
+ // TRANSLATORS: This is a translatable
+ // string because French needs a space
+ // before the colon ("%s : %s").
+ message_fatal(_("%s: %s"), optarg,
+ strerror(errno));
+ }
+
+ break;
+
+ case OPT_NO_ADJUST:
+ opt_auto_adjust = false;
+ break;
+
+ case OPT_FLUSH_TIMEOUT:
+ opt_flush_timeout = str_to_uint64("flush-timeout",
+ optarg, 0, UINT64_MAX);
+ break;
+
+ default:
+ message_try_help();
+ tuklib_exit(E_ERROR, E_ERROR, false);
+ }
+ }
+
+ return;
+}
+
+
+static void
+parse_environment(args_info *args, char *argv0, const char *varname)
+{
+ char *env = getenv(varname);
+ if (env == NULL)
+ return;
+
+ // We modify the string, so make a copy of it.
+ env = xstrdup(env);
+
+ // Calculate the number of arguments in env. argc stats at one
+ // to include space for the program name.
+ int argc = 1;
+ bool prev_was_space = true;
+ for (size_t i = 0; env[i] != '\0'; ++i) {
+ // NOTE: Cast to unsigned char is needed so that correct
+ // value gets passed to isspace(), which expects
+ // unsigned char cast to int. Casting to int is done
+ // automatically due to integer promotion, but we need to
+ // force char to unsigned char manually. Otherwise 8-bit
+ // characters would get promoted to wrong value if
+ // char is signed.
+ if (isspace((unsigned char)env[i])) {
+ prev_was_space = true;
+ } else if (prev_was_space) {
+ prev_was_space = false;
+
+ // Keep argc small enough to fit into a signed int
+ // and to keep it usable for memory allocation.
+ if (++argc == my_min(
+ INT_MAX, SIZE_MAX / sizeof(char *)))
+ message_fatal(_("The environment variable "
+ "%s contains too many "
+ "arguments"), varname);
+ }
+ }
+
+ // Allocate memory to hold pointers to the arguments. Add one to get
+ // space for the terminating NULL (if some systems happen to need it).
+ char **argv = xmalloc(((size_t)(argc) + 1) * sizeof(char *));
+ argv[0] = argv0;
+ argv[argc] = NULL;
+
+ // Go through the string again. Split the arguments using '\0'
+ // characters and add pointers to the resulting strings to argv.
+ argc = 1;
+ prev_was_space = true;
+ for (size_t i = 0; env[i] != '\0'; ++i) {
+ if (isspace((unsigned char)env[i])) {
+ prev_was_space = true;
+ env[i] = '\0';
+ } else if (prev_was_space) {
+ prev_was_space = false;
+ argv[argc++] = env + i;
+ }
+ }
+
+ // Parse the argument list we got from the environment. All non-option
+ // arguments i.e. filenames are ignored.
+ parse_real(args, argc, argv);
+
+ // Reset the state of the getopt_long() so that we can parse the
+ // command line options too. There are two incompatible ways to
+ // do it.
+#ifdef HAVE_OPTRESET
+ // BSD
+ optind = 1;
+ optreset = 1;
+#else
+ // GNU, Solaris
+ optind = 0;
+#endif
+
+ // We don't need the argument list from environment anymore.
+ free(argv);
+ free(env);
+
+ return;
+}
+
+
+extern void
+args_parse(args_info *args, int argc, char **argv)
+{
+ // Initialize those parts of *args that we need later.
+ args->files_name = NULL;
+ args->files_file = NULL;
+ args->files_delim = '\0';
+
+ // Check how we were called.
+ {
+ // Remove the leading path name, if any.
+ const char *name = strrchr(argv[0], '/');
+ if (name == NULL)
+ name = argv[0];
+ else
+ ++name;
+
+ // NOTE: It's possible that name[0] is now '\0' if argv[0]
+ // is weird, but it doesn't matter here.
+
+ // Look for full command names instead of substrings like
+ // "un", "cat", and "lz" to reduce possibility of false
+ // positives when the programs have been renamed.
+ if (strstr(name, "xzcat") != NULL) {
+ opt_mode = MODE_DECOMPRESS;
+ opt_stdout = true;
+ } else if (strstr(name, "unxz") != NULL) {
+ opt_mode = MODE_DECOMPRESS;
+ } else if (strstr(name, "lzcat") != NULL) {
+ opt_format = FORMAT_LZMA;
+ opt_mode = MODE_DECOMPRESS;
+ opt_stdout = true;
+ } else if (strstr(name, "unlzma") != NULL) {
+ opt_format = FORMAT_LZMA;
+ opt_mode = MODE_DECOMPRESS;
+ } else if (strstr(name, "lzma") != NULL) {
+ opt_format = FORMAT_LZMA;
+ }
+ }
+
+ // First the flags from the environment
+ parse_environment(args, argv[0], "XZ_DEFAULTS");
+ parse_environment(args, argv[0], "XZ_OPT");
+
+ // Then from the command line
+ parse_real(args, argc, argv);
+
+ // If encoder or decoder support was omitted at build time,
+ // show an error now so that the rest of the code can rely on
+ // that whatever is in opt_mode is also supported.
+#ifndef HAVE_ENCODERS
+ if (opt_mode == MODE_COMPRESS)
+ message_fatal(_("Compression support was disabled "
+ "at build time"));
+#endif
+#ifndef HAVE_DECODERS
+ // Even MODE_LIST cannot work without decoder support so MODE_COMPRESS
+ // is the only valid choice.
+ if (opt_mode != MODE_COMPRESS)
+ message_fatal(_("Decompression support was disabled "
+ "at build time"));
+#endif
+
+#ifdef HAVE_LZIP_DECODER
+ if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_LZIP)
+ message_fatal(_("Compression of lzip files (.lz) "
+ "is not supported"));
+#endif
+
+ // Never remove the source file when the destination is not on disk.
+ // In test mode the data is written nowhere, but setting opt_stdout
+ // will make the rest of the code behave well.
+ if (opt_stdout || opt_mode == MODE_TEST) {
+ opt_keep_original = true;
+ opt_stdout = true;
+ }
+
+ // When compressing, if no --format flag was used, or it
+ // was --format=auto, we compress to the .xz format.
+ if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_AUTO)
+ opt_format = FORMAT_XZ;
+
+ // Compression settings need to be validated (options themselves and
+ // their memory usage) when compressing to any file format. It has to
+ // be done also when uncompressing raw data, since for raw decoding
+ // the options given on the command line are used to know what kind
+ // of raw data we are supposed to decode.
+ if (opt_mode == MODE_COMPRESS || (opt_format == FORMAT_RAW
+ && opt_mode != MODE_LIST))
+ coder_set_compression_settings();
+
+ // If raw format is used and a custom suffix is not provided,
+ // then only stdout mode can be used when compressing or decompressing.
+ if (opt_format == FORMAT_RAW && !suffix_is_set() && !opt_stdout
+ && (opt_mode == MODE_COMPRESS
+ || opt_mode == MODE_DECOMPRESS))
+ message_fatal(_("With --format=raw, --suffix=.SUF is "
+ "required unless writing to stdout"));
+
+ // If no filenames are given, use stdin.
+ if (argv[optind] == NULL && args->files_name == NULL) {
+ // We don't modify or free() the "-" constant. The caller
+ // modifies this so don't make the struct itself const.
+ static char *names_stdin[2] = { (char *)"-", NULL };
+ args->arg_names = names_stdin;
+ args->arg_count = 1;
+ } else {
+ // We got at least one filename from the command line, or
+ // --files or --files0 was specified.
+ args->arg_names = argv + optind;
+ args->arg_count = (unsigned int)(argc - optind);
+ }
+
+ return;
+}
+
+
+#ifndef NDEBUG
+extern void
+args_free(void)
+{
+ free(opt_block_list);
+ return;
+}
+#endif
diff --git a/src/xz/args.h b/src/xz/args.h
new file mode 100644
index 0000000..a1a5930
--- /dev/null
+++ b/src/xz/args.h
@@ -0,0 +1,44 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file args.h
+/// \brief Argument parsing
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+typedef struct {
+ /// Filenames from command line
+ char **arg_names;
+
+ /// Number of filenames from command line
+ unsigned int arg_count;
+
+ /// Name of the file from which to read filenames. This is NULL
+ /// if --files or --files0 was not used.
+ const char *files_name;
+
+ /// File opened for reading from which filenames are read. This is
+ /// non-NULL only if files_name is non-NULL.
+ FILE *files_file;
+
+ /// Delimiter for filenames read from files_file
+ char files_delim;
+
+} args_info;
+
+
+extern bool opt_stdout;
+extern bool opt_force;
+extern bool opt_keep_original;
+// extern bool opt_recursive;
+extern bool opt_robot;
+extern bool opt_ignore_check;
+
+extern const char stdin_filename[];
+
+extern void args_parse(args_info *args, int argc, char **argv);
+extern void args_free(void);
diff --git a/src/xz/coder.c b/src/xz/coder.c
new file mode 100644
index 0000000..91d40ed
--- /dev/null
+++ b/src/xz/coder.c
@@ -0,0 +1,1109 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file coder.c
+/// \brief Compresses or uncompresses a file
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+/// Return value type for coder_init().
+enum coder_init_ret {
+ CODER_INIT_NORMAL,
+ CODER_INIT_PASSTHRU,
+ CODER_INIT_ERROR,
+};
+
+
+enum operation_mode opt_mode = MODE_COMPRESS;
+enum format_type opt_format = FORMAT_AUTO;
+bool opt_auto_adjust = true;
+bool opt_single_stream = false;
+uint64_t opt_block_size = 0;
+uint64_t *opt_block_list = NULL;
+
+
+/// Stream used to communicate with liblzma
+static lzma_stream strm = LZMA_STREAM_INIT;
+
+/// Filters needed for all encoding all formats, and also decoding in raw data
+static lzma_filter filters[LZMA_FILTERS_MAX + 1];
+
+/// Input and output buffers
+static io_buf in_buf;
+static io_buf out_buf;
+
+/// Number of filters. Zero indicates that we are using a preset.
+static uint32_t filters_count = 0;
+
+/// Number of the preset (0-9)
+static uint32_t preset_number = LZMA_PRESET_DEFAULT;
+
+/// Integrity check type
+static lzma_check check;
+
+/// This becomes false if the --check=CHECK option is used.
+static bool check_default = true;
+
+/// Indicates if unconsumed input is allowed to remain after
+/// decoding has successfully finished. This is set for each file
+/// in coder_init().
+static bool allow_trailing_input;
+
+#ifdef MYTHREAD_ENABLED
+static lzma_mt mt_options = {
+ .flags = 0,
+ .timeout = 300,
+ .filters = filters,
+};
+#endif
+
+
+extern void
+coder_set_check(lzma_check new_check)
+{
+ check = new_check;
+ check_default = false;
+ return;
+}
+
+
+static void
+forget_filter_chain(void)
+{
+ // Setting a preset makes us forget a possibly defined custom
+ // filter chain.
+ while (filters_count > 0) {
+ --filters_count;
+ free(filters[filters_count].options);
+ filters[filters_count].options = NULL;
+ }
+
+ return;
+}
+
+
+extern void
+coder_set_preset(uint32_t new_preset)
+{
+ preset_number &= ~LZMA_PRESET_LEVEL_MASK;
+ preset_number |= new_preset;
+ forget_filter_chain();
+ return;
+}
+
+
+extern void
+coder_set_extreme(void)
+{
+ preset_number |= LZMA_PRESET_EXTREME;
+ forget_filter_chain();
+ return;
+}
+
+
+extern void
+coder_add_filter(lzma_vli id, void *options)
+{
+ if (filters_count == LZMA_FILTERS_MAX)
+ message_fatal(_("Maximum number of filters is four"));
+
+ filters[filters_count].id = id;
+ filters[filters_count].options = options;
+ ++filters_count;
+
+ // Setting a custom filter chain makes us forget the preset options.
+ // This makes a difference if one specifies e.g. "xz -9 --lzma2 -e"
+ // where the custom filter chain resets the preset level back to
+ // the default 6, making the example equivalent to "xz -6e".
+ preset_number = LZMA_PRESET_DEFAULT;
+
+ return;
+}
+
+
+tuklib_attr_noreturn
+static void
+memlimit_too_small(uint64_t memory_usage)
+{
+ message(V_ERROR, _("Memory usage limit is too low for the given "
+ "filter setup."));
+ message_mem_needed(V_ERROR, memory_usage);
+ tuklib_exit(E_ERROR, E_ERROR, false);
+}
+
+
+extern void
+coder_set_compression_settings(void)
+{
+#ifdef HAVE_LZIP_DECODER
+ // .lz compression isn't supported.
+ assert(opt_format != FORMAT_LZIP);
+#endif
+
+ // The default check type is CRC64, but fallback to CRC32
+ // if CRC64 isn't supported by the copy of liblzma we are
+ // using. CRC32 is always supported.
+ if (check_default) {
+ check = LZMA_CHECK_CRC64;
+ if (!lzma_check_is_supported(check))
+ check = LZMA_CHECK_CRC32;
+ }
+
+ // Options for LZMA1 or LZMA2 in case we are using a preset.
+ static lzma_options_lzma opt_lzma;
+
+ if (filters_count == 0) {
+ // We are using a preset. This is not a good idea in raw mode
+ // except when playing around with things. Different versions
+ // of this software may use different options in presets, and
+ // thus make uncompressing the raw data difficult.
+ if (opt_format == FORMAT_RAW) {
+ // The message is shown only if warnings are allowed
+ // but the exit status isn't changed.
+ message(V_WARNING, _("Using a preset in raw mode "
+ "is discouraged."));
+ message(V_WARNING, _("The exact options of the "
+ "presets may vary between software "
+ "versions."));
+ }
+
+ // Get the preset for LZMA1 or LZMA2.
+ if (lzma_lzma_preset(&opt_lzma, preset_number))
+ message_bug();
+
+ // Use LZMA2 except with --format=lzma we use LZMA1.
+ filters[0].id = opt_format == FORMAT_LZMA
+ ? LZMA_FILTER_LZMA1 : LZMA_FILTER_LZMA2;
+ filters[0].options = &opt_lzma;
+ filters_count = 1;
+ }
+
+ // Terminate the filter options array.
+ filters[filters_count].id = LZMA_VLI_UNKNOWN;
+
+ // If we are using the .lzma format, allow exactly one filter
+ // which has to be LZMA1.
+ if (opt_format == FORMAT_LZMA && (filters_count != 1
+ || filters[0].id != LZMA_FILTER_LZMA1))
+ message_fatal(_("The .lzma format supports only "
+ "the LZMA1 filter"));
+
+ // If we are using the .xz format, make sure that there is no LZMA1
+ // filter to prevent LZMA_PROG_ERROR.
+ if (opt_format == FORMAT_XZ)
+ for (size_t i = 0; i < filters_count; ++i)
+ if (filters[i].id == LZMA_FILTER_LZMA1)
+ message_fatal(_("LZMA1 cannot be used "
+ "with the .xz format"));
+
+ // Print the selected filter chain.
+ message_filters_show(V_DEBUG, filters);
+
+ // The --flush-timeout option requires LZMA_SYNC_FLUSH support
+ // from the filter chain. Currently threaded encoder doesn't support
+ // LZMA_SYNC_FLUSH so single-threaded mode must be used.
+ if (opt_mode == MODE_COMPRESS && opt_flush_timeout != 0) {
+ for (size_t i = 0; i < filters_count; ++i) {
+ switch (filters[i].id) {
+ case LZMA_FILTER_LZMA2:
+ case LZMA_FILTER_DELTA:
+ break;
+
+ default:
+ message_fatal(_("The filter chain is "
+ "incompatible with --flush-timeout"));
+ }
+ }
+
+ if (hardware_threads_is_mt()) {
+ message(V_WARNING, _("Switching to single-threaded "
+ "mode due to --flush-timeout"));
+ hardware_threads_set(1);
+ }
+ }
+
+ // Get the memory usage. Note that if --format=raw was used,
+ // we can be decompressing.
+ //
+ // If multithreaded .xz compression is done, this value will be
+ // replaced.
+ uint64_t memory_limit = hardware_memlimit_get(opt_mode);
+ uint64_t memory_usage = UINT64_MAX;
+ if (opt_mode == MODE_COMPRESS) {
+#ifdef HAVE_ENCODERS
+# ifdef MYTHREAD_ENABLED
+ if (opt_format == FORMAT_XZ && hardware_threads_is_mt()) {
+ memory_limit = hardware_memlimit_mtenc_get();
+ mt_options.threads = hardware_threads_get();
+ mt_options.block_size = opt_block_size;
+ mt_options.check = check;
+ memory_usage = lzma_stream_encoder_mt_memusage(
+ &mt_options);
+ if (memory_usage != UINT64_MAX)
+ message(V_DEBUG, _("Using up to %" PRIu32
+ " threads."),
+ mt_options.threads);
+ } else
+# endif
+ {
+ memory_usage = lzma_raw_encoder_memusage(filters);
+ }
+#endif
+ } else {
+#ifdef HAVE_DECODERS
+ memory_usage = lzma_raw_decoder_memusage(filters);
+#endif
+ }
+
+ if (memory_usage == UINT64_MAX)
+ message_fatal(_("Unsupported filter chain or filter options"));
+
+ // Print memory usage info before possible dictionary
+ // size auto-adjusting.
+ //
+ // NOTE: If only encoder support was built, we cannot show the
+ // what the decoder memory usage will be.
+ message_mem_needed(V_DEBUG, memory_usage);
+#ifdef HAVE_DECODERS
+ if (opt_mode == MODE_COMPRESS) {
+ const uint64_t decmem = lzma_raw_decoder_memusage(filters);
+ if (decmem != UINT64_MAX)
+ message(V_DEBUG, _("Decompression will need "
+ "%s MiB of memory."), uint64_to_str(
+ round_up_to_mib(decmem), 0));
+ }
+#endif
+
+ if (memory_usage <= memory_limit)
+ return;
+
+ // With --format=raw settings are never adjusted to meet
+ // the memory usage limit.
+ if (opt_format == FORMAT_RAW)
+ memlimit_too_small(memory_usage);
+
+ assert(opt_mode == MODE_COMPRESS);
+
+#ifdef HAVE_ENCODERS
+# ifdef MYTHREAD_ENABLED
+ if (opt_format == FORMAT_XZ && hardware_threads_is_mt()) {
+ // Try to reduce the number of threads before
+ // adjusting the compression settings down.
+ while (mt_options.threads > 1) {
+ // Reduce the number of threads by one and check
+ // the memory usage.
+ --mt_options.threads;
+ memory_usage = lzma_stream_encoder_mt_memusage(
+ &mt_options);
+ if (memory_usage == UINT64_MAX)
+ message_bug();
+
+ if (memory_usage <= memory_limit) {
+ // The memory usage is now low enough.
+ message(V_WARNING, _("Reduced the number of "
+ "threads from %s to %s to not exceed "
+ "the memory usage limit of %s MiB"),
+ uint64_to_str(
+ hardware_threads_get(), 0),
+ uint64_to_str(mt_options.threads, 1),
+ uint64_to_str(round_up_to_mib(
+ memory_limit), 2));
+ return;
+ }
+ }
+
+ // If the memory usage limit is only a soft limit (automatic
+ // number of threads and no --memlimit-compress), the limit
+ // is only used to reduce the number of threads and once at
+ // just one thread, the limit is completely ignored. This
+ // way -T0 won't use insane amount of memory but at the same
+ // time the soft limit will never make xz fail and never make
+ // xz change settings that would affect the compressed output.
+ if (hardware_memlimit_mtenc_is_default()) {
+ message(V_WARNING, _("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."),
+ uint64_to_str(hardware_threads_get(), 0),
+ uint64_to_str(
+ round_up_to_mib(memory_limit), 1),
+ uint64_to_str(
+ round_up_to_mib(memory_usage), 2));
+ return;
+ }
+
+ // If --no-adjust was used, we cannot drop to single-threaded
+ // mode since it produces different compressed output.
+ //
+ // NOTE: In xz 5.2.x, --no-adjust also prevented reducing
+ // the number of threads. This changed in 5.3.3alpha.
+ if (!opt_auto_adjust)
+ memlimit_too_small(memory_usage);
+
+ // Switch to single-threaded mode. It uses
+ // less memory than using one thread in
+ // the multithreaded mode but the output
+ // is also different.
+ hardware_threads_set(1);
+ memory_usage = lzma_raw_encoder_memusage(filters);
+ message(V_WARNING, _("Switching to single-threaded mode "
+ "to not exceed the memory usage limit of %s MiB"),
+ uint64_to_str(round_up_to_mib(memory_limit), 0));
+ }
+# endif
+
+ if (memory_usage <= memory_limit)
+ return;
+
+ // Don't adjust LZMA2 or LZMA1 dictionary size if --no-adjust
+ // was specified as that would change the compressed output.
+ if (!opt_auto_adjust)
+ memlimit_too_small(memory_usage);
+
+ // Look for the last filter if it is LZMA2 or LZMA1, so we can make
+ // it use less RAM. With other filters we don't know what to do.
+ size_t i = 0;
+ while (filters[i].id != LZMA_FILTER_LZMA2
+ && filters[i].id != LZMA_FILTER_LZMA1) {
+ if (filters[i].id == LZMA_VLI_UNKNOWN)
+ memlimit_too_small(memory_usage);
+
+ ++i;
+ }
+
+ // Decrease the dictionary size until we meet the memory
+ // usage limit. First round down to full mebibytes.
+ lzma_options_lzma *opt = filters[i].options;
+ const uint32_t orig_dict_size = opt->dict_size;
+ opt->dict_size &= ~((UINT32_C(1) << 20) - 1);
+ while (true) {
+ // If it is below 1 MiB, auto-adjusting failed. We could be
+ // more sophisticated and scale it down even more, but let's
+ // see if many complain about this version.
+ //
+ // FIXME: Displays the scaled memory usage instead
+ // of the original.
+ if (opt->dict_size < (UINT32_C(1) << 20))
+ memlimit_too_small(memory_usage);
+
+ memory_usage = lzma_raw_encoder_memusage(filters);
+ if (memory_usage == UINT64_MAX)
+ message_bug();
+
+ // Accept it if it is low enough.
+ if (memory_usage <= memory_limit)
+ break;
+
+ // Otherwise 1 MiB down and try again. I hope this
+ // isn't too slow method for cases where the original
+ // dict_size is very big.
+ opt->dict_size -= UINT32_C(1) << 20;
+ }
+
+ // Tell the user that we decreased the dictionary size.
+ message(V_WARNING, _("Adjusted LZMA%c dictionary size "
+ "from %s MiB to %s MiB to not exceed "
+ "the memory usage limit of %s MiB"),
+ filters[i].id == LZMA_FILTER_LZMA2
+ ? '2' : '1',
+ uint64_to_str(orig_dict_size >> 20, 0),
+ uint64_to_str(opt->dict_size >> 20, 1),
+ uint64_to_str(round_up_to_mib(memory_limit), 2));
+#endif
+
+ return;
+}
+
+
+#ifdef HAVE_DECODERS
+/// Return true if the data in in_buf seems to be in the .xz format.
+static bool
+is_format_xz(void)
+{
+ // Specify the magic as hex to be compatible with EBCDIC systems.
+ static const uint8_t magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
+ return strm.avail_in >= sizeof(magic)
+ && memcmp(in_buf.u8, magic, sizeof(magic)) == 0;
+}
+
+
+/// Return true if the data in in_buf seems to be in the .lzma format.
+static bool
+is_format_lzma(void)
+{
+ // The .lzma header is 13 bytes.
+ if (strm.avail_in < 13)
+ return false;
+
+ // Decode the LZMA1 properties.
+ lzma_filter filter = { .id = LZMA_FILTER_LZMA1 };
+ if (lzma_properties_decode(&filter, NULL, in_buf.u8, 5) != LZMA_OK)
+ return false;
+
+ // A hack to ditch tons of false positives: We allow only dictionary
+ // sizes that are 2^n or 2^n + 2^(n-1) or UINT32_MAX. LZMA_Alone
+ // created only files with 2^n, but accepts any dictionary size.
+ // If someone complains, this will be reconsidered.
+ lzma_options_lzma *opt = filter.options;
+ const uint32_t dict_size = opt->dict_size;
+ free(opt);
+
+ if (dict_size != UINT32_MAX) {
+ uint32_t d = dict_size - 1;
+ d |= d >> 2;
+ d |= d >> 3;
+ d |= d >> 4;
+ d |= d >> 8;
+ d |= d >> 16;
+ ++d;
+ if (d != dict_size || dict_size == 0)
+ return false;
+ }
+
+ // Another hack to ditch false positives: Assume that if the
+ // uncompressed size is known, it must be less than 256 GiB.
+ // Again, if someone complains, this will be reconsidered.
+ uint64_t uncompressed_size = 0;
+ for (size_t i = 0; i < 8; ++i)
+ uncompressed_size |= (uint64_t)(in_buf.u8[5 + i]) << (i * 8);
+
+ if (uncompressed_size != UINT64_MAX
+ && uncompressed_size > (UINT64_C(1) << 38))
+ return false;
+
+ return true;
+}
+
+
+#ifdef HAVE_LZIP_DECODER
+/// Return true if the data in in_buf seems to be in the .lz format.
+static bool
+is_format_lzip(void)
+{
+ static const uint8_t magic[4] = { 0x4C, 0x5A, 0x49, 0x50 };
+ return strm.avail_in >= sizeof(magic)
+ && memcmp(in_buf.u8, magic, sizeof(magic)) == 0;
+}
+#endif
+#endif
+
+
+/// Detect the input file type (for now, this done only when decompressing),
+/// and initialize an appropriate coder. Return value indicates if a normal
+/// liblzma-based coder was initialized (CODER_INIT_NORMAL), if passthru
+/// mode should be used (CODER_INIT_PASSTHRU), or if an error occurred
+/// (CODER_INIT_ERROR).
+static enum coder_init_ret
+coder_init(file_pair *pair)
+{
+ lzma_ret ret = LZMA_PROG_ERROR;
+
+ // In most cases if there is input left when coding finishes,
+ // something has gone wrong. Exceptions are --single-stream
+ // and decoding .lz files which can contain trailing non-.lz data.
+ // These will be handled later in this function.
+ allow_trailing_input = false;
+
+ if (opt_mode == MODE_COMPRESS) {
+#ifdef HAVE_ENCODERS
+ switch (opt_format) {
+ case FORMAT_AUTO:
+ // args.c ensures this.
+ assert(0);
+ break;
+
+ case FORMAT_XZ:
+# ifdef MYTHREAD_ENABLED
+ if (hardware_threads_is_mt())
+ ret = lzma_stream_encoder_mt(
+ &strm, &mt_options);
+ else
+# endif
+ ret = lzma_stream_encoder(
+ &strm, filters, check);
+ break;
+
+ case FORMAT_LZMA:
+ ret = lzma_alone_encoder(&strm, filters[0].options);
+ break;
+
+# ifdef HAVE_LZIP_DECODER
+ case FORMAT_LZIP:
+ // args.c should disallow this.
+ assert(0);
+ ret = LZMA_PROG_ERROR;
+ break;
+# endif
+
+ case FORMAT_RAW:
+ ret = lzma_raw_encoder(&strm, filters);
+ break;
+ }
+#endif
+ } else {
+#ifdef HAVE_DECODERS
+ uint32_t flags = 0;
+
+ // It seems silly to warn about unsupported check if the
+ // check won't be verified anyway due to --ignore-check.
+ if (opt_ignore_check)
+ flags |= LZMA_IGNORE_CHECK;
+ else
+ flags |= LZMA_TELL_UNSUPPORTED_CHECK;
+
+ if (opt_single_stream)
+ allow_trailing_input = true;
+ else
+ flags |= LZMA_CONCATENATED;
+
+ // We abuse FORMAT_AUTO to indicate unknown file format,
+ // for which we may consider passthru mode.
+ enum format_type init_format = FORMAT_AUTO;
+
+ switch (opt_format) {
+ case FORMAT_AUTO:
+ // .lz is checked before .lzma since .lzma detection
+ // is more complicated (no magic bytes).
+ if (is_format_xz())
+ init_format = FORMAT_XZ;
+# ifdef HAVE_LZIP_DECODER
+ else if (is_format_lzip())
+ init_format = FORMAT_LZIP;
+# endif
+ else if (is_format_lzma())
+ init_format = FORMAT_LZMA;
+ break;
+
+ case FORMAT_XZ:
+ if (is_format_xz())
+ init_format = FORMAT_XZ;
+ break;
+
+ case FORMAT_LZMA:
+ if (is_format_lzma())
+ init_format = FORMAT_LZMA;
+ break;
+
+# ifdef HAVE_LZIP_DECODER
+ case FORMAT_LZIP:
+ if (is_format_lzip())
+ init_format = FORMAT_LZIP;
+ break;
+# endif
+
+ case FORMAT_RAW:
+ init_format = FORMAT_RAW;
+ break;
+ }
+
+ switch (init_format) {
+ case FORMAT_AUTO:
+ // Unknown file format. If --decompress --stdout
+ // --force have been given, then we copy the input
+ // as is to stdout. Checking for MODE_DECOMPRESS
+ // is needed, because we don't want to do use
+ // passthru mode with --test.
+ if (opt_mode == MODE_DECOMPRESS
+ && opt_stdout && opt_force) {
+ // These are needed for progress info.
+ strm.total_in = 0;
+ strm.total_out = 0;
+ return CODER_INIT_PASSTHRU;
+ }
+
+ ret = LZMA_FORMAT_ERROR;
+ break;
+
+ case FORMAT_XZ:
+# ifdef MYTHREAD_ENABLED
+ mt_options.flags = flags;
+
+ mt_options.threads = hardware_threads_get();
+ mt_options.memlimit_stop
+ = hardware_memlimit_get(MODE_DECOMPRESS);
+
+ // If single-threaded mode was requested, set the
+ // memlimit for threading to zero. This forces the
+ // decoder to use single-threaded mode which matches
+ // the behavior of lzma_stream_decoder().
+ //
+ // Otherwise use the limit for threaded decompression
+ // which has a sane default (users are still free to
+ // make it insanely high though).
+ mt_options.memlimit_threading
+ = mt_options.threads == 1
+ ? 0 : hardware_memlimit_mtdec_get();
+
+ ret = lzma_stream_decoder_mt(&strm, &mt_options);
+# else
+ ret = lzma_stream_decoder(&strm,
+ hardware_memlimit_get(
+ MODE_DECOMPRESS), flags);
+# endif
+ break;
+
+ case FORMAT_LZMA:
+ ret = lzma_alone_decoder(&strm,
+ hardware_memlimit_get(
+ MODE_DECOMPRESS));
+ break;
+
+# ifdef HAVE_LZIP_DECODER
+ case FORMAT_LZIP:
+ allow_trailing_input = true;
+ ret = lzma_lzip_decoder(&strm,
+ hardware_memlimit_get(
+ MODE_DECOMPRESS), flags);
+ break;
+# endif
+
+ case FORMAT_RAW:
+ // Memory usage has already been checked in
+ // coder_set_compression_settings().
+ ret = lzma_raw_decoder(&strm, filters);
+ break;
+ }
+
+ // Try to decode the headers. This will catch too low
+ // memory usage limit in case it happens in the first
+ // Block of the first Stream, which is where it very
+ // probably will happen if it is going to happen.
+ //
+ // This will also catch unsupported check type which
+ // we treat as a warning only. If there are empty
+ // concatenated Streams with unsupported check type then
+ // the message can be shown more than once here. The loop
+ // is used in case there is first a warning about
+ // unsupported check type and then the first Block
+ // would exceed the memlimit.
+ if (ret == LZMA_OK && init_format != FORMAT_RAW) {
+ strm.next_out = NULL;
+ strm.avail_out = 0;
+ while ((ret = lzma_code(&strm, LZMA_RUN))
+ == LZMA_UNSUPPORTED_CHECK)
+ message_warning(_("%s: %s"), pair->src_name,
+ message_strm(ret));
+
+ // With --single-stream lzma_code won't wait for
+ // LZMA_FINISH and thus it can return LZMA_STREAM_END
+ // if the file has no uncompressed data inside.
+ // So treat LZMA_STREAM_END as LZMA_OK here.
+ // When lzma_code() is called again in coder_normal()
+ // it will return LZMA_STREAM_END again.
+ if (ret == LZMA_STREAM_END)
+ ret = LZMA_OK;
+ }
+#endif
+ }
+
+ if (ret != LZMA_OK) {
+ message_error(_("%s: %s"), pair->src_name, message_strm(ret));
+ if (ret == LZMA_MEMLIMIT_ERROR)
+ message_mem_needed(V_ERROR, lzma_memusage(&strm));
+
+ return CODER_INIT_ERROR;
+ }
+
+ return CODER_INIT_NORMAL;
+}
+
+
+/// Resolve conflicts between opt_block_size and opt_block_list in single
+/// threaded mode. We want to default to opt_block_list, except when it is
+/// larger than opt_block_size. If this is the case for the current Block
+/// at *list_pos, then we break into smaller Blocks. Otherwise advance
+/// to the next Block in opt_block_list, and break apart if needed.
+static void
+split_block(uint64_t *block_remaining,
+ uint64_t *next_block_remaining,
+ size_t *list_pos)
+{
+ if (*next_block_remaining > 0) {
+ // The Block at *list_pos has previously been split up.
+ assert(!hardware_threads_is_mt());
+ assert(opt_block_size > 0);
+ assert(opt_block_list != NULL);
+
+ if (*next_block_remaining > opt_block_size) {
+ // We have to split the current Block at *list_pos
+ // into another opt_block_size length Block.
+ *block_remaining = opt_block_size;
+ } else {
+ // This is the last remaining split Block for the
+ // Block at *list_pos.
+ *block_remaining = *next_block_remaining;
+ }
+
+ *next_block_remaining -= *block_remaining;
+
+ } else {
+ // The Block at *list_pos has been finished. Go to the next
+ // entry in the list. If the end of the list has been reached,
+ // reuse the size of the last Block.
+ if (opt_block_list[*list_pos + 1] != 0)
+ ++*list_pos;
+
+ *block_remaining = opt_block_list[*list_pos];
+
+ // If in single-threaded mode, split up the Block if needed.
+ // This is not needed in multi-threaded mode because liblzma
+ // will do this due to how threaded encoding works.
+ if (!hardware_threads_is_mt() && opt_block_size > 0
+ && *block_remaining > opt_block_size) {
+ *next_block_remaining
+ = *block_remaining - opt_block_size;
+ *block_remaining = opt_block_size;
+ }
+ }
+}
+
+
+static bool
+coder_write_output(file_pair *pair)
+{
+ if (opt_mode != MODE_TEST) {
+ if (io_write(pair, &out_buf, IO_BUFFER_SIZE - strm.avail_out))
+ return true;
+ }
+
+ strm.next_out = out_buf.u8;
+ strm.avail_out = IO_BUFFER_SIZE;
+ return false;
+}
+
+
+/// Compress or decompress using liblzma.
+static bool
+coder_normal(file_pair *pair)
+{
+ // Encoder needs to know when we have given all the input to it.
+ // The decoders need to know it too when we are using
+ // LZMA_CONCATENATED. We need to check for src_eof here, because
+ // the first input chunk has been already read if decompressing,
+ // and that may have been the only chunk we will read.
+ lzma_action action = pair->src_eof ? LZMA_FINISH : LZMA_RUN;
+
+ lzma_ret ret;
+
+ // Assume that something goes wrong.
+ bool success = false;
+
+ // block_remaining indicates how many input bytes to encode before
+ // finishing the current .xz Block. The Block size is set with
+ // --block-size=SIZE and --block-list. They have an effect only when
+ // compressing to the .xz format. If block_remaining == UINT64_MAX,
+ // only a single block is created.
+ uint64_t block_remaining = UINT64_MAX;
+
+ // next_block_remaining for when we are in single-threaded mode and
+ // the Block in --block-list is larger than the --block-size=SIZE.
+ uint64_t next_block_remaining = 0;
+
+ // Position in opt_block_list. Unused if --block-list wasn't used.
+ size_t list_pos = 0;
+
+ // Handle --block-size for single-threaded mode and the first step
+ // of --block-list.
+ if (opt_mode == MODE_COMPRESS && opt_format == FORMAT_XZ) {
+ // --block-size doesn't do anything here in threaded mode,
+ // because the threaded encoder will take care of splitting
+ // to fixed-sized Blocks.
+ if (!hardware_threads_is_mt() && opt_block_size > 0)
+ block_remaining = opt_block_size;
+
+ // If --block-list was used, start with the first size.
+ //
+ // For threaded case, --block-size specifies how big Blocks
+ // the encoder needs to be prepared to create at maximum
+ // and --block-list will simultaneously cause new Blocks
+ // to be started at specified intervals. To keep things
+ // logical, the same is done in single-threaded mode. The
+ // output is still not identical because in single-threaded
+ // mode the size info isn't written into Block Headers.
+ if (opt_block_list != NULL) {
+ if (block_remaining < opt_block_list[list_pos]) {
+ assert(!hardware_threads_is_mt());
+ next_block_remaining = opt_block_list[list_pos]
+ - block_remaining;
+ } else {
+ block_remaining = opt_block_list[list_pos];
+ }
+ }
+ }
+
+ strm.next_out = out_buf.u8;
+ strm.avail_out = IO_BUFFER_SIZE;
+
+ while (!user_abort) {
+ // Fill the input buffer if it is empty and we aren't
+ // flushing or finishing.
+ if (strm.avail_in == 0 && action == LZMA_RUN) {
+ strm.next_in = in_buf.u8;
+ strm.avail_in = io_read(pair, &in_buf,
+ my_min(block_remaining,
+ IO_BUFFER_SIZE));
+
+ if (strm.avail_in == SIZE_MAX)
+ break;
+
+ if (pair->src_eof) {
+ action = LZMA_FINISH;
+
+ } else if (block_remaining != UINT64_MAX) {
+ // Start a new Block after every
+ // opt_block_size bytes of input.
+ block_remaining -= strm.avail_in;
+ if (block_remaining == 0)
+ action = LZMA_FULL_BARRIER;
+ }
+
+ if (action == LZMA_RUN && pair->flush_needed)
+ action = LZMA_SYNC_FLUSH;
+ }
+
+ // Let liblzma do the actual work.
+ ret = lzma_code(&strm, action);
+
+ // Write out if the output buffer became full.
+ if (strm.avail_out == 0) {
+ if (coder_write_output(pair))
+ break;
+ }
+
+ if (ret == LZMA_STREAM_END && (action == LZMA_SYNC_FLUSH
+ || action == LZMA_FULL_BARRIER)) {
+ if (action == LZMA_SYNC_FLUSH) {
+ // Flushing completed. Write the pending data
+ // out immediately so that the reading side
+ // can decompress everything compressed so far.
+ if (coder_write_output(pair))
+ break;
+
+ // Mark that we haven't seen any new input
+ // since the previous flush.
+ pair->src_has_seen_input = false;
+ pair->flush_needed = false;
+ } else {
+ // Start a new Block after LZMA_FULL_BARRIER.
+ if (opt_block_list == NULL) {
+ assert(!hardware_threads_is_mt());
+ assert(opt_block_size > 0);
+ block_remaining = opt_block_size;
+ } else {
+ split_block(&block_remaining,
+ &next_block_remaining,
+ &list_pos);
+ }
+ }
+
+ // Start a new Block after LZMA_FULL_FLUSH or continue
+ // the same block after LZMA_SYNC_FLUSH.
+ action = LZMA_RUN;
+
+ } else if (ret != LZMA_OK) {
+ // Determine if the return value indicates that we
+ // won't continue coding. LZMA_NO_CHECK would be
+ // here too if LZMA_TELL_ANY_CHECK was used.
+ const bool stop = ret != LZMA_UNSUPPORTED_CHECK;
+
+ if (stop) {
+ // Write the remaining bytes even if something
+ // went wrong, because that way the user gets
+ // as much data as possible, which can be good
+ // when trying to get at least some useful
+ // data out of damaged files.
+ if (coder_write_output(pair))
+ break;
+ }
+
+ if (ret == LZMA_STREAM_END) {
+ if (allow_trailing_input) {
+ io_fix_src_pos(pair, strm.avail_in);
+ success = true;
+ break;
+ }
+
+ // Check that there is no trailing garbage.
+ // This is needed for LZMA_Alone and raw
+ // streams. This is *not* done with .lz files
+ // as that format specifically requires
+ // allowing trailing garbage.
+ if (strm.avail_in == 0 && !pair->src_eof) {
+ // Try reading one more byte.
+ // Hopefully we don't get any more
+ // input, and thus pair->src_eof
+ // becomes true.
+ strm.avail_in = io_read(
+ pair, &in_buf, 1);
+ if (strm.avail_in == SIZE_MAX)
+ break;
+
+ assert(strm.avail_in == 0
+ || strm.avail_in == 1);
+ }
+
+ if (strm.avail_in == 0) {
+ assert(pair->src_eof);
+ success = true;
+ break;
+ }
+
+ // We hadn't reached the end of the file.
+ ret = LZMA_DATA_ERROR;
+ assert(stop);
+ }
+
+ // If we get here and stop is true, something went
+ // wrong and we print an error. Otherwise it's just
+ // a warning and coding can continue.
+ if (stop) {
+ message_error(_("%s: %s"), pair->src_name,
+ message_strm(ret));
+ } else {
+ message_warning(_("%s: %s"), pair->src_name,
+ message_strm(ret));
+
+ // When compressing, all possible errors set
+ // stop to true.
+ assert(opt_mode != MODE_COMPRESS);
+ }
+
+ if (ret == LZMA_MEMLIMIT_ERROR) {
+ // Display how much memory it would have
+ // actually needed.
+ message_mem_needed(V_ERROR,
+ lzma_memusage(&strm));
+ }
+
+ if (stop)
+ break;
+ }
+
+ // Show progress information under certain conditions.
+ message_progress_update();
+ }
+
+ return success;
+}
+
+
+/// Copy from input file to output file without processing the data in any
+/// way. This is used only when trying to decompress unrecognized files
+/// with --decompress --stdout --force, so the output is always stdout.
+static bool
+coder_passthru(file_pair *pair)
+{
+ while (strm.avail_in != 0) {
+ if (user_abort)
+ return false;
+
+ if (io_write(pair, &in_buf, strm.avail_in))
+ return false;
+
+ strm.total_in += strm.avail_in;
+ strm.total_out = strm.total_in;
+ message_progress_update();
+
+ strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
+ if (strm.avail_in == SIZE_MAX)
+ return false;
+ }
+
+ return true;
+}
+
+
+extern void
+coder_run(const char *filename)
+{
+ // Set and possibly print the filename for the progress message.
+ message_filename(filename);
+
+ // Try to open the input file.
+ file_pair *pair = io_open_src(filename);
+ if (pair == NULL)
+ return;
+
+ // Assume that something goes wrong.
+ bool success = false;
+
+ if (opt_mode == MODE_COMPRESS) {
+ strm.next_in = NULL;
+ strm.avail_in = 0;
+ } else {
+ // Read the first chunk of input data. This is needed
+ // to detect the input file type.
+ strm.next_in = in_buf.u8;
+ strm.avail_in = io_read(pair, &in_buf, IO_BUFFER_SIZE);
+ }
+
+ if (strm.avail_in != SIZE_MAX) {
+ // Initialize the coder. This will detect the file format
+ // and, in decompression or testing mode, check the memory
+ // usage of the first Block too. This way we don't try to
+ // open the destination file if we see that coding wouldn't
+ // work at all anyway. This also avoids deleting the old
+ // "target" file if --force was used.
+ const enum coder_init_ret init_ret = coder_init(pair);
+
+ if (init_ret != CODER_INIT_ERROR && !user_abort) {
+ // Don't open the destination file when --test
+ // is used.
+ if (opt_mode == MODE_TEST || !io_open_dest(pair)) {
+ // Remember the current time. It is needed
+ // for progress indicator.
+ mytime_set_start_time();
+
+ // Initialize the progress indicator.
+ //
+ // NOTE: When reading from stdin, fstat()
+ // isn't called on it and thus src_st.st_size
+ // is zero. If stdin pointed to a regular
+ // file, it would still be possible to know
+ // the file size but then we would also need
+ // to take into account the current reading
+ // position since with stdin it isn't
+ // necessarily at the beginning of the file.
+ const bool is_passthru = init_ret
+ == CODER_INIT_PASSTHRU;
+ const uint64_t in_size
+ = pair->src_st.st_size <= 0
+ ? 0 : (uint64_t)(pair->src_st.st_size);
+ message_progress_start(&strm,
+ is_passthru, in_size);
+
+ // Do the actual coding or passthru.
+ if (is_passthru)
+ success = coder_passthru(pair);
+ else
+ success = coder_normal(pair);
+
+ message_progress_end(success);
+ }
+ }
+ }
+
+ // Close the file pair. It needs to know if coding was successful to
+ // know if the source or target file should be unlinked.
+ io_close(pair, success);
+
+ return;
+}
+
+
+#ifndef NDEBUG
+extern void
+coder_free(void)
+{
+ lzma_end(&strm);
+ return;
+}
+#endif
diff --git a/src/xz/coder.h b/src/xz/coder.h
new file mode 100644
index 0000000..b4f43a2
--- /dev/null
+++ b/src/xz/coder.h
@@ -0,0 +1,79 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file coder.h
+/// \brief Compresses or uncompresses a file
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+enum operation_mode {
+ MODE_COMPRESS,
+ MODE_DECOMPRESS,
+ MODE_TEST,
+ MODE_LIST,
+};
+
+
+// NOTE: The order of these is significant in suffix.c.
+enum format_type {
+ FORMAT_AUTO,
+ FORMAT_XZ,
+ FORMAT_LZMA,
+#ifdef HAVE_LZIP_DECODER
+ FORMAT_LZIP,
+#endif
+ FORMAT_RAW,
+};
+
+
+/// Operation mode of the command line tool. This is set in args.c and read
+/// in several files.
+extern enum operation_mode opt_mode;
+
+/// File format to use when encoding or what format(s) to accept when
+/// decoding. This is a global because it's needed also in suffix.c.
+/// This is set in args.c.
+extern enum format_type opt_format;
+
+/// If true, the compression settings are automatically adjusted down if
+/// they exceed the memory usage limit.
+extern bool opt_auto_adjust;
+
+/// If true, stop after decoding the first stream.
+extern bool opt_single_stream;
+
+/// If non-zero, start a new .xz Block after every opt_block_size bytes
+/// of input. This has an effect only when compressing to the .xz format.
+extern uint64_t opt_block_size;
+
+/// This is non-NULL if --block-list was used. This contains the Block sizes
+/// as an array that is terminated with 0.
+extern uint64_t *opt_block_list;
+
+/// Set the integrity check type used when compressing
+extern void coder_set_check(lzma_check check);
+
+/// Set preset number
+extern void coder_set_preset(uint32_t new_preset);
+
+/// Enable extreme mode
+extern void coder_set_extreme(void);
+
+/// Add a filter to the custom filter chain
+extern void coder_add_filter(lzma_vli id, void *options);
+
+/// Set and partially validate compression settings. This can also be used
+/// in decompression or test mode with the raw format.
+extern void coder_set_compression_settings(void);
+
+/// Compress or decompress the given file
+extern void coder_run(const char *filename);
+
+#ifndef NDEBUG
+/// Free the memory allocated for the coder and kill the worker threads.
+extern void coder_free(void);
+#endif
diff --git a/src/xz/file_io.c b/src/xz/file_io.c
new file mode 100644
index 0000000..2828029
--- /dev/null
+++ b/src/xz/file_io.c
@@ -0,0 +1,1403 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file file_io.c
+/// \brief File opening, unlinking, and closing
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#include <fcntl.h>
+
+#ifdef TUKLIB_DOSLIKE
+# include <io.h>
+#else
+# include <poll.h>
+static bool warn_fchown;
+#endif
+
+#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMES)
+# include <sys/time.h>
+#elif defined(HAVE__FUTIME)
+# include <sys/utime.h>
+#elif defined(HAVE_UTIME)
+# include <utime.h>
+#endif
+
+#ifdef HAVE_CAPSICUM
+# ifdef HAVE_SYS_CAPSICUM_H
+# include <sys/capsicum.h>
+# else
+# include <sys/capability.h>
+# endif
+#endif
+
+#include "tuklib_open_stdxxx.h"
+
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+#ifndef O_NOCTTY
+# define O_NOCTTY 0
+#endif
+
+// Using this macro to silence a warning from gcc -Wlogical-op.
+#if EAGAIN == EWOULDBLOCK
+# define IS_EAGAIN_OR_EWOULDBLOCK(e) ((e) == EAGAIN)
+#else
+# define IS_EAGAIN_OR_EWOULDBLOCK(e) \
+ ((e) == EAGAIN || (e) == EWOULDBLOCK)
+#endif
+
+
+typedef enum {
+ IO_WAIT_MORE, // Reading or writing is possible.
+ IO_WAIT_ERROR, // Error or user_abort
+ IO_WAIT_TIMEOUT, // poll() timed out
+} io_wait_ret;
+
+
+/// If true, try to create sparse files when decompressing.
+static bool try_sparse = true;
+
+#ifdef ENABLE_SANDBOX
+/// True if the conditions for sandboxing (described in main()) have been met.
+static bool sandbox_allowed = false;
+#endif
+
+#ifndef TUKLIB_DOSLIKE
+/// File status flags of standard input. This is used by io_open_src()
+/// and io_close_src().
+static int stdin_flags;
+static bool restore_stdin_flags = false;
+
+/// Original file status flags of standard output. This is used by
+/// io_open_dest() and io_close_dest() to save and restore the flags.
+static int stdout_flags;
+static bool restore_stdout_flags = false;
+
+/// Self-pipe used together with the user_abort variable to avoid
+/// race conditions with signal handling.
+static int user_abort_pipe[2];
+#endif
+
+
+static bool io_write_buf(file_pair *pair, const uint8_t *buf, size_t size);
+
+
+extern void
+io_init(void)
+{
+ // Make sure that stdin, stdout, and stderr are connected to
+ // a valid file descriptor. Exit immediately with exit code ERROR
+ // if we cannot make the file descriptors valid. Maybe we should
+ // print an error message, but our stderr could be screwed anyway.
+ tuklib_open_stdxxx(E_ERROR);
+
+#ifndef TUKLIB_DOSLIKE
+ // If fchown() fails setting the owner, we warn about it only if
+ // we are root.
+ warn_fchown = geteuid() == 0;
+
+ // Create a pipe for the self-pipe trick.
+ if (pipe(user_abort_pipe))
+ message_fatal(_("Error creating a pipe: %s"),
+ strerror(errno));
+
+ // Make both ends of the pipe non-blocking.
+ for (unsigned i = 0; i < 2; ++i) {
+ int flags = fcntl(user_abort_pipe[i], F_GETFL);
+ if (flags == -1 || fcntl(user_abort_pipe[i], F_SETFL,
+ flags | O_NONBLOCK) == -1)
+ message_fatal(_("Error creating a pipe: %s"),
+ strerror(errno));
+ }
+#endif
+
+#ifdef __DJGPP__
+ // Avoid doing useless things when statting files.
+ // This isn't important but doesn't hurt.
+ _djstat_flags = _STAT_EXEC_EXT | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
+#endif
+
+ return;
+}
+
+
+#ifndef TUKLIB_DOSLIKE
+extern void
+io_write_to_user_abort_pipe(void)
+{
+ // If the write() fails, it's probably due to the pipe being full.
+ // Failing in that case is fine. If the reason is something else,
+ // there's not much we can do since this is called in a signal
+ // handler. So ignore the errors and try to avoid warnings with
+ // GCC and glibc when _FORTIFY_SOURCE=2 is used.
+ uint8_t b = '\0';
+ const ssize_t ret = write(user_abort_pipe[1], &b, 1);
+ (void)ret;
+ return;
+}
+#endif
+
+
+extern void
+io_no_sparse(void)
+{
+ try_sparse = false;
+ return;
+}
+
+
+#ifdef ENABLE_SANDBOX
+extern void
+io_allow_sandbox(void)
+{
+ sandbox_allowed = true;
+ return;
+}
+
+
+/// Enables operating-system-specific sandbox if it is possible.
+/// src_fd is the file descriptor of the input file.
+static void
+io_sandbox_enter(int src_fd)
+{
+ if (!sandbox_allowed) {
+ // This message is more often annoying than useful so
+ // it's commented out. It can be useful when developing
+ // the sandboxing code.
+ //message(V_DEBUG, _("Sandbox is disabled due "
+ // "to incompatible command line arguments"));
+ return;
+ }
+
+ const char dummy_str[] = "x";
+
+ // Try to ensure that both libc and xz locale files have been
+ // loaded when NLS is enabled.
+ snprintf(NULL, 0, "%s%s", _(dummy_str), strerror(EINVAL));
+
+ // Try to ensure that iconv data files needed for handling multibyte
+ // characters have been loaded. This is needed at least with glibc.
+ tuklib_mbstr_width(dummy_str, NULL);
+
+#ifdef HAVE_CAPSICUM
+ // Capsicum needs FreeBSD 10.0 or later.
+ cap_rights_t rights;
+
+ if (cap_enter())
+ goto error;
+
+ if (cap_rights_limit(src_fd, cap_rights_init(&rights,
+ CAP_EVENT, CAP_FCNTL, CAP_LOOKUP, CAP_READ, CAP_SEEK)))
+ goto error;
+
+ if (src_fd != STDIN_FILENO && cap_rights_limit(
+ STDIN_FILENO, cap_rights_clear(&rights)))
+ goto error;
+
+ if (cap_rights_limit(STDOUT_FILENO, cap_rights_init(&rights,
+ CAP_EVENT, CAP_FCNTL, CAP_FSTAT, CAP_LOOKUP,
+ CAP_WRITE, CAP_SEEK)))
+ goto error;
+
+ if (cap_rights_limit(STDERR_FILENO, cap_rights_init(&rights,
+ CAP_WRITE)))
+ goto error;
+
+ if (cap_rights_limit(user_abort_pipe[0], cap_rights_init(&rights,
+ CAP_EVENT)))
+ goto error;
+
+ if (cap_rights_limit(user_abort_pipe[1], cap_rights_init(&rights,
+ CAP_WRITE)))
+ goto error;
+
+#elif defined(HAVE_PLEDGE)
+ // pledge() was introduced in OpenBSD 5.9.
+ //
+ // main() unconditionally calls pledge() with fairly relaxed
+ // promises which work in all situations. Here we make the
+ // sandbox more strict.
+ if (pledge("stdio", ""))
+ goto error;
+
+ (void)src_fd;
+
+#else
+# error ENABLE_SANDBOX is defined but no sandboxing method was found.
+#endif
+
+ // This message is annoying in xz -lvv.
+ //message(V_DEBUG, _("Sandbox was successfully enabled"));
+ return;
+
+error:
+#ifdef HAVE_CAPSICUM
+ // 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 xz will silently run without
+ // the sandbox.
+ if (errno == ENOSYS)
+ return;
+#endif
+ message_fatal(_("Failed to enable the sandbox"));
+}
+#endif // ENABLE_SANDBOX
+
+
+#ifndef TUKLIB_DOSLIKE
+/// \brief Waits for input or output to become available or for a signal
+///
+/// This uses the self-pipe trick to avoid a race condition that can occur
+/// if a signal is caught after user_abort has been checked but before e.g.
+/// read() has been called. In that situation read() could block unless
+/// non-blocking I/O is used. With non-blocking I/O something like select()
+/// or poll() is needed to avoid a busy-wait loop, and the same race condition
+/// pops up again. There are pselect() (POSIX-1.2001) and ppoll() (not in
+/// POSIX) but neither is portable enough in 2013. The self-pipe trick is
+/// old and very portable.
+static io_wait_ret
+io_wait(file_pair *pair, int timeout, bool is_reading)
+{
+ struct pollfd pfd[2];
+
+ if (is_reading) {
+ pfd[0].fd = pair->src_fd;
+ pfd[0].events = POLLIN;
+ } else {
+ pfd[0].fd = pair->dest_fd;
+ pfd[0].events = POLLOUT;
+ }
+
+ pfd[1].fd = user_abort_pipe[0];
+ pfd[1].events = POLLIN;
+
+ while (true) {
+ const int ret = poll(pfd, 2, timeout);
+
+ if (user_abort)
+ return IO_WAIT_ERROR;
+
+ if (ret == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+
+ message_error(_("%s: poll() failed: %s"),
+ is_reading ? pair->src_name
+ : pair->dest_name,
+ strerror(errno));
+ return IO_WAIT_ERROR;
+ }
+
+ if (ret == 0)
+ return IO_WAIT_TIMEOUT;
+
+ if (pfd[0].revents != 0)
+ return IO_WAIT_MORE;
+ }
+}
+#endif
+
+
+/// \brief Unlink a file
+///
+/// This tries to verify that the file being unlinked really is the file that
+/// we want to unlink by verifying device and inode numbers. There's still
+/// a small unavoidable race, but this is much better than nothing (the file
+/// could have been moved/replaced even hours earlier).
+static void
+io_unlink(const char *name, const struct stat *known_st)
+{
+#if defined(TUKLIB_DOSLIKE)
+ // On DOS-like systems, st_ino is meaningless, so don't bother
+ // testing it. Just silence a compiler warning.
+ (void)known_st;
+#else
+ struct stat new_st;
+
+ // If --force was used, use stat() instead of lstat(). This way
+ // (de)compressing symlinks works correctly. However, it also means
+ // that xz cannot detect if a regular file foo is renamed to bar
+ // and then a symlink foo -> bar is created. Because of stat()
+ // instead of lstat(), xz will think that foo hasn't been replaced
+ // with another file. Thus, xz will remove foo even though it no
+ // longer is the same file that xz used when it started compressing.
+ // Probably it's not too bad though, so this doesn't need a more
+ // complex fix.
+ const int stat_ret = opt_force
+ ? stat(name, &new_st) : lstat(name, &new_st);
+
+ if (stat_ret
+# ifdef __VMS
+ // st_ino is an array, and we don't want to
+ // compare st_dev at all.
+ || memcmp(&new_st.st_ino, &known_st->st_ino,
+ sizeof(new_st.st_ino)) != 0
+# else
+ // Typical POSIX-like system
+ || new_st.st_dev != known_st->st_dev
+ || new_st.st_ino != known_st->st_ino
+# endif
+ )
+ // 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.
+ message_warning(_("%s: File seems to have been moved, "
+ "not removing"), name);
+ else
+#endif
+ // There's a race condition between lstat() and unlink()
+ // but at least we have tried to avoid removing wrong file.
+ if (unlink(name))
+ message_warning(_("%s: Cannot remove: %s"),
+ name, strerror(errno));
+
+ return;
+}
+
+
+/// \brief Copies owner/group and permissions
+///
+/// \todo ACL and EA support
+///
+static void
+io_copy_attrs(const file_pair *pair)
+{
+ // Skip chown and chmod on Windows.
+#ifndef TUKLIB_DOSLIKE
+ // This function is more tricky than you may think at first.
+ // Blindly copying permissions may permit users to access the
+ // destination file who didn't have permission to access the
+ // source file.
+
+ // Try changing the owner of the file. If we aren't root or the owner
+ // isn't already us, fchown() probably doesn't succeed. We warn
+ // about failing fchown() only if we are root.
+ if (fchown(pair->dest_fd, pair->src_st.st_uid, (gid_t)(-1))
+ && warn_fchown)
+ message_warning(_("%s: Cannot set the file owner: %s"),
+ pair->dest_name, strerror(errno));
+
+ mode_t mode;
+
+ // With BSD semantics the new dest file may have a group that
+ // does not belong to the user. If the src file has the same gid
+ // nothing has to be done. Nevertheless OpenBSD fchown(2) fails
+ // in this case which seems to be POSIX compliant. As there is
+ // nothing to do, skip the system call.
+ if (pair->dest_st.st_gid != pair->src_st.st_gid
+ && fchown(pair->dest_fd, (uid_t)(-1),
+ pair->src_st.st_gid)) {
+ message_warning(_("%s: Cannot set the file group: %s"),
+ pair->dest_name, strerror(errno));
+ // We can still safely copy some additional permissions:
+ // `group' must be at least as strict as `other' and
+ // also vice versa.
+ //
+ // NOTE: After this, the owner of the source file may
+ // get additional permissions. This shouldn't be too bad,
+ // because the owner would have had permission to chmod
+ // the original file anyway.
+ mode = ((pair->src_st.st_mode & 0070) >> 3)
+ & (pair->src_st.st_mode & 0007);
+ mode = (pair->src_st.st_mode & 0700) | (mode << 3) | mode;
+ } else {
+ // Drop the setuid, setgid, and sticky bits.
+ mode = pair->src_st.st_mode & 0777;
+ }
+
+ if (fchmod(pair->dest_fd, mode))
+ message_warning(_("%s: Cannot set the file permissions: %s"),
+ pair->dest_name, strerror(errno));
+#endif
+
+ // Copy the timestamps. We have several possible ways to do this, of
+ // which some are better in both security and precision.
+ //
+ // First, get the nanosecond part of the timestamps. As of writing,
+ // it's not standardized by POSIX, and there are several names for
+ // the same thing in struct stat.
+ long atime_nsec;
+ long mtime_nsec;
+
+# if defined(HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
+ // GNU and Solaris
+ atime_nsec = pair->src_st.st_atim.tv_nsec;
+ mtime_nsec = pair->src_st.st_mtim.tv_nsec;
+
+# elif defined(HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC)
+ // BSD
+ atime_nsec = pair->src_st.st_atimespec.tv_nsec;
+ mtime_nsec = pair->src_st.st_mtimespec.tv_nsec;
+
+# elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC)
+ // GNU and BSD without extensions
+ atime_nsec = pair->src_st.st_atimensec;
+ mtime_nsec = pair->src_st.st_mtimensec;
+
+# elif defined(HAVE_STRUCT_STAT_ST_UATIME)
+ // Tru64
+ atime_nsec = pair->src_st.st_uatime * 1000;
+ mtime_nsec = pair->src_st.st_umtime * 1000;
+
+# elif defined(HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC)
+ // UnixWare
+ atime_nsec = pair->src_st.st_atim.st__tim.tv_nsec;
+ mtime_nsec = pair->src_st.st_mtim.st__tim.tv_nsec;
+
+# else
+ // Safe fallback
+ atime_nsec = 0;
+ mtime_nsec = 0;
+# endif
+
+ // Construct a structure to hold the timestamps and call appropriate
+ // function to set the timestamps.
+#if defined(HAVE_FUTIMENS)
+ // Use nanosecond precision.
+ struct timespec tv[2];
+ tv[0].tv_sec = pair->src_st.st_atime;
+ tv[0].tv_nsec = atime_nsec;
+ tv[1].tv_sec = pair->src_st.st_mtime;
+ tv[1].tv_nsec = mtime_nsec;
+
+ (void)futimens(pair->dest_fd, tv);
+
+#elif defined(HAVE_FUTIMES) || defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMES)
+ // Use microsecond precision.
+ struct timeval tv[2];
+ tv[0].tv_sec = pair->src_st.st_atime;
+ tv[0].tv_usec = atime_nsec / 1000;
+ tv[1].tv_sec = pair->src_st.st_mtime;
+ tv[1].tv_usec = mtime_nsec / 1000;
+
+# if defined(HAVE_FUTIMES)
+ (void)futimes(pair->dest_fd, tv);
+# elif defined(HAVE_FUTIMESAT)
+ (void)futimesat(pair->dest_fd, NULL, tv);
+# else
+ // Argh, no function to use a file descriptor to set the timestamp.
+ (void)utimes(pair->dest_name, tv);
+# endif
+
+#elif defined(HAVE__FUTIME)
+ // Use one-second precision with Windows-specific _futime().
+ // We could use utime() too except that for some reason the
+ // timestamp will get reset at close(). With _futime() it works.
+ // This struct cannot be const as _futime() takes a non-const pointer.
+ struct _utimbuf buf = {
+ .actime = pair->src_st.st_atime,
+ .modtime = pair->src_st.st_mtime,
+ };
+
+ // Avoid warnings.
+ (void)atime_nsec;
+ (void)mtime_nsec;
+
+ (void)_futime(pair->dest_fd, &buf);
+
+#elif defined(HAVE_UTIME)
+ // Use one-second precision. utime() doesn't support using file
+ // descriptor either. Some systems have broken utime() prototype
+ // so don't make this const.
+ struct utimbuf buf = {
+ .actime = pair->src_st.st_atime,
+ .modtime = pair->src_st.st_mtime,
+ };
+
+ // Avoid warnings.
+ (void)atime_nsec;
+ (void)mtime_nsec;
+
+ (void)utime(pair->dest_name, &buf);
+#endif
+
+ return;
+}
+
+
+/// Opens the source file. Returns false on success, true on error.
+static bool
+io_open_src_real(file_pair *pair)
+{
+ // There's nothing to open when reading from stdin.
+ if (pair->src_name == stdin_filename) {
+ pair->src_fd = STDIN_FILENO;
+#ifdef TUKLIB_DOSLIKE
+ setmode(STDIN_FILENO, O_BINARY);
+#else
+ // Try to set stdin to non-blocking mode. It won't work
+ // e.g. on OpenBSD if stdout is e.g. /dev/null. In such
+ // case we proceed as if stdin were non-blocking anyway
+ // (in case of /dev/null it will be in practice). The
+ // same applies to stdout in io_open_dest_real().
+ stdin_flags = fcntl(STDIN_FILENO, F_GETFL);
+ if (stdin_flags == -1) {
+ message_error(_("Error getting the file status flags "
+ "from standard input: %s"),
+ strerror(errno));
+ return true;
+ }
+
+ if ((stdin_flags & O_NONBLOCK) == 0
+ && fcntl(STDIN_FILENO, F_SETFL,
+ stdin_flags | O_NONBLOCK) != -1)
+ restore_stdin_flags = true;
+#endif
+#ifdef HAVE_POSIX_FADVISE
+ // It will fail if stdin is a pipe and that's fine.
+ (void)posix_fadvise(STDIN_FILENO, 0, 0,
+ opt_mode == MODE_LIST
+ ? POSIX_FADV_RANDOM
+ : POSIX_FADV_SEQUENTIAL);
+#endif
+ return false;
+ }
+
+ // Symlinks are not followed unless writing to stdout or --force
+ // or --keep was used.
+ const bool follow_symlinks
+ = opt_stdout || opt_force || opt_keep_original;
+
+ // We accept only regular files if we are writing the output
+ // to disk too. bzip2 allows overriding this with --force but
+ // gzip and xz don't.
+ const bool reg_files_only = !opt_stdout;
+
+ // Flags for open()
+ int flags = O_RDONLY | O_BINARY | O_NOCTTY;
+
+#ifndef TUKLIB_DOSLIKE
+ // Use non-blocking I/O:
+ // - It prevents blocking when opening FIFOs and some other
+ // special files, which is good if we want to accept only
+ // regular files.
+ // - It can help avoiding some race conditions with signal handling.
+ flags |= O_NONBLOCK;
+#endif
+
+#if defined(O_NOFOLLOW)
+ if (!follow_symlinks)
+ flags |= O_NOFOLLOW;
+#elif !defined(TUKLIB_DOSLIKE)
+ // Some POSIX-like systems lack O_NOFOLLOW (it's not required
+ // by POSIX). Check for symlinks with a separate lstat() on
+ // these systems.
+ if (!follow_symlinks) {
+ struct stat st;
+ if (lstat(pair->src_name, &st)) {
+ message_error(_("%s: %s"), pair->src_name,
+ strerror(errno));
+ return true;
+
+ } else if (S_ISLNK(st.st_mode)) {
+ message_warning(_("%s: Is a symbolic link, "
+ "skipping"), pair->src_name);
+ return true;
+ }
+ }
+#else
+ // Avoid warnings.
+ (void)follow_symlinks;
+#endif
+
+ // Try to open the file. Signals have been blocked so EINTR shouldn't
+ // be possible.
+ pair->src_fd = open(pair->src_name, flags);
+
+ if (pair->src_fd == -1) {
+ // Signals (that have a signal handler) have been blocked.
+ assert(errno != EINTR);
+
+#ifdef O_NOFOLLOW
+ // Give an understandable error message if the reason
+ // for failing was that the file was a symbolic link.
+ //
+ // Note that at least Linux, OpenBSD, Solaris, and Darwin
+ // use ELOOP to indicate that O_NOFOLLOW was the reason
+ // that open() failed. Because there may be
+ // directories in the pathname, ELOOP may occur also
+ // because of a symlink loop in the directory part.
+ // So ELOOP doesn't tell us what actually went wrong,
+ // and this stupidity went into POSIX-1.2008 too.
+ //
+ // FreeBSD associates EMLINK with O_NOFOLLOW and
+ // Tru64 uses ENOTSUP. We use these directly here
+ // and skip the lstat() call and the associated race.
+ // I want to hear if there are other kernels that
+ // fail with something else than ELOOP with O_NOFOLLOW.
+ bool was_symlink = false;
+
+# if defined(__FreeBSD__) || defined(__DragonFly__)
+ if (errno == EMLINK)
+ was_symlink = true;
+
+# elif defined(__digital__) && defined(__unix__)
+ if (errno == ENOTSUP)
+ was_symlink = true;
+
+# elif defined(__NetBSD__)
+ if (errno == EFTYPE)
+ was_symlink = true;
+
+# else
+ if (errno == ELOOP && !follow_symlinks) {
+ const int saved_errno = errno;
+ struct stat st;
+ if (lstat(pair->src_name, &st) == 0
+ && S_ISLNK(st.st_mode))
+ was_symlink = true;
+
+ errno = saved_errno;
+ }
+# endif
+
+ if (was_symlink)
+ message_warning(_("%s: Is a symbolic link, "
+ "skipping"), pair->src_name);
+ else
+#endif
+ // Something else than O_NOFOLLOW failing
+ // (assuming that the race conditions didn't
+ // confuse us).
+ message_error(_("%s: %s"), pair->src_name,
+ strerror(errno));
+
+ return true;
+ }
+
+ // Stat the source file. We need the result also when we copy
+ // the permissions, and when unlinking.
+ //
+ // NOTE: Use stat() instead of fstat() with DJGPP, because
+ // then we have a better chance to get st_ino value that can
+ // be used in io_open_dest_real() to prevent overwriting the
+ // source file.
+#ifdef __DJGPP__
+ if (stat(pair->src_name, &pair->src_st))
+ goto error_msg;
+#else
+ if (fstat(pair->src_fd, &pair->src_st))
+ goto error_msg;
+#endif
+
+ if (S_ISDIR(pair->src_st.st_mode)) {
+ message_warning(_("%s: Is a directory, skipping"),
+ pair->src_name);
+ goto error;
+ }
+
+ if (reg_files_only && !S_ISREG(pair->src_st.st_mode)) {
+ message_warning(_("%s: Not a regular file, skipping"),
+ pair->src_name);
+ goto error;
+ }
+
+#ifndef TUKLIB_DOSLIKE
+ if (reg_files_only && !opt_force && !opt_keep_original) {
+ if (pair->src_st.st_mode & (S_ISUID | S_ISGID)) {
+ // gzip rejects setuid and setgid files even
+ // when --force was used. bzip2 doesn't check
+ // for them, but calls fchown() after fchmod(),
+ // and many systems automatically drop setuid
+ // and setgid bits there.
+ //
+ // We accept setuid and setgid files if
+ // --force or --keep was used. We drop these bits
+ // explicitly in io_copy_attr().
+ message_warning(_("%s: File has setuid or "
+ "setgid bit set, skipping"),
+ pair->src_name);
+ goto error;
+ }
+
+ if (pair->src_st.st_mode & S_ISVTX) {
+ message_warning(_("%s: File has sticky bit "
+ "set, skipping"),
+ pair->src_name);
+ goto error;
+ }
+
+ if (pair->src_st.st_nlink > 1) {
+ message_warning(_("%s: Input file has more "
+ "than one hard link, "
+ "skipping"), pair->src_name);
+ goto error;
+ }
+ }
+
+ // If it is something else than a regular file, wait until
+ // there is input available. This way reading from FIFOs
+ // will work when open() is used with O_NONBLOCK.
+ if (!S_ISREG(pair->src_st.st_mode)) {
+ signals_unblock();
+ const io_wait_ret ret = io_wait(pair, -1, true);
+ signals_block();
+
+ if (ret != IO_WAIT_MORE)
+ goto error;
+ }
+#endif
+
+#ifdef HAVE_POSIX_FADVISE
+ // It will fail with some special files like FIFOs but that is fine.
+ (void)posix_fadvise(pair->src_fd, 0, 0,
+ opt_mode == MODE_LIST
+ ? POSIX_FADV_RANDOM
+ : POSIX_FADV_SEQUENTIAL);
+#endif
+
+ return false;
+
+error_msg:
+ message_error(_("%s: %s"), pair->src_name, strerror(errno));
+error:
+ (void)close(pair->src_fd);
+ return true;
+}
+
+
+extern file_pair *
+io_open_src(const char *src_name)
+{
+ if (src_name[0] == '\0') {
+ message_error(_("Empty filename, skipping"));
+ return NULL;
+ }
+
+ // Since we have only one file open at a time, we can use
+ // a statically allocated structure.
+ static file_pair pair;
+
+ // This implicitly also initializes src_st.st_size to zero
+ // which is expected to be <= 0 by default. fstat() isn't
+ // called when reading from standard input but src_st.st_size
+ // is still read.
+ pair = (file_pair){
+ .src_name = src_name,
+ .dest_name = NULL,
+ .src_fd = -1,
+ .dest_fd = -1,
+ .src_eof = false,
+ .src_has_seen_input = false,
+ .flush_needed = false,
+ .dest_try_sparse = false,
+ .dest_pending_sparse = 0,
+ };
+
+ // Block the signals, for which we have a custom signal handler, so
+ // that we don't need to worry about EINTR.
+ signals_block();
+ const bool error = io_open_src_real(&pair);
+ signals_unblock();
+
+#ifdef ENABLE_SANDBOX
+ if (!error)
+ io_sandbox_enter(pair.src_fd);
+#endif
+
+ return error ? NULL : &pair;
+}
+
+
+/// \brief Closes source file of the file_pair structure
+///
+/// \param pair File whose src_fd should be closed
+/// \param success If true, the file will be removed from the disk if
+/// closing succeeds and --keep hasn't been used.
+static void
+io_close_src(file_pair *pair, bool success)
+{
+#ifndef TUKLIB_DOSLIKE
+ if (restore_stdin_flags) {
+ assert(pair->src_fd == STDIN_FILENO);
+
+ restore_stdin_flags = false;
+
+ if (fcntl(STDIN_FILENO, F_SETFL, stdin_flags) == -1)
+ message_error(_("Error restoring the status flags "
+ "to standard input: %s"),
+ strerror(errno));
+ }
+#endif
+
+ if (pair->src_fd != STDIN_FILENO && pair->src_fd != -1) {
+ // Close the file before possibly unlinking it. On DOS-like
+ // systems this is always required since unlinking will fail
+ // if the file is open. On POSIX systems it usually works
+ // to unlink open files, but in some cases it doesn't and
+ // one gets EBUSY in errno.
+ //
+ // xz 5.2.2 and older unlinked the file before closing it
+ // (except on DOS-like systems). The old code didn't handle
+ // EBUSY and could fail e.g. on some CIFS shares. The
+ // advantage of unlinking before closing is negligible
+ // (avoids a race between close() and stat()/lstat() and
+ // unlink()), so let's keep this simple.
+ (void)close(pair->src_fd);
+
+ if (success && !opt_keep_original)
+ io_unlink(pair->src_name, &pair->src_st);
+ }
+
+ return;
+}
+
+
+static bool
+io_open_dest_real(file_pair *pair)
+{
+ if (opt_stdout || pair->src_fd == STDIN_FILENO) {
+ // We don't modify or free() this.
+ pair->dest_name = (char *)"(stdout)";
+ pair->dest_fd = STDOUT_FILENO;
+#ifdef TUKLIB_DOSLIKE
+ setmode(STDOUT_FILENO, O_BINARY);
+#else
+ // Try to set O_NONBLOCK if it isn't already set.
+ // If it fails, we assume that stdout is non-blocking
+ // in practice. See the comments in io_open_src_real()
+ // for similar situation with stdin.
+ //
+ // NOTE: O_APPEND may be unset later in this function
+ // and it relies on stdout_flags being set here.
+ stdout_flags = fcntl(STDOUT_FILENO, F_GETFL);
+ if (stdout_flags == -1) {
+ message_error(_("Error getting the file status flags "
+ "from standard output: %s"),
+ strerror(errno));
+ return true;
+ }
+
+ if ((stdout_flags & O_NONBLOCK) == 0
+ && fcntl(STDOUT_FILENO, F_SETFL,
+ stdout_flags | O_NONBLOCK) != -1)
+ restore_stdout_flags = true;
+#endif
+ } else {
+ pair->dest_name = suffix_get_dest_name(pair->src_name);
+ if (pair->dest_name == NULL)
+ return true;
+
+#ifdef __DJGPP__
+ struct stat st;
+ if (stat(pair->dest_name, &st) == 0) {
+ // Check that it isn't a special file like "prn".
+ if (st.st_dev == -1) {
+ message_error("%s: Refusing to write to "
+ "a DOS special file",
+ pair->dest_name);
+ free(pair->dest_name);
+ return true;
+ }
+
+ // Check that we aren't overwriting the source file.
+ if (st.st_dev == pair->src_st.st_dev
+ && st.st_ino == pair->src_st.st_ino) {
+ message_error("%s: Output file is the same "
+ "as the input file",
+ pair->dest_name);
+ free(pair->dest_name);
+ return true;
+ }
+ }
+#endif
+
+ // If --force was used, unlink the target file first.
+ if (opt_force && unlink(pair->dest_name) && errno != ENOENT) {
+ message_error(_("%s: Cannot remove: %s"),
+ pair->dest_name, strerror(errno));
+ free(pair->dest_name);
+ return true;
+ }
+
+ // Open the file.
+ int flags = O_WRONLY | O_BINARY | O_NOCTTY
+ | O_CREAT | O_EXCL;
+#ifndef TUKLIB_DOSLIKE
+ flags |= O_NONBLOCK;
+#endif
+ const mode_t mode = S_IRUSR | S_IWUSR;
+ pair->dest_fd = open(pair->dest_name, flags, mode);
+
+ if (pair->dest_fd == -1) {
+ message_error(_("%s: %s"), pair->dest_name,
+ strerror(errno));
+ free(pair->dest_name);
+ return true;
+ }
+ }
+
+ if (fstat(pair->dest_fd, &pair->dest_st)) {
+ // If fstat() really fails, we have a safe fallback here.
+#if defined(__VMS)
+ pair->dest_st.st_ino[0] = 0;
+ pair->dest_st.st_ino[1] = 0;
+ pair->dest_st.st_ino[2] = 0;
+#else
+ pair->dest_st.st_dev = 0;
+ pair->dest_st.st_ino = 0;
+#endif
+ }
+#if defined(TUKLIB_DOSLIKE) && !defined(__DJGPP__)
+ // Check that the output file is a regular file. We open with O_EXCL
+ // but that doesn't prevent open()/_open() on Windows from opening
+ // files like "con" or "nul".
+ //
+ // With DJGPP this check is done with stat() even before opening
+ // the output file. That method or a variant of it doesn't work on
+ // Windows because on Windows stat()/_stat64() sets st.st_mode so
+ // that S_ISREG(st.st_mode) will be true even for special files.
+ // With fstat()/_fstat64() it works.
+ else if (pair->dest_fd != STDOUT_FILENO
+ && !S_ISREG(pair->dest_st.st_mode)) {
+ message_error("%s: Destination is not a regular file",
+ pair->dest_name);
+
+ // dest_fd needs to be reset to -1 to keep io_close() working.
+ (void)close(pair->dest_fd);
+ pair->dest_fd = -1;
+
+ free(pair->dest_name);
+ return true;
+ }
+#elif !defined(TUKLIB_DOSLIKE)
+ else if (try_sparse && opt_mode == MODE_DECOMPRESS) {
+ // When writing to standard output, we need to be extra
+ // careful:
+ // - It may be connected to something else than
+ // a regular file.
+ // - We aren't necessarily writing to a new empty file
+ // or to the end of an existing file.
+ // - O_APPEND may be active.
+ //
+ // TODO: I'm keeping this disabled for DOS-like systems
+ // for now. FAT doesn't support sparse files, but NTFS
+ // does, so maybe this should be enabled on Windows after
+ // some testing.
+ if (pair->dest_fd == STDOUT_FILENO) {
+ if (!S_ISREG(pair->dest_st.st_mode))
+ return false;
+
+ if (stdout_flags & O_APPEND) {
+ // Creating a sparse file is not possible
+ // when O_APPEND is active (it's used by
+ // shell's >> redirection). As I understand
+ // it, it is safe to temporarily disable
+ // O_APPEND in xz, because if someone
+ // happened to write to the same file at the
+ // same time, results would be bad anyway
+ // (users shouldn't assume that xz uses any
+ // specific block size when writing data).
+ //
+ // The write position may be something else
+ // than the end of the file, so we must fix
+ // it to start writing at the end of the file
+ // to imitate O_APPEND.
+ if (lseek(STDOUT_FILENO, 0, SEEK_END) == -1)
+ return false;
+
+ // Construct the new file status flags.
+ // If O_NONBLOCK was set earlier in this
+ // function, it must be kept here too.
+ int flags = stdout_flags & ~O_APPEND;
+ if (restore_stdout_flags)
+ flags |= O_NONBLOCK;
+
+ // If this fcntl() fails, we continue but won't
+ // try to create sparse output. The original
+ // flags will still be restored if needed (to
+ // unset O_NONBLOCK) when the file is finished.
+ if (fcntl(STDOUT_FILENO, F_SETFL, flags) == -1)
+ return false;
+
+ // Disabling O_APPEND succeeded. Mark
+ // that the flags should be restored
+ // in io_close_dest(). (This may have already
+ // been set when enabling O_NONBLOCK.)
+ restore_stdout_flags = true;
+
+ } else if (lseek(STDOUT_FILENO, 0, SEEK_CUR)
+ != pair->dest_st.st_size) {
+ // Writing won't start exactly at the end
+ // of the file. We cannot use sparse output,
+ // because it would probably corrupt the file.
+ return false;
+ }
+ }
+
+ pair->dest_try_sparse = true;
+ }
+#endif
+
+ return false;
+}
+
+
+extern bool
+io_open_dest(file_pair *pair)
+{
+ signals_block();
+ const bool ret = io_open_dest_real(pair);
+ signals_unblock();
+ return ret;
+}
+
+
+/// \brief Closes destination file of the file_pair structure
+///
+/// \param pair File whose dest_fd should be closed
+/// \param success If false, the file will be removed from the disk.
+///
+/// \return Zero if closing succeeds. On error, -1 is returned and
+/// error message printed.
+static bool
+io_close_dest(file_pair *pair, bool success)
+{
+#ifndef TUKLIB_DOSLIKE
+ // If io_open_dest() has disabled O_APPEND, restore it here.
+ if (restore_stdout_flags) {
+ assert(pair->dest_fd == STDOUT_FILENO);
+
+ restore_stdout_flags = false;
+
+ if (fcntl(STDOUT_FILENO, F_SETFL, stdout_flags) == -1) {
+ message_error(_("Error restoring the O_APPEND flag "
+ "to standard output: %s"),
+ strerror(errno));
+ return true;
+ }
+ }
+#endif
+
+ if (pair->dest_fd == -1 || pair->dest_fd == STDOUT_FILENO)
+ return false;
+
+ if (close(pair->dest_fd)) {
+ message_error(_("%s: Closing the file failed: %s"),
+ pair->dest_name, strerror(errno));
+
+ // Closing destination file failed, so we cannot trust its
+ // contents. Get rid of junk:
+ io_unlink(pair->dest_name, &pair->dest_st);
+ free(pair->dest_name);
+ return true;
+ }
+
+ // If the operation using this file wasn't successful, we git rid
+ // of the junk file.
+ if (!success)
+ io_unlink(pair->dest_name, &pair->dest_st);
+
+ free(pair->dest_name);
+
+ return false;
+}
+
+
+extern void
+io_close(file_pair *pair, bool success)
+{
+ // Take care of sparseness at the end of the output file.
+ if (success && pair->dest_try_sparse
+ && pair->dest_pending_sparse > 0) {
+ // Seek forward one byte less than the size of the pending
+ // hole, then write one zero-byte. This way the file grows
+ // to its correct size. An alternative would be to use
+ // ftruncate() but that isn't portable enough (e.g. it
+ // doesn't work with FAT on Linux; FAT isn't that important
+ // since it doesn't support sparse files anyway, but we don't
+ // want to create corrupt files on it).
+ if (lseek(pair->dest_fd, pair->dest_pending_sparse - 1,
+ SEEK_CUR) == -1) {
+ message_error(_("%s: Seeking failed when trying "
+ "to create a sparse file: %s"),
+ pair->dest_name, strerror(errno));
+ success = false;
+ } else {
+ const uint8_t zero[1] = { '\0' };
+ if (io_write_buf(pair, zero, 1))
+ success = false;
+ }
+ }
+
+ signals_block();
+
+ // Copy the file attributes. We need to skip this if destination
+ // file isn't open or it is standard output.
+ if (success && pair->dest_fd != -1 && pair->dest_fd != STDOUT_FILENO)
+ io_copy_attrs(pair);
+
+ // Close the destination first. If it fails, we must not remove
+ // the source file!
+ if (io_close_dest(pair, success))
+ success = false;
+
+ // Close the source file, and unlink it if the operation using this
+ // file pair was successful and we haven't requested to keep the
+ // source file.
+ io_close_src(pair, success);
+
+ signals_unblock();
+
+ return;
+}
+
+
+extern void
+io_fix_src_pos(file_pair *pair, size_t rewind_size)
+{
+ assert(rewind_size <= IO_BUFFER_SIZE);
+
+ if (rewind_size > 0) {
+ // This doesn't need to work on unseekable file descriptors,
+ // so just ignore possible errors.
+ (void)lseek(pair->src_fd, -(off_t)(rewind_size), SEEK_CUR);
+ }
+
+ return;
+}
+
+
+extern size_t
+io_read(file_pair *pair, io_buf *buf, size_t size)
+{
+ assert(size <= IO_BUFFER_SIZE);
+
+ size_t pos = 0;
+
+ while (pos < size) {
+ const ssize_t amount = read(
+ pair->src_fd, buf->u8 + pos, size - pos);
+
+ if (amount == 0) {
+ pair->src_eof = true;
+ break;
+ }
+
+ if (amount == -1) {
+ if (errno == EINTR) {
+ if (user_abort)
+ return SIZE_MAX;
+
+ continue;
+ }
+
+#ifndef TUKLIB_DOSLIKE
+ if (IS_EAGAIN_OR_EWOULDBLOCK(errno)) {
+ // Disable the flush-timeout if no input has
+ // been seen since the previous flush and thus
+ // there would be nothing to flush after the
+ // timeout expires (avoids busy waiting).
+ const int timeout = pair->src_has_seen_input
+ ? mytime_get_flush_timeout()
+ : -1;
+
+ switch (io_wait(pair, timeout, true)) {
+ case IO_WAIT_MORE:
+ continue;
+
+ case IO_WAIT_ERROR:
+ return SIZE_MAX;
+
+ case IO_WAIT_TIMEOUT:
+ pair->flush_needed = true;
+ return pos;
+
+ default:
+ message_bug();
+ }
+ }
+#endif
+
+ message_error(_("%s: Read error: %s"),
+ pair->src_name, strerror(errno));
+
+ return SIZE_MAX;
+ }
+
+ pos += (size_t)(amount);
+
+ if (!pair->src_has_seen_input) {
+ pair->src_has_seen_input = true;
+ mytime_set_flush_time();
+ }
+ }
+
+ return pos;
+}
+
+
+extern bool
+io_seek_src(file_pair *pair, uint64_t pos)
+{
+ // Caller must not attempt to seek past the end of the input file
+ // (seeking to 100 in a 100-byte file is seeking to the end of
+ // the file, not past the end of the file, and thus that is allowed).
+ //
+ // This also validates that pos can be safely cast to off_t.
+ if (pos > (uint64_t)(pair->src_st.st_size))
+ message_bug();
+
+ if (lseek(pair->src_fd, (off_t)(pos), SEEK_SET) == -1) {
+ message_error(_("%s: Error seeking the file: %s"),
+ pair->src_name, strerror(errno));
+ return true;
+ }
+
+ pair->src_eof = false;
+
+ return false;
+}
+
+
+extern bool
+io_pread(file_pair *pair, io_buf *buf, size_t size, uint64_t pos)
+{
+ // Using lseek() and read() is more portable than pread() and
+ // for us it is as good as real pread().
+ if (io_seek_src(pair, pos))
+ return true;
+
+ const size_t amount = io_read(pair, buf, size);
+ if (amount == SIZE_MAX)
+ return true;
+
+ if (amount != size) {
+ message_error(_("%s: Unexpected end of file"),
+ pair->src_name);
+ return true;
+ }
+
+ return false;
+}
+
+
+static bool
+is_sparse(const io_buf *buf)
+{
+ assert(IO_BUFFER_SIZE % sizeof(uint64_t) == 0);
+
+ for (size_t i = 0; i < ARRAY_SIZE(buf->u64); ++i)
+ if (buf->u64[i] != 0)
+ return false;
+
+ return true;
+}
+
+
+static bool
+io_write_buf(file_pair *pair, const uint8_t *buf, size_t size)
+{
+ assert(size <= IO_BUFFER_SIZE);
+
+ while (size > 0) {
+ const ssize_t amount = write(pair->dest_fd, buf, size);
+ if (amount == -1) {
+ if (errno == EINTR) {
+ if (user_abort)
+ return true;
+
+ continue;
+ }
+
+#ifndef TUKLIB_DOSLIKE
+ if (IS_EAGAIN_OR_EWOULDBLOCK(errno)) {
+ if (io_wait(pair, -1, false) == IO_WAIT_MORE)
+ continue;
+
+ return true;
+ }
+#endif
+
+ // Handle broken pipe specially. gzip and bzip2
+ // don't print anything on SIGPIPE. In addition,
+ // gzip --quiet uses exit status 2 (warning) on
+ // broken pipe instead of whatever raise(SIGPIPE)
+ // would make it return. It is there to hide "Broken
+ // pipe" message on some old shells (probably old
+ // GNU bash).
+ //
+ // We don't do anything special with --quiet, which
+ // is what bzip2 does too. If we get SIGPIPE, we
+ // will handle it like other signals by setting
+ // user_abort, and get EPIPE here.
+ if (errno != EPIPE)
+ message_error(_("%s: Write error: %s"),
+ pair->dest_name, strerror(errno));
+
+ return true;
+ }
+
+ buf += (size_t)(amount);
+ size -= (size_t)(amount);
+ }
+
+ return false;
+}
+
+
+extern bool
+io_write(file_pair *pair, const io_buf *buf, size_t size)
+{
+ assert(size <= IO_BUFFER_SIZE);
+
+ if (pair->dest_try_sparse) {
+ // Check if the block is sparse (contains only zeros). If it
+ // sparse, we just store the amount and return. We will take
+ // care of actually skipping over the hole when we hit the
+ // next data block or close the file.
+ //
+ // Since io_close() requires that dest_pending_sparse > 0
+ // if the file ends with sparse block, we must also return
+ // if size == 0 to avoid doing the lseek().
+ if (size == IO_BUFFER_SIZE) {
+ // Even if the block was sparse, treat it as non-sparse
+ // if the pending sparse amount is large compared to
+ // the size of off_t. In practice this only matters
+ // on 32-bit systems where off_t isn't always 64 bits.
+ const off_t pending_max
+ = (off_t)(1) << (sizeof(off_t) * CHAR_BIT - 2);
+ if (is_sparse(buf) && pair->dest_pending_sparse
+ < pending_max) {
+ pair->dest_pending_sparse += (off_t)(size);
+ return false;
+ }
+ } else if (size == 0) {
+ return false;
+ }
+
+ // This is not a sparse block. If we have a pending hole,
+ // skip it now.
+ if (pair->dest_pending_sparse > 0) {
+ if (lseek(pair->dest_fd, pair->dest_pending_sparse,
+ SEEK_CUR) == -1) {
+ message_error(_("%s: Seeking failed when "
+ "trying to create a sparse "
+ "file: %s"), pair->dest_name,
+ strerror(errno));
+ return true;
+ }
+
+ pair->dest_pending_sparse = 0;
+ }
+ }
+
+ return io_write_buf(pair, buf->u8, size);
+}
diff --git a/src/xz/file_io.h b/src/xz/file_io.h
new file mode 100644
index 0000000..6992efa
--- /dev/null
+++ b/src/xz/file_io.h
@@ -0,0 +1,179 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file file_io.h
+/// \brief I/O types and functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+// Some systems have suboptimal BUFSIZ. Use a bit bigger value on them.
+// We also need that IO_BUFFER_SIZE is a multiple of 8 (sizeof(uint64_t))
+#if BUFSIZ <= 1024
+# define IO_BUFFER_SIZE 8192
+#else
+# define IO_BUFFER_SIZE (BUFSIZ & ~7U)
+#endif
+
+
+/// is_sparse() accesses the buffer as uint64_t for maximum speed.
+/// The u32 and u64 members must only be access through this union
+/// to avoid strict aliasing violations. Taking a pointer of u8
+/// should be fine as long as uint8_t maps to unsigned char which
+/// can alias anything.
+typedef union {
+ uint8_t u8[IO_BUFFER_SIZE];
+ uint32_t u32[IO_BUFFER_SIZE / sizeof(uint32_t)];
+ uint64_t u64[IO_BUFFER_SIZE / sizeof(uint64_t)];
+} io_buf;
+
+
+typedef struct {
+ /// Name of the source filename (as given on the command line) or
+ /// pointer to static "(stdin)" when reading from standard input.
+ const char *src_name;
+
+ /// Destination filename converted from src_name or pointer to static
+ /// "(stdout)" when writing to standard output.
+ char *dest_name;
+
+ /// File descriptor of the source file
+ int src_fd;
+
+ /// File descriptor of the target file
+ int dest_fd;
+
+ /// True once end of the source file has been detected.
+ bool src_eof;
+
+ /// For --flush-timeout: True if at least one byte has been read
+ /// since the previous flush or the start of the file.
+ bool src_has_seen_input;
+
+ /// For --flush-timeout: True when flushing is needed.
+ bool flush_needed;
+
+ /// If true, we look for long chunks of zeros and try to create
+ /// a sparse file.
+ bool dest_try_sparse;
+
+ /// This is used only if dest_try_sparse is true. This holds the
+ /// number of zero bytes we haven't written out, because we plan
+ /// to make that byte range a sparse chunk.
+ off_t dest_pending_sparse;
+
+ /// Stat of the source file.
+ struct stat src_st;
+
+ /// Stat of the destination file.
+ struct stat dest_st;
+
+} file_pair;
+
+
+/// \brief Initialize the I/O module
+extern void io_init(void);
+
+
+#ifndef TUKLIB_DOSLIKE
+/// \brief Write a byte to user_abort_pipe[1]
+///
+/// This is called from a signal handler.
+extern void io_write_to_user_abort_pipe(void);
+#endif
+
+
+/// \brief Disable creation of sparse files when decompressing
+extern void io_no_sparse(void);
+
+
+#ifdef ENABLE_SANDBOX
+/// \brief main() calls this if conditions for sandboxing have been met.
+extern void io_allow_sandbox(void);
+#endif
+
+
+/// \brief Open the source file
+extern file_pair *io_open_src(const char *src_name);
+
+
+/// \brief Open the destination file
+extern bool io_open_dest(file_pair *pair);
+
+
+/// \brief Closes the file descriptors and frees possible allocated memory
+///
+/// The success argument determines if source or destination file gets
+/// unlinked:
+/// - false: The destination file is unlinked.
+/// - true: The source file is unlinked unless writing to stdout or --keep
+/// was used.
+extern void io_close(file_pair *pair, bool success);
+
+
+/// \brief Reads from the source file to a buffer
+///
+/// \param pair File pair having the source file open for reading
+/// \param buf Destination buffer to hold the read data
+/// \param size Size of the buffer; must be at most IO_BUFFER_SIZE
+///
+/// \return On success, number of bytes read is returned. On end of
+/// file zero is returned and pair->src_eof set to true.
+/// On error, SIZE_MAX is returned and error message printed.
+extern size_t io_read(file_pair *pair, io_buf *buf, size_t size);
+
+
+/// \brief Fix the position in src_fd
+///
+/// This is used when --single-thream has been specified and decompression
+/// is successful. If the input file descriptor supports seeking, this
+/// function fixes the input position to point to the next byte after the
+/// decompressed stream.
+///
+/// \param pair File pair having the source file open for reading
+/// \param rewind_size How many bytes of extra have been read i.e.
+/// how much to seek backwards.
+extern void io_fix_src_pos(file_pair *pair, size_t rewind_size);
+
+
+/// \brief Seek to the given absolute position in the source file
+///
+/// This calls lseek() and also clears pair->src_eof.
+///
+/// \param pair Seekable source file
+/// \param pos Offset relative to the beginning of the file,
+/// from which the data should be read.
+///
+/// \return On success, false is returned. On error, error message
+/// is printed and true is returned.
+extern bool io_seek_src(file_pair *pair, uint64_t pos);
+
+
+/// \brief Read from source file from given offset to a buffer
+///
+/// This is remotely similar to standard pread(). This uses lseek() though,
+/// so the read offset is changed on each call.
+///
+/// \param pair Seekable source file
+/// \param buf Destination buffer
+/// \param size Amount of data to read
+/// \param pos Offset relative to the beginning of the file,
+/// from which the data should be read.
+///
+/// \return On success, false is returned. On error, error message
+/// is printed and true is returned.
+extern bool io_pread(file_pair *pair, io_buf *buf, size_t size, uint64_t pos);
+
+
+/// \brief Writes a buffer to the destination file
+///
+/// \param pair File pair having the destination file open for writing
+/// \param buf Buffer containing the data to be written
+/// \param size Size of the buffer; must be at most IO_BUFFER_SIZE
+///
+/// \return On success, zero is returned. On error, -1 is returned
+/// and error message printed.
+extern bool io_write(file_pair *pair, const io_buf *buf, size_t size);
diff --git a/src/xz/hardware.c b/src/xz/hardware.c
new file mode 100644
index 0000000..c694882
--- /dev/null
+++ b/src/xz/hardware.c
@@ -0,0 +1,338 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file hardware.c
+/// \brief Detection of available hardware resources
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+/// Maximum number of worker threads. This can be set with
+/// the --threads=NUM command line option.
+static uint32_t threads_max = 1;
+
+/// True when the number of threads is automatically determined based
+/// on the available hardware threads.
+static bool threads_are_automatic = false;
+
+/// If true, then try to use multi-threaded mode (if memlimit allows)
+/// even if only one thread was requested explicitly (-T+1).
+static bool use_mt_mode_with_one_thread = false;
+
+/// Memory usage limit for compression
+static uint64_t memlimit_compress = 0;
+
+/// Memory usage limit for decompression
+static uint64_t memlimit_decompress = 0;
+
+/// Default memory usage for multithreaded modes:
+///
+/// - Default value for --memlimit-compress when automatic number of threads
+/// is used. However, if the limit wouldn't allow even one thread then
+/// the limit is ignored in coder.c and one thread will be used anyway.
+/// This mess is a compromise: we wish to prevent -T0 from using too
+/// many threads but we also don't want xz to give an error due to
+/// a memlimit that the user didn't explicitly set.
+///
+/// - Default value for --memlimit-mt-decompress
+///
+/// This value is calculated in hardware_init() and cannot be changed later.
+static uint64_t memlimit_mt_default;
+
+/// Memory usage limit for multithreaded decompression. This is a soft limit:
+/// if reducing the number of threads to one isn't enough to keep memory
+/// usage below this limit, then one thread is used and this limit is ignored.
+/// memlimit_decompress is still obeyed.
+///
+/// This can be set with --memlimit-mt-decompress. The default value for
+/// this is memlimit_mt_default.
+static uint64_t memlimit_mtdec;
+
+/// Total amount of physical RAM
+static uint64_t total_ram;
+
+
+extern void
+hardware_threads_set(uint32_t n)
+{
+ // Reset these to false first and set them to true when appropriate.
+ threads_are_automatic = false;
+ use_mt_mode_with_one_thread = false;
+
+ if (n == 0) {
+ // Automatic number of threads was requested.
+ // If there is only one hardware thread, multi-threaded
+ // mode will still be used if memory limit allows.
+ threads_are_automatic = true;
+ use_mt_mode_with_one_thread = true;
+
+ // If threading support was enabled at build time,
+ // use the number of available CPU cores. Otherwise
+ // use one thread since disabling threading support
+ // omits lzma_cputhreads() from liblzma.
+#ifdef MYTHREAD_ENABLED
+ threads_max = lzma_cputhreads();
+ if (threads_max == 0)
+ threads_max = 1;
+#else
+ threads_max = 1;
+#endif
+ } else if (n == UINT32_MAX) {
+ use_mt_mode_with_one_thread = true;
+ threads_max = 1;
+ } else {
+ threads_max = n;
+ }
+
+ return;
+}
+
+
+extern uint32_t
+hardware_threads_get(void)
+{
+ return threads_max;
+}
+
+
+extern bool
+hardware_threads_is_mt(void)
+{
+#ifdef MYTHREAD_ENABLED
+ return threads_max > 1 || use_mt_mode_with_one_thread;
+#else
+ return false;
+#endif
+}
+
+
+extern void
+hardware_memlimit_set(uint64_t new_memlimit,
+ bool set_compress, bool set_decompress, bool set_mtdec,
+ bool is_percentage)
+{
+ if (is_percentage) {
+ assert(new_memlimit > 0);
+ assert(new_memlimit <= 100);
+ new_memlimit = (uint32_t)new_memlimit * total_ram / 100;
+ }
+
+ if (set_compress) {
+ memlimit_compress = new_memlimit;
+
+#if SIZE_MAX == UINT32_MAX
+ // FIXME?
+ //
+ // When running a 32-bit xz on a system with a lot of RAM and
+ // using a percentage-based memory limit, the result can be
+ // bigger than the 32-bit address space. Limiting the limit
+ // below SIZE_MAX for compression (not decompression) makes
+ // xz lower the compression settings (or number of threads)
+ // to a level that *might* work. In practice it has worked
+ // when using a 64-bit kernel that gives full 4 GiB address
+ // space to 32-bit programs. In other situations this might
+ // still be too high, like 32-bit kernels that may give much
+ // less than 4 GiB to a single application.
+ //
+ // So this is an ugly hack but I will keep it here while
+ // it does more good than bad.
+ //
+ // Use a value less than SIZE_MAX so that there's some room
+ // for the xz program and so on. Don't use 4000 MiB because
+ // it could look like someone mixed up base-2 and base-10.
+#ifdef __mips__
+ // For MIPS32, due to architectural peculiarities,
+ // the limit is even lower.
+ const uint64_t limit_max = UINT64_C(2000) << 20;
+#else
+ const uint64_t limit_max = UINT64_C(4020) << 20;
+#endif
+
+ // UINT64_MAX is a special case for the string "max" so
+ // that has to be handled specially.
+ if (memlimit_compress != UINT64_MAX
+ && memlimit_compress > limit_max)
+ memlimit_compress = limit_max;
+#endif
+ }
+
+ if (set_decompress)
+ memlimit_decompress = new_memlimit;
+
+ if (set_mtdec)
+ memlimit_mtdec = new_memlimit;
+
+ return;
+}
+
+
+extern uint64_t
+hardware_memlimit_get(enum operation_mode mode)
+{
+ // 0 is a special value that indicates the default.
+ // It disables the limit in single-threaded mode.
+ //
+ // NOTE: For multithreaded decompression, this is the hard limit
+ // (memlimit_stop). hardware_memlimit_mtdec_get() gives the
+ // soft limit (memlimit_threaded).
+ const uint64_t memlimit = mode == MODE_COMPRESS
+ ? memlimit_compress : memlimit_decompress;
+ return memlimit != 0 ? memlimit : UINT64_MAX;
+}
+
+
+extern uint64_t
+hardware_memlimit_mtenc_get(void)
+{
+ return hardware_memlimit_mtenc_is_default()
+ ? memlimit_mt_default
+ : hardware_memlimit_get(MODE_COMPRESS);
+}
+
+
+extern bool
+hardware_memlimit_mtenc_is_default(void)
+{
+ return memlimit_compress == 0 && threads_are_automatic;
+}
+
+
+extern uint64_t
+hardware_memlimit_mtdec_get(void)
+{
+ uint64_t m = memlimit_mtdec != 0
+ ? memlimit_mtdec
+ : memlimit_mt_default;
+
+ // Cap the value to memlimit_decompress if it has been specified.
+ // This is nice for --info-memory. It wouldn't be needed for liblzma
+ // since it does this anyway.
+ if (memlimit_decompress != 0 && m > memlimit_decompress)
+ m = memlimit_decompress;
+
+ return m;
+}
+
+
+/// Helper for hardware_memlimit_show() to print one human-readable info line.
+static void
+memlimit_show(const char *str, size_t str_columns, uint64_t value)
+{
+ // Calculate the field width so that str will be padded to take
+ // str_columns on the terminal.
+ //
+ // NOTE: If the string is invalid, this will be -1. Using -1 as
+ // the field width is fine here so it's not handled specially.
+ const int fw = tuklib_mbstr_fw(str, (int)(str_columns));
+
+ // The memory usage limit is considered to be disabled if value
+ // is 0 or UINT64_MAX. This might get a bit more complex once there
+ // is threading support. See the comment in hardware_memlimit_get().
+ if (value == 0 || value == UINT64_MAX)
+ printf(" %-*s %s\n", fw, str, _("Disabled"));
+ else
+ printf(" %-*s %s MiB (%s B)\n", fw, str,
+ uint64_to_str(round_up_to_mib(value), 0),
+ uint64_to_str(value, 1));
+
+ return;
+}
+
+
+extern void
+hardware_memlimit_show(void)
+{
+ uint32_t cputhreads = 1;
+#ifdef MYTHREAD_ENABLED
+ cputhreads = lzma_cputhreads();
+ if (cputhreads == 0)
+ cputhreads = 1;
+#endif
+
+ if (opt_robot) {
+ printf("%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%" PRIu64 "\t%" PRIu32 "\n",
+ total_ram,
+ memlimit_compress,
+ memlimit_decompress,
+ hardware_memlimit_mtdec_get(),
+ memlimit_mt_default,
+ cputhreads);
+ } else {
+ const char *msgs[] = {
+ _("Amount of physical memory (RAM):"),
+ _("Number of processor threads:"),
+ _("Compression:"),
+ _("Decompression:"),
+ _("Multi-threaded decompression:"),
+ _("Default for -T0:"),
+ };
+
+ size_t width_max = 1;
+ for (unsigned i = 0; i < ARRAY_SIZE(msgs); ++i) {
+ size_t w = tuklib_mbstr_width(msgs[i], NULL);
+
+ // When debugging, catch invalid strings with
+ // an assertion. Otherwise fallback to 1 so
+ // that the columns just won't be aligned.
+ assert(w != (size_t)-1);
+ if (w == (size_t)-1)
+ w = 1;
+
+ if (width_max < w)
+ width_max = w;
+ }
+
+ puts(_("Hardware information:"));
+ memlimit_show(msgs[0], width_max, total_ram);
+ printf(" %-*s %" PRIu32 "\n",
+ tuklib_mbstr_fw(msgs[1], (int)(width_max)),
+ msgs[1], cputhreads);
+
+ putchar('\n');
+ puts(_("Memory usage limits:"));
+ memlimit_show(msgs[2], width_max, memlimit_compress);
+ memlimit_show(msgs[3], width_max, memlimit_decompress);
+ memlimit_show(msgs[4], width_max,
+ hardware_memlimit_mtdec_get());
+ memlimit_show(msgs[5], width_max, memlimit_mt_default);
+ }
+
+ tuklib_exit(E_SUCCESS, E_ERROR, message_verbosity_get() != V_SILENT);
+}
+
+
+extern void
+hardware_init(void)
+{
+ // Get the amount of RAM. If we cannot determine it,
+ // use the assumption defined by the configure script.
+ total_ram = lzma_physmem();
+ if (total_ram == 0)
+ total_ram = (uint64_t)(ASSUME_RAM) * 1024 * 1024;
+
+ // FIXME? There may be better methods to determine the default value.
+ // One Linux-specific suggestion is to use MemAvailable from
+ // /proc/meminfo as the starting point.
+ memlimit_mt_default = total_ram / 4;
+
+#if SIZE_MAX == UINT32_MAX
+ // A too high value may cause 32-bit xz to run out of address space.
+ // Use a conservative maximum value here. A few typical address space
+ // sizes with Linux:
+ // - x86-64 with 32-bit xz: 4 GiB
+ // - x86: 3 GiB
+ // - MIPS32: 2 GiB
+ const size_t mem_ceiling = 1400U << 20;
+ if (memlimit_mt_default > mem_ceiling)
+ memlimit_mt_default = mem_ceiling;
+#endif
+
+ return;
+}
diff --git a/src/xz/hardware.h b/src/xz/hardware.h
new file mode 100644
index 0000000..a67b26e
--- /dev/null
+++ b/src/xz/hardware.h
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file hardware.h
+/// \brief Detection of available hardware resources
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// Initialize some hardware-specific variables, which are needed by other
+/// hardware_* functions.
+extern void hardware_init(void);
+
+
+/// Set the maximum number of worker threads.
+/// A special value of UINT32_MAX sets one thread in multi-threaded mode.
+extern void hardware_threads_set(uint32_t threadlimit);
+
+/// Get the maximum number of worker threads.
+extern uint32_t hardware_threads_get(void);
+
+/// Returns true if multithreaded mode should be used for .xz compression.
+/// This can be true even if the number of threads is one.
+extern bool hardware_threads_is_mt(void);
+
+
+/// Set the memory usage limit. There are separate limits for compression,
+/// decompression (also includes --list), and multithreaded decompression.
+/// Any combination of these can be set with a single call to this function.
+/// Zero indicates resetting the limit back to the defaults.
+/// The limit can also be set as a percentage of installed RAM; the
+/// percentage must be in the range [1, 100].
+extern void hardware_memlimit_set(uint64_t new_memlimit,
+ bool set_compress, bool set_decompress, bool set_mtdec,
+ bool is_percentage);
+
+/// Get the current memory usage limit for compression or decompression.
+/// This is a hard limit that will not be exceeded. This is obeyed in
+/// both single-threaded and multithreaded modes.
+extern uint64_t hardware_memlimit_get(enum operation_mode mode);
+
+/// This returns a system-specific default value if all of the following
+/// conditions are true:
+///
+/// - An automatic number of threads was requested (--threads=0).
+///
+/// - --memlimit-compress wasn't used or it was reset to the default
+/// value by setting it to 0.
+///
+/// Otherwise this is identical to hardware_memlimit_get(MODE_COMPRESS).
+///
+/// The idea is to keep automatic thread count reasonable so that too
+/// high memory usage is avoided and, with 32-bit xz, running out of
+/// address space is avoided.
+extern uint64_t hardware_memlimit_mtenc_get(void);
+
+/// Returns true if the value returned by hardware_memlimit_mtenc_get() is
+/// a system-specific default value. coder.c uses this to ignore the default
+/// memlimit in case it's too small even for a single thread in multithreaded
+/// mode. This way the default limit will never make xz fail or affect the
+/// compressed output; it will only make xz reduce the number of threads.
+extern bool hardware_memlimit_mtenc_is_default(void);
+
+/// Get the current memory usage limit for multithreaded decompression.
+/// This is only used to reduce the number of threads. This limit can be
+/// exceeded if the number of threads are reduce to one. Then the value
+/// from hardware_memlimit_get() will be honored like in single-threaded mode.
+extern uint64_t hardware_memlimit_mtdec_get(void);
+
+/// Display the amount of RAM and memory usage limits and exit.
+tuklib_attr_noreturn
+extern void hardware_memlimit_show(void);
diff --git a/src/xz/list.c b/src/xz/list.c
new file mode 100644
index 0000000..86c3a76
--- /dev/null
+++ b/src/xz/list.c
@@ -0,0 +1,1318 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file list.c
+/// \brief Listing information about .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+#include "tuklib_integer.h"
+
+
+/// Information about a .xz file
+typedef struct {
+ /// Combined Index of all Streams in the file
+ lzma_index *idx;
+
+ /// Total amount of Stream Padding
+ uint64_t stream_padding;
+
+ /// Highest memory usage so far
+ uint64_t memusage_max;
+
+ /// True if all Blocks so far have Compressed Size and
+ /// Uncompressed Size fields
+ bool all_have_sizes;
+
+ /// Oldest XZ Utils version that will decompress the file
+ uint32_t min_version;
+
+} xz_file_info;
+
+#define XZ_FILE_INFO_INIT { NULL, 0, 0, true, 50000002 }
+
+
+/// Information about a .xz Block
+typedef struct {
+ /// Size of the Block Header
+ uint32_t header_size;
+
+ /// A few of the Block Flags as a string
+ char flags[3];
+
+ /// Size of the Compressed Data field in the Block
+ lzma_vli compressed_size;
+
+ /// Decoder memory usage for this Block
+ uint64_t memusage;
+
+ /// The filter chain of this Block in human-readable form
+ char *filter_chain;
+
+} block_header_info;
+
+#define BLOCK_HEADER_INFO_INIT { .filter_chain = NULL }
+#define block_header_info_end(bhi) free((bhi)->filter_chain)
+
+
+/// Strings ending in a colon. These are used for lines like
+/// " Foo: 123 MiB". These are grouped because translated strings
+/// may have different maximum string length, and we want to pad all
+/// strings so that the values are aligned nicely.
+static const char *colon_strs[] = {
+ N_("Streams:"),
+ N_("Blocks:"),
+ N_("Compressed size:"),
+ N_("Uncompressed size:"),
+ N_("Ratio:"),
+ N_("Check:"),
+ N_("Stream Padding:"),
+ N_("Memory needed:"),
+ N_("Sizes in headers:"),
+ // This won't be aligned because it's so long:
+ //N_("Minimum XZ Utils version:"),
+ N_("Number of files:"),
+};
+
+/// Enum matching the above strings.
+enum {
+ COLON_STR_STREAMS,
+ COLON_STR_BLOCKS,
+ COLON_STR_COMPRESSED_SIZE,
+ COLON_STR_UNCOMPRESSED_SIZE,
+ COLON_STR_RATIO,
+ COLON_STR_CHECK,
+ COLON_STR_STREAM_PADDING,
+ COLON_STR_MEMORY_NEEDED,
+ COLON_STR_SIZES_IN_HEADERS,
+ //COLON_STR_MINIMUM_XZ_VERSION,
+ COLON_STR_NUMBER_OF_FILES,
+};
+
+/// Field widths to use with printf to pad the strings to use the same number
+/// of columns on a terminal.
+static int colon_strs_fw[ARRAY_SIZE(colon_strs)];
+
+/// Convenience macro to get the translated string and its field width
+/// using a COLON_STR_foo enum.
+#define COLON_STR(num) colon_strs_fw[num], _(colon_strs[num])
+
+
+/// Column headings
+static struct {
+ /// Table column heading string
+ const char *str;
+
+ /// Number of terminal-columns to use for this table-column.
+ /// If a translated string is longer than the initial value,
+ /// this value will be increased in init_headings().
+ int columns;
+
+ /// Field width to use for printf() to pad "str" to use "columns"
+ /// number of columns on a terminal. This is calculated in
+ /// init_headings().
+ int fw;
+
+} headings[] = {
+ { N_("Stream"), 6, 0 },
+ { N_("Block"), 9, 0 },
+ { N_("Blocks"), 9, 0 },
+ { N_("CompOffset"), 15, 0 },
+ { N_("UncompOffset"), 15, 0 },
+ { N_("CompSize"), 15, 0 },
+ { N_("UncompSize"), 15, 0 },
+ { N_("TotalSize"), 15, 0 },
+ { N_("Ratio"), 5, 0 },
+ { N_("Check"), 10, 0 },
+ { N_("CheckVal"), 1, 0 },
+ { N_("Padding"), 7, 0 },
+ { N_("Header"), 5, 0 },
+ { N_("Flags"), 2, 0 },
+ { N_("MemUsage"), 7 + 4, 0 }, // +4 is for " MiB"
+ { N_("Filters"), 1, 0 },
+};
+
+/// Enum matching the above strings.
+enum {
+ HEADING_STREAM,
+ HEADING_BLOCK,
+ HEADING_BLOCKS,
+ HEADING_COMPOFFSET,
+ HEADING_UNCOMPOFFSET,
+ HEADING_COMPSIZE,
+ HEADING_UNCOMPSIZE,
+ HEADING_TOTALSIZE,
+ HEADING_RATIO,
+ HEADING_CHECK,
+ HEADING_CHECKVAL,
+ HEADING_PADDING,
+ HEADING_HEADERSIZE,
+ HEADING_HEADERFLAGS,
+ HEADING_MEMUSAGE,
+ HEADING_FILTERS,
+};
+
+#define HEADING_STR(num) headings[num].fw, _(headings[num].str)
+
+
+/// Check ID to string mapping
+static const char check_names[LZMA_CHECK_ID_MAX + 1][12] = {
+ // 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.
+ N_("None"),
+ "CRC32",
+ // 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.
+ N_("Unknown-2"),
+ N_("Unknown-3"),
+ "CRC64",
+ N_("Unknown-5"),
+ N_("Unknown-6"),
+ N_("Unknown-7"),
+ N_("Unknown-8"),
+ N_("Unknown-9"),
+ "SHA-256",
+ N_("Unknown-11"),
+ N_("Unknown-12"),
+ N_("Unknown-13"),
+ N_("Unknown-14"),
+ N_("Unknown-15"),
+};
+
+/// Buffer size for get_check_names(). This may be a bit ridiculous,
+/// but at least it's enough if some language needs many multibyte chars.
+#define CHECKS_STR_SIZE 1024
+
+
+/// Value of the Check field as hexadecimal string.
+/// This is set by parse_check_value().
+static char check_value[2 * LZMA_CHECK_SIZE_MAX + 1];
+
+
+/// Totals that are displayed if there was more than one file.
+/// The "files" counter is also used in print_info_adv() to show
+/// the file number.
+static struct {
+ uint64_t files;
+ uint64_t streams;
+ uint64_t blocks;
+ uint64_t compressed_size;
+ uint64_t uncompressed_size;
+ uint64_t stream_padding;
+ uint64_t memusage_max;
+ uint32_t checks;
+ uint32_t min_version;
+ bool all_have_sizes;
+} totals = { 0, 0, 0, 0, 0, 0, 0, 0, 50000002, true };
+
+
+/// Initialize colon_strs_fw[].
+static void
+init_colon_strs(void)
+{
+ // Lengths of translated strings as bytes.
+ size_t lens[ARRAY_SIZE(colon_strs)];
+
+ // Lengths of translated strings as columns.
+ size_t widths[ARRAY_SIZE(colon_strs)];
+
+ // Maximum number of columns needed by a translated string.
+ size_t width_max = 0;
+
+ for (unsigned i = 0; i < ARRAY_SIZE(colon_strs); ++i) {
+ widths[i] = tuklib_mbstr_width(_(colon_strs[i]), &lens[i]);
+
+ // If debugging is enabled, catch invalid strings with
+ // an assertion. However, when not debugging, use the
+ // byte count as the fallback width. This shouldn't
+ // ever happen unless there is a bad string in the
+ // translations, but in such case I guess it's better
+ // to try to print something useful instead of failing
+ // completely.
+ assert(widths[i] != (size_t)-1);
+ if (widths[i] == (size_t)-1)
+ widths[i] = lens[i];
+
+ if (widths[i] > width_max)
+ width_max = widths[i];
+ }
+
+ // Calculate the field width for printf("%*s") so that the strings
+ // will use width_max columns on a terminal.
+ for (unsigned i = 0; i < ARRAY_SIZE(colon_strs); ++i)
+ colon_strs_fw[i] = (int)(lens[i] + width_max - widths[i]);
+
+ return;
+}
+
+
+/// Initialize headings[].
+static void
+init_headings(void)
+{
+ // Before going through the heading strings themselves, treat
+ // the Check heading specially: Look at the widths of the various
+ // check names and increase the width of the Check column if needed.
+ // The width of the heading name "Check" will then be handled normally
+ // with other heading names in the second loop in this function.
+ for (unsigned i = 0; i < ARRAY_SIZE(check_names); ++i) {
+ size_t len;
+ size_t w = tuklib_mbstr_width(_(check_names[i]), &len);
+
+ // Error handling like in init_colon_strs().
+ assert(w != (size_t)-1);
+ if (w == (size_t)-1)
+ w = len;
+
+ // If the translated string is wider than the minimum width
+ // set at compile time, increase the width.
+ if ((size_t)(headings[HEADING_CHECK].columns) < w)
+ headings[HEADING_CHECK].columns = (int)w;
+ }
+
+ for (unsigned i = 0; i < ARRAY_SIZE(headings); ++i) {
+ size_t len;
+ size_t w = tuklib_mbstr_width(_(headings[i].str), &len);
+
+ // Error handling like in init_colon_strs().
+ assert(w != (size_t)-1);
+ if (w == (size_t)-1)
+ w = len;
+
+ // If the translated string is wider than the minimum width
+ // set at compile time, increase the width.
+ if ((size_t)(headings[i].columns) < w)
+ headings[i].columns = (int)w;
+
+ // Calculate the field width for printf("%*s") so that
+ // the string uses .columns number of columns on a terminal.
+ headings[i].fw = (int)(len + (size_t)headings[i].columns - w);
+ }
+
+ return;
+}
+
+
+/// Initialize the printf field widths that are needed to get nicely aligned
+/// output with translated strings.
+static void
+init_field_widths(void)
+{
+ init_colon_strs();
+ init_headings();
+ return;
+}
+
+
+/// Convert XZ Utils version number to a string.
+static const char *
+xz_ver_to_str(uint32_t ver)
+{
+ static char buf[32];
+
+ unsigned int major = ver / 10000000U;
+ ver -= major * 10000000U;
+
+ unsigned int minor = ver / 10000U;
+ ver -= minor * 10000U;
+
+ unsigned int patch = ver / 10U;
+ ver -= patch * 10U;
+
+ const char *stability = ver == 0 ? "alpha" : ver == 1 ? "beta" : "";
+
+ snprintf(buf, sizeof(buf), "%u.%u.%u%s",
+ major, minor, patch, stability);
+ return buf;
+}
+
+
+/// \brief Parse the Index(es) from the given .xz file
+///
+/// \param xfi Pointer to structure where the decoded information
+/// is stored.
+/// \param pair Input file
+///
+/// \return On success, false is returned. On error, true is returned.
+///
+static bool
+parse_indexes(xz_file_info *xfi, file_pair *pair)
+{
+ if (pair->src_st.st_size <= 0) {
+ message_error(_("%s: File is empty"), pair->src_name);
+ return true;
+ }
+
+ if (pair->src_st.st_size < 2 * LZMA_STREAM_HEADER_SIZE) {
+ message_error(_("%s: Too small to be a valid .xz file"),
+ pair->src_name);
+ return true;
+ }
+
+ io_buf buf;
+ lzma_stream strm = LZMA_STREAM_INIT;
+ lzma_index *idx = NULL;
+
+ lzma_ret ret = lzma_file_info_decoder(&strm, &idx,
+ hardware_memlimit_get(MODE_LIST),
+ (uint64_t)(pair->src_st.st_size));
+ if (ret != LZMA_OK) {
+ message_error(_("%s: %s"), pair->src_name, message_strm(ret));
+ return true;
+ }
+
+ while (true) {
+ if (strm.avail_in == 0) {
+ strm.next_in = buf.u8;
+ strm.avail_in = io_read(pair, &buf, IO_BUFFER_SIZE);
+ if (strm.avail_in == SIZE_MAX)
+ goto error;
+ }
+
+ ret = lzma_code(&strm, LZMA_RUN);
+
+ switch (ret) {
+ case LZMA_OK:
+ break;
+
+ case LZMA_SEEK_NEEDED:
+ // liblzma won't ask us to seek past the known size
+ // of the input file.
+ assert(strm.seek_pos
+ <= (uint64_t)(pair->src_st.st_size));
+ if (io_seek_src(pair, strm.seek_pos))
+ goto error;
+
+ // avail_in must be zero so that we will read new
+ // input.
+ strm.avail_in = 0;
+ break;
+
+ case LZMA_STREAM_END: {
+ lzma_end(&strm);
+ xfi->idx = idx;
+
+ // Calculate xfi->stream_padding.
+ lzma_index_iter iter;
+ lzma_index_iter_init(&iter, xfi->idx);
+ while (!lzma_index_iter_next(&iter,
+ LZMA_INDEX_ITER_STREAM))
+ xfi->stream_padding += iter.stream.padding;
+
+ return false;
+ }
+
+ default:
+ message_error(_("%s: %s"), pair->src_name,
+ message_strm(ret));
+
+ // If the error was too low memory usage limit,
+ // show also how much memory would have been needed.
+ if (ret == LZMA_MEMLIMIT_ERROR)
+ message_mem_needed(V_ERROR,
+ lzma_memusage(&strm));
+
+ goto error;
+ }
+ }
+
+error:
+ lzma_end(&strm);
+ return true;
+}
+
+
+/// \brief Parse the Block Header
+///
+/// The result is stored into *bhi. The caller takes care of initializing it.
+///
+/// \return False on success, true on error.
+static bool
+parse_block_header(file_pair *pair, const lzma_index_iter *iter,
+ block_header_info *bhi, xz_file_info *xfi)
+{
+#if IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
+# error IO_BUFFER_SIZE < LZMA_BLOCK_HEADER_SIZE_MAX
+#endif
+
+ // Get the whole Block Header with one read, but don't read past
+ // the end of the Block (or even its Check field).
+ const uint32_t size = my_min(iter->block.total_size
+ - lzma_check_size(iter->stream.flags->check),
+ LZMA_BLOCK_HEADER_SIZE_MAX);
+ io_buf buf;
+ if (io_pread(pair, &buf, size, iter->block.compressed_file_offset))
+ return true;
+
+ // Zero would mean Index Indicator and thus not a valid Block.
+ if (buf.u8[0] == 0)
+ goto data_error;
+
+ // Initialize the block structure and decode Block Header Size.
+ lzma_filter filters[LZMA_FILTERS_MAX + 1];
+ lzma_block block;
+ block.version = 0;
+ block.check = iter->stream.flags->check;
+ block.filters = filters;
+
+ block.header_size = lzma_block_header_size_decode(buf.u8[0]);
+ if (block.header_size > size)
+ goto data_error;
+
+ // Decode the Block Header.
+ switch (lzma_block_header_decode(&block, NULL, buf.u8)) {
+ case LZMA_OK:
+ break;
+
+ case LZMA_OPTIONS_ERROR:
+ message_error(_("%s: %s"), pair->src_name,
+ message_strm(LZMA_OPTIONS_ERROR));
+ return true;
+
+ case LZMA_DATA_ERROR:
+ goto data_error;
+
+ default:
+ message_bug();
+ }
+
+ // Check the Block Flags. These must be done before calling
+ // lzma_block_compressed_size(), because it overwrites
+ // block.compressed_size.
+ //
+ // NOTE: If you add new characters here, update the minimum number of
+ // columns in headings[HEADING_HEADERFLAGS] to match the number of
+ // characters used here.
+ bhi->flags[0] = block.compressed_size != LZMA_VLI_UNKNOWN
+ ? 'c' : '-';
+ bhi->flags[1] = block.uncompressed_size != LZMA_VLI_UNKNOWN
+ ? 'u' : '-';
+ bhi->flags[2] = '\0';
+
+ // Collect information if all Blocks have both Compressed Size
+ // and Uncompressed Size fields. They can be useful e.g. for
+ // multi-threaded decompression so it can be useful to know it.
+ xfi->all_have_sizes &= block.compressed_size != LZMA_VLI_UNKNOWN
+ && block.uncompressed_size != LZMA_VLI_UNKNOWN;
+
+ // Validate or set block.compressed_size.
+ switch (lzma_block_compressed_size(&block,
+ iter->block.unpadded_size)) {
+ case LZMA_OK:
+ // Validate also block.uncompressed_size if it is present.
+ // If it isn't present, there's no need to set it since
+ // we aren't going to actually decompress the Block; if
+ // we were decompressing, then we should set it so that
+ // the Block decoder could validate the Uncompressed Size
+ // that was stored in the Index.
+ if (block.uncompressed_size == LZMA_VLI_UNKNOWN
+ || block.uncompressed_size
+ == iter->block.uncompressed_size)
+ break;
+
+ // If the above fails, the file is corrupt so
+ // LZMA_DATA_ERROR is a good error code.
+
+ // Fall through
+
+ case LZMA_DATA_ERROR:
+ // Free the memory allocated by lzma_block_header_decode().
+ lzma_filters_free(filters, NULL);
+ goto data_error;
+
+ default:
+ message_bug();
+ }
+
+ // Copy the known sizes.
+ bhi->header_size = block.header_size;
+ bhi->compressed_size = block.compressed_size;
+
+ // Calculate the decoder memory usage and update the maximum
+ // memory usage of this Block.
+ bhi->memusage = lzma_raw_decoder_memusage(filters);
+ if (xfi->memusage_max < bhi->memusage)
+ xfi->memusage_max = bhi->memusage;
+
+ // Determine the minimum XZ Utils version that supports this Block.
+ //
+ // - ARM64 filter needs 5.4.0.
+ //
+ // - 5.0.0 doesn't support empty LZMA2 streams and thus empty
+ // Blocks that use LZMA2. This decoder bug was fixed in 5.0.2.
+ if (xfi->min_version < 50040002U) {
+ for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
+ if (filters[i].id == LZMA_FILTER_ARM64) {
+ xfi->min_version = 50040002U;
+ break;
+ }
+ }
+ }
+
+ if (xfi->min_version < 50000022U) {
+ size_t i = 0;
+ while (filters[i + 1].id != LZMA_VLI_UNKNOWN)
+ ++i;
+
+ if (filters[i].id == LZMA_FILTER_LZMA2
+ && iter->block.uncompressed_size == 0)
+ xfi->min_version = 50000022U;
+ }
+
+ // Convert the filter chain to human readable form.
+ const lzma_ret str_ret = lzma_str_from_filters(
+ &bhi->filter_chain, filters,
+ LZMA_STR_DECODER | LZMA_STR_GETOPT_LONG, NULL);
+
+ // Free the memory allocated by lzma_block_header_decode().
+ lzma_filters_free(filters, NULL);
+
+ // Check if the stringification succeeded.
+ if (str_ret != LZMA_OK) {
+ message_error(_("%s: %s"), pair->src_name,
+ message_strm(str_ret));
+ return true;
+ }
+
+ return false;
+
+data_error:
+ // Show the error message.
+ message_error(_("%s: %s"), pair->src_name,
+ message_strm(LZMA_DATA_ERROR));
+ return true;
+}
+
+
+/// \brief Parse the Check field and put it into check_value[]
+///
+/// \return False on success, true on error.
+static bool
+parse_check_value(file_pair *pair, const lzma_index_iter *iter)
+{
+ // Don't read anything from the file if there is no integrity Check.
+ if (iter->stream.flags->check == LZMA_CHECK_NONE) {
+ snprintf(check_value, sizeof(check_value), "---");
+ return false;
+ }
+
+ // Locate and read the Check field.
+ const uint32_t size = lzma_check_size(iter->stream.flags->check);
+ const uint64_t offset = iter->block.compressed_file_offset
+ + iter->block.total_size - size;
+ io_buf buf;
+ if (io_pread(pair, &buf, size, offset))
+ return true;
+
+ // CRC32 and CRC64 are in little endian. Guess that all the future
+ // 32-bit and 64-bit Check values are little endian too. It shouldn't
+ // be a too big problem if this guess is wrong.
+ if (size == 4)
+ snprintf(check_value, sizeof(check_value),
+ "%08" PRIx32, conv32le(buf.u32[0]));
+ else if (size == 8)
+ snprintf(check_value, sizeof(check_value),
+ "%016" PRIx64, conv64le(buf.u64[0]));
+ else
+ for (size_t i = 0; i < size; ++i)
+ snprintf(check_value + i * 2, 3, "%02x", buf.u8[i]);
+
+ return false;
+}
+
+
+/// \brief Parse detailed information about a Block
+///
+/// Since this requires seek(s), listing information about all Blocks can
+/// be slow.
+///
+/// \param pair Input file
+/// \param iter Location of the Block whose Check value should
+/// be printed.
+/// \param bhi Pointer to structure where to store the information
+/// about the Block Header field.
+///
+/// \return False on success, true on error. If an error occurs,
+/// the error message is printed too so the caller doesn't
+/// need to worry about that.
+static bool
+parse_details(file_pair *pair, const lzma_index_iter *iter,
+ block_header_info *bhi, xz_file_info *xfi)
+{
+ if (parse_block_header(pair, iter, bhi, xfi))
+ return true;
+
+ if (parse_check_value(pair, iter))
+ return true;
+
+ return false;
+}
+
+
+/// \brief Get the compression ratio
+///
+/// This has slightly different format than that is used in message.c.
+static const char *
+get_ratio(uint64_t compressed_size, uint64_t uncompressed_size)
+{
+ if (uncompressed_size == 0)
+ return "---";
+
+ const double ratio = (double)(compressed_size)
+ / (double)(uncompressed_size);
+ if (ratio > 9.999)
+ return "---";
+
+ static char buf[16];
+ snprintf(buf, sizeof(buf), "%.3f", ratio);
+ return buf;
+}
+
+
+/// \brief Get a comma-separated list of Check names
+///
+/// The check names are translated with gettext except when in robot mode.
+///
+/// \param buf Buffer to hold the resulting string
+/// \param checks Bit mask of Checks to print
+/// \param space_after_comma
+/// It's better to not use spaces in table-like listings,
+/// but in more verbose formats a space after a comma
+/// is good for readability.
+static void
+get_check_names(char buf[CHECKS_STR_SIZE],
+ uint32_t checks, bool space_after_comma)
+{
+ // If we get called when there are no Checks to print, set checks
+ // to 1 so that we print "None". This can happen in the robot mode
+ // when printing the totals line if there are no valid input files.
+ if (checks == 0)
+ checks = 1;
+
+ char *pos = buf;
+ size_t left = CHECKS_STR_SIZE;
+
+ const char *sep = space_after_comma ? ", " : ",";
+ bool comma = false;
+
+ for (size_t i = 0; i <= LZMA_CHECK_ID_MAX; ++i) {
+ if (checks & (UINT32_C(1) << i)) {
+ my_snprintf(&pos, &left, "%s%s",
+ comma ? sep : "",
+ opt_robot ? check_names[i]
+ : _(check_names[i]));
+ comma = true;
+ }
+ }
+
+ return;
+}
+
+
+static bool
+print_info_basic(const xz_file_info *xfi, file_pair *pair)
+{
+ static bool headings_displayed = false;
+ if (!headings_displayed) {
+ headings_displayed = true;
+ // 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".
+ puts(_("Strms Blocks Compressed Uncompressed Ratio "
+ "Check Filename"));
+ }
+
+ char checks[CHECKS_STR_SIZE];
+ get_check_names(checks, lzma_index_checks(xfi->idx), false);
+
+ const char *cols[7] = {
+ uint64_to_str(lzma_index_stream_count(xfi->idx), 0),
+ uint64_to_str(lzma_index_block_count(xfi->idx), 1),
+ uint64_to_nicestr(lzma_index_file_size(xfi->idx),
+ NICESTR_B, NICESTR_TIB, false, 2),
+ uint64_to_nicestr(lzma_index_uncompressed_size(xfi->idx),
+ NICESTR_B, NICESTR_TIB, false, 3),
+ get_ratio(lzma_index_file_size(xfi->idx),
+ lzma_index_uncompressed_size(xfi->idx)),
+ checks,
+ pair->src_name,
+ };
+ printf("%*s %*s %*s %*s %*s %-*s %s\n",
+ tuklib_mbstr_fw(cols[0], 5), cols[0],
+ tuklib_mbstr_fw(cols[1], 7), cols[1],
+ tuklib_mbstr_fw(cols[2], 11), cols[2],
+ tuklib_mbstr_fw(cols[3], 11), cols[3],
+ tuklib_mbstr_fw(cols[4], 5), cols[4],
+ tuklib_mbstr_fw(cols[5], 7), cols[5],
+ cols[6]);
+
+ return false;
+}
+
+
+static void
+print_adv_helper(uint64_t stream_count, uint64_t block_count,
+ uint64_t compressed_size, uint64_t uncompressed_size,
+ uint32_t checks, uint64_t stream_padding)
+{
+ char checks_str[CHECKS_STR_SIZE];
+ get_check_names(checks_str, checks, true);
+
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_STREAMS),
+ uint64_to_str(stream_count, 0));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_BLOCKS),
+ uint64_to_str(block_count, 0));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_COMPRESSED_SIZE),
+ uint64_to_nicestr(compressed_size,
+ NICESTR_B, NICESTR_TIB, true, 0));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_UNCOMPRESSED_SIZE),
+ uint64_to_nicestr(uncompressed_size,
+ NICESTR_B, NICESTR_TIB, true, 0));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_RATIO),
+ get_ratio(compressed_size, uncompressed_size));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_CHECK), checks_str);
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_STREAM_PADDING),
+ uint64_to_nicestr(stream_padding,
+ NICESTR_B, NICESTR_TIB, true, 0));
+ return;
+}
+
+
+static bool
+print_info_adv(xz_file_info *xfi, file_pair *pair)
+{
+ // Print the overall information.
+ print_adv_helper(lzma_index_stream_count(xfi->idx),
+ lzma_index_block_count(xfi->idx),
+ lzma_index_file_size(xfi->idx),
+ lzma_index_uncompressed_size(xfi->idx),
+ lzma_index_checks(xfi->idx),
+ xfi->stream_padding);
+
+ // Size of the biggest Check. This is used to calculate the width
+ // of the CheckVal field. The table would get insanely wide if
+ // we always reserved space for 64-byte Check (128 chars as hex).
+ uint32_t check_max = 0;
+
+ // Print information about the Streams.
+ //
+ // All except Check are right aligned; Check is left aligned.
+ // Test with "xz -lv foo.xz".
+ printf(" %s\n %*s %*s %*s %*s %*s %*s %*s %-*s %*s\n",
+ _(colon_strs[COLON_STR_STREAMS]),
+ HEADING_STR(HEADING_STREAM),
+ HEADING_STR(HEADING_BLOCKS),
+ HEADING_STR(HEADING_COMPOFFSET),
+ HEADING_STR(HEADING_UNCOMPOFFSET),
+ HEADING_STR(HEADING_COMPSIZE),
+ HEADING_STR(HEADING_UNCOMPSIZE),
+ HEADING_STR(HEADING_RATIO),
+ HEADING_STR(HEADING_CHECK),
+ HEADING_STR(HEADING_PADDING));
+
+ lzma_index_iter iter;
+ lzma_index_iter_init(&iter, xfi->idx);
+
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM)) {
+ const char *cols1[4] = {
+ uint64_to_str(iter.stream.number, 0),
+ uint64_to_str(iter.stream.block_count, 1),
+ uint64_to_str(iter.stream.compressed_offset, 2),
+ uint64_to_str(iter.stream.uncompressed_offset, 3),
+ };
+ printf(" %*s %*s %*s %*s ",
+ tuklib_mbstr_fw(cols1[0],
+ headings[HEADING_STREAM].columns),
+ cols1[0],
+ tuklib_mbstr_fw(cols1[1],
+ headings[HEADING_BLOCKS].columns),
+ cols1[1],
+ tuklib_mbstr_fw(cols1[2],
+ headings[HEADING_COMPOFFSET].columns),
+ cols1[2],
+ tuklib_mbstr_fw(cols1[3],
+ headings[HEADING_UNCOMPOFFSET].columns),
+ cols1[3]);
+
+ const char *cols2[5] = {
+ uint64_to_str(iter.stream.compressed_size, 0),
+ uint64_to_str(iter.stream.uncompressed_size, 1),
+ get_ratio(iter.stream.compressed_size,
+ iter.stream.uncompressed_size),
+ _(check_names[iter.stream.flags->check]),
+ uint64_to_str(iter.stream.padding, 2),
+ };
+ printf("%*s %*s %*s %-*s %*s\n",
+ tuklib_mbstr_fw(cols2[0],
+ headings[HEADING_COMPSIZE].columns),
+ cols2[0],
+ tuklib_mbstr_fw(cols2[1],
+ headings[HEADING_UNCOMPSIZE].columns),
+ cols2[1],
+ tuklib_mbstr_fw(cols2[2],
+ headings[HEADING_RATIO].columns),
+ cols2[2],
+ tuklib_mbstr_fw(cols2[3],
+ headings[HEADING_CHECK].columns),
+ cols2[3],
+ tuklib_mbstr_fw(cols2[4],
+ headings[HEADING_PADDING].columns),
+ cols2[4]);
+
+ // Update the maximum Check size.
+ if (lzma_check_size(iter.stream.flags->check) > check_max)
+ check_max = lzma_check_size(iter.stream.flags->check);
+ }
+
+ // Cache the verbosity level to a local variable.
+ const bool detailed = message_verbosity_get() >= V_DEBUG;
+
+ // Print information about the Blocks but only if there is
+ // at least one Block.
+ if (lzma_index_block_count(xfi->idx) > 0) {
+ // Calculate the width of the CheckVal column. This can be
+ // used as is as the field width for printf() when printing
+ // the actual check value as it is hexadecimal. However, to
+ // print the column heading, further calculation is needed
+ // to handle a translated string (it's done a few lines later).
+ assert(check_max <= LZMA_CHECK_SIZE_MAX);
+ const int checkval_width = my_max(
+ headings[HEADING_CHECKVAL].columns,
+ (int)(2 * check_max));
+
+ // All except Check are right aligned; Check is left aligned.
+ printf(" %s\n %*s %*s %*s %*s %*s %*s %*s %-*s",
+ _(colon_strs[COLON_STR_BLOCKS]),
+ HEADING_STR(HEADING_STREAM),
+ HEADING_STR(HEADING_BLOCK),
+ HEADING_STR(HEADING_COMPOFFSET),
+ HEADING_STR(HEADING_UNCOMPOFFSET),
+ HEADING_STR(HEADING_TOTALSIZE),
+ HEADING_STR(HEADING_UNCOMPSIZE),
+ HEADING_STR(HEADING_RATIO),
+ detailed ? headings[HEADING_CHECK].fw : 1,
+ _(headings[HEADING_CHECK].str));
+
+ if (detailed) {
+ // CheckVal (Check value), Flags, and Filters are
+ // left aligned. Block Header Size, CompSize, and
+ // MemUsage are right aligned. Test with
+ // "xz -lvv foo.xz".
+ printf(" %-*s %*s %-*s %*s %*s %s",
+ headings[HEADING_CHECKVAL].fw
+ + checkval_width
+ - headings[HEADING_CHECKVAL].columns,
+ _(headings[HEADING_CHECKVAL].str),
+ HEADING_STR(HEADING_HEADERSIZE),
+ HEADING_STR(HEADING_HEADERFLAGS),
+ HEADING_STR(HEADING_COMPSIZE),
+ HEADING_STR(HEADING_MEMUSAGE),
+ _(headings[HEADING_FILTERS].str));
+ }
+
+ putchar('\n');
+
+ lzma_index_iter_init(&iter, xfi->idx);
+
+ // Iterate over the Blocks.
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
+ // If in detailed mode, collect the information from
+ // Block Header before starting to print the next line.
+ block_header_info bhi = BLOCK_HEADER_INFO_INIT;
+ if (detailed && parse_details(pair, &iter, &bhi, xfi))
+ return true;
+
+ const char *cols1[4] = {
+ uint64_to_str(iter.stream.number, 0),
+ uint64_to_str(
+ iter.block.number_in_stream, 1),
+ uint64_to_str(
+ iter.block.compressed_file_offset, 2),
+ uint64_to_str(
+ iter.block.uncompressed_file_offset, 3)
+ };
+ printf(" %*s %*s %*s %*s ",
+ tuklib_mbstr_fw(cols1[0],
+ headings[HEADING_STREAM].columns),
+ cols1[0],
+ tuklib_mbstr_fw(cols1[1],
+ headings[HEADING_BLOCK].columns),
+ cols1[1],
+ tuklib_mbstr_fw(cols1[2],
+ headings[HEADING_COMPOFFSET].columns),
+ cols1[2],
+ tuklib_mbstr_fw(cols1[3], headings[
+ HEADING_UNCOMPOFFSET].columns),
+ cols1[3]);
+
+ const char *cols2[4] = {
+ uint64_to_str(iter.block.total_size, 0),
+ uint64_to_str(iter.block.uncompressed_size,
+ 1),
+ get_ratio(iter.block.total_size,
+ iter.block.uncompressed_size),
+ _(check_names[iter.stream.flags->check])
+ };
+ printf("%*s %*s %*s %-*s",
+ tuklib_mbstr_fw(cols2[0],
+ headings[HEADING_TOTALSIZE].columns),
+ cols2[0],
+ tuklib_mbstr_fw(cols2[1],
+ headings[HEADING_UNCOMPSIZE].columns),
+ cols2[1],
+ tuklib_mbstr_fw(cols2[2],
+ headings[HEADING_RATIO].columns),
+ cols2[2],
+ tuklib_mbstr_fw(cols2[3], detailed
+ ? headings[HEADING_CHECK].columns : 1),
+ cols2[3]);
+
+ if (detailed) {
+ const lzma_vli compressed_size
+ = iter.block.unpadded_size
+ - bhi.header_size
+ - lzma_check_size(
+ iter.stream.flags->check);
+
+ const char *cols3[6] = {
+ check_value,
+ uint64_to_str(bhi.header_size, 0),
+ bhi.flags,
+ uint64_to_str(compressed_size, 1),
+ uint64_to_str(
+ round_up_to_mib(bhi.memusage),
+ 2),
+ bhi.filter_chain
+ };
+ // Show MiB for memory usage, because it
+ // is the only size which is not in bytes.
+ printf(" %-*s %*s %-*s %*s %*s MiB %s",
+ checkval_width, cols3[0],
+ tuklib_mbstr_fw(cols3[1], headings[
+ HEADING_HEADERSIZE].columns),
+ cols3[1],
+ tuklib_mbstr_fw(cols3[2], headings[
+ HEADING_HEADERFLAGS].columns),
+ cols3[2],
+ tuklib_mbstr_fw(cols3[3], headings[
+ HEADING_COMPSIZE].columns),
+ cols3[3],
+ tuklib_mbstr_fw(cols3[4], headings[
+ HEADING_MEMUSAGE].columns - 4),
+ cols3[4],
+ cols3[5]);
+ }
+
+ putchar('\n');
+ block_header_info_end(&bhi);
+ }
+ }
+
+ if (detailed) {
+ printf(" %-*s %s MiB\n", COLON_STR(COLON_STR_MEMORY_NEEDED),
+ uint64_to_str(
+ round_up_to_mib(xfi->memusage_max), 0));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_SIZES_IN_HEADERS),
+ xfi->all_have_sizes ? _("Yes") : _("No"));
+ //printf(" %-*s %s\n", COLON_STR(COLON_STR_MINIMUM_XZ_VERSION),
+ printf(_(" Minimum XZ Utils version: %s\n"),
+ xz_ver_to_str(xfi->min_version));
+ }
+
+ return false;
+}
+
+
+static bool
+print_info_robot(xz_file_info *xfi, file_pair *pair)
+{
+ char checks[CHECKS_STR_SIZE];
+ get_check_names(checks, lzma_index_checks(xfi->idx), false);
+
+ printf("name\t%s\n", pair->src_name);
+
+ printf("file\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%s\t%s\t%" PRIu64 "\n",
+ lzma_index_stream_count(xfi->idx),
+ lzma_index_block_count(xfi->idx),
+ lzma_index_file_size(xfi->idx),
+ lzma_index_uncompressed_size(xfi->idx),
+ get_ratio(lzma_index_file_size(xfi->idx),
+ lzma_index_uncompressed_size(xfi->idx)),
+ checks,
+ xfi->stream_padding);
+
+ if (message_verbosity_get() >= V_VERBOSE) {
+ lzma_index_iter iter;
+ lzma_index_iter_init(&iter, xfi->idx);
+
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_STREAM))
+ printf("stream\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%s\t%s\t%" PRIu64 "\n",
+ iter.stream.number,
+ iter.stream.block_count,
+ iter.stream.compressed_offset,
+ iter.stream.uncompressed_offset,
+ iter.stream.compressed_size,
+ iter.stream.uncompressed_size,
+ get_ratio(iter.stream.compressed_size,
+ iter.stream.uncompressed_size),
+ check_names[iter.stream.flags->check],
+ iter.stream.padding);
+
+ lzma_index_iter_rewind(&iter);
+
+ while (!lzma_index_iter_next(&iter, LZMA_INDEX_ITER_BLOCK)) {
+ block_header_info bhi = BLOCK_HEADER_INFO_INIT;
+ if (message_verbosity_get() >= V_DEBUG
+ && parse_details(
+ pair, &iter, &bhi, xfi))
+ return true;
+
+ printf("block\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%" PRIu64 "\t%" PRIu64
+ "\t%" PRIu64 "\t%" PRIu64 "\t%s\t%s",
+ iter.stream.number,
+ iter.block.number_in_stream,
+ iter.block.number_in_file,
+ iter.block.compressed_file_offset,
+ iter.block.uncompressed_file_offset,
+ iter.block.total_size,
+ iter.block.uncompressed_size,
+ get_ratio(iter.block.total_size,
+ iter.block.uncompressed_size),
+ check_names[iter.stream.flags->check]);
+
+ if (message_verbosity_get() >= V_DEBUG)
+ printf("\t%s\t%" PRIu32 "\t%s\t%" PRIu64
+ "\t%" PRIu64 "\t%s",
+ check_value,
+ bhi.header_size,
+ bhi.flags,
+ bhi.compressed_size,
+ bhi.memusage,
+ bhi.filter_chain);
+
+ putchar('\n');
+ block_header_info_end(&bhi);
+ }
+ }
+
+ if (message_verbosity_get() >= V_DEBUG)
+ printf("summary\t%" PRIu64 "\t%s\t%" PRIu32 "\n",
+ xfi->memusage_max,
+ xfi->all_have_sizes ? "yes" : "no",
+ xfi->min_version);
+
+ return false;
+}
+
+
+static void
+update_totals(const xz_file_info *xfi)
+{
+ // TODO: Integer overflow checks
+ ++totals.files;
+ totals.streams += lzma_index_stream_count(xfi->idx);
+ totals.blocks += lzma_index_block_count(xfi->idx);
+ totals.compressed_size += lzma_index_file_size(xfi->idx);
+ totals.uncompressed_size += lzma_index_uncompressed_size(xfi->idx);
+ totals.stream_padding += xfi->stream_padding;
+ totals.checks |= lzma_index_checks(xfi->idx);
+
+ if (totals.memusage_max < xfi->memusage_max)
+ totals.memusage_max = xfi->memusage_max;
+
+ if (totals.min_version < xfi->min_version)
+ totals.min_version = xfi->min_version;
+
+ totals.all_have_sizes &= xfi->all_have_sizes;
+
+ return;
+}
+
+
+static void
+print_totals_basic(void)
+{
+ // Print a separator line.
+ char line[80];
+ memset(line, '-', sizeof(line));
+ line[sizeof(line) - 1] = '\0';
+ puts(line);
+
+ // Get the check names.
+ char checks[CHECKS_STR_SIZE];
+ get_check_names(checks, totals.checks, false);
+
+ // Print the totals except the file count, which needs
+ // special handling.
+ printf("%5s %7s %11s %11s %5s %-7s ",
+ uint64_to_str(totals.streams, 0),
+ uint64_to_str(totals.blocks, 1),
+ uint64_to_nicestr(totals.compressed_size,
+ NICESTR_B, NICESTR_TIB, false, 2),
+ uint64_to_nicestr(totals.uncompressed_size,
+ NICESTR_B, NICESTR_TIB, false, 3),
+ get_ratio(totals.compressed_size,
+ totals.uncompressed_size),
+ checks);
+
+ // Since we print totals only when there are at least two files,
+ // the English message will always use "%s files". But some other
+ // languages need different forms for different plurals so we
+ // have to translate this with ngettext().
+ //
+ // 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".
+ printf(ngettext("%s file\n", "%s files\n",
+ totals.files <= ULONG_MAX ? totals.files
+ : (totals.files % 1000000) + 1000000),
+ uint64_to_str(totals.files, 0));
+
+ return;
+}
+
+
+static void
+print_totals_adv(void)
+{
+ putchar('\n');
+ puts(_("Totals:"));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_NUMBER_OF_FILES),
+ uint64_to_str(totals.files, 0));
+ print_adv_helper(totals.streams, totals.blocks,
+ totals.compressed_size, totals.uncompressed_size,
+ totals.checks, totals.stream_padding);
+
+ if (message_verbosity_get() >= V_DEBUG) {
+ printf(" %-*s %s MiB\n", COLON_STR(COLON_STR_MEMORY_NEEDED),
+ uint64_to_str(
+ round_up_to_mib(totals.memusage_max), 0));
+ printf(" %-*s %s\n", COLON_STR(COLON_STR_SIZES_IN_HEADERS),
+ totals.all_have_sizes ? _("Yes") : _("No"));
+ //printf(" %-*s %s\n", COLON_STR(COLON_STR_MINIMUM_XZ_VERSION),
+ printf(_(" Minimum XZ Utils version: %s\n"),
+ xz_ver_to_str(totals.min_version));
+ }
+
+ return;
+}
+
+
+static void
+print_totals_robot(void)
+{
+ char checks[CHECKS_STR_SIZE];
+ get_check_names(checks, totals.checks, false);
+
+ printf("totals\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64
+ "\t%s\t%s\t%" PRIu64 "\t%" PRIu64,
+ totals.streams,
+ totals.blocks,
+ totals.compressed_size,
+ totals.uncompressed_size,
+ get_ratio(totals.compressed_size,
+ totals.uncompressed_size),
+ checks,
+ totals.stream_padding,
+ totals.files);
+
+ if (message_verbosity_get() >= V_DEBUG)
+ printf("\t%" PRIu64 "\t%s\t%" PRIu32,
+ totals.memusage_max,
+ totals.all_have_sizes ? "yes" : "no",
+ totals.min_version);
+
+ putchar('\n');
+
+ return;
+}
+
+
+extern void
+list_totals(void)
+{
+ if (opt_robot) {
+ // Always print totals in --robot mode. It can be convenient
+ // in some cases and doesn't complicate usage of the
+ // single-file case much.
+ print_totals_robot();
+
+ } else if (totals.files > 1) {
+ // For non-robot mode, totals are printed only if there
+ // is more than one file.
+ if (message_verbosity_get() <= V_WARNING)
+ print_totals_basic();
+ else
+ print_totals_adv();
+ }
+
+ return;
+}
+
+
+extern void
+list_file(const char *filename)
+{
+ if (opt_format != FORMAT_XZ && opt_format != FORMAT_AUTO)
+ message_fatal(_("--list works only on .xz files "
+ "(--format=xz or --format=auto)"));
+
+ message_filename(filename);
+
+ if (filename == stdin_filename) {
+ message_error(_("--list does not support reading from "
+ "standard input"));
+ return;
+ }
+
+ init_field_widths();
+
+ // Unset opt_stdout so that io_open_src() won't accept special files.
+ // Set opt_force so that io_open_src() will follow symlinks.
+ opt_stdout = false;
+ opt_force = true;
+ file_pair *pair = io_open_src(filename);
+ if (pair == NULL)
+ return;
+
+ xz_file_info xfi = XZ_FILE_INFO_INIT;
+ if (!parse_indexes(&xfi, pair)) {
+ bool fail;
+
+ // We have three main modes:
+ // - --robot, which has submodes if --verbose is specified
+ // once or twice
+ // - Normal --list without --verbose
+ // - --list with one or two --verbose
+ if (opt_robot)
+ fail = print_info_robot(&xfi, pair);
+ else if (message_verbosity_get() <= V_WARNING)
+ fail = print_info_basic(&xfi, pair);
+ else
+ fail = print_info_adv(&xfi, pair);
+
+ // Update the totals that are displayed after all
+ // the individual files have been listed. Don't count
+ // broken files.
+ if (!fail)
+ update_totals(&xfi);
+
+ lzma_index_end(xfi.idx, NULL);
+ }
+
+ io_close(pair, false);
+ return;
+}
diff --git a/src/xz/list.h b/src/xz/list.h
new file mode 100644
index 0000000..a4c6ec7
--- /dev/null
+++ b/src/xz/list.h
@@ -0,0 +1,18 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file list.h
+/// \brief List information about .xz files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// \brief List information about the given .xz file
+extern void list_file(const char *filename);
+
+
+/// \brief Show the totals after all files have been listed
+extern void list_totals(void);
diff --git a/src/xz/main.c b/src/xz/main.c
new file mode 100644
index 0000000..c9c3dec
--- /dev/null
+++ b/src/xz/main.c
@@ -0,0 +1,344 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file main.c
+/// \brief main()
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+#include <ctype.h>
+
+/// Exit status to use. This can be changed with set_exit_status().
+static enum exit_status_type exit_status = E_SUCCESS;
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+/// exit_status has to be protected with a critical section due to
+/// how "signal handling" is done on Windows. See signals.c for details.
+static CRITICAL_SECTION exit_status_cs;
+#endif
+
+/// True if --no-warn is specified. When this is true, we don't set
+/// the exit status to E_WARNING when something worth a warning happens.
+static bool no_warn = false;
+
+
+extern void
+set_exit_status(enum exit_status_type new_status)
+{
+ assert(new_status == E_WARNING || new_status == E_ERROR);
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ EnterCriticalSection(&exit_status_cs);
+#endif
+
+ if (exit_status != E_ERROR)
+ exit_status = new_status;
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ LeaveCriticalSection(&exit_status_cs);
+#endif
+
+ return;
+}
+
+
+extern void
+set_exit_no_warn(void)
+{
+ no_warn = true;
+ return;
+}
+
+
+static const char *
+read_name(const args_info *args)
+{
+ // FIXME: Maybe we should have some kind of memory usage limit here
+ // like the tool has for the actual compression and decompression.
+ // Giving some huge text file with --files0 makes us to read the
+ // whole file in RAM.
+ static char *name = NULL;
+ static size_t size = 256;
+
+ // Allocate the initial buffer. This is never freed, since after it
+ // is no longer needed, the program exits very soon. It is safe to
+ // use xmalloc() and xrealloc() in this function, because while
+ // executing this function, no files are open for writing, and thus
+ // there's no need to cleanup anything before exiting.
+ if (name == NULL)
+ name = xmalloc(size);
+
+ // Write position in name
+ size_t pos = 0;
+
+ // Read one character at a time into name.
+ while (!user_abort) {
+ const int c = fgetc(args->files_file);
+
+ if (ferror(args->files_file)) {
+ // Take care of EINTR since we have established
+ // the signal handlers already.
+ if (errno == EINTR)
+ continue;
+
+ message_error(_("%s: Error reading filenames: %s"),
+ args->files_name, strerror(errno));
+ return NULL;
+ }
+
+ if (feof(args->files_file)) {
+ if (pos != 0)
+ message_error(_("%s: Unexpected end of input "
+ "when reading filenames"),
+ args->files_name);
+
+ return NULL;
+ }
+
+ if (c == args->files_delim) {
+ // We allow consecutive newline (--files) or '\0'
+ // characters (--files0), and ignore such empty
+ // filenames.
+ if (pos == 0)
+ continue;
+
+ // A non-empty name was read. Terminate it with '\0'
+ // and return it.
+ name[pos] = '\0';
+ return name;
+ }
+
+ if (c == '\0') {
+ // A null character was found when using --files,
+ // which expects plain text input separated with
+ // newlines.
+ message_error(_("%s: Null character found when "
+ "reading filenames; maybe you meant "
+ "to use `--files0' instead "
+ "of `--files'?"), args->files_name);
+ return NULL;
+ }
+
+ name[pos++] = c;
+
+ // Allocate more memory if needed. There must always be space
+ // at least for one character to allow terminating the string
+ // with '\0'.
+ if (pos == size) {
+ size *= 2;
+ name = xrealloc(name, size);
+ }
+ }
+
+ return NULL;
+}
+
+
+int
+main(int argc, char **argv)
+{
+#ifdef HAVE_PLEDGE
+ // OpenBSD's pledge(2) sandbox
+ //
+ // Unconditionally enable sandboxing with fairly relaxed promises.
+ // This is still way better than having no sandbox at all. :-)
+ // More strict promises will be made later in file_io.c if possible.
+ if (pledge("stdio rpath wpath cpath fattr", "")) {
+ // Don't translate the string or use message_fatal() as
+ // those haven't been initialized yet.
+ fprintf(stderr, "%s: Failed to enable the sandbox\n", argv[0]);
+ return E_ERROR;
+ }
+#endif
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ InitializeCriticalSection(&exit_status_cs);
+#endif
+
+ // Set up the progname variable.
+ tuklib_progname_init(argv);
+
+ // Initialize the file I/O. This makes sure that
+ // stdin, stdout, and stderr are something valid.
+ io_init();
+
+ // Set up the locale and message translations.
+ tuklib_gettext_init(PACKAGE, LOCALEDIR);
+
+ // Initialize handling of error/warning/other messages.
+ message_init();
+
+ // Set hardware-dependent default values. These can be overridden
+ // on the command line, thus this must be done before args_parse().
+ hardware_init();
+
+ // Parse the command line arguments and get an array of filenames.
+ // This doesn't return if something is wrong with the command line
+ // arguments. If there are no arguments, one filename ("-") is still
+ // returned to indicate stdin.
+ args_info args;
+ args_parse(&args, argc, argv);
+
+ if (opt_mode != MODE_LIST && opt_robot)
+ message_fatal(_("Compression and decompression with --robot "
+ "are not supported yet."));
+
+ // Tell the message handling code how many input files there are if
+ // we know it. This way the progress indicator can show it.
+ if (args.files_name != NULL)
+ message_set_files(0);
+ else
+ message_set_files(args.arg_count);
+
+ // Refuse to write compressed data to standard output if it is
+ // a terminal.
+ if (opt_mode == MODE_COMPRESS) {
+ if (opt_stdout || (args.arg_count == 1
+ && strcmp(args.arg_names[0], "-") == 0)) {
+ if (is_tty_stdout()) {
+ message_try_help();
+ tuklib_exit(E_ERROR, E_ERROR, false);
+ }
+ }
+ }
+
+ // Set up the signal handlers. We don't need these before we
+ // start the actual action and not in --list mode, so this is
+ // done after parsing the command line arguments.
+ //
+ // It's good to keep signal handlers in normal compression and
+ // decompression modes even when only writing to stdout, because
+ // we might need to restore O_APPEND flag on stdout before exiting.
+ // In --test mode, signal handlers aren't really needed, but let's
+ // keep them there for consistency with normal decompression.
+ if (opt_mode != MODE_LIST)
+ signals_init();
+
+#ifdef ENABLE_SANDBOX
+ // Set a flag that sandboxing is allowed if all these are true:
+ // - --files or --files0 wasn't used.
+ // - There is exactly one input file or we are reading from stdin.
+ // - We won't create any files: output goes to stdout or --test
+ // or --list was used. Note that --test implies opt_stdout = true
+ // but --list doesn't.
+ //
+ // This is obviously not ideal but it was easy to implement and
+ // it covers the most common use cases.
+ //
+ // TODO: Make sandboxing work for other situations too.
+ if (args.files_name == NULL && args.arg_count == 1
+ && (opt_stdout || strcmp("-", args.arg_names[0]) == 0
+ || opt_mode == MODE_LIST))
+ io_allow_sandbox();
+#endif
+
+ // coder_run() handles compression, decompression, and testing.
+ // list_file() is for --list.
+ void (*run)(const char *filename) = &coder_run;
+#ifdef HAVE_DECODERS
+ if (opt_mode == MODE_LIST)
+ run = &list_file;
+#endif
+
+ // Process the files given on the command line. Note that if no names
+ // were given, args_parse() gave us a fake "-" filename.
+ for (unsigned i = 0; i < args.arg_count && !user_abort; ++i) {
+ if (strcmp("-", args.arg_names[i]) == 0) {
+ // Processing from stdin to stdout. Check that we
+ // aren't writing compressed data to a terminal or
+ // reading it from a terminal.
+ if (opt_mode == MODE_COMPRESS) {
+ if (is_tty_stdout())
+ continue;
+ } else if (is_tty_stdin()) {
+ continue;
+ }
+
+ // It doesn't make sense to compress data from stdin
+ // if we are supposed to read filenames from stdin
+ // too (enabled with --files or --files0).
+ if (args.files_name == stdin_filename) {
+ message_error(_("Cannot read data from "
+ "standard input when "
+ "reading filenames "
+ "from standard input"));
+ continue;
+ }
+
+ // Replace the "-" with a special pointer, which is
+ // recognized by coder_run() and other things.
+ // This way error messages get a proper filename
+ // string and the code still knows that it is
+ // handling the special case of stdin.
+ args.arg_names[i] = (char *)stdin_filename;
+ }
+
+ // Do the actual compression or decompression.
+ run(args.arg_names[i]);
+ }
+
+ // If --files or --files0 was used, process the filenames from the
+ // given file or stdin. Note that here we don't consider "-" to
+ // indicate stdin like we do with the command line arguments.
+ if (args.files_name != NULL) {
+ // read_name() checks for user_abort so we don't need to
+ // check it as loop termination condition.
+ while (true) {
+ const char *name = read_name(&args);
+ if (name == NULL)
+ break;
+
+ // read_name() doesn't return empty names.
+ assert(name[0] != '\0');
+ run(name);
+ }
+
+ if (args.files_name != stdin_filename)
+ (void)fclose(args.files_file);
+ }
+
+#ifdef HAVE_DECODERS
+ // All files have now been handled. If in --list mode, display
+ // the totals before exiting. We don't have signal handlers
+ // enabled in --list mode, so we don't need to check user_abort.
+ if (opt_mode == MODE_LIST) {
+ assert(!user_abort);
+ list_totals();
+ }
+#endif
+
+#ifndef NDEBUG
+ coder_free();
+ args_free();
+#endif
+
+ // If we have got a signal, raise it to kill the program instead
+ // of calling tuklib_exit().
+ signals_exit();
+
+ // Make a local copy of exit_status to keep the Windows code
+ // thread safe. At this point it is fine if we miss the user
+ // pressing C-c and don't set the exit_status to E_ERROR on
+ // Windows.
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ EnterCriticalSection(&exit_status_cs);
+#endif
+
+ enum exit_status_type es = exit_status;
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ LeaveCriticalSection(&exit_status_cs);
+#endif
+
+ // Suppress the exit status indicating a warning if --no-warn
+ // was specified.
+ if (es == E_WARNING && no_warn)
+ es = E_SUCCESS;
+
+ tuklib_exit((int)es, E_ERROR, message_verbosity_get() != V_SILENT);
+}
diff --git a/src/xz/main.h b/src/xz/main.h
new file mode 100644
index 0000000..323f2f7
--- /dev/null
+++ b/src/xz/main.h
@@ -0,0 +1,30 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file main.h
+/// \brief Miscellaneous declarations
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// Possible exit status values. These are the same as used by gzip and bzip2.
+enum exit_status_type {
+ E_SUCCESS = 0,
+ E_ERROR = 1,
+ E_WARNING = 2,
+};
+
+
+/// Sets the exit status after a warning or error has occurred. If new_status
+/// is E_WARNING and the old exit status was already E_ERROR, the exit
+/// status is not changed.
+extern void set_exit_status(enum exit_status_type new_status);
+
+
+/// Use E_SUCCESS instead of E_WARNING if something worth a warning occurs
+/// but nothing worth an error has occurred. This is called when --no-warn
+/// is specified.
+extern void set_exit_no_warn(void);
diff --git a/src/xz/message.c b/src/xz/message.c
new file mode 100644
index 0000000..abf30ad
--- /dev/null
+++ b/src/xz/message.c
@@ -0,0 +1,1146 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file message.c
+/// \brief Printing messages
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#include <stdarg.h>
+
+
+/// Number of the current file
+static unsigned int files_pos = 0;
+
+/// Total number of input files; zero if unknown.
+static unsigned int files_total;
+
+/// Verbosity level
+static enum message_verbosity verbosity = V_WARNING;
+
+/// Filename which we will print with the verbose messages
+static const char *filename;
+
+/// True once the a filename has been printed to stderr as part of progress
+/// message. If automatic progress updating isn't enabled, this becomes true
+/// after the first progress message has been printed due to user sending
+/// SIGINFO, SIGUSR1, or SIGALRM. Once this variable is true, we will print
+/// an empty line before the next filename to make the output more readable.
+static bool first_filename_printed = false;
+
+/// This is set to true when we have printed the current filename to stderr
+/// as part of a progress message. This variable is useful only if not
+/// updating progress automatically: if user sends many SIGINFO, SIGUSR1, or
+/// SIGALRM signals, we won't print the name of the same file multiple times.
+static bool current_filename_printed = false;
+
+/// True if we should print progress indicator and update it automatically
+/// if also verbose >= V_VERBOSE.
+static bool progress_automatic;
+
+/// True if message_progress_start() has been called but
+/// message_progress_end() hasn't been called yet.
+static bool progress_started = false;
+
+/// This is true when a progress message was printed and the cursor is still
+/// on the same line with the progress message. In that case, a newline has
+/// to be printed before any error messages.
+static bool progress_active = false;
+
+/// Pointer to lzma_stream used to do the encoding or decoding.
+static lzma_stream *progress_strm;
+
+/// This is true if we are in passthru mode (not actually compressing or
+/// decompressing) and thus cannot use lzma_get_progress(progress_strm, ...).
+/// That is, we are using coder_passthru() in coder.c.
+static bool progress_is_from_passthru;
+
+/// Expected size of the input stream is needed to show completion percentage
+/// and estimate remaining time.
+static uint64_t expected_in_size;
+
+
+// Use alarm() and SIGALRM when they are supported. This has two minor
+// advantages over the alternative of polling gettimeofday():
+// - It is possible for the user to send SIGINFO, SIGUSR1, or SIGALRM to
+// get intermediate progress information even when --verbose wasn't used
+// or stderr is not a terminal.
+// - alarm() + SIGALRM seems to have slightly less overhead than polling
+// gettimeofday().
+#ifdef SIGALRM
+
+const int message_progress_sigs[] = {
+ SIGALRM,
+#ifdef SIGINFO
+ SIGINFO,
+#endif
+#ifdef SIGUSR1
+ SIGUSR1,
+#endif
+ 0
+};
+
+/// The signal handler for SIGALRM sets this to true. It is set back to false
+/// once the progress message has been updated.
+static volatile sig_atomic_t progress_needs_updating = false;
+
+/// Signal handler for SIGALRM
+static void
+progress_signal_handler(int sig lzma_attribute((__unused__)))
+{
+ progress_needs_updating = true;
+ return;
+}
+
+#else
+
+/// This is true when progress message printing is wanted. Using the same
+/// variable name as above to avoid some ifdefs.
+static bool progress_needs_updating = false;
+
+/// Elapsed time when the next progress message update should be done.
+static uint64_t progress_next_update;
+
+#endif
+
+
+extern void
+message_init(void)
+{
+ // If --verbose is used, we use a progress indicator if and only
+ // if stderr is a terminal. If stderr is not a terminal, we print
+ // verbose information only after finishing the file. As a special
+ // exception, even if --verbose was not used, user can send SIGALRM
+ // to make us print progress information once without automatic
+ // updating.
+ progress_automatic = isatty(STDERR_FILENO);
+
+ // Commented out because COLUMNS is rarely exported to environment.
+ // Most users have at least 80 columns anyway, let's think something
+ // fancy here if enough people complain.
+/*
+ if (progress_automatic) {
+ // stderr is a terminal. Check the COLUMNS environment
+ // variable to see if the terminal is wide enough. If COLUMNS
+ // doesn't exist or it has some unparsable value, we assume
+ // that the terminal is wide enough.
+ const char *columns_str = getenv("COLUMNS");
+ if (columns_str != NULL) {
+ char *endptr;
+ const long columns = strtol(columns_str, &endptr, 10);
+ if (*endptr != '\0' || columns < 80)
+ progress_automatic = false;
+ }
+ }
+*/
+
+#ifdef SIGALRM
+ // Establish the signal handlers which set a flag to tell us that
+ // progress info should be updated.
+ struct sigaction sa;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ sa.sa_handler = &progress_signal_handler;
+
+ for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
+ if (sigaction(message_progress_sigs[i], &sa, NULL))
+ message_signal_handler();
+#endif
+
+ return;
+}
+
+
+extern void
+message_verbosity_increase(void)
+{
+ if (verbosity < V_DEBUG)
+ ++verbosity;
+
+ return;
+}
+
+
+extern void
+message_verbosity_decrease(void)
+{
+ if (verbosity > V_SILENT)
+ --verbosity;
+
+ return;
+}
+
+
+extern enum message_verbosity
+message_verbosity_get(void)
+{
+ return verbosity;
+}
+
+
+extern void
+message_set_files(unsigned int files)
+{
+ files_total = files;
+ return;
+}
+
+
+/// Prints the name of the current file if it hasn't been printed already,
+/// except if we are processing exactly one stream from stdin to stdout.
+/// I think it looks nicer to not print "(stdin)" when --verbose is used
+/// in a pipe and no other files are processed.
+static void
+print_filename(void)
+{
+ if (!opt_robot && (files_total != 1 || filename != stdin_filename)) {
+ signals_block();
+
+ FILE *file = opt_mode == MODE_LIST ? stdout : stderr;
+
+ // If a file was already processed, put an empty line
+ // before the next filename to improve readability.
+ if (first_filename_printed)
+ fputc('\n', file);
+
+ first_filename_printed = true;
+ current_filename_printed = true;
+
+ // If we don't know how many files there will be due
+ // to usage of --files or --files0.
+ if (files_total == 0)
+ fprintf(file, "%s (%u)\n", filename,
+ files_pos);
+ else
+ fprintf(file, "%s (%u/%u)\n", filename,
+ files_pos, files_total);
+
+ signals_unblock();
+ }
+
+ return;
+}
+
+
+extern void
+message_filename(const char *src_name)
+{
+ // Start numbering the files starting from one.
+ ++files_pos;
+ filename = src_name;
+
+ if (verbosity >= V_VERBOSE
+ && (progress_automatic || opt_mode == MODE_LIST))
+ print_filename();
+ else
+ current_filename_printed = false;
+
+ return;
+}
+
+
+extern void
+message_progress_start(lzma_stream *strm, bool is_passthru, uint64_t in_size)
+{
+ // Store the pointer to the lzma_stream used to do the coding.
+ // It is needed to find out the position in the stream.
+ progress_strm = strm;
+ progress_is_from_passthru = is_passthru;
+
+ // Store the expected size of the file. If we aren't printing any
+ // statistics, then is will be unused. But since it is possible
+ // that the user sends us a signal to show statistics, we need
+ // to have it available anyway.
+ expected_in_size = in_size;
+
+ // Indicate that progress info may need to be printed before
+ // printing error messages.
+ progress_started = true;
+
+ // If progress indicator is wanted, print the filename and possibly
+ // the file count now.
+ if (verbosity >= V_VERBOSE && progress_automatic) {
+ // Start the timer to display the first progress message
+ // after one second. An alternative would be to show the
+ // first message almost immediately, but delaying by one
+ // second looks better to me, since extremely early
+ // progress info is pretty much useless.
+#ifdef SIGALRM
+ // First disable a possibly existing alarm.
+ alarm(0);
+ progress_needs_updating = false;
+ alarm(1);
+#else
+ progress_needs_updating = true;
+ progress_next_update = 1000;
+#endif
+ }
+
+ return;
+}
+
+
+/// Make the string indicating completion percentage.
+static const char *
+progress_percentage(uint64_t in_pos)
+{
+ // If the size of the input file is unknown or the size told us is
+ // clearly wrong since we have processed more data than the alleged
+ // size of the file, show a static string indicating that we have
+ // no idea of the completion percentage.
+ if (expected_in_size == 0 || in_pos > expected_in_size)
+ return "--- %";
+
+ // Never show 100.0 % before we actually are finished.
+ double percentage = (double)(in_pos) / (double)(expected_in_size)
+ * 99.9;
+
+ // Use big enough buffer to hold e.g. a multibyte decimal point.
+ static char buf[16];
+ snprintf(buf, sizeof(buf), "%.1f %%", percentage);
+
+ return buf;
+}
+
+
+/// Make the string containing the amount of input processed, amount of
+/// output produced, and the compression ratio.
+static const char *
+progress_sizes(uint64_t compressed_pos, uint64_t uncompressed_pos, bool final)
+{
+ // Use big enough buffer to hold e.g. a multibyte thousand separators.
+ static char buf[128];
+ char *pos = buf;
+ size_t left = sizeof(buf);
+
+ // Print the sizes. If this the final message, use more reasonable
+ // units than MiB if the file was small.
+ const enum nicestr_unit unit_min = final ? NICESTR_B : NICESTR_MIB;
+ my_snprintf(&pos, &left, "%s / %s",
+ uint64_to_nicestr(compressed_pos,
+ unit_min, NICESTR_TIB, false, 0),
+ uint64_to_nicestr(uncompressed_pos,
+ unit_min, NICESTR_TIB, false, 1));
+
+ // Avoid division by zero. If we cannot calculate the ratio, set
+ // it to some nice number greater than 10.0 so that it gets caught
+ // in the next if-clause.
+ const double ratio = uncompressed_pos > 0
+ ? (double)(compressed_pos) / (double)(uncompressed_pos)
+ : 16.0;
+
+ // If the ratio is very bad, just indicate that it is greater than
+ // 9.999. This way the length of the ratio field stays fixed.
+ if (ratio > 9.999)
+ snprintf(pos, left, " > %.3f", 9.999);
+ else
+ snprintf(pos, left, " = %.3f", ratio);
+
+ return buf;
+}
+
+
+/// Make the string containing the processing speed of uncompressed data.
+static const char *
+progress_speed(uint64_t uncompressed_pos, uint64_t elapsed)
+{
+ // Don't print the speed immediately, since the early values look
+ // somewhat random.
+ if (elapsed < 3000)
+ return "";
+
+ // The first character of KiB/s, MiB/s, or GiB/s:
+ static const char unit[] = { 'K', 'M', 'G' };
+
+ size_t unit_index = 0;
+
+ // Calculate the speed as KiB/s.
+ double speed = (double)(uncompressed_pos)
+ / ((double)(elapsed) * (1024.0 / 1000.0));
+
+ // Adjust the unit of the speed if needed.
+ while (speed > 999.0) {
+ speed /= 1024.0;
+ if (++unit_index == ARRAY_SIZE(unit))
+ return ""; // Way too fast ;-)
+ }
+
+ // Use decimal point only if the number is small. Examples:
+ // - 0.1 KiB/s
+ // - 9.9 KiB/s
+ // - 99 KiB/s
+ // - 999 KiB/s
+ // Use big enough buffer to hold e.g. a multibyte decimal point.
+ static char buf[16];
+ snprintf(buf, sizeof(buf), "%.*f %ciB/s",
+ speed > 9.9 ? 0 : 1, speed, unit[unit_index]);
+ return buf;
+}
+
+
+/// Make a string indicating elapsed time. The format is either
+/// M:SS or H:MM:SS depending on if the time is an hour or more.
+static const char *
+progress_time(uint64_t mseconds)
+{
+ // 9999 hours = 416 days
+ static char buf[sizeof("9999:59:59")];
+
+ // 32-bit variable is enough for elapsed time (136 years).
+ uint32_t seconds = (uint32_t)(mseconds / 1000);
+
+ // Don't show anything if the time is zero or ridiculously big.
+ if (seconds == 0 || seconds > ((9999 * 60) + 59) * 60 + 59)
+ return "";
+
+ uint32_t minutes = seconds / 60;
+ seconds %= 60;
+
+ if (minutes >= 60) {
+ const uint32_t hours = minutes / 60;
+ minutes %= 60;
+ snprintf(buf, sizeof(buf),
+ "%" PRIu32 ":%02" PRIu32 ":%02" PRIu32,
+ hours, minutes, seconds);
+ } else {
+ snprintf(buf, sizeof(buf), "%" PRIu32 ":%02" PRIu32,
+ minutes, seconds);
+ }
+
+ return buf;
+}
+
+
+/// Return a string containing estimated remaining time when
+/// reasonably possible.
+static const char *
+progress_remaining(uint64_t in_pos, uint64_t elapsed)
+{
+ // Don't show the estimated remaining time when it wouldn't
+ // make sense:
+ // - Input size is unknown.
+ // - Input has grown bigger since we started (de)compressing.
+ // - We haven't processed much data yet, so estimate would be
+ // too inaccurate.
+ // - Only a few seconds has passed since we started (de)compressing,
+ // so estimate would be too inaccurate.
+ if (expected_in_size == 0 || in_pos > expected_in_size
+ || in_pos < (UINT64_C(1) << 19) || elapsed < 8000)
+ return "";
+
+ // Calculate the estimate. Don't give an estimate of zero seconds,
+ // since it is possible that all the input has been already passed
+ // to the library, but there is still quite a bit of output pending.
+ uint32_t remaining = (uint32_t)((double)(expected_in_size - in_pos)
+ * ((double)(elapsed) / 1000.0) / (double)(in_pos));
+ if (remaining < 1)
+ remaining = 1;
+
+ static char buf[sizeof("9 h 55 min")];
+
+ // Select appropriate precision for the estimated remaining time.
+ if (remaining <= 10) {
+ // A maximum of 10 seconds remaining.
+ // Show the number of seconds as is.
+ snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
+
+ } else if (remaining <= 50) {
+ // A maximum of 50 seconds remaining.
+ // Round up to the next multiple of five seconds.
+ remaining = (remaining + 4) / 5 * 5;
+ snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
+
+ } else if (remaining <= 590) {
+ // A maximum of 9 minutes and 50 seconds remaining.
+ // Round up to the next multiple of ten seconds.
+ remaining = (remaining + 9) / 10 * 10;
+ snprintf(buf, sizeof(buf), "%" PRIu32 " min %" PRIu32 " s",
+ remaining / 60, remaining % 60);
+
+ } else if (remaining <= 59 * 60) {
+ // A maximum of 59 minutes remaining.
+ // Round up to the next multiple of a minute.
+ remaining = (remaining + 59) / 60;
+ snprintf(buf, sizeof(buf), "%" PRIu32 " min", remaining);
+
+ } else if (remaining <= 9 * 3600 + 50 * 60) {
+ // A maximum of 9 hours and 50 minutes left.
+ // Round up to the next multiple of ten minutes.
+ remaining = (remaining + 599) / 600 * 10;
+ snprintf(buf, sizeof(buf), "%" PRIu32 " h %" PRIu32 " min",
+ remaining / 60, remaining % 60);
+
+ } else if (remaining <= 23 * 3600) {
+ // A maximum of 23 hours remaining.
+ // Round up to the next multiple of an hour.
+ remaining = (remaining + 3599) / 3600;
+ snprintf(buf, sizeof(buf), "%" PRIu32 " h", remaining);
+
+ } else if (remaining <= 9 * 24 * 3600 + 23 * 3600) {
+ // A maximum of 9 days and 23 hours remaining.
+ // Round up to the next multiple of an hour.
+ remaining = (remaining + 3599) / 3600;
+ snprintf(buf, sizeof(buf), "%" PRIu32 " d %" PRIu32 " h",
+ remaining / 24, remaining % 24);
+
+ } else if (remaining <= 999 * 24 * 3600) {
+ // A maximum of 999 days remaining. ;-)
+ // Round up to the next multiple of a day.
+ remaining = (remaining + 24 * 3600 - 1) / (24 * 3600);
+ snprintf(buf, sizeof(buf), "%" PRIu32 " d", remaining);
+
+ } else {
+ // The estimated remaining time is too big. Don't show it.
+ return "";
+ }
+
+ return buf;
+}
+
+
+/// Get how much uncompressed and compressed data has been processed.
+static void
+progress_pos(uint64_t *in_pos,
+ uint64_t *compressed_pos, uint64_t *uncompressed_pos)
+{
+ uint64_t out_pos;
+ if (progress_is_from_passthru) {
+ // In passthru mode the progress info is in total_in/out but
+ // the *progress_strm itself isn't initialized and thus we
+ // cannot use lzma_get_progress().
+ *in_pos = progress_strm->total_in;
+ out_pos = progress_strm->total_out;
+ } else {
+ lzma_get_progress(progress_strm, in_pos, &out_pos);
+ }
+
+ // It cannot have processed more input than it has been given.
+ assert(*in_pos <= progress_strm->total_in);
+
+ // It cannot have produced more output than it claims to have ready.
+ assert(out_pos >= progress_strm->total_out);
+
+ if (opt_mode == MODE_COMPRESS) {
+ *compressed_pos = out_pos;
+ *uncompressed_pos = *in_pos;
+ } else {
+ *compressed_pos = *in_pos;
+ *uncompressed_pos = out_pos;
+ }
+
+ return;
+}
+
+
+extern void
+message_progress_update(void)
+{
+ if (!progress_needs_updating)
+ return;
+
+ // Calculate how long we have been processing this file.
+ const uint64_t elapsed = mytime_get_elapsed();
+
+#ifndef SIGALRM
+ if (progress_next_update > elapsed)
+ return;
+
+ progress_next_update = elapsed + 1000;
+#endif
+
+ // Get our current position in the stream.
+ uint64_t in_pos;
+ uint64_t compressed_pos;
+ uint64_t uncompressed_pos;
+ progress_pos(&in_pos, &compressed_pos, &uncompressed_pos);
+
+ // Block signals so that fprintf() doesn't get interrupted.
+ signals_block();
+
+ // Print the filename if it hasn't been printed yet.
+ if (!current_filename_printed)
+ print_filename();
+
+ // Print the actual progress message. The idea is that there is at
+ // least three spaces between the fields in typical situations, but
+ // even in rare situations there is at least one space.
+ const char *cols[5] = {
+ progress_percentage(in_pos),
+ progress_sizes(compressed_pos, uncompressed_pos, false),
+ progress_speed(uncompressed_pos, elapsed),
+ progress_time(elapsed),
+ progress_remaining(in_pos, elapsed),
+ };
+ fprintf(stderr, "\r %*s %*s %*s %10s %10s\r",
+ tuklib_mbstr_fw(cols[0], 6), cols[0],
+ tuklib_mbstr_fw(cols[1], 35), cols[1],
+ tuklib_mbstr_fw(cols[2], 9), cols[2],
+ cols[3],
+ cols[4]);
+
+#ifdef SIGALRM
+ // Updating the progress info was finished. Reset
+ // progress_needs_updating to wait for the next SIGALRM.
+ //
+ // NOTE: This has to be done before alarm(1) or with (very) bad
+ // luck we could be setting this to false after the alarm has already
+ // been triggered.
+ progress_needs_updating = false;
+
+ if (verbosity >= V_VERBOSE && progress_automatic) {
+ // Mark that the progress indicator is active, so if an error
+ // occurs, the error message gets printed cleanly.
+ progress_active = true;
+
+ // Restart the timer so that progress_needs_updating gets
+ // set to true after about one second.
+ alarm(1);
+ } else {
+ // The progress message was printed because user had sent us
+ // SIGALRM. In this case, each progress message is printed
+ // on its own line.
+ fputc('\n', stderr);
+ }
+#else
+ // When SIGALRM isn't supported and we get here, it's always due to
+ // automatic progress update. We set progress_active here too like
+ // described above.
+ assert(verbosity >= V_VERBOSE);
+ assert(progress_automatic);
+ progress_active = true;
+#endif
+
+ signals_unblock();
+
+ return;
+}
+
+
+static void
+progress_flush(bool finished)
+{
+ if (!progress_started || verbosity < V_VERBOSE)
+ return;
+
+ uint64_t in_pos;
+ uint64_t compressed_pos;
+ uint64_t uncompressed_pos;
+ progress_pos(&in_pos, &compressed_pos, &uncompressed_pos);
+
+ // Avoid printing intermediate progress info if some error occurs
+ // in the beginning of the stream. (If something goes wrong later in
+ // the stream, it is sometimes useful to tell the user where the
+ // error approximately occurred, especially if the error occurs
+ // after a time-consuming operation.)
+ if (!finished && !progress_active
+ && (compressed_pos == 0 || uncompressed_pos == 0))
+ return;
+
+ progress_active = false;
+
+ const uint64_t elapsed = mytime_get_elapsed();
+
+ signals_block();
+
+ // When using the auto-updating progress indicator, the final
+ // statistics are printed in the same format as the progress
+ // indicator itself.
+ if (progress_automatic) {
+ const char *cols[5] = {
+ finished ? "100 %" : progress_percentage(in_pos),
+ progress_sizes(compressed_pos, uncompressed_pos, true),
+ progress_speed(uncompressed_pos, elapsed),
+ progress_time(elapsed),
+ finished ? "" : progress_remaining(in_pos, elapsed),
+ };
+ fprintf(stderr, "\r %*s %*s %*s %10s %10s\n",
+ tuklib_mbstr_fw(cols[0], 6), cols[0],
+ tuklib_mbstr_fw(cols[1], 35), cols[1],
+ tuklib_mbstr_fw(cols[2], 9), cols[2],
+ cols[3],
+ cols[4]);
+ } else {
+ // The filename is always printed.
+ fprintf(stderr, _("%s: "), filename);
+
+ // Percentage is printed only if we didn't finish yet.
+ if (!finished) {
+ // Don't print the percentage when it isn't known
+ // (starts with a dash).
+ const char *percentage = progress_percentage(in_pos);
+ if (percentage[0] != '-')
+ fprintf(stderr, "%s, ", percentage);
+ }
+
+ // Size information is always printed.
+ fprintf(stderr, "%s", progress_sizes(
+ compressed_pos, uncompressed_pos, true));
+
+ // The speed and elapsed time aren't always shown.
+ const char *speed = progress_speed(uncompressed_pos, elapsed);
+ if (speed[0] != '\0')
+ fprintf(stderr, ", %s", speed);
+
+ const char *elapsed_str = progress_time(elapsed);
+ if (elapsed_str[0] != '\0')
+ fprintf(stderr, ", %s", elapsed_str);
+
+ fputc('\n', stderr);
+ }
+
+ signals_unblock();
+
+ return;
+}
+
+
+extern void
+message_progress_end(bool success)
+{
+ assert(progress_started);
+ progress_flush(success);
+ progress_started = false;
+ return;
+}
+
+
+static void
+vmessage(enum message_verbosity v, const char *fmt, va_list ap)
+{
+ if (v <= verbosity) {
+ signals_block();
+
+ progress_flush(false);
+
+ // 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.
+ fprintf(stderr, _("%s: "), progname);
+
+#ifdef __clang__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#endif
+ vfprintf(stderr, fmt, ap);
+#ifdef __clang__
+# pragma GCC diagnostic pop
+#endif
+
+ fputc('\n', stderr);
+
+ signals_unblock();
+ }
+
+ return;
+}
+
+
+extern void
+message(enum message_verbosity v, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vmessage(v, fmt, ap);
+ va_end(ap);
+ return;
+}
+
+
+extern void
+message_warning(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vmessage(V_WARNING, fmt, ap);
+ va_end(ap);
+
+ set_exit_status(E_WARNING);
+ return;
+}
+
+
+extern void
+message_error(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vmessage(V_ERROR, fmt, ap);
+ va_end(ap);
+
+ set_exit_status(E_ERROR);
+ return;
+}
+
+
+extern void
+message_fatal(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vmessage(V_ERROR, fmt, ap);
+ va_end(ap);
+
+ tuklib_exit(E_ERROR, E_ERROR, false);
+}
+
+
+extern void
+message_bug(void)
+{
+ message_fatal(_("Internal error (bug)"));
+}
+
+
+extern void
+message_signal_handler(void)
+{
+ message_fatal(_("Cannot establish signal handlers"));
+}
+
+
+extern const char *
+message_strm(lzma_ret code)
+{
+ switch (code) {
+ case LZMA_NO_CHECK:
+ return _("No integrity check; not verifying file integrity");
+
+ case LZMA_UNSUPPORTED_CHECK:
+ return _("Unsupported type of integrity check; "
+ "not verifying file integrity");
+
+ case LZMA_MEM_ERROR:
+ return strerror(ENOMEM);
+
+ case LZMA_MEMLIMIT_ERROR:
+ return _("Memory usage limit reached");
+
+ case LZMA_FORMAT_ERROR:
+ return _("File format not recognized");
+
+ case LZMA_OPTIONS_ERROR:
+ return _("Unsupported options");
+
+ case LZMA_DATA_ERROR:
+ return _("Compressed data is corrupt");
+
+ case LZMA_BUF_ERROR:
+ return _("Unexpected end of input");
+
+ case LZMA_OK:
+ case LZMA_STREAM_END:
+ case LZMA_GET_CHECK:
+ case LZMA_PROG_ERROR:
+ case LZMA_SEEK_NEEDED:
+ case LZMA_RET_INTERNAL1:
+ case LZMA_RET_INTERNAL2:
+ case LZMA_RET_INTERNAL3:
+ case LZMA_RET_INTERNAL4:
+ case LZMA_RET_INTERNAL5:
+ case LZMA_RET_INTERNAL6:
+ case LZMA_RET_INTERNAL7:
+ case LZMA_RET_INTERNAL8:
+ // Without "default", compiler will warn if new constants
+ // are added to lzma_ret, it is not too easy to forget to
+ // add the new constants to this function.
+ break;
+ }
+
+ return _("Internal error (bug)");
+}
+
+
+extern void
+message_mem_needed(enum message_verbosity v, uint64_t memusage)
+{
+ if (v > verbosity)
+ return;
+
+ // Convert memusage to MiB, rounding up to the next full MiB.
+ // This way the user can always use the displayed usage as
+ // the new memory usage limit. (If we rounded to the nearest,
+ // the user might need to +1 MiB to get high enough limit.)
+ memusage = round_up_to_mib(memusage);
+
+ uint64_t memlimit = hardware_memlimit_get(opt_mode);
+
+ // Handle the case when there is no memory usage limit.
+ // This way we don't print a weird message with a huge number.
+ if (memlimit == UINT64_MAX) {
+ message(v, _("%s MiB of memory is required. "
+ "The limiter is disabled."),
+ uint64_to_str(memusage, 0));
+ return;
+ }
+
+ // With US-ASCII:
+ // 2^64 with thousand separators + " MiB" suffix + '\0' = 26 + 4 + 1
+ // But there may be multibyte chars so reserve enough space.
+ char memlimitstr[128];
+
+ // Show the memory usage limit as MiB unless it is less than 1 MiB.
+ // This way it's easy to notice errors where one has typed
+ // --memory=123 instead of --memory=123MiB.
+ if (memlimit < (UINT32_C(1) << 20)) {
+ snprintf(memlimitstr, sizeof(memlimitstr), "%s B",
+ uint64_to_str(memlimit, 1));
+ } else {
+ // Round up just like with memusage. If this function is
+ // called for informational purposes (to just show the
+ // current usage and limit), we should never show that
+ // the usage is higher than the limit, which would give
+ // a false impression that the memory usage limit isn't
+ // properly enforced.
+ snprintf(memlimitstr, sizeof(memlimitstr), "%s MiB",
+ uint64_to_str(round_up_to_mib(memlimit), 1));
+ }
+
+ message(v, _("%s MiB of memory is required. The limit is %s."),
+ uint64_to_str(memusage, 0), memlimitstr);
+
+ return;
+}
+
+
+extern void
+message_filters_show(enum message_verbosity v, const lzma_filter *filters)
+{
+ if (v > verbosity)
+ return;
+
+ char *buf;
+ const lzma_ret ret = lzma_str_from_filters(&buf, filters,
+ LZMA_STR_ENCODER | LZMA_STR_GETOPT_LONG, NULL);
+ if (ret != LZMA_OK)
+ message_fatal("%s", message_strm(ret));
+
+ fprintf(stderr, _("%s: Filter chain: %s\n"), progname, buf);
+ free(buf);
+ return;
+}
+
+
+extern void
+message_try_help(void)
+{
+ // Print this with V_WARNING instead of V_ERROR to prevent it from
+ // showing up when --quiet has been specified.
+ message(V_WARNING, _("Try `%s --help' for more information."),
+ progname);
+ return;
+}
+
+
+extern void
+message_version(void)
+{
+ // It is possible that liblzma version is different than the command
+ // line tool version, so print both.
+ if (opt_robot) {
+ printf("XZ_VERSION=%" PRIu32 "\nLIBLZMA_VERSION=%" PRIu32 "\n",
+ LZMA_VERSION, lzma_version_number());
+ } else {
+ printf("xz (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n");
+ printf("liblzma %s\n", lzma_version_string());
+ }
+
+ tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
+}
+
+
+extern void
+message_help(bool long_help)
+{
+ printf(_("Usage: %s [OPTION]... [FILE]...\n"
+ "Compress or decompress FILEs in the .xz format.\n\n"),
+ progname);
+
+ // NOTE: The short help doesn't currently have options that
+ // take arguments.
+ if (long_help)
+ puts(_("Mandatory arguments to long options are mandatory "
+ "for short options too.\n"));
+
+ if (long_help)
+ puts(_(" Operation mode:\n"));
+
+ puts(_(
+" -z, --compress force compression\n"
+" -d, --decompress force decompression\n"
+" -t, --test test compressed file integrity\n"
+" -l, --list list information about .xz files"));
+
+ if (long_help)
+ puts(_("\n Operation modifiers:\n"));
+
+ puts(_(
+" -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"));
+ // NOTE: --to-stdout isn't included above because it's not
+ // the recommended spelling. It was copied from gzip but other
+ // compressors with gzip-like syntax don't support it.
+
+ if (long_help) {
+ puts(_(
+" --single-stream decompress only the first stream, and silently\n"
+" ignore possible remaining input data"));
+ puts(_(
+" --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"));
+ }
+
+ if (long_help) {
+ puts(_("\n Basic file format and compression options:\n"));
+ puts(_(
+" -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'"));
+ puts(_(
+" --ignore-check don't verify the integrity check when decompressing"));
+ }
+
+ puts(_(
+" -0 ... -9 compression preset; default is 6; take compressor *and*\n"
+" decompressor memory usage into account before using 7-9!"));
+
+ puts(_(
+" -e, --extreme try to improve compression ratio by using more CPU time;\n"
+" does not affect decompressor memory requirements"));
+
+ puts(_(
+" -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"));
+
+ if (long_help) {
+ puts(_(
+" --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"));
+ puts(_(
+" --block-list=SIZES\n"
+" start a new .xz block after the given comma-separated\n"
+" intervals of uncompressed data"));
+ puts(_(
+" --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"
+ ));
+ puts(_( // xgettext:no-c-format
+" --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"));
+
+ puts(_(
+" --no-adjust if compression settings exceed the memory usage limit,\n"
+" give an error instead of adjusting the settings downwards"));
+ }
+
+ if (long_help) {
+ puts(_(
+"\n Custom filter chain for compression (alternative for using presets):"));
+
+#if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1) \
+ || defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
+ // 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.
+ puts(_(
+"\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)"));
+#endif
+
+ puts(_(
+"\n"
+" --x86[=OPTS] x86 BCJ filter (32-bit and 64-bit)\n"
+" --arm[=OPTS] ARM BCJ filter\n"
+" --armthumb[=OPTS] ARM-Thumb BCJ filter\n"
+" --arm64[=OPTS] ARM64 BCJ filter\n"
+" --powerpc[=OPTS] PowerPC BCJ filter (big endian only)\n"
+" --ia64[=OPTS] IA-64 (Itanium) BCJ filter\n"
+" --sparc[=OPTS] SPARC BCJ filter\n"
+" Valid OPTS for all BCJ filters:\n"
+" start=NUM start offset for conversions (default=0)"));
+
+#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
+ puts(_(
+"\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)"));
+#endif
+ }
+
+ if (long_help)
+ puts(_("\n Other options:\n"));
+
+ puts(_(
+" -q, --quiet suppress warnings; specify twice to suppress errors too\n"
+" -v, --verbose be verbose; specify twice for even more verbose"));
+
+ if (long_help) {
+ puts(_(
+" -Q, --no-warn make warnings not affect the exit status"));
+ puts(_(
+" --robot use machine-parsable messages (useful for scripts)"));
+ puts("");
+ puts(_(
+" --info-memory display the total amount of RAM and the currently active\n"
+" memory usage limits, and exit"));
+ puts(_(
+" -h, --help display the short help (lists only the basic options)\n"
+" -H, --long-help display this long help and exit"));
+ } else {
+ puts(_(
+" -h, --help display this short help and exit\n"
+" -H, --long-help display the long help (lists also the advanced options)"));
+ }
+
+ puts(_(
+" -V, --version display the version number and exit"));
+
+ puts(_("\nWith no FILE, or when FILE is -, read standard input.\n"));
+
+ // TRANSLATORS: This message indicates the bug reporting address
+ // for this package. Please add _another line_ saying
+ // "Report translation bugs to <...>\n" with the email or WWW
+ // address for translation bugs. Thanks.
+ printf(_("Report bugs to <%s> (in English or Finnish).\n"),
+ PACKAGE_BUGREPORT);
+ printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+
+#if LZMA_VERSION_STABILITY != LZMA_VERSION_STABILITY_STABLE
+ puts(_(
+"THIS IS A DEVELOPMENT VERSION NOT INTENDED FOR PRODUCTION USE."));
+#endif
+
+ tuklib_exit(E_SUCCESS, E_ERROR, verbosity != V_SILENT);
+}
diff --git a/src/xz/message.h b/src/xz/message.h
new file mode 100644
index 0000000..f608ec7
--- /dev/null
+++ b/src/xz/message.h
@@ -0,0 +1,156 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file message.h
+/// \brief Printing messages to stderr
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// Verbosity levels
+enum message_verbosity {
+ V_SILENT, ///< No messages
+ V_ERROR, ///< Only error messages
+ V_WARNING, ///< Errors and warnings
+ V_VERBOSE, ///< Errors, warnings, and verbose statistics
+ V_DEBUG, ///< Very verbose
+};
+
+
+/// \brief Signals used for progress message handling
+extern const int message_progress_sigs[];
+
+
+/// \brief Initializes the message functions
+///
+/// If an error occurs, this function doesn't return.
+///
+extern void message_init(void);
+
+
+/// Increase verbosity level by one step unless it was at maximum.
+extern void message_verbosity_increase(void);
+
+/// Decrease verbosity level by one step unless it was at minimum.
+extern void message_verbosity_decrease(void);
+
+/// Get the current verbosity level.
+extern enum message_verbosity message_verbosity_get(void);
+
+
+/// \brief Print a message if verbosity level is at least "verbosity"
+///
+/// This doesn't touch the exit status.
+lzma_attribute((__format__(__printf__, 2, 3)))
+extern void message(enum message_verbosity verbosity, const char *fmt, ...);
+
+
+/// \brief Prints a warning and possibly sets exit status
+///
+/// The message is printed only if verbosity level is at least V_WARNING.
+/// The exit status is set to WARNING unless it was already at ERROR.
+lzma_attribute((__format__(__printf__, 1, 2)))
+extern void message_warning(const char *fmt, ...);
+
+
+/// \brief Prints an error message and sets exit status
+///
+/// The message is printed only if verbosity level is at least V_ERROR.
+/// The exit status is set to ERROR.
+lzma_attribute((__format__(__printf__, 1, 2)))
+extern void message_error(const char *fmt, ...);
+
+
+/// \brief Prints an error message and exits with EXIT_ERROR
+///
+/// The message is printed only if verbosity level is at least V_ERROR.
+tuklib_attr_noreturn
+lzma_attribute((__format__(__printf__, 1, 2)))
+extern void message_fatal(const char *fmt, ...);
+
+
+/// Print an error message that an internal error occurred and exit with
+/// EXIT_ERROR.
+tuklib_attr_noreturn
+extern void message_bug(void);
+
+
+/// Print a message that establishing signal handlers failed, and exit with
+/// exit status ERROR.
+tuklib_attr_noreturn
+extern void message_signal_handler(void);
+
+
+/// Convert lzma_ret to a string.
+extern const char *message_strm(lzma_ret code);
+
+
+/// Display how much memory was needed and how much the limit was.
+extern void message_mem_needed(enum message_verbosity v, uint64_t memusage);
+
+
+/// Print the filter chain.
+extern void message_filters_show(
+ enum message_verbosity v, const lzma_filter *filters);
+
+
+/// Print a message that user should try --help.
+extern void message_try_help(void);
+
+
+/// Prints the version number to stdout and exits with exit status SUCCESS.
+tuklib_attr_noreturn
+extern void message_version(void);
+
+
+/// Print the help message.
+tuklib_attr_noreturn
+extern void message_help(bool long_help);
+
+
+/// \brief Set the total number of files to be processed
+///
+/// Standard input is counted as a file here. This is used when printing
+/// the filename via message_filename().
+extern void message_set_files(unsigned int files);
+
+
+/// \brief Set the name of the current file and possibly print it too
+///
+/// The name is printed immediately if --list was used or if --verbose
+/// was used and stderr is a terminal. Even when the filename isn't printed,
+/// it is stored so that it can be printed later if needed for progress
+/// messages.
+extern void message_filename(const char *src_name);
+
+
+/// \brief Start progress info handling
+///
+/// message_filename() must be called before this function to set
+/// the filename.
+///
+/// This must be paired with a call to message_progress_end() before the
+/// given *strm becomes invalid.
+///
+/// \param strm Pointer to lzma_stream used for the coding.
+/// \param in_size Size of the input file, or zero if unknown.
+///
+extern void message_progress_start(lzma_stream *strm,
+ bool is_passthru, uint64_t in_size);
+
+
+/// Update the progress info if in verbose mode and enough time has passed
+/// since the previous update. This can be called only when
+/// message_progress_start() has already been used.
+extern void message_progress_update(void);
+
+
+/// \brief Finishes the progress message if we were in verbose mode
+///
+/// \param finished True if the whole stream was successfully coded
+/// and output written to the output stream.
+///
+extern void message_progress_end(bool finished);
diff --git a/src/xz/mytime.c b/src/xz/mytime.c
new file mode 100644
index 0000000..7e8a074
--- /dev/null
+++ b/src/xz/mytime.c
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file mytime.c
+/// \brief Time handling functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC)
+# include <time.h>
+#else
+# include <sys/time.h>
+#endif
+
+uint64_t opt_flush_timeout = 0;
+
+static uint64_t start_time;
+static uint64_t next_flush;
+
+
+/// \brief Get the current time as milliseconds
+///
+/// It's relative to some point but not necessarily to the UNIX Epoch.
+static uint64_t
+mytime_now(void)
+{
+#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC)
+ // If CLOCK_MONOTONIC was available at compile time but for some
+ // reason isn't at runtime, fallback to CLOCK_REALTIME which
+ // according to POSIX is mandatory for all implementations.
+ static clockid_t clk_id = CLOCK_MONOTONIC;
+ struct timespec tv;
+ while (clock_gettime(clk_id, &tv))
+ clk_id = CLOCK_REALTIME;
+
+ return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_nsec / 1000000);
+#else
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_usec / 1000);
+#endif
+}
+
+
+extern void
+mytime_set_start_time(void)
+{
+ start_time = mytime_now();
+ return;
+}
+
+
+extern uint64_t
+mytime_get_elapsed(void)
+{
+ return mytime_now() - start_time;
+}
+
+
+extern void
+mytime_set_flush_time(void)
+{
+ next_flush = mytime_now() + opt_flush_timeout;
+ return;
+}
+
+
+extern int
+mytime_get_flush_timeout(void)
+{
+ if (opt_flush_timeout == 0 || opt_mode != MODE_COMPRESS)
+ return -1;
+
+ const uint64_t now = mytime_now();
+ if (now >= next_flush)
+ return 0;
+
+ const uint64_t remaining = next_flush - now;
+ return remaining > INT_MAX ? INT_MAX : (int)remaining;
+}
diff --git a/src/xz/mytime.h b/src/xz/mytime.h
new file mode 100644
index 0000000..a7be2aa
--- /dev/null
+++ b/src/xz/mytime.h
@@ -0,0 +1,43 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file mytime.h
+/// \brief Time handling functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+
+/// \brief Number of milliseconds to between LZMA_SYNC_FLUSHes
+///
+/// If 0, timed flushing is disabled. Otherwise if no more input is available
+/// and not at the end of the file and at least opt_flush_timeout milliseconds
+/// has elapsed since the start of compression or the previous flushing
+/// (LZMA_SYNC_FLUSH or LZMA_FULL_FLUSH), set LZMA_SYNC_FLUSH to flush
+/// the pending data.
+extern uint64_t opt_flush_timeout;
+
+
+/// \brief Store the time when (de)compression was started
+///
+/// The start time is also stored as the time of the first flush.
+extern void mytime_set_start_time(void);
+
+
+/// \brief Get the number of milliseconds since the operation started
+extern uint64_t mytime_get_elapsed(void);
+
+
+/// \brief Store the time of when compressor was flushed
+extern void mytime_set_flush_time(void);
+
+
+/// \brief Get the number of milliseconds until the next flush
+///
+/// This returns -1 if no timed flushing is used.
+///
+/// The return value is intended for use with poll().
+extern int mytime_get_flush_timeout(void);
diff --git a/src/xz/options.c b/src/xz/options.c
new file mode 100644
index 0000000..4d5e899
--- /dev/null
+++ b/src/xz/options.c
@@ -0,0 +1,359 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file options.c
+/// \brief Parser for filter-specific options
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+///////////////////
+// Generic stuff //
+///////////////////
+
+typedef struct {
+ const char *name;
+ uint64_t id;
+} name_id_map;
+
+
+typedef struct {
+ const char *name;
+ const name_id_map *map;
+ uint64_t min;
+ uint64_t max;
+} option_map;
+
+
+/// Parses option=value pairs that are separated with commas:
+/// opt=val,opt=val,opt=val
+///
+/// Each option is a string, that is converted to an integer using the
+/// index where the option string is in the array.
+///
+/// Value can be
+/// - a string-id map mapping a list of possible string values to integers
+/// (opts[i].map != NULL, opts[i].min and opts[i].max are ignored);
+/// - a number with minimum and maximum value limit
+/// (opts[i].map == NULL && opts[i].min != UINT64_MAX);
+/// - a string that will be parsed by the filter-specific code
+/// (opts[i].map == NULL && opts[i].min == UINT64_MAX, opts[i].max ignored)
+///
+/// When parsing both option and value succeed, a filter-specific function
+/// is called, which should update the given value to filter-specific
+/// options structure.
+///
+/// This returns only if no errors occur.
+///
+/// \param str String containing the options from the command line
+/// \param opts Filter-specific option map
+/// \param set Filter-specific function to update filter_options
+/// \param filter_options Pointer to filter-specific options structure
+///
+static void
+parse_options(const char *str, const option_map *opts,
+ void (*set)(void *filter_options,
+ unsigned key, uint64_t value, const char *valuestr),
+ void *filter_options)
+{
+ if (str == NULL || str[0] == '\0')
+ return;
+
+ char *s = xstrdup(str);
+ char *name = s;
+
+ while (*name != '\0') {
+ if (*name == ',') {
+ ++name;
+ continue;
+ }
+
+ char *split = strchr(name, ',');
+ if (split != NULL)
+ *split = '\0';
+
+ char *value = strchr(name, '=');
+ if (value != NULL)
+ *value++ = '\0';
+
+ if (value == NULL || value[0] == '\0')
+ message_fatal(_("%s: Options must be `name=value' "
+ "pairs separated with commas"), str);
+
+ // Look for the option name from the option map.
+ unsigned i = 0;
+ while (true) {
+ if (opts[i].name == NULL)
+ message_fatal(_("%s: Invalid option name"),
+ name);
+
+ if (strcmp(name, opts[i].name) == 0)
+ break;
+
+ ++i;
+ }
+
+ // Option was found from the map. See how we should handle it.
+ if (opts[i].map != NULL) {
+ // value is a string which we should map
+ // to an integer.
+ unsigned j;
+ for (j = 0; opts[i].map[j].name != NULL; ++j) {
+ if (strcmp(opts[i].map[j].name, value) == 0)
+ break;
+ }
+
+ if (opts[i].map[j].name == NULL)
+ message_fatal(_("%s: Invalid option value"),
+ value);
+
+ set(filter_options, i, opts[i].map[j].id, value);
+
+ } else if (opts[i].min == UINT64_MAX) {
+ // value is a special string that will be
+ // parsed by set().
+ set(filter_options, i, 0, value);
+
+ } else {
+ // value is an integer.
+ const uint64_t v = str_to_uint64(name, value,
+ opts[i].min, opts[i].max);
+ set(filter_options, i, v, value);
+ }
+
+ // Check if it was the last option.
+ if (split == NULL)
+ break;
+
+ name = split + 1;
+ }
+
+ free(s);
+ return;
+}
+
+
+///////////
+// Delta //
+///////////
+
+enum {
+ OPT_DIST,
+};
+
+
+static void
+set_delta(void *options, unsigned key, uint64_t value,
+ const char *valuestr lzma_attribute((__unused__)))
+{
+ lzma_options_delta *opt = options;
+ switch (key) {
+ case OPT_DIST:
+ opt->dist = value;
+ break;
+ }
+}
+
+
+extern lzma_options_delta *
+options_delta(const char *str)
+{
+ static const option_map opts[] = {
+ { "dist", NULL, LZMA_DELTA_DIST_MIN,
+ LZMA_DELTA_DIST_MAX },
+ { NULL, NULL, 0, 0 }
+ };
+
+ lzma_options_delta *options = xmalloc(sizeof(lzma_options_delta));
+ *options = (lzma_options_delta){
+ // It's hard to give a useful default for this.
+ .type = LZMA_DELTA_TYPE_BYTE,
+ .dist = LZMA_DELTA_DIST_MIN,
+ };
+
+ parse_options(str, opts, &set_delta, options);
+
+ return options;
+}
+
+
+/////////
+// BCJ //
+/////////
+
+enum {
+ OPT_START_OFFSET,
+};
+
+
+static void
+set_bcj(void *options, unsigned key, uint64_t value,
+ const char *valuestr lzma_attribute((__unused__)))
+{
+ lzma_options_bcj *opt = options;
+ switch (key) {
+ case OPT_START_OFFSET:
+ opt->start_offset = value;
+ break;
+ }
+}
+
+
+extern lzma_options_bcj *
+options_bcj(const char *str)
+{
+ static const option_map opts[] = {
+ { "start", NULL, 0, UINT32_MAX },
+ { NULL, NULL, 0, 0 }
+ };
+
+ lzma_options_bcj *options = xmalloc(sizeof(lzma_options_bcj));
+ *options = (lzma_options_bcj){
+ .start_offset = 0,
+ };
+
+ parse_options(str, opts, &set_bcj, options);
+
+ return options;
+}
+
+
+//////////
+// LZMA //
+//////////
+
+enum {
+ OPT_PRESET,
+ OPT_DICT,
+ OPT_LC,
+ OPT_LP,
+ OPT_PB,
+ OPT_MODE,
+ OPT_NICE,
+ OPT_MF,
+ OPT_DEPTH,
+};
+
+
+tuklib_attr_noreturn
+static void
+error_lzma_preset(const char *valuestr)
+{
+ message_fatal(_("Unsupported LZMA1/LZMA2 preset: %s"), valuestr);
+}
+
+
+static void
+set_lzma(void *options, unsigned key, uint64_t value, const char *valuestr)
+{
+ lzma_options_lzma *opt = options;
+
+ switch (key) {
+ case OPT_PRESET: {
+ if (valuestr[0] < '0' || valuestr[0] > '9')
+ error_lzma_preset(valuestr);
+
+ uint32_t preset = (uint32_t)(valuestr[0] - '0');
+
+ // Currently only "e" is supported as a modifier,
+ // so keep this simple for now.
+ if (valuestr[1] != '\0') {
+ if (valuestr[1] == 'e')
+ preset |= LZMA_PRESET_EXTREME;
+ else
+ error_lzma_preset(valuestr);
+
+ if (valuestr[2] != '\0')
+ error_lzma_preset(valuestr);
+ }
+
+ if (lzma_lzma_preset(options, preset))
+ error_lzma_preset(valuestr);
+
+ break;
+ }
+
+ case OPT_DICT:
+ opt->dict_size = value;
+ break;
+
+ case OPT_LC:
+ opt->lc = value;
+ break;
+
+ case OPT_LP:
+ opt->lp = value;
+ break;
+
+ case OPT_PB:
+ opt->pb = value;
+ break;
+
+ case OPT_MODE:
+ opt->mode = value;
+ break;
+
+ case OPT_NICE:
+ opt->nice_len = value;
+ break;
+
+ case OPT_MF:
+ opt->mf = value;
+ break;
+
+ case OPT_DEPTH:
+ opt->depth = value;
+ break;
+ }
+}
+
+
+extern lzma_options_lzma *
+options_lzma(const char *str)
+{
+ static const name_id_map modes[] = {
+ { "fast", LZMA_MODE_FAST },
+ { "normal", LZMA_MODE_NORMAL },
+ { NULL, 0 }
+ };
+
+ static const name_id_map mfs[] = {
+ { "hc3", LZMA_MF_HC3 },
+ { "hc4", LZMA_MF_HC4 },
+ { "bt2", LZMA_MF_BT2 },
+ { "bt3", LZMA_MF_BT3 },
+ { "bt4", LZMA_MF_BT4 },
+ { NULL, 0 }
+ };
+
+ static const option_map opts[] = {
+ { "preset", NULL, UINT64_MAX, 0 },
+ { "dict", NULL, LZMA_DICT_SIZE_MIN,
+ (UINT32_C(1) << 30) + (UINT32_C(1) << 29) },
+ { "lc", NULL, LZMA_LCLP_MIN, LZMA_LCLP_MAX },
+ { "lp", NULL, LZMA_LCLP_MIN, LZMA_LCLP_MAX },
+ { "pb", NULL, LZMA_PB_MIN, LZMA_PB_MAX },
+ { "mode", modes, 0, 0 },
+ { "nice", NULL, 2, 273 },
+ { "mf", mfs, 0, 0 },
+ { "depth", NULL, 0, UINT32_MAX },
+ { NULL, NULL, 0, 0 }
+ };
+
+ lzma_options_lzma *options = xmalloc(sizeof(lzma_options_lzma));
+ if (lzma_lzma_preset(options, LZMA_PRESET_DEFAULT))
+ message_bug();
+
+ parse_options(str, opts, &set_lzma, options);
+
+ if (options->lc + options->lp > LZMA_LCLP_MAX)
+ message_fatal(_("The sum of lc and lp must not exceed 4"));
+
+ return options;
+}
diff --git a/src/xz/options.h b/src/xz/options.h
new file mode 100644
index 0000000..61ec8d5
--- /dev/null
+++ b/src/xz/options.h
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file options.h
+/// \brief Parser for filter-specific options
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// \brief Parser for Delta options
+///
+/// \return Pointer to allocated options structure.
+/// Doesn't return on error.
+extern lzma_options_delta *options_delta(const char *str);
+
+
+/// \brief Parser for BCJ options
+///
+/// \return Pointer to allocated options structure.
+/// Doesn't return on error.
+extern lzma_options_bcj *options_bcj(const char *str);
+
+
+/// \brief Parser for LZMA options
+///
+/// \return Pointer to allocated options structure.
+/// Doesn't return on error.
+extern lzma_options_lzma *options_lzma(const char *str);
diff --git a/src/xz/private.h b/src/xz/private.h
new file mode 100644
index 0000000..6414bdb
--- /dev/null
+++ b/src/xz/private.h
@@ -0,0 +1,66 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file private.h
+/// \brief Common includes, definitions, and prototypes
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "mythread.h"
+
+#include "lzma.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <signal.h>
+#include <locale.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "tuklib_gettext.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
+#include "tuklib_mbstr.h"
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO (fileno(stdin))
+#endif
+
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO (fileno(stdout))
+#endif
+
+#ifndef STDERR_FILENO
+# define STDERR_FILENO (fileno(stderr))
+#endif
+
+#if defined(HAVE_CAPSICUM) || defined(HAVE_PLEDGE)
+# define ENABLE_SANDBOX 1
+#endif
+
+#include "main.h"
+#include "mytime.h"
+#include "coder.h"
+#include "message.h"
+#include "args.h"
+#include "hardware.h"
+#include "file_io.h"
+#include "options.h"
+#include "signals.h"
+#include "suffix.h"
+#include "util.h"
+
+#ifdef HAVE_DECODERS
+# include "list.h"
+#endif
diff --git a/src/xz/signals.c b/src/xz/signals.c
new file mode 100644
index 0000000..7aef463
--- /dev/null
+++ b/src/xz/signals.c
@@ -0,0 +1,209 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file signals.c
+/// \brief Handling signals to abort operation
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+
+volatile sig_atomic_t user_abort = false;
+
+
+#if !(defined(_WIN32) && !defined(__CYGWIN__))
+
+/// If we were interrupted by a signal, we store the signal number so that
+/// we can raise that signal to kill the program when all cleanups have
+/// been done.
+static volatile sig_atomic_t exit_signal = 0;
+
+/// Mask of signals for which we have established a signal handler to set
+/// user_abort to true.
+static sigset_t hooked_signals;
+
+/// True once signals_init() has finished. This is used to skip blocking
+/// signals (with uninitialized hooked_signals) if signals_block() and
+/// signals_unblock() are called before signals_init() has been called.
+static bool signals_are_initialized = false;
+
+/// signals_block() and signals_unblock() can be called recursively.
+static size_t signals_block_count = 0;
+
+
+static void
+signal_handler(int sig)
+{
+ exit_signal = sig;
+ user_abort = true;
+
+#ifndef TUKLIB_DOSLIKE
+ io_write_to_user_abort_pipe();
+#endif
+
+ return;
+}
+
+
+extern void
+signals_init(void)
+{
+ // List of signals for which we establish the signal handler.
+ static const int sigs[] = {
+ SIGINT,
+ SIGTERM,
+#ifdef SIGHUP
+ SIGHUP,
+#endif
+#ifdef SIGPIPE
+ SIGPIPE,
+#endif
+#ifdef SIGXCPU
+ SIGXCPU,
+#endif
+#ifdef SIGXFSZ
+ SIGXFSZ,
+#endif
+ };
+
+ // Mask of the signals for which we have established a signal handler.
+ sigemptyset(&hooked_signals);
+ for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i)
+ sigaddset(&hooked_signals, sigs[i]);
+
+#ifdef SIGALRM
+ // Add also the signals from message.c to hooked_signals.
+ for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
+ sigaddset(&hooked_signals, message_progress_sigs[i]);
+#endif
+
+ // Using "my_sa" because "sa" may conflict with a sockaddr variable
+ // from system headers on Solaris.
+ struct sigaction my_sa;
+
+ // All the signals that we handle we also blocked while the signal
+ // handler runs.
+ my_sa.sa_mask = hooked_signals;
+
+ // Don't set SA_RESTART, because we want EINTR so that we can check
+ // for user_abort and cleanup before exiting. We block the signals
+ // for which we have established a handler when we don't want EINTR.
+ my_sa.sa_flags = 0;
+ my_sa.sa_handler = &signal_handler;
+
+ for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i) {
+ // If the parent process has left some signals ignored,
+ // we don't unignore them.
+ struct sigaction old;
+ if (sigaction(sigs[i], NULL, &old) == 0
+ && old.sa_handler == SIG_IGN)
+ continue;
+
+ // Establish the signal handler.
+ if (sigaction(sigs[i], &my_sa, NULL))
+ message_signal_handler();
+ }
+
+ signals_are_initialized = true;
+
+ return;
+}
+
+
+#ifndef __VMS
+extern void
+signals_block(void)
+{
+ if (signals_are_initialized) {
+ if (signals_block_count++ == 0) {
+ const int saved_errno = errno;
+ mythread_sigmask(SIG_BLOCK, &hooked_signals, NULL);
+ errno = saved_errno;
+ }
+ }
+
+ return;
+}
+
+
+extern void
+signals_unblock(void)
+{
+ if (signals_are_initialized) {
+ assert(signals_block_count > 0);
+
+ if (--signals_block_count == 0) {
+ const int saved_errno = errno;
+ mythread_sigmask(SIG_UNBLOCK, &hooked_signals, NULL);
+ errno = saved_errno;
+ }
+ }
+
+ return;
+}
+#endif
+
+
+extern void
+signals_exit(void)
+{
+ const int sig = (int)exit_signal;
+
+ if (sig != 0) {
+#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
+ // Don't raise(), set only exit status. This avoids
+ // printing unwanted message about SIGINT when the user
+ // presses C-c.
+ set_exit_status(E_ERROR);
+#else
+ struct sigaction sa;
+ sa.sa_handler = SIG_DFL;
+ sigfillset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ sigaction(sig, &sa, NULL);
+ raise(sig);
+#endif
+ }
+
+ return;
+}
+
+#else
+
+// While Windows has some very basic signal handling functions as required
+// by C89, they are not really used, and e.g. SIGINT doesn't work exactly
+// the way it does on POSIX (Windows creates a new thread for the signal
+// handler). Instead, we use SetConsoleCtrlHandler() to catch user
+// pressing C-c, because that seems to be the recommended way to do it.
+//
+// NOTE: This doesn't work under MSYS. Trying with SIGINT doesn't work
+// either even if it appeared to work at first. So test using Windows
+// console window.
+
+static BOOL WINAPI
+signal_handler(DWORD type lzma_attribute((__unused__)))
+{
+ // Since we don't get a signal number which we could raise() at
+ // signals_exit() like on POSIX, just set the exit status to
+ // indicate an error, so that we cannot return with zero exit status.
+ set_exit_status(E_ERROR);
+ user_abort = true;
+ return TRUE;
+}
+
+
+extern void
+signals_init(void)
+{
+ if (!SetConsoleCtrlHandler(&signal_handler, TRUE))
+ message_signal_handler();
+
+ return;
+}
+
+#endif
diff --git a/src/xz/signals.h b/src/xz/signals.h
new file mode 100644
index 0000000..5b125e0
--- /dev/null
+++ b/src/xz/signals.h
@@ -0,0 +1,43 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file signals.h
+/// \brief Handling signals to abort operation
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// If this is true, we will clean up the possibly incomplete output file,
+/// return to main() as soon as practical. That is, the code needs to poll
+/// this variable in various places.
+extern volatile sig_atomic_t user_abort;
+
+
+/// Initialize the signal handler, which will set user_abort to true when
+/// user e.g. presses C-c.
+extern void signals_init(void);
+
+
+#if (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__VMS)
+# define signals_block() do { } while (0)
+# define signals_unblock() do { } while (0)
+#else
+/// Block the signals which don't have SA_RESTART and which would just set
+/// user_abort to true. This is handy when we don't want to handle EINTR
+/// and don't want SA_RESTART either.
+extern void signals_block(void);
+
+/// Unblock the signals blocked by signals_block().
+extern void signals_unblock(void);
+#endif
+
+#if defined(_WIN32) && !defined(__CYGWIN__)
+# define signals_exit() do { } while (0)
+#else
+/// If user has sent us a signal earlier to terminate the process,
+/// re-raise that signal to actually terminate the process.
+extern void signals_exit(void);
+#endif
diff --git a/src/xz/suffix.c b/src/xz/suffix.c
new file mode 100644
index 0000000..6ce9787
--- /dev/null
+++ b/src/xz/suffix.c
@@ -0,0 +1,401 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file suffix.c
+/// \brief Checks filename suffix and creates the destination filename
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+
+#ifdef __DJGPP__
+# include <fcntl.h>
+#endif
+
+// For case-insensitive filename suffix on case-insensitive systems
+#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
+# ifdef HAVE_STRINGS_H
+# include <strings.h>
+# endif
+# define strcmp strcasecmp
+#endif
+
+
+static char *custom_suffix = NULL;
+
+
+/// \brief Test if the char is a directory separator
+static bool
+is_dir_sep(char c)
+{
+#ifdef TUKLIB_DOSLIKE
+ return c == '/' || c == '\\' || c == ':';
+#else
+ return c == '/';
+#endif
+}
+
+
+/// \brief Test if the string contains a directory separator
+static bool
+has_dir_sep(const char *str)
+{
+#ifdef TUKLIB_DOSLIKE
+ return strpbrk(str, "/\\:") != NULL;
+#else
+ return strchr(str, '/') != NULL;
+#endif
+}
+
+
+#ifdef __DJGPP__
+/// \brief Test for special suffix used for 8.3 short filenames (SFN)
+///
+/// \return If str matches *.?- or *.??-, true is returned. Otherwise
+/// false is returned.
+static bool
+has_sfn_suffix(const char *str, size_t len)
+{
+ if (len >= 4 && str[len - 1] == '-' && str[len - 2] != '.'
+ && !is_dir_sep(str[len - 2])) {
+ // *.?-
+ if (str[len - 3] == '.')
+ return !is_dir_sep(str[len - 4]);
+
+ // *.??-
+ if (len >= 5 && !is_dir_sep(str[len - 3])
+ && str[len - 4] == '.')
+ return !is_dir_sep(str[len - 5]);
+ }
+
+ return false;
+}
+#endif
+
+
+/// \brief Checks if src_name has given compressed_suffix
+///
+/// \param suffix Filename suffix to look for
+/// \param src_name Input filename
+/// \param src_len strlen(src_name)
+///
+/// \return If src_name has the suffix, src_len - strlen(suffix) is
+/// returned. It's always a positive integer. Otherwise zero
+/// is returned.
+static size_t
+test_suffix(const char *suffix, const char *src_name, size_t src_len)
+{
+ const size_t suffix_len = strlen(suffix);
+
+ // The filename must have at least one character in addition to
+ // the suffix. src_name may contain path to the filename, so we
+ // need to check for directory separator too.
+ if (src_len <= suffix_len
+ || is_dir_sep(src_name[src_len - suffix_len - 1]))
+ return 0;
+
+ if (strcmp(suffix, src_name + src_len - suffix_len) == 0)
+ return src_len - suffix_len;
+
+ return 0;
+}
+
+
+/// \brief Removes the filename suffix of the compressed file
+///
+/// \return Name of the uncompressed file, or NULL if file has unknown
+/// suffix.
+static char *
+uncompressed_name(const char *src_name, const size_t src_len)
+{
+ static const struct {
+ const char *compressed;
+ const char *uncompressed;
+ } suffixes[] = {
+ { ".xz", "" },
+ { ".txz", ".tar" }, // .txz abbreviation for .txt.gz is rare.
+ { ".lzma", "" },
+#ifdef __DJGPP__
+ { ".lzm", "" },
+#endif
+ { ".tlz", ".tar" }, // Both .tar.lzma and .tar.lz
+#ifdef HAVE_LZIP_DECODER
+ { ".lz", "" },
+#endif
+ };
+
+ const char *new_suffix = "";
+ size_t new_len = 0;
+
+ if (opt_format != FORMAT_RAW) {
+ for (size_t i = 0; i < ARRAY_SIZE(suffixes); ++i) {
+ new_len = test_suffix(suffixes[i].compressed,
+ src_name, src_len);
+ if (new_len != 0) {
+ new_suffix = suffixes[i].uncompressed;
+ break;
+ }
+ }
+
+#ifdef __DJGPP__
+ // Support also *.?- -> *.? and *.??- -> *.?? on DOS.
+ // This is done also when long filenames are available
+ // to keep it easy to decompress files created when
+ // long filename support wasn't available.
+ if (new_len == 0 && has_sfn_suffix(src_name, src_len)) {
+ new_suffix = "";
+ new_len = src_len - 1;
+ }
+#endif
+ }
+
+ if (new_len == 0 && custom_suffix != NULL)
+ new_len = test_suffix(custom_suffix, src_name, src_len);
+
+ if (new_len == 0) {
+ message_warning(_("%s: Filename has an unknown suffix, "
+ "skipping"), src_name);
+ return NULL;
+ }
+
+ const size_t new_suffix_len = strlen(new_suffix);
+ char *dest_name = xmalloc(new_len + new_suffix_len + 1);
+
+ memcpy(dest_name, src_name, new_len);
+ memcpy(dest_name + new_len, new_suffix, new_suffix_len);
+ dest_name[new_len + new_suffix_len] = '\0';
+
+ return dest_name;
+}
+
+
+/// This message is needed in multiple places in compressed_name(),
+/// so the message has been put into its own function.
+static void
+msg_suffix(const char *src_name, const char *suffix)
+{
+ message_warning(_("%s: File already has `%s' suffix, skipping"),
+ src_name, suffix);
+ return;
+}
+
+
+/// \brief Appends suffix to src_name
+///
+/// In contrast to uncompressed_name(), we check only suffixes that are valid
+/// for the specified file format.
+static char *
+compressed_name(const char *src_name, size_t src_len)
+{
+ // The order of these must match the order in args.h.
+ static const char *const all_suffixes[][4] = {
+ {
+ ".xz",
+ ".txz",
+ NULL
+ }, {
+ ".lzma",
+#ifdef __DJGPP__
+ ".lzm",
+#endif
+ ".tlz",
+ NULL
+#ifdef HAVE_LZIP_DECODER
+ // This is needed to keep the table indexing in sync with
+ // enum format_type from coder.h.
+ }, {
+/*
+ ".lz",
+*/
+ NULL
+#endif
+ }, {
+ // --format=raw requires specifying the suffix
+ // manually or using stdout.
+ NULL
+ }
+ };
+
+ // args.c ensures these.
+ assert(opt_format != FORMAT_AUTO);
+#ifdef HAVE_LZIP_DECODER
+ assert(opt_format != FORMAT_LZIP);
+#endif
+
+ const size_t format = opt_format - 1;
+ const char *const *suffixes = all_suffixes[format];
+
+ // Look for known filename suffixes and refuse to compress them.
+ for (size_t i = 0; suffixes[i] != NULL; ++i) {
+ if (test_suffix(suffixes[i], src_name, src_len) != 0) {
+ msg_suffix(src_name, suffixes[i]);
+ return NULL;
+ }
+ }
+
+#ifdef __DJGPP__
+ // Recognize also the special suffix that is used when long
+ // filename (LFN) support isn't available. This suffix is
+ // recognized on LFN systems too.
+ if (opt_format == FORMAT_XZ && has_sfn_suffix(src_name, src_len)) {
+ msg_suffix(src_name, "-");
+ return NULL;
+ }
+#endif
+
+ if (custom_suffix != NULL) {
+ if (test_suffix(custom_suffix, src_name, src_len) != 0) {
+ msg_suffix(src_name, custom_suffix);
+ return NULL;
+ }
+ }
+
+ const char *suffix = custom_suffix != NULL
+ ? custom_suffix : suffixes[0];
+ size_t suffix_len = strlen(suffix);
+
+#ifdef __DJGPP__
+ if (!_use_lfn(src_name)) {
+ // Long filename (LFN) support isn't available and we are
+ // limited to 8.3 short filenames (SFN).
+ //
+ // Look for suffix separator from the filename, and make sure
+ // that it is in the filename, not in a directory name.
+ const char *sufsep = strrchr(src_name, '.');
+ if (sufsep == NULL || sufsep[1] == '\0'
+ || has_dir_sep(sufsep)) {
+ // src_name has no filename extension.
+ //
+ // Examples:
+ // xz foo -> foo.xz
+ // xz -F lzma foo -> foo.lzm
+ // xz -S x foo -> foox
+ // xz -S x foo. -> foo.x
+ // xz -S x.y foo -> foox.y
+ // xz -S .x foo -> foo.x
+ // xz -S .x foo. -> foo.x
+ //
+ // Avoid double dots:
+ if (sufsep != NULL && sufsep[1] == '\0'
+ && suffix[0] == '.')
+ --src_len;
+
+ } else if (custom_suffix == NULL
+ && strcasecmp(sufsep, ".tar") == 0) {
+ // ".tar" is handled specially.
+ //
+ // Examples:
+ // xz foo.tar -> foo.txz
+ // xz -F lzma foo.tar -> foo.tlz
+ static const char *const tar_suffixes[] = {
+ ".txz", // .tar.xz
+ ".tlz", // .tar.lzma
+/*
+ ".tlz", // .tar.lz
+*/
+ };
+ suffix = tar_suffixes[format];
+ suffix_len = 4;
+ src_len -= 4;
+
+ } else {
+ if (custom_suffix == NULL && opt_format == FORMAT_XZ) {
+ // Instead of the .xz suffix, use a single
+ // character at the end of the filename
+ // extension. This is to minimize name
+ // conflicts when compressing multiple files
+ // with the same basename. E.g. foo.txt and
+ // foo.exe become foo.tx- and foo.ex-. Dash
+ // is rare as the last character of the
+ // filename extension, so it seems to be
+ // quite safe choice and it stands out better
+ // in directory listings than e.g. x. For
+ // comparison, gzip uses z.
+ suffix = "-";
+ suffix_len = 1;
+ }
+
+ if (suffix[0] == '.') {
+ // The first character of the suffix is a dot.
+ // Throw away the original filename extension
+ // and replace it with the new suffix.
+ //
+ // Examples:
+ // xz -F lzma foo.txt -> foo.lzm
+ // xz -S .x foo.txt -> foo.x
+ src_len = sufsep - src_name;
+
+ } else {
+ // The first character of the suffix is not
+ // a dot. Preserve the first 0-2 characters
+ // of the original filename extension.
+ //
+ // Examples:
+ // xz foo.txt -> foo.tx-
+ // xz -S x foo.c -> foo.cx
+ // xz -S ab foo.c -> foo.cab
+ // xz -S ab foo.txt -> foo.tab
+ // xz -S abc foo.txt -> foo.abc
+ //
+ // Truncate the suffix to three chars:
+ if (suffix_len > 3)
+ suffix_len = 3;
+
+ // If needed, overwrite 1-3 characters.
+ if (strlen(sufsep) > 4 - suffix_len)
+ src_len = sufsep - src_name
+ + 4 - suffix_len;
+ }
+ }
+ }
+#endif
+
+ char *dest_name = xmalloc(src_len + suffix_len + 1);
+
+ memcpy(dest_name, src_name, src_len);
+ memcpy(dest_name + src_len, suffix, suffix_len);
+ dest_name[src_len + suffix_len] = '\0';
+
+ return dest_name;
+}
+
+
+extern char *
+suffix_get_dest_name(const char *src_name)
+{
+ assert(src_name != NULL);
+
+ // Length of the name is needed in all cases to locate the end of
+ // the string to compare the suffix, so calculate the length here.
+ const size_t src_len = strlen(src_name);
+
+ return opt_mode == MODE_COMPRESS
+ ? compressed_name(src_name, src_len)
+ : uncompressed_name(src_name, src_len);
+}
+
+
+extern void
+suffix_set(const char *suffix)
+{
+ // Empty suffix and suffixes having a directory separator are
+ // rejected. Such suffixes would break things later.
+ if (suffix[0] == '\0' || has_dir_sep(suffix))
+ message_fatal(_("%s: Invalid filename suffix"), suffix);
+
+ // Replace the old custom_suffix (if any) with the new suffix.
+ free(custom_suffix);
+ custom_suffix = xstrdup(suffix);
+ return;
+}
+
+
+extern bool
+suffix_is_set(void)
+{
+ return custom_suffix != NULL;
+}
diff --git a/src/xz/suffix.h b/src/xz/suffix.h
new file mode 100644
index 0000000..135e905
--- /dev/null
+++ b/src/xz/suffix.h
@@ -0,0 +1,36 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file suffix.h
+/// \brief Checks filename suffix and creates the destination filename
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// \brief Get the name of the destination file
+///
+/// Depending on the global variable opt_mode, this tries to find a matching
+/// counterpart for src_name. If the name can be constructed, it is allocated
+/// and returned (caller must free it). On error, a message is printed and
+/// NULL is returned.
+extern char *suffix_get_dest_name(const char *src_name);
+
+
+/// \brief Set a custom filename suffix
+///
+/// This function calls xstrdup() for the given suffix, thus the caller
+/// doesn't need to keep the memory allocated. There can be only one custom
+/// suffix, thus if this is called multiple times, the old suffixes are freed
+/// and forgotten.
+extern void suffix_set(const char *suffix);
+
+
+/// \brief Check if a custom suffix has been set
+///
+/// Returns true if the internal tracking of the suffix string has been set
+/// and false if the string has not been set. This will keep the suffix
+/// string encapsulated instead of extern-ing the variable.
+extern bool suffix_is_set(void);
diff --git a/src/xz/util.c b/src/xz/util.c
new file mode 100644
index 0000000..6ab4c2d
--- /dev/null
+++ b/src/xz/util.c
@@ -0,0 +1,287 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file util.c
+/// \brief Miscellaneous utility functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "private.h"
+#include <stdarg.h>
+
+
+/// Buffers for uint64_to_str() and uint64_to_nicestr()
+static char bufs[4][128];
+
+
+// Thousand separator support in uint64_to_str() and uint64_to_nicestr():
+//
+// DJGPP 2.05 added support for thousands separators but it's broken
+// at least under WinXP with Finnish locale that uses a non-breaking space
+// as the thousands separator. Workaround by disabling thousands separators
+// for DJGPP builds.
+//
+// MSVC doesn't support thousand separators.
+#if defined(__DJGPP__) || defined(_MSC_VER)
+# define FORMAT_THOUSAND_SEP(prefix, suffix) prefix suffix
+# define check_thousand_sep(slot) do { } while (0)
+#else
+# define FORMAT_THOUSAND_SEP(prefix, suffix) ((thousand == WORKS) \
+ ? prefix "'" suffix \
+ : prefix suffix)
+
+static enum { UNKNOWN, WORKS, BROKEN } thousand = UNKNOWN;
+
+/// Check if thousands separator is supported. Run-time checking is easiest
+/// because it seems to be sometimes lacking even on a POSIXish system.
+/// Note that trying to use thousands separators when snprintf() doesn't
+/// support them results in undefined behavior. This just has happened to
+/// work well enough in practice.
+///
+/// This must be called before using the FORMAT_THOUSAND_SEP macro.
+static void
+check_thousand_sep(uint32_t slot)
+{
+ if (thousand == UNKNOWN) {
+ bufs[slot][0] = '\0';
+ snprintf(bufs[slot], sizeof(bufs[slot]), "%'u", 1U);
+ thousand = bufs[slot][0] == '1' ? WORKS : BROKEN;
+ }
+
+ return;
+}
+#endif
+
+
+extern void *
+xrealloc(void *ptr, size_t size)
+{
+ assert(size > 0);
+
+ // Save ptr so that we can free it if realloc fails.
+ // The point is that message_fatal ends up calling stdio functions
+ // which in some libc implementations might allocate memory from
+ // the heap. Freeing ptr improves the chances that there's free
+ // memory for stdio functions if they need it.
+ void *p = ptr;
+ ptr = realloc(ptr, size);
+
+ if (ptr == NULL) {
+ const int saved_errno = errno;
+ free(p);
+ message_fatal("%s", strerror(saved_errno));
+ }
+
+ return ptr;
+}
+
+
+extern char *
+xstrdup(const char *src)
+{
+ assert(src != NULL);
+ const size_t size = strlen(src) + 1;
+ char *dest = xmalloc(size);
+ return memcpy(dest, src, size);
+}
+
+
+extern uint64_t
+str_to_uint64(const char *name, const char *value, uint64_t min, uint64_t max)
+{
+ uint64_t result = 0;
+
+ // Skip blanks.
+ while (*value == ' ' || *value == '\t')
+ ++value;
+
+ // Accept special value "max". Supporting "min" doesn't seem useful.
+ if (strcmp(value, "max") == 0)
+ return max;
+
+ if (*value < '0' || *value > '9')
+ message_fatal(_("%s: Value is not a non-negative "
+ "decimal integer"), value);
+
+ do {
+ // Don't overflow.
+ if (result > UINT64_MAX / 10)
+ goto error;
+
+ result *= 10;
+
+ // Another overflow check
+ const uint32_t add = (uint32_t)(*value - '0');
+ if (UINT64_MAX - add < result)
+ goto error;
+
+ result += add;
+ ++value;
+ } while (*value >= '0' && *value <= '9');
+
+ if (*value != '\0') {
+ // Look for suffix. Originally this supported both base-2
+ // and base-10, but since there seems to be little need
+ // for base-10 in this program, treat everything as base-2
+ // and also be more relaxed about the case of the first
+ // letter of the suffix.
+ uint64_t multiplier = 0;
+ if (*value == 'k' || *value == 'K')
+ multiplier = UINT64_C(1) << 10;
+ else if (*value == 'm' || *value == 'M')
+ multiplier = UINT64_C(1) << 20;
+ else if (*value == 'g' || *value == 'G')
+ multiplier = UINT64_C(1) << 30;
+
+ ++value;
+
+ // Allow also e.g. Ki, KiB, and KB.
+ if (*value != '\0' && strcmp(value, "i") != 0
+ && strcmp(value, "iB") != 0
+ && strcmp(value, "B") != 0)
+ multiplier = 0;
+
+ if (multiplier == 0) {
+ message(V_ERROR, _("%s: Invalid multiplier suffix"),
+ value - 1);
+ message_fatal(_("Valid suffixes are `KiB' (2^10), "
+ "`MiB' (2^20), and `GiB' (2^30)."));
+ }
+
+ // Don't overflow here either.
+ if (result > UINT64_MAX / multiplier)
+ goto error;
+
+ result *= multiplier;
+ }
+
+ if (result < min || result > max)
+ goto error;
+
+ return result;
+
+error:
+ message_fatal(_("Value of the option `%s' must be in the range "
+ "[%" PRIu64 ", %" PRIu64 "]"),
+ name, min, max);
+}
+
+
+extern uint64_t
+round_up_to_mib(uint64_t n)
+{
+ return (n >> 20) + ((n & ((UINT32_C(1) << 20) - 1)) != 0);
+}
+
+
+extern const char *
+uint64_to_str(uint64_t value, uint32_t slot)
+{
+ assert(slot < ARRAY_SIZE(bufs));
+
+ check_thousand_sep(slot);
+
+ snprintf(bufs[slot], sizeof(bufs[slot]),
+ FORMAT_THOUSAND_SEP("%", PRIu64), value);
+
+ return bufs[slot];
+}
+
+
+extern const char *
+uint64_to_nicestr(uint64_t value, enum nicestr_unit unit_min,
+ enum nicestr_unit unit_max, bool always_also_bytes,
+ uint32_t slot)
+{
+ assert(unit_min <= unit_max);
+ assert(unit_max <= NICESTR_TIB);
+ assert(slot < ARRAY_SIZE(bufs));
+
+ check_thousand_sep(slot);
+
+ enum nicestr_unit unit = NICESTR_B;
+ char *pos = bufs[slot];
+ size_t left = sizeof(bufs[slot]);
+
+ if ((unit_min == NICESTR_B && value < 10000)
+ || unit_max == NICESTR_B) {
+ // The value is shown as bytes.
+ my_snprintf(&pos, &left, FORMAT_THOUSAND_SEP("%", "u"),
+ (unsigned int)value);
+ } else {
+ // Scale the value to a nicer unit. Unless unit_min and
+ // unit_max limit us, we will show at most five significant
+ // digits with one decimal place.
+ double d = (double)(value);
+ do {
+ d /= 1024.0;
+ ++unit;
+ } while (unit < unit_min || (d > 9999.9 && unit < unit_max));
+
+ my_snprintf(&pos, &left, FORMAT_THOUSAND_SEP("%", ".1f"), d);
+ }
+
+ static const char suffix[5][4] = { "B", "KiB", "MiB", "GiB", "TiB" };
+ my_snprintf(&pos, &left, " %s", suffix[unit]);
+
+ if (always_also_bytes && value >= 10000)
+ snprintf(pos, left, FORMAT_THOUSAND_SEP(" (%", PRIu64 " B)"),
+ value);
+
+ return bufs[slot];
+}
+
+
+extern void
+my_snprintf(char **pos, size_t *left, const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ const int len = vsnprintf(*pos, *left, fmt, ap);
+ va_end(ap);
+
+ // If an error occurred, we want the caller to think that the whole
+ // buffer was used. This way no more data will be written to the
+ // buffer. We don't need better error handling here, although it
+ // is possible that the result looks garbage on the terminal if
+ // e.g. an UTF-8 character gets split. That shouldn't (easily)
+ // happen though, because the buffers used have some extra room.
+ if (len < 0 || (size_t)(len) >= *left) {
+ *left = 0;
+ } else {
+ *pos += len;
+ *left -= (size_t)(len);
+ }
+
+ return;
+}
+
+
+extern bool
+is_tty_stdin(void)
+{
+ const bool ret = isatty(STDIN_FILENO);
+
+ if (ret)
+ message_error(_("Compressed data cannot be read from "
+ "a terminal"));
+
+ return ret;
+}
+
+
+extern bool
+is_tty_stdout(void)
+{
+ const bool ret = isatty(STDOUT_FILENO);
+
+ if (ret)
+ message_error(_("Compressed data cannot be written to "
+ "a terminal"));
+
+ return ret;
+}
diff --git a/src/xz/util.h b/src/xz/util.h
new file mode 100644
index 0000000..6d7e148
--- /dev/null
+++ b/src/xz/util.h
@@ -0,0 +1,119 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file util.h
+/// \brief Miscellaneous utility functions
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+/// \brief Safe malloc() that never returns NULL
+///
+/// \note xmalloc(), xrealloc(), and xstrdup() must not be used when
+/// there are files open for writing, that should be cleaned up
+/// before exiting.
+#define xmalloc(size) xrealloc(NULL, size)
+
+
+/// \brief Safe realloc() that never returns NULL
+lzma_attr_alloc_size(2)
+extern void *xrealloc(void *ptr, size_t size);
+
+
+/// \brief Safe strdup() that never returns NULL
+extern char *xstrdup(const char *src);
+
+
+/// \brief Fancy version of strtoull()
+///
+/// \param name Name of the option to show in case of an error
+/// \param value String containing the number to be parsed; may
+/// contain suffixes "k", "M", "G", "Ki", "Mi", or "Gi"
+/// \param min Minimum valid value
+/// \param max Maximum valid value
+///
+/// \return Parsed value that is in the range [min, max]. Does not return
+/// if an error occurs.
+///
+extern uint64_t str_to_uint64(const char *name, const char *value,
+ uint64_t min, uint64_t max);
+
+
+/// \brief Round an integer up to the next full MiB and convert to MiB
+///
+/// This is used when printing memory usage and limit.
+extern uint64_t round_up_to_mib(uint64_t n);
+
+
+/// \brief Convert uint64_t to a string
+///
+/// Convert the given value to a string with locale-specific thousand
+/// separators, if supported by the snprintf() implementation. The string
+/// is stored into an internal static buffer indicated by the slot argument.
+/// A pointer to the selected buffer is returned.
+///
+/// This function exists, because non-POSIX systems don't support thousand
+/// separator in format strings. Solving the problem in a simple way doesn't
+/// work, because it breaks gettext (specifically, the xgettext tool).
+extern const char *uint64_to_str(uint64_t value, uint32_t slot);
+
+
+enum nicestr_unit {
+ NICESTR_B,
+ NICESTR_KIB,
+ NICESTR_MIB,
+ NICESTR_GIB,
+ NICESTR_TIB,
+};
+
+
+/// \brief Convert uint64_t to a nice human readable string
+///
+/// This is like uint64_to_str() but uses B, KiB, MiB, GiB, or TiB suffix
+/// and optionally includes the exact size in parenthesis.
+///
+/// \param value Value to be printed
+/// \param unit_min Smallest unit to use. This and unit_max are used
+/// e.g. when showing the progress indicator to force
+/// the unit to MiB.
+/// \param unit_max Biggest unit to use. assert(unit_min <= unit_max).
+/// \param always_also_bytes
+/// Show also the exact byte value in parenthesis
+/// if the nicely formatted string uses bigger unit
+/// than bytes.
+/// \param slot Which static buffer to use to hold the string.
+/// This is shared with uint64_to_str().
+///
+/// \return Pointer to statically allocated buffer containing the string.
+///
+/// \note This uses double_to_str() internally so the static buffer
+/// in double_to_str() will be overwritten.
+///
+extern const char *uint64_to_nicestr(uint64_t value,
+ enum nicestr_unit unit_min, enum nicestr_unit unit_max,
+ bool always_also_bytes, uint32_t slot);
+
+
+/// \brief Wrapper for snprintf() to help constructing a string in pieces
+///
+/// A maximum of *left bytes is written starting from *pos. *pos and *left
+/// are updated accordingly.
+lzma_attribute((__format__(__printf__, 3, 4)))
+extern void my_snprintf(char **pos, size_t *left, const char *fmt, ...);
+
+
+/// \brief Test if stdin is a terminal
+///
+/// If stdin is a terminal, an error message is printed and exit status set
+/// to EXIT_ERROR.
+extern bool is_tty_stdin(void);
+
+
+/// \brief Test if stdout is a terminal
+///
+/// If stdout is a terminal, an error message is printed and exit status set
+/// to EXIT_ERROR.
+extern bool is_tty_stdout(void);
diff --git a/src/xz/xz.1 b/src/xz/xz.1
new file mode 100644
index 0000000..73ca6ef
--- /dev/null
+++ b/src/xz/xz.1
@@ -0,0 +1,3020 @@
+'\" t
+.\"
+.\" Authors: Lasse Collin
+.\" Jia Tan
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.TH XZ 1 "2023-07-17" "Tukaani" "XZ Utils"
+.
+.SH NAME
+xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files
+.
+.SH SYNOPSIS
+.B xz
+.RI [ option... ]
+.RI [ file... ]
+.
+.SH COMMAND ALIASES
+.B unxz
+is equivalent to
+.BR "xz \-\-decompress" .
+.br
+.B xzcat
+is equivalent to
+.BR "xz \-\-decompress \-\-stdout" .
+.br
+.B lzma
+is equivalent to
+.BR "xz \-\-format=lzma" .
+.br
+.B unlzma
+is equivalent to
+.BR "xz \-\-format=lzma \-\-decompress" .
+.br
+.B lzcat
+is equivalent to
+.BR "xz \-\-format=lzma \-\-decompress \-\-stdout" .
+.PP
+When writing scripts that need to decompress files,
+it is recommended to always use the name
+.B xz
+with appropriate arguments
+.RB ( "xz \-d"
+or
+.BR "xz \-dc" )
+instead of the names
+.B unxz
+and
+.BR xzcat .
+.
+.SH DESCRIPTION
+.B xz
+is a general-purpose data compression tool with
+command line syntax similar to
+.BR gzip (1)
+and
+.BR bzip2 (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 lzip
+is supported.
+.PP
+.B xz
+compresses or decompresses each
+.I file
+according to the selected operation mode.
+If no
+.I files
+are given or
+.I file
+is
+.BR \- ,
+.B xz
+reads from standard input and writes the processed data
+to standard output.
+.B xz
+will refuse (display an error and skip the
+.IR file )
+to write compressed data to standard output if it is a terminal.
+Similarly,
+.B xz
+will refuse to read compressed data
+from standard input if it is a terminal.
+.PP
+Unless
+.B \-\-stdout
+is specified,
+.I files
+other than
+.B \-
+are written to a new file whose name is derived from the source
+.I file
+name:
+.IP \(bu 3
+When compressing, the suffix of the target file format
+.RB ( .xz
+or
+.BR .lzma )
+is appended to the source filename to get the target filename.
+.IP \(bu 3
+When decompressing, the
+.BR .xz ,
+.BR .lzma ,
+or
+.B .lz
+suffix is removed from the filename to get the target filename.
+.B xz
+also recognizes the suffixes
+.B .txz
+and
+.BR .tlz ,
+and replaces them with the
+.B .tar
+suffix.
+.PP
+If the target file already exists, an error is displayed and the
+.I file
+is skipped.
+.PP
+Unless writing to standard output,
+.B xz
+will display a warning and skip the
+.I file
+if any of the following applies:
+.IP \(bu 3
+.I File
+is not a regular file.
+Symbolic links are not followed,
+and thus they are not considered to be regular files.
+.IP \(bu 3
+.I File
+has more than one hard link.
+.IP \(bu 3
+.I File
+has setuid, setgid, or sticky bit set.
+.IP \(bu 3
+The operation mode is set to compress and the
+.I file
+already has a suffix of the target file format
+.RB ( .xz
+or
+.B .txz
+when compressing to the
+.B .xz
+format, and
+.B .lzma
+or
+.B .tlz
+when compressing to the
+.B .lzma
+format).
+.IP \(bu 3
+The operation mode is set to decompress and the
+.I file
+doesn't have a suffix of any of the supported file formats
+.RB ( .xz ,
+.BR .txz ,
+.BR .lzma ,
+.BR .tlz ,
+or
+.BR .lz ).
+.PP
+After successfully compressing or decompressing the
+.IR file ,
+.B xz
+copies the owner, group, permissions, access time,
+and modification time from the source
+.I file
+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
+.IR file .
+.B xz
+doesn't support copying other metadata like access control lists
+or extended attributes yet.
+.PP
+Once the target file has been successfully closed, the source
+.I file
+is removed unless
+.B \-\-keep
+was specified.
+The source
+.I file
+is never removed if the output is written to standard output
+or if an error occurs.
+.PP
+Sending
+.B SIGINFO
+or
+.B SIGUSR1
+to the
+.B xz
+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.
+.
+.SS "Memory usage"
+The memory usage of
+.B xz
+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 xz \-9
+currently requires 65\ MiB of memory.
+Still, it is possible to have
+.B .xz
+files that require several gigabytes of memory to decompress.
+.PP
+Especially users of older systems may find
+the possibility of very large memory usage annoying.
+To prevent uncomfortable surprises,
+.B xz
+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
+.BR ulimit (1)
+to limit virtual memory tends to cripple
+.BR mmap (2)).
+.PP
+The memory usage limiter can be enabled with
+the command line option \fB\-\-memlimit=\fIlimit\fR.
+Often it is more convenient to enable the limiter
+by default by setting the environment variable
+.BR XZ_DEFAULTS ,
+for example,
+.BR XZ_DEFAULTS=\-\-memlimit=150MiB .
+It is possible to set the limits separately
+for compression and decompression by using
+.BI \-\-memlimit\-compress= limit
+and \fB\-\-memlimit\-decompress=\fIlimit\fR.
+Using these two options outside
+.B XZ_DEFAULTS
+is rarely useful because a single run of
+.B xz
+cannot do both compression and decompression and
+.BI \-\-memlimit= limit
+(or
+.B \-M
+.IR limit )
+is shorter to type on the command line.
+.PP
+If the specified memory usage limit is exceeded when decompressing,
+.B xz
+will display an error and decompressing the file will fail.
+If the limit is exceeded when compressing,
+.B xz
+will try to scale the settings down so that the limit
+is no longer exceeded (except when using
+.B \-\-format=raw
+or
+.BR \-\-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
+.BR "xz \-9" ,
+the settings will be scaled down only a little,
+not all the way down to
+.BR "xz \-8" .
+.
+.SS "Concatenation and padding with .xz files"
+It is possible to concatenate
+.B .xz
+files as is.
+.B xz
+will decompress such files as if they were a single
+.B .xz
+file.
+.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
+.B .xz
+file is stored on a medium that measures file sizes
+in 512-byte blocks.
+.PP
+Concatenation and padding are not allowed with
+.B .lzma
+files or raw streams.
+.
+.SH OPTIONS
+.
+.SS "Integer suffixes and special values"
+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.
+.TP
+.B KiB
+Multiply the integer by 1,024 (2^10).
+.BR Ki ,
+.BR k ,
+.BR kB ,
+.BR K ,
+and
+.B KB
+are accepted as synonyms for
+.BR KiB .
+.TP
+.B MiB
+Multiply the integer by 1,048,576 (2^20).
+.BR Mi ,
+.BR m ,
+.BR M ,
+and
+.B MB
+are accepted as synonyms for
+.BR MiB .
+.TP
+.B GiB
+Multiply the integer by 1,073,741,824 (2^30).
+.BR Gi ,
+.BR g ,
+.BR G ,
+and
+.B GB
+are accepted as synonyms for
+.BR GiB .
+.PP
+The special value
+.B max
+can be used to indicate the maximum integer value
+supported by the option.
+.
+.SS "Operation mode"
+If multiple operation mode options are given,
+the last one takes effect.
+.TP
+.BR \-z ", " \-\-compress
+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 unxz
+implies
+.BR \-\-decompress ).
+.TP
+.BR \-d ", " \-\-decompress ", " \-\-uncompress
+Decompress.
+.TP
+.BR \-t ", " \-\-test
+Test the integrity of compressed
+.IR files .
+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.
+.TP
+.BR \-l ", " \-\-list
+Print information about compressed
+.IR files .
+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.
+.IP ""
+The default listing shows basic information about
+.IR files ,
+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 "less\ \-S"
+may be convenient if the terminal isn't wide enough.
+.IP ""
+The exact output may vary between
+.B xz
+versions and different locales.
+For machine-readable output,
+.B \-\-robot \-\-list
+should be used.
+.
+.SS "Operation modifiers"
+.TP
+.BR \-k ", " \-\-keep
+Don't delete the input files.
+.IP ""
+Since
+.B xz
+5.2.6,
+this option also makes
+.B xz
+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
+.BR \-\-force .
+.TP
+.BR \-f ", " \-\-force
+This option has several effects:
+.RS
+.IP \(bu 3
+If the target file already exists,
+delete it before compressing or decompressing.
+.IP \(bu 3
+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.
+.IP \(bu 3
+When used with
+.B \-\-decompress
+.B \-\-stdout
+and
+.B xz
+cannot recognize the type of the source file,
+copy the source file as is to standard output.
+This allows
+.B xzcat
+.B \-\-force
+to be used like
+.BR cat (1)
+for files that have not been compressed with
+.BR xz .
+Note that in future,
+.B xz
+might support new compressed file formats, which may make
+.B xz
+decompress more types of files instead of copying them as is to
+standard output.
+.BI \-\-format= format
+can be used to restrict
+.B xz
+to decompress only a single file format.
+.RE
+.TP
+.BR \-c ", " \-\-stdout ", " \-\-to\-stdout
+Write the compressed or decompressed data to
+standard output instead of a file.
+This implies
+.BR \-\-keep .
+.TP
+.B \-\-single\-stream
+Decompress only the first
+.B .xz
+stream, and
+silently ignore possible remaining input data following the stream.
+Normally such trailing garbage makes
+.B xz
+display an error.
+.IP ""
+.B xz
+never decompresses more than one stream from
+.B .lzma
+files or raw streams, but this option still makes
+.B xz
+ignore the possible trailing data after the
+.B .lzma
+file or raw stream.
+.IP ""
+This option has no effect if the operation mode is not
+.B \-\-decompress
+or
+.BR \-\-test .
+.TP
+.B \-\-no\-sparse
+Disable creation of sparse files.
+By default, if decompressing into a regular file,
+.B xz
+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.
+.TP
+\fB\-S\fR \fI.suf\fR, \fB\-\-suffix=\fI.suf
+When compressing, use
+.I .suf
+as the suffix for the target file instead of
+.B .xz
+or
+.BR .lzma .
+If not writing to standard output and
+the source file already has the suffix
+.IR .suf ,
+a warning is displayed and the file is skipped.
+.IP ""
+When decompressing, recognize files with the suffix
+.I .suf
+in addition to files with the
+.BR .xz ,
+.BR .txz ,
+.BR .lzma ,
+.BR .tlz ,
+or
+.B .lz
+suffix.
+If the source file has the suffix
+.IR .suf ,
+the suffix is removed to get the target filename.
+.IP ""
+When compressing or decompressing raw streams
+.RB ( \-\-format=raw ),
+the suffix must always be specified unless
+writing to standard output,
+because there is no default suffix for raw streams.
+.TP
+\fB\-\-files\fR[\fB=\fIfile\fR]
+Read the filenames to process from
+.IR file ;
+if
+.I file
+is omitted, filenames are read from standard input.
+Filenames must be terminated with the newline character.
+A dash
+.RB ( \- )
+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
+.IR file .
+.TP
+\fB\-\-files0\fR[\fB=\fIfile\fR]
+This is identical to \fB\-\-files\fR[\fB=\fIfile\fR] except
+that each filename must be terminated with the null character.
+.
+.SS "Basic file format and compression options"
+.TP
+\fB\-F\fR \fIformat\fR, \fB\-\-format=\fIformat
+Specify the file
+.I format
+to compress or decompress:
+.RS
+.TP
+.B auto
+This is the default.
+When compressing,
+.B auto
+is equivalent to
+.BR xz .
+When decompressing,
+the format of the input file is automatically detected.
+Note that raw streams (created with
+.BR \-\-format=raw )
+cannot be auto-detected.
+.TP
+.B xz
+Compress to the
+.B .xz
+file format, or accept only
+.B .xz
+files when decompressing.
+.TP
+.BR lzma ", " alone
+Compress to the legacy
+.B .lzma
+file format, or accept only
+.B .lzma
+files when decompressing.
+The alternative name
+.B alone
+is provided for backwards compatibility with LZMA Utils.
+.TP
+.B lzip
+Accept only
+.B .lz
+files when decompressing.
+Compression is not supported.
+.IP ""
+The
+.B .lz
+format version 0 and the unextended version 1 are supported.
+Version 0 files were produced by
+.B lzip
+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 lzip
+1.18.
+.IP ""
+.B lzip
+1.4 and later create files in the format version 1.
+The sync flush marker extension to the format version 1 was added in
+.B lzip
+1.6.
+This extension is rarely used and isn't supported by
+.B xz
+(diagnosed as corrupt input).
+.TP
+.B raw
+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.
+.RE
+.TP
+\fB\-C\fR \fIcheck\fR, \fB\-\-check=\fIcheck
+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.
+.IP ""
+Supported
+.I check
+types:
+.RS
+.TP
+.B none
+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.
+.TP
+.B crc32
+Calculate CRC32 using the polynomial from IEEE-802.3 (Ethernet).
+.TP
+.B crc64
+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.
+.TP
+.B sha256
+Calculate SHA-256.
+This is somewhat slower than CRC32 and CRC64.
+.RE
+.IP ""
+Integrity of the
+.B .xz
+headers is always verified with CRC32.
+It is not possible to change or disable it.
+.TP
+.B \-\-ignore\-check
+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.
+.IP ""
+.B "Do not use this option unless you know what you are doing."
+Possible reasons to use this option:
+.RS
+.IP \(bu 3
+Trying to recover data from a corrupt .xz file.
+.IP \(bu 3
+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.
+.RE
+.TP
+.BR \-0 " ... " \-9
+Select a compression preset level.
+The default is
+.BR \-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.
+.IP ""
+The differences between the presets are more significant than with
+.BR gzip (1)
+and
+.BR bzip2 (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 "it's not a good idea to blindly use \-9 for everything"
+like it often is with
+.BR gzip (1)
+and
+.BR bzip2 (1).
+.RS
+.TP
+.BR "\-0" " ... " "\-3"
+These are somewhat fast presets.
+.B \-0
+is sometimes faster than
+.B "gzip \-9"
+while compressing much better.
+The higher ones often have speed comparable to
+.BR bzip2 (1)
+with comparable or better compression ratio,
+although the results
+depend a lot on the type of data being compressed.
+.TP
+.BR "\-4" " ... " "\-6"
+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.
+.RB ( \-5e
+or
+.B \-6e
+may be worth considering too.
+See
+.BR \-\-extreme .)
+.TP
+.B "\-7 ... \-9"
+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.
+.RE
+.IP ""
+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.
+.IP ""
+The following table summarises the features of the presets:
+.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 ""
+Column descriptions:
+.RS
+.IP \(bu 3
+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
+.BR \-7 " ... " \-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.
+.IP \(bu 3
+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
+.BR \-6 " ... " \-9 ,
+higher levels still tend to be a little slower.
+To get even slower and thus possibly better compression, see
+.BR \-\-extreme .
+.IP \(bu 3
+CompMem contains the compressor memory requirements
+in the single-threaded mode.
+It may vary slightly between
+.B xz
+versions.
+Memory requirements of some of the future multithreaded modes may
+be dramatically higher than that of the single-threaded mode.
+.IP \(bu 3
+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.
+.RE
+.TP
+.BR \-e ", " \-\-extreme
+Use a slower variant of the selected compression preset level
+.RB ( \-0 " ... " \-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
+.BR \-0 " ... " \-3 .
+.IP ""
+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
+.BR \-6e ,
+respectively.
+That way no two presets are identical.
+.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 ""
+For example, there are a total of four presets that use
+8\ MiB dictionary, whose order from the fastest to the slowest is
+.BR \-5 ,
+.BR \-6 ,
+.BR \-5e ,
+and
+.BR \-6e .
+.TP
+.B \-\-fast
+.PD 0
+.TP
+.B \-\-best
+.PD
+These are somewhat misleading aliases for
+.B \-0
+and
+.BR \-9 ,
+respectively.
+These are provided only for backwards compatibility
+with LZMA Utils.
+Avoid using these options.
+.TP
+.BI \-\-block\-size= size
+When compressing to the
+.B .xz
+format, split the input data into blocks of
+.I size
+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.
+.IP ""
+In multi-threaded mode about three times
+.I size
+bytes will be allocated in each thread for buffering input and output.
+The default
+.I size
+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 size
+less than the LZMA2 dictionary size is waste of RAM
+because then the LZMA2 dictionary buffer will never get fully used.
+The sizes of the blocks are stored in the block headers,
+which a future version of
+.B xz
+will use 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 a future version of
+.B xz
+won't be able decompress the files in multi-threaded mode.
+.TP
+.BI \-\-block\-list= sizes
+When compressing to the
+.B .xz
+format, start a new block after
+the given intervals of uncompressed data.
+.IP ""
+The uncompressed
+.I sizes
+of the blocks are specified as a comma-separated list.
+Omitting a size (two or more consecutive commas) is a shorthand
+to use the size of the previous block.
+.IP ""
+If the input file is bigger than the sum of
+.IR sizes ,
+the last value in
+.I sizes
+is repeated until the end of the file.
+A special value of
+.B 0
+may be used as the last value to indicate that
+the rest of the file should be encoded as a single block.
+.IP ""
+If one specifies
+.I sizes
+that exceed the encoder's block size
+(either the default value in threaded mode or
+the value specified with \fB\-\-block\-size=\fIsize\fR),
+the encoder will create additional blocks while
+keeping the boundaries specified in
+.IR sizes .
+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.
+.IP ""
+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.
+.TP
+.BI \-\-flush\-timeout= timeout
+When compressing, if more than
+.I timeout
+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 xz
+is used to compress data that is streamed over a network.
+Small
+.I timeout
+values make the data available at the receiving end
+with a small delay, but large
+.I timeout
+values give better compression ratio.
+.IP ""
+This feature is disabled by default.
+If this option is specified more than once, the last one takes effect.
+The special
+.I timeout
+value of
+.B 0
+can be used to explicitly disable this feature.
+.IP ""
+This feature is not available on non-POSIX systems.
+.IP ""
+.\" FIXME
+.B "This feature is still experimental."
+Currently
+.B xz
+is unsuitable for decompressing the stream in real time due to how
+.B xz
+does buffering.
+.TP
+.BI \-\-memlimit\-compress= limit
+Set a memory usage limit for compression.
+If this option is specified multiple times,
+the last one takes effect.
+.IP ""
+If the compression settings exceed the
+.IR limit ,
+.B xz
+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
+.IR limit ,
+and finally reducing the LZMA2 dictionary size.
+.IP ""
+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.
+.IP ""
+If the
+.I limit
+cannot be met even with the adjustments described above,
+an error is displayed and
+.B xz
+will exit with exit status 1.
+.IP ""
+The
+.I limit
+can be specified in multiple ways:
+.RS
+.IP \(bu 3
+The
+.I limit
+can be an absolute value in bytes.
+Using an integer suffix like
+.B MiB
+can be useful.
+Example:
+.B "\-\-memlimit\-compress=80MiB"
+.IP \(bu 3
+The
+.I limit
+can be specified as a percentage of total physical memory (RAM).
+This can be useful especially when setting the
+.B XZ_DEFAULTS
+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%"
+.IP \(bu 3
+The
+.I limit
+can be reset back to its default value by setting it to
+.BR 0 .
+This is currently equivalent to setting the
+.I limit
+to
+.B max
+(no memory usage limit).
+.RE
+.IP ""
+For 32-bit
+.B xz
+there is a special case: if the
+.I limit
+would be over
+.BR "4020\ MiB" ,
+the
+.I limit
+is set to
+.BR "4020\ MiB" .
+On MIPS32
+.B "2000\ MiB"
+is used instead.
+(The values
+.B 0
+and
+.B max
+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 ""
+See also the section
+.BR "Memory usage" .
+.TP
+.BI \-\-memlimit\-decompress= limit
+Set a memory usage limit for decompression.
+This also affects the
+.B \-\-list
+mode.
+If the operation is not possible without exceeding the
+.IR limit ,
+.B xz
+will display an error and decompressing the file will fail.
+See
+.BI \-\-memlimit\-compress= limit
+for possible ways to specify the
+.IR limit .
+.TP
+.BI \-\-memlimit\-mt\-decompress= limit
+Set a memory usage limit for multi-threaded decompression.
+This can only affect the number of threads;
+this will never make
+.B xz
+refuse to decompress a file.
+If
+.I limit
+is too low to allow any multi-threading, the
+.I limit
+is ignored and
+.B xz
+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 limit
+for multi-threading will never be higher than the limit set with
+.BR \-\-memlimit\-decompress .
+.IP ""
+In contrast to the other memory usage limit options,
+.BI \-\-memlimit\-mt\-decompress= limit
+has a system-specific default
+.IR limit .
+.B "xz \-\-info\-memory"
+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
+.I limit
+is too low on your system,
+feel free to increase the
+.I limit
+but never set it to a value larger than the amount of usable RAM
+as with appropriate input files
+.B xz
+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
+.BI \-\-memlimit\-compress= limit
+for possible ways to specify the
+.IR limit .
+Setting
+.I limit
+to
+.B 0
+resets the
+.I limit
+to the default system-specific value.
+.TP
+\fB\-M\fR \fIlimit\fR, \fB\-\-memlimit=\fIlimit\fR, \fB\-\-memory=\fIlimit
+This is equivalent to specifying
+.BI \-\-memlimit\-compress= limit
+.BI \-\-memlimit-decompress= limit
+\fB\-\-memlimit\-mt\-decompress=\fIlimit\fR.
+.TP
+.B \-\-no\-adjust
+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 xz
+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
+.RB ( \-\-format=raw ).
+.TP
+\fB\-T\fR \fIthreads\fR, \fB\-\-threads=\fIthreads
+Specify the number of worker threads to use.
+Setting
+.I threads
+to a special value
+.B 0
+makes
+.B xz
+use up to as many threads as the processor(s) on the system support.
+The actual number of threads can be fewer than
+.I threads
+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
+.I threads
+to
+.B 1
+will use the single-threaded mode.
+Setting
+.I threads
+to any other value, including
+.BR 0 ,
+will use the multi-threaded compressor
+even if the system supports only one hardware thread.
+.RB ( xz
+5.2.x
+used single-threaded mode in this situation.)
+.IP ""
+To use multi-threaded mode with only one thread, set
+.I threads
+to
+.BR +1 .
+The
+.B +
+prefix has no effect with values other than
+.BR 1 .
+A memory usage limit can still make
+.B xz
+switch to single-threaded mode unless
+.B \-\-no\-adjust
+is used.
+Support for the
+.B +
+prefix was added in
+.B xz
+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
+.B xz
+from compressing or decompressing.
+This default soft limit will not make
+.B xz
+switch from multi-threaded mode to single-threaded mode.
+The active limits can be seen with
+.BR "xz \-\-info\-memory" .
+.IP ""
+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
+.BI \-\-block\-size= size
+option.
+.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
+.BI \-\-block\-size= size
+has been used.
+.
+.SS "Custom compressor filter chains"
+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
+.RB ( \-0
+\&...\&
+.B \-9
+and
+.BR \-\-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.
+.PP
+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.
+.PP
+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.
+.PP
+A custom filter chain is specified by using one or more
+filter options in the order they are wanted in the filter chain.
+That is, the order of filter options is significant!
+When decoding raw streams
+.RB ( \-\-format=raw ),
+the filter chain is specified in the same order as
+it was specified when compressing.
+.PP
+Filters take filter-specific
+.I options
+as a comma-separated list.
+Extra commas in
+.I options
+are ignored.
+Every option has a default value, so you need to
+specify only those you want to change.
+.PP
+To see the whole filter chain and
+.IR options ,
+use
+.B "xz \-vv"
+(that is, use
+.B \-\-verbose
+twice).
+This works also for viewing the filter chain options used by presets.
+.TP
+\fB\-\-lzma1\fR[\fB=\fIoptions\fR]
+.PD 0
+.TP
+\fB\-\-lzma2\fR[\fB=\fIoptions\fR]
+.PD
+Add LZMA1 or LZMA2 filter to the filter chain.
+These filters can be used only as the last filter in the chain.
+.IP ""
+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.
+.IP ""
+LZMA1 and LZMA2 share the same set of
+.IR options :
+.RS
+.TP
+.BI preset= preset
+Reset all LZMA1 or LZMA2
+.I options
+to
+.IR preset .
+.I Preset
+consist of an integer, which may be followed by single-letter
+preset modifiers.
+The integer can be from
+.B 0
+to
+.BR 9 ,
+matching the command line options
+.B \-0
+\&...\&
+.BR \-9 .
+The only supported modifier is currently
+.BR e ,
+which matches
+.BR \-\-extreme .
+If no
+.B preset
+is specified, the default values of LZMA1 or LZMA2
+.I options
+are taken from the preset
+.BR 6 .
+.TP
+.BI dict= size
+Dictionary (history buffer)
+.I size
+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 size
+usually improves compression ratio, but
+a dictionary bigger than the uncompressed file is waste of memory.
+.IP ""
+Typical dictionary
+.I size
+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.
+.IP ""
+Dictionary
+.I size
+and match finder
+.RI ( mf )
+together determine the memory usage of the LZMA1 or LZMA2 encoder.
+The same (or bigger) dictionary
+.I size
+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 size
+either as
+.RI "2^" n
+or
+.RI "2^" n " + 2^(" n "\-1),"
+so these
+.I sizes
+are somewhat preferred for compression.
+Other
+.I sizes
+will get rounded up when stored in the
+.B .xz
+headers.
+.TP
+.BI lc= lc
+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 lc
+and
+.I lp
+must not exceed 4.
+.IP ""
+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.
+.IP ""
+The literal coding makes an assumption that the highest
+.I lc
+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 lc
+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
+.BR lc=4 .
+Sometimes it helps a little, and
+sometimes it makes compression worse.
+If it makes it worse, test
+.B lc=2
+too.
+.TP
+.BI lp= lp
+Specify the number of literal position bits.
+The minimum is 0 and the maximum is 4; the default is 0.
+.IP ""
+.I Lp
+affects what kind of alignment in the uncompressed data is
+assumed when encoding literals.
+See
+.I pb
+below for more information about alignment.
+.TP
+.BI pb= pb
+Specify the number of position bits.
+The minimum is 0 and the maximum is 4; the default is 2.
+.IP ""
+.I Pb
+affects what kind of alignment in the uncompressed data is
+assumed in general.
+The default means four-byte alignment
+.RI (2^ pb =2^2=4),
+which is often a good choice when there's no better guess.
+.IP ""
+When the alignment is known, setting
+.I pb
+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 pb=0
+can improve compression slightly.
+For UTF-16 text,
+.B pb=1
+is a good choice.
+If the alignment is an odd number like 3 bytes,
+.B pb=0
+might be the best choice.
+.IP ""
+Even though the assumed alignment can be adjusted with
+.I pb
+and
+.IR lp ,
+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.
+.TP
+.BI mf= mf
+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
+.IR preset :
+0 uses
+.BR hc3 ,
+1\(en3
+use
+.BR hc4 ,
+and the rest use
+.BR bt4 .
+.IP ""
+The following match finders are supported.
+The memory usage formulas below are rough approximations,
+which are closest to the reality when
+.I dict
+is a power of two.
+.RS
+.TP
+.B hc3
+Hash Chain with 2- and 3-byte hashing
+.br
+Minimum value for
+.IR nice :
+3
+.br
+Memory usage:
+.br
+.I dict
+* 7.5 (if
+.I dict
+<= 16 MiB);
+.br
+.I dict
+* 5.5 + 64 MiB (if
+.I dict
+> 16 MiB)
+.TP
+.B hc4
+Hash Chain with 2-, 3-, and 4-byte hashing
+.br
+Minimum value for
+.IR nice :
+4
+.br
+Memory usage:
+.br
+.I dict
+* 7.5 (if
+.I dict
+<= 32 MiB);
+.br
+.I dict
+* 6.5 (if
+.I dict
+> 32 MiB)
+.TP
+.B bt2
+Binary Tree with 2-byte hashing
+.br
+Minimum value for
+.IR nice :
+2
+.br
+Memory usage:
+.I dict
+* 9.5
+.TP
+.B bt3
+Binary Tree with 2- and 3-byte hashing
+.br
+Minimum value for
+.IR nice :
+3
+.br
+Memory usage:
+.br
+.I dict
+* 11.5 (if
+.I dict
+<= 16 MiB);
+.br
+.I dict
+* 9.5 + 64 MiB (if
+.I dict
+> 16 MiB)
+.TP
+.B bt4
+Binary Tree with 2-, 3-, and 4-byte hashing
+.br
+Minimum value for
+.IR nice :
+4
+.br
+Memory usage:
+.br
+.I dict
+* 11.5 (if
+.I dict
+<= 32 MiB);
+.br
+.I dict
+* 10.5 (if
+.I dict
+> 32 MiB)
+.RE
+.TP
+.BI mode= mode
+Compression
+.I mode
+specifies the method to analyze
+the data produced by the match finder.
+Supported
+.I modes
+are
+.B fast
+and
+.BR normal .
+The default is
+.B fast
+for
+.I presets
+0\(en3 and
+.B normal
+for
+.I presets
+4\(en9.
+.IP ""
+Usually
+.B fast
+is used with Hash Chain match finders and
+.B normal
+with Binary Tree match finders.
+This is also what the
+.I presets
+do.
+.TP
+.BI nice= nice
+Specify what is considered to be a nice length for a match.
+Once a match of at least
+.I nice
+bytes is found, the algorithm stops
+looking for possibly better matches.
+.IP ""
+.I Nice
+can be 2\(en273 bytes.
+Higher values tend to give better compression ratio
+at the expense of speed.
+The default depends on the
+.IR preset .
+.TP
+.BI depth= depth
+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 depth
+from
+.I mf
+and
+.IR nice .
+.IP ""
+Reasonable
+.I depth
+for Hash Chains is 4\(en100 and 16\(en1000 for Binary Trees.
+Using very high values for
+.I depth
+can make the encoder extremely slow with some files.
+Avoid setting the
+.I depth
+over 1000 unless you are prepared to interrupt
+the compression in case it is taking far too long.
+.RE
+.IP ""
+When decoding raw streams
+.RB ( \-\-format=raw ),
+LZMA2 needs only the dictionary
+.IR size .
+LZMA1 needs also
+.IR lc ,
+.IR lp ,
+and
+.IR pb .
+.TP
+\fB\-\-x86\fR[\fB=\fIoptions\fR]
+.PD 0
+.TP
+\fB\-\-arm\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-armthumb\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-arm64\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-powerpc\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-ia64\fR[\fB=\fIoptions\fR]
+.TP
+\fB\-\-sparc\fR[\fB=\fIoptions\fR]
+.PD
+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.
+.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
+.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.
+.IP ""
+These BCJ filters have known problems related to
+the compression ratio:
+.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.
+Filter;Alignment;Notes
+x86;1;32-bit or 64-bit x86
+ARM;4;
+ARM-Thumb;2;
+ARM64;4;4096-byte alignment is best
+PowerPC;4;Big endian only
+IA-64;16;Itanium
+SPARC;4;
+.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.
+For example, with the IA-64 filter, it's good to set
+.B pb=4
+or even
+.B pb=4,lp=4,lc=0
+with LZMA2 (2^4=16).
+The x86 filter is an exception;
+it's usually good to stick to LZMA2's default
+four-byte alignment when compressing x86 executables.
+.IP ""
+All BCJ filters support the same
+.IR options :
+.RS
+.TP
+.BI start= offset
+Specify the start
+.I offset
+that is used when converting between relative
+and absolute addresses.
+The
+.I offset
+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 offset
+is almost never useful.
+.RE
+.TP
+\fB\-\-delta\fR[\fB=\fIoptions\fR]
+Add the Delta filter to the filter chain.
+The Delta filter can be only used as a non-last filter
+in the filter chain.
+.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
+.BR flac (1).
+.IP ""
+Supported
+.IR options :
+.RS
+.TP
+.BI dist= distance
+Specify the
+.I distance
+of the delta calculation in bytes.
+.I distance
+must be 1\(en256.
+The default is 1.
+.IP ""
+For example, with
+.B dist=2
+and eight-byte input A1 B1 A2 B3 A3 B5 A4 B7, the output will be
+A1 B1 01 02 01 02 01 02.
+.RE
+.
+.SS "Other options"
+.TP
+.BR \-q ", " \-\-quiet
+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.
+.TP
+.BR \-v ", " \-\-verbose
+Be verbose.
+If standard error is connected to a terminal,
+.B xz
+will display a progress indicator.
+Specifying
+.B \-\-verbose
+twice will give even more verbose output.
+.IP ""
+The progress indicator shows the following information:
+.RS
+.IP \(bu 3
+Completion percentage is shown
+if the size of the input file is known.
+That is, the percentage cannot be shown in pipes.
+.IP \(bu 3
+Amount of compressed data produced (compressing)
+or consumed (decompressing).
+.IP \(bu 3
+Amount of uncompressed data consumed (compressing)
+or produced (decompressing).
+.IP \(bu 3
+Compression ratio, which is calculated by dividing
+the amount of compressed data processed so far by
+the amount of uncompressed data processed so far.
+.IP \(bu 3
+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 xz
+started processing the file.
+.IP \(bu 3
+Elapsed time in the format M:SS or 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
+.B xz
+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,
+.B \-\-verbose
+will make
+.B xz
+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
+.BR \-Q ", " \-\-no\-warn
+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.
+.TP
+.B \-\-robot
+Print messages in a machine-parsable format.
+This is intended to ease writing frontends that want to use
+.B xz
+instead of liblzma, which may be the case with various scripts.
+The output with this option enabled is meant to be stable across
+.B xz
+releases.
+See the section
+.B "ROBOT MODE"
+for details.
+.TP
+.B \-\-info\-memory
+Display, in human-readable format, how much physical memory (RAM)
+and how many processor threads
+.B xz
+thinks the system has and the memory usage limits for compression
+and decompression, and exit successfully.
+.TP
+.BR \-h ", " \-\-help
+Display a help message describing the most commonly used options,
+and exit successfully.
+.TP
+.BR \-H ", " \-\-long\-help
+Display a help message describing all features of
+.BR xz ,
+and exit successfully
+.TP
+.BR \-V ", " \-\-version
+Display the version number of
+.B xz
+and liblzma in human readable format.
+To get machine-parsable output, specify
+.B \-\-robot
+before
+.BR \-\-version .
+.
+.SH "ROBOT MODE"
+The robot mode is activated with the
+.B \-\-robot
+option.
+It makes the output of
+.B xz
+easier to parse by other programs.
+Currently
+.B \-\-robot
+is supported only together with
+.BR \-\-version ,
+.BR \-\-info\-memory ,
+and
+.BR \-\-list .
+It will be supported for compression and
+decompression in the future.
+.
+.SS Version
+.B "xz \-\-robot \-\-version"
+prints the version number of
+.B xz
+and liblzma in the following format:
+.PP
+.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 .
+.
+.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 "List mode"
+.B "xz \-\-robot \-\-list"
+uses tab-separated output.
+The first column of every line has a string
+that indicates the type of the information found on that line:
+.TP
+.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:
+.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.
+.
+.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
+.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.
+.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.
+Excluding shell initialization scripts
+and similar special cases, scripts must 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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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 CW
+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: <https://tukaani.org/xz/>
+.br
+XZ Embedded: <https://tukaani.org/xz/embedded.html>
+.br
+LZMA SDK: <https://7-zip.org/sdk.html>
diff --git a/src/xz/xz_w32res.rc b/src/xz/xz_w32res.rc
new file mode 100644
index 0000000..bad3020
--- /dev/null
+++ b/src/xz/xz_w32res.rc
@@ -0,0 +1,12 @@
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#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/src/xzdec/Makefile.am b/src/xzdec/Makefile.am
new file mode 100644
index 0000000..90f1e92
--- /dev/null
+++ b/src/xzdec/Makefile.am
@@ -0,0 +1,111 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+# 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_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 \
+ -I$(top_builddir)/lib
+xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la
+
+if COND_GNULIB
+xzdec_LDADD += $(top_builddir)/lib/libgnu.a
+endif
+
+xzdec_LDADD += $(LTLIBINTL)
+
+
+lzmadec_SOURCES = \
+ xzdec.c \
+ ../common/tuklib_progname.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/src/xzdec/Makefile.in b/src/xzdec/Makefile.in
new file mode 100644
index 0000000..b05cff1
--- /dev/null
+++ b/src/xzdec/Makefile.in
@@ -0,0 +1,969 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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 = $(top_builddir)/lib/libgnu.a
+@COND_W32_TRUE@am__append_3 = lzmadec_w32res.rc
+bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
+@COND_XZDEC_TRUE@am__append_4 = xzdec
+@COND_LZMADEC_TRUE@am__append_5 = 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_6 = lzmadec
+subdir = src/xzdec
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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_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_exit.$(OBJEXT) $(am__objects_1)
+lzmadec_OBJECTS = $(am_lzmadec_OBJECTS)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_2) $(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_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_exit.$(OBJEXT) \
+ $(am__objects_2)
+xzdec_OBJECTS = $(am_xzdec_OBJECTS)
+xzdec_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
+ $(am__append_2) $(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_progname.Po \
+ ./$(DEPDIR)/lzmadec-xzdec.Po ./$(DEPDIR)/xzdec-tuklib_exit.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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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_exit.c $(am__append_1)
+xzdec_CPPFLAGS = \
+ -DTUKLIB_GETTEXT=0 \
+ -I$(top_srcdir)/src/common \
+ -I$(top_srcdir)/src/liblzma/api \
+ -I$(top_builddir)/lib
+
+xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la $(am__append_2) \
+ $(LTLIBINTL)
+lzmadec_SOURCES = xzdec.c ../common/tuklib_progname.c \
+ ../common/tuklib_exit.c $(am__append_3)
+lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC
+lzmadec_LDFLAGS = $(xzdec_LDFLAGS)
+lzmadec_LDADD = $(xzdec_LDADD)
+lzmadecmanlink = $(am__append_6)
+@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)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+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_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_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)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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_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_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:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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_progname.Po
+ -rm -f ./$(DEPDIR)/lzmadec-xzdec.Po
+ -rm -f ./$(DEPDIR)/xzdec-tuklib_exit.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_progname.Po
+ -rm -f ./$(DEPDIR)/lzmadec-xzdec.Po
+ -rm -f ./$(DEPDIR)/xzdec-tuklib_exit.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:
diff --git a/src/xzdec/lzmadec_w32res.rc b/src/xzdec/lzmadec_w32res.rc
new file mode 100644
index 0000000..b85962d
--- /dev/null
+++ b/src/xzdec/lzmadec_w32res.rc
@@ -0,0 +1,12 @@
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#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/src/xzdec/xzdec.1 b/src/xzdec/xzdec.1
new file mode 100644
index 0000000..78bc9b4
--- /dev/null
+++ b/src/xzdec/xzdec.1
@@ -0,0 +1,146 @@
+.\"
+.\" Author: Lasse Collin
+.\"
+.\" This file has been put into the public domain.
+.\" You can do whatever you want with this file.
+.\"
+.TH XZDEC 1 "2017-04-19" "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: <https://tukaani.org/xz/embedded.html>
diff --git a/src/xzdec/xzdec.c b/src/xzdec/xzdec.c
new file mode 100644
index 0000000..556c548
--- /dev/null
+++ b/src/xzdec/xzdec.c
@@ -0,0 +1,326 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file xzdec.c
+/// \brief Simple single-threaded tool to uncompress .xz or .lzma files
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include "lzma.h"
+
+#include <stdarg.h>
+#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "getopt.h"
+#include "tuklib_progname.h"
+#include "tuklib_exit.h"
+
+#ifdef TUKLIB_DOSLIKE
+# include <fcntl.h>
+# include <io.h>
+#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[] = "cdkM:hqQV";
+ 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",
+ 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.
+ 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", filename, msg);
+ exit(EXIT_FAILURE);
+ }
+ }
+}
+
+
+int
+main(int argc, char **argv)
+{
+ // Initialize progname which we will be used in error messages.
+ tuklib_progname_init(argv);
+
+ // 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.
+ uncompress(&strm, stdin, "(stdin)");
+ } else {
+ // Loop through the filenames given on the command line.
+ do {
+ // "-" indicates stdin.
+ if (strcmp(argv[optind], "-") == 0) {
+ uncompress(&strm, stdin, "(stdin)");
+ } else {
+ FILE *file = fopen(argv[optind], "rb");
+ if (file == NULL) {
+ my_errorf("%s: %s", argv[optind],
+ strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+
+ uncompress(&strm, file, argv[optind]);
+ fclose(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/src/xzdec/xzdec_w32res.rc b/src/xzdec/xzdec_w32res.rc
new file mode 100644
index 0000000..0e26a22
--- /dev/null
+++ b/src/xzdec/xzdec_w32res.rc
@@ -0,0 +1,12 @@
+/*
+ * Author: Lasse Collin
+ *
+ * This file has been put into the public domain.
+ * You can do whatever you want with this file.
+ */
+
+#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/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..ebc33a7
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,76 @@
+##
+## Author: Lasse Collin
+##
+## This file has been put into the public domain.
+## You can do whatever you want with this file.
+##
+
+EXTRA_DIST = \
+ files \
+ ossfuzz \
+ tuktest.h \
+ tests.h \
+ test_files.sh \
+ test_compress.sh \
+ test_compress_prepared_bcj_sparc \
+ test_compress_prepared_bcj_x86 \
+ test_compress_generated_abc \
+ test_compress_generated_random \
+ test_compress_generated_text \
+ test_scripts.sh \
+ bcj_test.c \
+ compress_prepared_bcj_sparc \
+ compress_prepared_bcj_x86 \
+ 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)
+
+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_compress_prepared_bcj_sparc \
+ test_compress_prepared_bcj_x86 \
+ test_compress_generated_abc \
+ test_compress_generated_random \
+ test_compress_generated_text
+
+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/tests/Makefile.in b/tests/Makefile.in
new file mode 100644
index 0000000..46cf0f0
--- /dev/null
+++ b/tests/Makefile.in
@@ -0,0 +1,1349 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 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))
+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@
+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)
+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_compress_prepared_bcj_sparc \
+ test_compress_prepared_bcj_x86 test_compress_generated_abc \
+ test_compress_generated_random test_compress_generated_text \
+ $(am__append_1)
+@COND_SCRIPTS_TRUE@am__append_1 = test_scripts.sh
+subdir = tests
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
+ $(top_srcdir)/m4/ax_pthread.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 =
+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_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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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_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_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_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_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 -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+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" \
+ --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 '$(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@
+CAPSICUM_LIB = @CAPSICUM_LIB@
+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@
+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__tar = @am__tar@
+am__untar = @am__untar@
+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@
+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 \
+ tuktest.h \
+ tests.h \
+ test_files.sh \
+ test_compress.sh \
+ test_compress_prepared_bcj_sparc \
+ test_compress_prepared_bcj_x86 \
+ test_compress_generated_abc \
+ test_compress_generated_random \
+ test_compress_generated_text \
+ test_scripts.sh \
+ bcj_test.c \
+ compress_prepared_bcj_sparc \
+ compress_prepared_bcj_x86 \
+ 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)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .log .o .obj .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:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+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_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_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)
+ @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+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"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ 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)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ fi; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+
+check-TESTS: $(check_PROGRAMS)
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || 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_compress_prepared_bcj_sparc.log: test_compress_prepared_bcj_sparc
+ @p='test_compress_prepared_bcj_sparc'; \
+ b='test_compress_prepared_bcj_sparc'; \
+ $(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_prepared_bcj_x86.log: test_compress_prepared_bcj_x86
+ @p='test_compress_prepared_bcj_x86'; \
+ b='test_compress_prepared_bcj_x86'; \
+ $(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_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:
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || 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_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_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
+
+
+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:
diff --git a/tests/bcj_test.c b/tests/bcj_test.c
new file mode 100644
index 0000000..05de38a
--- /dev/null
+++ b/tests/bcj_test.c
@@ -0,0 +1,65 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file bcj_test.c
+/// \brief Source code of compress_prepared_bcj_*
+///
+/// This is a simple program that should make the compiler to generate
+/// PC-relative branches, jumps, and calls. The compiled files can then
+/// be used to test the branch conversion filters. Note that this program
+/// itself does nothing useful.
+///
+/// Compiling: gcc -std=c99 -fPIC -c bcj_test.c
+/// Don't optimize or strip.
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+extern int jump(int a, int b);
+
+
+extern int
+call(int a, int b)
+{
+ if (a < b)
+ a = jump(a, b);
+
+ return a;
+}
+
+
+extern int
+jump(int a, int b)
+{
+ // The loop generates conditional jump backwards.
+ while (1) {
+ if (a < b) {
+ a *= 2;
+ a += 3 * b;
+ break;
+ } else {
+ // Put enough code here to prevent JMP SHORT on x86.
+ a += b;
+ a /= 2;
+ b += b % 5;
+ a -= b / 3;
+ b = 2 * b + a - 1;
+ a *= b + a + 1;
+ b += a - 1;
+ a += b * 2 - a / 5;
+ }
+ }
+
+ return a;
+}
+
+
+int
+main(int argc, char **argv)
+{
+ int a = call(argc, argc + 1);
+ return a == 0;
+}
diff --git a/tests/compress_prepared_bcj_sparc b/tests/compress_prepared_bcj_sparc
new file mode 100644
index 0000000..86ea7dd
--- /dev/null
+++ b/tests/compress_prepared_bcj_sparc
Binary files differ
diff --git a/tests/compress_prepared_bcj_x86 b/tests/compress_prepared_bcj_x86
new file mode 100644
index 0000000..bcc546f
--- /dev/null
+++ b/tests/compress_prepared_bcj_x86
Binary files differ
diff --git a/tests/create_compress_files.c b/tests/create_compress_files.c
new file mode 100644
index 0000000..76aa3e3
--- /dev/null
+++ b/tests/create_compress_files.c
@@ -0,0 +1,163 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include "sysdefs.h"
+#include <stdio.h>
+
+
+// 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/tests/files/README b/tests/files/README
new file mode 100644
index 0000000..119cac4
--- /dev/null
+++ b/tests/files/README
@@ -0,0 +1,409 @@
+
+.xz and .lzma 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 have been put into the public domain.
+
+
+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-x86-lzma2.xz uses the x86 filter (BCJ) and LZMA2. The
+ uncompressed file is compress_prepared_bcj_x86 found from the tests
+ directory.
+
+ good-1-sparc-lzma2.xz uses the SPARC filter and LZMA2. The
+ uncompressed file is compress_prepared_bcj_sparc found from the tests
+ directory.
+
+ 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.
+
+ 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.
+
+ 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/tests/files/bad-0-backward_size.xz b/tests/files/bad-0-backward_size.xz
new file mode 100644
index 0000000..2b46fa9
--- /dev/null
+++ b/tests/files/bad-0-backward_size.xz
Binary files differ
diff --git a/tests/files/bad-0-empty-truncated.xz b/tests/files/bad-0-empty-truncated.xz
new file mode 100644
index 0000000..f879af8
--- /dev/null
+++ b/tests/files/bad-0-empty-truncated.xz
Binary files differ
diff --git a/tests/files/bad-0-footer_magic.xz b/tests/files/bad-0-footer_magic.xz
new file mode 100644
index 0000000..5d9e389
--- /dev/null
+++ b/tests/files/bad-0-footer_magic.xz
Binary files differ
diff --git a/tests/files/bad-0-header_magic.xz b/tests/files/bad-0-header_magic.xz
new file mode 100644
index 0000000..5984a45
--- /dev/null
+++ b/tests/files/bad-0-header_magic.xz
Binary files differ
diff --git a/tests/files/bad-0-nonempty_index.xz b/tests/files/bad-0-nonempty_index.xz
new file mode 100644
index 0000000..ed6e81f
--- /dev/null
+++ b/tests/files/bad-0-nonempty_index.xz
Binary files differ
diff --git a/tests/files/bad-0cat-alone.xz b/tests/files/bad-0cat-alone.xz
new file mode 100644
index 0000000..a915a3a
--- /dev/null
+++ b/tests/files/bad-0cat-alone.xz
Binary files differ
diff --git a/tests/files/bad-0cat-header_magic.xz b/tests/files/bad-0cat-header_magic.xz
new file mode 100644
index 0000000..426bf2d
--- /dev/null
+++ b/tests/files/bad-0cat-header_magic.xz
Binary files differ
diff --git a/tests/files/bad-0catpad-empty.xz b/tests/files/bad-0catpad-empty.xz
new file mode 100644
index 0000000..97c1330
--- /dev/null
+++ b/tests/files/bad-0catpad-empty.xz
Binary files differ
diff --git a/tests/files/bad-0pad-empty.xz b/tests/files/bad-0pad-empty.xz
new file mode 100644
index 0000000..45e00b7
--- /dev/null
+++ b/tests/files/bad-0pad-empty.xz
Binary files differ
diff --git a/tests/files/bad-1-block_header-1.xz b/tests/files/bad-1-block_header-1.xz
new file mode 100644
index 0000000..d991536
--- /dev/null
+++ b/tests/files/bad-1-block_header-1.xz
Binary files differ
diff --git a/tests/files/bad-1-block_header-2.xz b/tests/files/bad-1-block_header-2.xz
new file mode 100644
index 0000000..ae42ecf
--- /dev/null
+++ b/tests/files/bad-1-block_header-2.xz
Binary files differ
diff --git a/tests/files/bad-1-block_header-3.xz b/tests/files/bad-1-block_header-3.xz
new file mode 100644
index 0000000..606cbd2
--- /dev/null
+++ b/tests/files/bad-1-block_header-3.xz
Binary files differ
diff --git a/tests/files/bad-1-block_header-4.xz b/tests/files/bad-1-block_header-4.xz
new file mode 100644
index 0000000..e72dfbf
--- /dev/null
+++ b/tests/files/bad-1-block_header-4.xz
Binary files differ
diff --git a/tests/files/bad-1-block_header-5.xz b/tests/files/bad-1-block_header-5.xz
new file mode 100644
index 0000000..9652112
--- /dev/null
+++ b/tests/files/bad-1-block_header-5.xz
Binary files differ
diff --git a/tests/files/bad-1-block_header-6.xz b/tests/files/bad-1-block_header-6.xz
new file mode 100644
index 0000000..ecf0ff0
--- /dev/null
+++ b/tests/files/bad-1-block_header-6.xz
Binary files differ
diff --git a/tests/files/bad-1-check-crc32-2.xz b/tests/files/bad-1-check-crc32-2.xz
new file mode 100644
index 0000000..95731ae
--- /dev/null
+++ b/tests/files/bad-1-check-crc32-2.xz
Binary files differ
diff --git a/tests/files/bad-1-check-crc32.xz b/tests/files/bad-1-check-crc32.xz
new file mode 100644
index 0000000..1ebe131
--- /dev/null
+++ b/tests/files/bad-1-check-crc32.xz
Binary files differ
diff --git a/tests/files/bad-1-check-crc64.xz b/tests/files/bad-1-check-crc64.xz
new file mode 100644
index 0000000..cdb7709
--- /dev/null
+++ b/tests/files/bad-1-check-crc64.xz
Binary files differ
diff --git a/tests/files/bad-1-check-sha256.xz b/tests/files/bad-1-check-sha256.xz
new file mode 100644
index 0000000..def7bff
--- /dev/null
+++ b/tests/files/bad-1-check-sha256.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-1.xz b/tests/files/bad-1-lzma2-1.xz
new file mode 100644
index 0000000..640f592
--- /dev/null
+++ b/tests/files/bad-1-lzma2-1.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-10.xz b/tests/files/bad-1-lzma2-10.xz
new file mode 100644
index 0000000..246515e
--- /dev/null
+++ b/tests/files/bad-1-lzma2-10.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-11.xz b/tests/files/bad-1-lzma2-11.xz
new file mode 100644
index 0000000..ce857b6
--- /dev/null
+++ b/tests/files/bad-1-lzma2-11.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-2.xz b/tests/files/bad-1-lzma2-2.xz
new file mode 100644
index 0000000..69ab07d
--- /dev/null
+++ b/tests/files/bad-1-lzma2-2.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-3.xz b/tests/files/bad-1-lzma2-3.xz
new file mode 100644
index 0000000..66f48c5
--- /dev/null
+++ b/tests/files/bad-1-lzma2-3.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-4.xz b/tests/files/bad-1-lzma2-4.xz
new file mode 100644
index 0000000..ac97041
--- /dev/null
+++ b/tests/files/bad-1-lzma2-4.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-5.xz b/tests/files/bad-1-lzma2-5.xz
new file mode 100644
index 0000000..700464d
--- /dev/null
+++ b/tests/files/bad-1-lzma2-5.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-6.xz b/tests/files/bad-1-lzma2-6.xz
new file mode 100644
index 0000000..2bda0c4
--- /dev/null
+++ b/tests/files/bad-1-lzma2-6.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-7.xz b/tests/files/bad-1-lzma2-7.xz
new file mode 100644
index 0000000..8cc711c
--- /dev/null
+++ b/tests/files/bad-1-lzma2-7.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-8.xz b/tests/files/bad-1-lzma2-8.xz
new file mode 100644
index 0000000..f21a71b
--- /dev/null
+++ b/tests/files/bad-1-lzma2-8.xz
Binary files differ
diff --git a/tests/files/bad-1-lzma2-9.xz b/tests/files/bad-1-lzma2-9.xz
new file mode 100644
index 0000000..0553905
--- /dev/null
+++ b/tests/files/bad-1-lzma2-9.xz
Binary files differ
diff --git a/tests/files/bad-1-stream_flags-1.xz b/tests/files/bad-1-stream_flags-1.xz
new file mode 100644
index 0000000..6511773
--- /dev/null
+++ b/tests/files/bad-1-stream_flags-1.xz
Binary files differ
diff --git a/tests/files/bad-1-stream_flags-2.xz b/tests/files/bad-1-stream_flags-2.xz
new file mode 100644
index 0000000..0c66b36
--- /dev/null
+++ b/tests/files/bad-1-stream_flags-2.xz
Binary files differ
diff --git a/tests/files/bad-1-stream_flags-3.xz b/tests/files/bad-1-stream_flags-3.xz
new file mode 100644
index 0000000..a9b1f98
--- /dev/null
+++ b/tests/files/bad-1-stream_flags-3.xz
Binary files differ
diff --git a/tests/files/bad-1-v0-uncomp-size.lz b/tests/files/bad-1-v0-uncomp-size.lz
new file mode 100644
index 0000000..6bf4c6c
--- /dev/null
+++ b/tests/files/bad-1-v0-uncomp-size.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-crc32.lz b/tests/files/bad-1-v1-crc32.lz
new file mode 100644
index 0000000..3387618
--- /dev/null
+++ b/tests/files/bad-1-v1-crc32.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-dict-1.lz b/tests/files/bad-1-v1-dict-1.lz
new file mode 100644
index 0000000..20768d5
--- /dev/null
+++ b/tests/files/bad-1-v1-dict-1.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-dict-2.lz b/tests/files/bad-1-v1-dict-2.lz
new file mode 100644
index 0000000..1f22e6d
--- /dev/null
+++ b/tests/files/bad-1-v1-dict-2.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-magic-1.lz b/tests/files/bad-1-v1-magic-1.lz
new file mode 100644
index 0000000..b5e374d
--- /dev/null
+++ b/tests/files/bad-1-v1-magic-1.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-magic-2.lz b/tests/files/bad-1-v1-magic-2.lz
new file mode 100644
index 0000000..f5d5b97
--- /dev/null
+++ b/tests/files/bad-1-v1-magic-2.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-member-size.lz b/tests/files/bad-1-v1-member-size.lz
new file mode 100644
index 0000000..fd8636a
--- /dev/null
+++ b/tests/files/bad-1-v1-member-size.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-trailing-magic.lz b/tests/files/bad-1-v1-trailing-magic.lz
new file mode 100644
index 0000000..f7926c5
--- /dev/null
+++ b/tests/files/bad-1-v1-trailing-magic.lz
Binary files differ
diff --git a/tests/files/bad-1-v1-uncomp-size.lz b/tests/files/bad-1-v1-uncomp-size.lz
new file mode 100644
index 0000000..c89a283
--- /dev/null
+++ b/tests/files/bad-1-v1-uncomp-size.lz
Binary files differ
diff --git a/tests/files/bad-1-vli-1.xz b/tests/files/bad-1-vli-1.xz
new file mode 100644
index 0000000..6514ab1
--- /dev/null
+++ b/tests/files/bad-1-vli-1.xz
Binary files differ
diff --git a/tests/files/bad-1-vli-2.xz b/tests/files/bad-1-vli-2.xz
new file mode 100644
index 0000000..c16941b
--- /dev/null
+++ b/tests/files/bad-1-vli-2.xz
Binary files differ
diff --git a/tests/files/bad-2-compressed_data_padding.xz b/tests/files/bad-2-compressed_data_padding.xz
new file mode 100644
index 0000000..382d047
--- /dev/null
+++ b/tests/files/bad-2-compressed_data_padding.xz
Binary files differ
diff --git a/tests/files/bad-2-index-1.xz b/tests/files/bad-2-index-1.xz
new file mode 100644
index 0000000..f51ed21
--- /dev/null
+++ b/tests/files/bad-2-index-1.xz
Binary files differ
diff --git a/tests/files/bad-2-index-2.xz b/tests/files/bad-2-index-2.xz
new file mode 100644
index 0000000..d7d00ff
--- /dev/null
+++ b/tests/files/bad-2-index-2.xz
Binary files differ
diff --git a/tests/files/bad-2-index-3.xz b/tests/files/bad-2-index-3.xz
new file mode 100644
index 0000000..62428b8
--- /dev/null
+++ b/tests/files/bad-2-index-3.xz
Binary files differ
diff --git a/tests/files/bad-2-index-4.xz b/tests/files/bad-2-index-4.xz
new file mode 100644
index 0000000..9cf2df6
--- /dev/null
+++ b/tests/files/bad-2-index-4.xz
Binary files differ
diff --git a/tests/files/bad-2-index-5.xz b/tests/files/bad-2-index-5.xz
new file mode 100644
index 0000000..0a79270
--- /dev/null
+++ b/tests/files/bad-2-index-5.xz
Binary files differ
diff --git a/tests/files/bad-3-index-uncomp-overflow.xz b/tests/files/bad-3-index-uncomp-overflow.xz
new file mode 100644
index 0000000..e1440ec
--- /dev/null
+++ b/tests/files/bad-3-index-uncomp-overflow.xz
Binary files differ
diff --git a/tests/files/bad-too_big_size-with_eopm.lzma b/tests/files/bad-too_big_size-with_eopm.lzma
new file mode 100644
index 0000000..b7cd3b0
--- /dev/null
+++ b/tests/files/bad-too_big_size-with_eopm.lzma
Binary files differ
diff --git a/tests/files/bad-too_small_size-without_eopm-1.lzma b/tests/files/bad-too_small_size-without_eopm-1.lzma
new file mode 100644
index 0000000..cc2805c
--- /dev/null
+++ b/tests/files/bad-too_small_size-without_eopm-1.lzma
Binary files differ
diff --git a/tests/files/bad-too_small_size-without_eopm-2.lzma b/tests/files/bad-too_small_size-without_eopm-2.lzma
new file mode 100644
index 0000000..e37cab1
--- /dev/null
+++ b/tests/files/bad-too_small_size-without_eopm-2.lzma
Binary files differ
diff --git a/tests/files/bad-too_small_size-without_eopm-3.lzma b/tests/files/bad-too_small_size-without_eopm-3.lzma
new file mode 100644
index 0000000..67a1af3
--- /dev/null
+++ b/tests/files/bad-too_small_size-without_eopm-3.lzma
Binary files differ
diff --git a/tests/files/bad-unknown_size-without_eopm.lzma b/tests/files/bad-unknown_size-without_eopm.lzma
new file mode 100644
index 0000000..b3d7a52
--- /dev/null
+++ b/tests/files/bad-unknown_size-without_eopm.lzma
Binary files differ
diff --git a/tests/files/good-0-empty.xz b/tests/files/good-0-empty.xz
new file mode 100644
index 0000000..83b95e0
--- /dev/null
+++ b/tests/files/good-0-empty.xz
Binary files differ
diff --git a/tests/files/good-0cat-empty.xz b/tests/files/good-0cat-empty.xz
new file mode 100644
index 0000000..e6fc314
--- /dev/null
+++ b/tests/files/good-0cat-empty.xz
Binary files differ
diff --git a/tests/files/good-0catpad-empty.xz b/tests/files/good-0catpad-empty.xz
new file mode 100644
index 0000000..4f86b7d
--- /dev/null
+++ b/tests/files/good-0catpad-empty.xz
Binary files differ
diff --git a/tests/files/good-0pad-empty.xz b/tests/files/good-0pad-empty.xz
new file mode 100644
index 0000000..c51e3a6
--- /dev/null
+++ b/tests/files/good-0pad-empty.xz
Binary files differ
diff --git a/tests/files/good-1-3delta-lzma2.xz b/tests/files/good-1-3delta-lzma2.xz
new file mode 100644
index 0000000..a0be1d0
--- /dev/null
+++ b/tests/files/good-1-3delta-lzma2.xz
Binary files differ
diff --git a/tests/files/good-1-arm64-lzma2-1.xz b/tests/files/good-1-arm64-lzma2-1.xz
new file mode 100644
index 0000000..78169f1
--- /dev/null
+++ b/tests/files/good-1-arm64-lzma2-1.xz
Binary files differ
diff --git a/tests/files/good-1-arm64-lzma2-2.xz b/tests/files/good-1-arm64-lzma2-2.xz
new file mode 100644
index 0000000..e0302fe
--- /dev/null
+++ b/tests/files/good-1-arm64-lzma2-2.xz
Binary files differ
diff --git a/tests/files/good-1-block_header-1.xz b/tests/files/good-1-block_header-1.xz
new file mode 100644
index 0000000..fea5ad2
--- /dev/null
+++ b/tests/files/good-1-block_header-1.xz
Binary files differ
diff --git a/tests/files/good-1-block_header-2.xz b/tests/files/good-1-block_header-2.xz
new file mode 100644
index 0000000..6b5dcb3
--- /dev/null
+++ b/tests/files/good-1-block_header-2.xz
Binary files differ
diff --git a/tests/files/good-1-block_header-3.xz b/tests/files/good-1-block_header-3.xz
new file mode 100644
index 0000000..1565312
--- /dev/null
+++ b/tests/files/good-1-block_header-3.xz
Binary files differ
diff --git a/tests/files/good-1-check-crc32.xz b/tests/files/good-1-check-crc32.xz
new file mode 100644
index 0000000..6c89593
--- /dev/null
+++ b/tests/files/good-1-check-crc32.xz
Binary files differ
diff --git a/tests/files/good-1-check-crc64.xz b/tests/files/good-1-check-crc64.xz
new file mode 100644
index 0000000..5a9915d
--- /dev/null
+++ b/tests/files/good-1-check-crc64.xz
Binary files differ
diff --git a/tests/files/good-1-check-none.xz b/tests/files/good-1-check-none.xz
new file mode 100644
index 0000000..1e85faf
--- /dev/null
+++ b/tests/files/good-1-check-none.xz
Binary files differ
diff --git a/tests/files/good-1-check-sha256.xz b/tests/files/good-1-check-sha256.xz
new file mode 100644
index 0000000..fdc556b
--- /dev/null
+++ b/tests/files/good-1-check-sha256.xz
Binary files differ
diff --git a/tests/files/good-1-delta-lzma2.tiff.xz b/tests/files/good-1-delta-lzma2.tiff.xz
new file mode 100644
index 0000000..1f033bc
--- /dev/null
+++ b/tests/files/good-1-delta-lzma2.tiff.xz
Binary files differ
diff --git a/tests/files/good-1-empty-bcj-lzma2.xz b/tests/files/good-1-empty-bcj-lzma2.xz
new file mode 100644
index 0000000..94016d8
--- /dev/null
+++ b/tests/files/good-1-empty-bcj-lzma2.xz
Binary files differ
diff --git a/tests/files/good-1-lzma2-1.xz b/tests/files/good-1-lzma2-1.xz
new file mode 100644
index 0000000..d8d6489
--- /dev/null
+++ b/tests/files/good-1-lzma2-1.xz
Binary files differ
diff --git a/tests/files/good-1-lzma2-2.xz b/tests/files/good-1-lzma2-2.xz
new file mode 100644
index 0000000..7e8cdf1
--- /dev/null
+++ b/tests/files/good-1-lzma2-2.xz
Binary files differ
diff --git a/tests/files/good-1-lzma2-3.xz b/tests/files/good-1-lzma2-3.xz
new file mode 100644
index 0000000..c4c72be
--- /dev/null
+++ b/tests/files/good-1-lzma2-3.xz
Binary files differ
diff --git a/tests/files/good-1-lzma2-4.xz b/tests/files/good-1-lzma2-4.xz
new file mode 100644
index 0000000..e0d623a
--- /dev/null
+++ b/tests/files/good-1-lzma2-4.xz
Binary files differ
diff --git a/tests/files/good-1-lzma2-5.xz b/tests/files/good-1-lzma2-5.xz
new file mode 100644
index 0000000..339d1c3
--- /dev/null
+++ b/tests/files/good-1-lzma2-5.xz
Binary files differ
diff --git a/tests/files/good-1-sparc-lzma2.xz b/tests/files/good-1-sparc-lzma2.xz
new file mode 100644
index 0000000..4532bc6
--- /dev/null
+++ b/tests/files/good-1-sparc-lzma2.xz
Binary files differ
diff --git a/tests/files/good-1-v0-trailing-1.lz b/tests/files/good-1-v0-trailing-1.lz
new file mode 100644
index 0000000..91f2b64
--- /dev/null
+++ b/tests/files/good-1-v0-trailing-1.lz
Binary files differ
diff --git a/tests/files/good-1-v0.lz b/tests/files/good-1-v0.lz
new file mode 100644
index 0000000..99e3f27
--- /dev/null
+++ b/tests/files/good-1-v0.lz
Binary files differ
diff --git a/tests/files/good-1-v1-trailing-1.lz b/tests/files/good-1-v1-trailing-1.lz
new file mode 100644
index 0000000..198e65c
--- /dev/null
+++ b/tests/files/good-1-v1-trailing-1.lz
Binary files differ
diff --git a/tests/files/good-1-v1-trailing-2.lz b/tests/files/good-1-v1-trailing-2.lz
new file mode 100644
index 0000000..9a028fa
--- /dev/null
+++ b/tests/files/good-1-v1-trailing-2.lz
Binary files differ
diff --git a/tests/files/good-1-v1.lz b/tests/files/good-1-v1.lz
new file mode 100644
index 0000000..4c9565c
--- /dev/null
+++ b/tests/files/good-1-v1.lz
Binary files differ
diff --git a/tests/files/good-1-x86-lzma2.xz b/tests/files/good-1-x86-lzma2.xz
new file mode 100644
index 0000000..8053917
--- /dev/null
+++ b/tests/files/good-1-x86-lzma2.xz
Binary files differ
diff --git a/tests/files/good-2-lzma2.xz b/tests/files/good-2-lzma2.xz
new file mode 100644
index 0000000..bed5085
--- /dev/null
+++ b/tests/files/good-2-lzma2.xz
Binary files differ
diff --git a/tests/files/good-2-v0-v1.lz b/tests/files/good-2-v0-v1.lz
new file mode 100644
index 0000000..dc3165a
--- /dev/null
+++ b/tests/files/good-2-v0-v1.lz
Binary files differ
diff --git a/tests/files/good-2-v1-v0.lz b/tests/files/good-2-v1-v0.lz
new file mode 100644
index 0000000..a999582
--- /dev/null
+++ b/tests/files/good-2-v1-v0.lz
Binary files differ
diff --git a/tests/files/good-2-v1-v1.lz b/tests/files/good-2-v1-v1.lz
new file mode 100644
index 0000000..5381891
--- /dev/null
+++ b/tests/files/good-2-v1-v1.lz
Binary files differ
diff --git a/tests/files/good-known_size-with_eopm.lzma b/tests/files/good-known_size-with_eopm.lzma
new file mode 100644
index 0000000..1b45307
--- /dev/null
+++ b/tests/files/good-known_size-with_eopm.lzma
Binary files differ
diff --git a/tests/files/good-known_size-without_eopm.lzma b/tests/files/good-known_size-without_eopm.lzma
new file mode 100644
index 0000000..83623fd
--- /dev/null
+++ b/tests/files/good-known_size-without_eopm.lzma
Binary files differ
diff --git a/tests/files/good-unknown_size-with_eopm.lzma b/tests/files/good-unknown_size-with_eopm.lzma
new file mode 100644
index 0000000..0f4ff82
--- /dev/null
+++ b/tests/files/good-unknown_size-with_eopm.lzma
Binary files differ
diff --git a/tests/files/unsupported-1-v234.lz b/tests/files/unsupported-1-v234.lz
new file mode 100644
index 0000000..e571b0f
--- /dev/null
+++ b/tests/files/unsupported-1-v234.lz
Binary files differ
diff --git a/tests/files/unsupported-block_header.xz b/tests/files/unsupported-block_header.xz
new file mode 100644
index 0000000..3830442
--- /dev/null
+++ b/tests/files/unsupported-block_header.xz
Binary files differ
diff --git a/tests/files/unsupported-check.xz b/tests/files/unsupported-check.xz
new file mode 100644
index 0000000..c28355e
--- /dev/null
+++ b/tests/files/unsupported-check.xz
Binary files differ
diff --git a/tests/files/unsupported-filter_flags-1.xz b/tests/files/unsupported-filter_flags-1.xz
new file mode 100644
index 0000000..48b9373
--- /dev/null
+++ b/tests/files/unsupported-filter_flags-1.xz
Binary files differ
diff --git a/tests/files/unsupported-filter_flags-2.xz b/tests/files/unsupported-filter_flags-2.xz
new file mode 100644
index 0000000..c283359
--- /dev/null
+++ b/tests/files/unsupported-filter_flags-2.xz
Binary files differ
diff --git a/tests/files/unsupported-filter_flags-3.xz b/tests/files/unsupported-filter_flags-3.xz
new file mode 100644
index 0000000..2608498
--- /dev/null
+++ b/tests/files/unsupported-filter_flags-3.xz
Binary files differ
diff --git a/tests/ossfuzz/Makefile b/tests/ossfuzz/Makefile
new file mode 100644
index 0000000..747fb66
--- /dev/null
+++ b/tests/ossfuzz/Makefile
@@ -0,0 +1,7 @@
+fuzz: fuzz.c
+ $(CC) $(CFLAGS) -c fuzz.c -I ../../src/liblzma/api/
+ $(CXX) $(CXXFLAGS) $(LIB_FUZZING_ENGINE) fuzz.o -o $(OUT)/fuzz \
+ ../../src/liblzma/.libs/liblzma.a
+
+clean:
+ rm -f *.o
diff --git a/tests/ossfuzz/config/fuzz.dict b/tests/ossfuzz/config/fuzz.dict
new file mode 100644
index 0000000..932d67c
--- /dev/null
+++ b/tests/ossfuzz/config/fuzz.dict
@@ -0,0 +1,2 @@
+"\xFD7zXZ\x00"
+"YZ"
diff --git a/tests/ossfuzz/config/fuzz.options b/tests/ossfuzz/config/fuzz.options
new file mode 100644
index 0000000..d59dfc1
--- /dev/null
+++ b/tests/ossfuzz/config/fuzz.options
@@ -0,0 +1,2 @@
+[libfuzzer]
+dict = fuzz.dict
diff --git a/tests/ossfuzz/fuzz.c b/tests/ossfuzz/fuzz.c
new file mode 100644
index 0000000..6d89930
--- /dev/null
+++ b/tests/ossfuzz/fuzz.c
@@ -0,0 +1,82 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file fuzz.c
+/// \brief Fuzz test program for liblzma
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <inttypes.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "lzma.h"
+
+
+// Output buffer for decompressed data. This is write only; nothing cares
+// about the actual data written here.
+static uint8_t outbuf[4096];
+
+
+extern int
+LLVMFuzzerTestOneInput(const uint8_t *inbuf, size_t inbuf_size)
+{
+ // 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.
+ const uint64_t memlimit = 300 << 20; // 300 MiB
+
+ // Initialize a .xz decoder using the above memory usage limit.
+ // 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_stream strm = LZMA_STREAM_INIT;
+ lzma_ret ret = lzma_stream_decoder(&strm, memlimit,
+ 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();
+ }
+
+ // Give the whole input buffer at once to liblzma.
+ // Output buffer isn't initialized as liblzma only writes to it.
+ strm.next_in = inbuf;
+ strm.avail_in = inbuf_size;
+ strm.next_out = outbuf;
+ strm.avail_out = sizeof(outbuf);
+
+ while ((ret = lzma_code(&strm, LZMA_FINISH)) == LZMA_OK) {
+ if (strm.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.
+ strm.next_out = outbuf;
+ strm.avail_out = sizeof(outbuf);
+ }
+ }
+
+ // 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();
+ }
+
+ // Free the allocated memory.
+ lzma_end(&strm);
+
+ return 0;
+}
diff --git a/tests/test_bcj_exact_size.c b/tests/test_bcj_exact_size.c
new file mode 100644
index 0000000..551166c
--- /dev/null
+++ b/tests/test_bcj_exact_size.c
@@ -0,0 +1,124 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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] = "0123456789ABCDEF";
+
+ // 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/tests/test_block_header.c b/tests/test_block_header.c
new file mode 100644
index 0000000..b310135
--- /dev/null
+++ b/tests/test_block_header.c
@@ -0,0 +1,520 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_block_header.c
+/// \brief Tests Block Header coders
+//
+// Authors: Lasse Collin
+// Jia Tan
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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) + 1, 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/tests/test_check.c b/tests/test_check.c
new file mode 100644
index 0000000..cb1ad25
--- /dev/null
+++ b/tests/test_check.c
@@ -0,0 +1,390 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_check.c
+/// \brief Tests integrity checks
+//
+// Authors: Lasse Collin
+// Jia Tan
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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
+
+
+#ifdef 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);
+}
+
+
+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: The CLMUL implementation works on 16-byte chunks.
+ // Test combination of different start and end alignments
+ // and also short buffer lengths where special handling is needed.
+ 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/tests/test_compress.sh b/tests/test_compress.sh
new file mode 100755
index 0000000..ff13cef
--- /dev/null
+++ b/tests/test_compress.sh
@@ -0,0 +1,150 @@
+#!/bin/sh
+
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+# If xz wasn't built, this test is skipped.
+if test -x ../src/xz/xz ; then
+ :
+else
+ exit 77
+fi
+
+# 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 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
+}
+
+XZ="../src/xz/xz --memlimit-compress=48MiB --memlimit-decompress=5MiB \
+ --no-adjust --threads=1 --check=crc32"
+grep "define HAVE_CHECK_CRC64" ../config.h > /dev/null \
+ && XZ="$XZ --check=crc64"
+XZDEC="../src/xzdec/xzdec" # No memory usage limiter available
+test -x ../src/xzdec/xzdec || XZDEC=
+
+# 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()
+{
+ grep "define HAVE_ENCODER_$1 1" ../config.h > /dev/null || return
+ grep "define HAVE_DECODER_$1 1" ../config.h > /dev/null || return
+ shift
+ test_xz "$@" --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 --power
+test_filter IA64 --ia64
+test_filter ARM --arm
+test_filter ARMTHUMB --armthumb
+test_filter ARM64 --arm64
+test_filter SPARC --sparc
+
+exit 0
diff --git a/tests/test_compress_generated_abc b/tests/test_compress_generated_abc
new file mode 100755
index 0000000..43c6951
--- /dev/null
+++ b/tests/test_compress_generated_abc
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec "$srcdir/test_compress.sh" compress_generated_abc
diff --git a/tests/test_compress_generated_random b/tests/test_compress_generated_random
new file mode 100755
index 0000000..e47555d
--- /dev/null
+++ b/tests/test_compress_generated_random
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec "$srcdir/test_compress.sh" compress_generated_random
diff --git a/tests/test_compress_generated_text b/tests/test_compress_generated_text
new file mode 100755
index 0000000..412ae0e
--- /dev/null
+++ b/tests/test_compress_generated_text
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec "$srcdir/test_compress.sh" compress_generated_text
diff --git a/tests/test_compress_prepared_bcj_sparc b/tests/test_compress_prepared_bcj_sparc
new file mode 100755
index 0000000..deb76ef
--- /dev/null
+++ b/tests/test_compress_prepared_bcj_sparc
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec "$srcdir/test_compress.sh" compress_prepared_bcj_sparc
diff --git a/tests/test_compress_prepared_bcj_x86 b/tests/test_compress_prepared_bcj_x86
new file mode 100755
index 0000000..3452d7f
--- /dev/null
+++ b/tests/test_compress_prepared_bcj_x86
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec "$srcdir/test_compress.sh" compress_prepared_bcj_x86
diff --git a/tests/test_files.sh b/tests/test_files.sh
new file mode 100755
index 0000000..60402e7
--- /dev/null
+++ b/tests/test_files.sh
@@ -0,0 +1,197 @@
+#!/bin/sh
+
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+# If both xz and xzdec were not build, skip this test.
+XZ=../src/xz/xz
+XZDEC=../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 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()
+{
+ 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=
+grep 'define HAVE_CHECK_CRC64' ../config.h > /dev/null || NO_WARN=-qQ
+grep 'define HAVE_CHECK_SHA256' ../config.h > /dev/null || NO_WARN=-qQ
+
+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
+
+ 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/tests/test_filter_flags.c b/tests/test_filter_flags.c
new file mode 100644
index 0000000..6d9f0b9
--- /dev/null
+++ b/tests/test_filter_flags.c
@@ -0,0 +1,527 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_filter_flags.c
+/// \brief Tests Filter Flags coders
+//
+// Authors: Jia Tan
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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
+};
+
+// 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
+};
+#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)) {
+ 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);
+ }
+
+ // Do not use macro ARRAY_SIZE() in the for loop condition directly.
+ // If the BCJ filters are not configured and built, then ARRAY_SIZE()
+ // will return 0 and cause a warning because the for loop will never
+ // execute since any unsigned number cannot be < 0 (-Werror=type-limits).
+ const uint32_t bcj_array_size = ARRAY_SIZE(bcj_filters_encoders);
+ for (uint32_t i = 0; i < bcj_array_size; 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 * sizeof(uint8_t));
+ 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
+ };
+
+ const uint32_t bcj_array_size = ARRAY_SIZE(bcj_filters_encoders);
+ for (uint32_t i = 0; i < bcj_array_size; 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(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);
+ }
+
+ const uint32_t bcj_array_size = ARRAY_SIZE(bcj_filters_decoders);
+ for (uint32_t i = 0; i < bcj_array_size; 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 offset
+ 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/tests/test_filter_str.c b/tests/test_filter_str.c
new file mode 100644
index 0000000..15aee55
--- /dev/null
+++ b/tests/test_filter_str.c
@@ -0,0 +1,593 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_filter_str.c
+/// \brief Tests Filter string functions
+//
+// Author: Jia Tan
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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.
+ assert_true(lzma_str_to_filters(NULL, &error_pos, filters, 0,
+ NULL) != NULL);
+
+ // Test with NULL filter array.
+ assert_true(lzma_str_to_filters("lzma2", &error_pos, NULL, 0,
+ NULL) != NULL);
+
+ // Test with unsupported flags.
+ assert_true(lzma_str_to_filters("lzma2", &error_pos, filters,
+ UINT32_MAX, NULL) != NULL);
+
+ assert_true(lzma_str_to_filters("lzma2", &error_pos, filters,
+ LZMA_STR_NO_SPACES << 1, NULL) != NULL);
+
+ assert_true(lzma_str_to_filters("lzma2", &error_pos, filters,
+ LZMA_STR_NO_SPACES, NULL) != NULL);
+
+ // Test with empty string.
+ 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.
+ assert_true(lzma_str_to_filters("lzma2 abcd", &error_pos,
+ filters, 0, NULL) != NULL);
+ assert_int_eq(error_pos, 6);
+
+ assert_true(lzma_str_to_filters("lzma2--abcd", &error_pos,
+ filters, 0, NULL) != NULL);
+ assert_int_eq(error_pos, 7);
+
+ 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.
+ assert_true(lzma_str_to_filters("lzma1", &error_pos, filters,
+ 0, NULL) != NULL);
+ assert_int_eq(error_pos, 0);
+
+ assert_true(lzma_str_to_filters("lzma1", &error_pos, filters,
+ LZMA_STR_ALL_FILTERS, NULL) == NULL);
+
+ // 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.
+ assert_true(lzma_str_to_filters("lzma2 lzma2", &error_pos, filters,
+ 0, NULL) != NULL);
+
+ assert_true(lzma_str_to_filters("lzma2 lzma2", &error_pos, filters,
+ LZMA_STR_NO_VALIDATION, NULL) == NULL);
+
+ 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).
+ assert_true(lzma_str_to_filters("lzma2:lc=3,lp=3", &error_pos, filters,
+ LZMA_STR_NO_VALIDATION, NULL) != NULL);
+
+ // Test invalid option name.
+ assert_true(lzma_str_to_filters("lzma2:foo=1,bar=2", &error_pos,
+ filters, 0, NULL) != NULL);
+ assert_int_eq(error_pos, 6);
+
+ // Test missing option value.
+ assert_true(lzma_str_to_filters("lzma2:lc=", &error_pos,
+ filters, 0, NULL) != NULL);
+ assert_int_eq(error_pos, 9);
+
+ 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.
+ assert_true(lzma_str_to_filters("-10", &error_pos,
+ filters, 0, NULL) != NULL);
+ assert_int_eq(error_pos, 2);
+
+ assert_true(lzma_str_to_filters("-5f", &error_pos,
+ filters, 0, NULL) != NULL);
+ assert_int_eq(error_pos, 2);
+
+ // Test filter chain too long.
+ 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);
+
+#if defined(HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1)
+ // Should fail with a Filter not supported in the .xz format (lzma1).
+ assert_true(lzma_str_to_filters("lzma1", &error_pos, filters,
+ LZMA_STR_NO_VALIDATION, NULL) != NULL);
+#endif
+
+ // Test setting options with the "=" format.
+ 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_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.
+ assert_true(lzma_str_to_filters("x86:start=16", &error_pos, filters,
+ LZMA_STR_NO_VALIDATION, NULL) == NULL);
+
+ 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.
+ assert_true(lzma_str_to_filters("delta:dist=20", &error_pos, filters,
+ LZMA_STR_NO_VALIDATION, NULL) == NULL);
+
+ 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.
+ assert_true(lzma_str_to_filters(" lzma2", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ 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.
+ assert_true(lzma_str_to_filters("lzma2 ", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ 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.
+ assert_true(lzma_str_to_filters("lzma2--lzma2", &error_pos, filters,
+ LZMA_STR_NO_VALIDATION, NULL) == NULL);
+
+ 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".
+ assert_true(lzma_str_to_filters("-3", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2);
+ assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN);
+
+ lzma_filters_free(filters, NULL);
+
+ assert_true(lzma_str_to_filters("4", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ assert_uint_eq(filters[0].id, LZMA_FILTER_LZMA2);
+ assert_uint_eq(filters[1].id, LZMA_VLI_UNKNOWN);
+
+ lzma_filters_free(filters, NULL);
+
+ assert_true(lzma_str_to_filters("9e", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ 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.
+ assert_true(lzma_str_to_filters("lzma2:preset=9e", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ 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.
+ assert_true(lzma_str_to_filters("lzma2:dict=4096ZiB", &error_pos, filters,
+ 0, NULL) != NULL);
+
+ assert_true(lzma_str_to_filters("lzma2:dict=4096KiBs", &error_pos, filters,
+ 0, NULL) != NULL);
+
+ // Test option that cannot have multiplier modifier.
+ assert_true(lzma_str_to_filters("lzma2:pb=1k", &error_pos, filters,
+ 0, NULL) != NULL);
+
+ // Test option value too large.
+ assert_true(lzma_str_to_filters("lzma2:dict=4096GiB", &error_pos, filters,
+ 0, NULL) != NULL);
+
+ // Test valid uses of multiplier modifiers (k,m,g).
+ assert_true(lzma_str_to_filters("lzma2:dict=4096KiB", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ 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);
+
+ assert_true(lzma_str_to_filters("lzma2:dict=40Mi", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ 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);
+
+ assert_true(lzma_str_to_filters("lzma2:dict=1g", &error_pos, filters,
+ 0, NULL) == NULL);
+
+ 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 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);
+
+ 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.
+ assert_false(filters[0].options == 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_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_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_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_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN,
+ LZMA_STR_NO_SPACES, NULL), LZMA_OPTIONS_ERROR);
+
+ // Test with bad Filter ID.
+ assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN - 1,
+ 0, NULL), LZMA_OPTIONS_ERROR);
+
+ // Test LZMA_STR_ENCODER flag.
+ assert_lzma_ret(lzma_str_list_filters(&str, LZMA_VLI_UNKNOWN,
+ LZMA_STR_ENCODER, NULL), LZMA_OK);
+
+ 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);
+
+ 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/tests/test_hardware.c b/tests/test_hardware.c
new file mode 100644
index 0000000..c72d9b2
--- /dev/null
+++ b/tests/test_hardware.c
@@ -0,0 +1,50 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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/tests/test_index.c b/tests/test_index.c
new file mode 100644
index 0000000..a14b33d
--- /dev/null
+++ b/tests/test_index.c
@@ -0,0 +1,1715 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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
+//
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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)
+
+static uint8_t *decode_buffer;
+static size_t decode_buffer_size = 0;
+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);
+
+ // The maximum number of Blocks should be LZMA_VLI_MAX
+ assert_uint_eq(lzma_index_memusage(1, LZMA_VLI_MAX), 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-ouput 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 68bda971bb8b666a009331455fcedb4e18d837a4.
+ // 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),
+ UINT32_C(1) << LZMA_CHECK_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),
+ UINT32_C(1) << LZMA_CHECK_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),
+ UINT32_C(1) << LZMA_CHECK_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),
+ UINT32_C(1) << LZMA_CHECK_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),
+ UINT32_C(1) << LZMA_CHECK_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),
+ (UINT32_C(1) << LZMA_CHECK_CRC32) |
+ (UINT32_C(1) << LZMA_CHECK_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),
+ UINT32_C(1) << LZMA_CHECK_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),
+ UINT32_C(1) << LZMA_CHECK_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),
+ (UINT32_C(1) << LZMA_CHECK_CRC64) |
+ (UINT32_C(1) << LZMA_CHECK_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, 1000, 1), LZMA_OK);
+ assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 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
+ 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, 1000, 1), LZMA_OK);
+ assert_uint_eq(lzma_index_total_size(idx), 2000);
+
+ assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 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);
+
+ 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, 1000, 1), LZMA_OK);
+ assert_lzma_ret(lzma_index_append(idx, NULL, 1000, 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);
+ }
+
+ // 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);
+ }
+
+ // 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 LZMA_INDEX_ITER_STREAM
+ // call.
+ 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 + 8, 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.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.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.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.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 uncompressed 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);
+
+ // Check for compressed size overflow
+ lzma_index_end(src, NULL);
+ lzma_index_end(dest, NULL);
+
+ 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 - 1), LZMA_OK);
+ assert_lzma_ret(lzma_index_append(src, NULL,
+ UNPADDED_SIZE_MIN, LZMA_VLI_MAX - 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;
+
+ static unsigned count = 0;
+ if (++count > 2)
+ return NULL;
+
+ 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);
+ if (decode_test_index == NULL)
+ return;
+
+ // Add 4 Blocks
+ for (uint32_t i = 1; i < 5; i++)
+ if (lzma_index_append(decode_test_index, NULL,
+ 0x1000 * i, 0x100 * i) != LZMA_OK)
+ return;
+
+ size_t size = lzma_index_size(decode_test_index);
+ decode_buffer = tuktest_malloc(size);
+
+ if (lzma_index_buffer_encode(decode_test_index,
+ decode_buffer, &decode_buffer_size, size) != LZMA_OK)
+ decode_buffer_size = 0;
+#endif
+}
+
+
+#ifdef 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)
+{
+#ifndef HAVE_DECODERS
+ assert_skip("Decoder support disabled");
+#else
+ if (decode_buffer_size == 0)
+ assert_skip("Could not initialize decode test buffer");
+
+ 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);
+ assert_lzma_ret(lzma_index_decoder(NULL, &decode_test_index,
+ MEMLIMIT), LZMA_PROG_ERROR);
+
+ // Do actual decode
+ lzma_index *idx;
+ 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
+ // More simple test than test_lzma_index_encoder() because
+ // currently 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,
+ 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)
+{
+#ifndef HAVE_DECODERS
+ assert_skip("Decoder support disabled");
+#else
+ if (decode_buffer_size == 0)
+ assert_skip("Could not initialize decode test buffer");
+
+ // 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);
+
+ lzma_index *idx;
+ uint64_t memlimit = MEMLIMIT;
+ size_t in_pos = 0;
+
+ assert_lzma_ret(lzma_index_buffer_decode(&idx, NULL, NULL, NULL,
+ NULL, 0), LZMA_PROG_ERROR);
+
+ assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL,
+ NULL, NULL, 0), LZMA_PROG_ERROR);
+
+ assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL,
+ decode_buffer, NULL, 0), LZMA_PROG_ERROR);
+
+ assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL,
+ decode_buffer, NULL, 0), LZMA_PROG_ERROR);
+
+ assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL,
+ decode_buffer, &in_pos, 0), LZMA_DATA_ERROR);
+
+ in_pos = 1;
+ assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL,
+ decode_buffer, &in_pos, 0), LZMA_PROG_ERROR);
+ in_pos = 0;
+
+ // Test expected successful decode
+ assert_lzma_ret(lzma_index_buffer_decode(&idx, &memlimit, NULL,
+ decode_buffer, &in_pos, decode_buffer_size), LZMA_OK);
+
+ 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
+}
+
+
+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);
+ lzma_index_end(decode_test_index, NULL);
+ return tuktest_end();
+}
diff --git a/tests/test_index_hash.c b/tests/test_index_hash.c
new file mode 100644
index 0000000..f3c6e8f
--- /dev/null
+++ b/tests/test_index_hash.c
@@ -0,0 +1,386 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \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
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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/tests/test_lzip_decoder.c b/tests/test_lzip_decoder.c
new file mode 100644
index 0000000..3743d43
--- /dev/null
+++ b/tests/test_lzip_decoder.c
@@ -0,0 +1,488 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_lzip_decoder.c
+/// \brief Tests decoding lzip data
+//
+// Author: Jia Tan
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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 = tuktest_malloc(DECODE_CHUNK_SIZE);
+
+ strm.next_in = data;
+ strm.next_out = output_buffer;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+
+ // 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);
+ // No need to free output_buffer because it will
+ // automatically be freed at the end of the test by
+ // tuktest.
+ output_buffer = tuktest_malloc(DECODE_CHUNK_SIZE);
+ strm.next_out = output_buffer;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ }
+ }
+
+ 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 = tuktest_malloc(DECODE_CHUNK_SIZE);
+
+ strm.next_in = data;
+ strm.next_out = output_buffer;
+ strm.avail_in = file_size;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+
+ 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);
+ // No need to free output_buffer because it will
+ // automatically be freed at the end of the test by
+ // tuktest.
+ output_buffer = tuktest_malloc(DECODE_CHUNK_SIZE);
+ strm.next_out = output_buffer;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ }
+ }
+
+ 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;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ strm.next_out = output_buffer;
+
+ lzma_ret ret = LZMA_OK;
+
+ while (ret == LZMA_OK) {
+ // Discard output since we are only looking for errors
+ strm.next_out = output_buffer;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ if (strm.avail_in == 0)
+ ret = lzma_code(&strm, LZMA_FINISH);
+ else
+ ret = lzma_code(&strm, LZMA_RUN);
+ }
+
+ 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_concatentated(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.avail_in = file_size;
+ strm.next_in = v0_v1;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ strm.next_out = 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.avail_in = file_size;
+ strm.next_in = v1_v0;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ strm.next_out = 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.avail_in = file_size;
+ strm.next_in = v1_v1;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ strm.next_out = 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.avail_in = file_size;
+ strm.next_in = data;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ strm.next_out = 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.avail_in = file_size;
+ strm.next_in = data;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ strm.next_out = 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.avail_in = file_size;
+ strm.next_in = data;
+ strm.avail_out = DECODE_CHUNK_SIZE;
+ strm.next_out = 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 = DECODE_CHUNK_SIZE;
+
+ 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)
+{
+ // First file has too small dictionary size field
+ decode_expect_error("files/bad-1-v1-dict-1.lz", LZMA_DATA_ERROR);
+
+ // Second file has 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.
+ // Should be able to update the memlimit after failing
+ 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 = DECODE_CHUNK_SIZE;
+
+ assert_lzma_ret(lzma_code(&strm, LZMA_FINISH), LZMA_MEMLIMIT_ERROR);
+
+ // Up the memlimit so 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_concatentated);
+ 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/tests/test_memlimit.c b/tests/test_memlimit.c
new file mode 100644
index 0000000..c45a44b
--- /dev/null
+++ b/tests/test_memlimit.c
@@ -0,0 +1,173 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_memlimit.c
+/// \brief Tests memory usage limit in decoders
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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/tests/test_scripts.sh b/tests/test_scripts.sh
new file mode 100755
index 0000000..ee82361
--- /dev/null
+++ b/tests/test_scripts.sh
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+###############################################################################
+#
+# Author: Jonathan Nieder
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+# If scripts weren't built, this test is skipped.
+XZ=../src/xz/xz
+XZDIFF=../src/scripts/xzdiff
+XZGREP=../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 grep 'define HAVE_DECODERS' ../config.h > /dev/null ; then
+ :
+else
+ echo "Decompression support is disabled, skipping this test."
+ exit 77
+fi
+
+PATH=`pwd`/../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/tests/test_stream_flags.c b/tests/test_stream_flags.c
new file mode 100644
index 0000000..2248e67
--- /dev/null
+++ b/tests/test_stream_flags.c
@@ -0,0 +1,479 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_stream_flags.c
+/// \brief Tests Stream Header and Stream Footer coders
+//
+// Authors: Jia Tan
+// Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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/tests/test_vli.c b/tests/test_vli.c
new file mode 100644
index 0000000..996b775
--- /dev/null
+++ b/tests/test_vli.c
@@ -0,0 +1,324 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file test_vli.c
+/// \brief Tests liblzma vli functions
+//
+// Author: Jia Tan
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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/tests/tests.h b/tests/tests.h
new file mode 100644
index 0000000..2d42700
--- /dev/null
+++ b/tests/tests.h
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tests.h
+/// \brief Common definitions for test applications
+//
+// Author: Lasse Collin
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#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/tests/tuktest.h b/tests/tuktest.h
new file mode 100644
index 0000000..508eace
--- /dev/null
+++ b/tests/tuktest.h
@@ -0,0 +1,1053 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file tuktest.h
+/// \brief Helper macros for writing simple test programs
+/// \version 2023-01-08
+///
+/// Some inspiration was taken from STest by Keith Nicholas.
+///
+/// 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 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
+//
+// This file has been put into the public domain.
+// You can do whatever you want with this file.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef TUKTEST_H
+#define TUKTEST_H
+
+#include <stddef.h>
+
+// 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 <inttypes.h>
+#endif
+
+#include <setjmp.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+
+#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)
+# 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)
+# 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/tests/xzgrep_expected_output b/tests/xzgrep_expected_output
new file mode 100644
index 0000000..e531d93
--- /dev/null
+++ b/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/windows/INSTALL-MSVC.txt b/windows/INSTALL-MSVC.txt
new file mode 100644
index 0000000..2fdd1e7
--- /dev/null
+++ b/windows/INSTALL-MSVC.txt
@@ -0,0 +1,56 @@
+
+Building XZ Utils with Microsoft Visual Studio
+==============================================
+
+Introduction
+------------
+
+ MSVC 2013 update 2 and later have enough C99 support to build
+ liblzma from XZ Utils 5.2.0 and later without modifications.
+ Older MSVC versions would require a large number of changes to
+ the XZ Utils code and thus the old MSVC versions aren't supported.
+
+ As of 2015-06-19, some work has been done to get xz.exe and other
+ command line tools built with MSVC, but it's not complete enough
+ to be included in XZ Utils.
+
+
+Building
+--------
+
+ It is recommended to use CMake to generate build files for MSVC.
+ The project files in vs201x directories will be removed in the
+ future (5.4.x releases will include them still).
+
+ Descriptions of the files in the vs201x directories:
+
+ config.h liblzma configuration #defines for MSVC.
+ liblzma.vcxproj This builds static liblzma.
+ liblzma_dll.vcxproj This builds liblzma.dll.
+ xz_win.sln Solution using the above project files.
+
+ The projects have x86 and x86-64 platform configurations, as well
+ as a Debug, Release, and ReleaseMT configuration -- MT is the
+ compiler switch to link to the CRT statically, so it will not
+ have any other DLL dependencies.
+
+ The VS2017 project files don't set <WindowsTargetPlatformVersion>.
+ This means that you may need to either install Windows SDK 8.1 or
+ you may need to set the target platform version before building.
+
+ Currently no test programs are built or run under MSVC from the
+ project files. CMake-based builds include tests too.
+
+
+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 <lzma.h>.
+
+ 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/windows/INSTALL-MinGW.txt b/windows/INSTALL-MinGW.txt
new file mode 100644
index 0000000..72e2718
--- /dev/null
+++ b/windows/INSTALL-MinGW.txt
@@ -0,0 +1,138 @@
+
+Building XZ Utils on Windows
+============================
+
+Introduction
+------------
+
+ This document explains shortly where to get and how to install the
+ build tools that are needed to build XZ Utils on Windows. The final
+ binary package will be standalone in sense that it will depend only
+ on DLLs that are included in all Windows installations.
+
+ These instructions don't apply to Cygwin. XZ Utils can be built under
+ Cygwin in the same way as many other packages.
+
+ These instructions don't apply to MinGW and MSYS developers either,
+ who may want to package XZ Utils for MinGW or MSYS distributions.
+ You know who you are, and will probably use quite different configure
+ options etc. than what is described here.
+
+
+Installing the toolchain(s)
+---------------------------
+
+ Some of the following is needed:
+ - MSYS is always needed to use the GNU Autotools based build system.
+ - MinGW builds 32-bit x86 binaries.
+ - 32-bit MinGW-w64 (I call it MingW-w32 here) builds 32-bit x86
+ executables too.
+ - MinGW-w64 builds 64-bit x86-64 binaries.
+
+ So you need to pick between MinGW and MinGW-w32 when building
+ 32-bit version. You don't need both.
+
+ You might find 7-Zip <https://7-zip.org/> handy when extracting
+ some files. The ready-made build script build.bash will also use
+ 7-Zip to create the distributable .zip and .7z files.
+
+ I used the following directory structure but you can use whatever
+ you want. Just note that I will use these in my examples. Each of
+ these should have a subdirectory "bin":
+
+ C:\devel\tools\msys
+ C:\devel\tools\mingw
+ C:\devel\tools\mingw-w32
+ C:\devel\tools\mingw-w64
+
+
+Installing MSYS
+
+ You can download MSYS from MinGW's Sourceforge page:
+
+ https://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/
+
+ I recommend using MSYS 1.0.11 (MSYS-1.0.11.exe or
+ msysCORE-1.0.11-bin.tar.gz) because that package includes all the
+ required tools. At least some of the later versions include only
+ a subset and thus you would need to download the rest separately.
+ The old version will work fine for building XZ Utils.
+
+ You can use either the .exe or .tar.gz package. I prefer .tar.gz,
+ because it can be extracted into any directory and later removed
+ without worrying about uninstallers.
+
+
+Installing MinGW
+
+ NOTE: This section may be outdated. I haven't tried MinGW recently.
+
+ You can download the required packages from MinGW's Sourceforge page:
+
+ https://sourceforge.net/projects/mingw/files/
+
+ These version numbers were the latest when I wrote this document, but
+ you probably should pick the latest versions:
+
+ MinGW Runtime -> mingwrt-3.17-mingw32-dev.tar.gz
+ MinGW API for MS-Windows -> w32api-3.14-mingw32-dev.tar.gz
+ GNU Binutils -> binutils-2.20-1-bin.tar.gz
+ GCC Version 4 -> gcc-full-4.4.0-mingw32-bin-2.tar.lzma
+
+ The full GCC package is quite big, but if you want a smaller
+ download, you will need to download more than one file, so I'm
+ using the full package in this document for simplicity.
+
+ Extract the packages in the above order, possibly overwriting files
+ from packages that were extracted earlier.
+
+
+Installing MinGW-w32 or MinGW-w64
+
+ I used the packages from Mingw-builds project. With that it is
+ enough to pick one .7z file for 32-bit and another for 64-bit
+ toolchain. For XZ Utils 5.2.0 I used the packages from these
+ directories:
+
+ https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/
+
+ https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/sjlj/
+
+ If you install both MinGW-w32 and MinGW-w64, remember to extract
+ them into different directories. build.bash looks at
+ C:\devel\tools\mingw-w32 and C:\devel\tools\mingw-w64 by default.
+
+
+Building XZ Utils
+-----------------
+
+ Start MSYS by going to the directory C:\devel\tools\msys and running
+ msys.bat there (double-click or use command prompt). It will start
+ at "home" directory, which is C:\devel\tools\msys\home\YourUserName.
+
+ If you have xz-5.x.x.tar.gz in C:\devel, you should be able to build
+ it now with the following commands:
+
+ cd /c/devel
+ tar xzf xz-5.x.x.tar.gz
+ cd xz-5.x.x
+ bash windows/build.bash
+
+ If you used some other directory than C:\devel\tools for the build
+ tools, edit the variables near the beginning of build.bash first.
+
+ If you want to build manually, read the buildit() function in
+ build.bash. Look especially at the latter configure invocation.
+
+ Be patient. Running configure and other scripts used by the build
+ system is (very) slow under Windows.
+
+
+Using a snapshot from the Git repository
+
+ To use a snapshot, the build system files need to be generated with
+ autogen.sh or "autoreconf -fi" before trying to build using the
+ above build instructions. You can install the relevant extra packages
+ from MinGW or use Cygwin or use e.g. a GNU/Linux system to create a
+ source package with the required build system files.
+
diff --git a/windows/README-Windows.txt b/windows/README-Windows.txt
new file mode 100644
index 0000000..83f902e
--- /dev/null
+++ b/windows/README-Windows.txt
@@ -0,0 +1,122 @@
+
+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 <https://tukaani.org/xz/>.
+
+ The parts of the XZ Utils source code, that are relevant to this
+ binary package, are in the public domain. XZ Utils have been built
+ for this package with MinGW-w64 and linked statically against its
+ runtime libraries. See COPYING-Windows.txt for the copyright and
+ license information that applies to the MinGW-w64 runtime. You must
+ include it when redistributing these XZ Utils binaries.
+
+
+Package contents
+----------------
+
+ All executables and libraries in this package require msvcrt.dll.
+ It's included in all recent Windows versions. (On Windows 95 it
+ might be missing, but once you get it somewhere, the i686 binaries
+ should run even on Windows 95 if the processor is new enough.)
+
+ There is a SSE2 optimization in the compression code but this
+ version of XZ Utils doesn't include run-time processor detection.
+ This is why there is a separate i686-SSE2 version.
+
+ There is one directory for each type of executable and library files:
+
+ bin_i686 32-bit x86 (i686 and newer), Windows 95 and later
+ bin_i686-sse2 32-bit x86 (i686 with SSE2), Windows 98 and later
+ bin_x86-64 64-bit x86-64, Windows Vista and later
+
+ 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.
+
+ 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.
+
+ liblzma.a Static version of the liblzma compression library.
+ This file is useful only for developers.
+
+ The rest of the directories contain architecture-independent files:
+
+ doc Documentation in the plain text (TXT) format. The
+ manuals of the command line tools are provided also
+ in the PDF format. liblzma.def is in this directory
+ too.
+
+ include C header files for liblzma. These should be
+ compatible with most C and C++ compilers. If you
+ have problems, try to fix it and send your fixes
+ upstream, or at least report a bug, thanks.
+
+
+Linking against liblzma
+-----------------------
+
+MinGW
+
+ If you use MinGW, linking against liblzma.dll or liblzma.a should
+ be straightforward. You don't need an import library to link
+ against liblzma.dll, and for static linking, you don't need to
+ worry about the LZMA_API_STATIC macro.
+
+ Note that the MinGW distribution includes liblzma. If you are
+ building packages that will be part of the MinGW distribution, you
+ probably should use the version of liblzma shipped in MinGW instead
+ of this package.
+
+
+Microsoft Visual C++
+
+ 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 naturally be changed:
+
+ lib /def:liblzma.def /out:liblzma.lib /machine:x64
+
+ If you need to link statically against liblzma, you should build
+ liblzma with MSVC 2013 update 2 or later. Alternatively, if having
+ a decompressor is enough, consider using XZ Embedded or LZMA SDK.
+
+ When you plan to link against static liblzma, you need to tell
+ lzma.h to not use __declspec(dllimport) by defining the macro
+ LZMA_API_STATIC. You can do it either in the C/C++ code
+
+ #define LZMA_API_STATIC
+ #include <lzma.h>
+
+ or by adding it to compiler options.
+
+
+Other compilers
+
+ If you are using some other compiler, see its documentation how to
+ create an import library (if it is needed). If it is simple, I
+ might consider including the instructions here.
+
+
+Reporting bugs
+--------------
+
+ Report bugs to <xz@tukaani.org>.
+
diff --git a/windows/build.bash b/windows/build.bash
new file mode 100644
index 0000000..e083fe7
--- /dev/null
+++ b/windows/build.bash
@@ -0,0 +1,204 @@
+#!/bin/bash
+#
+###############################################################################
+#
+# Build a binary package on Windows with MinGW and MSYS
+#
+# Set the paths where MinGW, Mingw-w32, or MinGW-w64 are installed. If both
+# MinGW and MinGW-w32 are specified, MinGW-w32 will be used. If there is no
+# 32-bit or 64-bit compiler at all, it is simply skipped.
+#
+# Optionally, 7-Zip is used to create the final .zip and .7z packages.
+# If you have installed it in the default directory, this script should
+# find it automatically. Otherwise adjust the path manually.
+#
+# If you want to use a cross-compiler e.g. on GNU/Linux, this script won't
+# work out of the box. You need to omit "make check" commands and replace
+# u2d with some other tool to convert newlines from LF to CR+LF. You will
+# also need to pass the --host option to configure.
+#
+###############################################################################
+#
+# Author: Lasse Collin
+#
+# This file has been put into the public domain.
+# You can do whatever you want with this file.
+#
+###############################################################################
+
+MINGW_DIR=/c/devel/tools/mingw
+MINGW_W32_DIR=/c/devel/tools/mingw-w32
+MINGW_W64_DIR=/c/devel/tools/mingw-w64
+
+for SEVENZ_EXE in "$PROGRAMW6432/7-Zip/7z.exe" "$PROGRAMFILES/7-Zip/7z.exe" \
+ "/c/Program Files/7-Zip/7z.exe"
+do
+ [ -x "$SEVENZ_EXE" ] && break
+done
+
+
+# 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 "You are in a wrong directory." >&2
+ exit 1
+ fi
+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
+ BUILD=$2
+ CFLAGS=$3
+
+ # 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 \
+ --build="$BUILD" \
+ CFLAGS="$CFLAGS -Os"
+ make check
+
+ 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 \
+ --build="$BUILD" \
+ CFLAGS="$CFLAGS -O2"
+ make -C src/liblzma
+ make -C src/xz LDFLAGS=-static
+ make -C tests check
+
+ cp -v src/xz/xz.exe src/liblzma/.libs/liblzma.a "$DESTDIR"
+ cp -v src/liblzma/.libs/liblzma-*.dll "$DESTDIR/liblzma.dll"
+
+ strip -v "$DESTDIR/"*.{exe,dll}
+ strip -vg "$DESTDIR/"*.a
+}
+
+# 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 actual the filenames.
+txtcp()
+{
+ DESTDIR=$1
+ SUFFIX=$2
+ shift 2
+ for SRCFILE; do
+ DESTFILE="$DESTDIR/${SRCFILE##*/}$SUFFIX"
+ echo "Converting \`$SRCFILE' -> \`$DESTFILE'"
+ u2d < "$SRCFILE" > "$DESTFILE"
+ done
+}
+
+if [ -d "$MINGW_W32_DIR" ]; then
+ # 32-bit x86, Win95 or later, using MinGW-w32
+ PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \
+ buildit \
+ pkg/bin_i686 \
+ i686-w64-mingw32 \
+ '-march=i686 -mtune=generic'
+ # 32-bit x86 with SSE2, Win98 or later, using MinGW-w32
+ PATH=$MINGW_W32_DIR/bin:$MINGW_W32_DIR/i686-w64-mingw32/bin:$PATH \
+ buildit \
+ pkg/bin_i686-sse2 \
+ i686-w64-mingw32 \
+ '-march=i686 -msse2 -mfpmath=sse -mtune=generic'
+elif [ -d "$MINGW_DIR" ]; then
+ # 32-bit x86, Win95 or later, using MinGW
+ PATH=$MINGW_DIR/bin:$PATH \
+ buildit \
+ pkg/bin_i486 \
+ i486-pc-mingw32 \
+ '-march=i486 -mtune=generic'
+fi
+
+if [ -d "$MINGW_W64_DIR" ]; then
+ # x86-64, Windows Vista or later, using MinGW-w64
+ PATH=$MINGW_W64_DIR/bin:$MINGW_W64_DIR/x86_64-w64-mingw32/bin:$PATH \
+ buildit \
+ pkg/bin_x86-64 \
+ x86_64-w64-mingw32 \
+ '-march=x86-64 -mtune=generic'
+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/{api,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 NEWS README THANKS TODO
+txtcp pkg/doc "" doc/*.txt windows/README-Windows.txt
+txtcp pkg/doc/manuals "" doc/man/txt/{xz,xzdec,lzmainfo}.txt
+cp -v doc/man/pdf-*/{xz,xzdec,lzmainfo}-*.pdf pkg/doc/manuals
+cp -v doc/api/* pkg/doc/api
+txtcp pkg/doc/examples "" doc/examples/*
+
+if [ -f windows/COPYING-Windows.txt ]; then
+ txtcp pkg/doc "" windows/COPYING-Windows.txt
+fi
+
+# Create the package. This requires 7z.exe from 7-Zip. If it wasn't found,
+# this step is skipped and you have to zip it yourself.
+VER=$(sh build-aux/version.sh)
+cd pkg
+if [ -x "$SEVENZ_EXE" ]; then
+ "$SEVENZ_EXE" a -tzip ../xz-$VER-windows.zip *
+ "$SEVENZ_EXE" a ../xz-$VER-windows.7z *
+else
+ echo
+ echo "NOTE: 7z.exe 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
+
+if [ ! -f ../windows/COPYING-Windows.txt ]; then
+ echo
+ echo "NOTE: windows/COPYING-Windows.txt doesn't exists."
+ echo " MinGW(-w64) runtime copyright information"
+ echo " is not included in the package."
+fi
+
+echo
+echo "Build completed successfully."
+echo
diff --git a/windows/vs2013/config.h b/windows/vs2013/config.h
new file mode 100644
index 0000000..1a78b9b
--- /dev/null
+++ b/windows/vs2013/config.h
@@ -0,0 +1,157 @@
+/* config.h for compiling liblzma (*not* the whole XZ Utils) with MSVC 2013 */
+
+/* Prefix for symbols exported by tuklib_*.c files */
+#define TUKLIB_SYMBOL_PREFIX lzma_
+
+/* How many MiB of RAM to assume if the real amount cannot be determined. */
+#define ASSUME_RAM 128
+
+/* 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 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 <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_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 <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 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
+
+#ifdef _M_IX86
+/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This
+ avoids use of features that were added in Windows Vista.
+ This is used for 32-bit x86 builds for compatibility reasons since it
+ makes no measurable difference in performance compared to Vista threads. */
+#define MYTHREAD_WIN95 1
+#else
+/* Define to 1 when using Windows Vista compatible threads. This uses features
+ that are not available on Windows XP. */
+#define MYTHREAD_VISTA 1
+#endif
+
+/* Define to 1 to disable debugging code. */
+#define NDEBUG 1
+
+/* 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. */
+#ifdef _WIN64
+#define SIZEOF_SIZE_T 8
+#else
+#define SIZEOF_SIZE_T 4
+#endif
+
+/* 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/windows/vs2013/liblzma.vcxproj b/windows/vs2013/liblzma.vcxproj
new file mode 100644
index 0000000..0e9b8b1
--- /dev/null
+++ b/windows/vs2013/liblzma.vcxproj
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|Win32">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|x64">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{12728250-16EC-4DC6-94D7-E21DD88947F8}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\common\tuklib_cpucores.c" />
+ <ClCompile Include="..\..\src\common\tuklib_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\check\check.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\sha256.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\auto_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_util.c" />
+ <ClCompile Include="..\..\src\liblzma\common\common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_decoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_preset.c" />
+ <ClCompile Include="..\..\src\liblzma\common\file_info.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_cputhreads.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_hash.c" />
+ <ClCompile Include="..\..\src\liblzma\common\lzip_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\outqueue.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\string_conversion.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_size.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_common.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\fastpos_table.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_normal.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_presets.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder_mf.c" />
+ <ClCompile Include="..\..\src\liblzma\rangecoder\price_table.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\armthumb.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\ia64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\powerpc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_coder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\sparc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\x86.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\common\mythread.h" />
+ <ClInclude Include="..\..\src\common\sysdefs.h" />
+ <ClInclude Include="..\..\src\common\tuklib_common.h" />
+ <ClInclude Include="..\..\src\common\tuklib_config.h" />
+ <ClInclude Include="..\..\src\common\tuklib_cpucores.h" />
+ <ClInclude Include="..\..\src\common\tuklib_integer.h" />
+ <ClInclude Include="..\..\src\common\tuklib_physmem.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\base.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\bcj.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\block.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\check.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\container.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\delta.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\filter.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\hardware.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\lzma12.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\stream_flags.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\version.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\vli.h" />
+ <ClInclude Include="..\..\src\liblzma\check\check.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc_macros.h" />
+ <ClInclude Include="..\..\src\liblzma\common\alone_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_buffer_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\easy_preset.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\memcmplen.h" />
+ <ClInclude Include="..\..\src\liblzma\common\lzip_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\outqueue.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_flags_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\fastpos.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_common.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash_table.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\price.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_common.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_coder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_private.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/windows/vs2013/liblzma_dll.vcxproj b/windows/vs2013/liblzma_dll.vcxproj
new file mode 100644
index 0000000..c2c3498
--- /dev/null
+++ b/windows/vs2013/liblzma_dll.vcxproj
@@ -0,0 +1,398 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|Win32">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|x64">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E0F247DB-EF12-4755-8DF9-F74BCD1348F7}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>
+ </LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental />
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <LinkIncremental>
+ </LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <LinkIncremental />
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;_DEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;_DEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\common\tuklib_cpucores.c" />
+ <ClCompile Include="..\..\src\common\tuklib_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\check\check.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\sha256.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\auto_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_util.c" />
+ <ClCompile Include="..\..\src\liblzma\common\common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_decoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_preset.c" />
+ <ClCompile Include="..\..\src\liblzma\common\file_info.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_cputhreads.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_hash.c" />
+ <ClCompile Include="..\..\src\liblzma\common\lzip_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\outqueue.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\string_conversion.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_size.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_common.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\fastpos_table.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_normal.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_presets.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder_mf.c" />
+ <ClCompile Include="..\..\src\liblzma\rangecoder\price_table.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\armthumb.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\ia64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\powerpc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_coder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\sparc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\x86.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\common\mythread.h" />
+ <ClInclude Include="..\..\src\common\sysdefs.h" />
+ <ClInclude Include="..\..\src\common\tuklib_common.h" />
+ <ClInclude Include="..\..\src\common\tuklib_config.h" />
+ <ClInclude Include="..\..\src\common\tuklib_cpucores.h" />
+ <ClInclude Include="..\..\src\common\tuklib_integer.h" />
+ <ClInclude Include="..\..\src\common\tuklib_physmem.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\base.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\bcj.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\block.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\check.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\container.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\delta.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\filter.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\hardware.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\lzma12.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\stream_flags.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\version.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\vli.h" />
+ <ClInclude Include="..\..\src\liblzma\check\check.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc_macros.h" />
+ <ClInclude Include="..\..\src\liblzma\common\alone_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_buffer_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\easy_preset.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\memcmplen.h" />
+ <ClInclude Include="..\..\src\liblzma\common\lzip_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\outqueue.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_flags_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\fastpos.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_common.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash_table.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\price.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_common.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_coder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_private.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\src\liblzma\liblzma_w32res.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/windows/vs2013/xz_win.sln b/windows/vs2013/xz_win.sln
new file mode 100644
index 0000000..3d25291
--- /dev/null
+++ b/windows/vs2013/xz_win.sln
@@ -0,0 +1,48 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma_dll", "liblzma_dll.vcxproj", "{E0F247DB-EF12-4755-8DF9-F74BCD1348F7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ ReleaseMT|Win32 = ReleaseMT|Win32
+ ReleaseMT|x64 = ReleaseMT|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.Build.0 = Debug|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.ActiveCfg = Debug|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.Build.0 = Debug|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.ActiveCfg = Release|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.Build.0 = Release|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|Win32.ActiveCfg = ReleaseMT|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|Win32.Build.0 = ReleaseMT|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|x64.ActiveCfg = ReleaseMT|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|x64.Build.0 = ReleaseMT|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|Win32.Build.0 = Debug|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|x64.ActiveCfg = Debug|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|x64.Build.0 = Debug|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|Win32.ActiveCfg = Release|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|Win32.Build.0 = Release|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|x64.ActiveCfg = Release|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|x64.Build.0 = Release|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|Win32.ActiveCfg = ReleaseMT|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|Win32.Build.0 = ReleaseMT|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|x64.ActiveCfg = ReleaseMT|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|x64.Build.0 = ReleaseMT|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/windows/vs2017/config.h b/windows/vs2017/config.h
new file mode 100644
index 0000000..06da83c
--- /dev/null
+++ b/windows/vs2017/config.h
@@ -0,0 +1,157 @@
+/* config.h for compiling liblzma (*not* the whole XZ Utils) with MSVC 2017 */
+
+/* Prefix for symbols exported by tuklib_*.c files */
+#define TUKLIB_SYMBOL_PREFIX lzma_
+
+/* How many MiB of RAM to assume if the real amount cannot be determined. */
+#define ASSUME_RAM 128
+
+/* 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 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 <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_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 <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 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
+
+#ifdef _M_IX86
+/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This
+ avoids use of features that were added in Windows Vista.
+ This is used for 32-bit x86 builds for compatibility reasons since it
+ makes no measurable difference in performance compared to Vista threads. */
+#define MYTHREAD_WIN95 1
+#else
+/* Define to 1 when using Windows Vista compatible threads. This uses features
+ that are not available on Windows XP. */
+#define MYTHREAD_VISTA 1
+#endif
+
+/* Define to 1 to disable debugging code. */
+#define NDEBUG 1
+
+/* 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. */
+#ifdef _WIN64
+#define SIZEOF_SIZE_T 8
+#else
+#define SIZEOF_SIZE_T 4
+#endif
+
+/* 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/windows/vs2017/liblzma.vcxproj b/windows/vs2017/liblzma.vcxproj
new file mode 100644
index 0000000..f9241a2
--- /dev/null
+++ b/windows/vs2017/liblzma.vcxproj
@@ -0,0 +1,363 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|Win32">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|x64">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{12728250-16EC-4DC6-94D7-E21DD88947F8}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\common\tuklib_cpucores.c" />
+ <ClCompile Include="..\..\src\common\tuklib_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\check\check.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\sha256.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\auto_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_util.c" />
+ <ClCompile Include="..\..\src\liblzma\common\common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_decoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_preset.c" />
+ <ClCompile Include="..\..\src\liblzma\common\file_info.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_cputhreads.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_hash.c" />
+ <ClCompile Include="..\..\src\liblzma\common\lzip_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\outqueue.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\string_conversion.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_size.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_common.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\fastpos_table.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_normal.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_presets.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder_mf.c" />
+ <ClCompile Include="..\..\src\liblzma\rangecoder\price_table.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\armthumb.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\ia64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\powerpc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_coder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\sparc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\x86.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\common\mythread.h" />
+ <ClInclude Include="..\..\src\common\sysdefs.h" />
+ <ClInclude Include="..\..\src\common\tuklib_common.h" />
+ <ClInclude Include="..\..\src\common\tuklib_config.h" />
+ <ClInclude Include="..\..\src\common\tuklib_cpucores.h" />
+ <ClInclude Include="..\..\src\common\tuklib_integer.h" />
+ <ClInclude Include="..\..\src\common\tuklib_physmem.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\base.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\bcj.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\block.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\check.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\container.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\delta.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\filter.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\hardware.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\lzma12.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\stream_flags.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\version.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\vli.h" />
+ <ClInclude Include="..\..\src\liblzma\check\check.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc_macros.h" />
+ <ClInclude Include="..\..\src\liblzma\common\alone_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_buffer_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\easy_preset.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\memcmplen.h" />
+ <ClInclude Include="..\..\src\liblzma\common\lzip_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\outqueue.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_flags_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\fastpos.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_common.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash_table.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\price.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_common.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_coder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_private.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/windows/vs2017/liblzma_dll.vcxproj b/windows/vs2017/liblzma_dll.vcxproj
new file mode 100644
index 0000000..7818b2c
--- /dev/null
+++ b/windows/vs2017/liblzma_dll.vcxproj
@@ -0,0 +1,398 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|Win32">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|x64">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E0F247DB-EF12-4755-8DF9-F74BCD1348F7}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>
+ </LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental />
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <LinkIncremental>
+ </LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <LinkIncremental />
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;_DEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;_DEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\common\tuklib_cpucores.c" />
+ <ClCompile Include="..\..\src\common\tuklib_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\check\check.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\sha256.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\auto_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_util.c" />
+ <ClCompile Include="..\..\src\liblzma\common\common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_decoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_preset.c" />
+ <ClCompile Include="..\..\src\liblzma\common\file_info.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_cputhreads.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_hash.c" />
+ <ClCompile Include="..\..\src\liblzma\common\lzip_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\outqueue.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\string_conversion.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_size.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_common.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\fastpos_table.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_normal.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_presets.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder_mf.c" />
+ <ClCompile Include="..\..\src\liblzma\rangecoder\price_table.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\armthumb.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\ia64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\powerpc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_coder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\sparc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\x86.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\common\mythread.h" />
+ <ClInclude Include="..\..\src\common\sysdefs.h" />
+ <ClInclude Include="..\..\src\common\tuklib_common.h" />
+ <ClInclude Include="..\..\src\common\tuklib_config.h" />
+ <ClInclude Include="..\..\src\common\tuklib_cpucores.h" />
+ <ClInclude Include="..\..\src\common\tuklib_integer.h" />
+ <ClInclude Include="..\..\src\common\tuklib_physmem.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\base.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\bcj.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\block.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\check.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\container.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\delta.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\filter.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\hardware.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\lzma12.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\stream_flags.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\version.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\vli.h" />
+ <ClInclude Include="..\..\src\liblzma\check\check.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc_macros.h" />
+ <ClInclude Include="..\..\src\liblzma\common\alone_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_buffer_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\easy_preset.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\memcmplen.h" />
+ <ClInclude Include="..\..\src\liblzma\common\lzip_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\outqueue.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_flags_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\fastpos.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_common.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash_table.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\price.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_common.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_coder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_private.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\src\liblzma\liblzma_w32res.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/windows/vs2017/xz_win.sln b/windows/vs2017/xz_win.sln
new file mode 100644
index 0000000..ba49f3e
--- /dev/null
+++ b/windows/vs2017/xz_win.sln
@@ -0,0 +1,48 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma_dll", "liblzma_dll.vcxproj", "{E0F247DB-EF12-4755-8DF9-F74BCD1348F7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ ReleaseMT|Win32 = ReleaseMT|Win32
+ ReleaseMT|x64 = ReleaseMT|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.Build.0 = Debug|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.ActiveCfg = Debug|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.Build.0 = Debug|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.ActiveCfg = Release|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.Build.0 = Release|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|Win32.ActiveCfg = ReleaseMT|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|Win32.Build.0 = ReleaseMT|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|x64.ActiveCfg = ReleaseMT|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|x64.Build.0 = ReleaseMT|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|Win32.Build.0 = Debug|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|x64.ActiveCfg = Debug|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|x64.Build.0 = Debug|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|Win32.ActiveCfg = Release|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|Win32.Build.0 = Release|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|x64.ActiveCfg = Release|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|x64.Build.0 = Release|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|Win32.ActiveCfg = ReleaseMT|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|Win32.Build.0 = ReleaseMT|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|x64.ActiveCfg = ReleaseMT|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|x64.Build.0 = ReleaseMT|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/windows/vs2019/config.h b/windows/vs2019/config.h
new file mode 100644
index 0000000..6679da9
--- /dev/null
+++ b/windows/vs2019/config.h
@@ -0,0 +1,157 @@
+/* config.h for compiling liblzma (*not* the whole XZ Utils) with MSVC 2019 */
+
+/* Prefix for symbols exported by tuklib_*.c files */
+#define TUKLIB_SYMBOL_PREFIX lzma_
+
+/* How many MiB of RAM to assume if the real amount cannot be determined. */
+#define ASSUME_RAM 128
+
+/* 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 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 <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_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 <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 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
+
+#ifdef _M_IX86
+/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This
+ avoids use of features that were added in Windows Vista.
+ This is used for 32-bit x86 builds for compatibility reasons since it
+ makes no measurable difference in performance compared to Vista threads. */
+#define MYTHREAD_WIN95 1
+#else
+/* Define to 1 when using Windows Vista compatible threads. This uses features
+ that are not available on Windows XP. */
+#define MYTHREAD_VISTA 1
+#endif
+
+/* Define to 1 to disable debugging code. */
+#define NDEBUG 1
+
+/* 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. */
+#ifdef _WIN64
+#define SIZEOF_SIZE_T 8
+#else
+#define SIZEOF_SIZE_T 4
+#endif
+
+/* 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/windows/vs2019/liblzma.vcxproj b/windows/vs2019/liblzma.vcxproj
new file mode 100644
index 0000000..defb2e7
--- /dev/null
+++ b/windows/vs2019/liblzma.vcxproj
@@ -0,0 +1,364 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|Win32">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|x64">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{12728250-16EC-4DC6-94D7-E21DD88947F8}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\common\tuklib_cpucores.c" />
+ <ClCompile Include="..\..\src\common\tuklib_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\check\check.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\sha256.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\auto_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_util.c" />
+ <ClCompile Include="..\..\src\liblzma\common\common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_decoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_preset.c" />
+ <ClCompile Include="..\..\src\liblzma\common\file_info.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_cputhreads.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_hash.c" />
+ <ClCompile Include="..\..\src\liblzma\common\lzip_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\outqueue.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\string_conversion.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_size.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_common.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\fastpos_table.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_normal.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_presets.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder_mf.c" />
+ <ClCompile Include="..\..\src\liblzma\rangecoder\price_table.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\armthumb.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\ia64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\powerpc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_coder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\sparc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\x86.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\common\mythread.h" />
+ <ClInclude Include="..\..\src\common\sysdefs.h" />
+ <ClInclude Include="..\..\src\common\tuklib_common.h" />
+ <ClInclude Include="..\..\src\common\tuklib_config.h" />
+ <ClInclude Include="..\..\src\common\tuklib_cpucores.h" />
+ <ClInclude Include="..\..\src\common\tuklib_integer.h" />
+ <ClInclude Include="..\..\src\common\tuklib_physmem.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\base.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\bcj.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\block.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\check.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\container.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\delta.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\filter.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\hardware.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\lzma12.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\stream_flags.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\version.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\vli.h" />
+ <ClInclude Include="..\..\src\liblzma\check\check.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc_macros.h" />
+ <ClInclude Include="..\..\src\liblzma\common\alone_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_buffer_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\easy_preset.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\memcmplen.h" />
+ <ClInclude Include="..\..\src\liblzma\common\lzip_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\outqueue.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_flags_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\fastpos.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_common.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash_table.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\price.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_common.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_coder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_private.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/windows/vs2019/liblzma_dll.vcxproj b/windows/vs2019/liblzma_dll.vcxproj
new file mode 100644
index 0000000..8aa221b
--- /dev/null
+++ b/windows/vs2019/liblzma_dll.vcxproj
@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|Win32">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="ReleaseMT|x64">
+ <Configuration>ReleaseMT</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E0F247DB-EF12-4755-8DF9-F74BCD1348F7}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>
+ </LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental />
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <LinkIncremental>
+ </LinkIncremental>
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <LinkIncremental />
+ <OutDir>$(SolutionDir)$(Configuration)\$(Platform)\$(ProjectName)\</OutDir>
+ <IntDir>$(Configuration)\$(Platform)\$(ProjectName)\</IntDir>
+ <TargetName>liblzma</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;_DEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;_DEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;DLL_EXPORT;NDEBUG;_WINDOWS;_USRDLL;LIBLZMADLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;../../src/liblzma/check;../../src/liblzma/delta;../../src/liblzma/lz;../../src/liblzma/lzma;../../src/liblzma/rangecoder;../../src/liblzma/simple</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>./;../../src/liblzma/common;../../src/common;../../src/liblzma/api;</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>HAVE_CONFIG_H</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\src\common\tuklib_cpucores.c" />
+ <ClCompile Include="..\..\src\common\tuklib_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\check\check.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc32_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\check\crc64_table.c" />
+ <ClCompile Include="..\..\src\liblzma\check\sha256.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\alone_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\auto_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_header_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\block_util.c" />
+ <ClCompile Include="..\..\src\liblzma\common\common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_decoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_encoder_memusage.c" />
+ <ClCompile Include="..\..\src\liblzma\common\easy_preset.c" />
+ <ClCompile Include="..\..\src\liblzma\common\file_info.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\filter_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_cputhreads.c" />
+ <ClCompile Include="..\..\src\liblzma\common\hardware_physmem.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\index_hash.c" />
+ <ClCompile Include="..\..\src\liblzma\common\lzip_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\microlzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\outqueue.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_buffer_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_decoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_encoder_mt.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_common.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\stream_flags_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\string_conversion.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\common\vli_size.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_common.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\delta\delta_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\fastpos_table.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma2_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_fast.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_optimum_normal.c" />
+ <ClCompile Include="..\..\src\liblzma\lzma\lzma_encoder_presets.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\lz\lz_encoder_mf.c" />
+ <ClCompile Include="..\..\src\liblzma\rangecoder\price_table.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\arm64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\armthumb.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\ia64.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\powerpc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_coder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_decoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\simple_encoder.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\sparc.c" />
+ <ClCompile Include="..\..\src\liblzma\simple\x86.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\src\common\mythread.h" />
+ <ClInclude Include="..\..\src\common\sysdefs.h" />
+ <ClInclude Include="..\..\src\common\tuklib_common.h" />
+ <ClInclude Include="..\..\src\common\tuklib_config.h" />
+ <ClInclude Include="..\..\src\common\tuklib_cpucores.h" />
+ <ClInclude Include="..\..\src\common\tuklib_integer.h" />
+ <ClInclude Include="..\..\src\common\tuklib_physmem.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\base.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\bcj.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\block.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\check.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\container.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\delta.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\filter.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\hardware.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\index_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\lzma12.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\stream_flags.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\version.h" />
+ <ClInclude Include="..\..\src\liblzma\api\lzma\vli.h" />
+ <ClInclude Include="..\..\src\liblzma\check\check.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc32_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_be.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc64_table_le.h" />
+ <ClInclude Include="..\..\src\liblzma\check\crc_macros.h" />
+ <ClInclude Include="..\..\src\liblzma\common\alone_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_buffer_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\block_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\easy_preset.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_common.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\filter_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\index_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\memcmplen.h" />
+ <ClInclude Include="..\..\src\liblzma\common\lzip_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\outqueue.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\common\stream_flags_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_common.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\delta\delta_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\fastpos.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma2_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_common.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lzma\lzma_encoder_private.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash.h" />
+ <ClInclude Include="..\..\src\liblzma\lz\lz_encoder_hash_table.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\price.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_common.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\rangecoder\range_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_coder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_decoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_encoder.h" />
+ <ClInclude Include="..\..\src\liblzma\simple\simple_private.h" />
+ <ClInclude Include="config.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\..\src\liblzma\liblzma_w32res.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/windows/vs2019/xz_win.sln b/windows/vs2019/xz_win.sln
new file mode 100644
index 0000000..c65cd3e
--- /dev/null
+++ b/windows/vs2019/xz_win.sln
@@ -0,0 +1,51 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28803.202
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma_dll", "liblzma_dll.vcxproj", "{E0F247DB-EF12-4755-8DF9-F74BCD1348F7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ ReleaseMT|Win32 = ReleaseMT|Win32
+ ReleaseMT|x64 = ReleaseMT|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|Win32.Build.0 = Debug|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.ActiveCfg = Debug|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Debug|x64.Build.0 = Debug|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.ActiveCfg = Release|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|Win32.Build.0 = Release|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.ActiveCfg = Release|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.Release|x64.Build.0 = Release|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|Win32.ActiveCfg = ReleaseMT|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|Win32.Build.0 = ReleaseMT|Win32
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|x64.ActiveCfg = ReleaseMT|x64
+ {12728250-16EC-4DC6-94D7-E21DD88947F8}.ReleaseMT|x64.Build.0 = ReleaseMT|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|Win32.Build.0 = Debug|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|x64.ActiveCfg = Debug|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Debug|x64.Build.0 = Debug|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|Win32.ActiveCfg = Release|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|Win32.Build.0 = Release|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|x64.ActiveCfg = Release|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.Release|x64.Build.0 = Release|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|Win32.ActiveCfg = ReleaseMT|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|Win32.Build.0 = ReleaseMT|Win32
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|x64.ActiveCfg = ReleaseMT|x64
+ {E0F247DB-EF12-4755-8DF9-F74BCD1348F7}.ReleaseMT|x64.Build.0 = ReleaseMT|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {78887FAE-FC02-4B67-A8DB-DC7863496039}
+ EndGlobalSection
+EndGlobal